An adaptive matching method and system for Internet of Things power protocol

By identifying and parsing terminal device information, building matching knowledge graphs, determining protocol conversion paths and adapting conversions, the complexity and high cost problems caused by the diversification of protocols in the power Internet of Things are solved, and efficient and stable communication between devices is achieved.

CN118869837BActive Publication Date: 2024-12-10CHINA YANGTZE POWER
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410823381.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-12-10
Estimated Expiration
2044-06-25

AI Technical Summary

Technical Problem

The diversification of communication protocols and data regulations in the existing power Internet of Things has led to complex and expensive data sharing and system deployment and operation and maintenance, resulting in low adaptability and inefficiency in communication collaboration.

Method used

By identifying terminal device information, using a protocol parser to parse the communication protocol, building a matching knowledge graph for multi-channel adaptive protocols, using feature recognition matching to determine the protocol conversion path, and performing adaptive conversion based on the conversion path, and configuring the adaptive matching channel.

Benefits of technology

It realizes seamless docking of different communication protocol devices on the Internet of Things power platform, improves the compatibility and scalability of the platform, and ensures efficient, accurate and stable operation of transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118869837B_ABST
    Figure CN118869837B_ABST
Patent Text Reader

Abstract

The present application provides an adaptive matching method and system for an Internet of Things power protocol, which relates to the field of Internet of Things communication technology. The method identifies terminal devices connected to an Internet of Things power platform, parses the communication protocol through a protocol parser, and obtains protocol features; constructs a matching knowledge graph of multiple adaptive protocols, uses protocol features and node protocol features in the graph to perform feature identification and matching, and determines common and differential features; takes the top-level target of the graph as a benchmark, performs conversion cost minimization evaluation, determines the protocol conversion path, performs adaptive conversion on the protocol features, and configures adaptive matching channels, thereby solving the problem that the power Internet of Things has diversified communication protocols and data specifications, which makes data sharing and system operation and maintenance complicated, and causes the adaptability and inefficiency of communication collaboration, and enables equipment to be seamlessly connected to the Internet of Things power platform, improves the compatibility and scalability of the platform, and ensures efficient, accurate, and stable operation of transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things communications, and in particular to an adaptive matching method and system for an Internet of Things power protocol. Background Art

[0002] The Internet of Things Power Protocol is an important foundation for the development of the power Internet of Things. It supports the transmission, management and control of energy data by realizing the interconnection between power equipment and systems, and provides support for energy intelligence. With the continuous development and application of Internet of Things technology, the Internet of Things Power Protocol will play an increasingly important role in the power field.

[0003] However, the existing power Internet of Things has a variety of communication protocols and data specifications, which makes data sharing and system deployment and operation and maintenance complicated and costly, resulting in problems with the adaptability and efficiency of communication collaboration. Summary of the invention

[0004] The present application provides an adaptive matching method and system for an Internet of Things power protocol, which is used to solve the technical problems that the existing power Internet of Things has diversified communication protocols and data specifications, resulting in complex and costly data sharing and system deployment and operation, and low adaptability and efficiency of communication collaboration.

[0005] In view of the above problems, the present application provides an adaptive matching method and system for an Internet of Things power protocol.

[0006] In a first aspect, the present application provides an adaptive matching method for an Internet of Things power protocol, the method being applied to an adaptive matching system for an Internet of Things power protocol, the method comprising:

[0007] Identify terminal device information connected to the IoT power platform, the terminal device information including the IoT terminal device type and its communication protocol;

[0008] Parsing the communication protocol in the terminal device information by a protocol parser to determine the terminal protocol characteristics;

[0009] Constructing a matching knowledge graph of multi-path adaptive protocols, wherein the matching knowledge graph includes a tree-like branch structure of multi-level targets and their conversion relationships, and each tree-like node has a node protocol feature;

[0010] Using the terminal protocol features and the node protocol features of each tree node to perform feature recognition matching to determine common features and difference features;

[0011] Taking the top-level target of the matching knowledge graph as a benchmark, determining the protocol conversion path by minimizing the conversion cost evaluation of the common features and the difference features;

[0012] Based on the protocol conversion path, the terminal protocol characteristics are adaptively converted to configure an adaptive matching channel for the type of the Internet of Things terminal device.

[0013] In a second aspect, the present application provides an adaptive matching system for an Internet of Things power protocol, the system comprising:

[0014] A device identification module, used to identify the terminal device information connected to the IoT power platform, wherein the terminal device information includes the IoT terminal device type and its communication protocol;

[0015] A protocol parsing module, used to parse the communication protocol in the terminal device information through a protocol parser to determine the terminal protocol characteristics;

[0016] A knowledge graph construction module is used to construct a matching knowledge graph of a multi-path adaptive protocol, wherein the matching knowledge graph includes a tree-like branch structure of multi-level targets and their conversion relationships, and each tree node has a node protocol feature;

[0017] A feature recognition and matching module is used to perform feature recognition and matching using the terminal protocol features and the node protocol features of each tree node to determine common features and difference features;

[0018] A conversion path determination module, used to determine a protocol conversion path by minimizing conversion cost evaluation of the common features and difference features based on the top-level target of the matching knowledge graph;

[0019] The channel matching module is used to adapt and convert the terminal protocol characteristics based on the protocol conversion path, and configure an adaptive matching channel for the type of the Internet of Things terminal device.

[0020] One or more technical solutions provided in this application have at least the following technical effects or advantages:

[0021] The present application provides an adaptive matching method for an Internet of Things power protocol, which identifies terminal device information connected to an Internet of Things power platform, wherein the terminal device information includes the type of the Internet of Things terminal device and its communication protocol; parses the communication protocol in the terminal device information through a protocol parser to determine the terminal protocol features; constructs a matching knowledge graph of multiple adaptive protocols, wherein the matching knowledge graph includes a multi-level target and a tree-type branch structure of conversion relationships, and each tree-type node has a node protocol feature; performs feature identification matching using the terminal protocol features and the node protocol features of each tree-type node to determine common features and difference features; takes the top-level target of the matching knowledge graph as a benchmark, determines a protocol conversion path by minimizing the conversion cost of the common features and difference features; performs adaptive conversion on the terminal protocol features based on the protocol conversion path, and configures an adaptive matching channel for the type of the Internet of Things terminal device, thereby solving the technical problems that the existing power Internet of Things has diversified communication protocols and data specifications, resulting in complex and costly data sharing and system deployment and operation, and low adaptability and efficiency of communication collaboration, and enables devices with different communication protocols to be seamlessly connected on the Internet of Things power platform, improves the compatibility and scalability of the platform, and ensures efficient, accurate, and stable operation of transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A schematic flow chart of an adaptive matching method for an Internet of Things power protocol is provided for this application;

[0023] Figure 2 A schematic diagram of the structure of an adaptive matching system for an Internet of Things power protocol is provided for this application.

[0024] Explanation of the accompanying drawings: device identification module 11, protocol analysis module 12, knowledge graph construction module 13, feature recognition and matching module 14, conversion path determination module 15, channel matching module 16. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0026] Embodiment 1

[0027] like Figure 1 As shown, the present application provides an adaptive matching method for an Internet of Things power protocol, the method is applied to an adaptive matching system for an Internet of Things power protocol, and the method includes:

[0028] Step S100: Identify the terminal device information connected to the IoT power platform, wherein the terminal device information includes the IoT terminal device type and its communication protocol;

[0029] The IoT power protocol refers to a series of standards and specifications used to achieve communication and data exchange between IoT devices and power networks in power systems. These protocols ensure that various devices in the power IoT can communicate and collaborate reliably and efficiently, thereby achieving intelligent management, optimized operation and energy efficiency improvement of the power system. The adaptive matching of the IoT power protocol refers to the automatic selection and optimization of applicable power protocols in the power IoT environment based on network conditions, device characteristics and business needs, so as to achieve more efficient and stable data communication and device collaboration.

[0030] Specifically, when performing adaptive matching of the IoT power protocol, the terminal devices connected to the IoT power platform are first identified, and the identification content includes the type of IoT terminal devices and their communication protocols to obtain terminal device information. Among them, the types of terminal devices of the IoT power platform are diverse, and according to their application scenarios and functions, they can be divided into gateway devices, smart home devices, industrial equipment remote monitoring systems, intelligent transportation equipment, medical equipment remote monitoring systems, and agricultural intelligent devices, etc. Specific devices can be Wi-Fi gateways, smart door locks, smart subways, etc. The communication protocol corresponds to the rules and standards for data exchange between terminal devices, such as the common MQTT (message queue telemetry transmission), CoAP (restricted application protocol), Bluetooth / BLE (Bluetooth low energy), etc.

[0031] By identifying the terminal device information connected to the IoT power platform, including the terminal device type and its communication protocol, the IoT power platform can be better managed and optimized, laying the foundation for adaptive matching of the protocol, thereby improving the platform's operating efficiency and stability.

[0032] Step S200: parsing the communication protocol in the terminal device information through a protocol parser to determine the terminal protocol characteristics;

[0033] Optionally, in order to understand the communication behavior of the device, ensure the correct transmission of data, optimize the network configuration, and formulate possible security policies, it is necessary to parse the communication protocol in the terminal device information through a protocol parser to determine the terminal protocol characteristics. Specifically, after the terminal device information of the connected device is identified and collected from the IoT power platform, the corresponding protocol parser is selected or developed according to the communication protocol listed in the collected terminal device information. The protocol parser can parse the data packet structure, field meaning, and communication process of the protocol. Then, the protocol parser is configured to identify and process the data packets of the target protocol, including setting data packet capture parameters, defining data packet parsing rules, and configuring necessary decoding libraries. The protocol parser is then used to capture the data packets sent and received by the terminal device on the IoT power platform, such as by monitoring network traffic, establishing a direct connection with the device, or using other capture mechanisms. Next, the protocol parser parses the captured data packets and extracts key information in the data packets, such as source address, destination address, data payload, protocol header field, etc. Finally, based on the parsed data packet information, analyze the characteristics of the terminal protocol, which may include: data packet format, such as the structure, field order and length of the data packet; communication mode, such as request-response mode, publish-subscribe mode, etc.; data encoding method, such as binary, text, JSON, XML, etc.; and the frequency of the device sending and receiving data packets, etc. Determine the corresponding terminal protocol characteristics for network configuration, performance optimization, security policy formulation, and integration with other systems.

[0034] Step S300: constructing a matching knowledge graph of multi-path adaptive protocols, wherein the matching knowledge graph includes a tree-like branch structure of multi-level targets and their conversion relationships, and each tree node has a node protocol feature;

[0035] Exemplarily, relevant data about multi-channel adaptive protocols are collected, including protocol specifications, conversion rules, historical cases, etc., and pre-processing operations such as cleaning, deduplication, and formatting are performed on the data to facilitate subsequent knowledge extraction and fusion. Among them, multi-channel adaptive protocol refers to a communication protocol process that can dynamically select or adjust communication paths and protocol parameters based on factors such as network conditions, device capabilities, and business needs. In other words, the system can detect and evaluate multiple available communication paths and select the most suitable path for communication based on current network conditions and business needs. Protocol parameters can be dynamically adjusted according to real-time network conditions. When a communication path or protocol parameter is no longer applicable, it can quickly switch to other paths or adjust parameters to ensure the continuity and reliability of communication, and can also be optimized across multiple network protocol layers to achieve end-to-end optimal communication performance.

[0036] Furthermore, natural language processing (NLP) and machine learning techniques are used to automatically extract entities, attributes and relationships about protocols from text data. Then, a matching knowledge graph is constructed, that is, the top-level concepts of the graph, such as "protocol", "target", "conversion relationship", etc., are defined, and the corresponding ontology is constructed; a tree-like branching structure is designed to represent multi-level targets and conversion relationships, and the hierarchy and association between nodes are determined. For each tree node, its unique protocol features are defined, including protocol type, parameters, status, etc., to form node protocol features, and how to represent and store these features for subsequent query and reasoning is determined. The duplicate, conflicting or ambiguous information that may exist in data from different sources is eliminated, and the same or similar entities, relationships and features are aligned and integrated to form a unified knowledge representation. The extracted and fused knowledge is subjected to ontology construction and quality assessment to form the final matching knowledge graph. When performing adaptive matching, the constructed efficient query and reasoning mechanism is used to perform complex queries and path reasoning based on node protocol features, automatically matching multiple adaptive protocols and giving suggestions or solutions for conversion relationships.

[0037] By constructing a matching knowledge graph of multi-path adaptive protocols, the adaptability and flexibility of the communication system can be significantly improved, the decision-making process can be optimized, cross-layer optimization can be supported, and the performance and reliability of the communication system can be ensured.

[0038] Step S400: performing feature recognition matching using the terminal protocol feature and the node protocol feature of each tree node to determine common features and difference features;

[0039] Specifically, based on the key features of the terminal protocol extracted from the terminal device information, the tree structure in the knowledge graph is traversed and compared, each tree node is accessed, and the node protocol features of each node are obtained. The terminal protocol features are compared with the node protocol features of each node one by one to identify the commonalities and differences between them. For each node, the common features and difference features with the terminal protocol are recorded. The common features indicate that the protocol or configuration represented by the node has certain similarities with the terminal protocol, while the difference features indicate the differences between them.

[0040] By identifying common features, the system can quickly locate the protocol or configuration option that best matches the terminal protocol, thereby improving the efficiency and accuracy of protocol selection; while the identification of difference features helps the system discover potential conflicts or mismatches between the terminal protocol and the existing protocol or configuration, so as to make early warnings or adjustments. Based on the analysis of common features and difference features, the system can make more intelligent adaptive adjustments to meet the actual needs of the terminal device.

[0041] Step S500: Taking the top-level target of the matching knowledge graph as a benchmark, determining a protocol conversion path by minimizing the conversion cost evaluation of the common features and the difference features;

[0042] Exemplarily, the top-level goal of the knowledge graph is clearly matched, which usually represents the performance requirements, business needs or optimization goals of the entire communication system. The top-level goal provides a benchmark for the subsequent conversion cost evaluation. Evaluate common features and difference features, where common features represent the similarities between the terminal protocol and one or more node protocols in the knowledge graph. The more common features, the higher the match between the two; and the difference features point out the differences between the terminal protocol and the node protocol. The identification of difference features helps to understand the adjustments or changes required to convert from the current protocol to the target protocol.

[0043] Furthermore, the conversion cost is defined. The conversion cost may include but is not limited to factors such as network resource consumption (such as bandwidth, time, etc.), device processing power, and communication reliability. These costs need to be quantified according to the specific communication environment and business needs. Based on the definition of top-level goals and conversion costs, an evaluation model is constructed. The model can comprehensively consider common features and difference features, as well as their impact on the conversion cost. In addition, there may be multiple conversion paths from the current protocol to the target protocol in the tree structure of the knowledge graph. The evaluation model can calculate and compare the conversion cost of each path, and select the path with the smallest conversion cost as the final protocol conversion path.

[0044] For example, suppose the top-level goal is to optimize the overall performance of the communication system and reduce communication latency. When evaluating common features and difference features, it is found that the terminal protocol has more common features with node A, but there is a large difference in transmission rate with node B. Through the evaluation model calculation, it is found that the conversion cost from node A to the target node is small, and the path is stable and reliable. Therefore, the conversion path from node A to the target node is finally determined to be the optimal path. Therefore, determining the optimal protocol conversion path helps to optimize the performance of the communication system, improve communication efficiency and reduce communication costs.

[0045] Step S600: Adaptively convert the terminal protocol characteristics based on the protocol conversion path, and configure an adaptive matching channel for the IoT terminal device type.

[0046] Furthermore, the terminal protocol characteristics are adapted and converted according to the determined protocol conversion path, and the adaptation conversion process includes data format conversion, transmission rate adjustment, communication mode conversion, etc. After the adaptation conversion is completed, the adaptive matching channel of the IoT terminal device type is configured, that is, when a new terminal device is connected, the system can automatically identify the type of the connected terminal device and automatically select the corresponding adaptation conversion path and establish a communication connection, thereby completing the adaptive matching of the IoT power protocol.

[0047] After completing the configuration of the adaptive matching channel, you can also conduct sufficient testing to ensure that it works properly. The test should cover various possible scenarios and terminal device types to ensure that the system can correctly identify the device type and select the appropriate adaptation conversion path. Finally, optimization and adjustment are carried out based on the test results to improve the stability and performance of the system and achieve interoperability between different protocols and devices.

[0048] Furthermore, before parsing the communication protocol in the terminal device information by the protocol parser, step S200 of the present application further includes:

[0049] Step S210: Setting a protocol specification structure, wherein the protocol specification structure includes a data packet structure, a transmission rate, an encoding method, and a verification method;

[0050] Step S220: Annotate data fields and structures based on the protocol specification structure to construct a training data set, wherein the training data set includes positive samples and negative samples, wherein the positive samples are normal data packets and the negative samples are abnormal data packets;

[0051] Step S230: configuring the weights of the positive sample and the negative sample, and performing protocol parser training, wherein the protocol parser is used to extract and decode each data field of the data packet.

[0052] Optionally, in order to ensure that the data packet can be correctly parsed and processed, a protocol specification structure is set in the Internet of Things system and the protocol parser is trained based on these specifications. First, a protocol specification structure is set, and the protocol specification structure includes a data packet structure, a transmission rate, an encoding method, and a verification method. Among them, the data packet structure refers to the format of the data packet, including the start byte, the length field, the data field, the checksum, and the end byte, etc., each field has its specific length and meaning; the transmission rate is the transmission rate of the specified data packet on the communication link, which determines the rate at which the data packet is sent and received; the encoding method is to select one or more encoding methods, such as ASCII, UTF-8, binary, etc., for converting the data field in the data packet into a format that can be transmitted on the network; the verification method refers to defining one or more verification methods, such as cyclic redundancy check, checksum, etc., for verifying whether an error occurs during the transmission of the data packet.

[0053] Next, each data field and structure is annotated according to the protocol specification structure, including field name, data type, length, offset and other information. These annotations will be used for subsequent protocol parser training. Collect a series of normal data packets that conform to the protocol specification structure as positive samples. These data packets contain various possible normal and boundary conditions to ensure that the protocol parser can handle various situations. Then collect or construct a series of abnormal data packets that do not conform to the protocol specification structure as negative samples. These data packets may contain incorrect data fields, incorrect checksums, incorrect formats, etc. Positive and negative samples constitute the training data set.

[0054] Further, according to the importance of the samples and the training requirements, the weights of positive and negative samples are configured. For example, if you are more concerned about identifying abnormal packets, you can set a higher weight for negative samples. Train the protocol parser using the configured training dataset. A protocol parser is usually a machine learning model or algorithm that can extract and decode individual data fields from the byte stream of a packet. During the training process, the model learns how to identify different fields from the byte stream of a packet and decode them to obtain the original data.

[0055] By establishing a protocol parser based on the protocol specification structure, it is possible to effectively extract and decode each data field in the data packet, which is of great significance for realizing the interconnection, data processing and security management of IoT devices.

[0056] Furthermore, the construction of the matching knowledge graph of the multi-path adaptive protocol, step S300 of the present application further includes:

[0057] Step S310: Obtaining the compatible protocol of the IoT power platform;

[0058] Step S320: collecting device protocols based on the connection terminal type of the IoT power platform and building a device protocol cluster, wherein the device protocol cluster includes a platform interface, a device type and its device protocol;

[0059] Step S330: establishing a conversion relationship between the device protocol and the compatible protocol;

[0060] Step S340: performing knowledge graph edge length conversion according to the conversion relationship to obtain the relationship edge length between each device protocol and the compatible protocol;

[0061] Step S350: Perform multi-level target configuration based on the relationship edge length, construct a matching knowledge graph of the multi-path adaptive protocol according to the multi-level targets and the corresponding relationship edge lengths, parse the protocol features of the multi-level targets, and generate a node protocol feature identifier based on the protocol features.

[0062] For example, understand the list of compatible protocols supported by the IoT power platform, including communication protocols such as MQTT, CoAP, HTTP, and AMQP. Interact with the platform provider or technical documentation to clarify the protocols and versions supported by the platform. Collect the communication protocols of various devices according to the connection terminal type of the IoT power platform (such as smart meters, charging piles, sensors, etc.). Classify the collected device protocols and build a device protocol cluster. This cluster needs to include the platform interface (API), device type, and corresponding device protocol.

[0063] Next, analyze the differences between the device protocol and the compatible protocol, including data format, communication method, security and other aspects, and establish a conversion relationship from the device protocol to the compatible protocol based on these differences, which may involve steps such as data conversion, encryption and decryption, and message encapsulation. Furthermore, perform edge length conversion on the knowledge graph based on the conversion relationship. The knowledge graph is a data structure that represents the relationship between entities. The entities are the device protocol and the compatible protocol, and the relationship is the conversion relationship between them. The established conversion relationship is converted into the edge length in the knowledge graph, which may represent the complexity of the conversion, time overhead, resource consumption, etc. And the more steps there are in the conversion between the device protocol and the compatible protocol, the greater the difficulty, and the longer the edge length of the conversion relationship.

[0064] Then, evaluate the edge length of each conversion path, including direct conversion and indirect conversion, identify key conversion points, that is, conversion steps with longer edge length or higher resource consumption, select the shortest or most direct conversion path that can ensure the successful connection of the device to the platform for multi-level basic layer configuration, and then consider optimizing communication efficiency on the basis of the basic layer, select conversion paths with shorter edge length and lower resource consumption for multi-level optimization layer configuration, and so on, layer by layer to achieve higher-level configuration and complete multi-level target configuration. Then, build a matching knowledge graph of multi-path adaptive protocols based on multi-level targets and corresponding relationship edge lengths. This graph will show how different device protocols can achieve target compatible protocols through different conversion paths. And parse the protocol features of multi-level targets, which may include communication efficiency, data security, scalability, etc. Based on the parsed protocol features, generate feature identifiers for each node (device protocol or compatible protocol), which will be used for efficient search and matching in the knowledge graph.

[0065] Furthermore, multi-level target configuration is performed based on the relationship edge length, and a matching knowledge graph of the multi-path adaptive protocol is constructed according to the multi-level targets and the corresponding relationship edge lengths. Step S350 of the present application also includes:

[0066] Step S351: clustering the relationships according to the relationship edge lengths and a preset difference step length, and sorting the relationships from large to small according to the average edge lengths of the clusters;

[0067] Step S352: Pair the device protocols in the relationship clusters in order from large to small according to the sorting, establish a protocol conversion relationship for multiple cluster relationships, and configure the cross conversion edge length;

[0068] Step S353: Taking the compatible protocol as the end point and the device protocol as the starting point, a minimum edge length search is performed according to the cross conversion edge length and the relationship edge length to obtain the direct conversion edge length and the transit conversion edge length of each device protocol;

[0069] Step S354: screening the direct conversion side length and the intermediate conversion side length by using the target difference requirement to determine the diagram side length of the device;

[0070] Step S355: Configure the multi-level targets according to the graph edge length of the device and the conversion relationship of the device protocol, and construct the matching knowledge graph using the multi-level targets and the graph edge length, wherein the top-level target of the matching knowledge graph is a device protocol that has a direct conversion relationship with a compatible protocol and whose graph edge length satisfies a preset length.

[0071] Specifically, the device protocols are clustered according to the relationship lengths calculated after the similarity and difference between the device protocols and the preset difference step length, such as the device protocols with relationship lengths less than or equal to the preset difference step length can be classified into the same cluster. Among them, the preset difference step length is a threshold value used to determine which device protocols should be classified into the same cluster. This step length can be set according to actual needs, and it determines the granularity of the cluster. For each cluster, the average value of the relationship lengths between all the device protocols inside it is calculated to obtain the average length of the cluster, and all clusters are sorted from large to small according to their average lengths, so that the clusters with larger internal differences will be ranked in front. Starting from the cluster with the largest average length, the device protocols therein are taken out one by one for pairing. The purpose of pairing is to establish a conversion relationship between these device protocols. For each pair of device protocols, determine the specific steps, conditions or tools required for how to convert from one protocol to another. In addition, for each established protocol conversion relationship, it is necessary to evaluate its conversion complexity, and evaluating the conversion complexity helps to determine the feasibility and priority of the conversion. According to the evaluation result of the conversion complexity, the cross conversion length is configured for each protocol conversion relationship. The cross-conversion edge length is a quantitative indicator used to represent the cost or overhead required to convert the device protocol in one cluster to the device protocol in another cluster. This edge length can be set based on factors such as conversion complexity, resource consumption, and time cost.

[0072] Further, the device protocol that needs to be converted is used as the search starting point, and the target protocol (i.e., compatible protocol) to which the device protocol is to be converted is used as the search end point to perform the minimum edge length search. Specifically, for each device protocol, search whether there is a path that can be directly converted to the compatible protocol. If so, calculate the sum of all the relationship edge lengths on this path to obtain the direct conversion edge length. If the direct conversion edge length does not exist or is too large, consider transiting through other protocols, search all possible transit paths, and calculate the sum of all the relationship edge lengths on each transit path to obtain the transit conversion edge length. At the same time, it is also necessary to consider the cross-conversion edge length, that is, the additional overhead required when converting between different clusters. Record the direct conversion edge length and transit conversion edge length of each device protocol. Next, determine the target difference requirements, which include conversion efficiency, cost, time, etc. For example, it may be required that the direct conversion edge length is less than a certain threshold, or that the transit conversion edge length does not exceed a certain upper limit. Here, those skilled in the art can set it according to their needs. Then, the direct conversion edge length and the transit conversion edge length are screened according to the target difference requirements, and the edge lengths that do not meet the requirements will be excluded. Select the smaller value between the direct conversion side length and the transfer conversion side length as the atlas side length of the device. If the direct conversion side length meets the requirements and is smaller than the transfer conversion side length, select the direct conversion side length; otherwise, select the transfer conversion side length.

[0073] The hierarchical structure of the knowledge graph is determined based on the complexity of the conversion relationship between the device protocol and the compatible protocol and the length of the graph edge. The hierarchical structure is a tree structure, in which each node represents a device protocol or protocol cluster, and the higher the level of the node, the closer the direct or indirect relationship with the compatible protocol. The configured multi-level targets include top-level targets, middle-level targets, and bottom-level targets. Among them, the top-level targets are device protocols that have a direct conversion relationship with the compatible protocol and the graph edge length meets the preset length. These protocols will be directly connected to the compatible protocol and serve as the root node of the knowledge graph; for device protocols that cannot be directly converted to the compatible protocol, they will serve as middle-level targets. These protocols can be transferred through other protocols or clusters and finally reach the compatible protocol. The middle-level targets will be configured based on the conversion relationship between them and the top-level targets and the length of the graph edge; the bottom-level targets are those device protocols that have a distant conversion relationship with the compatible protocol or a more complex transfer path. They will serve as leaf nodes of the knowledge graph. Create an empty knowledge graph structure, add the compatible protocol as the central node (top node) of the graph to the knowledge graph, add the device protocol that meets the top-level target conditions as a direct child node under the compatible protocol, and gradually add other device protocols or protocol clusters as child nodes according to the intermediate level targets and the bottom level targets to build the hierarchical structure of the entire knowledge graph. Then, according to the conversion relationship of the device protocols, add edges to the knowledge graph to represent these relationships. Edges can point from one device protocol to another, or from one protocol cluster to another. For direct conversion relationships, edges can point directly from device protocols to compatible protocols; for transit relationships, edges will be connected through intermediate nodes (other device protocols or protocol clusters).

[0074] By constructing a matching knowledge graph based on the edge length of the device graph and the device protocol conversion relationship, it is used to guide tasks such as protocol compatibility analysis and conversion path planning. By constructing a matching knowledge graph and performing path search and evaluation, the optimal protocol conversion path can be flexibly selected according to actual needs and business scenarios. This flexibility and scalability enable the system to adapt to the ever-changing technology and business environment.

[0075] Furthermore, based on the top-level target of the matching knowledge graph, the protocol conversion path is determined by minimizing the conversion cost of the common features and the difference features. Step S500 of the present application also includes:

[0076] Step S510: performing a path hierarchical search with the most common features as a screening direction to obtain a first conversion path;

[0077] Step S520: performing a path hierarchical search with the minimum difference feature as the screening direction to obtain a second conversion path;

[0078] Step S530: determining whether the first conversion path is identical to the second conversion path; if so, merging the conversion paths as the protocol conversion path.

[0079] Furthermore, after determining whether the first conversion path is the same as the second conversion path, step S530 of the present application further includes:

[0080] Step S531: when the first conversion path is different from the second conversion path, using a cost function to evaluate the conversion paths to obtain a first path cost value and a second path cost value;

[0081] Step S532: Based on the first path cost value and the second path cost value, determine the protocol conversion path, and the protocol conversion path is the path with the minimum cost value.

[0082] Furthermore, the cost function is used to evaluate the conversion path, and step S531 of the present application further includes:

[0083] By formula: Conduct conversion path evaluation to obtain the cost value of the conversion path;

[0084] in, f(t i ) is the normalized value of the conversion time cost of the i-th path node, is the normalized value of the conversion data loss cost of the i-th path node, q is the number of path nodes, and w t is the weight of the conversion time cost value, is the weight of conversion accuracy loss, i is the path node sequence, i is a positive integer, is the data conversion remainder of the i-th path node.

[0085] Optionally, starting from the starting device protocol node, search for possible conversion paths in the matching knowledge graph, traverse all neighbor nodes of the current node, calculate the number of common features between these nodes, select the neighbor node with the most common features as the next conversion target, repeat this process until the target compatible protocol node is reached or there are no more paths to choose from, and record the searched path as the first conversion path. Also starting from the starting device protocol node, search for possible conversion paths in the matching knowledge graph, traverse all neighbor nodes of the current node, calculate the number of difference features between these nodes, select the neighbor node with the smallest difference feature as the next conversion target, repeat this process until the target compatible protocol node is reached or there are no more paths to choose from, and record the searched path as the second conversion path. Further, compare whether the first conversion path and the second conversion path are the same. The same here means that the node sequence and edge sequence on the path are completely consistent. If the two paths are the same, it means that the same results are obtained based on the two screening directions of the most common features and the smallest difference features, and they can be merged and regarded as the same path. If the two paths are different, the cost function is used to evaluate the conversion path to determine the protocol conversion path.

[0086] Define a cost function that quantifies the cost of a conversion path. The cost may be based on a variety of factors, such as the complexity of the conversion, the time required, resource consumption, risk, etc. These factors can be selected and weighted according to specific needs. For example, a simple cost function can be the sum of the weights of all edges on the path, where the weight of the edge can represent the complexity or cost of the conversion. Traverse all edges on the first conversion path, for each edge, calculate according to its weight (that is, the cost of the conversion), and add up the costs of all edges to obtain the total cost value of the first path, that is, the first path cost value. Similarly, traverse all edges on the second conversion path, for each edge, calculate according to its weight, and add up the costs of all edges to obtain the total cost value of the second path, that is, the second path cost value.

[0087] The cost function is used to evaluate the conversion path, and the cost value of the conversion path can be obtained based on the general formula Calculate. Among them, f(t i ) is the normalized value of the conversion time cost of the i-th path node, is the normalized value of the conversion data loss cost of the i-th path node, q is the number of path nodes, and w t is the weight of the conversion time cost value, is the weight of conversion accuracy loss, i is the path node sequence, i is a positive integer, is the data conversion remainder of the i-th path node.

[0088] Finally, the cost of the first path is compared with the cost of the second path, and the path with the smaller cost is selected as the protocol conversion path. If the cost of the two paths is the same, further selection can be made based on other factors (such as stability, reliability, etc.).

[0089] By performing a hierarchical search of paths with the most common features and the least different features as the screening direction, two conversion paths with different focuses can be obtained, providing a variety of options for subsequent path selection. Using the cost function to quantitatively evaluate the first conversion path and the second conversion path can objectively reflect the cost of the two paths during the conversion process, which helps to more accurately compare the pros and cons of different paths and make more reasonable choices. Using the path with the smallest cost value as the final protocol conversion path improves the efficiency and feasibility of the conversion. Selecting the protocol conversion path with the smallest cost value helps to optimize resource utilization and cost control, shorten conversion time, reduce error rate and increase conversion success rate, thereby improving user experience and satisfaction.

[0090] Through the technical solutions of the above-mentioned embodiments, the present application provides an adaptive matching method for the Internet of Things power protocol, which solves the technical problems that the existing power Internet of Things has diversified communication protocols and data specifications, resulting in complex and costly data sharing and system deployment and operation and maintenance, and low adaptability and efficiency of communication collaboration. It enables devices with different communication protocols to be seamlessly connected on the Internet of Things power platform, improves the compatibility and scalability of the platform, and ensures efficient, accurate, and stable operation of transmission.

[0091] Embodiment 2

[0092] Based on the same inventive concept as the adaptive matching method of an Internet of Things power protocol in the aforementioned embodiment, Figure 2 As shown, the present application provides an adaptive matching system for an Internet of Things power protocol, the system comprising:

[0093] The device identification module 11 is used to identify the terminal device information connected to the IoT power platform, wherein the terminal device information includes the IoT terminal device type and its communication protocol;

[0094] The protocol parsing module 12 is used to parse the communication protocol in the terminal device information through a protocol parser to determine the terminal protocol characteristics;

[0095] The knowledge graph construction module 13 is used to construct a matching knowledge graph of a multi-path adaptive protocol, wherein the matching knowledge graph includes a tree-like branch structure of multi-level targets and their conversion relationships, and each tree node has a node protocol feature;

[0096] A feature recognition and matching module 14 is used to perform feature recognition and matching using the terminal protocol features and the node protocol features of each tree node to determine common features and difference features;

[0097] A conversion path determination module 15 is used to determine a protocol conversion path by minimizing conversion cost evaluation of the common features and the difference features based on the top-level target of the matching knowledge graph;

[0098] The channel matching module 16 is used to perform adaptive conversion on the terminal protocol characteristics based on the protocol conversion path, and configure an adaptive matching channel for the type of the IoT terminal device.

[0099] Furthermore, the protocol parsing module 12 is further configured to perform the following steps:

[0100] Setting a protocol specification structure, wherein the protocol specification structure includes a data packet structure, a transmission rate, an encoding method, and a verification method;

[0101] Based on the protocol specification structure, data fields and structures are annotated to construct a training data set, wherein the training data set includes positive samples and negative samples, wherein the positive samples are normal data packets and the negative samples are abnormal data packets;

[0102] The weights of the positive samples and the negative samples are configured to train a protocol parser, where the protocol parser is used to extract and decode each data field of a data packet.

[0103] Furthermore, the knowledge graph construction module 13 is also used to perform the following steps:

[0104] Obtain compatible protocols for the IoT power platform;

[0105] Collect device protocols based on the connection terminal type of the IoT power platform and build a device protocol cluster, where the device protocol cluster includes a platform interface, device type and its device protocol;

[0106] Establishing a conversion relationship between the device protocol and the compatible protocol;

[0107] Perform knowledge graph edge length conversion according to the conversion relationship to obtain the relationship edge length between each device protocol and the compatible protocol;

[0108] Multi-level target configuration is performed based on the relationship edge length, a matching knowledge graph of the multi-path adaptive protocol is constructed according to the multi-level targets and the corresponding relationship edge lengths, the protocol features of the multi-level targets are analyzed, and a node protocol feature identifier is generated based on the protocol features.

[0109] Furthermore, the knowledge graph construction module 13 is also used to perform the following steps:

[0110] According to the relationship edge lengths, the relationships are clustered according to a preset difference step length, and the clusters are sorted from large to small according to the average edge lengths of the clusters;

[0111] Pair the device protocols in the relationship clusters in order from large to small according to the sorting, establish the protocol conversion relationship of the multi-cluster relationship, and configure the cross conversion edge length;

[0112] Taking the compatible protocol as the end point and the device protocol as the starting point, a minimum edge length search is performed according to the cross conversion edge length and the relationship edge length to obtain the direct conversion edge length and the transit conversion edge length of each device protocol;

[0113] The direct conversion side length and the intermediate conversion side length are screened by using the target difference requirement to determine the atlas side length of the device;

[0114] The multi-level targets are configured according to the graph edge length of the device and the conversion relationship of the device protocol, and the matching knowledge graph is constructed using the multi-level targets and the graph edge length, wherein the top-level target of the matching knowledge graph is a device protocol that has a direct conversion relationship with a compatible protocol and whose graph edge length satisfies a preset length.

[0115] Furthermore, the conversion path determination module 15 is further configured to perform the following steps:

[0116] Performing a path hierarchical search with the most common features as a screening direction to obtain a first conversion path;

[0117] Performing a path hierarchical search with the minimum difference feature as the screening direction to obtain a second conversion path;

[0118] It is determined whether the first conversion path is the same as the second conversion path. If they are the same, the conversion paths are combined as the protocol conversion path.

[0119] Furthermore, the conversion path determination module 15 is further configured to perform the following steps:

[0120] When the first conversion path is different from the second conversion path, using a cost function to evaluate the conversion paths to obtain a first path cost value and a second path cost value;

[0121] The protocol conversion path is determined based on the first path cost value and the second path cost value, and the protocol conversion path is a path with the smallest cost value.

[0122] Furthermore, the conversion path determination module 15 is further configured to perform the following steps:

[0123] By formula: Conduct conversion path evaluation to obtain the cost value of the conversion path;

[0124] in, f(t i ) is the normalized value of the conversion time cost of the i-th path node, is the normalized value of the conversion data loss cost of the i-th path node, q is the number of path nodes, and w t is the weight of the conversion time cost value, is the weight of conversion accuracy loss, i is the path node sequence, i is a positive integer, is the data conversion remainder of the i-th path node.

[0125] Through the above-mentioned detailed description of an adaptive matching method of an Internet of Things power protocol in this specification, those skilled in the art can clearly understand an adaptive matching system of an Internet of Things power protocol in this embodiment. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0126] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An adaptive matching method for an Internet of Things power protocol, characterized in that: The method comprises: Identify terminal device information connected to the IoT power platform, the terminal device information including the IoT terminal device type and its communication protocol; Parsing the communication protocol in the terminal device information by a protocol parser to determine the terminal protocol characteristics; Constructing a matching knowledge graph of multi-path adaptive protocols, wherein the matching knowledge graph includes a tree-like branch structure of multi-level targets and their conversion relationships, and each tree-like node has a node protocol feature; Using the terminal protocol features and the node protocol features of each tree node to perform feature recognition matching to determine common features and difference features; Taking the top-level target of the matching knowledge graph as a benchmark, determining the protocol conversion path by minimizing the conversion cost evaluation of the common features and the difference features; Adaptively convert the terminal protocol characteristics based on the protocol conversion path, and configure an adaptive matching channel for the type of the IoT terminal device; The construction of a matching knowledge graph of a multi-path adaptive protocol includes: Obtain compatible protocols for the IoT power platform; Collect device protocols based on the connection terminal type of the IoT power platform and build a device protocol cluster, where the device protocol cluster includes a platform interface, device type and its device protocol; Establishing a conversion relationship between the device protocol and the compatible protocol; Perform knowledge graph edge length conversion according to the conversion relationship to obtain the relationship edge length between each device protocol and the compatible protocol; Perform multi-level target configuration based on the relationship edge length, construct a matching knowledge graph of the multi-path adaptive protocol according to the multi-level targets and the corresponding relationship edge lengths, parse the protocol features of the multi-level targets, and generate a node protocol feature identifier based on the protocol features; Based on the relationship edge length, a multi-level target configuration is performed, and a matching knowledge graph of the multi-path adaptive protocol is constructed according to the multi-level targets and the corresponding relationship edge lengths, including: According to the relationship edge lengths, the relationships are clustered according to a preset difference step length, and the clusters are sorted from large to small according to the average edge lengths of the clusters; Pair the device protocols in the relationship clusters in order from large to small according to the sorting, establish the protocol conversion relationship of the multi-cluster relationship, and configure the cross conversion edge length; Taking the compatible protocol as the end point and the device protocol as the starting point, a minimum edge length search is performed according to the cross conversion edge length and the relationship edge length to obtain the direct conversion edge length and the transit conversion edge length of each device protocol; The direct conversion side length and the intermediate conversion side length are screened by using the target difference requirement to determine the atlas side length of the device; The multi-level targets are configured according to the graph edge length of the device and the conversion relationship of the device protocol, and the matching knowledge graph is constructed using the multi-level targets and the graph edge length, wherein the top-level target of the matching knowledge graph is a device protocol that has a direct conversion relationship with a compatible protocol and whose graph edge length satisfies a preset length.

2. The method according to claim 1, characterized in that Before parsing the communication protocol in the terminal device information by a protocol parser, the method includes: Setting a protocol specification structure, wherein the protocol specification structure includes a data packet structure, a transmission rate, an encoding method, and a verification method; Based on the protocol specification structure, data fields and structures are annotated to construct a training data set, wherein the training data set includes positive samples and negative samples, wherein the positive samples are normal data packets and the negative samples are abnormal data packets; The weights of the positive samples and the negative samples are configured to train a protocol parser, where the protocol parser is used to extract and decode each data field of a data packet.

3. The method according to claim 1, characterized in that Based on the top-level target of the matching knowledge graph, the protocol conversion path is determined by minimizing the conversion cost of the common features and the difference features, including: Performing a path hierarchical search with the most common features as a screening direction to obtain a first conversion path; Perform path hierarchical search with the minimum difference feature as the screening direction to obtain a second conversion path; It is determined whether the first conversion path is the same as the second conversion path. If they are the same, the conversion paths are combined as the protocol conversion path.

4. The method according to claim 3, characterized in that After determining whether the first conversion path is the same as the second conversion path, the method further includes: When the first conversion path is different from the second conversion path, using a cost function to evaluate the conversion paths to obtain a first path cost value and a second path cost value; The protocol conversion path is determined based on the first path cost value and the second path cost value, and the protocol conversion path is a path with the smallest cost value.

5. The method according to claim 4, characterized in that The use of a cost function to evaluate the conversion path includes: By formula: , conduct conversion path evaluation and obtain the cost value of the conversion path; in, , is the normalized value of the conversion time cost of the i-th path node, is the normalized value of the conversion data loss cost of the i-th path node, q is the number of path nodes, is the weight of the conversion time cost value, is the weight of the conversion data loss cost value, i is the path node sequence, i is a positive integer, is the data conversion remainder of the i-th path node.

6. An adaptive matching system for an Internet of Things power protocol, characterized in that: For implementing the method according to any one of claims 1 to 5, the system comprises: A device identification module, used to identify the terminal device information connected to the IoT power platform, wherein the terminal device information includes the IoT terminal device type and its communication protocol; A protocol parsing module, used to parse the communication protocol in the terminal device information through a protocol parser to determine the terminal protocol characteristics; A knowledge graph construction module is used to construct a matching knowledge graph of a multi-path adaptive protocol, wherein the matching knowledge graph includes a tree-like branch structure of multi-level targets and their conversion relationships, and each tree node has a node protocol feature; A feature recognition and matching module is used to perform feature recognition and matching using the terminal protocol features and the node protocol features of each tree node to determine common features and difference features; A conversion path determination module, used to determine a protocol conversion path by minimizing conversion cost evaluation of the common features and difference features based on the top-level target of the matching knowledge graph; The channel matching module is used to adapt and convert the terminal protocol characteristics based on the protocol conversion path and configure an adaptive matching channel for the type of the Internet of Things terminal device.

Citation Information

Patent Citations

  • Gateway protocol adaptation extension conversion method and system based on knowledge graph

    CN117938976A

  • Multi-protocol compatible network equipment adaptive test system and method

    CN118101532A

  • Protocol conversion method based on knowledge graph

    CN118101781A