Disclosure of Invention
The application provides a terminal protocol integration and calling method, a device, computer equipment and a storage medium, which are used for solving the problems that the number of communication protocols can also appear explosive growth along with the increase of the number of equipment, and finally, the host is low in query acquisition and calling efficiency of the communication protocols due to the excessive number of the communication protocols.
In a first aspect, the present application provides a terminal protocol integration method, including:
Receiving protocol information sent by a control terminal, constructing a communication protocol according to the protocol information, and storing the communication protocol into a preset protocol library;
integrating communication protocols similar to each other in the protocol library into a protocol set, and storing at least one protocol set into an integrated library;
Identifying a 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 a non-common part in the communication protocol, and associating the main node and the sub-node to obtain the 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 which does not belong to the common part in the communication protocol.
In the above solution, integrating communication protocols similar to each other in the protocol library into one protocol set, and storing at least one protocol set into an integrated library includes:
If the protocol library is identified to have the communication protocol, setting one communication protocol in the protocol library as a reference protocol, and comparing the reference protocol with other communication protocols in the protocol library to obtain a matching value representing the similarity between the reference protocol and the other communication protocols, wherein the matching value corresponds to the same content between the reference 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 value, extracting the reference protocol into the integrated library;
If the protocol library has a communication protocol with a matching value exceeding the matching threshold, setting the communication protocol with the matching value exceeding the matching threshold as the matching protocol of the reference protocol, integrating the reference protocol and the matching protocol into one protocol set, and extracting the one protocol set into the integrated library.
In the above solution, the identifying a common portion of each communication protocol in the protocol set, constructing a master node corresponding to the common portion in the integrated library, and constructing a child node corresponding to a non-common portion in the communication protocol, and associating the master node and the child node to obtain an integrated protocol of the protocol set, includes:
If the integrated library is determined to have a protocol set, setting one protocol set in the integrated library as a target set;
Extracting a matching value of each communication protocol in the target set, identifying the lowest value in the matching values, and setting the content corresponding to the lowest value in each communication protocol as a public part;
Creating a main storage unit in the integrated library, and storing a public part in the target set to the main storage unit so as to convert the storage unit into a main node;
creating at least one sub-storage unit in the integrated library, and storing a non-public part of a communication protocol into one sub-storage unit, so that the sub-storage unit storing the non-public part is converted into a sub-node;
recording the address of the main node in the sub-node, associating the main node and the sub-node with each other, and setting the main node and the sub-node which are associated with each other as the integration protocol corresponding to the target set;
deleting the target set in the integrated library.
In a second aspect, the present application provides a terminal protocol calling method based on the terminal protocol integration method, including:
Receiving a query request, extracting query equipment information in the query request, setting an integration protocol with the query equipment information as a query protocol, calling a query communication rule in the query protocol according to the query request, and performing data query on a terminal corresponding to the query equipment information to obtain query feedback information, wherein the query feedback information records the running state of the terminal and/or collects data and/or running log information; and/or
Receiving a setting request, extracting setting equipment information in the setting request, setting an integration protocol with the setting equipment information as a setting protocol, calling a setting communication rule in the setting protocol according to the setting request, and carrying out parameter configuration on a terminal corresponding to the setting equipment information.
In the above scheme, the invoking the query communication rule in the query protocol according to the query request, and performing data query on the terminal corresponding to the query device information to obtain query feedback information includes:
identifying a child node in the query protocol, which is recorded with the query equipment protocol, acquiring a main node associated with the child node, and acquiring a query communication rule from a public part recorded in the main node;
Invoking a transmission frame index and a transmission frame list in the query communication rule according to the query request to generate a query transmission frame;
Transmitting the inquiry transmission frame to a terminal corresponding to the inquiry equipment information, and receiving an inquiry response frame generated by the terminal according to the inquiry transmission frame;
and calling a signal point analysis matrix in the query communication rule to analyze the query response frame to obtain the feedback information.
In the above solution, the invoking 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 includes:
Identifying a child node in the setting protocol, which records the setting equipment protocol;
if the child node has the set communication rule, acquiring the set communication rule from the child node;
If the child node does not have the set communication rule, acquiring a main node associated with the child node, and acquiring the set communication rule from a public part recorded by the main node;
extracting setting parameters in the setting request, inputting the setting parameters into a sending frame list in the setting communication rule to obtain a configuration table, and generating a setting sending frame according to a sending frame index in the setting communication rule and the configuration table;
And sending the setting sending frame to a terminal corresponding to the setting equipment information, and configuring parameters in the terminal as the setting parameters so as to realize parameter configuration of the terminal.
In a third aspect, the present application provides a terminal protocol integration apparatus, including:
The protocol creation module is used for receiving protocol information sent by the control terminal, constructing a communication protocol according to the protocol information, and storing the communication protocol into a preset protocol library;
The similarity identification module is used for integrating communication protocols similar to each other in the protocol library into a protocol set, and storing at least one protocol set into an integrated library;
And the protocol integration module is used for identifying the public part of each communication protocol in the protocol set, constructing a main node corresponding to the public part in the integration library, constructing a sub-node corresponding to a non-public part in the communication protocol, and associating the main node with the sub-node to obtain the integrated protocol of the protocol set, wherein the public part is the protocol content of all the communication protocols in the protocol set, and the non-public part of the communication protocol is the content which does not belong to the public part in the communication protocol.
In a fourth aspect, the present application provides a terminal protocol calling device, including:
the data query module is used for receiving a query request, extracting query equipment information in the query request, setting an integration protocol with the query equipment information as a query protocol, calling a query communication rule in the query protocol according to the query request, and carrying out data query on a terminal corresponding to the query equipment information to obtain query feedback information, wherein the query feedback information records the running state of the terminal and/or collects data and/or running log information;
and the parameter configuration module is used for receiving a setting request, extracting setting equipment information in the setting request, setting an integrated protocol with the setting equipment information as a setting protocol, calling a setting communication rule in the setting protocol according to the setting request, and carrying out parameter configuration on a terminal corresponding to the setting equipment information.
In a fifth aspect, the present application provides a computer device comprising: a processor and a memory communicatively coupled 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 and the terminal protocol calling method as described in the claims.
In a sixth aspect, the present application provides a computer readable storage medium, where computer executable instructions are stored, where the computer executable instructions are used to implement the above-mentioned terminal protocol integration method and terminal protocol calling method when executed by a processor.
In a seventh aspect, the present application provides a computer program product, including a computer program, where the computer program when executed by a processor implements the above-mentioned terminal protocol integration method and terminal protocol calling method.
The terminal protocol integrating and calling method, the terminal protocol integrating and calling device, the computer equipment and the storage medium can integrate communication protocols with certain degree of similarity into one protocol set by integrating the communication protocols with similar protocols in the protocol library into one protocol set, so that the situation that the communication protocols with low similarity exist in the protocol set in the subsequent process of combining the similar communication protocols into one integrated protocol is avoided, and the obtained integrated protocol has higher complexity.
By identifying the public part of each communication protocol in the protocol set, constructing a main node corresponding to the public part in the integrated library, constructing a sub node corresponding to a non-public part in the communication protocol, associating the main node with the sub node to obtain the integrated protocol, greatly reducing the memory capacity of the protocol while ensuring the comprehensiveness of the communication protocol, and obtaining the communication protocol required by the query and/or setting the terminal only by retrieving the sub node, the protocol quantity and the occupied memory are greatly reduced on the premise of ensuring the comprehensiveness of the communication protocol in the integrated library, so that the management of a large number of communication protocols of the terminal is facilitated, meanwhile, by setting the main node and the sub node, the required integrated protocol can be obtained only by comparing limited sub nodes, and calling the main node to realize the communication with the terminal, thereby greatly improving the query and call efficiency of the communication protocol.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
Referring to fig. 1, the specific application scenario of the present application is:
In the industrial internet of things scene, an edge computing host 2 running with a terminal protocol integration method is in communication connection with a control end 3, wherein the control end can be an external terminal connected with the edge computing host 2 or can be input equipment in the edge computing host 2;
The edge computing host 2 is interconnected with the terminal 4 (such as an intelligent device or a sensor device) through a digital communication cable (such as RS485, CAN, etc.), as shown in fig. 1, the edge computing host 2 loads protocol information of the terminal 4, such as: the protocol information includes a transmission frame index, a transmission frame list, a signal point analysis matrix, and the like of the device information (including a device manufacturer, a device model, and a software version).
The edge computing host 2 receives the protocol information sent by the control end 3, constructs a communication protocol according to the protocol information, and stores the communication protocol in a preset protocol library 21. The edge computing host 2 aggregates the communication protocols similar to each other in the protocol library 21 into one protocol set, and saves at least one protocol set into the integration library 22. The edge computing host 2 identifies a common part of each communication protocol in the protocol set, constructs a master node corresponding to the common part in the integration library 22, constructs a child node corresponding to a non-common part in the communication protocols, and associates the master node with the child node to obtain an integrated protocol of the protocol set, wherein the common part is a protocol content of all communication protocols existing in the protocol set, and the non-common part of the communication protocols is a content not belonging to the common part in the communication protocols.
The edge computing host 2 running with the terminal protocol calling method extracts the query equipment information in the query request by receiving the query request input by a user in the edge computing host 2, sets the integrated protocol with the query equipment information as the query protocol, calls the query communication rule in the query protocol according to the query request, and performs data query on the terminal corresponding to the query equipment information to obtain query feedback information, wherein the query feedback information records the running state of the terminal and/or collects data and/or running log information;
The edge computing host 2 also extracts the setting device information in the setting request by receiving the setting request entered by the user in the edge computing host 2, sets the integration protocol with the setting device information as the setting protocol, invokes the setting communication rule in the setting protocol according to the setting request, and performs parameter configuration on the terminal corresponding to the setting device information.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the problems of the prior art in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Example 1:
referring to fig. 2, the present application provides a terminal protocol integration method, which includes:
S101: and receiving protocol information sent by the control terminal, constructing a communication protocol according to the protocol information, and storing the communication protocol into a preset protocol library.
In this step, the communication protocol (communications protocol) refers to rules and conventions that must be followed by the two entities to complete a communication or service. The protocol defines the format used by the data units, the information and meaning that the information units should contain, the manner of connection, the timing of the information transmission and reception, and thus ensures that the data in the network is successfully transferred to a determined place.
In this embodiment, the user can use the edge computing host running the terminal protocol integration method to construct the communication protocol by entering protocol information.
The protocol information comprises equipment information, protocol type, transmission frame index, transmission frame list and signal point analysis matrix;
The device information is information describing an identity of a terminal connected to the edge computing host;
the protocol type refers to type information of a communication protocol used by the terminal;
The transmitted frame index is the number of transmitted frames output by the edge computing host to the terminal;
The transmission frame list is used for defining the content of the transmission frame;
The signal point analysis matrix is used for carrying out analysis operation on a response frame generated by the terminal according to the transmission frame, so as to obtain analysis operation rules which can be identified and displayed by the edge computing host.
When a communication protocol with equipment information, protocol type, transmission frame index, transmission frame list and signal point analysis matrix is generated, the communication protocol is stored in a preset protocol library for centralized storage of the communication protocol.
Illustratively, a protocol table of two communication protocols is provided:
In a preferred embodiment, constructing a communication protocol according to the protocol information, and saving the communication protocol to a preset protocol library includes:
S11: extracting equipment information and protocol parameters in the protocol information, constructing inquiry communication rules and setting the communication rules according to the protocol parameters.
In this step, the protocol parameters include: inquiring the protocol type, inquiring the sending frame index, inquiring the sending frame list and inquiring the signal point analysis matrix, setting the protocol type, setting the sending frame index, setting the sending frame list and setting the signal point analysis matrix;
Constructing a query communication rule according to the query protocol type, the query transmission frame index, the query transmission frame list and the query signal point analysis matrix;
and constructing a set communication rule according to the set protocol type, the set transmission frame index, the set transmission frame list and the set signal point analysis matrix.
It should be noted that, the protocol type in the above protocol table is a query protocol type, the transmission frame index is a query transmission frame index, the transmission frame list is a query transmission frame list, and the signal point analysis matrix is a query signal point analysis matrix.
S12: summarizing equipment information, inquiring communication rules and setting the communication rules to obtain a communication protocol, and storing the communication protocol into a preset protocol library.
In the step, the query communication rule and the setting communication rule are respectively constructed and summarized with the equipment information to obtain the communication protocol, so that an edge computing host with a terminal protocol integration method can be conveniently operated, the query operation and the setting operation are carried out on the terminal corresponding to the equipment information, and the operation type of the terminal is enlarged.
S102: integrating communication protocols similar to each other in the protocol library into one protocol set, and storing at least one protocol set into a preset integrated library.
In the step, by integrating communication protocols similar to each other in the protocol library into one protocol set, the communication protocols with a certain degree of similarity can be integrated into one protocol set, so that the subsequent process of combining similar communication protocols into one integrated protocol is avoided, and therefore, communication protocols with low similarity exist in the protocol set, and the complexity of the obtained integrated protocol is higher.
In a preferred embodiment, integrating communication protocols similar to each other in a protocol library into one protocol set, extracting at least one protocol set into the integrated library, comprises:
S21: if the communication protocol is identified to exist in the protocol library, setting one communication protocol in the protocol library as a reference protocol, and comparing the reference protocol with other communication protocols in the protocol library to obtain a matching value representing the similarity between the reference protocol and the other communication protocols, wherein the matching value corresponds to the same content between the reference protocol and the other communication protocols.
S22: and if the protocol library does not have a communication protocol with the matching value exceeding the preset matching threshold value, extracting the reference protocol into the integrated library.
S23: if the protocol library has a communication protocol with a matching value exceeding a matching threshold, setting the communication protocol with the matching value exceeding the matching threshold as a matching protocol of a reference protocol, integrating the reference protocol and the matching protocol into a protocol set, and extracting the protocol set into the integrated library.
In this example, by setting one communication protocol as the reference protocol, and comparing the other communication protocols in the protocol library with the reference protocol,
A matching value is obtained that characterizes the similarity between the reference protocol and the other communication protocols.
Preset parameter information for defining whether or not several communication protocols are similar to each other matching the threshold value,
The communication protocol whose matching value exceeds the matching threshold is set to a communication protocol similar to the reference protocol,
By extracting the protocol combinations into the integrated library, so as to compare the other communication protocols in the protocol library, which are dissimilar to the reference protocol, again,
The occurrence of repeated comparison of communication protocols is avoided,
The acquisition efficiency of the protocol set is improved, and the operation burden of acquiring the protocol set is reduced.
Further, comparing the reference protocol with other communication protocols in the protocol library to obtain a matching value for representing similarity between the reference protocol and other protocols, including:
s211: extracting query communication rules in a reference protocol, setting query similarity values of a communication protocol with the query communication rules in a protocol library and the reference protocol as a first value, and setting query similarity values of a communication protocol without the query communication rules in the protocol library and the reference protocol as zero values;
S212: extracting a set communication rule in a reference protocol, setting a set similarity value of a communication protocol with the set communication rule in a protocol library and the reference protocol as a second value, and setting a set similarity value of a communication protocol without the set communication rule in the protocol library and the reference protocol as a zero value;
S213: and carrying out summation operation on the query similarity value and the set similarity value between one communication protocol and the reference protocol to obtain a matching value representing the similarity between the reference protocol and one communication protocol.
Illustratively, the first value is greater than the second value to characterize the similarity of the query communication rule as being more important than the similarity of the set communication rule.
Comparing the reference query protocol type in the query communication rules of the reference protocol with the reference query protocol type in the query communication rules of other communication protocols in the protocol library, and setting the communication protocol with the reference query protocol type consistent with the reference query protocol type as a type protocol;
Comparing a reference query transmission frame index in a query communication rule in a reference protocol with a reference query transmission frame index in a query communication rule of a type protocol, and setting a communication protocol with the reference query transmission frame index consistent with the reference query transmission frame index as a frame index protocol;
Comparing a reference transmission frame list in the query communication rule in the reference protocol with a reference query transmission frame list in the query communication rule of the frame index protocol, and setting a frame index protocol, in which the reference query transmission frame list is consistent with the reference query transmission frame list, as a list protocol;
And comparing the reference query signal point analysis matrix in the query communication rule in the reference protocol with the reference query signal point analysis matrix in the query communication rule in the list protocol, and setting the list protocol with the reference query signal point analysis matrix consistent with the reference query signal point analysis matrix as the communication protocol with the query communication rule in the reference protocol.
Comparing the reference setting protocol type in the setting communication rules of the reference protocol with the reference setting protocol type in the setting communication rules of other communication protocols in the protocol library, and setting the communication protocol with the reference setting protocol type consistent with the reference setting protocol type as a type protocol;
Comparing a reference setting transmission frame index in a setting communication rule in a reference protocol with a reference setting transmission frame index in a setting communication rule of a type protocol, and setting a communication protocol in which the reference setting transmission frame index is consistent with the reference setting transmission frame index as a frame index protocol;
Comparing a reference transmission frame list in the setting communication rule in the reference protocol with a reference transmission frame list in the setting communication rule of the frame index protocol, and setting a frame index protocol, in which the reference transmission frame list is consistent with the reference transmission frame list, as a list protocol;
And comparing the reference set signal point analysis matrix in the set communication rules in the reference protocol with the reference set signal point analysis matrix in the set communication rules of the list protocol, and setting the list protocol with the reference set signal point analysis matrix consistent with the reference set signal point analysis matrix as the communication protocol with the set communication rules in the reference protocol.
S103: identifying a public part of each communication protocol in the protocol set, constructing a main node corresponding to the public part in an integrated library, constructing a sub-node corresponding to a 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, wherein the public part is the protocol content of all the communication protocols in the protocol set, and the non-public part of the communication protocol is the content which does not belong to the public part in the communication protocol.
Because the number of the communication protocols currently connected with a large number of terminal devices is huge, the management of the protocols is inconvenient, and the query efficiency of the protocols is greatly reduced, therefore, the step is to construct a main node corresponding to the public part in an integrated library by identifying the public part of each communication protocol in a protocol set, construct a sub-node corresponding to the non-public part in the communication protocols, associate the main node with the sub-node to obtain the integrated protocols, ensure the comprehensiveness of the communication protocols, greatly reduce the storage capacity of the protocols, and can obtain the communication protocols required by querying and/or setting the terminals only by detecting the sub-nodes, greatly reduce the number of the protocols and the occupied memory thereof on the premise of ensuring the comprehensiveness of the communication protocols in the integrated library, so that the management of the communication protocols of a large number of the terminals is facilitated, meanwhile, only need to compare limited sub-nodes to obtain the required integrated protocols, and call the main node to realize the communication with the terminals, and greatly improve the query and call efficiency of the protocols.
In a preferred embodiment, identifying a common portion of each communication protocol in a protocol set, constructing a master node corresponding to the common portion in an integrated library, and constructing a child node corresponding to a non-common portion in the communication protocol, and associating the master node with the child node to obtain an integrated protocol of the protocol set, comprising:
s31: if the protocol set is determined to exist in the integrated library, setting one protocol set in the integrated library as a target set;
S32: extracting matching values of all communication protocols in the target set, identifying the lowest value in the matching values, and setting the content corresponding to the lowest value in all communication protocols as a public part;
S33: creating a main storage unit in the integrated library, and storing a public part in the target set to the main storage unit to convert the storage unit into a main node;
S33: creating at least one sub-storage unit in the integrated library, and storing the non-public part of a communication protocol into one sub-storage unit, so that the sub-storage unit stored with the non-public part is converted into a sub-node;
S34: recording the address of the main node in the sub-node, associating the main node with the sub-node, and setting the main node and the sub-node which are associated with each other as an integrated protocol corresponding to the target set;
S35: and deleting the target set in the integrated library.
In this embodiment, by setting the content corresponding to the lowest value in the matching values as the public portion, so as to quickly identify the intersection between the communication protocols in the protocol set on the content, the situation that the public portion is acquired in a text comparison peer-to-peer mode, which results in low public portion acquisition efficiency, is avoided.
The non-public part is usually personalized for the terminal, so that the content is usually not too much, and therefore, the non-public part is displayed in a child node, and meanwhile, the equipment information is recorded in the child node so as to be convenient for subsequent retrieval. In this embodiment, the main storage unit and the sub storage unit may be built in the integrated library based on graph theory, and the main node and the sub node may be created.
Illustratively, the lowest value of the matching values of the protocol sets of the target set is identified,
If the lowest value is the first value, the public part is set as a query communication rule, a master node recorded with the query communication rule is constructed, the non-public part is set as a set communication rule and equipment information, a child node recorded with the set communication rule and the equipment information is constructed, and the master node recorded with the query communication rule is respectively associated with the child node recorded with the set communication rule and the child node recorded with the equipment information to obtain an integrated protocol. Wherein the common part and the non-common part of the communication protocol are as shown in the following table:
If the lowest value is the sum of the first value and the second value, the public part is set as the query communication rule and the set communication rule, a main node recorded with the query communication rule and the set communication rule is constructed, the non-public part is set as the equipment information, a sub-node recorded with the equipment information is constructed, and the main node recorded with the query communication rule and the set communication rule is associated with the sub-node recorded with the equipment information, so that the integrated protocol is obtained. Wherein the common part and the non-common part of the communication protocol are as shown in the following table:
Example 2:
the application also provides a terminal protocol calling method based on the terminal protocol integration method, which comprises the following steps:
S201: receiving a query request, extracting query equipment information in the query request, setting an integration protocol with the query equipment information as a query protocol, calling a query communication rule in the query protocol according to the query request, and carrying out data query on a terminal corresponding to the query equipment information to obtain query feedback information, wherein the query feedback information records the running state of the terminal, and/or collects data and/or running log information.
In the step, the sub-nodes recorded with the query equipment information are obtained by comparing the query equipment information with the sub-nodes of all the integrated protocols in the integrated library, and the integrated protocol where the sub-nodes are located is set as the query protocol, so that the communication rule corresponding to the query request can be obtained by only polling a small amount of information recorded in the sub-nodes, and the condition that the protocol acquisition efficiency is low due to polling a large amount of communication protocols is avoided.
In this embodiment, the query request may be directly input by the user on the edge computing host running the terminal protocol calling method, or may be input by a user terminal connected to the edge computing host.
In a preferred embodiment, according to the query request, invoking a query communication rule in a query protocol, and performing data query on a terminal corresponding to query device information to obtain query feedback information, including:
S41: the method comprises the steps of identifying a child node recorded with a query equipment protocol in a query protocol, acquiring a main node associated with the child node, and acquiring a query communication rule from a public part recorded in the main node.
In this step, the query communication rule is acquired from the public portion of the master node, so as to improve the efficiency of acquiring the query communication rule.
S42: and calling a transmission frame index and a transmission frame list in the query communication rule according to the query request to generate a query transmission frame.
In this step, the query request is request information reflecting that the user needs to acquire data recorded in the terminal through the edge computing host, and therefore, this step triggers the query communication rule operation through the query request to generate a query transmission frame according to the transmission frame index and the transmission frame list.
S43: and transmitting the inquiry transmission frame to the terminal corresponding to the inquiry equipment information, and receiving the inquiry response frame generated by the terminal according to the inquiry transmission frame.
In the step, the technical effect of reading the data in the terminal is realized through the inquiry response frame generated by the receiving terminal according to the inquiry transmission frame.
S44: and calling a signal point analysis matrix in the query communication rule to analyze the query response frame to obtain feedback information.
In the step, the query response frame is analyzed through the signal point analysis matrix to obtain feedback information which can be displayed on the edge computing host, so that a user can read the content of the terminal conveniently.
S202: receiving a setting request, extracting setting equipment information in the setting request, setting an integration protocol with the setting equipment information as a setting protocol, calling a setting communication rule in the setting protocol according to the setting request, and carrying out parameter configuration on a terminal corresponding to the setting equipment information.
In the step, the set device information is compared with all the sub-nodes of the integrated protocol in the integrated library to obtain the sub-node recorded with the set device information, and the integrated protocol of the sub-node is set as the set protocol, so that the communication rule corresponding to the set request can be obtained by only polling a small amount of information recorded in the sub-node, and the condition of low protocol acquisition efficiency caused by polling a large amount of communication protocols is avoided.
In this embodiment, the setting request may be directly input by the user on the edge computing host running the terminal protocol calling method, or may be input by a user terminal connected to the edge computing host.
In a preferred embodiment, invoking the set communication rule in the set protocol according to the set request, parameter configuration is performed on the terminal corresponding to the set device information, including:
s51: identifying a child node in which a setting device protocol is recorded in the setting protocol;
If the child node has the set communication rule, acquiring the set communication rule from the child node;
And if the child node does not have the set communication rule, acquiring the main node associated with the child node, and acquiring the set communication rule from the public part recorded by the main node.
S52: extracting setting parameters in the setting request, inputting the setting parameters into a sending frame list in the setting communication rule to obtain a configuration table, and generating a setting sending frame according to a sending frame index in the setting communication rule and the configuration table;
S53: and transmitting the setting transmission frame to the terminal corresponding to the setting equipment information, and configuring parameters in the terminal as setting parameters so as to realize parameter configuration of the terminal.
In this embodiment, the setting request is request information reflecting that the user needs to configure parameters in the terminal through the edge computing host, and in this step, the setting parameters in the setting request are entered into a sending frame list in a setting communication rule to be used as a variable of the sending frame list, so that the sending frame list is converted into a configuration table, and a sending frame index in the setting communication rule and the sending frame list are triggered to generate a setting sending frame, so that parameters in the terminal are modified into setting parameters, thereby realizing the technical effect of parameter configuration on the terminal.
Further, if the master node does not have the set communication rule, generating set protocol missing information to characterize that the edge computing host cannot perform parameter configuration on the terminal corresponding to the set equipment information; and displaying the setting protocol missing information on the edge computing host or sending the setting protocol missing information to the user side for displaying.
In a preferred embodiment, after invoking the set communication rule in the set protocol according to the set request and performing parameter configuration on the terminal corresponding to the set device information, the method further comprises:
s54: the receiving terminal generates a setting response frame according to the setting transmission frame;
s55: and calling a signal point analysis matrix in the set communication rule to analyze the response frame to obtain set feedback information.
In this embodiment, the setting response frame generated by the receiving terminal according to the setting transmission frame is analyzed by the signal point analysis matrix to set feedback information, and the setting feedback information characterizes whether the parameter configuration of the terminal is successful; if the configuration is successful, setting feedback information to be 'parameter configuration is successful'; if the configuration fails, the set feedback information will be "parameter configuration failed".
Example 3:
Referring to fig. 3, the present application further provides a terminal protocol integration device 30, including:
the protocol creation module 301 is configured to receive protocol information sent by the control end, construct a communication protocol according to the protocol information, and store the communication protocol in a preset protocol library;
A similarity identifying module 302, configured to aggregate communication protocols similar to each other in the protocol library into a protocol set, and store at least one protocol set in the integrated library;
The protocol integration module 303 is configured to identify a common portion of each communication protocol in the protocol set, construct a master node corresponding to the common portion in the integration library, and construct a child node corresponding to a non-common portion in the communication protocol, and associate the master node with the child node to obtain an integrated protocol of the protocol set, where the common portion is a protocol content of all communication protocols existing in the protocol set, and the non-common portion of the communication protocol is a content not belonging to the common portion in the communication protocol.
Example 4:
Referring to fig. 4, the present application further provides a terminal protocol calling device 40, including:
The data query module 401 is configured to receive a query request, extract query device information in the query request, set an integration protocol with the query device information as a query protocol, call a query communication rule in the query protocol according to the query request, and perform data query on a terminal corresponding to the query device information to obtain query feedback information, where the query feedback information records an operation state of the terminal, and/or collect data, and/or operate log information;
The parameter configuration module 402 is configured to receive the setting request, extract the setting device information in the setting request, set the integration 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.
Example 5:
to achieve the above object, the present application also provides a computer device 5 comprising: a processor and a memory communicatively coupled to the processor; the memory stores computer-executable instructions;
the processor executes computer execution instructions stored in the memory to implement the terminal protocol integration method and the terminal protocol calling method, where the components of the terminal protocol integration device and the terminal protocol calling device may be distributed in different computer devices, and the computer device 5 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a cabinet server (including an independent server, or a server cluster formed by multiple application servers) for executing a program, and so on. The computer device of the present embodiment includes at least, but is not limited to: a memory 51, a processor 52, which may be communicatively coupled to each other via a system bus, as shown in fig. 5. It should be noted that fig. 5 only shows a computer device with components-but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead. In the present embodiment, the memory 51 (i.e., readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the memory 51 may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the memory 51 may also be an external storage device of a computer device, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD), etc. that are provided on the computer device. Of course, the memory 51 may also include both internal storage units of the computer device and external storage devices. In this embodiment, the memory 51 is generally used for storing an operating system and various application software installed in a computer device, for example, program codes of the terminal protocol integration device and the terminal protocol calling device in the third embodiment. Further, the memory 51 may also be used to temporarily store various types of data that have been output or are to be output. Processor 52 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 52 is typically used to control the overall operation of the computer device. In this embodiment, the processor 52 is configured to execute the program code stored in the memory 51 or process data, for example, execute 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 foregoing embodiments.
The integrated modules, which are implemented in the form of software functional modules, may be stored in a computer readable storage medium. The software functional modules described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or processor to perform some of the steps of the methods of the various embodiments of the application. It should be appreciated that the Processor may be a central processing unit (Central Processing Unit, abbreviated as CPU), or may be other general purpose Processor, digital signal Processor (DIGITAL SIGNAL Processor, abbreviated as DSP), application SPECIFIC INTEGRATED Circuit (ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution. The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile memory NVM, such as at least one magnetic disk memory, and may also be a U-disk, a removable hard disk, a read-only memory, a magnetic disk or optical disk, etc.
To achieve the above object, the present application also provides a computer-readable storage medium such as a flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application store, etc., on which computer-executable instructions are stored, which when executed by the processor 52, perform the corresponding functions. The computer readable storage medium of the present embodiment is used for storing computer execution instructions for implementing the terminal protocol integration method and the terminal protocol call method, and when executed by the processor 52, implements the terminal protocol integration method and the terminal protocol call method of the above embodiments.
The storage medium may be implemented by any type or combination of volatile or nonvolatile memory devices 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 or optical disk. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an Application SPECIFIC INTEGRATED Circuits (ASIC). It is also possible that the processor and the storage medium reside as discrete components in an electronic device or a master device.
The application provides a computer program product, which comprises a computer program, wherein the computer program realizes the terminal protocol integration method and the terminal protocol calling method when being executed by a processor.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.