Terminal protocol integration and calling method, device, computer equipment, storage medium

By summarizing and integrating the communication protocols of industrial IoT terminal devices, the master node and child node are built, and the inefficiency problem caused by the excessive number of communication protocols is solved, and efficient protocol management and call are achieved.

CN115914427BActive Publication Date: 2024-11-15NINGBO YITAI CLOUD SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211302971.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-24
Publication Date
2024-11-15
Estimated Expiration
2042-10-24

AI Technical Summary

Technical Problem

With the increase in the number of industrial IoT terminal devices, the number of communication protocols has shown explosive growth, resulting in inefficient query acquisition and call in the host.

Method used

By receiving protocol information sent by the control end, a communication protocol is built and similar protocols are summarized into a protocol collection, identifying public and non-public parts, building master and child nodes, forming integrated protocols, reducing protocol storage volume and improving query and call efficiency .

Benefits of technology

While ensuring the comprehensiveness of the communication protocol, it reduces the number of protocols and memory usage, improves the query and call efficiency of communication protocols, and simplifies the management of a large number of terminal protocols.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115914427B_ABST
    Figure CN115914427B_ABST
Patent Text Reader

Abstract

The present application relates to the field of communication technology, and provides a terminal protocol integration and calling method, device, computer equipment, and storage medium, including: receiving protocol information sent by a control terminal, constructing a communication protocol according to the protocol information, and saving the communication protocol in a preset protocol library; aggregating similar communication protocols in the protocol library into a protocol set, and saving at least one protocol set in an integrated library; identifying the common parts of each communication protocol in the protocol set, constructing a main node corresponding to the common part in the integrated library, and constructing a sub-node corresponding to the non-public part in the communication protocol, and associating the main node and the sub-node to obtain an integrated protocol of the protocol set. Under the premise of ensuring the comprehensiveness of the communication protocols in the integrated library, the present application greatly reduces the number of protocols and the memory they occupy, so as to facilitate the management of the communication protocols of a large number of terminals, and at the same time greatly improves the query and calling efficiency of the communication protocols.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a terminal protocol integration and calling method, device, computer equipment, and storage medium. Background Art

[0002] With the development of the Industrial Internet of Things, a large number of Industrial Internet of Things terminals (such as sensor devices and smart devices) will emerge, and these terminals need to be directly or indirectly connected to the host of the Industrial Internet of Things for being read and configured by the host, and the host needs to load the communication protocol corresponding to the terminal to realize data reading and parameter configuration in the terminal.

[0003] However, the inventors have found that as the number of devices increases, the number of communication protocols will also show explosive growth, which will eventually lead to an excessive number of communication protocols in the host, resulting in low efficiency in querying, acquiring and calling the communication protocols. Summary of the invention

[0004] The present application provides a terminal protocol integration and calling method, device, computer equipment, and storage medium to solve the problem that as the number of devices increases, the number of communication protocols will also show explosive growth, which ultimately leads to too many communication protocols in the host, resulting in low efficiency in querying, acquiring, and calling the communication protocols.

[0005] In a first aspect, the present application provides a terminal protocol integration method, comprising:

[0006] Receiving protocol information sent by the control terminal, constructing a communication protocol according to the protocol information, and saving the communication protocol into a preset protocol library;

[0007] Aggregating similar communication protocols in the protocol library into a protocol set, and saving at least one protocol set into an integrated library;

[0008] Identify the common part of each communication protocol in the protocol set, construct a main node corresponding to the common part in the integrated library, and construct a child node corresponding to the non-public part in the communication protocol, and associate the main node and the child node to obtain an integrated protocol of the protocol set, wherein the common part is the protocol content of all communication protocols present in the protocol set, and the non-public part of the communication protocol is the content of the communication protocol that does not belong to the common part.

[0009] In the above solution, the aggregating the similar communication protocols in the protocol library into a protocol set and saving at least one protocol set into the integrated library includes:

[0010] If it is identified that there is a communication protocol in the protocol library, a communication protocol in the protocol library is set as a base protocol, and the base protocol is compared with other communication protocols in the protocol library to obtain a matching value representing the similarity between the base protocol and the other communication protocols, wherein the matching value corresponds to the same content between the base protocol and the other communication protocols;

[0011] If the protocol library does not have a communication protocol with a matching value exceeding a preset matching threshold, extracting the reference protocol into the integrated library;

[0012] If the protocol library contains a communication protocol whose matching value exceeds the matching threshold, the communication protocol whose matching value exceeds the matching threshold is set as the matching protocol of the baseline protocol, the baseline protocol and the matching protocol are integrated into a protocol set, and the protocol set is extracted into the integrated library.

[0013] In the above scheme, the identifying of the common part of each communication protocol in the protocol set, constructing a main node corresponding to the common part in the integrated library, constructing a sub-node corresponding to the non-public part in the communication protocol, and associating the main node and the sub-node to obtain the integrated protocol of the protocol set includes:

[0014] If it is determined that the integrated library has a protocol set, a protocol set in the integrated library is set as a target set;

[0015] Extracting the matching values ​​of each communication protocol in the target set, identifying the lowest value among the matching values, and setting the content corresponding to the lowest value in each communication protocol as a common part;

[0016] Creating a main storage unit in the integrated library, saving the common part in the target set to the main storage unit, and converting the storage unit into a main node;

[0017] Creating at least one sub-storage unit in the integrated library, storing a non-public part of a communication protocol in a sub-storage unit, and converting the sub-storage unit storing the non-public part into a child node;

[0018] Recording the address of the master node in the child node, so that the master node and the child node are associated with each other, and setting the associated master node and child node to the integration protocol corresponding to the target set;

[0019] The target set in the integrated library is deleted.

[0020] In a second aspect, the present application provides a terminal protocol calling method based on the above-mentioned terminal protocol integration method, comprising:

[0021] receiving a query request, extracting query device information in the query request, setting an integrated protocol having the query device information as a query protocol, calling a query communication rule in the query protocol according to the query request, performing a data query on a terminal corresponding to the query device information to obtain query feedback information, wherein the query feedback information records the operating status of the terminal, and / or collected data, and / or operating log information; and / or

[0022] A setting request is received, setting device information in the setting request is extracted, an integrated protocol having the setting device information is set as a setting protocol, a setting communication rule in the setting protocol is called according to the setting request, and parameter configuration is performed on a terminal corresponding to the setting device information.

[0023] In the above scheme, calling the query communication rule in the query protocol according to the query request, performing data query on the terminal corresponding to the queried device information to obtain the query feedback information includes:

[0024] Identify a subnode having the query device protocol recorded in the query protocol, obtain a master node associated with the subnode, and obtain a query communication rule from a common part recorded in the master node;

[0025] Calling the sending frame index and the sending frame list in the query communication rule according to the query request to generate a query sending frame;

[0026] Sending the query transmission frame to the terminal corresponding to the queried device information, and receiving the query response frame generated by the terminal according to the query transmission frame;

[0027] The signal point parsing matrix in the query communication rule is called to parse the query response frame to obtain the feedback information.

[0028] In the above scheme, calling the setting communication rule in the setting protocol according to the setting request to perform parameter configuration on the terminal corresponding to the setting device information includes:

[0029] Identifying a subnode in the setting protocol that records the setting device protocol;

[0030] If the child node has a communication setting rule, obtaining the communication setting rule from the child node;

[0031] If the child node does not have the communication setting rule, obtaining the master node associated with the child node, and obtaining the communication setting rule from the public part recorded in the master node;

[0032] Extracting the setting parameters in the setting request, entering the setting parameters into the sending frame list in the setting communication rule to obtain a configuration table, and generating a setting sending frame according to the sending frame index in the setting communication rule and the configuration table;

[0033] The setting sending frame is sent to the terminal corresponding to the setting device information, so as to configure the parameters in the terminal as the setting parameters, so as to realize parameter configuration of the terminal.

[0034] In a third aspect, the present application provides a terminal protocol integration device, including:

[0035] A protocol creation module, used for receiving the protocol information sent by the control terminal, constructing a communication protocol according to the protocol information, and saving the communication protocol into a preset protocol library;

[0036] A similarity identification module, used for aggregating similar communication protocols in the protocol library into a protocol set, and saving at least one protocol set into an integrated library;

[0037] A protocol integration module is used to identify the common part of each communication protocol in the protocol set, construct a main node corresponding to the common part in the integrated library, and construct a sub-node corresponding to the non-public part in the communication protocol, and associate the main node and the sub-node to obtain an integrated protocol of the protocol set, wherein the common part is the protocol content of all communication protocols in the protocol set, and the non-public part of the communication protocol is the content of the communication protocol that does not belong to the common part.

[0038] In a fourth aspect, the present application provides a terminal protocol calling device, comprising:

[0039] A data query module, used to receive a query request, extract the query device information in the query request, set the integrated protocol with the query device information as the query protocol, call the query communication rule in the query protocol according to the query request, perform data query on the terminal corresponding to the query device information to obtain query feedback information, wherein the query feedback information records the operation status of the terminal, and / or collected data, and / or operation log information;

[0040] The parameter configuration module is used to receive a setting request, extract the setting device information in the setting request, set the integrated protocol with the setting device information as the setting protocol, call the setting communication rule in the setting protocol according to the setting request, and perform parameter configuration on the terminal corresponding to the setting device information.

[0041] In a fifth aspect, the present application provides a computer device, comprising: a processor and a memory communicatively connected to the processor;

[0042] The memory stores computer-executable instructions;

[0043] The processor executes the computer-executable instructions stored in the memory to implement the terminal protocol integration method and the terminal protocol calling method as claimed in claim 1.

[0044] In a sixth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer execution instructions, and when the computer execution instructions are executed by a processor, they are used to implement the above-mentioned terminal protocol integration method and terminal protocol calling method.

[0045] In a seventh aspect, the present application provides a computer program product, including a computer program, which implements the above-mentioned terminal protocol integration method and terminal protocol calling method when executed by a processor.

[0046] The terminal protocol integration and calling method, device, computer equipment, and storage medium provided in the present application aggregate similar communication protocols in a protocol library into a protocol set, so that only communication protocols with a certain degree of similarity can be integrated into a protocol set, so as to avoid the subsequent merging of similar communication protocols into an integrated protocol, thereby causing communication protocols with low similarity to exist in the protocol set, resulting in a higher complexity of the obtained integrated protocol.

[0047] By identifying the common parts of each communication protocol in the protocol set, constructing a main node corresponding to the common part in the integrated library, and constructing a sub-node corresponding to the non-public part in the communication protocol, and associating the main node and the sub-node to obtain an integrated protocol, while ensuring the comprehensiveness of the communication protocol, the storage volume of the protocol is greatly reduced, and the communication protocol required for querying and / or setting the terminal can be obtained by simply retrieving the sub-node. Under the premise of ensuring the comprehensiveness of the communication protocol in the integrated library, the number of protocols and the memory they occupy are greatly reduced, so as to facilitate the management of communication protocols for a large number of terminals. At the same time, by setting the main node and the sub-node, it is only necessary to compare the limited sub-nodes to obtain the required integrated protocol, and call the main node to realize communication with the terminal, which greatly improves the query and call efficiency of the communication protocol. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0049] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;

[0050] Figure 2A flowchart of Example 1 of a terminal protocol integration method and a terminal protocol calling method provided in an embodiment of the present application;

[0051] Figure 3 A schematic diagram of a program module of a terminal protocol integration device provided by the present invention;

[0052] Figure 4 A schematic diagram of a program module of a terminal protocol calling device provided by the present invention;

[0053] Figure 5 The figure is a schematic diagram of the hardware structure of the computer device in the computer device of the present invention.

[0054] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0055] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0056] See also Figure 1 , the specific application scenarios of this application are:

[0057] In the industrial Internet of Things scenario, the edge computing host 2 running the terminal protocol integration method is communicated with the control terminal 3, wherein the control terminal can be an external terminal connected to the edge computing host 2 or an input device in the edge computing host 2;

[0058] The edge computing host 2 is interconnected with the terminal 4 (such as a smart device or a sensor device) through a digital communication cable (such as RS485, CAN, etc.). Figure 1 As shown, the edge computing host 2 loads the protocol information of the terminal 4, such as: (device communication protocol description file), the protocol information records the device information (including: device manufacturer, device model, software version), sending frame index, sending frame list, signal point analysis matrix, etc.

[0059] The edge computing host 2 receives the protocol information sent by the control terminal 3, constructs a communication protocol according to the protocol information, and saves the communication protocol to the preset protocol library 21. The edge computing host 2 aggregates the similar communication protocols in the protocol library 21 into a protocol set, and saves at least one protocol set to the integrated library 22. The edge computing host 2 identifies the common part of each communication protocol in the protocol set, constructs a main node corresponding to the common part in the integrated library 22, and constructs a sub-node corresponding to the non-common part in the communication protocol, and associates the main node and the sub-node to obtain an integrated protocol of the protocol set, wherein the common part is the protocol content of all communication protocols in the protocol set, and the non-common part of the communication protocol is the content of the communication protocol that does not belong to the common part.

[0060] The edge computing host 2 running the terminal protocol calling method receives the query request entered by the user in the edge computing host 2, extracts the query device information in the query request, sets the integrated protocol with the query device information as the query protocol, calls the query communication rule in the query protocol according to the query request, performs data query on the terminal corresponding to the query device information to obtain query feedback information, wherein the query feedback information records the operation status of the terminal, and / or the collected data, and / or the operation log information;

[0061] The edge computing host 2 also receives a setting request entered by the user in the edge computing host 2, extracts the setting device information in the setting request, sets the integrated protocol with the setting device information as the setting protocol, calls the setting communication rules in the setting protocol according to the setting request, and performs parameter configuration on the terminal corresponding to the setting device information.

[0062] The technical solution of the present application and how the technical solution of the present application solves the problems of the prior art are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0063] Embodiment 1:

[0064] See also Figure 2 , the present application provides a terminal protocol integration method, comprising:

[0065] S101: receiving protocol information sent by the control terminal, constructing a communication protocol according to the protocol information, and saving the communication protocol into a preset protocol library.

[0066] In this step, the communication protocol refers to the rules and agreements that the two entities must follow to complete the communication or service. The protocol defines the format used by the data unit, the information and meaning that the information unit should contain, the connection method, and the timing of sending and receiving information, so as to ensure that the data in the network is smoothly transmitted to the specified place.

[0067] In this embodiment, the user may construct a communication protocol by entering protocol information in an edge computing host running a terminal protocol integration method.

[0068] The protocol information includes device information, protocol type, transmission frame index, transmission frame list and signal point analysis matrix;

[0069] Device information is information describing the identity of the terminal connected to the edge computing host;

[0070] The protocol type refers to the type information of the communication protocol used by the terminal;

[0071] The send frame index is the number of frames sent from the edge computing host to the terminal;

[0072] The send frame list is used to define the content of the send frame;

[0073] The signal point analysis matrix is ​​used to perform analysis operations on the response frames generated by the terminal based on the sent frames, and obtain analysis operation rules that can be recognized and displayed by the edge computing host.

[0074] When a communication protocol having device information, protocol type, transmission frame index, transmission frame list and signal point analysis matrix is ​​generated, the communication protocol is saved in a preset protocol library for centralized storage of the communication protocol.

[0075] Exemplarily, two protocol tables of communication protocols are provided:

[0076]

[0077]

[0078] In a preferred embodiment, constructing a communication protocol according to the protocol information and saving the communication protocol to a preset protocol library includes:

[0079] S11: extracting device information and protocol parameters from the protocol information, and constructing query communication rules and setting communication rules according to the protocol parameters.

[0080] In this step, the protocol parameters include: querying the protocol type, querying the transmission frame index, querying the transmission frame list and querying the signal point resolution matrix, as well as setting the protocol type, setting the transmission frame index, setting the transmission frame list and setting the signal point resolution matrix;

[0081] Constructing query communication rules according to the query protocol type, the query transmission frame index, the query transmission frame list and the query signal point analysis matrix;

[0082] The communication rules are set according to setting the protocol type, setting the sending frame index, setting the sending frame list and setting the signal point analysis matrix.

[0083] It should be noted that the protocol type in the above protocol table is the query protocol type, the sending frame index is the query sending frame index, the sending frame list is the query sending frame list, and the signal point resolution matrix is ​​the query signal point resolution matrix.

[0084] S12: Summarize device information, query communication rules, set communication rules to obtain communication protocols, and save the communication protocols into a preset protocol library.

[0085] In this step, by constructing query communication rules and setting communication rules respectively, and summarizing them with device information to obtain a communication protocol, an edge computing host running a terminal protocol integration method can query and set operations on the terminal corresponding to the device information, thereby expanding the types of operations on the terminal.

[0086] S102: Gather similar communication protocols in the protocol library into a protocol set, and save at least one protocol set into a preset integrated library.

[0087] This step aggregates similar communication protocols in the protocol library into a protocol set, so that only communication protocols with a certain degree of similarity can be integrated into a protocol set, so as to avoid the subsequent merging of similar communication protocols into an integrated protocol, thereby causing communication protocols with low similarity to exist in the protocol set, resulting in a higher complexity of the integrated protocol.

[0088] In a preferred embodiment, similar communication protocols in a protocol library are integrated into a protocol set, and at least one protocol set is extracted into an integrated library, including:

[0089] S21: If a communication protocol is identified in the protocol library, a communication protocol in the protocol library is set as a baseline protocol, and the baseline protocol is compared with other communication protocols in the protocol library to obtain a matching value representing the similarity between the baseline protocol and the other communication protocols, wherein the matching value corresponds to the same content between the baseline protocol and the other communication protocols.

[0090] S22: If the protocol library does not have a communication protocol whose matching value exceeds a preset matching threshold, the benchmark protocol is extracted into the integrated library.

[0091] S23: If the protocol library has a communication protocol whose matching value exceeds the matching threshold, the communication protocol whose matching value exceeds the matching threshold is set as the matching protocol of the baseline protocol, the baseline protocol and the matching protocol are integrated into a protocol set, and the protocol set is extracted into the integrated library.

[0092] In this example, a communication protocol is set as the base protocol and other communication protocols in the protocol library are compared with it.

[0093] A matching value representing the similarity between the benchmark protocol and other communication protocols is obtained.

[0094] The preset matching threshold is used to define the parameter information of whether several communication protocols are similar.

[0095] The communication protocol whose matching value exceeds the matching threshold is set as a communication protocol similar to the benchmark protocol.

[0096] By extracting the protocols into an integrated library, it is easy to compare other communication protocols in the protocol library that are not similar to the benchmark protocol.

[0097] Avoids repeated comparison of communication protocols.

[0098] The efficiency of acquiring the protocol set is improved and the computational burden of acquiring the protocol set is reduced.

[0099] Furthermore, the benchmark protocol is compared with other communication protocols in the protocol library to obtain a matching value representing the similarity between the benchmark protocol and other protocols, including:

[0100] S211: extracting the query communication rule in the benchmark protocol, setting the query similarity value between the communication protocol with the query communication rule in the protocol library and the benchmark protocol to a first value, and setting the query similarity value between the communication protocol without the query communication rule in the protocol library and the benchmark protocol to a zero value;

[0101] S212: extracting the communication setting rule in the base protocol, setting the setting similarity value between the communication protocol with the communication setting rule in the protocol library and the base protocol to a second value, and setting the setting similarity value between the communication protocol without the communication setting rule in the protocol library and the base protocol to a zero value;

[0102] S213: performing a sum operation on the query similarity value and the setting similarity value between a communication protocol and the reference protocol to obtain a matching value representing the similarity between the reference protocol and a communication protocol.

[0103] Exemplarily, the first value is greater than the second value, so as to represent that the importance of querying the similarity of the communication rule is higher than that of setting the similarity of the communication rule.

[0104] Compare the base query protocol type in the query communication rule in the base protocol with the reference query protocol type in the query communication rule of other communication protocols in the protocol library, and set the communication protocol whose reference query protocol type is consistent with the base query protocol type as the type protocol;

[0105] Compare the base query sending frame index in the query communication rule in the base protocol with the reference query sending frame index in the query communication rule of the type protocol, and set the communication protocol whose reference query sending frame index is consistent with the base query sending frame index as the frame index protocol;

[0106] Compare the benchmark transmission frame list in the query communication rule in the benchmark protocol with the reference query transmission frame list in the query communication rule of the frame index protocol, and set the frame index protocol whose reference query transmission frame list is consistent with the benchmark query transmission frame list as the list protocol;

[0107] The benchmark query signal point resolution matrix in the query communication rules in the benchmark protocol is compared with the reference query signal point resolution matrix in the query communication rules of the list protocol, and the list protocol whose reference query signal point resolution matrix is ​​consistent with the benchmark query signal point resolution matrix is ​​set as the communication protocol with the query communication rules in the benchmark protocol.

[0108] Compare the base setting protocol type in the setting communication rule in the base protocol with the reference setting protocol type in the setting communication rule of other communication protocols in the protocol library, and set the communication protocol whose reference setting protocol type is consistent with the base setting protocol type as the type protocol;

[0109] Compare the base setting sending frame index in the setting communication rule in the base protocol with the reference setting sending frame index in the setting communication rule of the type protocol, and set the communication protocol whose reference setting sending frame index is consistent with the base setting sending frame index as the frame index protocol;

[0110] Compare the benchmark transmission frame list in the setting communication rule in the benchmark protocol with the reference setting transmission frame list in the setting communication rule of the frame index protocol, and set the frame index protocol whose reference setting transmission frame list is consistent with the benchmark setting transmission frame list as the list protocol;

[0111] The benchmark setting signal point resolution matrix in the setting communication rules in the benchmark protocol is compared with the reference setting signal point resolution matrix in the setting communication rules of the list protocol, and the list protocol whose reference setting signal point resolution matrix is ​​consistent with the benchmark setting signal point resolution matrix is ​​set as the communication protocol with the setting communication rules in the benchmark protocol.

[0112] S103: Identify the common parts of each communication protocol in the protocol set, construct a main node corresponding to the common part in the integrated library, and construct a sub-node corresponding to the non-public part in the communication protocol, and associate the main node and the sub-node to obtain an integrated protocol of the protocol set, wherein the common part is the protocol content of all communication protocols in the protocol set, and the non-public part of the communication protocol is the content of the communication protocol that does not belong to the common part.

[0113] Since there are a huge number of communication protocols currently connected to a large number of terminal devices, it is not only inconvenient to manage the protocols, but also greatly reduces the query efficiency of the protocols. To this end, this step identifies the common parts of each communication protocol in the protocol set, constructs a main node corresponding to the common part in the integrated library, and constructs a sub-node corresponding to the non-public part in the communication protocol, and associates the main node and the sub-node to obtain an integrated protocol. While ensuring the comprehensiveness of the communication protocol, the storage volume of the protocol is greatly reduced. Moreover, the communication protocol required for querying and / or setting the terminal can be obtained by simply retrieving the sub-node. Under the premise of ensuring the comprehensiveness of the communication protocol in the integrated library, the number of protocols and the memory they occupy are greatly reduced, so as to facilitate the management of the communication protocols of a large number of terminals. At the same time, by setting the main node and the sub-node, it is only necessary to compare the limited sub-nodes to obtain the required integrated protocol, and call the main node to realize communication with the terminal, which greatly improves the query and call efficiency of the protocol.

[0114] In a preferred embodiment, identifying the common part of each communication protocol in the protocol set, constructing a main node corresponding to the common part in the integrated library, constructing a sub-node corresponding to the non-public part in the communication protocol, and associating the main node and the sub-node to obtain an integrated protocol of the protocol set includes:

[0115] S31: If it is determined that there is a protocol set in the integrated library, a protocol set in the integrated library is set as a target set;

[0116] S32: extracting the matching values ​​of each communication protocol in the target set, identifying the lowest value among the matching values, and setting the content corresponding to the lowest value in each communication protocol as the common part;

[0117] S33: creating a main storage unit in the integrated library, saving the common part in the target set to the main storage unit, and converting the storage unit into a main node;

[0118] S33: creating at least one sub-storage unit in the integrated library, storing a non-public part of a communication protocol in a sub-storage unit, and converting the sub-storage unit storing the non-public part into a child node;

[0119] S34: recording the address of the master node in the child node, so that the master node and the child node are associated with each other, and setting the associated master node and child node to an integrated protocol corresponding to the target set;

[0120] S35: Delete the target collection in the integrated library.

[0121] In this embodiment, by setting the content corresponding to the lowest value in the matching value as the common part, the content intersection between the communication protocols in the protocol set can be quickly identified, thereby avoiding the use of methods such as text comparison to obtain the common part, which leads to low efficiency in obtaining the common part.

[0122] Usually, the non-public part is a personalized setting for the terminal, so usually there is not much content, so the non-public part is displayed as a sub-node, and the device information is recorded in the sub-node for subsequent retrieval. In this embodiment, the main storage unit and the sub-storage unit can be constructed in the integrated library based on graph theory, and the main node and the sub-node can be created.

[0123] Exemplarily, identifying the lowest value among the matching values ​​of each protocol set of the target set,

[0124] If the lowest value is the first value, the public part is set to query communication rules, a main node with query communication rules is constructed, the non-public part is set to set communication rules and device information, a sub-node with setting communication rules and device information is constructed, and the main node with query communication rules is associated with the sub-node with setting communication rules and the sub-node with device information to obtain an integrated protocol. The public and non-public parts of the communication protocol are shown in the following table:

[0125]

[0126] If the lowest value is the sum of the first value and the second value, the public part is set to query communication rules and set communication rules, a main node with query communication rules and set communication rules is constructed, the non-public part is set to device information, a sub-node with device information is constructed, and the main node with query communication rules and set communication rules is associated with the sub-node with device information to obtain an integrated protocol. The public and non-public parts of the communication protocol are shown in the following table:

[0127]

[0128] Embodiment 2:

[0129] The present application also provides a terminal protocol calling method based on the above-mentioned terminal protocol integration method, comprising:

[0130] S201: Receive a query request, extract the query device information in the query request, set the integrated protocol with the query device information as the query protocol, call the query communication rules in the query protocol according to the query request, perform data query on the terminal corresponding to the query device information to obtain query feedback information, wherein the query feedback information records the operating status of the terminal, and / or collected data, and / or operating log information.

[0131] In this step, by comparing the query device information with the sub-nodes of all integrated protocols in the integrated library, the sub-node recording the query device information is obtained, and the integrated protocol where the sub-node is located is set as the query protocol. This achieves the goal of obtaining the communication rules corresponding to the query request by polling only the information recorded in a small number of sub-nodes, thereby avoiding the situation where the protocol acquisition efficiency is low due to polling a large number of communication protocols.

[0132] In this embodiment, the query request can be input by the user directly on the edge computing host running the terminal protocol calling method, or can be input through a user terminal connected to the edge computing host.

[0133] In a preferred embodiment, the query communication rules in the query protocol are called according to the query request, and the terminal corresponding to the queried device information is queried to obtain the query feedback information, including:

[0134] S41: Identify the sub-node having the query device protocol recorded in the query protocol, obtain the main node associated with the sub-node, and obtain the query communication rule from the public part recorded in the main node.

[0135] In this step, the query communication rule is obtained from the public part of the master node to improve the acquisition efficiency of the query communication rule.

[0136] S42: Invoke the sending frame index and the sending frame list in the query communication rule according to the query request to generate a query sending frame.

[0137] In this step, the query request is a request information reflecting the user's need to obtain the data recorded in the terminal through the edge computing host. Therefore, this step triggers the query communication rule to run through the query request to generate a query sending frame according to the sending frame index and the sending frame list.

[0138] S43: Send the query transmission frame to the terminal corresponding to the queried device information, and receive the query response frame generated by the terminal according to the query transmission frame.

[0139] In this step, the technical effect of reading data in the terminal is achieved by receiving the query response frame generated by the terminal according to the query sending frame.

[0140] S44: calling the signal point analysis matrix in the query communication rule to analyze the query response frame to obtain feedback information.

[0141] In this step, the query response frame is parsed through the signal point parsing matrix to obtain feedback information that can be displayed on the edge computing host to facilitate the user to read the content of the terminal.

[0142] S202: receiving a setting request, extracting setting device information in the setting request, setting the integrated protocol with the setting device information as the setting protocol, calling the setting communication rule in the setting protocol according to the setting request, and performing parameter configuration on the terminal corresponding to the setting device information.

[0143] In this step, by comparing the setting device information with the sub-nodes of all integrated protocols in the integrated library, the sub-node recording the setting device information is obtained, and the integrated protocol where the sub-node is located is set as the setting protocol. This achieves the goal of obtaining the communication rules corresponding to the setting request by polling only the information recorded in a small number of sub-nodes, thereby avoiding the situation where the protocol acquisition efficiency is low due to polling a large number of communication protocols.

[0144] In this embodiment, the setting request can be input by the user directly on the edge computing host running the terminal protocol calling method, or can be input through a user terminal connected to the edge computing host.

[0145] In a preferred embodiment, calling the setting communication rule in the setting protocol according to the setting request to configure parameters of the terminal corresponding to the setting device information includes:

[0146] S51: Identify the subnode in the setting protocol that records the setting device protocol;

[0147] If the child node has a communication rule, the communication rule is obtained from the child node;

[0148] If the child node does not have the communication setting rule, the master node associated with the child node is obtained, and the communication setting rule is obtained from the common part recorded in the master node.

[0149] S52: extracting the setting parameters in the setting request, entering the setting parameters into the sending frame list in the setting communication rule to obtain a configuration table, and generating a setting sending frame according to the sending frame index in the setting communication rule and the configuration table;

[0150] S53: Sending a setting sending frame to the terminal corresponding to the setting device information, so as to configure the parameters in the terminal as the setting parameters, so as to realize parameter configuration of the terminal.

[0151] In this embodiment, the setting request is a request information that reflects the user's need to configure the parameters in the terminal through the edge computing host. This step enters the setting parameters in the setting request into the sending frame list in the setting communication rules as variables of the sending frame list, converts the sending frame list into a configuration table, triggers the sending frame index and the sending frame list in the setting communication rules to generate a setting sending frame, which is used to modify the parameters in the terminal to the setting parameters, so as to achieve the technical effect of configuring the parameters of the terminal.

[0152] Furthermore, if the master node does not have the setting communication rules, setting protocol missing information is generated to indicate that the edge computing host cannot configure parameters of the terminal corresponding to the setting device information; the setting protocol missing information is displayed on the edge computing host, or the setting protocol missing information is sent to the user end for display.

[0153] In a preferred embodiment, after calling the setting communication rule in the setting protocol according to the setting request and configuring the parameters of the terminal corresponding to the setting device information, the method further includes:

[0154] S54: receiving a setting response frame generated by the terminal according to the setting sending frame;

[0155] S55: calling the signal point analysis matrix in the set communication rule to analyze the response frame to obtain the set feedback information.

[0156] In this embodiment, the setting response frame generated by the receiving terminal according to the setting sending frame is analyzed by the signal point analysis matrix to set the feedback information, and the setting feedback information represents whether the terminal parameters are configured successfully; if the configuration is successful, the setting feedback information will be "parameter configuration successful"; if the configuration fails, the setting feedback information will be "parameter configuration failed".

[0157] Embodiment 3:

[0158] See also Figure 3 The present application also provides a terminal protocol integration device 30, comprising:

[0159] The protocol creation module 301 is used to receive the protocol information sent by the control terminal, construct the communication protocol according to the protocol information, and save the communication protocol into a preset protocol library;

[0160] A similarity identification module 302 is used to aggregate similar communication protocols in the protocol library into a protocol set, and save at least one protocol set into an integrated library;

[0161] The protocol integration module 303 is used to identify the common parts of each communication protocol in the protocol set, construct a main node corresponding to the common part in the integrated library, and construct a sub-node corresponding to the non-public part in the communication protocol, and associate the main node and the sub-node to obtain an integrated protocol of the protocol set, wherein the common part is the protocol content of all communication protocols existing in the protocol set, and the non-public part of the communication protocol is the content of the communication protocol that does not belong to the common part.

[0162] Embodiment 4:

[0163] See also Figure 4 The present application also provides a terminal protocol calling device 40, comprising:

[0164] The data query module 401 is used to receive a query request, extract the query device information in the query request, set the integrated protocol with the query device information as the query protocol, call the query communication rule in the query protocol according to the query request, perform data query on the terminal corresponding to the query device information to obtain query feedback information, wherein the query feedback information records the operation status of the terminal, and / or the collected data, and / or the operation log information;

[0165] The parameter configuration module 402 is used to receive a setting request, extract the setting device information in the setting request, set the integrated protocol with the setting device information as the setting protocol, call the setting communication rules in the setting protocol according to the setting request, and perform parameter configuration on the terminal corresponding to the setting device information.

[0166] Embodiment 5:

[0167] To achieve the above-mentioned purpose, the present application also provides a computer device 5, comprising: a processor and a memory in communication with the processor; the memory stores computer execution instructions;

[0168] The processor executes the computer execution instructions stored in the memory to implement the above-mentioned terminal protocol integration method and terminal protocol calling method, wherein the components of the terminal protocol integration device and the terminal protocol calling device can be dispersed in different computer devices, and the computer device 5 can be a smart phone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server or cabinet server (including independent servers, or server clusters composed of multiple application servers) that executes the program. The computer device of this embodiment includes at least but is not limited to: a memory 51 and a processor 52 that can be interconnected through a system bus, such as Figure 5 It should be pointed out that Figure 5Only a computer device with component - is shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. In this embodiment, the memory 51 (i.e., readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 51 can be an internal storage unit of the computer device, such as a hard disk or memory of the computer device. In other embodiments, the memory 51 can also be an external storage device of the computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart MediaCard, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 51 can also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the memory 51 is generally used to store the operating system and various application software installed in the computer device, such as the program code of the terminal protocol integration device and the terminal protocol calling device of the third embodiment. In addition, the memory 51 can also be used to temporarily store various data that have been output or are about to be output. The processor 52 can be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 52 is generally used to control the overall operation of the computer device. In this embodiment, the processor 52 is used to run the program code stored in the memory 51 or process data, such as running the terminal protocol integration device and the terminal protocol calling device, so as to implement the terminal protocol integration method and the terminal protocol calling method of the above-mentioned embodiment.

[0169] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of each embodiment of the present application. It should be understood that the above-mentioned processor can be a central processing unit (Central Processing Unit, referred to as CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, referred to as DSP), application-specific integrated circuits (Application Specific Integrated Circuit, referred to as ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the application can be directly embodied as a hardware processor to be executed, or the hardware and software modules in the processor are combined and executed. The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and can also be a U disk, a mobile hard disk, a read-only memory, a disk or an optical disk, etc.

[0170] To achieve the above purpose, the present application also provides a computer-readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, server, App application store, etc., which stores computer execution instructions, and the corresponding functions are realized when the program is executed by the processor 52. The computer-readable storage medium of this embodiment is used to store computer execution instructions for implementing the terminal protocol integration method and the terminal protocol calling method, and when executed by the processor 52, the terminal protocol integration method and the terminal protocol calling method of the above embodiment are realized.

[0171] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0172] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a main control device.

[0173] The present application provides a computer program product, including a computer program, which implements the above-mentioned terminal protocol integration method and terminal protocol calling method when executed by a processor.

[0174] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0175] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0176] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A terminal protocol integration method, characterized in that: include: Receiving protocol information sent by the control terminal, constructing a communication protocol according to the protocol information, and saving the communication protocol into a preset protocol library; Aggregating similar communication protocols in the protocol library into a protocol set, and saving at least one protocol set into an integrated library; Identify the common part of each communication protocol in the protocol set, construct a main node corresponding to the common part in the integrated library, and construct a sub-node corresponding to the non-common part in the communication protocol, and associate the main node and the sub-node to obtain an integrated protocol of the protocol set, wherein the common part is the protocol content of all communication protocols in the protocol set, and the non-common part of the communication protocol is the content of the communication protocol that does not belong to the common part; The step of aggregating similar communication protocols in the protocol library into a protocol set and saving at least one protocol set into an integrated library includes: If it is identified that there is a communication protocol in the protocol library, a communication protocol in the protocol library is set as a base protocol, and the base protocol is compared with other communication protocols in the protocol library to obtain a matching value representing the similarity between the base protocol and the other communication protocols, wherein the matching value corresponds to the same content between the base protocol and the other communication protocols; If the protocol library does not have a communication protocol with a matching value exceeding a preset matching threshold, extracting the reference protocol into the integrated library; If the protocol library contains a communication protocol whose matching value exceeds the matching threshold, the communication protocol whose matching value exceeds the matching threshold is set as the matching protocol of the baseline protocol, the baseline protocol and the matching protocol are integrated into a protocol set, and the protocol set is extracted into the integrated library.

2. The terminal protocol integration method according to claim 1, characterized in that: The identifying of the common part of each communication protocol in the protocol set, constructing a main node corresponding to the common part in the integrated library, constructing a sub-node corresponding to the non-public part in the communication protocol, and associating the main node with the sub-node to obtain an integrated protocol of the protocol set includes: If it is determined that the integrated library has a protocol set, a protocol set in the integrated library is set as a target set; Extracting the matching values ​​of each communication protocol in the target set, identifying the lowest value among the matching values, and setting the content corresponding to the lowest value in each communication protocol as a common part; Creating a main storage unit in the integrated library, saving the common part in the target set to the main storage unit, and converting the storage unit into a main node; Creating at least one sub-storage unit in the integrated library, storing a non-public part of a communication protocol in a sub-storage unit, and converting the sub-storage unit storing the non-public part into a child node; Recording the address of the master node in the child node, so that the master node and the child node are associated with each other, and setting the associated master node and child node to the integration protocol corresponding to the target set; The target set in the integrated library is deleted.

3. A terminal protocol calling method based on the terminal protocol integration method according to any one of claims 1 to 2, characterized in that: include: receiving a query request, extracting query device information in the query request, setting an integrated protocol having the query device information as a query protocol, calling a query communication rule in the query protocol according to the query request, performing a data query on a terminal corresponding to the query device information to obtain query feedback information, wherein the query feedback information records an operation status of the terminal, and / or collected data, and / or operation log information; and / or A setting request is received, setting device information in the setting request is extracted, an integrated protocol having the setting device information is set as a setting protocol, a setting communication rule in the setting protocol is called according to the setting request, and parameter configuration is performed on a terminal corresponding to the setting device information.

4. The terminal protocol calling method according to claim 3, characterized in that: The step of calling the query communication rule in the query protocol according to the query request and performing data query on the terminal corresponding to the queried device information to obtain the query feedback information includes: Identify a subnode having the query device protocol recorded in the query protocol, obtain a master node associated with the subnode, and obtain a query communication rule from a common part recorded in the master node; Calling the sending frame index and the sending frame list in the query communication rule according to the query request to generate a query sending frame; Sending the query transmission frame to the terminal corresponding to the queried device information, and receiving the query response frame generated by the terminal according to the query transmission frame; The signal point parsing matrix in the query communication rule is called to parse the query response frame to obtain the feedback information.

5. The terminal protocol calling method according to claim 3, characterized in that: The calling of the setting communication rule in the setting protocol according to the setting request to perform parameter configuration on the terminal corresponding to the setting device information includes: Identifying a subnode in the setting protocol that records the setting device protocol; If the child node has a communication setting rule, obtaining the communication setting rule from the child node; If the child node does not have the communication setting rule, obtaining the master node associated with the child node, and obtaining the communication setting rule from the public part recorded in the master node; Extracting the setting parameters in the setting request, entering the setting parameters into the sending frame list in the setting communication rule to obtain a configuration table, and generating a setting sending frame according to the sending frame index in the setting communication rule and the configuration table; The setting sending frame is sent to the terminal corresponding to the setting device information to configure the parameters in the terminal as the setting parameters, so as to realize parameter configuration of the terminal.

6. A terminal protocol integration device, characterized in that: include: A protocol creation module, used for receiving the protocol information sent by the control terminal, constructing a communication protocol according to the protocol information, and saving the communication protocol into a preset protocol library; A similarity identification module, used for aggregating similar communication protocols in the protocol library into a protocol set, and saving at least one protocol set into an integrated library; A protocol integration module is used to identify the common part of each communication protocol in the protocol set, construct a main node corresponding to the common part in the integrated library, and construct a sub-node corresponding to the non-public part in the communication protocol, and associate the main node and the sub-node to obtain an integrated protocol of the protocol set, wherein the common part is the protocol content of all communication protocols in the protocol set, and the non-public part of the communication protocol is the content of the communication protocol that does not belong to the common part.

7. A terminal protocol calling device based on the terminal protocol integration device described in claim 6, characterized in that: include: A data query module, used to receive a query request, extract the query device information in the query request, set the integrated protocol with the query device information as the query protocol, call the query communication rule in the query protocol according to the query request, perform data query on the terminal corresponding to the query device information to obtain query feedback information, wherein the query feedback information records the operation status of the terminal, and / or collected data, and / or operation log information; The parameter configuration module is used to receive a setting request, extract the setting device information in the setting request, set the integrated protocol with the setting device information as the setting protocol, call the setting communication rule in the setting protocol according to the setting request, and perform parameter configuration on the terminal corresponding to the setting device information.

8. A computer device, characterized in that: include: A processor and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the terminal protocol integration method as described in any one of claims 1 to 2, and to implement the terminal protocol calling method as described in any one of claims 3 to 5.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the terminal protocol integration method as described in any one of claims 1 to 2, and to implement the terminal protocol calling method as described in any one of claims 3 to 5.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the terminal protocol integration method as described in any one of claims 1 to 2 and the terminal protocol calling method as described in any one of claims 3 to 5 are implemented.