A semantic control method for IoT devices based on publish-subscribe model
Through the semantic manipulation method of IoT devices for publish and subscription mode, the concept domain of IoT information is established, and user, device and environment information is integrated, and the problem of data sharing and interoperability between devices in IoT technology is solved, and the semantic attachment and unified interface of device data is realized to meet complex application needs.
Patent Information
- Application Number
- CN202310062019.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-19
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2043-01-19
AI Technical Summary
Existing IoT technologies are difficult to effectively manage and control diverse IoT devices, resulting in difficulty in sharing and interoperating data between devices and unable to meet the complex IoT application needs.
The semantic manipulation method of IoT devices is adopted for the publish and subscription model. By defining the concept domain of IoT information, users, devices and environmental information are integrated, multi-dimensional relationships between data are established, and unified management and manipulation are supported.
It realizes semantic attachment of device data, blocks the heterogeneity and isolation of data, supports the establishment of a unified interface, and meets the needs of complex Internet of Things applications.
Smart Images

Figure CN116049224B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of Internet of Things, and in particular relates to a semantic control method for Internet of Things devices oriented to a publish-subscribe mode. Background Art
[0002] With the continuous development of IoT technology, a large number of hardware and devices have appeared in people's daily lives, from some simple sensors and control modules to mobile devices and wearable devices with certain intelligence. So far, more than 10 billion IoT devices have been connected to the IoT. How to control and manage these widely existing devices and the data generated by the devices so that they can serve as the infrastructure of the IoT and support a variety of intelligent and convenient services is an important issue in the current IoT technology field. However, the diverse device access makes the IoT complex and heterogeneous, which leads to the independence of IoT devices in data and functions when providing services. In addition, as the middleware connecting devices and users, the traditional IoT application platform lacks intelligence and flexibility in the management and control methods of devices. It generally adopts a tightly coupled and closed service provision model, lacks common management and control methods, cannot provide support for data sharing and interoperability between devices, and is difficult to meet the complex IoT application requirements. Summary of the invention
[0003] In order to solve the above problems, the present invention provides a semantic control method for IoT devices in a publish-subscribe mode. The method takes the IoT information concept domain as the core, characterizes user and device information, infers implicit relationships, and thus establishes connections between data, manages and controls devices in a unified manner, and thus supports the growing demand for intelligent management and control in IoT systems.
[0004] The technical solution adopted by the present invention is as follows:
[0005] A semantic control method for IoT devices in a publish-subscribe mode is performed in the following steps:
[0006] The first step is to define the concept domain of IoT information and divide the knowledge in the IoT information field into the concept abstraction layer and the instance information layer;
[0007] The second step is to use RDF specifications to describe the knowledge of the conceptual abstraction layer, including the ontology concepts, attributes and relationships of devices, users and environments. Among them, concepts are concrete representations of things. Among the attributes, the attributes of the device ontology include device name, id, model, manufacturer, subject, location, status, variables, communication protocol, data format and instructions; the attributes of the user ontology include user name, user id, password, management area and authority; the attributes of the environment ontology include name, id, location and variables; the relationships include entities belonging to concepts, entities owning attributes, user entities managing environment entities, user entities managing device entities, device entities raising or lowering variables and device entities monitoring variables;
[0008] The third step is to describe the knowledge of the instance information layer in the form of <head concept, relationship, tail concept> triples. The data in the form of triples is stored in the instance information table of the database. The instance information table is divided into three columns, including head concept, relationship and tail concept, and two indexes are established: head concept-relationship-tail concept and relationship-head concept-tail concept.
[0009] The fourth step is to semantically represent the user information, parse the records of the user information table stored in the database, match the knowledge composition of the top-level concept layer in the form of a <record, relationship, record> triple through the field name, and then correspond the triple to the <head concept, relationship, tail concept> triple, and fill it into the instance information layer of the concept domain as instance data;
[0010] The fifth step is to semantically represent the device information, parse the static information of the device stored in the database, establish an abstract instance of the device in the IoT information concept domain, and establish a relationship between the device registration information and the abstract instance of the IoT information concept domain, and then map it to a specific instance of the IoT information concept domain;
[0011] In the sixth step, the device uses the publish-subscribe mode protocol to access directly or indirectly through the gateway. Each device uses a unique topic as an identifier for communication. When the device accesses, it uses the registered topic and then matches the device information in the IoT information concept domain for configuration.
[0012] Step 7: Subscribe to the topic of the device, parse the message published by the device to the topic through the concepts and relationships of the IoT information concept domain, use the parsed result as the attribute of the IoT information concept domain, match the concepts and relationships in the concept domain, and then store and update it;
[0013] The eighth step is to autonomously map the data of the instance information layer of the IoT information concept domain into a form recognizable by the logic program, namely the fact file, and combine the fact file with the defined logic rules for reasoning and solving. Finally, according to the user's request, the user's requested data is given from the result of the reasoning and solving, or instructions are sent to the device.
[0014] To further explain, in the first step, the top-level concept layer defines the specific relationships between concepts and concepts, and between concepts and attributes.
[0015] In the fourth step, the user information comes from the form data filled in by the user and is stored in the user information table of the database.
[0016] In the fifth step, the device information is described to establish a mapping method from the device static information to the concept domain, wherein the device static information includes the device model information and the device registration information, which are stored in the device model table and the device registration table respectively; the mapping of the device static information to the concept domain is divided into two steps:
[0017] (1) matching the records in the device model table with the knowledge of the concept abstraction layer to generate an abstract instance; the records in the device model table include the model, manufacturer, status, variables, communication protocol, data format and instruction information of the device, matching the above information with the knowledge of the concept abstraction layer, and forming the triples of <entity, relationship, attribute> as the attributes of the abstract instance, and filling them into the instance information layer of the concept domain to establish an abstract instance;
[0018] (2) Generate a specific instance by matching the records in the device registry with the knowledge of the conceptual abstraction layer; the records in the device registry include the device name, manufacturer, model, and the id and subject assigned to the device. The above information is matched with the knowledge of the conceptual abstraction layer and used as the attributes of the specific instance in the form of <entity, relationship, attribute> triples, which are filled into the instance information layer of the concept domain to establish a specific instance. The specific instance is linked to the abstract instance based on the manufacturer and model information, and one abstract instance can correspond to multiple specific instances.
[0019] To further illustrate, in the sixth step, when the device is connected, the registered topic is used for communication, and the device information in the IoT information concept domain is matched through the topic.
[0020] In the seventh step, the knowledge in the topic matching concept domain is used to parse the message published by the device by analyzing its value, type and semantics, and then the parsed data is mapped to the knowledge of the instance information layer for storage or update.
[0021] To further illustrate, the eighth step autonomously converts the data represented by the IoT information concept domain into a form recognizable by the logic program according to the following mapping paradigm:
[0022] <Head concept, relation, tail concept>->Relation<Concept-Head,Concept-Tail>
[0023] The mapping method defined by the above paradigm is used to convert the triple data of the instance information layer in the IoT information concept domain into facts of the fact file, wherein the relationship in the triple corresponds to the Relation of the fact, and the concept corresponds to the Concept; the converted fact file is delivered to the logic program as a known fact, and the logic program performs query and reasoning completion based on the facts; the reasoning completes the implicit relationship between entities and attributes, and between entities through the description of the relationship and the defined rules, and the reasoning and completion information includes the attribute information, environmental information and user authority information of the device; the completion of the device attribute information matches the specific instance with the abstract instance through the model and manufacturer of the device, and completes the attribute relationship of the specific instance of the device; the completion of the environmental information completes the relationship between the environmental entity and the device entity and the relationship between the environmental entity and the variable entity through the location information of the device and the variable information published by the device through the topic; the completion of the user information completes the authority relationship between the user entity and the device entity and the relationship between the user entity and the environmental variable entity through the user-managed area.
[0024] Further explanation, the eighth step logic program judges the user's authority based on the result of the user instruction query reasoning, and if the user has the authority to manage devices and variables, it gives the variable data monitored in the environment or gives instructions for controlling variables and devices, and then publishes them to the topic corresponding to the device.
[0025] Beneficial effects:
[0026] The present invention uses the form of IoT information concept domain to integrate information such as users, devices, and environments, establish multi-dimensional relationships between data, and provide contextual information for a single user instruction, so as to analyze the instruction information from multiple angles and explore hidden meanings. At the same time, compared with traditional access methods, for the data generated by the device, the data can be parsed using the publish-subscribe topic, and through the method of reasoning, the single device data can be linked to the basic information of the device, the current user, and the environment. This method realizes the semantic attachment of device data, thereby shielding the heterogeneity and isolation of the data, and further supports the establishment of a unified interface to provide services to the outside world. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 The overall schematic diagram of the semantic control method of IoT devices for publish-subscribe mode
[0028] Figure 2 Flowchart for device registration of the present invention.
[0029] Figure 3 The flowchart of the execution of the data request of the present invention. DETAILED DESCRIPTION
[0030] The concept, specific structure and technical effects of the present invention will be clearly and completely described below in conjunction with specific embodiments and the accompanying drawings. It should be understood that the specific embodiments described herein are not only used to explain the invention patent, but also to elaborate on the technical solutions and technical processes involved in the invention patent, so as to fully illustrate the purpose, solution and effects of the present invention, and should not be construed as a limitation to this patent.
[0031] Embodiment 1 A system constructed by a semantic control method for Internet of Things devices oriented to the publish-subscribe mode of the present invention
[0032] The overall schematic diagram of a system constructed by a semantic control method for Internet of Things devices oriented to the publish-subscribe mode of the present invention is as Figure 1 shown. The entire system includes four parts: the Internet of Things information concept domain, information representation, device access, and fact file. The Internet of Things information concept domain is a collection of Internet of Things information, which divides the knowledge in the Internet of Things information field into a concept abstraction layer and an instance information layer. Information representation is for user and device information. It parses the user information and device static information stored in the database, and then fills these information into the instance information layer of the concept domain in the form of triples as instance data. Device access is that the device directly accesses according to the topic assigned during registration using the publish-subscribe mode protocol or indirectly accesses through a gateway. Each device uses a unique topic as an identifier for communication. The fact file is mapped from the data in the instance information layer of the Internet of Things information concept domain. Through logical program reasoning and solution, the implicit information is converted into explicit facts, and at the same time, it receives data requests and gives corresponding results.
[0033] Embodiment 2 Method for mapping device static information to the concept domain
[0034] To describe device information, a mapping method from device static information to the concept domain needs to be established. The static information of the device includes device model information and device registration information, which are stored in the device model table and the device registration table respectively; the mapping of the device static information to the concept domain is divided into two steps:
[0035] (1) Matching the records in the device model table with the knowledge in the concept abstraction layer to generate abstract instances; the records in the device model table include the device model, manufacturer, status, variables, communication protocol, data format, and instruction information. Matching the above information with the knowledge in the concept abstraction layer and forming a <entity, relationship, attribute> triple as the attributes of the abstract instance, and filling it into the instance information layer of the concept domain to establish abstract instances.
[0036] (2) Generate a specific instance by matching the records in the device registry with the knowledge of the conceptual abstraction layer; the records in the device registry include the device name, manufacturer, model, and the id and subject assigned to the device. The above information is matched with the knowledge of the conceptual abstraction layer and used as the attributes of the specific instance in the form of <entity, relationship, attribute> triples, which are filled into the instance information layer of the concept domain to establish a specific instance. The specific instance is linked to the abstract instance based on the manufacturer and model information, and one abstract instance can correspond to multiple specific instances;
[0037] Example 3: Conversion and reasoning method from IoT information concept domain to fact file
[0038] The data represented by the IoT information concept domain is converted into a form recognizable by the logic program, i.e., the fact file, according to the following mapping paradigm:
[0039] <Head concept, relation, tail concept>->Relation<Concept-Head,Concept-Tail>
[0040] The mapping method defined in the above paradigm is used to convert the triple data of the instance information layer in the IoT information concept domain into facts of the fact file, where the relationship in the triple corresponds to the Relation of the fact and the concept corresponds to the Concept; the converted fact file is delivered to the logic program as a known fact, and the logic program performs query and reasoning completion based on the facts; the reasoning completes the implicit relationship between entities and attributes, and between entities through the description of the relationship and the defined rules, and the reasoning and completion information includes the attribute information, environmental information and user authority information of the device; the completion of the device attribute information matches the specific instance with the abstract instance through the model and manufacturer of the device, and completes the attribute relationship of the specific instance of the device; the completion of the environmental information completes the relationship between the environmental entity and the device entity and the relationship between the environmental entity and the variable entity through the location information of the device and the variable information published by the device through the topic; the completion of the user information completes the authority relationship between the user entity and the device entity and the relationship between the user entity and the environmental variable entity through the user-managed area;
[0041] Embodiment 4: Structure of Logic Program
[0042] The logic program described in this article is used to reason and obtain solutions based on facts and constraints. Common knowledge description and reasoning tools include Clingo, Smodels and Clasp. The logic program used in this article is similar to the Clingo solver developed by Postdam University. The execution of the logic program includes the process of iteratively generating new facts by matching the rule set and the process of generating results by combining constraint reasoning.
[0043] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. 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 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 semantic control method for IoT devices in a publish-subscribe mode is performed in the following steps: The first step is to define the concept domain of IoT information and divide the knowledge in the IoT information field into the concept abstraction layer and the instance information layer; The second step is to use RDF specifications to describe the knowledge of the conceptual abstraction layer, including the ontology concepts, attributes and relationships of devices, users and environments. Among them, concepts are concrete representations of things. Among the attributes, the attributes of the device ontology include device name, id, model, manufacturer, subject, location, status, variables, communication protocol, data format and instructions; the attributes of the user ontology include user name, user id, password, management area and authority; the attributes of the environment ontology include name, id, location and variables; the relationships include entities belonging to concepts, entities owning attributes, user entities managing environment entities, user entities managing device entities, device entities raising or lowering variables and device entities monitoring variables; The third step is to describe the knowledge of the instance information layer in the form of <head concept, relationship, tail concept> triples. The data in the form of triples is stored in the instance information table of the database. The instance information table is divided into three columns, including head concept, relationship and tail concept, and two indexes are established: head concept-relationship-tail concept and relationship-head concept-tail concept. The fourth step is to semantically represent the user information, parse the records of the user information table stored in the database, match the knowledge composition of the top-level concept layer in the form of a <record, relationship, record> triple through the field name, and then correspond the triple to the <head concept, relationship, tail concept> triple, and fill it into the instance information layer of the concept domain as instance data; The fifth step is to semantically represent the device information, parse the static information of the device stored in the database, establish an abstract instance of the device in the IoT information concept domain, and establish a relationship between the device registration information and the abstract instance of the IoT information concept domain, and then map it to a specific instance of the IoT information concept domain; In the sixth step, the device uses the publish-subscribe mode protocol to access directly or indirectly through the gateway. Each device uses a unique topic as an identifier for communication. When the device accesses, it uses the registered topic and then matches the device information in the IoT information concept domain for configuration. Step 7: Subscribe to the topic of the device, parse the message published by the device to the topic through the concepts and relationships of the IoT information concept domain, use the parsed result as the attribute of the IoT information concept domain, match the concepts and relationships in the concept domain, and then store and update it; The eighth step is to autonomously map the data of the instance information layer of the IoT information concept domain into a form recognizable by the logic program, namely the fact file, and combine the fact file with the defined logic rules for reasoning and solving. Finally, according to the user's request, the user's requested data is given from the result of the reasoning and solving, or instructions are sent to the device.
2. According to claim 1, a method for semantic control of IoT devices in a publish-subscribe mode, It is characterized in that In the first step, the top-level concept layer defines the specific relationships between concepts and concepts, and between concepts and attributes.
3. A semantic control method for Internet of Things devices oriented to the publish-subscribe model according to claim 1, characterized in that, in the fourth step, the user information comes from the form data filled in by the user and is stored in the user information table of the database.
4. A semantic control method for Internet of Things devices oriented to the publish-subscribe model according to claim 1, characterized in that, in the fifth step, to describe the device information, a mapping method from device static information to the concept domain needs to be established. The device static information includes device model information and device registration information, which are respectively stored in the device model table and the device registration table; the mapping from the device static information to the concept domain is divided into two steps: 1) Matching the records in the device model table with the knowledge in the concept abstraction layer to generate abstract instances; the records in the device model table include the model, manufacturer, status, variables, communication protocol, data format, and instruction information of the device. Matching the above information with the knowledge in the concept abstraction layer and forming <entity, relationship, attribute> triples as the attributes of the abstract instance, and filling them into the instance information layer of the concept domain to establish abstract instances; 2) Matching the records in the device registration table with the knowledge in the concept abstraction layer to generate specific instances; the records in the device registration table include the device name, manufacturer, model of the device, and the id and topic assigned to the device. Matching the above information with the knowledge in the concept abstraction layer and forming <entity, relationship, attribute> triples as the attributes of the specific instance, and filling them into the instance information layer of the concept domain to establish specific instances.
5. A semantic control method for Internet of Things devices oriented to the publish-subscribe model according to claim 1, characterized in that, when the device is accessed in the sixth step, the registered topic is used for communication, and the device information in the Internet of Things information concept domain is matched through the topic.
6. A semantic control method for Internet of Things devices oriented to the publish-subscribe model according to claim 1, characterized in that, in the seventh step, the knowledge in the concept domain is matched through the topic, and the messages sent by the device are parsed by analyzing their values, types, and semantics, and then the parsed data is mapped to the knowledge in the instance information layer for storage or update.
7. A semantic control method for Internet of Things devices oriented to the publish-subscribe model according to claim 1, characterized in that, in the eighth step, the data represented by the Internet of Things information concept domain is autonomously converted into a form recognizable by a logic program according to the following mapping paradigm: <head concept, relationship, tail concept> -> Relation<Concept-Head,Concept-Tail> The mapping method defined by the above paradigm is used to convert the triple data of the instance information layer in the IoT information concept domain into facts of the fact file, wherein the relationship in the triple corresponds to the Relation of the fact, and the concept corresponds to the Concept; the converted fact file is delivered to the logic program as a known fact, and the logic program performs query and reasoning completion based on the facts; the reasoning completes the implicit relationship between entities and attributes, and between entities through the description of the relationship and the defined rules, and the reasoning and completion information includes the attribute information, environmental information and user authority information of the device; the completion of the device attribute information matches the specific instance with the abstract instance through the model and manufacturer of the device, and completes the attribute relationship of the specific instance of the device; the completion of the environmental information completes the relationship between the environmental entity and the device entity and the relationship between the environmental entity and the variable entity through the location information of the device and the variable information published by the device through the topic; the completion of the user information completes the authority relationship between the user entity and the device entity and the relationship between the user entity and the environmental variable entity through the user-managed area.
8. The method for semantic control of IoT devices in a publish-subscribe mode according to claim 1, It is characterized in that The eighth step logic program determines the user's authority based on the result of the user instruction query reasoning. If the user has the authority to manage devices and variables, it gives the variable data monitored in the environment or gives instructions for controlling variables and devices, and then publishes them to the topic corresponding to the device.
Citation Information
Patent Citations
Optimization method for constructing semantic model in Internet of Things edge equipment
CN112464672A
Space-time knowledge graph construction system and method oriented to dynamic analysis
CN114860884A