CN102436371A - Method and device for constructing context-aware middleware facing to pervasive environment - Google Patents
Method and device for constructing context-aware middleware facing to pervasive environment Download PDFInfo
- Publication number
- CN102436371A CN102436371A CN2011102536109A CN201110253610A CN102436371A CN 102436371 A CN102436371 A CN 102436371A CN 2011102536109 A CN2011102536109 A CN 2011102536109A CN 201110253610 A CN201110253610 A CN 201110253610A CN 102436371 A CN102436371 A CN 102436371A
- Authority
- CN
- China
- Prior art keywords
- context
- context information
- information
- layer
- event
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title abstract description 25
- 238000012545 processing Methods 0.000 claims abstract description 39
- 230000007246 mechanism Effects 0.000 claims abstract description 19
- 230000001360 synchronised effect Effects 0.000 claims abstract description 12
- 230000000295 complement effect Effects 0.000 claims abstract description 9
- 230000010365 information processing Effects 0.000 claims abstract description 8
- 230000002776 aggregation Effects 0.000 claims description 34
- 238000004220 aggregation Methods 0.000 claims description 34
- 238000007781 pre-processing Methods 0.000 claims description 20
- 238000001914 filtration Methods 0.000 claims description 12
- 230000008859 change Effects 0.000 claims description 8
- 230000004927 fusion Effects 0.000 claims description 8
- 238000010276 construction Methods 0.000 claims description 7
- 238000004891 communication Methods 0.000 claims description 6
- 238000013461 design Methods 0.000 claims description 3
- 230000003044 adaptive effect Effects 0.000 abstract 1
- 238000007726 management method Methods 0.000 description 14
- 230000006870 function Effects 0.000 description 13
- 238000010586 diagram Methods 0.000 description 6
- 230000008520 organization Effects 0.000 description 4
- 239000002131 composite material Substances 0.000 description 3
- 238000013499 data model Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 238000007654 immersion Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Landscapes
- Stored Programmes (AREA)
Abstract
The invention provides a method and device for a constructing context-aware middleware facing to a pervasive environment. The device comprises a context acquisition module, a context processing module and a context access module. The method comprises the following steps of: acquiring context information and context event information in a running environment of software; modeling the received context information so as to acquire a context information model; realizing the gathering of context information and the management of context events on the basis of a rule-based reasoning and event-driven information processing mechanism; and providing a unified access interface for users, realizing a context information complementary access mode combining a synchronous access mode with an asynchronous inform access mode and providing a convenient context information access mechanism for an upper-layer application program. According to the method and device disclosed by the invention, the modeling can be realized according to the actually-received context information and the model is updated according to the context information, so that the model is adaptive to the open and varied characteristics of the pervasive environment.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for constructing context-aware middleware facing to a pervasive environment.
Background
With the distribution, networking and immersion of computing, the operating environment of software systems becomes more and more complex, which brings new challenges to software development. Under a universal environment with open and variable characteristics, how a software system can accurately acquire effective context information in real time to assist the decision making of the software system and further complete the adjustment of the self-adaptability of the software system is an important subject in the field.
Context-aware middleware is an effective approach to solve this problem, and the existing research mainly involves the following three aspects: how to model the context information; how to accurately acquire context information in real time; how to provide an efficient and convenient context information access mechanism.
Context modeling refers to the description form and organization mode of context information, and is the basis of context perception. With the continuous change of the application requirements, the software running environment is complex and changeable, and the form of the context information is also very different. Therefore, it is difficult to abstract the context information consistently, so that the generality and expansibility of the context information model are poor.
At present, most of modeling methods of context information are designed aiming at different application requirements or different application fields, and have certain limitations. Document 1(Gu, t.an online-based Context Model in Intelligent environments.2004) discusses common contexts, including key-value pair models, markup models, graphical models, object-oriented models, logical-based models, and Ontology-based models, among others.
The accurate and real-time acquisition of the context information is the premise of context sensing, and the current common context acquisition mode is often closely combined with the specific application requirements and is different along with the different application types, so that the context sensor has the characteristics of isomerism, polymorphism and the like, the development of the sensor is difficult to form a uniform specification, and the difficulty of software multiplexing is greatly increased.
The access and sharing of context information is a context-aware goal. A certain difference exists between the context information directly acquired by the context sensor and the context information required by the upper-layer application program, so that how to process the acquired bottom-layer context information into the high-layer context information required by the upper-layer application program and provide a set of efficient and convenient context information access mechanism is a core problem of context sensing. The Context toolkit proposed in document 2(A.K. Dey.A. content frame and a toolkit for supporting the rapid protocol of Context-aware applications.2001; 16: 97-166) uses Context interpreters to realize simple conversion of Context information in type; the context-aware sub-structure developed by Patrick Fahy of Trinity College combines Rule Engine and knowledge base together, and supports the abstraction of the context information of the upper layer through the rules in the knowledge base; the Context Broker Architecture designed by university of bartonerson, maryland includes a reflex-type inference engine that supports two types of inference, uses Ontology to infer contextual knowledge, and uses heuristic knowledge to infer and resolve conflicts in contextual information.
It can be seen that the existing context-aware system has obtained certain research results in the aspects of context acquisition, context modeling, context aggregation inference, etc., and has some disadvantages:
it is important in the art how to obtain a generic, easily extensible context-aware middleware due to the importance of context information.
Disclosure of Invention
The invention aims to provide a universal and extensible context-aware middleware.
In order to achieve the above object, an embodiment of the present invention provides a context awareness middleware construction method for a pervasive environment, including:
and 4, providing a uniform access interface for a user, realizing a context information complementary access mode combining a synchronous request access mode and an asynchronous notification access mode, and providing a convenient context information access mechanism for an upper-layer application program.
As a preferable aspect of the above technical solution, step 2 specifically includes:
step 21, receiving original context information, unifying formats of the original context information according to a context information model, and returning the context information;
and step 22, modeling the returned context information to obtain a context information model.
As a preferable aspect of the foregoing technical solution, the aggregation of the context information in step 3 specifically includes:
step 31, according to the context information obtained in step 1 and the context information model obtained in step 2, performing structural adjustment and numerical update on the context information model;
step 32, storing the context information needing to be persisted;
step 33, filtering the context information according to a preset rule to eliminate inaccurate and/or unstable information in the underlying context information;
step 34, according to the context query request combined with the bottom-layer context information, adopting a forward rule reasoning based on a Rete algorithm to eliminate conflicts and errors existing among the context information, and obtaining upper-layer context information with high adaptability to the upper-layer application requirements;
step 35, acquiring the bottom context information and the upper access request, and sequentially executing a preset inference rule to complete data fusion of the bottom context information;
as a preferable aspect of the foregoing technical solution, the management of the context event in step 3 specifically includes:
and step 36, processing according to the adding or removing event of the resource node in the context information model and/or the adding or removing of the attribute node in the context information model or the change of the attribute value.
The embodiment of the invention also provides a context-aware middleware construction device facing the general environment, which comprises the following steps: the system comprises a context acquisition module, a context processing module and a context access module; wherein,
the context acquisition module is used for acquiring context information and context event information in a software running environment;
the context processing module is used for (carrying out) dynamic modeling according to the received context information so as to obtain a context information model; the system is also used for realizing the aggregation of the context information and the management of the context event by adopting an information processing mechanism based on rule reasoning and event driving;
the context access module is used for providing a uniform access interface for a user, realizing a context information complementary access mode combining a synchronous request access mode and an asynchronous notification access mode, and providing a context information access mechanism for an upper-layer application program to query according to the context model.
As a preferred aspect of the foregoing technical solution, the context obtaining module includes: a context information preprocessing unit and a sensor; the sensor includes: an active sensor and a passive sensor;
the context information preprocessing unit is responsible for managing all sensors which belong to the context information preprocessing unit so as to send the acquired original context information to the context processing module after the original context information is processed in a unified format;
the active sensor and the passive sensor provide context information acquisition service for the context preprocessing unit, but the active sensor and the passive sensor have different information communication modes with the context preprocessing unit, the active sensor is in asynchronous communication, the passive sensor is in synchronous communication, and the active sensor actively sends the acquired original context information to the context information preprocessing unit according to a preset scheduling strategy; the passive sensor provides the instant query service of the original context information to the context information preprocessing unit.
Preferably, in the above technical solution, the context processing module includes: the device comprises a context information storage unit, a context information management unit, a context aggregation unit and an event processing unit; wherein,
the context information management unit is used for managing the context information captured by the context acquisition module, constructing a context information model and dynamically updating the context information model;
the context information storage unit is used for storing historical context information and storing the context information needing to be persisted;
the context aggregation unit is used for performing aggregation reasoning on the bottom-layer context information obtained by the context processing module and processing the bottom-layer context information into high-layer context information meeting the context query request;
the event processing unit is used for managing the context events and providing an event subscription function for the context access module.
Preferably, the context aggregation unit includes a context filtering subunit and a context reasoning subunit;
the context filtering subunit is used for filtering the bottom-layer context information so as to improve the accuracy of the context information;
the context inference subunit is configured to perform inference on the underlying context information to eliminate conflicts and errors between the context information.
Preferably, the context inference subunit includes: a pattern matcher, agenda and execution engine;
the pattern matcher is responsible for carrying out pattern matching on the input information and predefined rules, carrying out priority queuing at the same time to generate an optimal execution sequence, and putting the optimal execution sequence into an agenda;
the execution engine can sequentially execute the inference rules in the agenda according to the sequence, thereby completing the data fusion of the bottom-layer context information.
Preferably, the context access module adopts a design based on a facade mode, takes the context as a unique upper class, and provides a uniform access interface for the user; wherein the context access module comprises:
the context synchronization request access mode unit is used for performing aggregation reasoning on the bottom-layer context information obtained by the context processing module through the context aggregation unit according to the context query request of the upper-layer application program, processing the bottom-layer context information into high-layer context information meeting the context query request, and providing query service of instant context information for the upper-layer application program;
and the context asynchronous notification access mode unit completes asynchronous access to the context information based on a Publish/Subscribe model.
The invention can model the context information received actually and update the model aiming at the context information so as to adapt to the environment with open and changeable characteristics of the universal environment. The device and the method of the embodiment of the invention are easy to reuse and transplant, have wide application range and provide support for development and deployment of context-aware computing application.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic flow chart of a method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an apparatus according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a structure of a context information model according to an embodiment of the present invention;
FIG. 4a is a schematic diagram of interface classes of an active sensor;
FIG. 4b is a schematic diagram of interface classes of a passive sensor;
FIG. 5 is a schematic diagram of a context aggregation unit;
FIG. 6 is a diagram illustrating a Context facade class Context;
FIG. 7 is a schematic view of the apparatus of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it is to be understood that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The method of the embodiment of the invention, the flow of which is shown in fig. 1, comprises the following steps:
and 3, providing a uniform access interface for a user, realizing a context information complementary access mode combining a synchronous request access mode and an asynchronous notification access mode, and providing a convenient context information access mechanism for an upper-layer application program.
Wherein, the step 2 specifically comprises the following steps:
step 21, receiving original context information, unifying formats of the original context information according to a context information model, and returning the context information;
and step 22, modeling the received context information to obtain a context information model.
The aggregation of the context information in step 3 specifically includes:
step 31, according to the context information model obtained in step 1 and the context information obtained in step 2, performing structural adjustment and numerical update on the context information model;
step 32, storing the context information needing to be persisted;
step 33, filtering the context information according to a preset rule to remove inaccurate and/or unstable information in the underlying context;
step 34, according to the context query request combined with the bottom-layer context information, adopting a forward rule reasoning based on a Rete algorithm to eliminate conflicts and errors existing among the context information, and obtaining high-layer context information with high adaptability to the upper-layer application requirements;
step 35, acquiring the bottom context information and the upper access request, and sequentially executing a preset inference rule to complete data fusion of the bottom context information;
the context event management in step 3 specifically includes:
and step 36, processing according to the adding or removing event of the resource node in the context information model and/or the adding or removing of the attribute node in the context information model or the change of the attribute value.
As shown in fig. 2, the apparatus of the embodiment of the present invention includes: context acquisition module 100, context processing module 200, context access module 300.
The context acquiring module 100 is used for acquiring context information and context event information in a software running environment. The context processing module 200 is configured to dynamically model according to the received context information to obtain a context information model; and the method is also used for realizing the aggregation of the context information and the management of the context event by adopting an information processing mechanism based on rule reasoning and event driving. The context access module 300 is configured to provide a uniform access interface for a user, implement a context information complementary access mode combining a synchronous request access mode and an asynchronous notification access mode, and provide a context information access mechanism for an upper-layer application program to perform a query according to the context model.
The context acquiring module 100 is configured to acquire context state information and context event information in a software operating environment. The premise of context sensing is that context can be acquired stably and efficiently. The context obtaining module 100 implements encapsulation and management of various sensors through a uniform programming interface. The context acquiring module 100 of the embodiment of the present invention includes: context information preprocessing unit 110 and perceptron 120.
The sensors may be classified into an active sensor 111 and a passive sensor 112 according to their sensing methods. The active sensor is configured to receive original context information and actively send the original context information to the context information preprocessing unit 110 according to a preset scheduling policy. The passive sensor is used to receive the context information returned after being processed by the context information preprocessing unit 110.
Fig. 4a depicts interface classes of an active sensor, where functions ActiveSensor, getName () are used to query name identification of the sensor, functions start (), stop () and isStarted () provide control and query of sensor lifecycle, function getperiodicitimeunit () is used to query the sensor for minimum cycle time unit of obtaining context information, function setperiodicitimes () is used to set sensing cycle of the sensor, and function setliener () is used to set listener receiving original context information of the sensor in the context information preprocessing module. FIG. 4b depicts the interface class PassionSensor of a passive sensor that returns the original context information it monitors by calling the function getValue () when the passive sensor is activated.
The context information preprocessing module 110 is connected to the sensor 120. Specifically, the context information preprocessing module 110 is connected to the active sensor 111 and the passive sensor 112, so as to send the original context information received by the active sensor 111 to the passive sensor 112 after performing uniform format processing on the original context information according to the context information model established by the context information modeling module 100.
The context processing module 200 is an information processing mechanism based on rule-based reasoning and event driving, and implements aggregation of context information and management of context events. The context processing module 200 is composed of a context information modeling unit 210, a context information storage unit 220, a context information management unit 230, a context aggregation unit 240, and an event processing unit 250.
The context processing module 200 is responsible for modeling the context information according to the context information acquired by the context acquiring module 100 to acquire a context information model, and managing and maintaining the underlying context information.
The context information is divided into real-time context information and historical context information.
The real-time context information is stored in a dynamic context information model in the memory, and the context information management unit 230 models the context information through the context information modeling unit 210 according to the context information captured by the context acquisition module 100, and performs structural adjustment and numerical update.
The historical context information is stored in the context information storage unit 220, and the context information management unit 230 stores the context information that needs to be persisted in the context information storage unit 220 according to the received context information and the structure of the context information model that has been created in the memory.
The context aggregation unit 240 is configured to perform aggregation inference on the bottom-layer context information obtained by the context processing module 200, and process the bottom-layer context information into high-layer context information meeting the context query request.
Fig. 6 shows a description of context aggregation, and the context aggregation unit 240 is composed of a context filtering part and a context reasoning part, and completes an information aggregation process from filtering and reasoning of the underlying context information to fusion.
Context filtering is the first step of context aggregation, and aims to reject inaccurate and unstable information in the underlying context to improve the accuracy of the context information. The underlying context information is a description of a resource or some property of a resource in the software execution environment that changes over time, and is only pre-processed in format in the context acquisition module 100. Therefore, the underlying context information may still have ambiguity, instability and limitation to some extent, even if there are some conflicts and errors between the information, etc. The underlying context information needs to be filtered.
The main function of the context inference is to combine the bottom-layer context information with the context query request, and eliminate conflicts and errors between the context information by adopting a forward rule inference based on a Rete algorithm, so as to obtain the high-layer context information with high adaptability to the requirements of the upper-layer application.
Wherein the context inference is implemented by a context rules engine. The context rules engine in embodiments of the present invention comprises: a pattern matcher, an agenda, and an execution engine. The input of the inference engine is composed of bottom-layer context information and upper-layer access requests, and the pattern matcher is responsible for performing pattern matching on the input information and predefined rules, performing priority queuing at the same time to generate an optimal execution sequence, and putting the optimal execution sequence into an agenda. The execution engine can sequentially execute the inference rules in the agenda according to the sequence, so that the data fusion of the bottom-layer context is completed, and the more valuable upper-layer context is obtained.
And an event processing unit 250 for managing the context events and providing an event subscription function for the upper layer.
A context event refers to a change in the structure or value of the context information model triggered by a change in software context. As shown in fig. 3, the context information model includes two types of nodes, namely a child resource node and a child attribute node, and thus the context event correspondingly includes two types of events, namely a resource event and an attribute event. Wherein the resource event refers to the addition or removal event of the resource node in the context information model. Corresponding to the context, it may be specifically the case that a new resource or an original resource becomes unavailable. An attribute event refers to the addition, removal, or change in the value of an attribute node in a context. In the context of application, some function states may be added to a resource, some original function may become unavailable, or a value of a function state may be updated.
The event processing unit 250 is responsible for capturing and managing these context events. On one hand, the software running environment is complex and changeable, so that the context event is more complex; on the other hand, the context environment has strong timeliness, so that the real-time performance requirement of the context event processing is high. The invention uses an event description language (EPL) to express the real-time and composite context events, and adopts an open source framework (Esper) as a complex event processing engine to realize the management of the context events.
The context information modeling unit 210 is configured to model the received context to obtain a context information model. Modeling the context is a prerequisite and starting point for implementing context-aware computing. The context information model refers to a data representation and organization of context information.
Due to the continuous change of application requirements, the software running environment is complex and changeable, and the form of context information is also very different. The context information mainly comprises basic information carried by the context information and relationship information between the context information and other information elements. In one embodiment of the present invention, the relationship information may include domain information to which the context information belongs and hierarchical information where the context information belongs, and the relationship information carries organization information of the overall context.
In a specific embodiment of the present invention, a general, easily extensible, multi-level hierarchical logical data model can be defined for the context information by applying the concept and idea of "generalized modeling" in the "generalized knowledge-based expression" in view of the above-mentioned characteristics of the context information.
The Context Data Model (CDM) proposed by the present invention is defined as a triplet: CDM ═ Cxt, R, A >
Wherein, each tuple is defined as follows:
cxt is a unified access interface of CDM, which is a set of context resources (R), i.e. Cxt ═ R1,R2,...,Rn}(n≥1)。
R is a binary group consisting of several Sub resources (SubR) and several attributes (Attribute, a), i.e. R ═ R<∑SubRi,∑Aj>(0≤i≤n,0≤j≤n),SubRiRepresents a sub-resource belonging to resource R, which also satisfies the description above with respect to resource R; aj represents some attribute that is subordinate to resource R.
A is a binary group consisting of an attribute name and an attribute value, i.e., a ═ K, V >, where K denotes the attribute name and V denotes the attribute value.
Based on the logic data model, the invention organizes the context information according to the field and the hierarchical relationship thereof by adopting a tree-shaped organizational structure to establish a general context information model which is easy to expand. The context information model of the embodiment of the present invention is shown in fig. 4, and includes resource nodes represented by circles and attribute nodes represented by squares. The resource node refers to a resource available in the system, and the context can be divided into a computing context, a user context, an application context, and the like. As shown in FIG. 3, each resource node may have multiple child resource nodes, whose names are unique, or multiple attribute nodes. The resource node mainly plays a role of resource organization, the resource node does not have attribute information, and the attribute information is described by the attribute node as a child node. The squares shown in fig. 3 are attribute nodes, and the attribute nodes are subordinate to the resource nodes as the parent nodes thereof, so as to describe specific information of the parent resource nodes thereof, such as the utilization rate of the CPU, the occupied amount of the memory, the network connection information, and the like, by a key-value pair method.
The context information defines any Resource, attribute of the Resource, or sub-Resource, sub-attribute of the Resource, and the like in a representation manner similar to uri (unifrm Resource identifier), such as:
memory resource is "ctx:// computing/storage/memory"
Memory available value (ctx:// computing/storage/memory # available) "
As shown in fig. 2, the context access module 300 is further included for providing a uniform access interface to a user, implementing a context information complementary access mode combining a synchronous request access mode (PULL mode) and an asynchronous notification access mode (PUSH mode), and providing a convenient context information access mechanism to an upper layer application program.
In the embodiment of the present invention, the Context access module 300 adopts a design based on a facade model, and provides a uniform access interface to the user by using a Context (Context) as a unique upper class, as described in the Context facade class Context in fig. 7. The context information complementary access mode combining synchronous request (PULL mode) and asynchronous notification (PUSH mode) is realized, and a convenient context information access mechanism is provided for upper-layer application programs.
The context synchronization request access mode, namely the PULL mode, allows an upper layer application program to autonomously query context resources, and obtains required context information through context fusion reasoning under the support of the context aggregation unit. The context synchronization request access mode unit is used for performing aggregation reasoning on the bottom-layer context information obtained by the context processing module through the context aggregation unit according to the context query request of the upper-layer application program, and processing the bottom-layer context information into upper-layer context information meeting the context query request so as to enable the upper-layer application program to query the context information independently;
the method for accessing the mode corresponding to the synchronous request in the Context facade class Context comprises the following steps: the getChildren () and getAttributes () methods are used for instant query of dynamic information of resource nodes and attribute nodes; the exists () method is used for verifying whether the resource node is available at the current moment; the getValue () method is used to query the immediate attribute values of the attribute nodes.
getSubResources () and getAttributeUrl () methods are used to make instant query for the dynamic information of resource nodes and attribute nodes; the getAttribute () method is used to query the immediate attribute values of the attribute nodes.
And the context asynchronous notification access mode, namely the PUSH mode, completes asynchronous access to the context information based on the Publish/Subscribe model.
The upper application program registers the monitor in the Context awareness middleware through the Context portal class and specifies the Context information to be subscribed and the trigger event type thereof, so that the Context information is actively pushed to the subscriber when the specified monitoring event occurs. The invention adopts an event Query Language (Event Query Language) to describe the context event, supports the description of the composite event and the further composition of the composite event, simultaneously encapsulates the Query request BY the EQL, provides Query constraint conditions such as WHERE, JOIN, GROUP BY, HAVING and the like, and greatly improves the Query convenience.
The method for the context facade class corresponding to the asynchronous notification access mode is as follows:
the register () method specifies a context listener object for receiving event notifications provided by the context processing module, the eventkands parameter is used for specifying the type of context events that the upper layer application is interested in, and the url parameter is used for specifying the context information that needs to be queried when listening to events. The register byeql () method uses the EQL to describe the context information to be queried, implementing a function similar to the register () method.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. A construction method of context-aware middleware facing to pervasive environment is characterized by comprising the following steps:
step 1, obtaining context information and context event information in a software running environment;
step 2, modeling the received context information to obtain a context information model;
step 3, based on rule reasoning and event-driven information processing mechanism, realizing context information aggregation and context event management;
and 4, providing a uniform access interface for a user, realizing a context information complementary access mode combining a synchronous request access mode and an asynchronous notification access mode, and providing a convenient context information access mechanism for an upper-layer application program.
2. The context awareness middleware construction method facing to the ubiquitous environment according to claim 1, wherein the step 2 is specifically:
step 21, receiving original context information, unifying formats of the original context information according to a context information model, and returning the context information;
and step 22, modeling the returned context information to obtain a context information model.
3. The context awareness middleware construction method facing to the ubiquitous environment according to claim 1, wherein the aggregation of the context information in the step 3 is specifically:
step 31, according to the context information obtained in step 1 and the context information model obtained in step 2, performing structural adjustment and numerical update on the context information model;
step 32, storing the context information needing to be persisted;
step 33, filtering the context information according to a preset rule to eliminate inaccurate and/or unstable information in the underlying context information;
step 34, according to the context query request combined with the bottom-layer context information, adopting a forward rule reasoning based on a Rete algorithm to eliminate conflicts and errors existing among the context information, and obtaining upper-layer context information with high adaptability to the upper-layer application requirements;
and step 35, acquiring the bottom-layer context information and the upper-layer access request, and sequentially executing a preset inference rule to complete data fusion of the bottom-layer context information.
4. The context-aware middleware construction method facing to the ubiquitous environment according to claim 1, wherein the management of the context event in the step 3 is specifically:
and step 36, processing according to the adding or removing event of the resource node in the context information model and/or the adding or removing of the attribute node in the context information model or the change of the attribute value.
5. A pervasive environment-oriented context-aware middleware framework apparatus, comprising: the system comprises a context acquisition module, a context processing module and a context access module; wherein,
the context acquisition module is used for acquiring context information and context event information in a software running environment;
the context processing module is used for (carrying out) dynamic modeling according to the received context information so as to obtain a context information model; the system is also used for realizing the aggregation of the context information and the management of the context event by adopting an information processing mechanism based on rule reasoning and event driving;
the context access module is used for providing a uniform access interface for a user, realizing a context information complementary access mode combining a synchronous request access mode and an asynchronous notification access mode, and providing a context information access mechanism for an upper-layer application program to query according to the context model.
6. The context-aware middleware framework apparatus for pervasive environment oriented application as claimed in claim 5, wherein said context obtaining module comprises: a context information preprocessing unit and a sensor; the sensor includes: an active sensor and a passive sensor;
the context information preprocessing unit is responsible for managing all sensors which belong to the context information preprocessing unit so as to send the acquired original context information to the context processing module after the original context information is processed in a unified format;
the active sensor and the passive sensor provide context information acquisition service for the context preprocessing unit, but the active sensor and the passive sensor have different information communication modes with the context preprocessing unit, the active sensor is in asynchronous communication, the passive sensor is in synchronous communication, and the active sensor actively sends the acquired original context information to the context information preprocessing unit according to a preset scheduling strategy; the passive sensor provides the instant query service of the original context information to the context information preprocessing unit.
7. The context-aware middleware framework apparatus for pervasive environment oriented application as claimed in claim 5, wherein said context processing module comprises: the device comprises a context information storage unit, a context information management unit, a context aggregation unit and an event processing unit; wherein,
the context information management unit is used for managing the context information captured by the context acquisition module, constructing a context information model and dynamically updating the context information model;
the context information storage unit is used for storing historical context information and storing the context information needing to be persisted;
the context aggregation unit is used for performing aggregation reasoning on the bottom-layer context information obtained by the context processing module and processing the bottom-layer context information into high-layer context information meeting the context query request;
the event processing unit is used for managing the context events and providing an event subscription function for the context access module.
8. The context-aware middleware framework apparatus facing a ubiquitous environment according to claim 7, wherein the context aggregation unit includes a context filtering subunit and a context inference subunit;
the context filtering subunit is used for filtering the bottom-layer context information so as to improve the accuracy of the context information;
the context inference subunit is configured to perform inference on the underlying context information to eliminate conflicts and errors between the context information.
9. The context-aware middleware framework apparatus facing a ubiquitous environment according to claim 8, wherein the context inference subunit comprises: a pattern matcher, agenda and execution engine;
the pattern matcher is responsible for carrying out pattern matching on the input information and predefined rules, carrying out priority queuing at the same time to generate an optimal execution sequence, and putting the optimal execution sequence into an agenda;
the execution engine can sequentially execute the inference rules in the agenda according to the sequence, thereby completing the data fusion of the bottom-layer context information.
10. The context-aware middleware framework apparatus facing a ubiquitous environment according to claim 5, wherein the context access module adopts a design based on a facade pattern, and provides a uniform access interface to the user by using the context as a unique upper class; wherein the context access module comprises:
the context synchronization request access mode unit is used for performing aggregation reasoning on the bottom-layer context information obtained by the context processing module through the context aggregation unit according to the context query request of the upper-layer application program, processing the bottom-layer context information into high-layer context information meeting the context query request, and providing query service of instant context information for the upper-layer application program;
and the context asynchronous notification access mode unit completes asynchronous access to the context information based on a Publish/Subscribe model.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110253610.9A CN102436371B (en) | 2011-08-30 | 2011-08-30 | Method and device for constructing context-aware middleware facing to pervasive environment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110253610.9A CN102436371B (en) | 2011-08-30 | 2011-08-30 | Method and device for constructing context-aware middleware facing to pervasive environment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102436371A true CN102436371A (en) | 2012-05-02 |
CN102436371B CN102436371B (en) | 2014-06-18 |
Family
ID=45984451
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110253610.9A Expired - Fee Related CN102436371B (en) | 2011-08-30 | 2011-08-30 | Method and device for constructing context-aware middleware facing to pervasive environment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102436371B (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103235847A (en) * | 2013-04-12 | 2013-08-07 | 连云港杰瑞深软科技有限公司 | Dynamic model allocating method based on matrix transformation |
CN104182232A (en) * | 2014-08-22 | 2014-12-03 | 华为技术有限公司 | Method for establishing context-aware applications and user terminal |
CN106970793A (en) * | 2017-03-23 | 2017-07-21 | 南京大学 | A kind of context consistency detection and repair system and the method for inspection and platform |
CN107678924A (en) * | 2017-10-09 | 2018-02-09 | 上海德衡数据科技有限公司 | A kind of integrated data center operational system framework based on multiple agent |
CN107729212A (en) * | 2017-10-09 | 2018-02-23 | 上海德衡数据科技有限公司 | A kind of integrated data center operational system middleware based on multiple agent |
CN107730010A (en) * | 2017-10-09 | 2018-02-23 | 上海德衡数据科技有限公司 | A kind of integrated data center operational system prototype based on multiple agent |
CN107769965A (en) * | 2017-10-09 | 2018-03-06 | 上海德衡数据科技有限公司 | A kind of integrated data center operational system communication interface based on multiple agent |
CN107809493A (en) * | 2017-12-11 | 2018-03-16 | 上海齐网网络科技有限公司 | A kind of Internet of Things operating system prototype based on multiple agent |
CN107844327A (en) * | 2017-11-03 | 2018-03-27 | 南京大学 | A kind of detecting system and detection method for realizing context uniformity |
CN108023961A (en) * | 2017-12-11 | 2018-05-11 | 上海齐网网络科技有限公司 | A kind of Internet of Things cooperative system prototype based on multiple agent |
CN108023962A (en) * | 2017-12-11 | 2018-05-11 | 上海齐网网络科技有限公司 | A kind of Internet of Things cooperative system framework based on multiple agent |
CN108038186A (en) * | 2017-12-11 | 2018-05-15 | 上海齐网网络科技有限公司 | A kind of Internet of Things operating system framework based on multiple agent |
WO2019085221A1 (en) * | 2017-11-01 | 2019-05-09 | 上海德衡数据科技有限公司 | Pervasive computing operating system prototype based on multiple agents |
CN111158671A (en) * | 2019-12-30 | 2020-05-15 | 上海云瀚科技股份有限公司 | Micro-service architecture software module dynamic loading method based on registration and directional scanning |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008124420A1 (en) * | 2007-04-04 | 2008-10-16 | Honeywell International Inc. | A mechanism to improve a user's interaction with a computer system |
CN101510152A (en) * | 2009-04-01 | 2009-08-19 | 南京邮电大学 | Context perception middleware method orienting sign status identification in general environment |
-
2011
- 2011-08-30 CN CN201110253610.9A patent/CN102436371B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008124420A1 (en) * | 2007-04-04 | 2008-10-16 | Honeywell International Inc. | A mechanism to improve a user's interaction with a computer system |
CN101510152A (en) * | 2009-04-01 | 2009-08-19 | 南京邮电大学 | Context perception middleware method orienting sign status identification in general environment |
Non-Patent Citations (2)
Title |
---|
刘威 等: "基于本体的上下文感知中间件框架", 《计算机技术与发展》 * |
贾朝光 等: "一种普适环境下动态演化模型的研究", 《杭州电子科技大学学报》 * |
Cited By (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103235847A (en) * | 2013-04-12 | 2013-08-07 | 连云港杰瑞深软科技有限公司 | Dynamic model allocating method based on matrix transformation |
CN103235847B (en) * | 2013-04-12 | 2015-11-18 | 连云港杰瑞深软科技有限公司 | Based on the model dynamic adaptation method of matrix conversion |
CN104182232A (en) * | 2014-08-22 | 2014-12-03 | 华为技术有限公司 | Method for establishing context-aware applications and user terminal |
WO2016026389A1 (en) * | 2014-08-22 | 2016-02-25 | 华为技术有限公司 | Method for creating context-aware application 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 |
CN106970793A (en) * | 2017-03-23 | 2017-07-21 | 南京大学 | A kind of context consistency detection and repair system and the method for inspection and platform |
CN106970793B (en) * | 2017-03-23 | 2020-10-27 | 南京大学 | Context consistency detection and repair system, detection method and platform |
CN107678924A (en) * | 2017-10-09 | 2018-02-09 | 上海德衡数据科技有限公司 | A kind of integrated data center operational system framework based on multiple agent |
CN107729212A (en) * | 2017-10-09 | 2018-02-23 | 上海德衡数据科技有限公司 | A kind of integrated data center operational system middleware based on multiple agent |
CN107730010A (en) * | 2017-10-09 | 2018-02-23 | 上海德衡数据科技有限公司 | A kind of integrated data center operational system prototype based on multiple agent |
CN107769965A (en) * | 2017-10-09 | 2018-03-06 | 上海德衡数据科技有限公司 | A kind of integrated data center operational system communication interface based on multiple agent |
WO2019085221A1 (en) * | 2017-11-01 | 2019-05-09 | 上海德衡数据科技有限公司 | Pervasive computing operating system prototype based on multiple agents |
CN107844327A (en) * | 2017-11-03 | 2018-03-27 | 南京大学 | A kind of detecting system and detection method for realizing context uniformity |
CN107844327B (en) * | 2017-11-03 | 2020-10-27 | 南京大学 | Detection system and detection method for realizing context consistency |
CN108023962A (en) * | 2017-12-11 | 2018-05-11 | 上海齐网网络科技有限公司 | A kind of Internet of Things cooperative system framework based on multiple agent |
CN108038186A (en) * | 2017-12-11 | 2018-05-15 | 上海齐网网络科技有限公司 | A kind of Internet of Things operating system framework based on multiple agent |
CN108023961A (en) * | 2017-12-11 | 2018-05-11 | 上海齐网网络科技有限公司 | A kind of Internet of Things cooperative system prototype based on multiple agent |
CN107809493A (en) * | 2017-12-11 | 2018-03-16 | 上海齐网网络科技有限公司 | A kind of Internet of Things operating system prototype based on multiple agent |
CN111158671A (en) * | 2019-12-30 | 2020-05-15 | 上海云瀚科技股份有限公司 | Micro-service architecture software module dynamic loading method based on registration and directional scanning |
CN111158671B (en) * | 2019-12-30 | 2023-03-21 | 上海云瀚科技股份有限公司 | Micro-service architecture software module dynamic loading method based on registration and directional scanning |
Also Published As
Publication number | Publication date |
---|---|
CN102436371B (en) | 2014-06-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102436371B (en) | Method and device for constructing context-aware middleware facing to pervasive environment | |
Razzaque et al. | Middleware for internet of things: a survey | |
Farahzadi et al. | Middleware technologies for cloud of things: a survey | |
Corredor et al. | Knowledge-aware and service-oriented middleware for deploying pervasive services | |
EP2665020A2 (en) | Incremental reasoning under data source availability constraints | |
Tao et al. | Study on manufacturing grid resource service QoS modeling and evaluation | |
CN106446256B (en) | Industrial real-time production information perception system based on context calculation | |
KR20190059951A (en) | Things to Enable Semantic Mashups on the Internet | |
Mohamed et al. | Service-oriented middleware approaches for wireless sensor networks | |
Vandana et al. | Semantic ontology based IoT-resource description | |
Issarny et al. | Composing distributed systems: Overcoming the interoperability challenge | |
Tracey et al. | OMA LWM2M in a holistic architecture for the Internet of Things | |
Singh et al. | Event handling for distributed real-time cyber-physical systems | |
Rahmani et al. | Gateway controller with deep sensing: learning to be autonomic in intelligent internet of things | |
Seydoux et al. | Capturing the contributions of the semantic web to the IoT: a unifying vision | |
Alaya et al. | Frameself: A generic context-aware autonomic framework for self-management of distributed systems | |
CN115250237B (en) | Rule engine method and device for Internet of things | |
Al-Jaroodi et al. | Service oriented middleware: trends and challenges | |
Bispo et al. | A semantic solution for saving energy in wireless sensor networks | |
Sun et al. | A new formalisation for wireless sensor network adaptive context-aware system: Application to an environmental use case | |
Ntalasha et al. | Internet of thing context awareness model | |
Yun | A New Framework for Web Service Discovery Based on Behavior | |
Alaya et al. | FRAMESELF: A generic autonomic framework for self-management of distributed systems-Application on the self-configuration of M2M architecture using semantic and ontology | |
Minor | Bridging OPC UA and DPWS for Industrial SOA | |
Di Modica et al. | An OSGi middleware to enable the Sensor as a Service paradigm |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20140618 Termination date: 20180830 |