Visual configuration method and system for multi-protocol industrial data acquisition process

Through the multi-protocol industrial data acquisition process visual configuration system, users can edit and compile data acquisition protocols through a graphical interface to generate instruction codes, solving the problem of high protocol learning and development costs in the existing technology, and achieving efficient and flexible Data collection.

CN119105373APending Publication Date: 2024-12-10XIAN THERMAL POWER RES INST CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411380333.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

When collecting existing industrial data, different data acquisition drivers need to be developed for different protocols, resulting in high development, testing and implementation costs and high protocol learning costs.

Method used

Provides a visual configuration system for multi-protocol industrial data acquisition process, including protocol communication process logical topology configuration module, protocol management module, protocol logic topology diagram compilation module, operating environment module, etc., allowing users to edit and compile data acquisition protocols through graphical interfaces , generate instruction codes to reduce dependence on developers.

Benefits of technology

It reduces development costs, improves the efficiency of industrial data acquisition, simplifies the understanding and learning of data acquisition protocols, and supports the rapid configuration and management of multiple protocols.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119105373A_ABST
    Figure CN119105373A_ABST
Patent Text Reader

Abstract

The invention provides a visual configuration method and system for a multi-protocol industrial data acquisition process, and belongs to the technical field of network data transmission, and the method comprises the steps: carrying out the logic topology configuration of an acquisition protocol communication process, generating an acquisition protocol communication logic topological graph, and editing a data acquisition process in a data acquisition protocol based on a graph configuration module; compiling the acquisition protocol communication logic topological graph to generate an instruction code; and loading the instruction code in a driving mode in response to data acquisition software, configuring communication parameters, and acquiring data of a corresponding data acquisition protocol. By using the system and the method provided by the invention, field engineering implementation personnel can directly make instruction codes corresponding to the acquisition protocols to acquire data, and developers do not need to develop data acquisition driving programs aiming at different data acquisition protocols, so that the development cost is saved, and the industrial data acquisition efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of network data transmission, and in particular relates to a method and system for visual configuration of a multi-protocol industrial data acquisition process. Background Art

[0002] When collecting industrial data, the traditional data collection process requires the development of different data collection drivers for different protocols. At present, there are many industrial data collection protocol standards, such as OPC DA, OPC UA, Modbus, 101~104 power protocols and various data collection protocols based on 232 / 485 serial ports, TCP, UDP communication protocols, and self-developed protocols provided by some manufacturers. Because each data collection protocol needs to develop a new data collection driver, data collection work requires a lot of development, testing and implementation costs. Supporting new data collection protocols also requires the development, testing and engineering implementation personnel in the project team to learn and understand the data collection protocols in order to deal with the scenarios of data collection failure that may occur in the project. The learning cost of data collection protocols is high, especially for some complex data collection protocols. Summary of the invention

[0003] The purpose of the present invention is to provide a method and system for visual configuration of multi-protocol industrial data collection process in view of the high time and labor costs in existing industrial data collection. For special new data collection protocols, using the system and method provided by the present invention, on-site engineering implementation personnel can directly produce instruction codes corresponding to the collection protocol to collect data, and developers no longer need to develop data collection drivers for different data collection protocols, which saves development costs and improves the efficiency of industrial data collection.

[0004] In order to achieve the above object, the technical solution adopted by the present invention is: The first object of the present invention is to provide a multi-protocol industrial data acquisition process visualization configuration system, comprising: The protocol communication process logical topology configuration module is used to create a new data acquisition protocol and perform visual graphic editing on the data format and interaction process in the protocol. After the editing is completed, a protocol logical topology diagram is generated; The protocol management module is used to provide methods for naming, saving, and importing existing data acquisition protocols. The protocols are stored in a custom text format; The protocol logic topology diagram compiling module is used to provide a compiling function, compile the protocol logic topology diagram generated by the protocol communication process logic topology configuration module, and generate executable instruction codes; The operating environment module is used for the operating environment provided by the data acquisition software for the instruction code. It loads the instruction code in a driving mode through a fixed interface and controls the start and stop of the acquisition protocol corresponding to the instruction code.

[0005] Furthermore, it also includes: Basic communication library module, used to provide TCP, UDP network communication and 232 / 485 serial port communication encapsulation; The logic operation library module is used to provide the encapsulation of logic operations; Mathematical operation library module, used to provide mathematical operation encapsulation; Verification algorithm library module, used to provide data verification algorithms and support custom verification algorithm extensions; Packing / unpacking library module, used to provide dynamic arrays and packing / unpacking algorithms in communication processes; The graphic configuration module provides graphic configuration methods and supports the creation and property editing of common graphics such as rectangles, ellipses, straight lines, arrows, etc.

[0006] The second object of the present invention is to provide a multi-protocol industrial data acquisition process visualization configuration method, comprising the following steps: Acquire the logical topology configuration of the communication process of the protocol, generate the logical topology diagram of the communication of the protocol, and edit the data acquisition process in the data acquisition protocol based on the graphic configuration module; Compile the acquisition protocol communication logic topology diagram and generate instruction code; In response to the data acquisition software loading the instruction code in a driving mode and configuring communication parameters, data corresponding to the data acquisition protocol is acquired.

[0007] As a further improvement of the present invention, the generation of the acquisition protocol communication logical topology diagram is to perform package assembly / unpacking logical topology editing on the acquisition protocol data sending / receiving process based on the graphics library and the basic algorithm library to form the acquisition communication logical topology diagram.

[0008] As a further improvement of the present invention, the data acquisition protocol includes multiple data acquisition processes. According to different acquisition protocols, users can define different data acquisition processes, and the acquisition protocol communication logic topology diagram can be saved as a custom text format; As a further improvement of the present invention, the acquisition protocol communication logic topology diagram is compiled to generate instruction codes, including generating intermediate codes according to the acquisition protocol set communication logic topology diagram, and optimizing the intermediate codes to generate instruction codes.

[0009] As a further improvement of the present invention, the acquisition protocol communication process logical topology configuration and the generation of instruction codes include the following steps: Step S201: Create a new acquisition protocol configuration, create or import an existing acquisition protocol text, and set the acquisition protocol trigger period; Step S202: Select the acquisition protocol basic communication library and the communication protocol basic parameter variable definition; Step S203: Add a new data collection process, which is divided into two types: data sending process and data receiving process; Step S204: if the collection process is selected as the data sending process, the data package process is topologically edited, the data packet header is edited using the package library, data is filled according to the protocol requirements, a data check field is added according to the protocol requirements, and a data packet tail is added according to the protocol requirements; Step S205: if the collection process is selected as the data receiving process, the data unpacking process is topologically edited, the data packet header is parsed using the unpacking library, the data is parsed according to the protocol requirements, the data check field is parsed according to the protocol requirements, and the data packet tail is parsed according to the protocol requirements; Step S206: Determine whether the data acquisition protocol process is finished. If the protocol process is not finished, add the data acquisition process according to the acquisition protocol sequence, and repeat steps S203, S204, and S205. If the protocol process is finished, proceed to the next step. Step S207: After completing the acquisition protocol configuration, the user checks the data and process of the acquisition protocol based on the graphic configuration module, generates a communication logic topology diagram of the acquisition protocol set, names and saves the acquisition communication logic topology diagram, and supports saving the data acquisition protocol in a custom text format; Step S208: The protocol logic topology diagram compiling module generates an intermediate code according to the communication logic topology diagram of the protocol set, and optimizes the intermediate code to generate instruction code.

[0010] As a further improvement of the present invention, in response to the data acquisition software loading the instruction code in a driving mode and configuring the communication parameters, the start and stop of the instruction code is controlled through a predefined interface to complete data acquisition of the corresponding data acquisition protocol.

[0011] As a further improvement of the present invention, in response to the data acquisition software loading the instruction code in a driving mode and configuring the communication parameters, collecting data corresponding to the data acquisition protocol includes the following steps: Step S301: Loading instruction code, the data acquisition software loads the instruction code in the specified path through the preset interface; Step S302: Load the basic algorithm library, which includes: basic communication library, logic operation library, mathematical operation library, algorithm verification library, and package assembly / unpacking library; Step S303: determine whether the collection period has arrived. If the collection period has not arrived, continue to determine after a fixed interval. If the collection period has arrived, enter the data collection process. Step S304: loading a data collection process and determining the type of the currently loaded data collection process; Step S305: If the data collection process is a data sending process, the instruction code enters the packet assembly process, fills the data packet header and fills the data field according to the data format in the instruction code, and if there are multiple data, cyclically fills, assembles the packet check field and the packet tail, and after the data is assembled, calls the sending interface to send the data; Step S306: If the data flow is a data receiving flow, determine the basic protocol type. If the basic protocol is TCP, first receive the data packet header, parse the data packet header, and then receive the remaining data according to the data length defined in the packet header or instruction code protocol. If the basic protocol is UDP or 232 / 485 serial port, receive one complete data at a time; parse the data packet header according to the format of each protocol, and optionally parse the data according to the protocol. If there are multiple data, parse them in a loop, parse the data check field according to the protocol and verify, and optionally parse the packet tail according to the protocol; Step S307: If the data is correctly received and parsed and the current data packet contains the data that needs to be collected in the end, the data is forwarded to the collection software service interface; Step S308: If there is an abnormality in receiving or parsing data, a corresponding prompt is given and the next collection cycle is entered; Step S309: Determine whether all data collection processes have been loaded. If not, continue to load the next collection process and repeat steps S304 to S308. If all data collection processes have been loaded, determine whether it is necessary to execute the next collection cycle to continue collecting data. Step S310: If it is necessary to execute the next collection cycle to continue collecting data, then repeat steps S303 to S309; ​​otherwise, complete the collection of protocol data corresponding to the instruction code.

[0012] The third purpose is to provide a multi-protocol industrial data acquisition process visualization configuration system, including: A graphic configuration unit is used to configure the logical topology of the communication process of the acquisition protocol, generate a logical topology diagram of the communication of the acquisition protocol, and edit the data acquisition process in the data acquisition protocol based on the graphic configuration module; A compiling unit, used for compiling the acquisition protocol communication logic topology diagram and generating instruction codes; The data acquisition unit is used to load the instruction code and configure communication parameters in a driving mode in response to the data acquisition software, and to acquire data corresponding to the data acquisition protocol.

[0013] Compared with the prior art, the present invention has the following technical effects: The system provided by the present invention includes: a graphic configuration module, a basic communication library, a logic operation library, a mathematical operation library, an algorithm verification library, a package assembly / unpacking library, a protocol communication process logical topology configuration, a protocol management module, a protocol logical topology map compilation module, and an operating environment module. When adding or modifying a data acquisition protocol, the user configures the data acquisition protocol communication process through the data acquisition process visualization configuration system provided by the present invention, generates an acquisition protocol communication logical topology map, and the protocol logical topology map compilation module compiles the acquisition protocol communication logical topology map into an instruction code, which can be put into the acquisition software to run to complete the data acquisition of the corresponding protocol.

[0014] When the present invention is used for industrial data collection, for special new data collection protocols, using the method provided by the present invention, on-site engineering implementation personnel can directly produce instruction codes corresponding to the collection protocol to collect data, and developers no longer need to develop data collection drivers for different data collection protocols, saving development costs and improving the efficiency of industrial data collection; at the same time, the data collection protocol is displayed in a graphical manner, making the data collection protocol easy to understand and reducing the learning cost of the project team. When a new data collection protocol is added, the user defines the data collection protocol by means of visual graphic configuration. The present invention can compile the user-defined data collection protocol text, and the generated instruction code can be directly used for data collection of the corresponding data collection protocol under the support of data collection software. The same is applicable when a small modification is made to the standard protocol. After the user imports the standard protocol text, the process that needs to be modified is visually edited and saved, and a modified data collection instruction code adapted to the non-standard protocol is generated. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0016] Figure 1 A schematic diagram of the software module architecture in an embodiment of the present invention; Figure 2 A flowchart of the new data acquisition protocol to protocol data acquisition operation in an embodiment of the present invention; Figure 3 The data acquisition protocol communication process logic topology configuration and the flow chart of the generated instruction code in the embodiment of the present invention; Figure 4 Instruction code operation flow chart generated in the embodiment of the present invention; DETAILED DESCRIPTION In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below in conjunction with specific embodiments and drawings. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0017] Terminology explanation: TCP, Transmission Control Protocol, Transmission Control Protocol; UDP, User Datagram Protocol, User Datagram Protocol.

[0018] Modbus protocol is a universal language used in electronic controllers to achieve communication between controllers, between controllers and networks and other devices. It has become a universal industrial standard. Control devices produced by different manufacturers can be connected to an industrial network through this protocol for centralized control.

[0019] OPC UA protocol, Open Platform Communications Unified Architecture, is a technical specification for communication between different devices and systems. It is an open technical standard that can be applied to different devices and systems. As long as it supports OPC UA, various devices (such as sensors, controllers, industrial equipment, etc.) can communicate with each other and achieve seamless integration.

[0020] CRC16: Cyclic Redundancy Check 16, 16-bit cyclic redundancy check.

[0021] CRC32: Cyclic Redundancy Check 32, 32-bit cyclic redundancy check.

[0022] BCC: Block Check Character, block check character.

[0023] LRC: Longitudinal Redundancy Check, longitudinal redundancy check.

[0024] MD5: Message-Digest Algorithm 5, Message Digest Algorithm Fifth Edition.

[0025] See also Figure 1The present invention provides a multi-protocol industrial data acquisition process visualization configuration system, including: a graphic configuration module, a basic communication library, a logic operation library, a mathematical operation library, an algorithm verification library, a package assembly / unpacking library, a protocol communication process logical topology configuration, a protocol management module, a protocol logical topology diagram compilation module, and an operating environment module.

[0026] Graphics configuration module, used to provide methods for graphics configuration, supporting the creation and property editing of common graphics such as rectangles, ellipses, lines, arrows, etc. Basic communication library module, used to provide TCP, UDP network communication and 232 / 485 serial port communication encapsulation; The logic operation library module is used to provide encapsulation of common logic operations, such as loop operations, branch judgment, logical AND, logical OR, and logical NOT operations; Mathematical operation library module, used to provide encapsulation of common mathematical operations, such as addition, subtraction, multiplication, division, and remainder operations; Verification algorithm library module, used to provide common data verification algorithms and support custom verification algorithm extensions; Packing / unpacking library module, used to provide dynamic arrays and packing / unpacking algorithms in communication processes; The protocol communication process logical topology configuration module is used to create a new data acquisition protocol and perform visual graphic editing on the data format and interaction process in the protocol. After the editing is completed, a protocol logical topology diagram is generated; The protocol management module is used to provide methods for naming, saving, and importing existing data acquisition protocols. The protocols are stored in a custom text format; The protocol logic topology diagram compiling module is used to provide a compiling function, compile the protocol logic topology diagram generated by the protocol communication process logic topology configuration module, and generate executable instruction codes; The operating environment module is used for the operating environment provided by the data acquisition software for the instruction code. It loads the instruction code in a driving mode through a fixed interface and controls the start and stop of the acquisition protocol corresponding to the instruction code.

[0027] The system of the present invention visually displays the data format and data interaction process in the protocol based on the graphics provided by the graphic configuration module, and allows the user to edit the data acquisition protocol in a graphic editing manner.

[0028] The multi-protocol industrial data acquisition process visualization configuration system proposed in this invention realizes the visualization editing, configuration, verification, compilation and operation management of data acquisition protocols by integrating multiple modules, which greatly improves the flexibility and maintainability of the industrial data acquisition system. The following is an analysis of each module: Graphics configuration module, which is the user interface foundation of the system, enables users to intuitively create and edit various graphic elements (such as rectangles, ellipses, lines, arrows, etc.) by providing graphical tools. These graphic elements represent different components or steps in the data acquisition protocol. The graphic configuration module supports editing the properties of these graphic elements, such as color, size, label, etc., to more clearly express the logical structure and data flow of the protocol.

[0029] Basic communication library module, this module encapsulates TCP, UDP, 232 / 485 basic communication protocols, and provides underlying communication support for data transmission during data acquisition. By calling these encapsulated communication interfaces, users can easily transfer data between different devices and systems without having to deeply understand the details of the underlying communication protocols.

[0030] The logic operation library and mathematical operation library modules, the logic operation library provides basic logic operation functions such as loop, branch judgment, logical AND, logical OR, logical NOT, etc., while the mathematical operation library supports common mathematical operations such as addition, subtraction, multiplication, division, and remainder. These two libraries provide powerful support for data processing in the data acquisition protocol, allowing users to perform complex logic and mathematical operations on data as needed.

[0031] Verification algorithm library module, data verification is an important means to ensure the accuracy and integrity of data transmission. The verification algorithm library provides a variety of common verification algorithms and supports the expansion of user-defined verification algorithms. This helps to timely discover and correct data errors during data collection and improve data reliability.

[0032] Packing / unpacking library module: During the communication process, data usually needs to be packed and unpacked. The packing / unpacking library module provides dynamic arrays and packing / unpacking algorithms in the communication process, supporting users to pack and unpack data according to the requirements of the communication protocol, ensuring that the data can be transmitted and parsed correctly.

[0033] The protocol communication process logical topology configuration module allows users to create a new data acquisition protocol and visually edit the data format and interaction process in the protocol through a graphical interface. After editing, the system will automatically generate a protocol logical topology diagram to intuitively display the structure and process of the protocol.

[0034] The protocol management module provides functions such as naming, saving, and importing existing data acquisition protocols. The protocols are stored in a custom text format, which is convenient for users to perform version control and backup.

[0035] The protocol logic topology diagram compilation module is responsible for compiling the protocol logic topology diagram generated by the protocol communication process logic topology configuration module and generating executable instruction codes. These instruction codes will be loaded and executed by the operating environment module to realize the functions of the data acquisition protocol.

[0036] The operating environment module, as the core execution module of the system, provides the operating environment of the instruction code for the data acquisition software. The instruction code is loaded in the driving mode through a fixed interface, and the start and stop of the acquisition protocol corresponding to the instruction code are controlled to realize the automation and intelligent management of the data acquisition process.

[0037] Therefore, the multi-protocol industrial data acquisition process visualization configuration system of the present invention realizes efficient, flexible and visualized configuration and management of data acquisition protocols through advanced technical means such as graphical configuration, modular design, instruction code compilation and automatic operation.

[0038] See also Figure 2 The present invention provides a multi-protocol industrial data acquisition process visualization configuration method, and the protocol configuration and operation includes the following steps: Step S101: Graphic configuration environment, basic communication library, verification algorithm library, logic operation library, mathematical operation library, package assembly / unpacking library basic operating environment are provided; Step S102: Acquisition protocol communication process logical topology configuration, generate acquisition protocol communication logical topology diagram, edit the data acquisition process in the data acquisition protocol based on the visual graphic configuration module, the data acquisition protocol can contain multiple data acquisition processes, according to different acquisition protocols, the user can define different data acquisition processes, the acquisition protocol communication logical topology diagram can be saved as a custom text format; Step S103: compile the acquisition protocol communication logic topology diagram and generate instruction code; the present invention provides a built-in protocol logic topology diagram compilation module to support the acquisition protocol communication logic topology diagram intermediate code generation, optimization and instruction code generation; Step S104: The data acquisition software loads the instruction code generated in step S103 in a driving mode and configures communication parameters. The data acquisition software controls the start and stop of the instruction code through a predefined interface to acquire data corresponding to the data acquisition protocol.

[0039] The core of the multi-protocol industrial data acquisition process visualization configuration method provided by the present invention is to realize the rapid configuration, compilation and operation of the data acquisition protocol through a graphical interface and modular design.

[0040] First, the system provides basic operating environments such as graphical configuration environment, basic communication library, verification algorithm library, logical operation library, mathematical operation library, and package / unpack library. These environments provide necessary support and tools for subsequent protocol configuration and compilation. Users can edit the data acquisition process in the data acquisition protocol through the visual graphical configuration module. This step allows users to define multiple data acquisition processes and customize them according to the different needs of the acquisition protocol. After editing, the system will generate the acquisition protocol communication logical topology diagram, which shows the structure and process of the protocol in an intuitive way and can be saved as a custom text format for version control and backup. The built-in protocol logical topology diagram compilation module is responsible for converting the acquisition protocol communication logical topology diagram into executable instruction code. This step includes intermediate code generation, optimization, and final instruction code generation. The compiled instruction code will be used in the subsequent data acquisition process. The data acquisition software loads the compiled instruction code in driver mode and configures the corresponding communication parameters. Through the predefined interface, the software can control the start and stop of the instruction code to achieve data acquisition for the corresponding data acquisition protocol.

[0041] The present invention uses a graphical interface to edit and configure the data acquisition protocol, which greatly reduces the technical threshold and complexity. The data acquisition protocol is displayed in a graphical way, which is convenient for users to understand the data acquisition protocol. It supports the definition of multiple data acquisition processes and protocols, and users can perform personalized configuration according to actual needs. At the same time, it supports the saving and backup of custom text formats, which is convenient for version control and historical tracing.

[0042] The built-in compilation module can automatically generate and optimize instruction codes to improve the efficiency and accuracy of data collection. At the same time, the automation of the compilation process reduces the possibility of manual intervention and errors. The data acquisition software controls the start and stop of the instruction code in real time through a predefined interface to ensure the real-time and accuracy of data collection. This is especially important for industrial scenarios that require real-time monitoring and control.

[0043] The multi-protocol industrial data acquisition process visualization configuration method provided by the present invention has the advantages of visual editing, high flexibility, compilation optimization, easy integration and expansion, and strong real-time performance, and can significantly improve the efficiency and accuracy of industrial data acquisition.

[0044] See also Figure 3 The embodiment of the present invention provides a method for configuring a data acquisition protocol communication process logical topology and generating an instruction code, comprising the following steps: Step S201: Create a new acquisition protocol configuration, you can create a new or import an existing acquisition protocol text, and set the acquisition protocol trigger period; Step S202: Select the basic communication library of the acquisition protocol, which can support TCP, UDP, 232 / 485 serial ports, and basic parameter variable definitions of the communication protocol, such as IP, port, and serial port parameters; Step S203: Add a new data collection process, which is divided into two types: data sending process and data receiving process; Step S204: if the collection process is selected as the data sending process, the data package process is topologically edited, and the data packet header is edited using the package library. Data can be optionally filled according to protocol requirements, a data check field can be optionally added according to protocol requirements, and a data packet tail can be optionally added according to protocol requirements; Step S205: If the collection process is selected as the data receiving process, the data unpacking process is topologically edited, and the data packet header is parsed using the unpacking library. The data can be optionally parsed according to the protocol requirements, the data check field can be optionally parsed according to the protocol requirements, and the data packet tail can be optionally parsed according to the protocol requirements; Step S206: Determine whether the data acquisition protocol process is finished. If the protocol process is not finished, add the data acquisition process according to the acquisition protocol sequence, and repeat steps S203, S204, and S205. If the protocol process is finished, proceed to the next step. Step S207: After completing the acquisition protocol configuration, the user checks the data and process of the acquisition protocol based on the graphic configuration module, generates a communication logic topology diagram of the acquisition protocol set, names and saves the communication logic topology diagram, and supports saving the data acquisition protocol in a custom text format.

[0045] Step S208: The protocol logic topology diagram compiling module generates an intermediate code according to the communication logic topology diagram of the protocol set, and optimizes the intermediate code to generate instruction code.

[0046] See also Figure 4 The embodiment of the present invention provides a method for running an instruction code, wherein the data acquisition software loads the instruction code and the basic algorithm library in a driving mode, and after configuring the communication parameters, the start and stop of the instruction code is controlled through a predefined interface to complete data acquisition of the corresponding data acquisition protocol, including the following steps: Step S301: Loading instruction code, the data acquisition software loads the instruction code in the specified path through the preset interface; Step S302: Load the basic algorithm library, which includes: basic communication library, logic operation library, mathematical operation library, algorithm verification library, and package assembly / unpacking library; Step S303: determine whether the collection period has arrived. If the collection period has not arrived, continue to determine after a fixed interval. If the collection period has arrived, enter the data collection process. Step S304: loading a data collection process and determining the type of the currently loaded data collection process; Step S305: If the data collection process is a data sending process, the instruction code enters the packet assembly process, fills the data packet header and the optional data field according to the data format in the instruction code, and if there are multiple data, cyclically fills the packet assembly check field and the packet end. After the data is assembled, the sending interface is called to send the data; Step S306: If the data flow is a data receiving flow, it is necessary to determine the type of the basic protocol. If the basic protocol is TCP, first receive the data packet header, parse the data packet header, and then receive the remaining data according to the data length defined in the packet header or instruction code protocol. If the basic protocol is UDP or 232 / 485 serial port, receive one complete data at a time; each protocol parses the data packet header according to the format, and optionally parses the data according to the protocol. If there are multiple data, parse them cyclically, optionally parse the data check field according to the protocol and verify, and optionally parse the packet tail according to the protocol; Step S307: If the data is correctly received and parsed and the current data packet contains the data that needs to be collected in the end, the data is forwarded to the collection software service interface; Step S308: If there is an abnormality in receiving or parsing data, a corresponding prompt is given and the next collection cycle is entered; Step S309: Determine whether all data collection processes have been loaded. If not, continue to load the next collection process and repeat steps S304 to S308. If all data collection processes have been loaded, determine whether it is necessary to execute the next collection cycle to continue collecting data. Step S310: If it is necessary to execute the next collection cycle to continue collecting data, then repeat steps S303 to S309; ​​otherwise, the collection of protocol data corresponding to the instruction code is completed.

[0047] The instruction code can be controlled by the stop interface while running to end the running data acquisition process.

[0048] The embodiment of the present invention provides a common data verification algorithm module and an interface for users to extend the verification algorithm. The verification algorithm includes parity check, CRC16, CRC32, BCC, LRC, MD5, etc.

[0049] The following is an introduction to several verification algorithms: Parity check is a simple check method. During data transmission, it checks by calculating whether the number of "1" in the data is odd or even. If the number of "1" in the data is odd, it is called odd check; if it is even, it is called even check.

[0050] CRC16 (Cyclic Redundancy Check 16-bit) is an algorithm that calculates a checksum value through a polynomial. It performs specific mathematical operations on the data to generate a 16-bit checksum. The receiver can recalculate the checksum based on the received data and compare it with the received checksum to determine whether the data has errors during transmission.

[0051] CRC32 (Cyclic Redundancy Check 32-bit) is similar to CRC16. CRC32 generates a 32-bit checksum.

[0052] BCC (Block Check Character) is usually a check value obtained by performing a bitwise XOR operation on a group of data. It processes the data byte by byte, performs an XOR operation on the value of each byte, and finally obtains a check byte.

[0053] LRC (Longitudinal Redundancy Check) is to perform an XOR operation on the same bit of each byte of a set of data to obtain a check byte. It is usually used in serial communication.

[0054] MD5 (Message Digest Algorithm Version 5) is a widely used hash algorithm that compresses a message of any length into a 128-bit hash value. MD5 is irreversible, meaning that the original message cannot be deduced from the hash value.

[0055] Supports user-extensible verification algorithms. Users can use the logic operation library and mathematical operation library to perform logic and mathematical operations on specified data bits and define the expected output results. Through the data verification module, users can flexibly use and replace data verification methods in the data acquisition process.

[0056] The embodiment of the present invention supports naming and saving the data acquisition protocol, and supports importing the existing data acquisition protocol in a custom text format. The definition of common data acquisition protocols is provided in advance, including the power 102 protocol, the power 104 protocol, Modbus, and the OPC UA protocol.

[0057] In addition to supporting common standard data acquisition protocols, the embodiments of the present invention can also be used for extended and modified protocols of industrial data acquisition protocols. After importing the standard protocol, the logical topology configuration of the protocol communication process is performed to support modified protocols of the standard protocol, such as the extension of the power 102 protocol by different industrial data providers.

[0058] In addition to supporting common standard data acquisition protocols, the embodiments of the present invention can also be used for TCP and UDP protocols with customized formats and processes of different manufacturers.

[0059] The third object of the present invention is to provide a multi-protocol industrial data acquisition process visualization configuration system, characterized in that it includes: A graphic configuration unit is used to configure the logical topology of the communication process of the acquisition protocol, generate a logical topology diagram of the communication of the acquisition protocol, and edit the data acquisition process in the data acquisition protocol based on the graphic configuration module; A compiling unit, used for compiling the acquisition protocol communication logic topology diagram and generating instruction codes; The data acquisition unit is used to load the instruction code and configure communication parameters in a driving mode in response to the data acquisition software, and to acquire data corresponding to the data acquisition protocol.

[0060] A fourth objective of an embodiment of the present invention is to provide an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned multi-protocol industrial data acquisition process visualization configuration method when executing the computer program.

[0061] A fifth objective of an embodiment of the present invention is to provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned multi-protocol industrial data acquisition process visualization configuration method is implemented.

[0062] A sixth objective of an embodiment of the present invention is to provide a computer program product, which includes computer instructions, and is characterized in that the computer instructions instruct a computer to execute the above-mentioned multi-protocol industrial data acquisition process visualization configuration method.

[0063] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, readable storage media, optical storage, etc.) containing computer-usable program codes.

[0064] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0065] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0066] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0067] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A multi-protocol industrial data acquisition process visualization configuration system, characterized in that: include: The protocol communication process logical topology configuration module is used to create a new data acquisition protocol and perform visual graphic editing on the data format and interaction process in the protocol. After the editing is completed, a protocol logical topology diagram is generated; The protocol management module is used to provide methods for naming, saving, and importing existing data acquisition protocols. The protocols are stored in a custom text format; The protocol logic topology diagram compiling module is used to provide a compiling function, compile the protocol logic topology diagram generated by the protocol communication process logic topology configuration module, and generate executable instruction codes; The operating environment module is used for the operating environment provided by the data acquisition software for the instruction code. It loads the instruction code in a driving mode through a fixed interface and controls the start and stop of the acquisition protocol corresponding to the instruction code.

2. The multi-protocol industrial data acquisition process visualization configuration system according to claim 1 is characterized in that: Also includes: Basic communication library module, used to provide TCP, UDP network communication and 232 / 485 serial port communication encapsulation; The logic operation library module is used to provide the encapsulation of logic operations; Mathematical operation library module, used to provide mathematical operation encapsulation; Verification algorithm library module, used to provide data verification algorithms and support custom verification algorithm extensions; Packing / unpacking library module, used to provide dynamic arrays and packing / unpacking algorithms in communication processes; The graphic configuration module is used to provide graphic configuration methods and support the creation and property editing of graphic shapes.

3. A multi-protocol industrial data acquisition process visualization configuration method, characterized in that: The following steps are involved: Acquire the logical topology configuration of the communication process of the protocol, generate the logical topology diagram of the communication of the protocol, and edit the data acquisition process in the data acquisition protocol based on the graphic configuration module; Compile the acquisition protocol communication logic topology diagram and generate instruction code; In response to the data acquisition software loading the instruction code in a driving mode and configuring communication parameters, data corresponding to the data acquisition protocol is acquired.

4. The multi-protocol industrial data acquisition process visualization configuration method according to claim 3 is characterized in that: The generation of the acquisition protocol communication logic topology diagram is to perform package assembly / unpacking logic topology editing on the acquisition protocol data sending / receiving process based on the graphic library and the basic algorithm library to form the acquisition communication logic topology diagram.

5. The multi-protocol industrial data acquisition process visualization configuration method according to claim 3 is characterized in that: The data acquisition protocol includes multiple data acquisition processes. According to different acquisition protocols, users can define different data acquisition processes.

6. The multi-protocol industrial data acquisition process visualization configuration method according to claim 3, characterized in that: The acquisition protocol communication logic topology diagram is compiled to generate instruction code, including generating intermediate code according to the acquisition protocol set communication logic topology diagram, and optimizing the intermediate code to generate instruction code.

7. The multi-protocol industrial data acquisition process visualization configuration method according to claim 3, characterized in that: The logical topology configuration of the acquisition protocol communication process is generated, and the logical topology diagram of the acquisition protocol communication is generated. The data acquisition process in the data acquisition protocol is edited based on the graphic configuration module, including the following steps: Step S201: Create a new acquisition protocol configuration, create or import an existing acquisition protocol text, and set the acquisition protocol trigger period; Step S202: Select the acquisition protocol basic communication library and the communication protocol basic parameter variable definition; Step S203: Add a new data collection process, which is divided into two types: data sending process and data receiving process; Step S204: if the collection process is selected as the data sending process, the data package process is topologically edited, the data packet header is edited using the package library, data is filled according to the protocol requirements, a data check field is added according to the protocol requirements, and a data packet tail is added according to the protocol requirements; Step S205: if the collection process is selected as the data receiving process, the data unpacking process is topologically edited, the data packet header is parsed using the unpacking library, the data is parsed according to the protocol requirements, the data check field is parsed according to the protocol requirements, and the data packet tail is parsed according to the protocol requirements; Step S206: Determine whether the data acquisition protocol process is finished. If the protocol process is not finished, add the data acquisition process according to the acquisition protocol sequence, and repeat steps S203, S204, and S205. If the protocol process is finished, proceed to the next step; Step S207: After completing the acquisition protocol configuration, the user checks the data and process of the acquisition protocol based on the graphic configuration module, generates a communication logic topology diagram of the acquisition protocol set, names and saves the communication logic topology diagram, and supports saving the data acquisition protocol in a custom text format.

8. The multi-protocol industrial data acquisition process visualization configuration method according to claim 3, characterized in that: In response to the data acquisition software loading the instruction code in a driving mode and configuring the communication parameters, the start and stop of the instruction code are controlled through a predefined interface to complete data acquisition of the corresponding data acquisition protocol.

9. The multi-protocol industrial data acquisition process visualization configuration method according to claim 3, characterized in that: In response to the data acquisition software loading the instruction code in a driving mode and configuring the communication parameters, collecting data corresponding to the data acquisition protocol includes the following steps: Step S301: Loading instruction code, the data acquisition software loads the instruction code in the specified path through the preset interface; Step S302: Load the basic algorithm library, which includes: basic communication library, logic operation library, mathematical operation library, algorithm verification library, and package assembly / unpacking library; Step S303: determine whether the collection period has arrived. If the collection period has not arrived, continue to determine after a fixed interval. If the collection period has arrived, enter the data collection process. Step S304: loading a data collection process and determining the type of the currently loaded data collection process; Step S305: If the data collection process is a data sending process, the instruction code enters the packet assembly process, fills the data packet header and fills the data field according to the data format in the instruction code, and if there are multiple data, cyclically fills, assembles the packet check field and the packet tail, and after the data is assembled, calls the sending interface to send the data; Step S306: If the data flow is a data receiving flow, determine the basic protocol type. If the basic protocol is TCP, first receive the data packet header, parse the data packet header, and then receive the remaining data according to the data length defined in the packet header or instruction code protocol. If the basic protocol is UDP or 232 / 485 serial port, receive one complete data at a time; parse the data packet header according to the format of each protocol, and optionally parse the data according to the protocol. If there are multiple data, parse them in a loop, parse the data check field according to the protocol and verify, and optionally parse the packet tail according to the protocol; Step S307: If the data is correctly received and parsed and the current data packet contains the data that needs to be collected eventually, the data is forwarded to the collection software service interface; Step S308: If there is an abnormality in receiving or parsing data, a corresponding prompt is given and the next collection cycle is entered; Step S309: Determine whether all data collection processes have been loaded. If not, continue to load the next collection process and repeat steps S304 to S308. If all data collection processes have been loaded, determine whether it is necessary to execute the next collection cycle to continue collecting data. Step S310: If it is necessary to execute the next collection cycle to continue collecting data, then repeat steps S303 to S309; ​​otherwise, complete the collection of protocol data corresponding to the instruction code.

10. A multi-protocol industrial data acquisition process visualization configuration system, characterized in that: include: A graphic configuration unit is used to configure the logical topology of the communication process of the acquisition protocol, generate a logical topology diagram of the communication of the acquisition protocol, and edit the data acquisition process in the data acquisition protocol based on the graphic configuration module; A compiling unit, used for compiling the acquisition protocol communication logic topology diagram and generating instruction codes; The data acquisition unit is used to load the instruction code and configure communication parameters in a driving mode in response to the data acquisition software, and to acquire data corresponding to the data acquisition protocol.