APP下载

Mobile Web Middleware of NFC Context-Awareness Applications

2013-11-26XiangLiuZhiGuangQinandJieShen

Xiang Liu, Zhi-Guang Qin, and Jie Shen

1.Introduction

A mobile web middleware provides a light-weight web runtime on mobile devices, and an interoperable and platform independent solution to applications.Also it plays an important role in facilitating the development of distributed applications.To avoid increasing applications and services complexity for users, it is necessary to be aware of the information of context, which can be used to characterize the situation of an entity.An entity is a person,place or an object that is relevant to the interaction between a user and an application, including the user and applications themselves[1].Also the application automatically adapts to the changing environment as context-awareness that is flexible, adaptable, and capable of acting autonomously on behalf of users.A context-aware middleware offers entirely new opportunities for application developers and for end users.Especially in combination with mobile devices in pervasive computing environments, it is of high value and is used to increase usability tremendously.

A number of context-aware systems have been developed to demonstrate the usefulness of context-aware computing technology[2],[3].Middleware approaches for supporting context-awareness, which shield low-level sensing implementations from high-level applications, are quite essential.In [4]and [5], some overviews of middleware approaches were provided.In [6], a context-aware computing framework was presented, and a set of reusable toolkit components for context sensing and interpretation were implemented.In [7], a reconfigurable context-aware middleware was proposed to provide application developers with a tool for context-aware applications.A server-based middleware context-awareness sub-structure (CASS)[8]is proposed to support context-aware applications on mobile devices and high-level context data abstraction.However, one difficulty for context-aware applications has been the lack of adequate infrastructure support, particularly with respect to a generic and scalable architecture supporting evolving applications.Moreover, the efficient integration of context into mobile services in pervasive computing environments continues being a challenging research area.

In the recent past, different pervasive applications have been proposed to make use of near field communication(NFC): telemonitoring for chronic diseases[9], tourism,location and surfing[10], ticketing and payment[11],[12], and building a context-aware smart environment where it has been studied on how to make applications context-sensitive to the user interaction with the scenario[13],[14].However,with the development of mobile phones, users are more and more immersed into a complex environment of pervasive services and mobile clients offering increasingly sophisticated methods to acquire services.How to facilitate pervasive services and mobile interactions with the real world continues to be a challenging research area.Therefore, in this paper, an architecture and a mobile web middleware of NFC context-awareness applications are proposed, and applications or services within those intelligent environments are uniquely identified and described in a standardized way which facilitates access to and interaction with them.

Fig.1.Architecture of context-aware system.

2.System Architecture

Based on the above idea, we design the architecture of a context-aware system, as shown in Fig.1, which aims to provide efficient infrastructure support for building context-aware services in pervasive computing environments.There are three separate domains which we want to combine in our approach: a tag or an NFC mobile phone within which there are applications or services context, a service platform, and a mobile phone which connects the other two domains and acts as a mediator between them.To interact with both domains, the mobile phone uses the web middleware with context-awareness which detects the applications or services context from pervasive environments and acquires them from the service platform.In pervasive environments, tags or mobile phones contain the context information for applications or services.

Our mobile web middleware of NFC context-awareness is a distributed middleware that transfers and converts low-level context in physical spaces into semantic spaces where applications and services can be easily shared and accessed by mobile devices.It mainly consists of the context engine, widget runtime, web application manager(WAM), and web engine as shown in Fig.1.

2.1 Context Engine

The context engine is a framework for building context-aware applications.It provides a collection of tools and libraries to help developing context-enabled applications.It includes the following components.

· Context deducer.It is responsible for deducing high-level context from static and dynamic low-level context in the physical space, and storing them in the context database.

· Context interpreter.It is composed of the context reasoner and knowledge base.The context reasoner provides logic reasoning services in conjunction with a knowledge base and uses the rules contained in the knowledge base to process context information.

· Rule engine.It manages context-awareness rules and behaviors relevant to specific applications.These rules are explicitly updated and changed by users using user interface and implicitly learnt by the rule engine itself.

· Context database.The context database can be used to store, not only the context ontology, instance, and history,but also the domain knowledge.The context is modeled with the context ontology by using the web ontology language (OWL) to provide knowledge sharing, knowledge reuse, and logical reasoning.

· Context management.It is responsible for acquiring the low-level context from WAM and managing the context components to translate the low-level context into the high-level context.Based on it, the context service generates the necessary knowledge for decision on adaption actions to provide context-aware support.

2.2 Web Middleware

The mobile web middleware of NFC context-awareness applications is a light-weight modular architecture for the development and implementation of context-aware middleware.It consists of the following components.

· Widget runtime.It provides the widget with the runtime environment, and manages runtime context and windows for the widget.Moreover, it can interact with WAM, and provide the low-level context of applications for WAM.

· Web application manager.It is responsible for managing the widget lifecycle, which includes discovery,download, installation, and update, and managing the application list and information of installed widgets.Moreover, it acquires the low-level context from tags or the current widget, and transfers it into the context engine.The context engine processes the context information to provide context-awareness services by which WAM generates the automatic service invocation from the service platform and adaption action, as shown in Fig.2.

Fig.2.Management based on WAM.

· Web engine.It is a layout engine designed to support web standards such as the hyper text mark-up language(HTML), cascading style sheet (CSS), JavaScript,document object model (DOM), extensive markup language (XML), and XML http request.

3.Service Initiation by Peer-to-Peer

In this section, a scenario for describing NFC context-awareness applications based on a peer-to-peer model is presented.According to this scenario, a person watching a movie on his mobile phone (named mobile phone A in Fig.3) shares its application and content with his friend’s mobile phone B.It gets the current context information of mobile phone A by contact interaction and synchronizes mobile phone A’s application and content.

This system architecture based on the context-aware middleware is capable of fulfilling the above scenario.The context of the current application and content in the mobile phone A, which can be sensed by the software sensor WAM,was called low-level context.It is described by a XML document, as shown in Fig.4.

For simplicity, Fig.4 only shows a partial view of the low-level context which includes only the definition of the application resource and content resource.The low-level context has defined the use of two resources.First one is associated with the current application context of mobile phone A, which includes the application name and its universal resource identifier (URI).The second is about the content context of the playing movie which is characterized by a set of parameters as its property identifier.These parameters include the movie name, movie URI, video duration, etc.When mobile phone B wants to share the application and content of mobile phone A by contact interaction, the WAM of mobile phone A automatically sends the current application and content context to the WAM of mobile phone B by peer-to-peer NFC.If the application in application context is not local, WAM will download it via the URI from the application context to run.Moreover, the player application immediately starts playing the video via the URI from the content context.If the movie URI is a local URI on mobile phone A, the middleware on mobile phone B will try to search a URI of the movie from context database, and get more information about it such as its posters, release date, rating, and actors required in alphabetical order, beginning with the first letter in uppercase, separated by commas, and ending by a full stop.

As shown in Fig.5, two NFC enabled mobile phones are used for their interaction.The scenario is formed by three frames.The first frame represents a state before the synchronization of the application and content between the two phones.The second frame shows that mobile phone B is acquiring the current context information of mobile phone A by contact interaction and synchronizing its application and content.Finally, the third frame represents a state after the synchronization of the application and content.

4.Service Initiation by Tag

In this section, a scenario for describing NFC context-awareness applications based on the contextual tag is presented.According to this scenario, a person walking into a cinema gets services by contextual tags throughout the cinema, which contains service context information.When walking through the cinema, the person sees a new movie poster and touches it with the mobile phone.Immediately, it keeps and displays the movie news and information.Also the person purchases the movie ticket by mobile payment.When entering the movie hall, the person touches the access point, where an NFC tag is built in, with his NFC-enabled mobile phone.The ringing of mobile phone is turned off automatically, and the mobile phone simultaneously displays the movie information and the notes about the movie hall.

Fig.3.Example of service initiation by NFC peer-to-peer.

Fig.4.XML file for current context.

Fig.5.Service initiation by NFC peer-to-peer: (a) before synchronization, (b) synchronizing, and (c) after synchronization.

The above scenario that a person is entering a movie hall is described by a XML document, as shown in Fig.6,which only shows a partial view of the example.It specifies the interaction between the mobile phone and the access point with a contextual tag and contains the use of two resources.The first one is associated with the cinema application context which includes the application name and its URI.The second is about the context of the movie hall which is characterized by a set of parameters as its property identifies.These parameters include the name of the movie hall, a note, a playing list, etc.When the mobile phone touches the access point with an NFC tag, it acquires a service context in the tag.If the application in service context is not local, WAM will download it to run from a service platform which must hide the complexity associated with services and applications crossing over different service domains and operate with various access network technologies.Moreover, based on the context rule engine,the context determines that a person is entering a movie hall,then the person’s mobile phone has to be turned off and its voice message turned on to indicate the person’s unavailability until the movie is over.Besides, the context contains the playing list of the movie hall and the important information about these movies.Moreover, to get more information about the movies, the context engine will try to search them from the context database.

As shown in Fig.7, the scenario for cinema application is formed by four frames.Fig.7 (a) shows that the WAM of the mobile web middleware manages all applications,which will acquire application context from an NFC tag.If the application in the application context is not local, WAM on the mobile phone will download it from a service platform.The second frame (Fig.7 (b)) represents that an NFC tag and NFC enabled mobile phone are used for cinema applications.The third frame, as shown in Fig.7 (c),represents the analytical result of the tag content which is based on XML.Finally, the fourth frame, Fig.7 (d), shows that the movie recommendation is implemented by our context engine.As shown in Fig.7, the context engine on the mobile phone transfers user’s history and the context instance to the service platform after identity recognition.By using our movie preference model and context rule, the service platform derives the result of movie recommendation and delivers it to user’s terminal.

5.Conclusions

In this paper, we proposed a mobile web middleware of NFC context-awareness applications and a reasoning engine based on the ontology reasoning, which makes the context-aware middleware platform more flexible and efficient.The proposal of context using NFC reduces the awareness responsibility of the system by means of a single interaction, and improves user’s quality of experience.In addition, context awareness is studied by acquiring context dynamically, which are stored in NFC tags, and embedding these processes into daily activities.

Fig.6.XML file for service context.

Fig.7.Cinema application: (a) WAM, (b) service initiation by tag,(c) analytical result of tag, and (d) movie recommendation.

Currently, we are working in the completeness of the domain-specific ontology and the complex interaction scenarios generalization.The next steps will focus on the rule engine that allows adapting the different interaction context to the users and the improvement of context database deployment as well as our implementation following an iterative design process.

[1]A.K.Dey and G.D.Abowd, “Towards a better understandingof context and context-awareness,” in Proc.of Computer Human Ⅰnteraction Workshop on the What, Who,Where, When, Why and How of Context-Awareness, London,2000, pp.10-17.

[2]Ö.Yılmaz and R.C.Erdur, “iConAwa–an intelligent context-aware system,” Experts Systems with Applications,vol.39, no.3, pp.2907-2918, Feb.2012.

[3]M.Baldauf, S.Dustdar, and F.Rosenberg, “A survey on Context-aware systems,” Ⅰnt.Journal of Ad Hoc and Ubiquitous Computing, vol.2, no.4, pp.263-277, 2007.

[4]D.Saha and A.Mukherjee, “Pervasive computing: a paradigm for the 21st century,” ⅠEEE Computer, vol.36, no.3, pp.25-31, Mar.2003.

[5]K.Henricksen, J.Indulska, T.McFadden, and S.Balasubramaniam, “Middleware for distributed contextaware systems,” in Proc.of the Ⅰnt.Symposium on Distributed Objects and Applications, 2005, doi: 10.1.1.59.8932.

[6]A.K.Dey, D.Salber, and G.D.Abowd, “A conceptual framework and a toolkit for supporting the rapid prototyping of context-aware applications,” Human-ComputerⅠnteraction, vol.16, no.2, pp.97-166, 2001.

[7]S.S.Yau, D.Huang, H.Gong, and S.Seth, “Development and runtime support for situation-aware application software in ubiquitous computing environments,” in Proc.of the 28th Annual Conf.Ⅰnt.Computer Software and Application, 2004,doi: 10.1.1.167.9067.

[8]P.Fahy and S.Clarke, “CASS: middleware for mobile,context-aware applications,” in Proc.of the Workshop on Context Awareness, MobiSys, Boston, 2004, doi:10.1.1.59.8932.

[9]J.Morak, H.Kumpusch, D.Hayn, R.Modre-Osprian, and G.Schreier, “Design and evaluation of a telemonitoring concept based on NFC-enabled mobile phones and sensor devices,” ⅠEEE Trans.on Ⅰnformation Technology in Biomedicine, vol.16, no.1, pp.17-28, 2012.

[10]F.Borrego-Jaraba, I.L.Ruiz, and M.Á.Gómez-Nieto, “A NFC-based pervasive solution for city touristic surfing,”Personal and Ubiquitous Computing, vol.15, no.17, pp.731-742, 2011.

[11]J.Neefs, F.Schrooyen, J.Doggen, and K.Renckens, “Paper ticketing versus electronic ticketing based on off-line system‘tapango’,” in Proc.of the 2nd Ⅰnt.Workshop on Near Field Communication, Monaco, 2010, pp.3–8.

[12]J.-J.Chen and C.Adams.“Short-range wireless technologies with mobile payments systems,” in Proc.of the 6th Ⅰnt.Conf.on Electronic Commerce, Delft, 2004, pp.649-656.

[13]P.C.Garrido, G.M.Miraz, I.L.Ruiz, and M.Á.Gómez-Nieto, “A model for the development of NFC context-awareness applications on internet of things,” in Proc.of the 2nd Ⅰnt.Workshop on Near Field Communication, Monaco, 2010, pp.10-14.

[14]Y.-S.Chang, Y.-S.Hung, C.-L.Chang, and T.-Y.Juang,“Toward a NFC phone-driven context awareness smart environment,” in Proc.of Symposia and Workshops on Ubiquitous, Autonomic and Trusted Computing, Brisbane,2009, pp.298-303.