Inter-device data acquisition method supporting multi-protocol unified acquisition
By adopting three-layer node model architecture and protocol library, protocol packaging interface, data container and other technical means, the limitations of multi-protocol data acquisition and node model construction in the existing technology are solved, and multi-protocol data acquisition and unified management of heterogeneous devices are realized, and data acquisition efficiency and system flexibility are improved.
Patent Information
- Application Number
- CN202510609160.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-05-13
AI Technical Summary
The prior art has limitations in multi-protocol data acquisition and node model construction, including the lack of multi-protocol compatible configuration, inconsistent data format and complexity of node model construction, making it difficult to support multi-protocol data acquisition and unified management of heterogeneous devices.
The three-layer node model architecture is adopted, including root node, protocol node and data item node. The dynamic loading and connection of multiple protocols is realized through the protocol library and protocol encapsulation interface. The data container is used to uniformly store data from different protocols, real-time data collection, unified processing and storage.
Real-time acquisition, unified processing and storage of multi-protocol data of heterogeneous devices is realized, the equipment access and data acquisition process is simplified, data acquisition efficiency and system flexibility are improved, and data consistency and efficient storage are ensured.
Smart Images

Figure CN120128642A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the communication technology of heterogeneous devices in a digital twin intelligent workshop, and specifically relates to a data acquisition method between devices that supports unified acquisition of multiple protocols. Background Art
[0002] In the context of the digital transformation of the manufacturing industry, the digital twin intelligent workshop, as a carrier combining infrastructure and high-tech, plays a crucial role. There are a wide variety of heterogeneous devices in the digital twin intelligent workshop, and their communication protocols and corresponding data acquisition methods are also different. In the prior art, for the data acquisition of numerically controlled machine tools, there has been research on establishing an equipment information model based on the MTConnect protocol and proposing a data acquisition method based on FOCAS; this method realizes the real-time data acquisition and storage management of numerically controlled machine tools by developing a data acquisition adapter and a client; however, this method mainly focuses on numerically controlled machine tools, lacks support for other types of devices, and does not provide a unified node model construction method. The research on multi-protocol data acquisition methods and processes provides a multi-protocol data acquisition method, including selecting the corresponding data communication protocol to collect device data according to the data communication protocol used by the automation device, and performing unified processing on the data format of the collected data to obtain a unified data format; this method aims to improve the compatibility of data acquisition, but does not involve the construction of a unified node model, and mainly focuses on the unification of data formats, lacking comprehensive support for device diversity.
[0003] There are some limitations in the prior art in terms of multi-protocol data acquisition and node model construction, especially in multi-protocol compatible configuration, unified format acquisition, and the construction of node models; the following are the main deficiencies based on the prior art: 1. Defects or deficiencies in multi-protocol compatible configuration The prior art usually relies on writing independent adaptation layers or data acquisition modules for each protocol, lacking the ability to perform compatible configuration for multiple protocols; in many industrial devices, different brands and models of devices use different communication protocols, such as OPC UA, FOCAS, MQTT, etc., and the interfaces of these protocols are usually incompatible, resulting in the need to develop and configure separately for each protocol in data acquisition and processing; therefore, the existing systems are often cumbersome and inefficient in multi-protocol configuration and management, and cannot quickly respond to changes in different devices and protocols.
[0004] 2. Defects or deficiencies in unified format data acquisition In the prior art, when collecting multi-protocol data, the collected data of different protocols are usually stored and processed in their respective formats, resulting in inconsistent data storage structures and increasing the difficulty of data analysis and application. For further analysis and processing of data, especially cross-protocol data analysis, complex format conversion and preprocessing of data are often required, resulting in low efficiency of data storage and processing.
[0005] 3. Problem of constructing node model Traditional multi-protocol data acquisition systems usually lack a unified node model design. Each protocol and device usually adopts independent interfaces and methods, making it difficult to effectively coordinate data acquisition and display between different protocols in the same system. Especially when facing a large number of devices and complex data, the prior art is difficult to provide a clear and standardized data acquisition structure, resulting in insufficient complexity and flexibility of data management. Summary of the Invention
[0006] Aiming at the problems in the prior art, the present invention provides a method for data acquisition between devices that supports unified multi-protocol acquisition, aiming to realize real-time acquisition, unified processing and storage of multi-protocol data of heterogeneous devices, and provide reliable data support for digital management and intelligent decision-making in the workshop.
[0007] A method for data acquisition between devices that supports unified multi-protocol acquisition includes a node browser and the following steps: Step 1: Construct a protocol library, a node model, a protocol encapsulation interface and a data container; Step 2: Display several devices and the corresponding protocols on the node browser through the node model; Step 3: Receive the device and protocol selected by the user; Step 4: Call the protocol and the corresponding configuration items from the protocol library to connect to the corresponding device; if the connection is successful, execute Step 5; otherwise, execute Step 2; Step 5: Display a list of data items on the node browser through the node model; Step 6: After the user selects a data item and sets sampling information, return the sampling information and the data item ID to the node model; Step 7: The node model calls the protocol encapsulation interface; Step 8: The protocol encapsulation interface performs data acquisition according to the sampling information and the data item ID; if the acquisition is successful, execute Step 9; otherwise, execute Step 7; Step 9: Batch store the acquired data in the data container; Step 10: Perform format conversion on the data; Step 11: Store the converted data in the time status table and display it in real time on the node browser.
[0008] Further: The protocol library includes several protocols, and the configuration items include the configuration files of the corresponding protocols and the required connection parameters.
[0009] Further: The node model includes a root node, protocol nodes, and data item nodes. The root node is used to store device information and user information; the protocol nodes are used to encapsulate protocol types and data items, as well as all protocol operations related to device connection and data acquisition. In step 7, the protocol encapsulation interface is called through the protocol nodes; the data item nodes are used to encapsulate the metadata of the device's data items; among them, the mapping relationship between the protocol nodes and the data item nodes is: the protocol nodes carry the corresponding device protocol data items.
[0010] Further: Step 5 specifically includes the following steps: Step 5.1: The root node matches the device and the protocol; Step 5.2: The root node initializes the protocol nodes and the data item nodes; Step 5.3: The protocol nodes provide a list of data items; Step 5.4: The list of data items is displayed on the node browser.
[0011] Further: The protocol encapsulation interface is used to encapsulate the data acquisition methods of each protocol, and enables the protocol nodes to perform data acquisition and storage through the protocol encapsulation interface.
[0012] Further: The data container is used to uniformly store the data from different protocols into the same data structure.
[0013] Further: The data container includes a data item layer, a device information layer, and a device category layer. The data item layer is used to store the value of the data item, the unit of the data item, and the timestamp; the device information layer is used to store the device ID, device model, and device status; the device category layer is used to store the category of the device.
[0014] Further: In step 10, the data is format-converted through a data format conversion function.
[0015] Advantages of the present invention: The present invention constructs an overall node model based on a three-layer node model architecture, thereby realizing the unified acquisition and management of device data; the system first represents the device through the root node, automatically matches and connects to the corresponding protocol; the protocol nodes encapsulate different protocols supported by different devices, and the connection of the protocol is realized through dynamic loading; the data item nodes define the specific acquisition items of the device data and collect them in accordance with a unified data format; a data container is also constructed to realize the unified format storage of the collected data; by adopting an innovative node model design, the integration of multi-protocol acquisition schemes is realized, which can simplify device access, improve data acquisition efficiency, and ensure data consistency and efficient storage. Description of the Drawings
[0016] Figure 1 is a flowchart of the present invention; Figure 2 is a structural block diagram of a node model; Figure 3 is a structural block diagram of a data container; Figure 4 is a module interaction diagram of a node model. Detailed implementation manners
[0017] The present invention will be described in detail below with reference to the accompanying drawings. Embodiments of the present invention will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described by referring to the accompanying drawings are exemplary only for explaining the present invention and should not be construed as limiting the present invention. The terms of orientation such as left, middle, right, upper, and lower in the embodiments of the present invention are only relative concepts to each other or are referred to the normal use state of the product, and should not be considered as restrictive.
[0018] A method for collecting data between devices that supports unified collection of multiple protocols, in combination with Figure 1 and Figure 4 as shown, includes a node browser and the following steps: Step 1: Construct a protocol library, a node model, a protocol encapsulation interface, and a data container; Among them, the protocol library includes several protocols, and the configuration items include the configuration files of the corresponding protocols and the required connection parameters; through these configuration items, protocol nodes can be automatically loaded to complete the connection with the device; the key to this step is to realize the dynamic selection and automatic configuration of protocols through the protocol library to ensure that users can easily select and configure the device and the protocol, and ensure the correct matching of the device and the protocol; next, a corresponding data item list will be automatically loaded and provided according to the protocol selected by the user; Such as Figure 2As shown in the figure, the node model includes a root node, protocol nodes, and data item nodes. The root node is used to store device information and user information and automatically matches protocol nodes through the selection of device protocols. Protocol nodes are used to encapsulate protocol types, data items, and all protocol operations related to device connection and data collection. Each protocol type node has a corresponding set of interfaces and data items. Data item nodes are used to encapsulate the metadata of specific data items of the device. Among them, the mapping relationship between protocol nodes and data item nodes is that protocol nodes carry the corresponding device protocol data items. The advantage of this three-layer structure design is that through the hierarchical structure, protocol management, device data item management, and data collection processes are separated from each other, facilitating expansion, management, and maintenance. The hierarchical relationship between protocol nodes and data item nodes ensures that data items of different protocols can be uniformly processed by the system. At the same time, to ensure the multi-protocol compatibility of the system, the configuration files of each protocol (such as OPCUA protocol library, FOCAS protocol library, etc.) need to be installed and configured before use to ensure that the protocol interfaces can be correctly loaded and called. The protocol encapsulation interface is used to encapsulate the data collection methods of each protocol and enable protocol nodes to perform data collection and storage through the protocol encapsulation interface. That is, protocol nodes obtain real-time data from devices through the data collection methods encapsulated by the protocol encapsulation interface. The protocol encapsulation interface can not only complete the unified management between protocols but also generate a list of data items related to the protocol for users to select specific data items to be collected. Through this method, collectable data items supported by different protocols can be dynamically generated in the user interface, simplifying the user operation process and improving the usability of the system. The collection interface and data stream processing logic of the system are unified, enabling the system to flexibly respond to data collection requirements of different protocols and ensuring the unified efficiency of data collection, storage, and processing processes. As Figure 3 shown in the figure, the data container is used to uniformly store data from different protocols into the same data structure to ensure the consistency and compatibility of data storage. The data container includes a three-layer hierarchical structure, namely the data item layer, device information layer, and device category layer. The data item layer is used to store information such as the value of the data item, the unit of the data item, and the timestamp, that is, the information of the data item itself. The device information layer is used to store information such as the device ID, device model, and device status of the device that collected this data item, that is, the information describing the additional status of the data item. The device category layer is used to store the category of the device, that is, whether it is an independent device or the production line master control system includes multiple devices. The key to the design of the data container is to provide a unified interface, enabling data collected by different protocols to be processed in this three-layer hierarchical data container and flexibly called and stored according to user needs. Step 2: Display several devices and the corresponding protocols on the node browser through the node model. Step 3: Receive the device and protocol selected by the user. Step 4: Call the protocol and the corresponding configuration items from the protocol library to connect to the corresponding device; if the connection is successful, execute Step 5; otherwise, execute Step 2; Step 5: Display the data item list on the node browser through the node model; Specifically, it includes the following steps: Step 5.1: The root node matches the device and the protocol; Step 5.2: The root node initializes the protocol node and the data item node; Step 5.3: The protocol node provides the data item list; Step 5.4: The data item list is displayed on the node browser; When the user selects a data item, the protocol node will provide all the data items related to the protocol for the user to select; at this time, according to the data item ID selected by the user, it is matched with the protocol node, and the data acquisition process is ready to enter; through this structure, the user does not need to care about the specific protocol or the underlying implementation of data acquisition, but only needs to select the target data item from the node browser. The node browser is the node browser, and the system automatically processes the protocol matching and data item selection; this design improves the simplicity of user operation and provides a stable foundation for subsequent data acquisition; Step 6: After the user selects the data item and sets the sampling information, return the sampling information and the data item ID to the node model; Step 7: The node model calls the protocol encapsulation interface, specifically through the protocol node to call the protocol encapsulation interface Step 8: The protocol encapsulation interface performs data acquisition according to the sampling information and the data item ID; if the acquisition is successful, execute Step 9; otherwise, execute Step 7; Step 9: Batch store the acquired data into the data container; Step 10: Perform format conversion on the data; specifically, perform format conversion on the data through the data format conversion function, and convert the information stored in the data container into CSV or JSON format; Step 11: Store the converted data into the time status table and display it in real time on the node browser.
[0019] Among them, the operation design of the node model is generally divided into three stages: connection, acquisition, and storage; combined with Figure 4As shown, during the connection phase, through physical connection and network connection, pre-configuration of real-time connection to the target device is achieved; the user selects the corresponding protocol for connection and at the same time matches the root node with this device. During the acquisition phase, the root node initializes the protocol node and the data item node; the user selects the target data item to be acquired and sets parameters such as the acquisition frequency for acquisition; the protocol node calls the corresponding encapsulation interface for real-time acquisition. During the storage phase, the acquired data is placed in a data container for unified format storage after being stored in memory; the data in the data container can be subjected to format conversion for further storage or output.
[0020] By constructing a node model that supports unified acquisition of multiple protocols, the present invention not only solves the problems of poor compatibility and non-uniform data formats in multi-protocol acquisition in the prior art, but also significantly improves the efficiency of data acquisition and the flexibility of the system. In addition, there are also significant improvements in aspects such as system scalability and user-friendliness.
[0021] The present invention supports connection and acquisition of multiple protocols, to a certain extent realizing the integration of heterogeneous devices in the digital twin intelligent workshop, achieving compatibility between different protocols and unification of data acquisition; the constructed node model structure realizes the unification of data acquisition in aspects such as acquisition method, protocol interface, and storage format, simplifies the data acquisition process, improves the stability and consistency of the system during protocol switching, and also simplifies the data storage and query process; through modular design of the class diagram and data structure, and adopting a dynamic loading mechanism for node modules, the system can quickly adapt to the access of new devices and new protocols without large-scale modification of the existing system, greatly improving the adaptability, compatibility, and scalability of the system.
[0022] The present invention adopts a unified interface and modular design, and various required configurations can be achieved during the writing of relevant software. The user can conveniently select the target device and data item through the node browser interface, and the system automatically completes the protocol matching and data acquisition tasks. Compared with the cumbersome operations of manually configuring each protocol and data item in the traditional system, the present invention significantly improves the user experience, and the operation is simple and intuitive. The user does not need to deeply understand the details of different protocols, and only needs to complete the selection of the device and data item through a simple interface, and the system can automatically process data acquisition and storage.
[0023] The above shows and describes the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. What is described in the above embodiments and the specification only illustrates the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.
Claims
1. A data collection method between devices supporting unified collection of multiple protocols, characterized in that: Includes the node browser and the following steps: Step 1: Build the protocol library, node model, protocol encapsulation interface and data container; Step 2: Display several devices and the protocols corresponding to the devices on the node browser through the node model; Step 3: Receive the device and protocol selected by the user; Step 4: Call the protocol and corresponding configuration items from the protocol library to connect to the corresponding device; if the connection is successful, proceed to step 5; Otherwise, go to step 2; Step 5: Display the data item list on the node browser through the node model; Step 6: After the user selects a data item and sets the sampling information, the sampling information and the data item ID are returned to the node model; Step 7: The node model calls the protocol encapsulation interface; Step 8: The protocol encapsulation interface collects data according to the sampling information and the data item ID; if the collection is successful, execute step 9; Otherwise, go to step 7; Step 9: Store the collected data in batches into a data container; Step 10: Convert the data format; Step 11: Store the converted data into the time status table and display it in real time on the node browser.
2. The method for data collection between devices supporting unified collection of multiple protocols according to claim 1, characterized in that: The protocol library includes several protocols, and the configuration items include the configuration files of the corresponding protocols and the required connection parameters.
3. The method for data collection between devices supporting unified collection of multiple protocols according to claim 1, characterized in that: The node model includes a root node, a protocol node, and a data item node. The root node is used to store device information and user information; the protocol node is used to encapsulate protocol types and data items as well as all protocol operations related to device connection and data acquisition. In step 7, the protocol encapsulation interface is called through the protocol node; the data item node is used to encapsulate the metadata of the device's data items; the mapping relationship between the protocol node and the data item node is: the protocol node carries the corresponding device protocol data item.
4. The method for data collection between devices supporting unified collection of multiple protocols according to claim 3, characterized in that: Step 5 specifically includes the following steps: Step 5.1: Root node matches device and protocol; Step 5.2: The root node initializes the protocol node and data item node; Step 5.3: The protocol node provides a list of data items; Step 5.4: The data item list is displayed on the node browser.
5. The method for data collection between devices supporting unified collection of multiple protocols according to claim 1, characterized in that: The protocol encapsulation interface is used to encapsulate the data collection method of each protocol, and enables the protocol node to collect and store data through the protocol encapsulation interface.
6. The method for data collection between devices supporting unified collection of multiple protocols according to claim 1, characterized in that: Data containers are used to store data from different protocols in the same data structure.
7. The method for data collection between devices supporting unified collection of multiple protocols according to claim 6, characterized in that: The data container includes a data item layer, a device information layer, and a device category layer. The data item layer is used to store the value of the data item, the unit of the data item, and the timestamp; The device information layer is used to store device ID, device model, and device status; the device category layer is used to store device categories.
8. The method for data collection between devices supporting unified collection of multiple protocols according to claim 1, characterized in that: In step 10, the data format is converted by a data format conversion function.
Citation Information
Patent Citations
Fast universal multi-protocol gateway realization system and method
CN109510759A
Protocol management method and device
CN110490459A
Multi-source heterogeneous numerical control system monitoring server based on OPC UA
CN114077633A
Protocol conversion method capable of customizing expansion protocol and protocol adapter plate
CN117978882A
Data processing system for multi-protocol data acquisition and data write-back
CN119127622A
Cited By
New energy equipment operation and maintenance method and system
CN121664640A