Industrial equipment protocol self-adaption method and device and storage medium

By building a protocol library for digital procurement platforms and using DLS algorithm for protocol adaptation, the efficiency and cost problems during heterogeneous equipment access are solved, efficient protocol analysis and data transmission are achieved, and the efficiency of industrial software is improved and operation and maintenance costs are reduced.

CN120301955APending Publication Date: 2025-07-11GUANGDONG ESHORE TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410036859.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-09
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

When large-scale batch access of heterogeneous equipment is launched, the existing technology requires manual configuration of protocols and parameters one by one, resulting in an extended access time, affecting the efficiency of software usage and increasing operation and maintenance costs.

Method used

The protocol library of the digital acquisition platform is built, and the DLS algorithm is used to pull protocols from the protocol library one by one through the acquisition box to adapt to industrial equipment. It uses the basic attributes of the protocol type and the search depth of the data identification to make effective judgments, automatically match the target protocol, and transmit and analyze data through the MQTT protocol.

Benefits of technology

The protocol analysis of isomorphic and heterogeneous equipment is realized, reducing manual intervention and configuration, improving the efficiency of industrial software usage, and reducing the operation and maintenance cost of the digital procurement platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120301955A_ABST
    Figure CN120301955A_ABST
Patent Text Reader

Abstract

The invention provides an industrial equipment protocol self-adaption method and device and a storage medium. The method comprises the following steps: constructing a protocol library of a data acquisition platform; industrial equipment is connected with a collection box, and the collection box is managed by a data collection platform; a DLS algorithm is adopted, and protocols are pulled one by one from a protocol library through an acquisition box to be subjected to protocol adaptation with industrial equipment; when a target protocol adaptive to the industrial equipment is found, returning a successful matching message to the data acquisition platform through the acquisition box, and ending protocol adaptation; performing data analysis according to a target protocol through industrial equipment, and acquiring protocol analysis data in real time through an acquisition box; the protocol analysis data is transmitted to the data acquisition platform through the acquisition box, and the data acquisition platform stores the analysis data in the time sequence database. The use efficiency of industrial software can be improved, and the implementation operation and maintenance cost of a data acquisition platform can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of industrial equipment Internet of Things, and particularly to a method, device and storage medium for self-adapting industrial equipment protocols. Background Art

[0002] With the wide application of the domestic information technology innovation industry in China, the device data acquisition software system is an industrial software for real-time monitoring, data recording and analysis, and providing data support for enterprises to optimize production processes. After the device data acquisition software system is adapted and transformed for domestic databases, it realizes self-control in the field of information technology.

[0003] Currently, most software requires manual configuration of protocols and parameters for each device. In this case, when heterogeneous devices are connected and accessed in large batches, the access time will increase as the number of devices increases, seriously affecting the software usage efficiency and increasing the implementation and operation and maintenance costs of the data acquisition platform. Summary of the Invention

[0004] Embodiments of this application provide a method, device and storage medium for self-adapting industrial equipment protocols to solve the problems in the related technologies. The technical solutions are as follows:

[0005] In the first aspect, embodiments of this application provide a method for self-adapting industrial equipment protocols, including:

[0006] Construct a protocol library for the data acquisition platform, where the protocol library includes multiple protocols;

[0007] Connect an industrial device to a collection box, and the collection box is managed by the data acquisition platform;

[0008] Adopt the DLS algorithm to pull protocols from the protocol library one by one through the collection box for protocol adaptation with the industrial device;

[0009] When a target protocol suitable for the industrial device is found, send a successfully matched message to the data acquisition platform through the collection box to end the protocol adaptation;

[0010] Parse data through the industrial device according to the target protocol, and then collect the protocol parsing data in real time through the collection box;

[0011] Transmit the protocol parsing data to the data acquisition platform through the collection box, and the data acquisition platform stores the parsing data in the time series database.

[0012] In one implementation, the multiple protocols include several first protocols commonly used by industrial devices; constructing the protocol library for the data acquisition platform includes:

[0013] Construct a number of protocol parameter models according to the message structures of the several first protocols, and the several protocol parameter models correspond to the several first protocols;

[0014] Construct the protocol library according to the several protocol parameter models.

[0015] In one implementation, constructing a number of protocol parameter models according to the message structures of the several first protocols includes:

[0016] Extract the data identifier of any one of the first protocols, and the data identifier includes a start bit, a data bit, a check bit, a stop bit, and a data bit pattern;

[0017] Construct one of the several protocol parameter models according to the data identifier of any one of the first protocols.

[0018] In one implementation, adopting the DLS algorithm to pull protocols from the protocol library one by one through the acquisition box for protocol adaptation with the industrial device includes:

[0019] Adopt the basic attributes of the protocol type as the restricted condition of the DLS algorithm, and set the number of data identifiers of the protocol as the search depth of the DLS algorithm;

[0020] Use the restricted condition to prune the heterogeneous protocol types in the protocol library, and then use the acquisition box to use the search depth to pull protocols from the protocol library one by one for valid judgment of data identifiers, so as to perform protocol adaptation on the industrial device.

[0021] In one implementation, the valid judgment of the data identifier means that when the value after the base conversion of the data identifier of the protocol does not exceed the valid range, it is judged that the data identifier of the protocol is valid.

[0022] In one implementation, returning a successfully matched message to the data acquisition platform through the acquisition box includes: returning a successfully matched message to the data acquisition platform through the acquisition box using the MQTT protocol;

[0023] Transmitting the protocol parsing data to the data acquisition platform through the acquisition box includes: transmitting the protocol parsing data to the data acquisition platform through the acquisition box using the MQTT protocol.

[0024] In one implementation, the method further includes:

[0025] When traversing the protocols in the protocol library and no target protocol adapted to the industrial device is found, enter the new protocol into the protocol library and configure the new protocol to the acquisition box.

[0026] In a second aspect, an embodiment of the present application further provides a device for self-adapting industrial equipment protocols, including:

[0027] A construction unit, configured to construct a protocol library of a data acquisition platform, where the protocol library includes multiple protocols;

[0028] A processing unit, configured to connect an industrial device to a collection box, where the collection box is managed by the data acquisition platform; use the DLS algorithm to pull protocols from the protocol library one by one through the collection box for protocol adaptation with the industrial device; when a target protocol adapted to the industrial device is found, send a successfully matched message to the data acquisition platform through the collection box to end the protocol adaptation;

[0029] An analysis unit, configured to perform data analysis on the industrial device according to the target protocol, and then collect protocol analysis data in real time through the collection box; transmit the protocol analysis data to the data acquisition platform through the collection box, and the data acquisition platform stores the analysis data in a time series database.

[0030] In one implementation, the multiple protocols include several first protocols commonly used by industrial devices; the construction unit is specifically configured to:

[0031] Construct several protocol parameter models according to the message structures of the several first protocols, and the several protocol parameter models correspond to the several first protocols;

[0032] Construct the protocol library according to the several protocol parameter models.

[0033] In one implementation, the construction unit is specifically configured to:

[0034] Extract the data identifier of any one of the first protocols, where the data identifier includes a start bit, a data bit, a check bit, a stop bit, and a data bit pattern;

[0035] Construct one of the several protocol parameter models according to the data identifier of any one of the first protocols.

[0036] In one implementation, the processing unit is specifically configured to:

[0037] Use the basic attributes of the protocol type as the restricted condition of the DLS algorithm, and set the number of data identifiers of the protocol as the search depth of the DLS algorithm;

[0038] Use the restricted condition to prune heterogeneous protocol types in the protocol library, and then use the search depth through the collection box to pull protocols from the protocol library one by one for effective judgment of data identifiers to perform protocol adaptation on the industrial device.

[0039] In one embodiment, the valid determination of the data identifier means that when the value after the base conversion of the data identifier of the protocol does not exceed the valid range, it is determined that the data identifier of the protocol is valid.

[0040] In one embodiment, the processing unit is further configured to: return a successfully matched message to the data acquisition platform through the acquisition box using the MQTT protocol;

[0041] The parsing unit is further configured to: transmit the protocol parsing data to the data acquisition platform through the acquisition box using the MQTT protocol.

[0042] In one embodiment, the processing unit is further configured to:

[0043] When traversing the protocols in the protocol library and no target protocol adapted to the industrial device is found, a new protocol is entered into the protocol library and the new protocol is configured for the acquisition box.

[0044] In a third aspect, an embodiment of the present application further provides a computer device, which includes: a memory and a processor. Instructions are stored in the memory, and the instructions are loaded and executed by the processor to implement the method in any one of the above aspects. Among them, the memory and the processor communicate with each other through an internal connection path.

[0045] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program runs on a computer, the method in any one of the above aspects is implemented.

[0046] The advantages or beneficial effects in the above technical solutions at least include:

[0047] The present application can be oriented to the protocol self-adaptation of the application layer in the OSI model. Through the DLS algorithm, the protocol that matches the acquisition device is searched and obtained from the protocol library of the acquisition device with the least consumption, and the protocol parsing of homogeneous and heterogeneous devices is completed, reducing the operation of manual intervention configuration. Thereby, the usage efficiency of industrial software can be improved, and the implementation and operation and maintenance costs of the data acquisition platform can be reduced.

[0048] The above summary is only for the purpose of the specification and is not intended to be limiting in any way. In addition to the above-described illustrative aspects, embodiments, and features, further aspects, embodiments, and features of the present application will be readily apparent by referring to the drawings and the following detailed description. Description of the Drawings

[0049] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the several views denote the same or similar components or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments disclosed in accordance with the present application and should not be regarded as limiting the scope of the present application.

[0050] Figure 1 It is a schematic flow chart of a method for self-adapting industrial device protocols provided by an embodiment of the present application;

[0051] Figure 2 It is a schematic structural diagram of a serial port data identifier provided by an embodiment of the present application;

[0052] Figure 3 It is a protocol matching flow chart provided by an embodiment of the present application;

[0053] Figure 4 It is a schematic flow chart of protocol adaptation for industrial devices by the DLS algorithm provided by an embodiment of the present application;

[0054] Figure 5 It is a schematic diagram of searching for an adapted protocol by the DLS algorithm provided by an embodiment of the present application;

[0055] Figure 6 It is a structural block diagram of a device for self-adapting industrial device protocols provided by an embodiment of the present application;

[0056] Figure 7 It is a structural block diagram of a computing device provided by an embodiment of the present application. Detailed implementation manners

[0057] In the following, only some exemplary embodiments are simply described. As those skilled in the art can recognize, the described embodiments can be modified in various different ways without departing from the spirit or scope of the present application. Therefore, the drawings and the description are considered to be exemplary in nature rather than restrictive.

[0058] In the related art, although there are individual solutions that can self-adapt to different protocol types of heterogeneous devices and improve the adaptation efficiency, when facing different types of devices with the same type of protocol or similar devices with different data identifiers for the same type of protocol, situations of misjudgment or protocol parsing errors are likely to occur.

[0059] For example, the Chinese invention patent with the application number 202211323219.6 discloses a method for self - adapting the protocols of Internet of Things devices based on DFS. In this method, the Depth First Search (DFS) algorithm is used as the basic algorithm. Through protocol layering and protocol classification as pruning conditions, device adaptation and parsing are carried out to solve the problem of a large number of heterogeneous device accesses, shorten the search range of protocol types, match the corresponding protocol types, reduce the manual protocol adaptation operations when each device accesses, improve the operation and maintenance efficiency of the software system, and reduce the operation and maintenance costs. Although this method can self - adapt to different protocol types of heterogeneous devices and improve the adaptation efficiency, when facing different types of devices with the same type of protocol or similar devices with different data identifiers of the same type of protocol, misjudgment or protocol parsing errors are likely to occur. Especially when facing serial port protocol devices, this method has a relatively high error rate.

[0060] Based on this, in the technical solution provided in the embodiment of the present application, for the protocol self - adaptation of the application layer in the Open System Interconnect (OSI) model, the Depth Limited Search (DLS) algorithm is used to search and obtain the matching protocol from the protocol library of the data acquisition platform with the least consumption, and the protocol parsing of homogeneous and heterogeneous devices is completed, which can avoid misjudgment or protocol parsing errors, reduce the operations of manual intervention configuration, and reduce the operation and maintenance costs of the data acquisition platform implementation.

[0061] Among them, the DFS algorithm is an algorithm used to traverse or search trees or graphs. The most important algorithm ideas in the DFS algorithm are backtracking and pruning. By circularly pruning all branches and nodes, the final result is obtained. The DLS algorithm is a search algorithm based on the premise of minimum cost or maximum benefit. The DLS algorithm stipulates the maximum depth of the DFS algorithm. When this depth is reached, the search will be abandoned and other branches or nodes will be explored instead, solving the problem of infinite paths.

[0062] Next, the technical solution provided in the embodiment of the present application will be introduced in detail with reference to the accompanying drawings.

[0063] Figure 1 The flowchart showing the method for self - adapting the industrial device protocol according to an embodiment of the present application is as follows. Figure 1 As shown, the method may include the following steps:

[0064] S110. Construct the protocol library of the data acquisition platform.

[0065] In specific implementation, the protocol library may include multiple protocols.

[0066] In one implementation manner, step S110 may include the following steps:

[0067] S111. Construct a number of protocol parameter models according to the message structures of a number of first protocols.

[0068] In specific implementation, the number of first protocols can be protocols commonly used by industrial devices. Among them, the above-mentioned multiple protocols can include a number of first protocols. Among them, the number of first protocols can include but are not limited to: Modbus protocol, DLT645 protocol, OPCUA protocol.

[0069] In specific implementation, the number of protocol parameter models corresponds to the number of first protocols.

[0070] In specific implementation, step S111 can include: extracting the data identifier of any one of the first protocols, and the data identifier includes a start bit, data bits, a check bit, a stop bit, and a data bit pattern; then constructing one of the number of protocol parameter models according to the data identifier of any one of the first protocols. It can be understood that using the start bit, data bits, check bit, stop bit, and data bit pattern of any one of the first protocols as elements to construct any protocol parameter model.

[0071] As an example, the message structure of the data identifier part of any one of the first protocols can be as Figure 2 shown.

[0072] S112. Construct the protocol library according to the number of protocol parameter models.

[0073] That is, the protocol library includes a number of protocol parameter models. It can be understood that any one of the first protocols is entered into the protocol library in the form of the constructed protocol parameter model style.

[0074] In the embodiment of the present application, by executing step S111-step S112, protocols accumulated by industrial devices collected from past projects can be entered into the protocol library based on the protocol parameter models, forming an industrial knowledge base, which can facilitate subsequent protocol parsing of industrial devices using common protocols through the protocol parameter models.

[0075] In the embodiment of the present application, by executing step S110, it is possible to support converting the operation of configuring the protocol for each industrial device offline into automatic adaptation of the protocol remotely in the cloud, which helps to improve the operation and maintenance efficiency of the data acquisition platform.

[0076] S120. Connect the industrial device to the acquisition box.

[0077] In specific implementation, the acquisition box is managed by the data acquisition platform.

[0078] In specific implementation, after the industrial device is connected to the acquisition box, the data flow among the industrial device, the acquisition box, and the data acquisition platform can be as follows:

[0079] The data source of the data acquisition platform starts from the acquisition gateway. That is, the acquisition gateway pushes data to the EMQX cluster to which the data acquisition platform belongs through the Message Queuing Telemetry Transport (MQTT) protocol. The data acquisition platform receives the pushed data in real time and converges the pushed data in the time series database of the data acquisition platform in a continuous time series manner.

[0080] Among them, MQTT is a client-server based message publishing / subscribing transport protocol.

[0081] In the embodiment of the present application, by executing step S120, it is convenient to pull protocols from the protocol library of the data acquisition platform through the acquisition box, support converting the operation of configuring protocols for each industrial device offline into automatic protocol adaptation remotely in the cloud, which helps to improve the operation and maintenance efficiency of the data acquisition platform.

[0082] S130. Adopt the DLS algorithm, and pull protocols from the protocol library one by one through the acquisition box for protocol adaptation with industrial devices.

[0083] As an example, the operation process of protocol self-adaptation can be as Figure 3 shown: The acquisition box pulls protocols from the data acquisition platform one by one, and adapts and communicates with the industrial device with this protocol. If the communication fails, it pulls the next protocol and continues to perform adaptation communication until the adaptation is successful or all protocols are matched.

[0084] In one implementation manner, step S130 may include the following steps:

[0085] S131. Use the basic attributes of the protocol type as the restricted condition of the DLS algorithm, and set the number of data identifiers of the protocol as the search depth of the DLS algorithm.

[0086] The DLS algorithm is similar to the DFS algorithm with a predetermined limit. The DLS algorithm can solve the shortcoming of the infinite path in the DFS algorithm. In the DLS algorithm, nodes with a depth limit will be regarded as having no subsequent nodes.

[0087] In specific implementation, the number of the data identifiers can be set according to requirements and can be adjusted later as long as it does not exceed the number of data identifiers in the above protocol parameter model.

[0088] S132. Use this restricted condition to prune heterogeneous protocol types in the protocol library, and then use this search depth through the acquisition box to pull protocols from the protocol library one by one for effective judgment of data identifiers to perform protocol adaptation on industrial devices.

[0089] In specific implementation, the heterogeneous protocol type refers to a protocol type different from the protocol types adapted to industrial devices.

[0090] In practical applications, the DLS algorithm has two defects: one is that it is incomplete in itself and will not expand to search every node in all paths; the other is that if there are multiple valid solutions to a problem, it may not be able to find the optimal path.

[0091] However, specifically in the industrial scenario, these two disadvantages of the DLS algorithm can instead provide the computing consumption of the data acquisition platform and ensure the accuracy rate by controlling the search depth (L). Generally speaking, the data identifier of the serial port protocol is unique, and different combinations will generate different protocols. Therefore, when the search depth L is greater than 1 / 2 of the total length of the protocol, the accuracy rate of the protocol can be ensured. If special circumstances occur, the value of the search depth L can be appropriately increased to ensure the accuracy rate.

[0092] That is, in step S132, based on the DLS algorithm, it is possible to avoid getting into an infinite loop situation, reduce the platform computing consumption, and improve the memory efficiency.

[0093] In specific implementation, the implementation process of the above step S131 - step S132 can refer to Figure 4 as shown.

[0094] As an example, as Figure 5 shown, the protocols to be adapted are A, H, and J. Identify the basic attributes of the A protocol type. Among them, there are 5 targets with the same basic attributes of the protocol type. Set L = 2. When the search depth reaches L2, the node at this search depth is the last point, and it jumps to other paths to search. The search path is: B → C → F → H → I → J. At point J, a completely matching protocol is judged, and a message of successful adaptation is returned to the data acquisition platform to complete the adaptation activity. In this process, the efficiency is improved by:

[0095] [O(b*L m ) - O(b*L2)] / O(b*L m ) * 100% = 4 / 10 * 100% = 40%,

[0096] O(b*L) is the space complexity of the DLS algorithm, and L = 2.

[0097] That is, in the above step S131 - step S132, the node with the highest priority can be selected according to the priority specified in the priority queue as the current expansion node. When the expansion node reaches this depth, the search will be abandoned and other branches or nodes will be explored instead, thus solving the problem of infinite paths. Using the basic attributes of the protocol type as a restricted condition for preliminary protocol screening, and finally judging whether the corresponding protocol matches based on the valid range of the data identifier, the protocol self - adaptation operation can be completed.

[0098] In specific implementation, the above-mentioned valid judgment of the data identifier means that when the value of the data identifier of the protocol after radix conversion does not exceed the valid range, it is determined that the data identifier of the protocol is valid. Among them, the valid range can be set according to actual needs.

[0099] In the embodiment of the present application, by executing step S130, the DLS algorithm can be used to search and obtain the protocol matching the industrial device from the protocol library of the data acquisition platform with the least consumption, complete the protocol parsing of homogeneous and heterogeneous devices, reduce the operation of manual intervention configuration, thereby improving the usage efficiency of industrial software and reducing the implementation and operation and maintenance costs of the data acquisition platform.

[0100] In another implementation manner, as shown in combination with Figure 1 and Figure 4 the method for self-adapting the industrial device protocol in the embodiment of the present application may further include the following steps:

[0101] S130a. When traversing all the protocols in the protocol library and no target protocol matching the industrial device is found, a new protocol is entered into the protocol library and the new protocol is configured for the acquisition box.

[0102] In step S130a, the new protocol can be entered into the protocol library in the same or similar manner as step S111 above, and the embodiment of the present application will not elaborate here.

[0103] In specific implementation, after step S130a, step S130 can be returned for execution.

[0104] In the embodiment of the present application, by executing step S130a, it is possible to support updating the protocol library, further support converting the operation of configuring the protocol for each industrial device offline into automatic protocol adaptation remotely in the cloud, which helps to improve the operation and maintenance efficiency of the data acquisition platform.

[0105] S140. When a target protocol matching the industrial device is found, a successfully matched message is returned to the data acquisition platform through the acquisition box to end the protocol adaptation.

[0106] In specific implementation, when the values of the data identifiers of a certain protocol after radix conversion are all within the valid range, it can be determined that the protocol is the target protocol adapted to the industrial device. At this time, the protocol adaptation can be ended.

[0107] In specific implementation, when the industrial device protocol is successfully matched, a successfully matched message can be returned to the data acquisition platform through the acquisition box using the MQTT protocol. For example, the acquisition box uses the MQTT protocol to send an instruction of successful protocol matching to the data acquisition platform.

[0108] In the embodiment of the present application, by executing step S140, the data acquisition platform can be notified to store the protocol parsing data.

[0109] S150. The industrial device performs data parsing according to the target protocol, and then the acquisition box collects the protocol parsing data in real time.

[0110] In specific implementation, after the industrial device performs data parsing according to the target protocol, the acquisition box collects in real time the protocol parsing data obtained after the industrial device performs data parsing.

[0111] S160. The acquisition box transmits the protocol parsing data to the data acquisition platform, and the data acquisition platform stores the parsing data in the time series database.

[0112] In specific implementation, the acquisition box can transmit the protocol parsing data to the data acquisition platform by using the MQTT protocol. After receiving the protocol parsing data, the data acquisition platform can store the protocol parsing data in the time series database.

[0113] In summary, the present application can perform protocol self - adaptation for the application layer in the OSI model. Through the DLS algorithm, the protocol that matches is searched and obtained from the protocol library of the acquisition device with the least consumption, completing the protocol parsing of homogeneous and heterogeneous devices, reducing the operation of manual intervention configuration, thereby improving the use efficiency of industrial software and reducing the implementation and operation and maintenance costs of the data acquisition platform.

[0114] Figure 6 The structural block diagram of the device for industrial device protocol self - adaptation according to an embodiment of the present application is shown.

[0115] As Figure 6 shown, the device may include:

[0116] A construction unit 210, configured to construct a protocol library of the data acquisition platform, where the protocol library includes multiple protocols;

[0117] A processing unit 220, configured to connect the industrial device to the acquisition box, and the acquisition box is managed by the data acquisition platform; use the DLS algorithm to pull protocols from the protocol library one by one through the acquisition box for protocol adaptation with the industrial device; when the target protocol adapted to the industrial device is found, return a successful matching message to the data acquisition platform through the acquisition box to end the protocol adaptation;

[0118] An analysis unit 230, configured to perform data parsing by the industrial device according to the target protocol, and then collect the protocol parsing data in real time through the acquisition box; transmit the protocol parsing data to the data acquisition platform through the acquisition box, and the data acquisition platform stores the parsing data in the time series database.

[0119] In one implementation, the multiple protocols include several first protocols commonly used by industrial devices; the building unit 210 is specifically configured to:

[0120] According to the message structures of the several first protocols, construct several protocol parameter models, and the several protocol parameter models correspond to the several first protocols;

[0121] Construct a protocol library according to the several protocol parameter models.

[0122] In one implementation, the building unit 210 is specifically configured to:

[0123] Extract the data identifier of any one of the first protocols, where the data identifier includes a start bit, data bits, a check bit, a stop bit, and a data bit pattern;

[0124] Construct one protocol parameter model among the several protocol parameter models according to the data identifier of any one of the first protocols.

[0125] In one implementation, the processing unit 220 is specifically configured to:

[0126] Use the basic attributes of the protocol type as the restricted condition of the DLS algorithm, and set the number of data identifiers of the protocol as the search depth of the DLS algorithm;

[0127] Use the restricted condition to prune the heterogeneous protocol types in the protocol library, and then use the search depth through the acquisition box to pull the protocols from the protocol library one by one for valid judgment of the data identifiers, so as to perform protocol adaptation on the industrial device.

[0128] In one implementation, the valid judgment of the data identifier means that when the value after the radix conversion of the data identifier of the protocol does not exceed the valid range, it is judged that the data identifier of the protocol is valid.

[0129] In one implementation, the processing unit 220 is further configured to: return a successfully matched message to the data acquisition platform through the acquisition box using the MQTT protocol;

[0130] The parsing unit 230 is further configured to: transmit the protocol parsing data to the data acquisition platform through the acquisition box using the MQTT protocol.

[0131] In one implementation, the processing unit 220 is further configured to:

[0132] When traversing the protocols in the protocol library and no target protocol adapted to the industrial device is found, enter the new protocol into the protocol library and configure the new protocol for the acquisition box.

[0133] For the functions of the units in the industrial device protocol self-adaptation device according to the embodiments of the present application, reference can be made to the corresponding descriptions in the above method, which will not be elaborated here.

[0134] Figure 7 The structural block diagram of a computer device according to an embodiment of the present application is shown. As Figure 7 shown, the computer device includes: a memory 310 and a processor 320. Instructions are stored in the memory 310 and are loaded and executed by the processor 320 to implement the method for self-adapting industrial device protocols in the above embodiments. The number of the memory 310 and the processor 320 can be one or more.

[0135] The computer device further includes:

[0136] a communication interface 330, configured to communicate with external devices and perform data interaction and transmission.

[0137] If the memory 310, the processor 320, and the communication interface 330 are implemented independently, the memory 310, the processor 320, and the communication interface 330 can be interconnected through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity of representation, Figure 7 only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0138] Optionally, in a specific implementation, if the memory 310, the processor 320, and the communication interface 330 are integrated on a chip, the memory 310, the processor 320, and the communication interface 330 can communicate with each other through an internal interface.

[0139] An embodiment of the present application provides a computer-readable storage medium. A computer program is stored in the computer-readable storage medium. When the computer program runs on a computer, the method provided in the embodiment of the present application is implemented.

[0140] An embodiment of the present application further provides a chip, which includes a processor for calling and running instructions stored in a memory, so that a communication device equipped with the chip executes the method provided in the embodiment of the present application.

[0141] An embodiment of the present application further provides a chip, including: an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected through an internal connection path. The processor is configured to execute the code in the memory. When the code is executed, the processor is configured to execute the method provided by the embodiment of the application.

[0142] It should be understood that the above-mentioned processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the advanced reduced instruction set machines (ARM) architecture.

[0143] Further, optionally, the above-mentioned memory may include a read-only memory and a random access memory, and may further include a non-volatile random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DR RAM).

[0144] In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.

[0145] In the description of this specification, the descriptions with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples.

[0146] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of these features. In the description of the present application, "a plurality of" means two or more unless otherwise specifically defined.

[0147] Any process or method description represented in a flowchart or described in other ways herein may be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a specific logical function or process. And the scope of the preferred embodiments of the present application includes additional implementations, where the functions may be executed in a substantially simultaneous manner or in a reverse order according to the functions involved, rather than in the order shown or discussed.

[0148] The logic and / or steps represented in a flowchart or described in other ways herein, for example, may be considered as a sequenced list of executable instructions for implementing a logical function and may be specifically implemented in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device).

[0149] It should be understood that each part of the present application can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the method in the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0150] In addition, each functional unit in various embodiments of the present application may be integrated into a processing module, may exist separately physically for each unit, or two or more units may be integrated into one module. The above integrated module may be implemented in the form of hardware or in the form of a software functional module. When the above integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The storage medium may be a read-only memory, a magnetic disk, an optical disk, or the like.

[0151] As described above, it is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present application can easily think of various changes or substitutions thereof, and these should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for self - adaptation of industrial equipment protocols, characterized in that, Including: Constructing a protocol library for the data acquisition platform, where the protocol library includes multiple protocols; Connecting industrial devices to the acquisition box, and the acquisition box is managed by the data acquisition platform; Adopting the DLS algorithm to pull protocols one by one from the protocol library through the acquisition box for protocol adaptation with the industrial devices; When a target protocol adapted to the industrial device is found, sending a successfully matched message to the data acquisition platform through the acquisition box to end the protocol adaptation; Parsing data by the industrial device according to the target protocol, and then collecting protocol-parsed data in real time through the acquisition box; Transmitting the protocol-parsed data to the data acquisition platform through the acquisition box, and the data acquisition platform stores the parsed data in the time series database.

2. The method according to claim 1, wherein The multiple protocols include several first protocols commonly used by industrial devices; constructing the protocol library of the data acquisition platform includes: Constructing several protocol parameter models according to the message structures of the several first protocols, and the several protocol parameter models correspond to the several first protocols; Constructing the protocol library according to the several protocol parameter models.

3. The method according to claim 2, characterized in that Constructing several protocol parameter models according to the message structures of the several first protocols includes: Extracting the data identifier of any one of the first protocols, where the data identifier includes a start bit, a data bit, a check bit, a stop bit, and a data bit pattern; Constructing one of the several protocol parameter models according to the data identifier of any one of the first protocols.

4. The method according to claim 1, wherein Adopting the DLS algorithm to pull protocols one by one from the protocol library through the acquisition box for protocol adaptation with the industrial devices includes: Using the basic attributes of the protocol type as the restricted condition of the DLS algorithm, and setting the number of data identifiers of the protocol as the search depth of the DLS algorithm; Using the restricted condition to prune heterogeneous protocol types in the protocol library, and then using the search depth through the acquisition box to pull protocols one by one from the protocol library for valid judgment of data identifiers to perform protocol adaptation on the industrial devices.

5. The method according to claim 4, wherein The valid judgment of the data identifier means that when the value after the radix conversion of the data identifier of the protocol does not exceed the valid range, it is judged that the data identifier of the protocol is valid.

6. The method according to claim 1, wherein Sending a successfully matched message to the data acquisition platform through the acquisition box includes: sending a successfully matched message to the data acquisition platform through the acquisition box using the MQTT protocol; Transmitting the protocol-parsed data to the data acquisition platform through the acquisition box includes: transmitting the protocol-parsed data to the data acquisition platform through the acquisition box using the MQTT protocol.

7. The method according to any one of claims 1-6, characterized in that, The method further includes: When traversing the protocols in the protocol library and no target protocol adapted to the industrial device is found, entering a new protocol into the protocol library and configuring the new protocol to the acquisition box.

8. An apparatus for self - adapting industrial equipment protocols, characterized in that, Including: A construction unit for constructing a protocol library for the data acquisition platform, where the protocol library includes multiple protocols; A processing unit for connecting industrial devices to the acquisition box, and the acquisition box is managed by the data acquisition platform; Adopt the DLS algorithm, and pull protocols one by one from the protocol library through the acquisition box for protocol adaptation with the industrial device; when the target protocol adapted to the industrial device is found, return a successfully matched message to the data acquisition platform through the acquisition box to end the protocol adaptation; A parsing unit, which is used to parse data through the industrial device according to the target protocol, and then collect protocol parsing data in real time through the acquisition box; Transmit the protocol parsing data to the data acquisition platform through the acquisition box, and the data acquisition platform stores the parsing data in the time series database.

9. A computer device, characterized in that, Comprising: A memory and a processor, wherein instructions are stored in the memory, and the instructions are loaded and executed by the processor to implement the method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, and when the computer program runs on a computer, the method according to any one of claims 1-7 is implemented.

Citation Information

Patent Citations

  • Internet of Things equipment protocol self-adaption method based on DFS

    CN115801911A