Web of thins autonomous management and control system and method for environment control
By designing a Web of Things autonomous management and control system for environment control, the complexity of device management and control in complex IoT environments is solved, dynamic autonomous management and control of devices is realized, and management efficiency and user experience are improved.
Patent Information
- Application Number
- CN202411805849.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-18
AI Technical Summary
In complex IoT application environments, the manual process of managing and controlling a large number of IoT devices is complex and difficult to coordinate between devices, resulting in inefficient management.
A Web of Things autonomous management and control system for environmental control was designed, including device registration module, user policy module, application policy module, sensor control module, actuator control module and reasoning decision-making module. Through the coordinated work of these modules, dynamic autonomous management and control of IoT devices can be achieved.
The system can realize dynamic autonomous control of devices in a complex IoT environment, meet user needs, improve management efficiency, reduce the complexity of users' strategy formulation, and enhance user experience.
Smart Images

Figure CN119652724A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of Internet of Things and computer application, and in particular to a web of things autonomous control system and method for environmental control. Background Art
[0002] With the Thing Description specification proposed by the World Wide Web Consortium (W3C), Internet of Things (IoT) devices have realized a unified interface description in the form of Web services, which has promoted the interoperability and intelligent management of WOT (Web of Things) devices. However, with the increase in the number of IoT devices and the complexity of application scenarios, its management process has become increasingly difficult, especially in terms of manual control of numerous devices and the coordination between devices to achieve complex functions. Therefore, it is of great significance to explore an autonomous control mechanism that can adapt to complex environmental changes. Summary of the invention
[0003] The purpose of the present invention is to overcome the shortcomings of the background technology and provide a web of things autonomous control system and method for environmental control. By defining the structure of the system and the specific implementation process of the method, dynamic autonomous control of Internet of Things devices can be achieved in a complex Internet of Things application environment to meet the needs of users.
[0004] The technical problem of the present invention is solved by the following technical solutions:
[0005] A web of things autonomous management and control system for environmental control, comprising the following modules: a device registration module 1, a user policy module 2, an application policy module 3, a sensor management and control module 4, an actuator management and control module 5 and a reasoning decision module 6; all of the above modules run on an Internet of Things platform and provide application capabilities; the Internet of Things platform refers to a network platform that can run the above modules, support the registration of sensors and actuator devices in the form of interface description documents, and can realize the control and management of devices;
[0006] The device registration module 1 is used to register and store device information, including a device information upload interface, a device information verification interface, three storage interfaces and a query call interface; the device information upload interface is used to upload device information provided by the device provider and described in accordance with the extended W3C thing description specification, which corresponds to a front-end interface for submitting and uploading files corresponding to the device information; the device information verification interface verifies the format of the device description information provided by the device provider to check whether it meets the specification; the three storage interfaces, one is a parsing storage interface, which is used to parse the registered device description information in json-ld format, generate device information data in RDF format and store it in the protégé library, and corresponds to a front-end interface for displaying the generated results, and the other two interfaces are respectively a sensor storage interface and an actuator storage interface, which are used to extract the information registered in the device registration module 1 according to the structure of the sensor and actuator models, and input the extracted information into the sensor and actuator management and control modules 5 for storage; the query call interface is used to query and obtain the device information in RDF format stored in the protégé library based on SPARQL and OWL query statements;
[0007] The user policy module 2 is used to receive the description information of the environmental attribute regulation requirements proposed by the user; it includes seven interfaces, namely: user policy input interface, user policy verification interface, user policy storage interface, user policy modification interface, device information query interface, device information matching interface and application policy storage interface; the user policy input interface is used to provide users with the input of the content of their application policies, and the input needs to be made in accordance with the specified user policy specifications that do not contain specific device information, corresponding to a front-end interface for users to manually input; the user policy verification interface is used to verify the user's policy format to check whether it meets the specifications, and if not, re-fill it; the user policy storage interface is used to store the policies proposed by the user in the user policy library, and the user policy library is essentially a The database can be used to query, obtain and modify the user policies stored therein; the user policy modification interface is used by the user to modify the proposed application policy, which is implemented by calling the user policy storage interface; the device information query interface is used to query and obtain the registered device information, which is implemented by calling the query call interface in the device registration module 1; the device information matching interface is used to query and match the device for the policy proposed by the user that does not contain specific device information, by generating SPARQL and OWL query statements based on the content in the user policy, and inputting the query call interface in the device registration module 1 to obtain the corresponding device information, thereby obtaining an executable application policy containing specific device information; the application policy storage interface is used to input the application policy into the application policy module 3 for storage.
[0008] The application policy module 3 is used to store the executable application policies generated and input by the user policy module 2; it includes three interfaces: an application policy storage interface, an application policy maintenance interface and an application policy acquisition interface; the application policy storage interface stores the input application policies in the application policy library in the application policy module 3, and the application policy library is essentially a database in which the application policies can be queried and acquired; the application policy maintenance interface is used to update the application policy. When the user modifies the stored user policy in the user policy module 2, the user policy re-matches the device, and generates an executable application policy and inputs it into the application policy module 3, and then the corresponding original application policy in the application policy library is updated and modified through the application policy maintenance interface; the application policy acquisition interface is used to query and call the application policy in the application policy library.
[0009] The sensor management and control module 4 includes a sensor model storage interface, a sensor interaction interface, a sensor query interface, a sensor data processing interface and an instruction parsing interface; the sensor model storage interface is used to store the sensor device information extracted according to the sensor model input by the sensor storage interface in the device registration module 1; the sensor interaction interface is used to access and call the device according to the specific sensor device model information to obtain the environmental attribute value measured by the sensor; the sensor query interface searches for the corresponding specific device model information according to the device information contained in the instruction; the sensor data processing interface is used to process the obtained environmental attribute value and return it to the reasoning and decision module 6; the instruction parsing interface is used to parse the instruction passed in by the reasoning and decision module 6 to obtain the device information contained therein and the environmental attribute information required to be obtained.
[0010] The actuator control module 5 includes an actuator model storage interface, an actuator function interaction interface, an actuator state interaction interface, an actuator query interface, an actuator data processing interface and an instruction parsing interface; the actuator model storage interface is used to store the actuator device information extracted according to the actuator model input by the actuator storage interface in the device registration module 1; the actuator function interaction interface is used to call the function of the actuator device according to the information in the device model; the actuator state interaction interface is used to query and obtain the status of the actuator device according to the information in the specific model; the actuator query interface is used to find the corresponding specific actuator device model information according to the device information in the instruction; the actuator data processing interface is used to process the obtained actuator status information or the return information of calling the actuator function and return it to the reasoning decision module 6; the instruction parsing interface is used to parse the instruction passed in by the reasoning decision module 6, and obtain the device information contained therein and the actuator status information required to be obtained or the function information of the actuator required to be called and executed.
[0011] The inference decision module 6 is used to trigger the conditions in the strategy to implement the inference decision process, including an application strategy acquisition interface, an application strategy parsing interface, a data interaction processing interface and an inference decision interface; the application strategy acquisition interface is used to obtain the application strategy stored in the application strategy library in the application strategy module 3 in a polling manner, which is implemented by calling the application strategy acquisition interface in the application strategy module 3; the strategy parsing interface is used to parse the application strategy obtained in the application strategy module 3 in a polling manner, obtain the device information required to be called and the categories, conditions and effects in the strategy, and obtain a data format that can be recognized by the program; the data interaction interface is divided into a sensor data interaction interface and an actuator data interaction interface. The sensor data interaction interface is used to generate an instruction to call the sensor to obtain the environmental attribute value based on the obtained device information required to be called, and output it to the sensor control module 4, the instruction to call the actuator to obtain the actuator state and the instruction to call the actuator to execute the function, and output it to the actuator control module 5; the inference decision interface is used to make a comprehensive inference decision based on the strategy and the obtained environmental attribute value and actuator state value to obtain the final execution result.
[0012] Furthermore, the content added to the extended W3C thing description specification corresponding to the device information upload interface in the device registration module 1 includes the following parts: ① adding a new namespace to the @Context field in the thing description, and based on the vocabulary provided in the namespace; ② re-describing the original device information based on the @type field; ③ extending the location field to describe the location information of the device; ④ extending the alterContent field in the form of the interactive capability part, and describing the inherent optional items of the device action and event, that is, the selectable instruction set; ⑤ describing the function of the device action through the function field, including the environmental attributes that can be changed by the action and The effect of the change is represented by the value of the weight, which is calculated through the performance parameters of the device such as power. The positive or negative value of the weight indicates whether the device's impact on the environmental attributes is positive feedback or negative feedback; ⑥ The extended linkTo field is used to describe the association between the device's action and its corresponding device state, ensuring that each operation has a corresponding state description, and the content of the obtained state description should be consistent with the alterContent content in the corresponding operation. For example, if there is an action named "toggle" in actions, which is used to control the opening and closing of the switch, there should be an event named "switchStatus" in events to obtain the current state of the switch.
[0013] Furthermore, the sensor model and actuator model corresponding to the sensor storage interface and actuator storage interface in the device registration module 1 are as follows:
[0014] The sensor model is: S m ={BA,PA}, where BA is the basic attribute of the sensor and PA is the interactive attribute of the sensor:
[0015] BA=<id,name,location,> , where id is the sensor device number, name attribute and device id are used as the unique identifier of the sensor, and location attribute represents the location information of the sensor;
[0016] PA = {pa 1 ,pa 2 ,…pa s}, the interaction attributes of the sensor are composed of a set of single attribute tuples pa, where pa =<property,type,path,method> , property represents the name of the property, type is the data type for obtaining the property value, path is the URL path of the sensor property value service, and method is the operation method of the service;
[0017] The actuator model is Am = {BA,<OA,SA>}, where BA is the basic attribute of the actuator, OA is the operation attribute of the actuator, and SA is the state attribute of the actuator, as follows:
[0018] BA=<id,name,location> , where id is the device id of the actuator, the name attribute and the device id together serve as the unique identifier of the actuator, and the location attribute represents the location information of the actuator;
[0019] OA = {oa 1 ,oa 2 ,…,oa a}, where oa =<action,type,alterContent,path,method,linkTo> , action is the name of the executor operation, type is the data type required to call the executor operation, alterContent is the content of the call operation, path and method are the URL path of the corresponding executor operation and its operation method, linkTo is a default value, indicating the state name corresponding to the operation;
[0020] SA = {sa 1 ,sa 2 ,…,sa a}, where sa=<status,type,path,method> , where status is the actuator status, type is the data type required to obtain the actuator status, path and method are the path and operation method for obtaining the actuator status.
[0021] Furthermore, in the user policy module 2, the user policy specification that does not contain specific device information includes three parts: category, condition and effect, which are used to be presented in the front-end interface and provide guidance to the user on the process of proposing their policy; wherein the category includes location and environmental attributes, which are used to characterize which environmental attribute of which location will be regulated by the policy; the effect is divided into positive feedback, negative feedback and no feedback based on the feedback effect of the change of environmental attributes; the condition is divided into three parts corresponding to three different feedback effects, that is, under what conditions a certain feedback effect should be produced, and any feedback can correspond to multiple conditions, and any condition is composed of one or more basic units of "location-environmental attribute-fuzzy description", wherein the fuzzy description is derived from the fuzzy set and membership function of the set recognized environmental attributes, wherein the fuzzy set of the attribute is a fuzzy description of multiple value domains for different value ranges of the attribute, and the transition between fuzzy descriptions of different value domains is characterized based on the membership function, and the fuzzy set and its membership function usually need to be formulated and selected in combination with the application domain knowledge.
[0022] A web of things autonomous control method for environmental control includes the following steps:
[0023] S1. The device provider provides the interface description document of the device to be registered that meets the extended W3C Transaction Description Specification;
[0024] S2. The administrator regularly maintains and manages the RDF format information of the devices in the protégé;
[0025] S3. The user proposes user policy requirements through the front-end interface according to the given specifications, including the policy category, conditions and corresponding expected change effect settings;
[0026] S4, the program matches the specific device information based on the SPARQL query language and OWL reasoning for the user policy submitted by the user front end, provided by the RDF device information in the protégé, obtains a specific policy that contains specific device information and can be executed, and adds it to the application policy module 3 for storage;
[0027] S5. The administrator adds the fuzzy sets and membership functions corresponding to the environmental attributes to the reasoning decision module 6 in advance, and regularly maintains and modifies them;
[0028] S6, the program in the reasoning decision module 6 polls and executes all application policies in the application policy module 3; the administrator puts each module in the framework into operation; among them, the user policy module 2 and the device registration module 1 receive the description information from the front-end interface during operation; the sensor and actuator management module 5 is used to interact with and call sensors and actuators during operation; the application policy module 3 is updated during operation, constantly accepting new policies, and detecting all the included device information at the same time, and updating the changed device information; the reasoning decision module 6 triggers the reasoning solution during operation;
[0029] S7. The framework returns the result to the front end during runtime. If the user policy requirements are met or cannot be met, the front end interface generates the execution result.
[0030] Furthermore, after verification, if the device interface description document provided by the device provider in step S1 does not meet the set specifications, it is returned to the front-end user for resubmission. If it meets the specifications, the device information in the submitted device interface description document is stored.
[0031] Further, in step S4, the process of matching the user policy submitted by the front-end input to the device follows the following steps:
[0032] S41. Construct a SPARQL query statement according to the location and environment attributes in the category of the application strategy, match the actuator devices that can be regulated, and obtain information such as their basic attributes and functions and content options, wherein the feedback effect is calculated by the relative performance parameters of each device, and its positive and negative correspond to positive feedback and negative feedback effects respectively;
[0033] S42, constructing a SPARQL query statement according to the location and environmental attributes in the condition, matching sensor devices that can detect the environmental attribute value, including basic attributes of the device and access control methods for obtaining the attribute value;
[0034] S43. If there is no sensor or actuator whose location and environmental attributes completely match in steps S41 and S42, the reasoning function is implemented based on the OWL language to select a device with the same function at an adjacent location (within a certain threshold range) for replacement. If it still does not exist, the strategy becomes invalid.
[0035] Further, in step S7, the reasoning decision process performed in the reasoning decision module 6 includes four steps: perception input fuzzification, fuzzy reasoning algorithm, execution output defuzzification and judgment execution, which are as follows:
[0036] The perceptual input fuzzification process is defined as follows:
[0037] (1) Interacting with the sensor control module 4 according to the sensor device information in the application strategy and the environmental attributes to be acquired, and obtaining the environmental attribute values to be acquired;
[0038] (2) According to the pre-set fuzzy sets and membership functions of various environmental attributes, the membership degree of the current environmental attribute value under each fuzzy set is obtained;
[0039] (3) The obtained degree of membership of the environmental attribute under each fuzzy set is the result of fuzzification processing of the input environmental attribute value;
[0040] The fuzzy inference algorithm comprises the following steps:
[0041] (1) Taking the category of application strategy as the unit, according to the condition corresponding to each effect in the application strategy, all attribute values in the condition are obtained. For any attribute value, fuzzification is performed according to the fuzzy set and membership function of the given attribute, and the membership degree of the current attribute value corresponding to the fuzzy subset of the attribute in the condition is obtained, and finally the set of all attribute membership degrees in the condition is obtained;
[0042] (2) Based on each membership set obtained in (1), the activation degree of the conditions corresponding to all effects is calculated;
[0043] (3) Select the highest activation value in the condition as the fuzzy output of the corresponding effect in the application strategy;
[0044] The execution output defuzzification process is as follows:
[0045] (1) Defuzzification is the process of choosing between positive feedback, negative feedback, and no feedback, and using the final operation intention as the output of fuzzy reasoning;
[0046] (2) The fuzzy output of each operation effect is normalized according to the original ratio to obtain the operation intentions corresponding to the three operation effects respectively;
[0047] (3) Use a decision three-phase diagram to make a decision on the final execution result; the decision three-phase diagram is an equilateral triangle coordinate system, where the three vertices represent the operation change effects of positive feedback, negative feedback, and no feedback, respectively. Any side is used to represent the relative proportion of the operation intention corresponding to the two vertices connected by it, and the value range of any side is [0,1]; bring the operation intention corresponding to the three operations into the coordinate system, calculate the value on each edge and find the corresponding point on the coordinate axis, connect the point with the diagonal vertex of the side where it is located, then any point on each connecting line contains the same proportion of the corresponding components of the other two angles, and the intersection of the three lines at one point is the position in the coordinate system space corresponding to the final decision under the joint action of the three operation intentions;
[0048] (4) Considering that the three effects should be considered under the same standard when making decisions, if the coordinate system space is equally divided into three subspaces, the decision result of any point in the subspace is the operation effect corresponding to the coordinate system vertex contained in the subspace; then the final operation effect is obtained by judging the subspace where the final decision point is located;
[0049] (5) If the intersection point obtained in (3) falls on the regional dividing line, it means that there are two operations with the same effect intention. From the user's perspective, when it is difficult to make a decision, the unchanged priority is given, so the decision result with no feedback effect is adopted;
[0050] The judgment execution process is as follows:
[0051] (1) According to the final decision result and the device information of the actuator contained in the strategy, obtain the current state of the actuator from the actuator control module 5;
[0052] (2) If the current executor state is consistent with the state that should be reached after the calling executor is executed, the executor has completed the required operation and the function is not executed;
[0053] (3) If the current actuator state is inconsistent with the state that should be achieved after the actuator is called, the actuator control module 5 is called to execute the device function based on the actuator device information;
[0054] (4) Accept the return result of successful execution and confirm that the device function is successfully called and executed.
[0055] Beneficial effects:
[0056] The present invention expands the object description specification proposed by W3C, so that it can provide a more comprehensive description of devices in different application scenarios and fields, and avoids different descriptions of the same function in the specification due to common sense cognition, which in turn affects the call of the device; at the same time, the present invention proposes a user application policy specification, which reduces the process of specifying device information compared to traditional application policies, and uses SPARQL query language and OWL reasoning language to query and reason about device information in RDF format to achieve matching between application policies and devices, which reduces the complexity of user policy formulation to a certain extent and increases user experience; the present invention realizes dynamic regulation of IoT devices based on reasoning decision-making, so that it can make autonomous decisions and adjustments based on the current environmental status and user needs, thereby realizing regulation of the environment, and the framework of the entire method is based on the mainstream IoT platform, which is convenient for overall development and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 It is a block diagram of the overall structure of the system of the present invention.
[0058] Figure 2 It is an execution flow chart of the present invention.
[0059] Figure 3 It is a schematic diagram of final decision-making based on the decision three-phase diagram of the present invention. DETAILED DESCRIPTION
[0060] The following will be combined with specific implementation methods and drawings to clearly and completely describe the concept, specific structure and technical effects of the present invention, so as to fully understand the purpose, scheme and effect of the present invention. It should be understood that the specific implementation methods described herein are only used to explain the present invention patent, and are not used to limit the present invention patent.
[0061] Example 1 Overall structure of a web of things autonomous management and control system for environmental control
[0062] The overall structure diagram of the web of things autonomous control system for environmental control of the present invention is as follows: Figure 1 As shown, the whole system includes six modules: device registration module 1, user policy module 2, application policy module 3, sensor control module 4, actuator control module 5 and reasoning decision module 6; the device is described in accordance with the extended W3C thing description specification and registered in the device registration module 1, and is parsed and added to the protégé in RDF format; in the user policy module 2, the user proposes a user policy without device information based on the attributes, and then matches the device based on SPARQL and OWL languages, and inputs it into the application policy module 3; the reasoning decision module 6 performs fuzzy reasoning and decision on the application strategy based on the membership function of the environmental attributes involved in the application strategy, and the current environmental attribute value obtained by interacting with the sensor control module 4, and interacts with the actuator control module 5 to realize the control of the actuator device, and returns the execution result information to the front end.
[0063] Example 2 Extension of device interface description
[0064] The extended W3C thing description specification is divided into three parts, namely ① basic metadata: used to describe basic information such as device ID, title, explanation information, etc.; ② public safety metadata: used to describe security information in the device; ③ interactive capabilities: divided into three parts, attributes, actions and events, where attributes are used to describe basic information about environmental attributes that can be obtained by sensors, actions and events are the functions that can be performed by actuators, and the state changes of actuators caused by the execution of functions; location, alterContent, function, linkTo fields are added on the basis of W3C thing description:
[0065] (1) The location field represents the specific location information of the device and is added to the general metadata, such as "location":["Dwelling", "LivingRoom"];
[0066] (2) The alterContent field represents the inherent optional items of the device action and state, that is, the specific fixed optional content of the functions that the device can perform and the specific fixed optional content of the device state, which are added to actions;
[0067] (3) The function field represents the environmental attributes that the device function can change and the effect of the change, and is added to actions;
[0068] (4) The linkTo field represents the association between the specific function of the device and the state of the device after the function is implemented, and is added to events;
[0069] At the same time, a new namespace is added to the @Context field in the extended thing description specification, and the original device information is described again using the vocabulary in the added namespace, so that the device description information and the vocabulary information in the user policy proposed by the user can be consistent. At the same time, after the device described in accordance with the above extended interface description specification is registered, the system will parse its description information in json-ld format and generate device information in RDF format and store it in protégé.
[0070] Example 3 Proposing User Policy Specifications
[0071] The specific content structure of the user policy specification is divided into three parts:
[0072] (1) Category: The name of the environmental attribute to be changed, property, and the location of the environmental attribute are used as the category of the user policy. That is, changing different attributes in different locations is considered to be different types of policies. For example, the category of the policy to change the bedroom temperature is "bedroom; temperature".
[0073] (2) Effect: The effect of norms on environmental attributes can be divided into positive feedback, negative feedback and no feedback;
[0074] (3) Conditions: For the above three effects, each effect corresponds to a set of conditions. When the conditions are triggered, the corresponding effects can be executed. The conditions are proposed in the form of "location-property-fuzzy_set". Location and property refer to the properties of other locations that can affect the properties of the location in the category. Fuzzy_set refers to the fuzzy description of the property. For example, in the IoT environment, the temperature is fuzzy processed, and the temperature variable with a threshold of 0 to 40°C is divided into "hotter (20 to 40°C)", "moderate (15 to 25°C)" and "colder (0 to 20°C)". The fuzzy set of the temperature t can be expressed as:
[0075] T(t)={t∈[0,40]|μ T (t)} T (t) = e^(-(tc)^2 / (2σ^2))
[0076] And c and σ take different values in different fuzzy descriptions; then "bedroom-temperature-high" means that the bedroom temperature is high, then an n-attribute single condition for application strategy can be expressed as "S =<location,property> :[ <location 1 ,property 1 ,fuzzy_set 1 >,… <location n ,property n ,fuzzy_set n >]:effect", such as "<bedroom,temperature> :[<home,temperature,high> ,<bedroom,humidity,high> ]: negative” means lowering the bedroom temperature when both the room temperature and bedroom humidity are high.
[0077] Example 4: Execution process of the framework of the device autonomous control method
[0078] The workflow of the web of things autonomous control method framework of the present invention is as follows Figure 2The workflow of the method framework refers to the following steps to complete the construction and operation of the framework based on the implementation of the internal structure of the above framework. First, the device provider provides the interface description document of the device to be registered according to the extended W3C thing description specification; if the submitted device interface description document is not extended, it shall be extended by the administrator or returned to the user for resubmission; the user proposes policy requirements according to the given specifications through the front-end interface; the program matches the specific device information for the policy submitted by the user front-end input, provided by the RDF format device information in the protégé, obtains the policy containing the specific device information and can be executed, and adds it to the application policy module 3 for storage; the administrator adds the fuzzy set and membership function corresponding to the environmental attribute to the reasoning and decision module 6 in advance, and regularly maintains and modifies it; the program polls and executes all application policies in the application policy module 3; the administrator puts each module in the framework in operation; among them, the user policy module 2 and the device registration module 1 receive the description information from the front-end interface at runtime; the sensor and actuator management module 5 is used to interact with the sensor and actuator at runtime for access and call; the reasoning and decision module 6 triggers the reasoning solution at runtime; the framework returns the result to the front-end at runtime, and if the user policy requirement has been met or cannot be met, the front-end interface generates the execution result;
[0079] Example 5 Reasoning Decision Process
[0080] The reasoning decision process in the reasoning decision module 6 is divided into three steps: perception input fuzzification, fuzzy reasoning algorithm and execution output defuzzification:
[0081] (1) Fuzzification of sensor input: For an attribute R in an IoT environment, given its fuzzy set R(r) = {r∈[a,b]|μ(r)∈[0,1]}, the domain of the attribute is a~b, and the membership function is μ(r). If its fuzzy subset is Fs = [R 1 ,R 2 …R n ], then the membership function corresponding to this set of fuzzy subsets can be expressed as Mf = [μ 1 (r),μ 2 (r)…μ n (r)], and for any membership function in Mf, there is an element corresponding to it in the fuzzy subset Fs; then for the current attribute value r 0 ∈[a,b], the fuzzification process is: transform the attribute value r 0 Mapped into each fuzzy subset, and calculated r according to the membership function of each subset 0 For the membership degree of the subset, the fuzzy processing result is obtained, which represents the attribute value r 0The degree of membership of any fuzzy subset is called the fuzzy variable of the attribute. Since the attribute values obtained at different times are different, for any attribute value r 0 The fuzzy variable is expressed as:
[0082]
[0083] in For r 0 The fuzzy variables obtained after fuzzification processing, μ k For r 0 The degree of membership relative to any fuzzy subset;
[0084] (2) Fuzzy reasoning algorithm: Calculate the activation degree of each condition under different effects in this type of application strategy, and finally get the operation effect of the attribute in this type of application strategy. AS is used to represent a type of application strategy, and the corresponding subsets of positive feedback, negative feedback and no feedback are AS respectively. p , A.S. n and AS no ; then the application strategy subset AS corresponding to the positive feedback operation effect p It can be expressed as:
[0085]
[0086] in AS p The membership set of each attribute in a condition in , P x is a fuzzy variable of one of the attributes; the specific process is as follows: ① For AS p For any condition in the condition, first obtain all attribute values in the condition, and for any attribute value, fuzzify it according to the given fuzzy set and membership function of the attribute, and obtain the membership of the current attribute value corresponding to the fuzzy subset of the attribute in the condition, and finally obtain the set of all attribute memberships in the condition. ②AS-based i For each membership set in , the activation degree y of the corresponding condition is calculated, and the Yager Average operator is used for calculation:
[0087]
[0088] where y k AS p The activation degree of any condition in the , the adjustable parameter r is used to control the influence of different membership sets on the activation degree; ③ Due to AS p The conditions in the above are independent of each other, and the triggering of any condition will affect the final decision. Therefore, AS is selected. p The value with the highest activation in the condition is taken as AS pThe fuzzy output represents the degree of change to be performed on the effects of each operation based on the relevant attribute values in the current environment. i =[y 1 ,y 2 …y n ] indicates AS p The activation degree of all conditions in , the fuzzy output is: p =max(Y p ); Similarly, we can get AS no and AS n The fuzzy output O no and O n ;
[0089] (3) Execute output defuzzification: Defuzzification is the process of choosing between positive feedback, negative feedback, and no feedback. Considering that people’s decisions are often based on their inner will and tendency generated by what they see and hear, in order to better simulate the decision-making process, this paper proposes to use the final operation effect intention W as the output of fuzzy reasoning, then W = {W p ,W no ,W n}, where W p is the willingness to perform the positive feedback operation effect, W no W is the willingness to perform the action without feedback. n is the willingness to perform negative feedback operation effects, and the three are negatively correlated. Therefore, considering using W p ,W no With W n The relationship between O and W is used to determine the value of W, as follows: First, p , O no and O n Normalize it according to its original ratio to get W i ,W k With W d , that is, satisfying:
[0090]
[0091] The decision three-phase diagram is as follows Figure 3 As shown, it is an equilateral triangle coordinate system. The three vertices represent the positive feedback, no feedback and negative feedback operation effects respectively. Any side is used to represent the relative proportion of the willingness of the operation effect corresponding to the two vertices connected, which are W no / (W no +W n ),W n / (W n +W p ) and W p / (W p +Wno ), the value range of either side is [0,1]; W p ,W no With W n Substitute into the coordinate system, calculate the value of each edge and find the corresponding point on the coordinate axis, connect the point with the diagonal vertex of the edge where it is located, then any point on each connecting line contains the same proportion of the corresponding components of the other two angles, and the point where the three lines intersect is the position in the coordinate system space corresponding to the final decision under the joint action of the three operation intentions; for example, when O p =0.3, O no =0.9, O n =0.3, we get W p =0.2, W no =0.6, W n =0.2, the corresponding point in the coordinate space is W 1 , the final operation effect is no feedback; when O p =0.9, O no =0.6, O n =0.3, we get W p =0.5, W no =1 / 3, W n =1 / 6, the corresponding point in the coordinate space is W 2 , the final operation intention is positive feedback; when O p =0.3, O no =0,O n =0.2, we get W p =0.6, W no =0, W n = 0.4, corresponding to point W in the coordinate space 3 , the final operation effect is negative feedback.
[0092] The above specific implementation methods are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A web of things autonomous management and control system for environmental control, comprising the following modules: a device registration module (1), a user policy module (2), an application policy module (3), a sensor management and control module (4), an actuator management and control module (5) and a reasoning and decision module (6); all of the above modules run on an Internet of Things platform and provide application capabilities; the Internet of Things platform refers to a network platform that can run the above modules, support the registration of sensors and actuator devices in the form of interface description documents, and can realize the control and management of devices; The device registration module (1) is used to register and store device information, and includes a device information upload interface, a device information verification interface, three storage interfaces and a query call interface; the device information upload interface is used to upload device information provided by a device provider and described in accordance with the extended W3C thing description specification, and corresponds to a front-end interface for submitting a file for uploading corresponding device information; the device information verification interface verifies the format of the device description information provided by the device provider to check whether it meets the specification; the three storage interfaces, one of which is a parsing storage interface, is used to parse the registered device description information in json-ld format, generate device information data in RDF format and store it in a protégé library, and corresponds to a front-end interface for displaying the generated results; the other two interfaces are a sensor storage interface and an actuator storage interface, which are used to extract the information registered in the device registration module (1) according to the structure of the sensor and actuator models, and input the extracted information into the sensor and actuator management and control modules (5) for storage; the one query call interface is used to query and obtain the device information in RDF format stored in the protégé library based on SPARQL and OWL query statements; The user policy module (2) is used to receive the description information of the environmental attribute regulation requirements proposed by the user; it includes seven interfaces, namely: a user policy input interface, a user policy verification interface, a user policy storage interface, a user policy modification interface, a device information query interface, a device information matching interface and an application policy storage interface; the user policy input interface is used to provide the user with the input of the content of the application policy, and the input needs to be made in accordance with the user policy specification that does not contain specific device information, corresponding to a front-end interface for the user to manually input; the user policy verification interface is used to verify the user's policy format to check whether it meets the specification, and if not, re-fill it; the user policy storage interface is used to store the policy proposed by the user in a user policy library, and the user policy library is essentially a data The library can be used to query, obtain and modify the user policies stored therein; the user policy modification interface is used by the user to modify the proposed application policy, which is implemented by calling the user policy storage interface; the device information query interface is used to query and obtain the registered device information, which is implemented by calling the query call interface in the device registration module (1); the device information matching interface is used to query and match the device for the policy proposed by the user that does not contain specific device information, by generating SPARQL and OWL query statements based on the content in the user policy, and inputting them into the query call interface in the device registration module (1) to obtain the corresponding device information, thereby obtaining an executable application policy containing specific device information; the application policy storage interface is used to input the application policy into the application policy module (3) for storage; The application policy module (3) is used to store the executable application policy generated and input by the user policy module (2); it includes three interfaces: an application policy storage interface, an application policy maintenance interface and an application policy acquisition interface; the application policy storage interface stores the input application policy in an application policy library in the application policy module (3); the application policy library is essentially a database, and the application policy therein can be queried and acquired; the application policy maintenance interface is used to update the application policy; when the user modifies the stored user policy in the user policy module (2), the user policy re-matches the device, and generates an executable application policy input into the application policy module (3), and then the corresponding original application policy in the application policy library is updated and modified through the application policy maintenance interface; the application policy acquisition interface is used to query and call the application policy in the application policy library; The sensor control module (4) includes a sensor model storage interface, a sensor interaction interface, a sensor query interface, a sensor data processing interface and an instruction parsing interface; the sensor model storage interface is used to store sensor device information extracted according to the sensor model input by the sensor storage interface in the device registration module (1); the sensor interaction interface is used to access and call the device according to the specific sensor device model information to obtain the environmental attribute value measured by the sensor; the sensor query interface is used to search for the corresponding specific device model information according to the device information contained in the instruction; the sensor data processing interface is used to process the obtained environmental attribute value and return it to the reasoning and decision module (6); the instruction parsing interface is used to parse the instruction input by the reasoning and decision module (6) to obtain the device information contained therein and the environmental attribute information required to be obtained; The actuator control module (5) includes an actuator model storage interface, an actuator function interaction interface, an actuator state interaction interface, an actuator query interface, an actuator data processing interface and an instruction parsing interface; the actuator model storage interface is used to store the actuator device information extracted according to the actuator model input by the actuator storage interface in the device registration module (1); the actuator function interaction interface is used to call the function of the actuator device according to the information in the device model; the actuator state interaction interface is used to query and obtain the state of the actuator device according to the information in the specific model; the actuator query interface is used to find the corresponding specific actuator device model information according to the device information in the instruction; the actuator data processing interface is used to process the obtained actuator state information or the return information of calling the actuator function and return it to the reasoning decision module (6); the instruction parsing interface is used to parse the instruction passed in by the reasoning decision module (6) to obtain the device information contained therein and the actuator state information to be obtained or the function information of the actuator to be called and executed; The inference decision module (6) is used to trigger the conditions in the policy to realize the inference decision process, including an application policy acquisition interface, an application policy parsing interface, a data interaction processing interface and an inference decision interface; the application policy acquisition interface is used to obtain the application policy stored in the application policy library in the application policy module (3) in a polling manner, and is implemented by calling the application policy acquisition interface in the application policy module (3); the policy parsing interface is used to parse the application policy obtained in the application policy module (3) in a polling manner, obtain the device information required to be called and the category, condition and effect in the policy, and obtain a data format that can be recognized by the program; the data interaction interface is divided into a sensor data interaction interface and an actuator data interaction interface, the sensor data interaction interface is used to generate an instruction to call the sensor to obtain the environmental attribute value according to the obtained device information required to be called, and output it to the sensor control module (4), an instruction to call the actuator to obtain the actuator state and an instruction to call the actuator to execute the function, and output it to the actuator control module (5); the inference decision interface is used to make a comprehensive inference decision according to the policy and the obtained environmental attribute value and actuator state value to obtain the final execution result.
2. A web of things autonomous management and control system for environmental control according to claim 1, characterized in that: The content added to the extended W3C thing description specification corresponding to the device information upload interface in the device registration module (1) includes the following parts: ① adding a new namespace to the @Context field in the thing description, and based on the vocabulary provided in the namespace; ②Re-describe the original device information based on the @type field; ③ Expand the location field to describe the location information of the device; ④ Expand the alterContent field in the form of the interactive capability part to describe the inherent optional items of the device action and event, that is, the selectable instruction set; ⑤ Describe the function of the device action through the function field, including the environmental attributes that can be changed by the action and the effect of the changed ability, which is represented by the value of the weight. The weight is calculated through the performance parameters of the device, such as power, and the positive or negative value of the weight indicates whether the impact of the device on the environmental attributes is positive feedback or negative feedback; ⑥ Expand the linkTo field to describe the relationship between the device action and its corresponding device status, ensuring that each operation has a corresponding status description, and the content of the obtained status description should be consistent with the alterContent content in the corresponding operation. For example, if there is an action named "toggle" in actions to control the opening and closing of a switch, there should be an event named "switchStatus" in events to obtain the current status of the switch.
3. A web of things autonomous management and control system for environmental control according to claim 1, characterized in that: The sensor model and actuator model corresponding to the sensor storage interface and actuator storage interface in the device registration module (1) are as follows: The sensor model is: S m ={BA,PA}, where BA is the basic attribute of the sensor and PA is the interactive attribute of the sensor: BA=<id,name,location,> , where id is the sensor device number, name attribute and device id are used as the unique identifier of the sensor, and location attribute represents the location information of the sensor; PA={pa1,pa2,…pa s }, the interaction attributes of the sensor are composed of a set of single attribute tuples pa, where pa =<property,type,path,method> , property represents the name of the property, type is the data type for obtaining the property value, path is the URL path of the sensor property value service, and method is the operation method of the service; The actuator model is Am = {BA,<OA,SA>}, where BA is the basic attribute of the actuator, OA is the operation attribute of the actuator, and SA is the state attribute of the actuator, as follows: BA=<id,name,location> , where id is the device id of the actuator, the name attribute and the device id together serve as the unique identifier of the actuator, and the location attribute represents the location information of the actuator; OA = {oa1, oa2, …, oa a}, where oa = <action, type, alterContent, path, method, linkTo>, action is the name of the executor operation, type is the data type required to call the executor operation, alterContent is the content of the call operation, path and method are the URL path of the corresponding executor operation and its operation method, linkTo is a default value, indicating the state name corresponding to the operation; SA={sa1,sa2,…,sa a }, where sa=<status,type,path,method> , where status is the actuator status, type is the data type required to obtain the actuator status, path and method are the path and operation method for obtaining the actuator status.
4. A web of things autonomous management and control system for environmental control according to claim 1, characterized in that: In the user policy module (2), the user policy specification that does not contain specific device information includes three parts: category, condition and effect, which are used to be presented in the front-end interface and provide guidance to the user on the process of proposing their policy; wherein the category includes location and environmental attribute, which is used to characterize which environmental attribute of which location will be regulated by the policy; the effect is divided into positive feedback, negative feedback and no feedback based on the feedback effect of the change of environmental attribute; the condition is divided into three parts corresponding to three different feedback effects, that is, under what conditions a certain feedback effect should be generated, and any feedback can correspond to multiple conditions, and any condition is composed of one or more basic units of "location-environmental attribute-fuzzy description", wherein the fuzzy description is derived from a fuzzy set and membership function of a set recognized environmental attribute, wherein the fuzzy set of the attribute is a fuzzy description of multiple value ranges of different attribute values, and the transition between fuzzy descriptions of different value ranges is characterized based on the membership function, and the fuzzy set and its membership function usually need to be formulated and selected in combination with application domain knowledge.
5. A web of things autonomous control method for environmental control, comprising the following steps: S1. The device provider provides the interface description document of the device to be registered that meets the extended W3C Transaction Description Specification; S2. The administrator regularly maintains and manages the RDF format information of the devices in the protégé; S3. The user proposes user policy requirements through the front-end interface according to the given specifications, including the policy category, conditions and corresponding expected change effect settings; S4. The program matches the specific device information based on the SPARQL query language and OWL reasoning for the user policy submitted by the user front-end, and obtains a specific policy that contains specific device information and can be executed, provided by the RDF device information in the protégé, and adds it to the application policy module (3) for storage; S5. The administrator adds the fuzzy sets and membership functions corresponding to the environmental attributes to the reasoning decision module (6) in advance, and regularly maintains and modifies them; S6. The program in the reasoning decision module (6) polls and executes all application strategies in the application strategy module (3); the administrator puts each module in the framework into operation; wherein, The user policy module (2) and the device registration module (1) receive description information from the front-end interface during operation; the sensor and actuator control module (5) is used to interact with and call sensors and actuators during operation; the application policy module (3) is updated during operation, continuously accepts new policies, and detects all device information included, and updates the changed device information; the reasoning decision module (6) triggers reasoning and solving during operation; S7. The framework returns the result to the front end during runtime. If the user policy requirements are met or cannot be met, the front end interface generates the execution result.
6. A web of things autonomous management and control method for environmental control according to claim 5, characterized in that: In step S1, the device interface description document provided by the device provider is verified. If it does not meet the set specifications, it is returned to the front-end user for resubmission. If it meets the specifications, the device information in the submitted device interface description document is stored.
7. A web of things autonomous management and control method for environmental control according to claim 5, characterized in that: In step S4, the process of matching the user policy submitted by the front-end input to the device follows the following steps: S41. Construct a SPARQL query statement according to the location and environment attributes in the category of the application strategy, match the actuator devices that can be regulated, and obtain information such as their basic attributes and functions and content options, wherein the feedback effect is calculated by the relative performance parameters of each device, and its positive and negative correspond to positive feedback and negative feedback effects respectively; S42, constructing a SPARQL query statement according to the location and environmental attributes in the condition, matching sensor devices that can detect the environmental attribute value, including basic attributes of the device and access control methods for obtaining the attribute value; S43. If there is no sensor or actuator whose location and environmental attributes completely match in steps S41 and S42, the reasoning function is implemented based on the OWL language to select a device with the same function at an adjacent location (within a certain threshold range) for replacement. If it still does not exist, the strategy becomes invalid.
8. The method for autonomously controlling web of things for environmental control according to claim 5, characterized in that: In step S7, the reasoning and decision-making process performed in the reasoning and decision-making module (6) includes four steps: fuzzification of perception input, fuzzy reasoning algorithm, defuzzification of execution output and judgment execution, which are as follows: The perceptual input fuzzification process is defined as follows: 1) interacting with the sensor control module (4) according to the sensor device information in the application strategy and the environmental attribute to be acquired, and obtaining the environmental attribute value to be acquired; 2) According to the preset fuzzy sets and membership functions of various environmental attributes, the membership degree of the current environmental attribute value under each fuzzy set is obtained; 3) The obtained degree of membership of the environmental attribute under each fuzzy set is the result of fuzzy processing of the input environmental attribute value; The fuzzy inference algorithm comprises the following steps: 1) Taking the category of application strategy as the unit, according to the condition corresponding to each effect in the application strategy, all attribute values in the condition are obtained. For any attribute value, fuzzification is performed according to the fuzzy set and membership function of the given attribute, and the membership degree of the current attribute value corresponding to the fuzzy subset of the attribute in the condition is obtained, and finally the set of all attribute membership degrees in the condition is obtained; 2) Based on each membership set obtained in 1), the activation degree of the conditions corresponding to all effects is calculated; 3) Select the highest activation value in the condition as the fuzzy output of the corresponding effect in the application strategy; The execution output defuzzification process is as follows: 1) Defuzzification is the process of choosing between positive feedback, negative feedback and no feedback operation effects, using the final operation intention as the output of fuzzy reasoning; 2) The fuzzy output of each operation effect is normalized according to the original proportion, and the operation intentions corresponding to the three operation effects are obtained respectively; 3) Use a decision three-phase diagram to make a decision on the final execution result; the decision three-phase diagram is an equilateral triangle coordinate system, the three vertices represent the operation change effects of positive feedback, negative feedback and no feedback respectively, and any side is used to represent the relative proportion of the operation intention corresponding to the two vertices connected, and the value range of any side is [0,1]; bring the operation intention corresponding to the three operations into the coordinate system, calculate the value on each edge and find the corresponding point on the coordinate axis, connect the point with the diagonal vertex of the edge where it is located, then any point on each connecting line contains the same proportion of the corresponding components of the other two angles, and the intersection of the three lines at one point is the position in the coordinate system space corresponding to the final decision under the joint action of the three operation intentions; 4) Considering that the three effects should be considered under the same standard when making decisions, if the coordinate system space is equally divided into three subspaces, the decision result of any point in the subspace is the operation effect corresponding to the coordinate system vertex contained in the subspace; then the final operation effect is obtained by judging the subspace where the final decision point is located; 5) If the intersection point obtained in 3) falls on the regional dividing line, it means that there are two operations with the same effect intention. From the user's perspective, when it is difficult to make a decision, the unchanged one is preferred, so the decision result with no feedback effect is adopted; The judgment execution process is as follows: 1) According to the final decision result and the device information of the actuator contained in the strategy, obtain the current state of the actuator from the actuator control module (5); 2) If the current executor state is consistent with the state that should be reached after the calling executor is executed, the executor has completed the required operation and the function is not executed; 3) If the current actuator state is inconsistent with the state that should be reached after calling the actuator, based on the actuator device information, the actuator control module (5) is called to execute the device function; 4) Accept the return result of successful execution and confirm that the device function is successfully called and executed.