A method and apparatus for spatial semantic association of digital twin devices in an Internet of Things (IoT) scenario

By constructing attribute triples and membership functions for sensing devices and combining them with rule engine technology, the problem of determining device relationships in IoT platforms has been solved, enabling efficient and flexible association and data extraction between devices.

CN115834632BActive Publication Date: 2026-11-17BEIJING UNIV OF POSTS & TELECOMM
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211510956.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-29
Publication Date
2026-11-17
Estimated Expiration
2042-11-29

AI Technical Summary

Technical Problem

Existing IoT platforms struggle to accurately determine the strength of relationships between devices, making it difficult to extract the necessary monitoring data.

Method used

By constructing attribute triples for sensing devices, setting first and second thresholds, calculating membership functions and correlations, determining the strength of the association between devices, and using rule engine technology to achieve automatic device association.

Benefits of technology

Accurate extraction of the required monitoring data enhances the intelligent prediction capabilities of the IoT platform, enabling flexible association between devices and efficient data extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115834632B_ABST
    Figure CN115834632B_ABST
Patent Text Reader

Abstract

This invention provides a method and apparatus for spatial semantic association of digital twin devices in an Internet of Things (IoT) scenario. The method includes: constructing attribute triples for each attribute of the sensing device based on preset attribute information of the sensing device; the attributes of the sensing device include location attribute, sensing range attribute, and spatial attribute; each of the location attribute, sensing range attribute, and spatial attribute is set with a first threshold and a second threshold; determining the related sensing device set for each sensing device based on the attribute parameters in the attribute triples of each attribute and the first threshold of each attribute; calculating the membership function of each attribute between the sensing device and any sensing device in the related sensing device set based on the first threshold and the second threshold of each attribute; calculating the correlation between the two sensing devices based on the membership function of each attribute between the sensing device and any sensing device; and sorting the sensing devices in the related sensing device set corresponding to the sensing device based on the correlation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet of Things (IoT) technology, and in particular to a method and apparatus for spatial semantic association of digital twin devices in IoT scenarios. Background Technology

[0002] The Internet of Things (IoT) is another innovation following the Internet. It is generally defined as a network that connects the Internet and devices by sensing them through data. The development of IoT has brought tremendous impact and changes to global technological and economic development. Currently, my country's IoT industry has initially formed a system and has been applied in various industries.

[0003] The Internet of Things (IoT) is generally divided into a three-layer architecture: the sensing layer, the transmission layer, and the application layer. The sensing layer collects data through physical devices to identify and perceive the external world and is considered the foundation of the IoT. The data transmission layer transmits data to the application layer via network protocols. The application layer uses relevant platform technologies to parse and process the data to achieve the purpose of monitoring or controlling devices.

[0004] Traditional IoT platforms typically display sensor data from one or more devices or allow users to control a device. With the emergence of concepts like digital twin cities, higher demands are placed on IoT platforms. Digital twin cities represent an innovative transformation in modern urban governance. All elements of the physical world—people, places, things, events, situations, and organizations—are virtualized in the digital world using digital twin technology, achieving a fusion of physical and digital elements and intelligent interaction. In the real physical world, IoT devices are not independent; an event can trigger responses from multiple devices. IoT platforms typically use device linkage to represent this event information. For example, when a fire occurs in a certain area, the platform doesn't simply display the alarm status of the fire alarms; instead, it can proactively search for various nearby monitoring devices. This greatly helps managers quickly grasp the current situation in the fire area and improves the platform's intelligent predictive capabilities.

[0005] However, in the current Internet of Things (IoT) technology, it is difficult to determine the strength of the relationship between devices and to accurately extract the required monitoring data. Summary of the Invention

[0006] In view of this, embodiments of the present invention provide a method and apparatus for spatial semantic association of digital twin devices in an Internet of Things (IoT) scenario, in order to eliminate or improve one or more defects existing in the prior art.

[0007] One aspect of the present invention provides a method and apparatus for spatial semantic association of digital twin devices in an Internet of Things (IoT) scenario. The method is applied in an IoT environment including multiple sensing devices, and the method includes the following steps: Based on the preset attribute information of the sensing device, an attribute triplet for each attribute of the sensing device is constructed. The attributes of the sensing device include location attribute, sensing range attribute and spatial attribute. The location attribute, sensing range attribute, and spatial attribute are all set with a first threshold. Based on the attribute parameters in the attribute triplet of each attribute of the sensing device and the first threshold of each attribute, the relevant set of sensing devices for each sensing device is determined. The relevant set of sensing devices for each sensing device includes sensing devices that are related to that sensing device. The location attribute, sensing range attribute, and spatial attribute are all provided with a second threshold. The membership function of each attribute of the sensing device and any sensing device in the set of related sensing devices is calculated based on the first threshold and the second threshold of each attribute. The correlation between two sensors is calculated based on the membership function of each attribute of the sensor and any other sensor, and the sensors in the set of related sensors corresponding to the sensor are sorted based on the correlation.

[0008] Using the above scheme, this scheme first determines the sensing devices that are related to the sensing devices based on various attributes of the sensing devices and a first threshold, and constructs a set of related sensing devices. Then, based on the first threshold and the second threshold, it calculates the correlation between the sensing devices and any sensing device in the set of related sensing devices. This scheme judges the strength of the relationship between devices by the correlation. A high correlation indicates a strong relationship, and the required monitoring data can be accurately extracted through the correlation.

[0009] In some embodiments of the present invention, the attributes of the sensing device include location attributes, sensing range attributes, and spatial attributes. The triplet data of the location attribute of the sensing device includes the device name, attribute name, and location coordinates; the triplet data of the sensing range attribute of the sensing device includes the device name, attribute name, and sensing range; and the triplet data of the spatial attribute of the sensing device includes the device name, attribute name, and the spatial range in which the device is located.

[0010] In some embodiments of the present invention, the step of determining the relevant set of sensing devices for each sensing device based on the attribute parameters in the attribute triplet of each attribute of the sensing device and the first threshold of each attribute is as follows: The first threshold of the spatial attribute is the first spatial threshold. Based on the triplet data of the spatial attribute of the sensing device, the distance between the spatial range of the sensing device and the spatial range of any other sensing device is calculated. Sensing devices whose distance is less than the first spatial threshold are included in the first pre-selected sensing device set. The first threshold of the location attribute is the first location threshold. Based on the triplet data of the location attribute of the sensing device, the distance between the location coordinates of the sensing device and the location coordinates of any sensing device in the first pre-selected sensing device set is calculated. Sensing devices whose distance is less than the first location threshold are included in the second pre-selected sensing device set. The first threshold of the sensing range attribute is the first sensing threshold. Based on the triplet data of the sensing range attribute of the sensing device, the overlapping volume of the sensing range of the sensing device and the sensing range of any sensing device in the second pre-selected sensing device set is calculated. If the overlapping volume is greater than the first sensing threshold, the sensing devices whose overlapping volume with the sensing range of the sensing device is greater than the first sensing threshold are included in the relevant sensing device set.

[0011] In some embodiments of the present invention, in the step of calculating the distance between the spatial range of the sensing device and the spatial range of any other sensing device based on the triplet data of the spatial attributes of the sensing device, each spatial range is provided with a reference point, and the distance between the reference points is calculated; in the step of calculating the distance between the position coordinates of the sensing device and the position coordinates of any sensing device in the first pre-selected set of sensing devices based on the triplet data of the position attributes of the sensing device, the distance between the position coordinates of every two sensing devices is calculated; in the step of calculating the overlapping volume of the sensing range of the sensing device and the sensing range of any sensing device in the second pre-selected set of sensing devices based on the triplet data of the sensing range attributes of the sensing device, the sensing range type of the sensing device is a three-dimensional graphic range, including spheres and cones, and the overlapping volume parameter of the three-dimensional graphic range between the two sensing devices is output.

[0012] In some embodiments of the present invention, in the step of calculating the membership function of each attribute of the sensing device and any sensing device in the set of related sensing devices based on a first threshold and a second threshold for each attribute, If the attribute of the sensing device is a spatial attribute, then if the distance between the spatial range where the sensing device is located and the spatial range where any other sensing device is located is greater than or equal to a first spatial threshold, then the membership function value is 0; the second threshold of the spatial attribute is a second spatial threshold, and if the distance between the spatial range where the sensing device is located and the spatial range where any other sensing device is located is less than the second spatial threshold, then the membership function value is 1. If the attribute of the sensing device is a position attribute, then if the distance between the position coordinates of the sensing device and the position coordinates of any sensing device in the first pre-selected sensing device set is greater than or equal to a first position threshold, then the membership function value is 0; the second threshold of the position attribute is a second position threshold, and if the distance between the position coordinates of the sensing device and the position coordinates of any sensing device in the first pre-selected sensing device set is less than a second spatial threshold, then the membership function value is 1.

[0013] In some embodiments of the present invention, in the step of calculating the membership function of each attribute of the sensing device and any sensing device in the set of related sensing devices based on a first threshold and a second threshold for each attribute, If the attribute of the sensing device is a sensing range attribute, then if the overlapping volume of the sensing range of the sensing device and the sensing range of any sensing device in the second pre-selected sensing device set is less than or equal to the first sensing threshold, then the membership function value is 0; the second threshold of the sensing range attribute is a second sensing threshold, and if the overlapping volume of the sensing range of the sensing device and the sensing range of any sensing device in the second pre-selected sensing device set is greater than the second spatial threshold, then the membership function value is 1.

[0014] In some embodiments of the present invention, if the attribute of the sensing device is a spatial attribute, then if the distance between the spatial range where the sensing device is located and the spatial range where any other sensing device is located is less than a first spatial threshold and greater than or equal to a second spatial threshold, then the membership function is calculated based on the following formula: in, The membership function value represents the spatial attribute. Indicates the first spatial threshold. Indicates the second spatial threshold. It indicates the distance between the spatial range of the sensing device and the spatial range of any other sensing device; If the attribute of the sensing device is a position attribute, then if the distance between the position coordinates of the sensing device and the position coordinates of any sensing device in the first pre-selected set of sensing devices is less than a first position threshold and greater than or equal to a second position threshold, then the membership function is calculated based on the following formula: in, This represents the membership function value of the position attribute. Indicates the first position threshold. This indicates the second position threshold. This represents the distance between the position coordinates of the sensing device and the position coordinates of any sensing device in the first pre-selected set of sensing devices.

[0015] In some embodiments of the present invention, if the attribute of the sensing device is a sensing range attribute, then if the overlapping volume of the sensing range of the sensing device and the sensing range of any sensing device in the second pre-selected set of sensing devices is greater than a first sensing threshold and less than or equal to a second sensing threshold, then the membership function is calculated based on the following formula: in, The membership function value represents the perception range attribute. Indicates the first perception threshold. This represents the second perception threshold. This represents the volume of overlap between the sensing range of the sensing device and the sensing range of any sensing device in the second pre-selected set of sensing devices.

[0016] In some embodiments of the present invention, in the step of calculating the correlation between two sensing devices based on the membership function of each attribute of the sensing device and any other sensing device, the correlation between the two sensing devices is calculated according to the following formula: in, Indicates the correlation between two sensing devices. n This represents multiple attributes of the sensing device. i It represents any one of the multiple attributes of a sensing device. express i The membership function value of an attribute. express i The default weight value of the attribute.

[0017] Additional advantages, objects, and features of the invention will be set forth in part in the description which follows, and will also become apparent in part to those skilled in the art upon studying the text, or may be learned by practice of the invention. The objects and other advantages of the invention will become apparent from the description and the accompanying drawings.

[0018] Those skilled in the art will understand that the objectives and advantages achievable with the present invention are not limited to those specifically described above, and that the above and other objectives achievable with the present invention will become clearer from the following detailed description. Attached Figure Description

[0019] The accompanying drawings, which are provided to further illustrate the invention and form part of this application, are not intended to limit the scope of the invention.

[0020] Figure 1 This is a schematic diagram illustrating one implementation of the spatial semantic association method for digital twin devices in an Internet of Things (IoT) scenario according to the present invention. Figure 2This is a schematic diagram of the structure of a spatial semantic association network; Figure 3 This is a schematic diagram of the spatial semantic index structure. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. Here, the illustrative embodiments and descriptions of this invention are used to explain the invention, but are not intended to limit the invention.

[0022] It should also be noted that, in order to avoid obscuring the invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.

[0023] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.

[0024] It should also be noted that, unless otherwise specified, the term "connection" in this article can refer not only to a direct connection, but also to an indirect connection involving an intermediary.

[0025] In the following description, embodiments of the invention will be illustrated with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar parts, or the same or similar steps.

[0026] like Figure 1 As shown, one aspect of the present invention provides a method and apparatus for spatial semantic association of digital twin devices in an Internet of Things (IoT) scenario. The method is applied in an IoT environment, which includes multiple sensing devices, and includes the following steps: Step S100: Based on the preset attribute information of the sensing device, construct an attribute triplet for each attribute of the sensing device. The attributes of the sensing device include location attribute, sensing range attribute, and spatial attribute. In practice, the sensing device can be a camera, temperature sensor, humidity sensor, or carbon dioxide concentration sensor, etc.

[0027] In some embodiments of the present invention, the location attribute is used to indicate the location of the sensing device, the sensing range attribute is used to indicate the range that the sensing device can perceive, and the spatial attribute is used to indicate the range of the space in which the sensing device is located. The space in which the sensing device is located can be a room, a floor, or a building, etc.

[0028] Step S200: The location attribute, sensing range attribute and spatial attribute are all set with a first threshold. Based on the attribute parameters in the attribute triplet of each attribute of the sensing device and the first threshold of each attribute, the related sensing device set of each sensing device is determined. The related sensing device set of each sensing device includes sensing devices that are related to the sensing device. In some embodiments of the present invention, the sensing device that is related to the sensing device may be a sensing device that is close to the sensing device, a sensing device that is in the same space as the sensing device, a sensing device that is close to the sensing device in a spatial range, or a sensing device whose sensing range overlaps with that of the sensing device.

[0029] Step S300: The location attribute, sensing range attribute, and spatial attribute are all further provided with a second threshold. Based on the first threshold and the second threshold of each attribute, the membership function of each attribute of the sensing device and any sensing device in the set of related sensing devices is calculated. Step S400: Calculate the correlation between two sensing devices based on the membership function of each attribute of the sensing device and any other sensing device, and sort the sensing devices in the set of related sensing devices corresponding to the sensing device based on the correlation.

[0030] In the specific implementation process, each sensor in the set of related sensors corresponding to the sensing device is related to that sensing device. The sensing devices are sorted by correlation. When it is necessary to extract the data of a sensor device that is related to the data of a sensor device, the data of the sensor device with higher correlation can be extracted first. For example, when it is necessary to extract the data related to the camera in the event of a fire, the data of the sensor device with higher correlation, such as the data of the related temperature sensor, can be extracted first.

[0031] Using the above scheme, this scheme first determines the sensing devices that are related to the sensing devices based on various attributes of the sensing devices and a first threshold, and constructs a set of related sensing devices. Then, based on the first threshold and the second threshold, it calculates the correlation between the sensing devices and any sensing device in the set of related sensing devices. This scheme judges the strength of the relationship between devices by the correlation. A high correlation indicates a strong relationship, and the required monitoring data can be accurately extracted through the correlation.

[0032] In some embodiments of the present invention, the attributes of the sensing device include location attributes, sensing range attributes, and spatial attributes. The triplet data of the location attribute of the sensing device includes the device name, attribute name, and location coordinates; the triplet data of the sensing range attribute of the sensing device includes the device name, attribute name, and sensing range; and the triplet data of the spatial attribute of the sensing device includes the device name, attribute name, and the spatial range in which the device is located.

[0033] In some embodiments of the present invention, the position coordinates are three-dimensional point coordinates; the sensing range can be a cone or a sphere. In specific implementation, the sensing range of the camera is a cone with the camera's position coordinates as the apex of the cone, and the sensing range of the temperature sensor or humidity sensor is a sphere with the position coordinates as the center; the spatial range is the range of the space in which the camera is located, such as the internal space range of a room.

[0034] In the specific implementation process, the size, shape and position of the sphere or cone are all preset.

[0035] In some embodiments of the present invention, the step of determining the relevant set of sensing devices for each sensing device based on the attribute parameters in the attribute triplet of each attribute of the sensing device and the first threshold of each attribute is as follows: The first threshold of the spatial attribute is the first spatial threshold. Based on the triplet data of the spatial attribute of the sensing device, the distance between the spatial range of the sensing device and the spatial range of any other sensing device is calculated. Sensing devices whose distance is less than the first spatial threshold are included in the first pre-selected sensing device set. The first threshold of the location attribute is the first location threshold. Based on the triplet data of the location attribute of the sensing device, the distance between the location coordinates of the sensing device and the location coordinates of any sensing device in the first pre-selected sensing device set is calculated. Sensing devices whose distance is less than the first location threshold are included in the second pre-selected sensing device set. The first threshold of the sensing range attribute is the first sensing threshold. Based on the triplet data of the sensing range attribute of the sensing device, the overlapping volume of the sensing range of the sensing device and the sensing range of any sensing device in the second pre-selected sensing device set is calculated. If the overlapping volume is greater than the first sensing threshold, the sensing devices whose overlapping volume with the sensing range of the sensing device is greater than the first sensing threshold are included in the relevant sensing device set.

[0036] In some embodiments of the present invention, in the step of calculating the distance between the spatial range of the sensing device and the spatial range of any other sensing device based on the triplet data of the spatial attributes of the sensing device, each spatial range is provided with a reference point, and the distance between the reference points is calculated; in the step of calculating the distance between the position coordinates of the sensing device and the position coordinates of any sensing device in the first pre-selected set of sensing devices based on the triplet data of the position attributes of the sensing device, the distance between the position coordinates of every two sensing devices is calculated; in the step of calculating the overlapping volume of the sensing range of the sensing device and the sensing range of any sensing device in the second pre-selected set of sensing devices based on the triplet data of the sensing range attributes of the sensing device, the sensing range type of the sensing device is a three-dimensional graphic range, including spheres and cones, and the overlapping volume parameter of the three-dimensional graphic range between the two sensing devices is output.

[0037] In the specific implementation process, the reference point is a three-dimensional coordinate point, and the overlapping volume of the sensing range can be obtained by pre-modeling and software calculation. In the specific implementation process, it can be calculated by the open-source algorithm in the geos library.

[0038] In some embodiments of the present invention, in the step of calculating the membership function of each attribute of the sensing device and any sensing device in the set of related sensing devices based on a first threshold and a second threshold for each attribute, If the attribute of the sensing device is a spatial attribute, then if the distance between the spatial range where the sensing device is located and the spatial range where any other sensing device is located is greater than or equal to a first spatial threshold, then the membership function value is 0; the second threshold of the spatial attribute is a second spatial threshold, and if the distance between the spatial range where the sensing device is located and the spatial range where any other sensing device is located is less than the second spatial threshold, then the membership function value is 1. If the attribute of the sensing device is a position attribute, then if the distance between the position coordinates of the sensing device and the position coordinates of any sensing device in the first pre-selected sensing device set is greater than or equal to a first position threshold, then the membership function value is 0; the second threshold of the position attribute is a second position threshold, and if the distance between the position coordinates of the sensing device and the position coordinates of any sensing device in the first pre-selected sensing device set is less than a second spatial threshold, then the membership function value is 1.

[0039] In some embodiments of the present invention, in the step of calculating the membership function of each attribute of the sensing device and any sensing device in the set of related sensing devices based on a first threshold and a second threshold for each attribute, If the attribute of the sensing device is a sensing range attribute, then if the overlapping volume of the sensing range of the sensing device and the sensing range of any sensing device in the second pre-selected sensing device set is less than or equal to the first sensing threshold, then the membership function value is 0; the second threshold of the sensing range attribute is a second sensing threshold, and if the overlapping volume of the sensing range of the sensing device and the sensing range of any sensing device in the second pre-selected sensing device set is greater than the second spatial threshold, then the membership function value is 1.

[0040] In some embodiments of the present invention, if the attribute of the sensing device is a spatial attribute, then if the distance between the spatial range where the sensing device is located and the spatial range where any other sensing device is located is less than a first spatial threshold and greater than or equal to a second spatial threshold, then the membership function is calculated based on the following formula: in, The membership function value represents the spatial attribute. Indicates the first spatial threshold. Indicates the second spatial threshold. It indicates the distance between the spatial range of the sensing device and the spatial range of any other sensing device; If the attribute of the sensing device is a position attribute, then if the distance between the position coordinates of the sensing device and the position coordinates of any sensing device in the first pre-selected set of sensing devices is less than a first position threshold and greater than or equal to a second position threshold, then the membership function is calculated based on the following formula: in, This represents the membership function value of the position attribute. Indicates the first position threshold. This indicates the second position threshold. This represents the distance between the position coordinates of the sensing device and the position coordinates of any sensing device in the first pre-selected set of sensing devices.

[0041] In some embodiments of the present invention, if the attribute of the sensing device is a sensing range attribute, then if the overlapping volume of the sensing range of the sensing device and the sensing range of any sensing device in the second pre-selected set of sensing devices is greater than a first sensing threshold and less than or equal to a second sensing threshold, then the membership function is calculated based on the following formula: in, The membership function value represents the perception range attribute. Indicates the first perception threshold. This represents the second perception threshold. This represents the volume of overlap between the sensing range of the sensing device and the sensing range of any sensing device in the second pre-selected set of sensing devices.

[0042] Using the above scheme, the membership function value corresponding to each attribute in the two sensing devices can be accurately calculated, which facilitates further calculation of the correlation.

[0043] In some embodiments of the present invention, in the step of calculating the correlation between two sensing devices based on the membership function of each attribute of the sensing device and any other sensing device, the correlation between the two sensing devices is calculated according to the following formula: in, Indicates the correlation between two sensing devices. n This represents multiple attributes of the sensing device. i It represents any one of the multiple attributes of a sensing device. express i The membership function value of an attribute. express i The default weight value of the attribute.

[0044] By employing the above scheme, the correlation between two sensing devices is accurately calculated. This scheme can associate IoT devices based on their spatial semantic information and dynamically assemble their digital models during the operation of the IoT platform. This enables devices that meet certain constraints to interact, achieving real-time reflection of the physical world. Furthermore, the platform has flexible scalability, allowing administrators to add or remove attributes according to actual needs and define association rules between devices independently.

[0045] This solution utilizes rule engine technology to achieve automatic association between devices and separate association operations from other business processes, resulting in greater system flexibility and scalability. Rule engine technology originated from expert systems and, based on knowledge representation and reasoning techniques, is widely used in fields such as chemical mass spectrometry analysis and medical diagnostics. Essentially, a rule engine performs pattern matching. It first receives factual data from external sources through a data access module, then matches the factual data against predefined rules, and finally performs corresponding actions based on the matching results. A rule engine mainly consists of three parts: a rule base, working memory, and an inference engine. The inference engine is the core component and is primarily divided into three categories: forward inference, backward inference, and hybrid inference. Forward inference is data-driven; it initiates the matching process based on the input data. If the rules are met, the match is successful, and the inference result is obtained. Backward inference is goal-driven; it starts from the conclusion and searches for rules and factual data that satisfy that conclusion. If all conditions are met, the conclusion is considered successfully matched. Hybrid reasoning combines multiple reasoning engines. For example, the Apache Jena framework uses a combination of forward and backward reasoning. Forward reasoning is mainly used to infer new knowledge from factual data, while backward reasoning is used for data querying.

[0046] Rules in a rule engine are generally represented by production rules of the form "if...then...", meaning that if a premise is satisfied, a new conclusion is derived. For example, A1, A2, ..., An ----> A means that if A1~An are all satisfied, a conclusion can be derived. Here, A1~An are the premises of the rule, called the LHS (Left-Hand Side), and A is the conclusion of the rule, called the RHS (Right-Hand Side). Each A in the LHS is called a schema. The fact data in a rule engine is also called working memory, and each fact is called a WME (Working Memory Element). Since a schema is a conceptual abstraction of fact data used to match fact data, a schema can include variables, but a WME can only include constants.

[0047] A simple implementation of an inference engine involves checking each rule against all factual data to see if it meets the rule's conditions. If a rule is met, it is activated, and the process moves to the next rule. However, this matching method is extremely inefficient when dealing with a large number of rules or a large volume of factual data.

[0048] Traditional inference engines typically employ a full-match process, meaning a rule is only activated when the factual data perfectly matches all patterns of the LHS (Local Hierarchical Structure) rule. This matching algorithm is unsuitable for scenarios involving device association in IoT platforms, which involve numerous uncertain rules. Consider a scenario involving the linkage of an alarm and a camera. When a fire alarm sounds, it automatically searches for cameras that are close to the alarm and have overlapping sensing ranges, then plays live monitoring footage. This helps management quickly assess the fire's development. However, when defining spatial constraints for the association between the alarm and the camera, the conditions of "close proximity" and "overlapping sensing ranges" are inherently ambiguous, making it difficult to set reasonable thresholds for "distance" or "overlapping sensing range area." Even if we define a distance threshold, considering devices "close" when the distance is less than this threshold, a full-match inference engine would conclude that the two devices are completely unrelated when the distance is only slightly greater than the threshold—clearly not meeting practical requirements. When applying existing inference engines to scenarios involving IoT devices, the sheer number of devices results in a massive amount of factual data. Therefore, simply iterating and matching rules against the factual data is inefficient and cannot meet practical needs. Furthermore, most existing inference engines use exact matching algorithms, which cannot effectively handle the fuzzy spatial constraints of IoT scenarios.

[0049] To address the inefficiency of traditional inference engines, this invention enables the association of large-scale devices in IoT scenarios. The proposed device spatial semantic association method mainly includes three steps: constructing a spatial semantic association network, establishing a spatial semantic index for IoT device data, and matching device data.

[0050] First, a spatial semantic association network is constructed based on the rule base. A rule is a spatial constraint that two devices must satisfy to be associated with each other, consisting of two parts: conditions and conclusions. Conditions can be further divided into multiple patterns; a device's data satisfies all patterns to be considered to satisfy the rule's conditions. Since devices are paired, a constraint requires two patterns to represent it, each responsible for matching the data of one of the devices. For example, a rule that establishes an association when two devices are "located in the same room" can be represented as (d1 in_room r)(d2 in_room r). Here, d1 and d2 indicate that they are used to match two different devices, r indicates that the room information of the two devices must be the same, and in_room is the attribute name to be matched; a match will only succeed if the device data represents a room attribute. Multiple device association rules may share the same constraints. For example, one rule might associate two devices when they are "located in the same room" and "close in distance," while another rule might associate them when they are "located in the same room" and "have overlapping sensing ranges." Here, "located in the same room" is a constraint present in both rules. By sharing nodes in the spatial semantic association network, duplicate matching of the same constraint for device data can be avoided. The spatial semantic association network is mainly divided into two sub-networks. The first sub-network is called the Alpha network, where Alpha nodes are used for filtering device attributes. For example, the constraint "located in the same room" requires filtering the attribute name "in_room" to obtain the room information where the device is located. To avoid re-traversing all device information when a new rule is added, intermediate matching states—that is, device data filtered by the Alpha node—can be saved and added to the corresponding Alpha memory node. Another sub-network is called the Beta network. The join node in this network is used to determine the spatial relationship between two devices based on their attribute values, such as the "located in the same room" condition mentioned above. When the room information of two devices is propagated to the Beta sub-network, the join node determines whether their rooms are the same. If they are, the match is successful, the intermediate state is saved, and the data is added to the corresponding Beta memory node. Finally, a P node is set to store the final result of the device association.

[0051] After constructing the spatial semantic association network, the next step is to input device data into the network and begin data matching. In the IoT platform, devices are typically represented as structures, including attributes such as device identifier, device type, and spatial location information. Since each node in the association network corresponds to one or more patterns in the rules, and patterns are represented in triple form, the structure needs to be converted into a triple of (device, attr, val) form before inputting device data into the association network. Here, device is the device identifier, attr is the attribute name, and val is the attribute value. Because the factual data in the rule engine is stored in working memory, such a triple is called a WME (working memory element). When device data propagates to a network node, that node is said to be activated. Alpha nodes are single-input nodes, which can only be activated by WMEs and then match the device attribute names within them. If a match is successful, it propagates to the corresponding Alpha memory node. Join nodes are double-input nodes, corresponding to a specific pattern. The left input is the device data of all patterns that have satisfied the previous pattern, called a token, which can be represented as a list of WMEs; the right input is the WME that satisfies the current pattern. The join node is responsible for two tasks. First, it binds device identifiers to ensure that the device data propagated backwards only includes two specific devices. Second, it calculates the degree to which the spatial semantic relationship between the devices satisfies the constraints based on their attribute values, and then combines the token and WME into a new token and propagates it backwards to the corresponding Beta memory node.

[0052] One purpose of constructing a spatial semantic association network is to store intermediate matching states of corresponding patterns in memory nodes to avoid duplicate matching. When a join node is activated left by a token, it searches for the WME propagated to the predecessor's Alpha memory for the next matching step; similarly, when a join node is activated right by a WME, it searches for the token propagated to the predecessor's Beta memory for the next matching step. This search is a simple traversal process, which can be time-consuming when the number of devices is large. By indexing the data propagated to memory nodes, the search efficiency during the matching process can be greatly improved. Considering that this method is used for spatial semantic association of devices, the best choice is to build a spatial semantic index. In modern architectural design and construction, Building Information Modeling (BIM) is widely used to manage building data. This method uses the BIM model as the data source for building the spatial index. Although the BIM model contains relatively complete spatial semantic information, the geometric representation of each building component is not uniform, and it uses local coordinates instead of world coordinates for the entire space, so it cannot be directly used for indexing. CityGML is a widely used geographic information modeling standard. It contains rich semantic information, such as objects like buildings, floors, and rooms, and uses spatial boundary models and absolute coordinates to represent geometric information. Therefore, this method converts the BIM model into a CityGML file and parses the CityGML file to finally build a spatial semantic index of the equipment.

[0053] A bottom-up approach is used to construct the spatial semantic association network. First, an empty node `Root` is created as the root node of the network, serving as the entry point for all device data entering the network. An empty node `BetaRoot` is created as the root node of the Beta network. Then, the rules in the association rule base are traversed. The processing steps for each rule are as follows: 1. Set curNode to point to Beta Root. Set the variable to point to the currently processed mode, with the initial value being the first mode in the preconditions; 2. Find or create a Beta memory node: First, traverse the successor nodes of curNode. If a node of type Beta memory node is found, it is used as the Beta memory node of pattern C. Otherwise, a new Beta memory node is created and added to the successor nodes of curNode. 3. Find or create an Alpha memory node: Traverse all successor nodes of the Root node. If there is an Alpha node whose attribute name matches the attribute name of pattern C, then its successor Alpha memory node is used as the Alpha memory of C. If there is no such node, create an Alpha node to match the attribute name in pattern C and add it to the successor node of the Root. Then create an Alpha memory node and add it to the successor node of this Alpha node. 4. Find or create a join node: Traverse all successor nodes in the Beta memory of section 2. If a join node exists in which a node in the Alpha memory of section 3 is a predecessor node, then this node is used as the join node of C; otherwise, create a new join node and add it to the successor nodes of both the Beta memory of section 2 and the Alpha memory of section 3. 5. Set curNode to point to the join node in step 4, and C to point to the next pattern in the rule conditions. Repeat steps 2 to 4. 6. After processing all the patterns of the rules, create a new node and use it as the successor node of curNode.

[0054] Taking the constraint "two devices are located in the same room" as an example, pattern C1 is (device in_room r), pattern C2 is (device in_room r), and the constructed spatial semantic association network is as follows: Figure 2 , 3 As shown.

[0055] First, use Autodesk Revit software to create a BIM model of the building and export it as an IFC format file; Then, FME Desktop was used to convert the IFC file into a CityGML file: a data input module was written to read and parse the IFC model file and extract the building components; a data conversion module was written to obtain objects that conform to the CityGML specification; and an output module was written to obtain the final CityGML file.

[0056] Finally, the CityGML file is parsed to construct the spatial index of WME and token.

[0057] The spatial index is a tree structure. The root node represents the top-level spatial object, such as a town or city; the second level represents buildings; the third level represents floors; the fourth level represents objects such as rooms and corridors within a floor; and the fifth level is the leaf node, which stores all WMEs and tokens.

[0058] In the specific implementation process, the device structure is converted into a WME in the form of (device, attr, val). The WME is added to the spatial semantic index node corresponding to the region where the device is located, and all subsequent Alpha nodes of the Alpha Root are activated. When an Alpha node is activated by a WME, the WME is filtered by device attribute name, and the filtered WME is used to activate the subsequent Alpha memory node. When an Alpha memory node is activated by a WME, the identification information of this memory node is added to this WME, and the WME is used to activate the subsequent join node. When a Beta memory node is activated by a token, the identification information of this node is added to this token, and the subsequent join node is activated. When a join node is right-activated by a WME, assuming its predecessor Beta memory node is BM, the spatial semantic index searches for a token containing the BM identifier based on the device identifier of this WME, and then proceeds to the next matching step. When a join node is left-activated by a token, assuming its predecessor Alpha memory node is AM, the spatial semantic index searches for a WME containing the AM identifier based on the device identifier in the last WME of this token, and then proceeds to the next matching step. If the join node corresponds to the first pattern of the rule, a new token containing only one WME is directly generated; otherwise, device identifier matching is performed, and if a match is successful, the WME is added to the token to generate a new token. Finally, the token strength is calculated, and this new token is used to activate the subsequent Beta memory node or P node.

[0059] Assume the token format is (WME, parent, degree), where WME represents device data satisfying the current pattern, parent points to tokens satisfying previous patterns, and degree is the strength of the new token generated by the join node. As mentioned above, a spatial semantic constraint requires two patterns for identification; therefore, the degree of constraint satisfaction, i.e., the strength of the new token, is only calculated in the join node corresponding to the second pattern. In the join node of the first pattern, the new token inherits the previous strength.

[0060] The beneficial effects of this plan include: 1. It solves the problem of low efficiency of traditional inference engines when associating a large number of devices in IoT scenarios, and can handle fuzzy spatial constraints to automatically infer the association strength between devices; 2. To address the inefficiency of traditional inference engines in IoT device association scenarios, a rule network is constructed using the principle of trading space for time and node sharing, accelerating the matching speed of device data. Furthermore, the spatial distribution characteristics of IoT devices are fully considered, and a spatial index is built for device data, further improving the speed of data retrieval during the matching process. 3. To better handle fuzzy spatial constraints, membership functions are defined to describe the degree to which spatial relationships between devices satisfy spatial constraints. Furthermore, the strength of the matching results is automatically calculated during the matching process, thereby enabling the automatic inference of the association strength between devices.

[0061] The present invention also provides a spatial semantic association device for digital twin devices in an Internet of Things (IoT) scenario. The device includes a computer device, which includes a processor and a memory. The memory stores computer instructions, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the device implements the steps of the method described above.

[0062] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the aforementioned metadata-based railway engineering ECM management method. The computer-readable storage medium can be a tangible storage medium, such as random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disks, removable storage disks, CD-ROMs, or any other form of storage medium known in the art.

[0063] Those skilled in the art will understand that the exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Whether implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention. When implemented in hardware, it can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the desired tasks. The programs or code segments can be stored in a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave.

[0064] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.

[0065] In this invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or in place of features of other embodiments.

[0066] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations of the embodiments of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A spatial semantic association method for digital twin devices in an Internet of Things (IoT) scenario, characterized in that, The method is applied in an Internet of Things (IoT) environment, which includes multiple sensing devices, and the method includes the following steps: Based on the preset attribute information of the sensing device, an attribute triplet for each attribute of the sensing device is constructed. The attributes of the sensing device include location attribute, sensing range attribute and spatial attribute. The location attribute, sensing range attribute, and spatial attribute are all set with a first threshold. Based on the attribute parameters in the attribute triplet of each attribute of the sensing device and the first threshold of each attribute, the relevant set of sensing devices for each sensing device is determined. The relevant set of sensing devices for each sensing device includes sensing devices that are related to that sensing device. The first threshold of the spatial attribute is the first spatial threshold. Based on the triplet data of the spatial attribute of the sensing device, the distance between the spatial range of the sensing device and the spatial range of any other sensing device is calculated. Sensing devices whose distance is less than the first spatial threshold are included in the first pre-selected sensing device set. The first threshold of the location attribute is the first location threshold. Based on the triplet data of the location attribute of the sensing device, the distance between the location coordinates of the sensing device and the location coordinates of any sensing device in the first pre-selected sensing device set is calculated. Sensing devices whose distance is less than the first location threshold are included in the second pre-selected sensing device set. The first threshold of the sensing range attribute is the first sensing threshold. Based on the triplet data of the sensing range attribute of the sensing device, the overlapping volume of the sensing range of the sensing device and the sensing range of any sensing device in the second pre-selected sensing device set is calculated. If the overlapping volume is greater than the first sensing threshold, the sensing device whose overlapping volume with the sensing range of the sensing device is greater than the first sensing threshold is included in the relevant sensing device set. The location attribute, sensing range attribute, and spatial attribute are all provided with a second threshold. The membership function of each attribute of the sensing device and any sensing device in the set of related sensing devices is calculated based on the first threshold and the second threshold of each attribute. The correlation between two sensors is calculated based on the membership function of each attribute of the sensor and any other sensor, and the sensors in the set of related sensors corresponding to the sensor are sorted based on the correlation.

2. The method according to claim 1, characterized in that, The attributes of the sensing device include location attribute, sensing range attribute, and spatial attribute. The triplet data of the location attribute of the sensing device includes device name, attribute name, and location coordinates; the triplet data of the sensing range attribute of the sensing device includes device name, attribute name, and sensing range; the triplet data of the spatial attribute of the sensing device includes device name, attribute name, and spatial range in which the device is located.

3. The method according to claim 1, characterized in that, In the step of calculating the distance between the spatial range of the sensing device and the spatial range of any other sensing device based on the triplet data of the sensing device's spatial attributes, each spatial range is provided with a reference point, and the distance between the reference points is calculated. In the step of calculating the distance between the position coordinates of the sensing device and the position coordinates of any sensing device in the first pre-selected set of sensing devices based on the triplet data of the sensing device's position attributes, the distance between the position coordinates of every two sensing devices is calculated. In the step of calculating the overlapping volume of the sensing range of the sensing device and the sensing range of any sensing device in the second pre-selected set of sensing devices based on the triplet data of the sensing range attributes of the sensing device, the sensing range type of the sensing device is a three-dimensional graphic range, including spheres and cones, and the overlapping volume parameter of the three-dimensional graphic range between the two sensing devices is output.

4. The method according to claim 3, characterized in that, In the step of calculating the membership function of each attribute of the sensing device and any sensing device in the set of related sensing devices based on a first threshold and a second threshold for each attribute, If the attribute of the sensing device is a spatial attribute, then if the distance between the spatial range where the sensing device is located and the spatial range where any other sensing device is located is greater than or equal to a first spatial threshold, then the membership function value is 0; the second threshold of the spatial attribute is a second spatial threshold, and if the distance between the spatial range where the sensing device is located and the spatial range where any other sensing device is located is less than the second spatial threshold, then the membership function value is 1. If the attribute of the sensing device is a position attribute, then if the distance between the position coordinates of the sensing device and the position coordinates of any sensing device in the first pre-selected sensing device set is greater than or equal to a first position threshold, then the membership function value is 0; the second threshold of the position attribute is a second position threshold, and if the distance between the position coordinates of the sensing device and the position coordinates of any sensing device in the first pre-selected sensing device set is less than a second spatial threshold, then the membership function value is 1.

5. The method according to claim 3, characterized in that, In the step of calculating the membership function of each attribute of the sensing device and any sensing device in the set of related sensing devices based on a first threshold and a second threshold for each attribute, If the attribute of the sensing device is a sensing range attribute, then if the overlapping volume of the sensing range of the sensing device and the sensing range of any sensing device in the second pre-selected sensing device set is less than or equal to the first sensing threshold, then the membership function value is 0; the second threshold of the sensing range attribute is a second sensing threshold, and if the overlapping volume of the sensing range of the sensing device and the sensing range of any sensing device in the second pre-selected sensing device set is greater than the second spatial threshold, then the membership function value is 1.

6. The method according to claim 4, characterized in that, If the attribute of the sensing device is a spatial attribute, then if the distance between the spatial range where the sensing device is located and the spatial range where any other sensing device is located is less than a first spatial threshold and greater than or equal to a second spatial threshold, then the membership function is calculated based on the following formula: in, The membership function value represents the spatial attribute. Indicates the first spatial threshold. Indicates the second spatial threshold. It indicates the distance between the spatial range of the sensing device and the spatial range of any other sensing device; If the attribute of the sensing device is a position attribute, then if the distance between the position coordinates of the sensing device and the position coordinates of any sensing device in the first pre-selected set of sensing devices is less than a first position threshold and greater than or equal to a second position threshold, then the membership function is calculated based on the following formula: in, This represents the membership function value of the location attribute. Indicates the first position threshold. Indicates the second position threshold. This represents the distance between the position coordinates of the sensing device and the position coordinates of any sensing device in the first pre-selected set of sensing devices.

7. The method according to claim 5, characterized in that, If the attribute of the sensing device is a sensing range attribute, then if the overlapping volume of the sensing range of the sensing device and the sensing range of any sensing device in the second pre-selected sensing device set is greater than the first sensing threshold and less than or equal to the second sensing threshold, then the membership function is calculated based on the following formula: in, The membership function value represents the perception range attribute. Indicates the first perception threshold. This represents the second perception threshold. This represents the volume of overlap between the sensing range of the sensing device and the sensing range of any sensing device in the second pre-selected set of sensing devices.

8. The method according to claim 1, characterized in that, In the step of calculating the correlation between two sensors based on the membership function of each attribute of the sensing device and any other sensing device, the correlation between the two sensors is calculated according to the following formula: in, Indicates the correlation between two sensing devices. n This represents multiple attributes of the sensing device. i It represents any one of the multiple attributes of a sensing device. express i The membership function value of an attribute. express i The default weight value of the attribute.

9. A spatial semantic association device for digital twin devices in an Internet of Things (IoT) scenario, characterized in that, The device includes a computer device, which includes a processor and a memory, wherein computer instructions are stored in the memory, and the processor is configured to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the device implements the steps of the method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Data driven device detection

    US9130985B1