CN103699366A - Large-scale context management system, large-scale context management method and implement method - Google Patents

Large-scale context management system, large-scale context management method and implement method Download PDF

Info

Publication number
CN103699366A
CN103699366A CN201210364764.XA CN201210364764A CN103699366A CN 103699366 A CN103699366 A CN 103699366A CN 201210364764 A CN201210364764 A CN 201210364764A CN 103699366 A CN103699366 A CN 103699366A
Authority
CN
China
Prior art keywords
module
contextual information
context
extensive
clouds
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201210364764.XA
Other languages
Chinese (zh)
Inventor
王怀民
史殿习
吴振东
丁博
闫慧宁
刘惠
尹刚
滕猛
肖玺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National University of Defense Technology
Original Assignee
National University of Defense Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by National University of Defense Technology filed Critical National University of Defense Technology
Priority to CN201210364764.XA priority Critical patent/CN103699366A/en
Publication of CN103699366A publication Critical patent/CN103699366A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a large-scale context management system, a large-scale context management method and an implement method. The system comprises two parts including a mobile terminal and a cloud terminal, wherein the mobile terminal comprises a subscription and configuration module, a uniform interface module, a context modeling module and a context transmission module; the cloud terminal comprises a concurrent receiving module, a storage/ read module, a context aggregation module and a aggregation result service module; the mobile terminal is used for autonomously subscribing and collecting original large-scale context information, modeling the original large-scale context information and sending the large-scale context information into the cloud terminal after modeling; the cloud terminal is used for receiving the large-scale context information, carrying out aggregation and providing the aggregation result for mobile cloud computing application. After the system and the method are adopted, the problem that the processes of collection, aggregation and processing of the large-scale context information are lack of an effective and reusable middleware can be solved, and better service can be provided for a developer of the mobile cloud computing application.

Description

A kind of extensive context management system, method and implementation method
Technical field
The present invention relates to context-aware technology field, particularly a kind of extensive context management system, method and implementation method.
Background technology
Existing mobile terminal has all carried abundant sensor substantially, and the use of this class mobile terminal is also more and more extensive, therefore can utilize mobile terminal to collect large-scale contextual information (be the perceived ambient condition information of mobile terminal, and the hardware information of mobile terminal self, software information).Extensive context management process based on cloud computing comprises: mobile terminal is collected various extensive contextual informations, then collected extensive contextual information is sent to high in the clouds, process the extensive contextual information receiving in high in the clouds, for concrete mobile application provides the service of extensive context polymerization result, thereby provide better service (high in the clouds refers to provide for users such as mobile terminals the cloud computing system of service) for mobile subscriber and other users.Therefore, the extensive context management method towards mobile cloud computing has great importance.
Utilize large-scale contextual information for user provides better service, in academia, have some relevant achievements in research.The PEIR(Personal Environme ntal Impact Report of University of California in Los Angeles's research) project is by the GPS sensor on mobile phone, obtain residing diverse location in user one day, in conjunction with each local air quality situation in city, give each user a real-time individual environment Impact Report; The Mobile Millennium project of the VTrack project of MIT research and Nokia, NAVTEQ, University of California Berkeley's joint study obtains the current residing position of driver institute steering vehicle by the GPS sensor on driver mobile phone, and then obtain the Vehicle Driving Cycle situation of each road, finally obtain the real-time traffic on each road in whole city.
Yet, existing project is all for specific application scenarios, between disparity items, there is no mutual reusable code, developer need to be started all over again from the beginning in another relevant item of exploitation, because go back at present collection, polymerization and the processing procedure that effective, the reusable middleware of neither one is supported extensive contextual information.
Summary of the invention
For solving the extensive contextual information of above-mentioned collection, polymerization and processing, lack problem effective, reusable middleware, the invention provides a kind of extensive context management system, and extensive context management systems approach based on this system and the implementation method of this system are provided.
According to one aspect of the invention, a kind of extensive context management system is provided, this system comprises mobile terminal and high in the clouds two parts, described mobile terminal comprises subscription and configuration module, unified interface module, context modeling module and context transfer module; Described high in the clouds comprises and transmitting/receiving module, storage/read module, context polymerization module and polymerization result service module; Wherein
Described subscription is used for making mobile terminal independently collect the extensive contextual information relevant with mobile cloud computing application demand to configuration module, and the required information of configuration-system.
Described unified interface module, for the various extensive contextual information obtain manner of mobile terminal is encapsulated, provides unified interface to context modeling module.
Described context modeling module represents for the original extensive contextual information obtaining from unified interface module is carried out to modeling, and the extensive contextual information after modeling is passed to context transfer module.
Described context transfer module is for being sent to the extensive contextual information the modeling passing over from context modeling module the also transmitting/receiving module in high in the clouds.
Described and transmitting/receiving module is used for receiving the extensive contextual information the modeling sending over from described context transfer module, and received extensive context information store is arrived to storage/read module.
Described storage/read module is for preserving beyond the clouds the extensive contextual information receiving.
Described context polymerization module is for carrying out polymerization to received extensive contextual information.
Described polymerization result service module is used for reading up-to-date polymerization result, and provides this polymerization result to mobile cloud computing application.
In one embodiment of the invention, described mobile terminal also comprises expansion interface, for in the situation that not obtaining described unified interface module the corresponding interface support, the developer who offers mobile cloud computing application obtains required extensive contextual information, described context modeling module is carried out modeling to the original extensive contextual information obtaining from described expansion interface and is represented, and the extensive contextual information after modeling is passed to context transfer module; Described subscription and configuration module also comprise that permission developer independently realizes the acquisition methods of the required special extensive contextual information of mobile cloud computing application according to described expansion interface.
In another embodiment, described high in the clouds also comprises self defined interface module, for making mobile cloud computing application developer that other the applied logic process except the operation providing in context polymerization module is provided.
In one embodiment of the invention, the required information of system comprise original extensive contextual information obtain with modeling after extensive the contextual information cycle, the address, high in the clouds that send, and the modeling pattern of original extensive contextual information.
In one embodiment of the invention, the modeling pattern of original extensive contextual information comprises markup model and key-value pair model, and the mode of the configuration by switch switches between model, wherein:
When switching to markup model, the original extensive contextual information obtaining will adopt the markup model of XML form to be described;
When switching to key-value pair model, the original extensive contextual information obtaining will adopt the key-value pair model of JSON form to be described.
In one embodiment of the invention, described context transfer module is packaged into HTTP packet by the extensive contextual information the modeling passing over from described context modeling module and re-sends to described and transmitting/receiving module.
In one embodiment of the invention, described high in the clouds adopts the cloud system based on MapReduce model realization; On described context polymerization module most of node beyond the clouds, periodically move MapReduce operation, this cycle can dynamically be adjusted when operation.
In one embodiment of the invention, high in the clouds adopts Hadoop cloud system or Phoenix cloud system.
According to a further aspect of the present invention, provide a kind of extensive context management method, the method comprises:
The extensive contextual information that step 1), basis are subscribed in subscription and configuration module, obtains required original extensive contextual information;
Step 2), according to the information configuring in subscription and configuration module, the original extensive contextual information obtaining from step 1) is carried out to modeling and represent, and the extensive contextual information after modeling is sent to the also transmitting/receiving module in high in the clouds by context transfer module;
The also transmitting/receiving module in step 3), high in the clouds receives the extensive contextual information after modeling, and received extensive context information store is arrived to the storage/read module in high in the clouds;
Polymerization is carried out to received extensive contextual information in step 4), high in the clouds, and polymerization result is stored into the storage/read module in high in the clouds;
The polymerization result service module in step 5), high in the clouds provides the service of polymerization result to mobile cloud computing application.
In one embodiment of the invention, the required original extensive contextual information that obtains of step 1) also comprises:
(1) if unified interface module has the corresponding interface to support required original extensive contextual information, by unified interface module, obtain original extensive contextual information,
(2) if unified interface module does not have the corresponding interface to support required original extensive contextual information, by expansion interface, provide mobile cloud computing application developer to realize corresponding method and obtain required original extensive contextual information, wherein, expansion interface obtains for realizing correlation method voluntarily the original extensive contextual information that unified interface module does not provide interface.
In one embodiment of the invention, step 2) modeling represents to comprise to be used expandable mark language XML or uses JSON language.
In another embodiment, step 2) be also included in send to high in the clouds and transmitting/receiving module before, by context transfer module, the extensive contextual information after modeling is packaged into HTTP packet.
In one embodiment of the invention, step 4) also comprises:
(1) if context polymerization module provides polymerization required operation, by context polymerization module, received extensive contextual information is carried out to polymerization;
(2) if context polymerization module does not provide polymerization required operation, by self defined interface module, provide context polymerization to realize, wherein, self defined interface module is for other the applied logic process except the operation providing in context polymerization module is provided.
In one embodiment of the invention, by context polymerization module, received extensive contextual information is carried out to polymerization and comprise: operation MapReduce operation is with extensive contextual information that polymerization was received.
According to a further aspect of the present invention, provide a kind of implementation method of extensive context management system, described method comprises:
Step 1), at mobile terminal, realize to subscribe to and configuration module, this module and unified interface module, context modeling module and context transfer module are alternately to realize subscription function and configuration feature;
Step 2), at mobile terminal, realize unified interface module, this unified interface module is carried out unified encapsulation or is externally provided unified interface to call the mode of Linux order by mobile terminal sensor being obtained to the API of data;
Step 3), at mobile terminal, realize context modeling module, the various original extensive contextual information obtaining is carried out to modeling and represent, and provide dynamic-configuration mechanism dynamically to select modeling pattern;
Step 4), at mobile terminal, realize context transfer module, comprising: according to configured address, high in the clouds and transmission cycle, the contextual information after modeling is packaged into HTTP packet and sends to high in the clouds;
Step 5), cluster deploy a transmitting/receiving module beyond the clouds, and transmitting/receiving module operates on each node in this cluster with the form of process, in each process, safeguard a thread pool, for the treatment of each, connect the Socket that comes in, and complete the reception of contextual information;
Step 6), realize storage/read module beyond the clouds, the form that extensive contextual information is stored is beyond the clouds similar to form, received extensive contextual information is not stored in respectively different positions in the same time, between each context information store position, adopts different timestamp informations to distinguish;
Step 7), realize context polymerization module beyond the clouds, comprise based on MapReduce basic framework and realize some basic data operating algorithms;
Step 8), a cluster deploy polymerization result service module beyond the clouds, on each node of this cluster, moving all the time a process of waiting for the request of reception, this process is monitored on particular port, and is safeguarding a thread pool, starts a thread and process request after request arrives at once.
In one embodiment of the invention, step 2) being also included in mobile terminal realizes expansion interface, and this interface obtains for realizing corresponding method the contextual information that does not have the corresponding interface to support in unified interface module.
In another embodiment, step 7) is also included in and realizes beyond the clouds self defined interface module, and this module is for realizing other operations that context polymerization module does not provide.
With respect to prior art, the present invention has following technique effect:
(1) the invention enables the extensive contextual information relevant to application demand and to send to high in the clouds by automatic acquisition, the developer of mobile cloud computing application only need be concerned about concrete applied logic.
(2) the present invention supports the polymerization of extensive contextual information, and developer only need be concerned about the polymerization process relevant to concrete mobile cloud computing applied logic.
Accompanying drawing explanation
Fig. 1 is extensive according to an embodiment of the invention context management system construction drawing;
Fig. 2 is the deployment architecture figure of high in the clouds modules in extensive according to an embodiment of the invention context management system;
Fig. 3 is the process flow diagram of extensive according to an embodiment of the invention context management network system realization;
Fig. 4 is the realization flow figure of mobile cloud computing application example.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with accompanying drawing, extensive context management system provided by the invention, method and implementation method are described in detail.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
According to one embodiment of present invention, provide a kind of extensive context management system.Fig. 1 shows the general structure of this system, and this system is divided into mobile terminal and high in the clouds two parts, wherein:
Described mobile terminal comprises: subscription and configuration module, unified interface module, context modeling module and context transfer module.Describe the function of the modules that mobile terminal comprises below in detail.
Subscribe to and configuration module, for make mobile terminal can independently collect the contextual information relevant to mobile cloud computing application demand, allow developer configure original extensive contextual information obtain with modeling after the address in extensive the contextual information cycle, original context modeling pattern and the high in the clouds that send.Because most application only needs the contextual information of part, mobile terminal just need to go to collect the contextual information relevant to application, by the subscription function in this module, is only subscribed to and is applied relevant contextual information.Reason due to mobile terminal energy consumption, the collection of contextual information and process of transmitting should not be too frequent, according to one embodiment of the invention, according to concrete mobile cloud computing application demand, configure and collect original extensive contextual information and the cycle that sends the extensive contextual information after modeling.In addition, mobile terminal sends to contextual information different cloud servers possibly, according to a further embodiment of the invention, configures different addresses, high in the clouds control where contextual information is sent to by configuration feature.
Unified interface module, for the obtain manner of the various contextual informations of mobile terminal is encapsulated, externally provides unified interface.Because it is different to obtain the mode of various contextual informations on mobile terminal, for example different contextual informations need to obtain by calling different API (for example, by sensors A PI), also some contextual information needs to obtain (for example action command row obtains system real time execution information) by the mode of action command row, in order to shield this isomerism, unified interface module encapsulates various different contextual information obtain manners, to providing unified interface standard by the context modeling module of description below.
Context modeling module, represents for the original extensive contextual information obtaining is carried out to modeling, helps user to understand the implication of contextual information, and further contextual information is processed.According to one embodiment of present invention, modeling pattern comprises markup model and key-value pair model, can between these models, switch by the configuration mode of switch.For example, when switching to markup model, the original extensive contextual information obtaining from unified interface module will adopt the markup model of XML form to be described, and its label is described title, the type of contextual information, and its value is described the corresponding value of contextual information; And when switching to key-value pair model, original extensive contextual information will adopt the key-value pair model of JSON form to be described, its title is described title, the type of contextual information, and its value is described the corresponding value of contextual information.This module can be given context transfer module to send by the extensive contextual information after modeling.Those of ordinary skills should be understood that, except XML form and JSON form, the present invention also can adopt other suitable modeling pattern.
Context transfer module, the extensive contextual information relevant to concrete mobile cloud computing application demand for handle is sent to high in the clouds.According to one embodiment of present invention, by the contextual information passing over from context modeling module, be packaged into HTTP packet, and according to the address, high in the clouds configuring in subscription and configuration module, this extensive contextual information sent to address, corresponding high in the clouds.
Described high in the clouds comprises: and transmitting/receiving module, storage/read module, context polymerization module and polymerization result service module.Describe the function of the modules that high in the clouds comprises below in detail.
And transmitting/receiving module, the extensive contextual information sending over for the concurrent mobile terminal receive of height.A large amount of mobile terminals is when sending contextual information toward high in the clouds, and high in the clouds should be able to have the ability that simultaneously receives extensive contextual information.Fig. 2 has described according to high in the clouds of the present invention embodiment, and transmitting/receiving module is generally deployed on cluster, to prevent that the situation of single point failure from occurring, and guaranteed that high in the clouds can receive large-scale contextual information simultaneously.And the memory function that transmitting/receiving module can call storage/read module by the context information store newly receiving beyond the clouds.
Storage/read module, for preserving beyond the clouds extensive contextual information.In this module, store large-scale contextual information form according to the rules into high in the clouds, the memory interface that calls high in the clouds is realized the storage of extensive contextual information.Which node that extensive contextual information is specifically stored in high in the clouds is that the memory interface by high in the clouds completes, and what concerning storage/read module, represent is the global view of a logic.This module can by and transmitting/receiving module call memory function, can be aggregated result service module and call read functions.
Context polymerization module, carries out polymerization to received extensive contextual information, and stores polymerization result into high in the clouds.In the embodiment shown in Figure 2, on this module most of node beyond the clouds, periodically move the parallel computation of large-scale dataset, input using the extensive contextual information newly receiving as operation, the output of operation is exactly polymerization result, and polymerization result is stored in the storage/read module in high in the clouds, for polymerization result service module.Increase income cloud system and MapReduce programming model of the Hadoop of take is example, this module can periodically be moved a MapReduce operation on most of node beyond the clouds, the cycle that MapReduce operation moves is relevant to concrete mobile cloud computing application demand, can dynamically when operation, adjust.MapReduce is a kind of programming model well known in the art, is applicable to the concurrent operation of large-scale dataset.A large amount of atomic operations (as addition subtraction multiplication and division, summation, sequence, classification etc.) is also provided in this module, user can be called easily when the extensive contextual applied logic of exploitation polymerization, improved development efficiency.
Polymerization result service module, for providing the service of context polymerization result to mobile cloud computing application.The polymerization result of extensive contextual information is concrete mobile cloud computing application service the most at last, improves the service quality of concrete mobile cloud computing application.According to one embodiment of present invention, concrete mobile cloud computing application can be deployed on a plurality of nodes (cluster) in high in the clouds, if the node that application is disposed is a lot, will produce the connection of a large amount of request polymerization results, therefore polymerization result service module is also deployed on cluster, as shown in Figure 2.When receiving the polymerization result services request of applying from concrete mobile cloud computing, the read functions that this module can be called in storage/read module obtains the up-to-date polymerization result in high in the clouds, then polymerization result is returned to the application of request.
According to one embodiment of present invention, described mobile terminal also comprises expansion interface, for in the situation that the contextual information that mobile cloud computing application need to be obtained does not obtain the support of above-mentioned unified interface module the corresponding interface, offer application developer to obtain required contextual information.Although the unified interface of obtaining the most of contextual information of mobile terminal is provided in unified interface module, but the corresponding interface of the contextual information that can exist unavoidably some special application to collect does not provide in unified interface module, so just need to pass through expansion interface, realize voluntarily correlation method and obtain the contextual information that these unified interface modules do not provide interface.This module makes up the interface imperfection in unified interface module, and carries out alternately with context modeling module.Described subscription and configuration module also comprise that permission developer independently realizes the acquisition methods of the required special extensive contextual information of mobile cloud computing application according to expansion interface.
According to one embodiment of present invention, high in the clouds also comprises self defined interface module, is used to developer to provide context polymerization process more flexibly to realize.The function class of this module and mobile terminal expansion interface seemingly, in context polymerization module, provide the extensive contextual information of most of polymerization needed atomic operation, but do not guarantee that these operations can process all applied logics, therefore self defined interface module can help developer to realize in extensive context polymerization other applied logic process, for example, provided atomic operation can be combined to form to a kind of new applied logic process.
According to one embodiment of present invention, also provide a kind of extensive context management method based on extensive context management system, having comprised:
Step 1), the extensive types of context information of subscribing to according to mobile cloud computing application developer, obtain required original extensive contextual information.
Step 2), according to the information of mobile cloud computing application developer configuration, the original extensive contextual information getting from step 1) is carried out to modeling with corresponding model to be represented, modeling represents to comprise use expandable mark language XML, JSON language etc., and according to the information of developer's configuration, the extensive contextual information after modeling is sent to high in the clouds
Wherein, context transfer module is first packaged into HTTP packet by the extensive contextual information after modeling, re-send to high in the clouds concurrent/receiver module.
Extensive contextual information after the high concurrent reception modeling of step 3), high in the clouds, and by received extensive context information store the storage/read module to high in the clouds.
Polymerization is carried out to received large-scale contextual information in step 4), high in the clouds, for example, moves the MapReduce operation of an extensive contextual information of polymerization in context polymerization module, and the result store of polymerization is arrived to the storage/read module in high in the clouds.
The polymerization result service module in step 5), high in the clouds provides the service of context polymerization result to mobile cloud computing application.When receiving application request, polymerization result service module will be processed this request by the read functions calling in storage/read module.
Wherein, in step 1), obtaining required original extensive contextual information is realized by unified interface module, and in another embodiment, by expansion interface, provide mobile cloud computing application developer to realize corresponding method and obtain required original extensive contextual information.
According to another embodiment of the invention, in step 4), by self defined interface module, realize received large-scale contextual information is carried out to polymerization.
Fig. 3 shows according to one embodiment of present invention, realizes the method for above-mentioned extensive context management system, comprises the steps:
The first step, at the mobile terminal of extensive context management system, realize and subscribing to and configuration module, this module provides and subscribes to function and configuration feature to mobile cloud computing application developer, subscribe to function for subscribing to the required extensive contextual information of application, configuration feature for configure original extensive contextual information obtain with modeling after extensive the contextual information cycle, the address, high in the clouds that send, and the modeling pattern of original extensive contextual information.Developer, when realizing subscription function, need to carry out alternately with unified interface module, controls in unified interface module and only has those certain methods relevant to ordered contextual information called.When realizing configuration feature, also need to carry out alternately with unified interface module, control the invoked time cycle of method of obtaining contextual information; Also need with context modeling module alternately, control original context information and be modeled as markup model or key-value pair model, call and be arranged to the correlation technique of markup model or call the correlation technique of being arranged to key-value pair model; Finally also need to carry out alternately with context transfer module, where cycle and the contextual information of controlling this module transmission contextual information send to, and before contextual information sends, set object IP address and port numbers.All these subscription and configuration information, be all to remain among concrete application, set these information, in application program, should do not revised dynamically, in the development phase, just bound with concrete application program.
Second step, realizes unified interface module to obtain original extensive contextual information at the mobile terminal of extensive context management system.Unified interface module and bottom sensor or system information can be carried out alternately, this module to other module abstracts the details such as the sensor of bottom and system information, make other modules not need the details of concern and bottom sensor or system information, only need to carry out alternately with unified interface module.Unified interface module is kept apart concrete application code and sensor or system information interaction code, and the application code that mobile cloud computing application developer is write has more portability.While realizing unified interface module in Android system, because Android system self provides the API that obtains data from eight kinds of sensors such as acceleration transducer, and obtain the contextual API such as electric weight, position, unified interface module will further be carried out unified encapsulation to this part API, and a unified interface is externally provided.In addition, for obtaining of information such as CPU, internal memories in Android system, do not have corresponding API to provide, but can get these information by calling the mode of Linux order, for this class contextual information, in inside, be to realize by carrying out different Linux orders, external unified interface is provided.By unified interface module, mobile cloud computing application developer can just can complete obtaining of contextual information by the mode of configuration.Consider the situation that contextual information that application need to be obtained may not have corresponding interface to support in unified interface module, provide expansion interface to realize corresponding method and obtain required contextual information for developer, the contextual information result mode that it finally obtains should be consistent with the implementation given tacit consent in unified interface module.Subscribe to the realization with configuration module, an interface for respective contexts acquisition of information in unified interface module is called, do not have the corresponding interface of subscribed contextual information can not be called, concerning concrete developer, pay close attention to the subscription function of subscribing to configuration module and just can complete the collection of contextual information, even do not need to understand the unified interface of unified interface module.
The 3rd step, realizes context modeling module, the original extensive contextual information getting is carried out to modeling represent in unified interface module, thereby describe better contextual information, helps the implication that user understands contextual information.While obtaining extensive contextual information from unified interface module, just get some original data, these data are carried out to modeling and represent to form complete contextual information.According to the feature of limited, the of living in environment dynamic change of mobile terminal resource, need to realize context modeling mode, as compatibility is supported markup model or key-value pair model:
(1) markup model adopts expandable mark language XML (eXtensible Markup Language) to carry out modeling to contextual information to represent, its label represents the title of contextual information, the value of the corresponding contextual information of value representation of label.When realizing, original contextual information is resolved, first according to types of context information ordered in subscription and configuration module, determine XML label (title of contextual information), and then be concrete data to the value assignment of label.If the contextual information of the modeling of wanting is compound type, as positional information is comprised of longitude information and latitude information, the title of parent type (XML label) is contextual information title, value is two subtypes (longitude information and latitude information), and the XML form of subtype is the same with aforesaid simple contextual information model modeling mode.
(2) key-value pair model employing JSON(Javascript Object Notation) language carries out modeling to contextual information and represents, the key table in its JSON object shows the title of contextual information, the value of the corresponding contextual information of value representation of JSON object.When realizing, original contextual information is resolved, first according to types of context information ordered in subscription and configuration module, determine the key (title of contextual information) of JSON object, and then be concrete data to this key assign.If the contextual information of the modeling of wanting is compound type, the key of JSON object is contextual information title, and value is two subtype JSON objects, and the JSON object of subtype is the same with aforesaid simple modeling pattern.
Except above-mentioned two kinds of modeling pattern, one skilled in the art will appreciate that other suitable modeling pattern also can be applicable to this.
For provided context modeling mode, according to one embodiment of present invention, also provide a kind of dynamic-configuration mechanism to guarantee dynamically to select corresponding context modeling mode according to concrete application demand, for example, if the space hold demand to contextual information is stricter, can dynamically be configured to key-value pair model; If higher to the versatility demand between service end in network and client, can dynamically be configured to markup model.In subscription and configuration module, the context modeling mode of dynamic-configuration can be described by the form of global variable.
The 4th step, realizes context transfer module, and the extensive contextual information after context modeling module modeling is packaged into HTTP Packet Generation to high in the clouds.Here need first to access cloud server address and the transmission cycle configuring with configuration module by subscribing to, make the extensive contextual information after the modeling on mobile terminal send to specific address, and according to the extensive contextual information after configured cycle transmission modeling.Extensive contextual information is being configured to after HTTP packet, with the form of POST in HTTP, to high in the clouds, is sending data.When realizing, according to http protocol standard, first construct the data packet head of HTTP, then construct the data inclusion of HTTP, in construction data inclusion, embed contextual information that XML describes or that JSON describes.After whole packet construction complete, be sent to again high in the clouds.
The 5th step, realizes and transmitting/receiving module.The extensive contextual information of the concurrent reception in high in the clouds, and by the extensive context information store receiving to high in the clouds.Have specially beyond the clouds cluster deploy a transmitting/receiving module, the extensive contextual information after the modeling that a large amount of mobile terminals of responsible reception send over guarantees the network bandwidth balance between machine by load-balancing mechanism between each machine in cluster.And transmitting/receiving module in, with the form of process, operate on each node in this cluster, in each process, safeguard a thread pool, for the treatment of each, connect the Socket that comes in, and complete the reception of contextual information.According to one embodiment of present invention, on this cluster by the realization of load balancing in LVS(Linux system) guarantee the Network Load Balance between node.Each in cluster machine, after receiving contextual information, can first be kept at contextual information in buffer zone, and in buffer zone, the scale of contextual information arrives high in the clouds by all context information store in buffer zone after arriving threshold value more in the lump.
The 6th step, realizes storage/read module, in high in the clouds storage contextual information, such as the classes such as FileSystem that can directly call Hadoop and provide, realizes.The form that contextual information is stored is beyond the clouds similar to form, and the column heading of form is the title of contextual information, and each line item represents a contextual information, each data representation the value of title of corresponding contextual information.And not in the same time received contextual information be stored in respectively different positions, between each context information store position, adopt different timestamp informations to distinguish, application can be according to concrete demand, the up-to-date contextual information of a polymerization optionally in context polymerization process.
The 7th step, realizes context polymerization module, and (for example Hadoop system) is upper beyond the clouds realizes some basic data operating algorithms based on MapReduce basic framework (being that context polymerization module is to realize on the framework of MapReduce).Because a MapReduce operation need to be moved in high in the clouds, large-scale contextual information is carried out to polymerization, and the result store of polymerization is arrived to high in the clouds.According to concrete application demand, developer can configure to different application the different MapReduce job run cycles, therefore needs to support the control of the MapReduce cycle of operation.Should a polymerization relevant with the application extensive contextual information of the MapReduce operation of operation beyond the clouds, therefore should the selectable function of tool when selection operation is inputted.After polymerization completes, need in the mode of form, store polymerization result into high in the clouds, it is similar that the specific implementation of its result store and extensive context information store realize, and by the memory function of calling in storage/read module, realizes.Adopt MapReduce operation to carry out polymerization to extensive contextual information, mainly comprise two processes of Map and Reduce:
(1) Map process, extensive contextual information to actual storage on each computing node carries out preliminary computing, as chosen as required data, or raw data is done to the processing such as simple addition subtraction multiplication and division, the various data processing algorithms that provide can be directly provided complete in MapReduce framework.Therefore various master data Processing Algorithm should be provided in framework, comprise addition subtraction multiplication and division, summation, sequence, classification etc., when realizing, need first the string format of contextual information to be converted into the value of corresponding data type, and then operate, can be by the Mapper class providing in Hadoop is provided, and the map method realizing wherein completes.Contextual information after Map process is processed can be distributed on other computing node and be processed for Reduce process by Hadoop internal mechanism;
(2) Reduce process, on the computing node that carries out Reduce process, the result of Map process is further processed, the various computing method interfaces that provide in framework can be directly provided and complete, this part the various data processing algorithms that provide in MapReduce framework can be directly provided and complete.When realizing Reduce process, can be by the Reducer class providing in Hadoop is provided, and the Reduce method realizing wherein completes.Then also need the rule-based context polymerization providing by Matcher to carry out rule match to the contextual information of processing, wherein the rule configuration in Matcher should be enough flexible, can be set voluntarily by developer, by Matcher, independently complete the coupling of the extensive contextual information of processing.
For MapReduce basic framework, there is no the operation realizing, realize self defined interface module.In custom block, ContextMap interface class and ContextReducer interface class are provided, the method, Map method and the Reduce method that in these two interface class, provide some basic needs to realize, do not have the operation realizing for developer's implementation framework.
The 8th step, realizes polymerization result service module, makes high in the clouds that the service of context polymerization result is provided to mobile cloud computing application.High in the clouds may receive the request from the polymerization result of a large amount of mobile cloud computing application, therefore polymerization result service module is also deployed on cluster, in cluster, between each node, by load-balancing mechanism (as LVS), realizes Network Load Balance.When request arrives, the read functions that this module can be called in storage/read module reads the result of context polymerization from high in the clouds, then to concrete application, return results.On each node, moving all the time a process of waiting for the request of reception, this process is monitored on particular port, and is safeguarding a thread pool, starts a thread and process this request after request arrives at once.Meanwhile, be to improve performance, can also the nearest polymerization result request of buffer memory on each node, when finding that received request is processed request, node just the accordingly result of buffer memory can be sent to requestor.And the read functions that does not need to call again in storage/read module goes to high in the clouds to read.
Traffic situation aware application take below as example, describe in detail and how according to extensive context management system and method provided by the invention, to complete the exploitation that this moves cloud computing application.
Based on the Hadoop cloud system of increasing income, the present invention, for obtaining the traffic situation in certain city, is obtained to the real-time traffic information in this city.Design following scene: certain city has 1,000,000 cars, and suppose these 1,000,000 cars driver everyone have a mobile phone, these mobile phones have all carried various sensors.Developer is according to the present invention, first develop the mobile phone terminal software of a traffic situation aware application, this software directly subscribes to the present invention positional information and the velocity information of obtaining mobile phone, then with the present invention, the contextual information of collecting is sent to high in the clouds, details is realized in these inside does not need developer to be concerned about.Developer only need design and realize a Stub program in this software, take the traffic situation service that high in the clouds provides as mobile subscriber that receives.After the software development of mobile phone terminal completes, developer also needs to complete accordingly beyond the clouds the exploitation of traffic situation aware application.Beyond the clouds, the details that realizes that receives extensive contextual information does not need developer to pay close attention to, and realize details for the inside of context polymerization, do not need to pay close attention to yet, developer need to carry out combination by the demand of the input of context polymerization and output and traffic situation application, configure the contextual information of input and the object information of expectation polymerization, and rule-based when coupling the rule that uses.Finally, developer designs beyond the clouds and realizes traffic situation application service, and this is served in conjunction with map database information, uses context polymerization result, the traffic information of each road in real-time exhibition city on map.According to the present invention, complete the overview flow chart of traffic situation aware application as shown in Figure 4, concrete steps are as follows:
The first step, the subscription and the configuration module that according to extensive context management system, provide, the contextual information of subscription speed and position.In traffic situation aware application, the collected original context information of mobile terminal is positional information and the velocity information of mobile phone, is the equal of also position and the velocity information of vehicle, and the position of single vehicle and velocity information do not have very actual meaning.But for all vehicle locations on a certain section and velocity information, carry out the vehicle average velocity that polymerization just can obtain this section, and then judge the traffic in this section.Mobile terminal obtains ordered contextual information by unified interface module.Use when of the present invention, traffic situation application mobile terminal does not need developer to write the code that obtains contextual information, and the part API that only need to provide with unified interface module carries out alternately, complete the subscription of contextual information, can get contextual information.
Second step, adopts a kind of model to carry out modeling to the contextual information in traffic situation aware application and represents.Due to the residing environment of application, expectation context model takies less internal memory, take the network bandwidth still less, so developer can dynamic-configuration be key-value pair model.According to real-time demand and the restriction to energy consumption of application, contextual information obtains with the cycle sending and is set to 10 seconds or 20 seconds etc., specifically by actual demand, is decided.Developer also needs to configure the address of cloud server, so that mobile terminal can send to correct destination by the contextual information obtaining.Mobile phone finally also needs to represent to user the result of contextual information polymerization, need on mobile phone, realize a Stub program, and this program is for receiving the context polymerization result returning in high in the clouds.
The 3rd step, the also transmitting/receiving module of the extensive context management system of a part of clusters of machines deploy beyond the clouds.This module only needs developer to be deployed on clusters of machines, does not need to write any code and will high receive concomitantly the contextual information that a large amount of mobile terminals send over.
The 4th step, has realized input, output and the concrete applied logic processing procedure of Map process and Reduce process according to concrete application demand, by operation MapReduce operation, carry out the extensive contextual information of polymerization.In traffic situation aware application, contextual information is speed and the positional information of vehicle, input using these information as Map process, its output can be set to the average velocity in section, then the average velocity in section is set to the input of Reduce process, and the traffic in section (block up, jogging, unobstructed) is as the output of Reduce process.In Map process, need to be in conjunction with map data information, to judge that contextual information is the velocity magnitude of certain car on certain section, all original context information is exactly the average velocity in each section through output after Map process.The average velocity in each section is as the input of Reduce process, and the rule arranging in conjunction with developer by the matching process of Matcher in the present invention, obtains each section and be in blocking up, jogging or unimpeded.Finally store the real-time traffic information in each section into high in the clouds.
The 5th step, when traffic situation aware application need to each section on map marks real-time traffic information, will read from high in the clouds the real-time traffic of respective stretch.Can select traffic situation aware application to be deployed on third-party server, by send a Get to high in the clouds, ask to obtain required result (the real-time traffic intersection information in each section), and to final user, provide service in conjunction with concrete application background.
Above-mentioned example is a simple realization of the present invention, and this process can be generalized to other application easily, makes to utilize extensive contextual information to become very easy for user provides better service.Application developer, using when of the present invention, only needs to pay close attention to concrete applied logic, and for the extensive context send and receive of bottom, storage, distributed treatment etc., realizing details does not need to pay close attention to too much.Therefore, the present invention has important practical significance for how effectively utilizing extensive contextual information for user provides better service.
Should be noted that and understand, in the situation that not departing from the desired the spirit and scope of the present invention of accompanying claim, can make various modifications and improvement to the present invention of foregoing detailed description.Therefore, the scope of claimed technical scheme is not subject to the restriction of given any specific exemplary teachings.

Claims (17)

1. an extensive context management system, this system comprises mobile terminal and high in the clouds two parts, described mobile terminal comprises subscription and configuration module, unified interface module, context modeling module and context transfer module; Described high in the clouds comprises and transmitting/receiving module, storage/read module, context polymerization module and polymerization result service module; Wherein
Described subscription is used for making mobile terminal independently collect the extensive contextual information relevant with mobile cloud computing application demand to configuration module, and the required information of configuration-system;
Described unified interface module, for the various extensive contextual information obtain manner of mobile terminal is encapsulated, provides unified interface to context modeling module;
Described context modeling module represents for the original extensive contextual information obtaining from unified interface module is carried out to modeling, and the extensive contextual information after modeling is passed to context transfer module;
Described context transfer module is for being sent to the extensive contextual information the modeling passing over from context modeling module the also transmitting/receiving module in high in the clouds;
Described and transmitting/receiving module is used for receiving the extensive contextual information the modeling sending over from described context transfer module, and received extensive context information store is arrived to storage/read module;
Described storage/read module is for preserving beyond the clouds the extensive contextual information receiving;
Described context polymerization module is for carrying out polymerization to received extensive contextual information;
Described polymerization result service module is used for reading up-to-date polymerization result, and provides this polymerization result to mobile cloud computing application.
2. system according to claim 1, wherein
Described mobile terminal also comprises expansion interface, for in the situation that not obtaining described unified interface module the corresponding interface support, the developer who offers mobile cloud computing application obtains required extensive contextual information, described context modeling module is carried out modeling to the original extensive contextual information obtaining from described expansion interface and is represented, and the extensive contextual information after modeling is passed to context transfer module;
Described subscription and configuration module also comprise that permission developer independently realizes the acquisition methods of the required special extensive contextual information of mobile cloud computing application according to described expansion interface.
3. system according to claim 1 and 2, described high in the clouds also comprises self defined interface module, for making mobile cloud computing application developer that other the applied logic process except the operation providing in context polymerization module is provided.
4. system according to claim 1, wherein the required information of system comprise original extensive contextual information obtain with modeling after extensive the contextual information cycle, the address, high in the clouds that send, and the modeling pattern of original extensive contextual information.
5. system according to claim 4, the modeling pattern of described original extensive contextual information comprises markup model and key-value pair model, and the mode of the configuration by switch switches between model, wherein:
When switching to markup model, the original extensive contextual information obtaining will adopt the markup model of XML form to be described;
When switching to key-value pair model, the original extensive contextual information obtaining will adopt the key-value pair model of JSON form to be described.
6. system according to claim 1, wherein said context transfer module is packaged into HTTP packet by the extensive contextual information the modeling passing over from described context modeling module and re-sends to described and transmitting/receiving module.
7. system according to claim 1, described high in the clouds adopts the cloud system based on MapReduce model realization; On described context polymerization module most of node beyond the clouds, periodically move MapReduce operation, this cycle can dynamically be adjusted when operation.
8. system according to claim 7, wherein high in the clouds adopts Hadoop cloud system or Phoenix cloud system.
9. an extensive context management method for the extensive context management system based on claim 1, the method comprises:
The extensive contextual information that step 1), basis are subscribed in subscription and configuration module, obtains required original extensive contextual information;
Step 2), according to the information configuring in subscription and configuration module, the original extensive contextual information obtaining from step 1) is carried out to modeling and represent, and the extensive contextual information after modeling is sent to the also transmitting/receiving module in high in the clouds by context transfer module;
The also transmitting/receiving module in step 3), high in the clouds receives the extensive contextual information after modeling, and received extensive context information store is arrived to the storage/read module in high in the clouds;
Polymerization is carried out to received extensive contextual information in step 4), high in the clouds, and polymerization result is stored into the storage/read module in high in the clouds;
The polymerization result service module in step 5), high in the clouds provides the service of polymerization result to mobile cloud computing application.
10. method according to claim 9, wherein the required original extensive contextual information that obtains of step 1) also comprises:
(1) if unified interface module has the corresponding interface to support required original extensive contextual information, by unified interface module, obtain original extensive contextual information,
(2) if unified interface module does not have the corresponding interface to support required original extensive contextual information, by expansion interface, provide mobile cloud computing application developer to realize corresponding method and obtain required original extensive contextual information, wherein, expansion interface obtains for realizing correlation method voluntarily the original extensive contextual information that unified interface module does not provide interface.
11. method according to claim 9, wherein steps 2) modeling represents to comprise to be used expandable mark language XML or uses JSON language.
12. method according to claim 9, wherein steps 2) before being also included in the also transmitting/receiving module that sends to high in the clouds, by context transfer module, the extensive contextual information after modeling is packaged into HTTP packet.
13. methods according to claim 9, wherein step 4) also comprises:
(1) if context polymerization module provides polymerization required operation, by context polymerization module, received extensive contextual information is carried out to polymerization;
(2) if context polymerization module does not provide polymerization required operation, by self defined interface module, provide context polymerization to realize, wherein, self defined interface module is for other the applied logic process except the operation providing in context polymerization module is provided.
14. methods according to claim 13, wherein carry out polymerization by context polymerization module to received extensive contextual information and comprise: operation MapReduce operation is with extensive contextual information that polymerization was received.
The implementation method of 15. 1 kinds of extensive context management systems claimed in claim 1, described method comprises:
Step 1), at mobile terminal, realize to subscribe to and configuration module, this module and unified interface module, context modeling module and context transfer module are alternately to realize subscription function and configuration feature;
Step 2), at mobile terminal, realize unified interface module, this unified interface module is carried out unified encapsulation or is externally provided unified interface to call the mode of Linux order by mobile terminal sensor being obtained to the API of data;
Step 3), at mobile terminal, realize context modeling module, the various original extensive contextual information obtaining is carried out to modeling and represent, and provide dynamic-configuration mechanism dynamically to select modeling pattern;
Step 4), at mobile terminal, realize context transfer module, comprising: according to configured address, high in the clouds and transmission cycle, the contextual information after modeling is packaged into HTTP packet and sends to high in the clouds;
Step 5), cluster deploy a transmitting/receiving module beyond the clouds, and transmitting/receiving module operates on each node in this cluster with the form of process, in each process, safeguard a thread pool, for the treatment of each, connect the Socket that comes in, and complete the reception of contextual information;
Step 6), realize storage/read module beyond the clouds, the form that extensive contextual information is stored is beyond the clouds similar to form, received extensive contextual information is not stored in respectively different positions in the same time, between each context information store position, adopts different timestamp informations to distinguish;
Step 7), realize context polymerization module beyond the clouds, comprise based on MapReduce basic framework and realize some basic data operating algorithms;
Step 8), a cluster deploy polymerization result service module beyond the clouds, on each node of this cluster, moving all the time a process of waiting for the request of reception, this process is monitored on particular port, and is safeguarding a thread pool, starts a thread and process request after request arrives at once.
16. methods according to claim 15, step 2) being also included in mobile terminal realizes expansion interface, and this interface obtains for realizing corresponding method the contextual information that does not have the corresponding interface to support in unified interface module.
17. methods according to claim 15, step 7) is also included in and realizes beyond the clouds self defined interface module, and this module is for realizing other operations that context polymerization module does not provide.
CN201210364764.XA 2012-09-27 2012-09-27 Large-scale context management system, large-scale context management method and implement method Pending CN103699366A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210364764.XA CN103699366A (en) 2012-09-27 2012-09-27 Large-scale context management system, large-scale context management method and implement method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210364764.XA CN103699366A (en) 2012-09-27 2012-09-27 Large-scale context management system, large-scale context management method and implement method

Publications (1)

Publication Number Publication Date
CN103699366A true CN103699366A (en) 2014-04-02

Family

ID=50360906

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210364764.XA Pending CN103699366A (en) 2012-09-27 2012-09-27 Large-scale context management system, large-scale context management method and implement method

Country Status (1)

Country Link
CN (1) CN103699366A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182232A (en) * 2014-08-22 2014-12-03 华为技术有限公司 Method for establishing context-aware applications and user terminal
CN105719454A (en) * 2016-01-28 2016-06-29 无锡南理工科技发展有限公司 Extensible ZigBee data transmission device and method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182232A (en) * 2014-08-22 2014-12-03 华为技术有限公司 Method for establishing context-aware applications and user terminal
CN104182232B (en) * 2014-08-22 2017-12-15 华为技术有限公司 A kind of method and user terminal for creating context-aware applications
US10489221B2 (en) 2014-08-22 2019-11-26 Huawei Technologies Co., Ltd. Method for creating context aware application and user terminal
CN105719454A (en) * 2016-01-28 2016-06-29 无锡南理工科技发展有限公司 Extensible ZigBee data transmission device and method
CN105719454B (en) * 2016-01-28 2019-03-15 海穗信息技术(上海)有限公司 A kind of expansible ZigBee data transmission set and method

Similar Documents

Publication Publication Date Title
Morabito et al. Consolidate IoT edge computing with lightweight virtualization
Liu et al. A survey on edge computing systems and tools
US11539596B2 (en) End-to-end quality of service in edge computing environments
Chen et al. ThriftyEdge: Resource-efficient edge computing for intelligent IoT applications
Mohamed et al. SmartCityWare: A service-oriented middleware for cloud and fog enabled smart city services
US11025711B2 (en) Data centric resource management for edge cloud systems
US9547509B2 (en) System and method for information acquisition of wireless sensor network data as cloud based service
Carnevale et al. From the cloud to edge and IoT: a smart orchestration architecture for enabling osmotic computing
Cui et al. Offloading autonomous driving services via edge computing
Cheng et al. Geelytics: Enabling on-demand edge analytics over scoped data sources
CN104506620A (en) Extensible automatic computing service platform and construction method for same
CN103729257A (en) Distributed parallel computing method and system
US20200112605A1 (en) Partitioning of container workload based on a temporal relationship
Mohamed et al. A service-oriented middleware for cloud of things and fog computing supporting smart city applications
US20210117134A1 (en) Technologies for storage and processing for distributed file systems
Petrolo et al. Integrating wireless sensor networks within a city cloud
Bellavista et al. Integrating mobile internet of things and cloud computing towards scalability: lessons learned from existing fog computing architectures and solutions
US10560519B2 (en) Sensory data capture and processing for the Internet of Things
KR101818936B1 (en) System and method for performing deep learning
Mohamed et al. Towards service-oriented middleware for fog and cloud integrated cyber physical systems
Whaiduzzaman et al. Pefc: Performance enhancement framework for cloudlet in mobile cloud computing
Shetty et al. Cloud based application development for mobile devices for accessing LBS
CN103699366A (en) Large-scale context management system, large-scale context management method and implement method
Rac et al. At the edge of a seamless cloud experience
CN105190599A (en) Cloud application bandwidth modeling

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20140402

RJ01 Rejection of invention patent application after publication