Heterogeneous equipment multi-protocol adaptive access method and device based on association atlas
By constructing a device-protocol dual-layer graph and utilizing historical communication protocols and network compatibility assessment, the problems of low protocol matching efficiency and poor adaptability of heterogeneous devices are solved, achieving efficient and accurate protocol access and system adaptability, and improving the level of automation and intelligence in industrial sites.
Patent Information
- Application Number
- CN202510739689.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-11-04
AI Technical Summary
In the Industrial Internet, the fragmentation of communication protocols among heterogeneous devices leads to complex data acquisition and interconnection. Existing methods are inefficient, have poor adaptability, and are difficult to achieve fast and accurate protocol matching and access.
A graph-based approach is adopted, which constructs a two-layer node graph of devices and protocols. By using historical communication protocol screening, network matching degree calculation and device support evaluation, three types of connection edges are constructed to realize hierarchical and differentiated association modeling of heterogeneous devices and protocols, and prioritizes the recommendation of protocols with high stability and strong adaptability.
It improves the automation and intelligence level of heterogeneous device access, ensures the accuracy of protocol matching and system adaptability, supports dynamic changes in device types and protocol standards, and reduces operational complexity and repetitiveness in knowledge management.
Smart Images

Figure CN120896992A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of industrial internet technology, and in particular to a method and apparatus for multi-protocol adaptive access of heterogeneous devices based on association graphs. Background Technology
[0002] Against the backdrop of the rapid development of the Industrial Internet, field devices are increasingly characterized by diversity in type, origin, and communication protocols. Typical examples include industrial cameras, PLC controllers, edge sensors, and AR / VR terminals. These devices belong to different manufacturers, standards, and systems, forming a highly heterogeneous device environment. The communication protocols used between these devices are numerous, including but not limited to Modbus, Profinet, OPCUA, MQTT, and EtherCAT. This protocol fragmentation makes data acquisition, status monitoring, and interoperability between heterogeneous devices extremely complex. Therefore, how to intelligently identify the protocols supported by different devices and achieve rapid and accurate matching and access has become a critical problem that urgently needs to be solved in industrial scenarios.
[0003] Currently, the mainstream protocol matching methods are still mainly based on manual configuration and static rule tables. The specific method is: technicians manually identify the device type, consult the instruction manual, determine the communication protocol used, and select the corresponding driver or adapter in the system for configuration. This method is feasible when the types of devices are limited or the protocols are relatively uniform, but its applicability and maintainability are seriously insufficient in the face of large-scale and dynamically changing industrial scenarios. The existing protocol matching methods mainly have the following three technical defects: (1) Low efficiency: each heterogeneous device requires manual intervention to determine the protocol compatibility, which is cumbersome and difficult to support the rapid online needs of thousands of devices; (2) Poor adaptability: once the device model, firmware version or protocol standard changes, it needs to be reconfigured. The system cannot automatically adapt to the changes on site and the response is lagging; (3) Chaotic knowledge management: the compatibility information between devices and protocols is scattered in various files, documents or experience, which cannot be expressed in a structured way and lacks a unified knowledge model, resulting in high repetition and poor reusability of the protocol adaptation process.
[0004] Therefore, there is an urgent need for a method to achieve efficient and accurate protocol matching for heterogeneous devices, solve the problems of low efficiency, poor adaptability and difficulty in knowledge reuse of traditional methods, and significantly improve the automation and intelligence level of multi-protocol device access in industrial sites. Summary of the Invention
[0005] In view of this, this application provides a method and apparatus for adaptive access of heterogeneous devices using multiple protocols based on correlation graphs, which can achieve efficient and accurate protocol matching of heterogeneous devices, solve the problems of low efficiency, poor adaptability and difficulty in knowledge reuse of traditional methods, and significantly improve the automation and intelligence level of multi-protocol device access in industrial fields.
[0006] Specifically, this application is implemented through the following technical solution:
[0007] The first aspect of this application provides a method for multi-protocol adaptive access of heterogeneous devices based on correlation graphs, the method comprising:
[0008] Acquire data and protocol data from heterogeneous devices;
[0009] The first-layer nodes are constructed using heterogeneous device entities, and the second-layer nodes are constructed using protocol entities, thus determining the graph nodes of the upper and lower layers.
[0010] Traverse the first-level nodes to determine the connection relationship between the heterogeneous device entities corresponding to each node and the protocol entities corresponding to the second-level nodes;
[0011] Specifically, for each first-layer target node in the first-layer nodes, multiple associated protocols of the heterogeneous device entity corresponding to the first-layer target node are obtained as a first candidate protocol set; a first protocol subset is selected from the first candidate protocol set based on the historical communication protocols of the heterogeneous device entity corresponding to the first-layer target node; a first connection edge is calculated based on the historical communication failure status to connect the first-layer target node and the node corresponding to the first protocol subset; the first protocol subset is removed from the first candidate protocol set to obtain a second candidate protocol set; the comprehensive matching degree between each protocol entity in the second candidate protocol set and each layer in the communication network is calculated to select a second protocol subset; the comprehensive matching degree is used as a second connection edge to connect the second-layer target node corresponding to the second protocol subset and the first-layer target node; the second protocol subset is removed from the second candidate protocol set to obtain a third candidate protocol set; the support degree of the first-layer target node for each protocol in the third candidate protocol set is calculated and used as a third connection edge to connect the first-layer target node and the second-layer target node corresponding to the third candidate protocol set.
[0012] Traverse the second-level nodes to determine the connection relationships between the protocol entities corresponding to each node, and complete the construction of the association graph;
[0013] Based on the association graph, the target protocol that matches the target heterogeneous device to be accessed is determined, and the target heterogeneous device is accessed based on the target protocol.
[0014] A second aspect of this application provides a heterogeneous device for multi-protocol adaptive access based on a correlation graph, the device comprising an acquisition module, a construction module, and a determination module;
[0015] The acquisition module is used to acquire heterogeneous device data and protocol data;
[0016] The construction module is used to construct first-layer nodes with heterogeneous device entities, construct second-layer nodes with protocol entities, and determine the graph nodes of the upper and lower layers.
[0017] The determining module is used to traverse the first-layer nodes and determine the connection relationship between the heterogeneous device entity corresponding to each node and the protocol entity corresponding to the second-layer node.
[0018] Specifically, for each first-layer target node in the first-layer nodes, multiple associated protocols of the heterogeneous device entity corresponding to the first-layer target node are obtained as a first candidate protocol set; a first protocol subset is selected from the first candidate protocol set based on the historical communication protocols of the heterogeneous device entity corresponding to the first-layer target node; a first connection edge is calculated based on the historical communication failure status to connect the first-layer target node and the node corresponding to the first protocol subset; the first protocol subset is removed from the first candidate protocol set to obtain a second candidate protocol set; the comprehensive matching degree between each protocol entity in the second candidate protocol set and each layer in the communication network is calculated to select a second protocol subset; the comprehensive matching degree is used as a second connection edge to connect the second-layer target node corresponding to the second protocol subset and the first-layer target node; the second protocol subset is removed from the second candidate protocol set to obtain a third candidate protocol set; the support degree of the first-layer target node for each protocol in the third candidate protocol set is calculated and used as a third connection edge to connect the first-layer target node and the second-layer target node corresponding to the third candidate protocol set.
[0019] The determining module is also used to traverse the second-layer nodes, determine the connection relationship between the protocol entities corresponding to each node, and complete the construction of the association graph;
[0020] The determining module is further configured to determine the target protocol that matches the target heterogeneous device to be accessed based on the association map, and access the target heterogeneous device based on the target protocol.
[0021] The heterogeneous device multi-protocol adaptive access method and apparatus based on association graph provided in this application employs a three-level screening process: "historical communication protocol screening, network matching degree calculation, and device support degree evaluation." This process involves three rounds of subdivision of the first candidate protocol set, ultimately constructing three types of connection edges with different strengths and semantics. This achieves hierarchical and differentiated association modeling between heterogeneous device entities and protocol entities. First, a first protocol subset is constructed based on historical communication protocols, and first connection edges are established according to historical communication failure states. This approach ensures priority connection to protocols validated in actual deployments, improving the stability and practical feasibility of recommended protocols. Assigning edge weights based on failure states also reflects protocol robustness, helping to avoid protocols with high failure rates. Then, after eliminating selected protocols, a comprehensive matching degree calculation is performed on the remaining protocols through the multi-layered structure of the communication network. A second protocol subset is screened, and second connection edges are constructed. This process utilizes comprehensive analysis based on current network topology, load status, and protocol adaptability to ensure that the selected protocols have good deployment conditions and performance in the network environment, avoiding the selection of protocols that perform poorly under the current network structure. Finally, a third set of candidate protocols is constructed for the remaining protocols, their support for devices is calculated, and a third set of connecting edges is built. This stage further explores protocols that are potentially compatible with devices but have not been used in practice, possessing scalability and foresight, which helps the system to achieve adaptive protocol recommendation when protocols evolve or new devices are added. In summary, the combination of the three screening stages considers the historical performance of protocols, current network adaptability, and also introduces potential capability assessment, achieving a comprehensive analysis from known effectiveness to potential adaptability and future scalability. By constructing weighted connecting edges, the final device-protocol two-layer graph has structural characteristics that emphasize realism, adaptability, and scalability, providing a high-quality graph foundation for subsequent protocol path search, dynamic scheduling, and access control. Attached Figure Description
[0022] Figure 1 A flowchart of the heterogeneous device multi-protocol adaptive access method based on association graph provided in Embodiment 1 of this application;
[0023] Figure 2 This is a schematic diagram of the structure of the heterogeneous device multi-protocol adaptive access device based on the association graph provided in Embodiment 2 of this application. Detailed Implementation
[0024] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application.
[0025] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used herein are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0026] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0027] The following specific embodiments are given to illustrate the technical solution of this application in detail.
[0028] Figure 1 This is a flowchart of the heterogeneous device multi-protocol adaptive access method based on association graph provided in Embodiment 1 of this application. Please refer to... Figure 1 The method provided in this embodiment may include:
[0029] S101. Obtain heterogeneous device data and protocol data.
[0030] Specifically, heterogeneous devices refer to devices in an industrial environment that differ in origin, function, interface, and protocol. Heterogeneous devices may include industrial cameras, sensors, actuators, PLCs (Programmable Logic Controllers), etc. They possess different communication interfaces (such as serial ports, Ethernet, and wireless), and employ different communication protocols (such as Modbus, CAN, OPC UA, and MQTT). Heterogeneous device data includes unique identifiers (such as MAC addresses), device model (manufacturer-defined model identifier), device manufacturer name, hardware version number, and communication configurations (such as baud rate, IP address, and port number). Table 1 is a schematic table of heterogeneous device data provided in this application.
[0031] Table 1
[0032]
[0033] Furthermore, protocol data refers to the definition and attributes of the communication protocol itself, used to describe how heterogeneous devices and upper-layer systems exchange data. Protocol data encapsulates metadata information of the protocol stack, including not only basic specification parameters such as protocol type, version number, and data frame format, but also security features and compatibility parameter configurations. Table 2 is a schematic table of protocol data provided in this application.
[0034] Table 2
[0035]
[0036] It should be noted that protocol data refers to the communication protocols supported by heterogeneous device data. In other words, protocol data is a collection of information about communication protocols that heterogeneous devices can support or have used during communication. This protocol data serves as the foundation for heterogeneous devices to access the network and is crucial for achieving efficient interconnection and interoperability between devices and systems. Protocol data is closely related to heterogeneous device data, which refers to a collection of data describing the basic information, operational capabilities, and communication capabilities of various devices in an industrial field. Protocol data is a part of or derived from this device data, reflecting which specific communication protocols each device supports and the compatibility relationships with these protocols.
[0037] In practice, the heterogeneous devices to be connected are scanned and identified through access interfaces via edge gateways, industrial fieldbuses, or IoT platforms. Basic information is collected, including device type, model, manufacturer, interface type, functional characteristics, operating parameters, and historical communication records, resulting in heterogeneous device data. Further, based on the heterogeneous device's description file (such as an XML configuration file) or by reading the device's communication configuration table, information such as supported communication protocol types, protocol versions, transport layer methods (serial port, TCP / IP), supported instruction sets, and data frame structures is extracted to obtain protocol data. The collected heterogeneous device data and protocol data are then formatted and standardized into structured entity objects. Heterogeneous device entities and protocol entities are constructed separately, and the standardized heterogeneous device data and protocol data are stored in a graph database or knowledge base, respectively.
[0038] S102. Construct the first-layer node using heterogeneous device entities and the second-layer node using protocol entities to determine the graph nodes of the upper and lower layers.
[0039] Specifically, the first-layer nodes refer to the graph nodes built based on the collected and standardized heterogeneous device entities. Each first-layer node represents a specific heterogeneous device and contains key attribute information such as device type, model, manufacturer, interface type, functional description, and historical communication records. The second-layer nodes refer to the graph nodes built based on the protocol entities extracted from the heterogeneous devices. Each second-layer node represents a communication protocol and contains information such as the protocol name, version number, supported communication mechanisms, protocol level, supported data structures, functional commands, and transmission methods. In other words, the first-layer nodes indicate who needs communication (devices), and the second-layer nodes indicate how to communicate (protocols). The first-layer and second-layer nodes together constitute the upper and lower layers of the association graph structure.
[0040] In practical implementation, the unique identifier and core attributes of each heterogeneous device are extracted from the acquired heterogeneous device data to construct a standardized device data structure, which serves as the first-layer node in the association graph. Protocol name, version, transmission method, interface type, and other information are extracted from the acquired protocol data to construct a standardized protocol data structure, which serves as the second-layer node in the association graph. For each heterogeneous device entity, the unique identifier is directly determined as the node ID based on the entity's unique identifier. For each protocol entity, a unique identifier is generated based on the entity's name, serving as the node ID. The association graph is initialized in a graph database or graph structure framework, establishing a graph data structure for storing the first-layer nodes (device nodes) and the second-layer nodes (protocol nodes). The extracted and formatted heterogeneous device entities are written into the first-layer node set of the association graph, and the protocol entities are written into the second-layer node set, completing the construction and confirmation of the upper and lower layers of nodes.
[0041] The method provided in this embodiment, in its first aspect, constructs a hierarchical relationship structure between "device and protocol" by using heterogeneous device entities as first-layer nodes and protocol entities as second-layer nodes, thereby separating and processing issues at the device level and protocol level. In the association graph, connections between nodes at each layer and between layers are expressed through edges, allowing path search and structure learning to proceed in a clear hierarchy. This clearly distinguishes between the device end and the protocol end, improving the interpretability and clarity of reasoning logic of the association graph, supporting hierarchical information aggregation and dissemination, and facilitating cross-layer path matching, attribute mapping, and protocol adaptation analysis. In the subsequent protocol selection process, matching protocols can be filtered layer by layer based on device nodes, reducing the search space and improving efficiency. It also supports extended definitions of various types of connection edges, enabling protocol recommendations to incorporate multi-dimensional information. In its second aspect, the first-layer nodes carry heterogeneous device entities, whose attributes include hardware interfaces, supported functions, communication capabilities, etc.; the second-layer nodes carry communication protocol entities, whose attributes include version support, function coverage, operating modes, etc. This semantically distinct node content provides a solid foundation for subsequent multi-strategy approaches based on attribute similarity, protocol support, and other factors. This setup focuses information with different semantic meanings on the corresponding node layer, enhancing the professionalism and accuracy of information processing. It supports multi-faceted matching and evaluation, including attribute alignment, version compatibility, and function mapping, which improves the overall accuracy of protocol recommendations. Furthermore, it avoids semantic conflicts caused by mixed information, providing clear context for path scoring and edge weight calculation. It also allows for the flexible introduction of new device types and protocol standards without disrupting the existing graph structure, demonstrating excellent scalability.
[0042] S103. Traverse the first-layer nodes and determine the connection relationship between the heterogeneous device entities corresponding to each node and the protocol entities corresponding to the second-layer nodes.
[0043] Specifically, for each first-layer target node in the first-layer nodes, multiple associated protocols of the heterogeneous device entity corresponding to the first-layer target node are obtained as a first candidate protocol set; a first protocol subset is selected from the first candidate protocol set based on the historical communication protocols of the heterogeneous device entity corresponding to the first-layer target node; a first connection edge is calculated based on the historical communication failure status to connect the first-layer target node and the node corresponding to the first protocol subset; the first protocol subset is removed from the first candidate protocol set to obtain a second candidate protocol set; the comprehensive matching degree between each protocol entity in the second candidate protocol set and each layer in the communication network is calculated to select a second protocol subset; the comprehensive matching degree is used as a second connection edge to connect the second-layer target node corresponding to the second protocol subset and the first-layer target node; the second protocol subset is removed from the second candidate protocol set to obtain a third candidate protocol set; the support degree of the first-layer target node for each protocol in the third candidate protocol set is calculated and used as a third connection edge to connect the first-layer target node and the second-layer target node corresponding to the third candidate protocol set.
[0044] Specifically, the first-layer target node refers to a specific node in the first-layer node of the association graph that is currently having its connection edges calculated. It corresponds to a heterogeneous device entity; that is, during each traversal, an untraversed first-layer node is selected as the current "target" for protocol association analysis. The second-layer target node refers to a specific node in the second-layer node of the association graph that has a relationship with the first-layer target node and needs to be connected by a connection edge. It corresponds to a protocol entity. Once it is determined that a protocol entity has a relationship with a heterogeneous device, it is used as a second-layer target node in the construction of connection edges.
[0045] Furthermore, the first candidate protocol set refers to the set of all communication protocols supported or capable of being supported by a given Layer 1 target node (i.e., a heterogeneous device). The first protocol subset refers to a subset of protocols selected from the first candidate protocol set, with the selection criterion being protocols historically used by the heterogeneous device. The second candidate protocol set refers to the set of protocols remaining after removing the first protocol subset from the first candidate protocol set. The second candidate protocol set includes protocols that the heterogeneous device does not use but supports or can support. The second protocol subset refers to the set of protocols further selected from the second candidate protocol set, with the selection criterion being the overall matching degree between each protocol in the second candidate protocol set and different communication layers in the communication network, selecting protocols with higher overall matching degrees. The third candidate protocol set refers to the set of protocols remaining after removing the second protocol subset from the second candidate protocol set. The third candidate protocol set includes protocols that are neither historically used protocols nor protocols with high matching degrees, but still have some potential for support. It should be noted that all protocol sets originate from the first candidate protocol set, and there is a selection and reduction relationship between each protocol set.
[0046] In practice, each first-layer node in the association graph is processed individually to become the current first-layer target node. For the current first-layer target node, all protocols supported or associated with its corresponding heterogeneous device entity are obtained by looking up the configuration table, forming a first candidate protocol set. Further, protocols historically used by the corresponding heterogeneous device entity are selected from the first candidate protocol set to form a first protocol subset; historical communication fault states generated during the use of these protocols by the heterogeneous device entity are obtained; based on the fault state information, the edge weight corresponding to each protocol is calculated; a first connection edge is constructed, connecting the current first-layer target node with the second-layer target node corresponding to the first protocol subset, with the edge weight being a value related to the historical communication fault state.
[0047] Furthermore, the first subset of protocols is removed from the first candidate protocol set to obtain the remaining protocols, which constitute the second candidate protocol set. For each protocol in the second candidate protocol set, its comprehensive matching degree with each layer of the communication network is calculated; protocols with high comprehensive matching degrees are selected to form the second protocol subset; a second connection edge is constructed to connect the current first-layer target node with the second-layer target node corresponding to the second protocol subset, with the edge weight being the comprehensive matching degree of the corresponding protocol.
[0048] Furthermore, the second protocol subset is removed from the second candidate protocol set to obtain the remaining protocols, which constitute the third candidate protocol set; the support of the current first-layer target node for each protocol in the third candidate protocol set is calculated; a third connection edge is constructed to connect the current first-layer target node with the corresponding second-layer target node in the third candidate protocol set, and the edge weight is the support value of each protocol.
[0049] The method provided in this embodiment employs a three-tiered screening process: "historical communication protocol screening, network matching degree calculation, and device support degree evaluation." This process involves three rounds of subdivision of the first candidate protocol set, ultimately constructing three types of connection edges with different strengths and semantics. This achieves hierarchical and differentiated association modeling between heterogeneous device entities and protocol entities. First, a first protocol subset is constructed based on historical communication protocols, and first connection edges are established according to historical communication failure states. This approach ensures priority is given to protocols validated in actual deployments, improving the stability and practical feasibility of recommended protocols. Assigning edge weights based on failure states also reflects the robustness of protocols, helping to avoid protocols with high failure rates. Then, after eliminating the selected protocols, a comprehensive matching degree calculation is performed on the remaining protocols through the multi-layered structure of the communication network. A second protocol subset is selected, and a second connection edge is constructed. This process utilizes a comprehensive analysis of current network topology, load status, and protocol adaptability to ensure that the selected protocols have good deployment conditions and performance in the network environment, avoiding the selection of protocols that perform poorly under the current network structure. Finally, a third set of candidate protocols is constructed for the remaining protocols, their support with the device is calculated, and a third connection edge is constructed. This stage further explores protocols that are potentially compatible with the device but have not been used in practice. It has scalability and foresight, which helps the system to achieve adaptive protocol recommendation when protocols evolve or new devices are connected.
[0050] In summary, the combination of the three screening stages considers not only the historical performance of the protocol and its current network compatibility, but also introduces potential capability assessment, achieving a comprehensive analysis from known effectiveness to potential adaptability and future scalability. By constructing weighted connection edges, the final device-protocol two-layer graph possesses structural characteristics that emphasize realism, adaptability, and scalability, providing a high-quality graph foundation for subsequent protocol path search, dynamic scheduling, and access control.
[0051] Optionally, the step of calculating the first connection edge based on historical communication failure states to connect the first-layer target node and the nodes corresponding to the first protocol subset includes: obtaining the protocol records used by the heterogeneous device entity corresponding to the first-layer target node during historical communication, and extracting the communication failure state data of each protocol in the protocol records; calculating the first association relationship between the heterogeneous device entity corresponding to the first-layer target node and each historically used protocol based on the communication failure state data; determining the second-layer target node corresponding to each protocol entity in the first protocol subset in the second-layer nodes; constructing the first connection edge with the first association relationship as the weight of the first connection edge and the nodes of the first-layer target node and the second-layer target node as the nodes of the first connection edge.
[0052] Specifically, firstly, for the target node at the first layer currently being traversed, its corresponding heterogeneous device entity is determined. Then, by calling or querying device communication logs, transport layer protocol stack logs, edge computing gateways, or platform-side communication management modules, the communication protocol usage records generated by this heterogeneous device entity during its historical operation are retrieved. Further, from the communication protocol usage records, the communication fault status data associated with each communication record is extracted by querying network quality monitoring modules, log aggregation platforms, or the device's local operating status reporting module. Based on the acquired communication fault status data, the first association relationship between the heterogeneous device entity and each historically used protocol is calculated. A weighted scoring function is used for comprehensive scoring when calculating the first association relationship. The comprehensive score is obtained by weighted summation based on the weight of each status data in the communication fault status data, and this comprehensive score serves as the first association relationship.
[0053] Based on the previously identified first protocol subset, the specific graph nodes corresponding to the protocol entities in the first protocol subset are located in the second-layer nodes of the association graph, serving as the second-layer target nodes. Using the current first-layer target node and the determined second-layer target node as connection endpoints, and utilizing the calculated first association relationship as the weight information of the connection edge, the first connection edge is constructed.
[0054] Optionally, calculating the comprehensive matching degree between each protocol entity in the second candidate protocol set and each layer in the communication network includes: determining different communication layers in the communication network; for each protocol entity in the second candidate protocol set, calculating the adaptation index between the protocol entity and different communication layers based on the calculation method corresponding to the different communication layers; and performing a weighted summation of the adaptation index based on the weights corresponding to the different communication layers to obtain the comprehensive matching degree.
[0055] Specifically, in this embodiment, the different communication layers in the communication network include the physical layer, the data link layer, and the application layer. The physical layer involves underlying access capabilities such as hardware interfaces, signal encoding, and transmission media; the data link layer implements functions such as data frame encapsulation, addressing, transmission, and link control; and the application layer defines the semantics, structure, and data format of the device communication protocol, directly serving users or business systems.
[0056] It should be noted that the calculation methods for protocol entity adaptation indicators differ for different communication layers. The physical layer adaptation indicator aims to determine whether the device has the hardware communication capabilities required to support the protocol, and its calculation method is as follows:
[0057]
[0058] Wherein, A phy (P iThe physical layer adaptation index is 1. For example, if a device has an RS485 interface and the protocol is Modbus RTU (based on RS485), then the physical layer adaptation index is 1; if the device has an RS232 interface and is connected to the RS485 interface through a conversion module, then the physical layer adaptation index is 0.5.
[0059] The goal of data link layer adaptation metrics is to evaluate whether a device supports the data frame structure, frame verification mechanism, and addressing scheme of a protocol. The calculation method for data link layer adaptation metrics is as follows: extract the protocol's data link specifications, such as frame start / end bits, checksum type, and MAC address requirements; compare whether the device driver can support the link logic.
[0060]
[0061] Wherein, A link (P i The data link layer adaptation metric is 1. For example, if the device has a standard Ethernet driver and the protocol is based on the Ethernet frame structure, the data link layer adaptation metric is 1; if the protocol is based on a custom frame and the device needs to be re-adapted, the data link layer adaptation metric is 0.5.
[0062] The goal of application layer adaptation metrics is to determine whether a device supports the application layer semantics, command set, and data layer format of a protocol. The calculation method is as follows:
[0063]
[0064] Wherein, A app (P i The application layer adaptation metric is 1. For example, if the protocol is MQTT and the device already supports MQTT clients, the application layer adaptation metric is 1; if the protocol is OPC-UA and the device needs to access the protocol network management system, the application layer adaptation metric is 0.5.
[0065] In practical implementation, different communication layers in the communication network are determined, such as the physical layer, data link layer, and application layer. For each protocol entity in the second candidate protocol set, the adaptation index of the protocol entity in the physical layer, data link layer, and application layer is calculated according to the calculation method corresponding to each communication layer. Based on preset weights, the adaptation index of each protocol entity in each communication layer is weighted and summed to calculate the comprehensive matching degree of the protocol entity. The calculated comprehensive matching degree is used as the matching evaluation index between the protocol entity and the communication network for subsequent protocol screening and connection edge construction. When determining the weights corresponding to different communication layers, the impact of each communication layer on the overall performance is first evaluated based on the communication requirements of the target system. For example, in the Internet of Things (IoT), the application layer has a higher weight; while in the interconnection of underlying devices, the physical layer and data link layer are more important. Furthermore, the importance ratio of each layer is converted into initial weights, for example: physical layer 0.3, data link layer 0.3, application layer 0.4. The initial weights are adjusted based on the performance data of previous device access or communication. For example, if the application layer has historically caused the most communication interruption problems, its weight can be increased. Incorporate adjustments from domain experts or perform multiple rounds of weight tuning based on machine learning algorithms (such as AHP or genetic algorithms) to obtain the optimal weight combination. Normalize the final adjusted weights for each layer to ensure their sum equals 1.
[0066] Optionally, calculating the support of the first-layer target node for each protocol in the third candidate protocol set includes: determining the number of communication functions that the heterogeneous device entity corresponding to the first-layer target node can complete, determining the total number of functions supported by each protocol in the third candidate protocol set, and determining a first support based on the ratio of the number of communication functions to the total number of functions; determining the number of historical versions that the heterogeneous device entity corresponding to the first-layer target node can be compatible with, determining the total number of versions supported by each protocol in the third candidate protocol set, and determining a second support based on the ratio of the number of historical versions to the total number of versions; determining the number of operation modes that the heterogeneous device entity corresponding to the first-layer target node can support after extending the communication protocol, determining the total number of expected operation modes for each protocol in the third candidate protocol set, and determining a third support based on the ratio of the number of operation modes to the total number of expected operation modes; and weighting and summing the first support, second support, and third support based on the weights corresponding to different types of support to obtain a comprehensive support.
[0067] Specifically, the first support measure is used to assess the extent to which the communication functions a heterogeneous device can perform cover the communication functions supported by a particular protocol. The first support reflects the functional compatibility between the heterogeneous device and the protocol. The second support measure is used to assess the compatibility of the heterogeneous device with historical versions of the protocol, reflecting the device's adaptation to the protocol in terms of version compatibility. The third support measure is used to assess the device's adaptability to the expected operating mode after protocol extension, reflecting the device's adaptability to protocol application scenarios.
[0068] In specific implementation, for each first-layer target node, the number of communication functions that its corresponding heterogeneous device entity can perform is obtained; simultaneously, each protocol entity in the third candidate protocol set is traversed, and the total number of communication functions it supports is determined. For each protocol entity, the first support is calculated using "number of communication functions ÷ total number of communication functions". Similarly, for each first-layer target node, the number of historical protocol versions compatible with the heterogeneous device entity corresponding to the first-layer target node is obtained; simultaneously, the total number of historical versions supported by each protocol entity is obtained. For each protocol entity, the second support is calculated using "number of historical protocol versions ÷ total number of historical versions". Similarly, for each first-layer target node, the number of operating modes that the heterogeneous device entity corresponding to the first-layer target node can support after extending the communication protocol is obtained; simultaneously, the total number of expected operating modes for each protocol entity is determined. For each protocol entity, the third support is calculated using "number of supported operating modes ÷ total number of expected operating modes". Furthermore, based on the pre-set weights of the three types of support, for each protocol entity, the three types of support are weighted and summed to obtain the comprehensive support. Connect the first-layer target nodes to the second-layer target nodes corresponding to each protocol entity in the third candidate protocol set. The weight of the connection edge represents the overall support of that protocol entity. To determine the weights corresponding to different support levels, firstly, multiple communication technology experts, protocol architects, or system integration engineers are invited to participate in the evaluation. A pairwise comparison method (Analytic Hierarchy Process, AHP) is used to score the relative importance of the three support levels. For example, if the "first support level" is 3 more important than the "second support level," it is recorded as 3; otherwise, it is 1 / 3. A comparison matrix is constructed based on the relative importance. The constructed comparison matrix is then column-normalized, i.e., each cell is divided by the sum of its column. The average value of each row is taken to obtain the weight value corresponding to each support level. A consistency check is performed on the scoring matrix. If the consistency ratio is less than a preset threshold, the weights are considered reasonable. If the consistency ratio is not less than the preset threshold, the scoring matrix is readjusted, and the weights of each support level are determined based on the adjusted scoring matrix.
[0069] S104. Traverse the second-level nodes, determine the connection relationships between the protocol entities corresponding to each node, and complete the construction of the association graph.
[0070] In practice, all second-layer nodes in the association graph are traversed one by one. For each protocol entity node, the basic information of its corresponding protocol is extracted. Similarity features between protocols are compared in various ways, such as comparing the consistency of the communication layer of any two protocol entities; comparing the intersection ratio of the function sets of any two protocol entities; and comparing the degree of overlap in the version compatibility range of any two protocol entities. Combining the similarity features under each method, a weighted similarity score is used to determine the degree of association (i.e., the weight of the connection edge) between any two protocol entities. By comparing the degree of association with a preset value, when the degree of association is greater than the preset value, a connection edge is established in the association graph, with the degree of association as the edge weight, connecting the second-layer nodes corresponding to these two protocol entities. Based on the same method, after establishing connections between all protocol entities that meet the conditions, a complete graph structure of second-layer nodes is formed.
[0071] S105. Determine the target protocol that matches the target heterogeneous device to be accessed based on the association graph, and access the target heterogeneous device based on the target protocol.
[0072] In specific implementation, determining the target protocol matching the target heterogeneous device to be accessed based on the association graph includes: determining a first subset of candidate protocols supported by the target heterogeneous device based on the first connection edge; the first connection edge is a bidirectional edge, and the value of the first connection edge represents the historical communication failure state; based on the second connection edge, the first subset of candidate protocols is association-sorted to obtain a sorted second subset of candidate protocols; the second connection edge is an undirected edge, and the value of the second connection edge represents the comprehensive matching degree of the multi-layer communication network; based on the third connection edge, the second subset of candidate protocols is subjected to compatibility analysis to obtain a final protocol matching set; the third connection edge is a directed edge, and the value of the third connection edge represents the protocol support degree; calculating the graph path score between the target heterogeneous device and each protocol in the final protocol matching set based on the three types of connection edges, calculating a comprehensive score based on the graph path score, and determining the target protocol of the target heterogeneous device based on the comprehensive score.
[0073] Specifically, the first connection edge is a bidirectional edge, representing the historical communication failure status between the heterogeneous device entity and the protocol entity. The weight of the first connection edge is usually determined based on statistical calculations of historical communication successes and failures. The second connection edge is an undirected edge, representing the degree of multi-layer matching of the communication network between the protocol entities. The weight of the second connection edge reflects the overall compatibility of the two protocols at the physical layer, data link layer, and application layer. The third connection edge is a directed edge (from the heterogeneous device entity to the protocol entity), representing the degree of support of the heterogeneous device entity for the protocol entity. The weight of the third connection edge is calculated using indicators such as the proportion of comprehensive communication function support, version compatibility, and operating mode support.
[0074] In practice, the process involves: acquiring the target heterogeneous device; traversing the first connection edges between it and protocol entities; and filtering out protocol entities with edge weights higher than a set threshold to form a first protocol candidate subset. For each protocol entity in the first protocol candidate subset, the process involves traversing the second connection edges between it and other protocol entities, calculating the average comprehensive matching degree of other protocols associated with the current candidate protocol, and using this as a ranking metric. Protocols in the first protocol candidate subset are ranked according to the average comprehensive matching degree to form a second protocol candidate subset, and protocol entities ranked lower are removed. Further, for each protocol entity in the second protocol candidate subset, the process involves traversing the process to check if a third connection edge exists between it and the target heterogeneous device. If it exists, the protocol support of the third connection edge is obtained. If the protocol support is higher than a preset value, the protocol entity is retained, forming the final protocol matching set. For each protocol entity in the final protocol matching set, a graph path is constructed sequentially along the first, second, and third connection edges, starting from the target heterogeneous device. The weight values of each connection edge in the graph path are accumulated and normalized according to a set rule to obtain a graph path score. For each protocol, a weighted formula or machine learning model is used to integrate multiple scoring factors and combine them with path scores to calculate a comprehensive score. The protocols with the highest comprehensive scores are then ranked, and the protocol with the highest score is selected as the target protocol for that heterogeneous device.
[0075] Optionally, determining the target protocol matching the target heterogeneous device to be accessed based on the association graph includes: calculating the attribute similarity between the node attributes of the first-layer target node corresponding to the target heterogeneous device and the attributes of the second-layer node in the association graph based on the node attributes of the first-layer target node; filtering out a first candidate protocol set from the second-layer nodes based on the attribute similarity; for the first candidate protocol set, determining the optimal graph path between the first-layer target node and each second-layer node in the candidate protocol set based on the second and third connecting edges in the association graph using a path search algorithm; calculating the confidence of the optimal graph path based on the first connecting edge in the association graph; generating a matching score for the first candidate protocol set based on the confidence of the optimal graph path and the historical interaction records in the first connecting edge; sorting the protocols in the first candidate protocol set according to the matching score; and determining the target protocol with the highest matching score.
[0076] In practical implementation, firstly, the node attributes of the corresponding first-layer target nodes are extracted from the target heterogeneous devices and converted into vector form. Then, all second-layer nodes in the association graph are traversed, and the attributes corresponding to the protocol entities of each second-layer node are extracted and also converted into vector form. The cosine similarity calculation method is used to calculate the similarity between the vector of the first-layer target node and the vector of each second-layer node. By setting a similarity threshold, second-layer nodes with similarity higher than the threshold are selected to form the first candidate protocol set. For each protocol node in the first candidate protocol set, path search is performed using the second and third connecting edges in the association graph. The first-layer target node is used as the starting point, and the candidate protocol node is used as the ending point. A path search algorithm (such as Dijkstra's algorithm or A* algorithm) is used to calculate the optimal path from the first-layer target node to each candidate protocol node in the association graph. The optimal path is defined as maximizing or minimizing the path weight (based on the weights of the second and third connecting edges). Furthermore, based on the weights of the first connecting edges involved in the path, the product and weighted average of the weights of all first connecting edges in the path are calculated to determine the confidence score of the path. Taking into account both the confidence score of the optimal path and the historical interaction records in the first connecting edges, a matching score is generated for each protocol in the first candidate protocol set. The protocols in the first candidate protocol set are then sorted in descending order based on their matching scores. The protocol with the highest matching score is selected as the target protocol, i.e., the protocol ultimately recommended to the target heterogeneous devices to be accessed.
[0077] Optionally, the step of determining the optimal graph path between the first-layer target node and each second-layer node in the candidate protocol set based on the second and third connecting edges in the association graph and using a path search algorithm for the first candidate protocol set includes: for each second-layer node in the first candidate protocol set, determining a protocol directly associated with the target heterogeneous device based on the third connecting edge in the association graph and adding it to the first candidate protocol set; determining an extended protocol compatible with each candidate protocol in the supplemented first candidate protocol set based on the second connecting edge in the association graph and adding it to the first candidate protocol set; traversing all possible paths between the first-layer target node and each second-layer node in the supplemented first candidate protocol set using a path search algorithm, and determining the shortest association path set based on the path length; analyzing the quality of each shortest association path in the shortest association path set, determining the confidence level of each shortest association path based on the quality, sorting and filtering the shortest association paths based on the confidence level, and determining the optimal graph path with the highest confidence level.
[0078] In practice, the second-level nodes corresponding to each protocol entity in the first candidate protocol set are traversed. For each node, based on the third connecting edge in the association graph, protocol entities directly associated with that protocol node and supported by the target heterogeneous device are retrieved, and these retrieved protocol entities are added to the first candidate protocol set. For the supplemented first candidate protocol set, the second connecting edge in the association graph is used to retrieve extended protocols compatible with each candidate protocol, i.e., protocols that are complementary to or substitutable with the candidate protocol. These retrieved extended protocols are also added to the first candidate protocol set. Furthermore, a path search algorithm, such as Dijkstra's algorithm or A* algorithm, is used to traverse all possible paths from the first-level target node to each second-level node in the expanded first candidate protocol set based on the association graph structure. The length of each possible path (the cumulative value of the edge weights) is calculated, and the shortest path set is obtained. The quality of each path in the selected shortest path set is analyzed. Based on the weight values of each connecting edge in the path, and combined with factors such as the historical communication failure status reflected by the first connecting edge, the network matching degree of the second connecting edge, and the protocol support degree of the third connecting edge, the path quality is evaluated, and a confidence score for each path is obtained through weighted calculation. According to the confidence score, the set of shortest paths is sorted, and the path with the highest confidence is selected first and determined as the optimal graph path between the target heterogeneous device and the candidate protocol.
[0079] Optionally, after accessing the target heterogeneous device based on the target protocol, the method further includes: collecting the actual communication results of the target heterogeneous device; updating the association relationships in the association graph according to the actual communication results; performing a global update every preset period to include new heterogeneous devices, new protocols, and matching feedback information into the association graph, and adjusting the priority of the heterogeneous device in the association graph based on the matching frequency of the heterogeneous device.
[0080] Specifically, after the target protocol connects to the target heterogeneous device, the system records the operational logs after the target heterogeneous device communicates with the target protocol. Communication result indicators such as success rate, latency, stability, and error rate are extracted and structured for use as update input data. For the connection edges between the target heterogeneous device and the target protocol, the edge weights are adjusted based on the actual communication results. If communication is successful and performance is excellent, the edge weight is increased; if communication fails or performance is poor, the edge weight is decreased or marked as abnormal; if no connection edge existed previously and communication was successful, the edge is added and its weight is initialized. Furthermore, a fixed periodic full update of the association graph is triggered. During the update period, information on newly added heterogeneous devices and protocols in the system is collected, and the new devices and protocols are added as nodes to the association graph. An initialization matching mechanism is used to establish their connection relationships with existing nodes. All device-protocol matching records and communication result feedback are integrated. Based on the feedback data, the connection edge weights are dynamically updated, invalid connections are deleted, or new connections are added. The attribute information of device and protocol entities is also updated periodically. Finally, the number of times each heterogeneous device successfully matches the protocol in actual operation (i.e., the matching frequency) is counted, and priority values are assigned to the first-layer nodes according to the frequency, with higher priority values assigned to those with higher frequencies.
[0081] The method provided in this embodiment dynamically updates the association graph based on actual communication results after the target protocol accesses the target heterogeneous device, thereby effectively correcting the entity relationships and weight information in the association graph. First, by collecting actual communication metrics and updating the weights of the connections between first-layer and second-layer nodes accordingly, or by adding / removing connections, the matching relationships reflected in the association graph are ensured to more closely reflect the actual communication capabilities of the current devices, achieving dynamic evolution of association relationships driven by data. Furthermore, by setting a preset update cycle for iterative reconstruction of the global graph structure, recently added heterogeneous device entities, protocol entities, and matching feedback data (such as the number of successful adaptations, failure rates, and adaptation stability) can be uniformly incorporated into the graph modeling process, expanding the dimension and depth of the graph node and edge sets. Based on this, the priority of heterogeneous devices in the association graph is dynamically adjusted according to their matching frequency (i.e., the number of times a device successfully establishes communication connections with different protocols within a certain period). For example, increasing the access weight or ranking priority of high-frequency matching device nodes can lead to priority recommendations in subsequent device access decisions, thereby improving the overall system's communication matching efficiency and stability. Through this "feedback-update-reconstruction-optimization" linkage mechanism, the association graph structure can continuously learn, optimize, and enhance itself, possessing good adaptive, scalable, and evolutionary capabilities, and providing strong intelligent support for multi-protocol access management.
[0082] Optionally, updating the association relationships in the association graph based on the actual communication results includes: obtaining the actual communication status after the target heterogeneous device and the target protocol communicate; finding the corresponding connection edges in the association graph based on the target heterogeneous device and the target protocol; adjusting the weight of the connection edges based on the actual communication status, increasing the weight of the connection edges when the actual communication status is successful, and decreasing the weight of the connection edges when the actual communication status is failed; and marking the connection edges as conflict relationships when the number of communication failures exceeds a preset threshold.
[0083] Specifically, after the target protocol connects to the target heterogeneous device, the communication monitoring module or protocol interface module collects status data in real time during the communication process. Based on the collected status data, it determines whether the communication is successful, forming a unified format communication status record. The status value can be set to 1 (success) or 0 (failure). Based on the target heterogeneous device entity and the target protocol entity currently communicating, it retrieves the connection edges between the corresponding first-layer nodes and second-layer nodes in the association graph. If the communication status is "successful" (status value 1), the current weight value of the connection edge is increased by a certain amount. If the communication status is "failed" (status value 0), the current weight value of the connection edge is decreased by a certain amount. A communication failure counter is maintained for each connection edge; each communication failure increments the counter. If the communication failure counter of a connection edge reaches or exceeds a safety threshold, the connection edge is marked as a "conflicting edge," and a conflict flag field is added to the association graph structure for subsequent association graph queries and recommendation filtering.
[0084] The method provided in this embodiment, in its first aspect, achieves hierarchical association modeling by constructing three types of connection edges through three rounds of screening. First, a first subset of protocols is selected based on historical communication protocols, and first connection edges are established according to fault states. This ensures priority connections to practically validated protocols, improving the stability and feasibility of recommended protocols. Assigning edge weights based on fault states reflects protocol robustness and avoids protocols with high failure rates. Next, after eliminating selected protocols, a second subset of protocols is selected by calculating the comprehensive matching degree between the remaining protocols and each layer of the communication network, and a second set of connection edges is constructed. Comprehensive analysis using network topology, load states, and other dimensions ensures that the selected protocols have good deployment conditions and performance in the network environment, avoiding the selection of protocols with poor network adaptability. Finally, device support is calculated for the remaining protocols, and a third set of connection edges is constructed to uncover potentially compatible protocols for the devices. This approach possesses scalability and foresight, helping the system achieve adaptive protocol recommendation. The combination of these three screening stages achieves a comprehensive analysis from known effectiveness to potential adaptability and future scalability, giving the device-protocol two-layer graph a structural characteristic that emphasizes realism, adaptability, and scalability, providing a high-quality graph foundation for subsequent protocol path search.
[0085] Secondly, by dynamically updating the association graph, the system improves the accuracy of adaptation and system performance. After the target protocol accesses the target heterogeneous device, the system collects the actual communication results and updates the association relationships in the association graph accordingly. If the communication is successful, the weight of the connection edge is increased; if it fails, the weight is decreased. If the number of failures exceeds a threshold, the conflict relationship is marked, ensuring that the matching relationship in the graph closely reflects the actual communication capability of the device and realizing the dynamic evolution of the association relationship driven by data. The system performs a global update every preset period, incorporating new devices, new protocols, and matching feedback information into the graph. The system adjusts the priority of the device in the graph based on the matching frequency, realizing the continuous self-learning, self-optimization, and self-enhancement of the graph structure. This gives the system good self-adaptation, expansion, and evolution capabilities, providing intelligent support for multi-protocol access management.
[0086] Thirdly, accurate protocol matching is achieved through multi-dimensional calculation and path search. When determining the target protocol, graph path scores are calculated based on three types of connection edges, and the target protocol is determined by combining the scores. Alternatively, candidate protocol sets are filtered by calculating node attribute similarity, and the optimal graph path is determined by combining the path search algorithm. Then, the target protocol is determined by generating matching scores based on path confidence and historical interaction records. The former comprehensively considers the protocol's historical performance, network adaptability, and device support, while the latter combines device and protocol attribute similarity and graph path information. Both methods achieve accurate determination of the matching protocol for target heterogeneous devices through multi-dimensional calculation and path search, solving the problems of low efficiency, poor adaptability, and difficulty in knowledge reuse in traditional methods, and significantly improving the automation and intelligence level of multi-protocol device access in industrial sites.
[0087] Corresponding to the aforementioned embodiment of a heterogeneous device multi-protocol adaptive access method based on association graph, this application also provides an embodiment of a heterogeneous device multi-protocol adaptive access device based on association graph.
[0088] Figure 2 This is a schematic diagram of the heterogeneous device multi-protocol adaptive access device based on correlation graphs provided in Embodiment 2 of this application. Please refer to... Figure 2 The apparatus provided in this embodiment includes an acquisition module 210, a construction module 220, and a determination module 230;
[0089] The acquisition module 210 is used to acquire heterogeneous device data and protocol data;
[0090] The construction module 220 is used to construct first-layer nodes with heterogeneous device entities, construct second-layer nodes with protocol entities, and determine the graph nodes of the upper and lower layers.
[0091] The determining module 230 is used to traverse the first-layer nodes and determine the connection relationship between the heterogeneous device entity corresponding to each node and the protocol entity corresponding to the second-layer node.
[0092] Specifically, for each first-layer target node in the first-layer nodes, multiple associated protocols of the heterogeneous device entity corresponding to the first-layer target node are obtained as a first candidate protocol set; a first protocol subset is selected from the first candidate protocol set based on the historical communication protocols of the heterogeneous device entity corresponding to the first-layer target node; a first connection edge is calculated based on the historical communication failure status to connect the first-layer target node and the node corresponding to the first protocol subset; the first protocol subset is removed from the first candidate protocol set to obtain a second candidate protocol set; the comprehensive matching degree between each protocol entity in the second candidate protocol set and each layer in the communication network is calculated to select a second protocol subset; the comprehensive matching degree is used as a second connection edge to connect the second-layer target node corresponding to the second protocol subset and the first-layer target node; the second protocol subset is removed from the second candidate protocol set to obtain a third candidate protocol set; the support degree of the first-layer target node for each protocol in the third candidate protocol set is calculated and used as a third connection edge to connect the first-layer target node and the second-layer target node corresponding to the third candidate protocol set.
[0093] The determining module 230 is also used to traverse the second-layer nodes, determine the connection relationship between the protocol entities corresponding to each node, and complete the construction of the association graph;
[0094] The determining module 230 is further configured to determine the target protocol that matches the target heterogeneous device to be accessed based on the association map, and access the target heterogeneous device based on the target protocol.
[0095] The apparatus of this embodiment can be used to perform... Figure 1 The steps of the method embodiment shown are similar in principle and process, and will not be repeated here.
[0096] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0097] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0098] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for multi-protocol adaptive access of heterogeneous devices based on correlation graphs, characterized in that, The method includes: Acquire data and protocol data from heterogeneous devices; The first-layer nodes are constructed using heterogeneous device entities, and the second-layer nodes are constructed using protocol entities, thus determining the graph nodes of the upper and lower layers. Traverse the first-level nodes to determine the connection relationship between the heterogeneous device entities corresponding to each node and the protocol entities corresponding to the second-level nodes; Specifically, for each first-layer target node in the first-layer nodes, multiple associated protocols of the heterogeneous device entity corresponding to the first-layer target node are obtained as a first candidate protocol set; a first protocol subset is selected from the first candidate protocol set based on the historical communication protocols of the heterogeneous device entity corresponding to the first-layer target node; a first connection edge is calculated based on the historical communication failure status to connect the first-layer target node and the node corresponding to the first protocol subset; the first protocol subset is removed from the first candidate protocol set to obtain a second candidate protocol set; the comprehensive matching degree between each protocol entity in the second candidate protocol set and each layer in the communication network is calculated to select a second protocol subset; the comprehensive matching degree is used as a second connection edge to connect the second-layer target node corresponding to the second protocol subset and the first-layer target node; the second protocol subset is removed from the second candidate protocol set to obtain a third candidate protocol set; the support degree of the first-layer target node for each protocol in the third candidate protocol set is calculated and used as a third connection edge to connect the first-layer target node and the second-layer target node corresponding to the third candidate protocol set. Traverse the second-level nodes to determine the connection relationships between the protocol entities corresponding to each node, and complete the construction of the association graph; Based on the association graph, the target protocol that matches the target heterogeneous device to be accessed is determined, and the target heterogeneous device is accessed based on the target protocol.
2. The method according to claim 1, characterized in that, The step of calculating the first connection edge based on historical communication failure states, connecting the first-layer target node and the node corresponding to the first protocol subset, includes: Obtain the protocol records used in the historical communication process of the heterogeneous device entity corresponding to the first-layer target node, and extract the communication fault status data of each protocol in the protocol records; Based on the communication fault status data, calculate the first association relationship between the heterogeneous device entity corresponding to the first layer target node and each historical usage protocol; In the second-layer nodes, determine the second-layer target nodes corresponding to each protocol entity in the first protocol subset; The first connection edge is constructed by using the first association relationship as the weight of the first connection edge and the first layer target node and the second layer target node as the nodes of the first connection edge.
3. The method according to claim 1, characterized in that, The calculation of the comprehensive matching degree between each protocol entity in the second candidate protocol set and each layer in the communication network includes: Identify the different communication layers in a communication network; For each protocol entity in the second candidate protocol set, a matching calculation method is used to calculate the adaptation index between the protocol entity and different communication layers based on the calculation method. The adaptation indexes are weighted and summed based on the weights corresponding to different communication layers to obtain the overall matching degree.
4. The method according to claim 1, characterized in that, The calculation of the support level of the first-layer target node for each protocol in the third candidate protocol set includes: Determine the number of communication functions that the heterogeneous device entity corresponding to the first layer target node can complete, determine the total number of functions supported by each protocol in the third candidate protocol set, and determine the first support degree based on the ratio of the number of communication functions to the total number of functions. Determine the number of historical versions that the heterogeneous device entity corresponding to the first layer target node can be compatible with, determine the total number of versions supported by each protocol in the third candidate protocol set, and determine the second support degree based on the ratio of the number of historical versions to the total number of versions; Determine the number of operation modes that the heterogeneous device entity corresponding to the first layer target node can support after extending the communication protocol, determine the total number of expected operation modes of each protocol in the third candidate protocol set, and determine the third support degree based on the ratio of the number of operation modes to the total number of expected operation modes. The first support, the second support, and the third support are weighted and summed based on the weights corresponding to different types of support to obtain the comprehensive support.
5. The method according to claim 1, characterized in that, The step of determining the target protocol that matches the target heterogeneous device to be accessed based on the association graph includes: Based on the first connection edge, a first subset of candidate protocols supported by the target heterogeneous device is determined; the first connection edge is a bidirectional edge, and the value of the first connection edge represents the historical communication failure state; Based on the second connection edge, the first protocol candidate subset is associated and sorted to obtain the sorted second protocol candidate subset; the second connection edge is an undirected edge, and the value of the second connection edge represents the comprehensive matching degree of the multi-layer communication network. Based on the third connecting edge, a compatibility analysis is performed on the second protocol candidate subset to obtain the final protocol matching set; the third connecting edge is a directed edge, and the value of the third connecting edge represents the protocol support degree. The graph path score between the target heterogeneous device and each protocol in the final protocol matching set is calculated based on the three types of connection edges. A comprehensive score is calculated based on the graph path score, and the target protocol of the target heterogeneous device is determined based on the comprehensive score.
6. The method according to claim 1, characterized in that, The step of determining the target protocol that matches the target heterogeneous device to be accessed based on the association graph includes: Based on the node attributes of the first-layer target nodes corresponding to the target heterogeneous devices, the attribute similarity between the node attributes and the attributes of the second-layer nodes in the association graph is calculated, and a first candidate protocol set is obtained from the second-layer nodes based on the attribute similarity. For the first candidate protocol set, based on the second and third connecting edges in the association graph, the optimal graph path between the first layer target node and each second layer node in the candidate protocol set is determined based on the path search algorithm; Based on the first connecting edge in the association graph, calculate the confidence of the optimal graph path; Based on the confidence of the optimal graph path and the historical interaction records in the first connection edge, a matching score is generated for the first candidate protocol set. The protocols in the first candidate protocol set are sorted according to the matching score, and the target protocol with the highest matching score is determined.
7. The method according to claim 6, characterized in that, The step of determining the optimal graph path between the first-layer target node and each second-layer node in the candidate protocol set based on the second and third connection edges in the association graph and a path search algorithm for the first candidate protocol set includes: For each second-layer node in the first candidate protocol set, based on the third connection edge in the association graph, determine the protocol directly associated with the target heterogeneous device and add it to the first candidate protocol set; Based on the second connection edge in the association graph, an extended protocol compatible with each candidate protocol in the supplemented first candidate protocol set is determined and added to the first candidate protocol set; Based on the path search algorithm, all possible paths between the first layer target node and each second layer node in the supplemented first candidate protocol set are traversed, and the shortest association path set is determined based on the path length. The quality of each shortest association path in the set of shortest association paths is analyzed, the confidence level of each shortest association path is determined based on the quality, and the shortest association paths are sorted and filtered based on the confidence level to determine the optimal graph path with the highest confidence level.
8. The method according to claim 1, characterized in that, After accessing the target heterogeneous device based on the target protocol, the method further includes: Collect the actual communication results of the target heterogeneous devices; Update the association relationships in the association graph based on the actual communication results; A global update is performed every preset period to incorporate new heterogeneous devices, new protocols, and matching feedback information into the association graph. The priority of the heterogeneous devices in the association graph is adjusted based on the matching frequency of the heterogeneous devices.
9. The method according to claim 8, characterized in that, Updating the association relationships in the association graph based on the actual communication results includes: The actual communication status after the target heterogeneous device communicates with the target protocol is obtained; Based on the target heterogeneous device and the target protocol, find the corresponding connection edges in the association graph; The weight of the connection edge is adjusted based on the actual communication state. When the actual communication state is successful, the weight of the connection edge is increased, and when the actual communication state is failed, the weight of the connection edge is decreased. When the number of communication failures exceeds a preset threshold, the connection edge is marked as a conflict relationship.
10. A heterogeneous device multi-protocol adaptive access device based on correlation graph, characterized in that, The device includes an acquisition module, a construction module, and a determination module; The acquisition module is used to acquire heterogeneous device data and protocol data; The construction module is used to construct first-layer nodes with heterogeneous device entities, construct second-layer nodes with protocol entities, and determine the graph nodes of the upper and lower layers. The determining module is used to traverse the first-layer nodes and determine the connection relationship between the heterogeneous device entity corresponding to each node and the protocol entity corresponding to the second-layer node. Specifically, for each first-layer target node in the first-layer nodes, multiple associated protocols of the heterogeneous device entity corresponding to the first-layer target node are obtained as a first candidate protocol set; a first protocol subset is selected from the first candidate protocol set based on the historical communication protocols of the heterogeneous device entity corresponding to the first-layer target node; a first connection edge is calculated based on the historical communication failure status to connect the first-layer target node and the node corresponding to the first protocol subset; the first protocol subset is removed from the first candidate protocol set to obtain a second candidate protocol set; the comprehensive matching degree between each protocol entity in the second candidate protocol set and each layer in the communication network is calculated to select a second protocol subset; the comprehensive matching degree is used as a second connection edge to connect the second-layer target node corresponding to the second protocol subset and the first-layer target node; the second protocol subset is removed from the second candidate protocol set to obtain a third candidate protocol set; the support degree of the first-layer target node for each protocol in the third candidate protocol set is calculated and used as a third connection edge to connect the first-layer target node and the second-layer target node corresponding to the third candidate protocol set. The determining module is also used to traverse the second-layer nodes, determine the connection relationship between the protocol entities corresponding to each node, and complete the construction of the association graph; The determining module is further configured to determine the target protocol that matches the target heterogeneous device to be accessed based on the association map, and access the target heterogeneous device based on the target protocol.
Citation Information
Patent Citations
Data processing method and device for heterogeneous equipment in Internet of Things of cloud computing platform
CN111970353A
Protocol conversion method based on knowledge graph
CN118101781A
Internet of Things data integration method and system based on dynamic semantic atlas and edge collaboration
CN119922223A
Power distribution automation non-inductive operation and maintenance method and system
CN119944950A
Multi-mode charging pile communication protocol self-adaption method and system
CN120091074A