Method, system and device for analyzing and processing multi-source heterogeneous equipment and medium

By realizing data type conversion and automatic adaptation in a multi-source heterogeneous device system, the problem that physical gateways in the prior art cannot handle multiple connections and multi-protocols is solved, and dynamic access of multi-type devices and system flexibility is realized. and scalability.

CN119420822AActive Publication Date: 2025-02-11CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411587599.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-02-11
Estimated Expiration
2044-11-07

AI Technical Summary

Technical Problem

In the prior art, physical gateways cannot handle multi-connection and multi-protocol requirements simultaneously, and cannot support dynamic access of multi-type devices when the application is run.

Method used

Through data type conversion between the first service node and the second service node, automatic adaptation of communication protocols for different devices is achieved. The specific steps include the first service node obtaining the tag group configuration ID according to the application's subscription request, converting it to a unified data type and sending it to the manager. The manager adds a pipeline to the tag group configuration ID, and sending the converted Subscribe to the request and tag group configuration ID, which the second service node converts to the appropriate data type and reads the device data.

Benefits of technology

It realizes the analysis and processing of multi-source heterogeneous devices, improves the flexibility and scalability of the system, solves the problems of multi-connection and multi-protocol requirements, and supports dynamic access to multiple types of devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119420822A_ABST
    Figure CN119420822A_ABST
Patent Text Reader

Abstract

The invention provides a method, a system and a device for analyzing and processing multi-source heterogeneous equipment, and a medium. The method comprises the following steps: a first service node acquires a corresponding label group configuration ID according to a subscription request of an application; the first service node converts a first data type corresponding to the subscription request and the label group configuration ID into a preset unified data type and then sends the preset unified data type to a manager, so that the manager adds a pipeline corresponding to the first service node to the label group configuration ID and sends the converted subscription request and the label group configuration ID to a second service node; and after the second service node converts the converted subscription request and the label group configuration ID into a second data type, reading data in the equipment according to the reading frequency corresponding to the label group configuration ID. The method, the system, the device and the medium can solve the problems that in the prior art, a common physical gateway cannot cope with the simultaneous multi-connection multi-protocol requirement and cannot support dynamic access of multiple types of equipment during application running.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial Internet technology, and in particular to a method, system, device and medium for analyzing and processing multi-source heterogeneous equipment. Background Art

[0002] For the industrial Internet of Things platform, the most critical issue is how to use its own communication standards to obtain the required data from various devices. In general, the most common practice of platform integrators is to provide API (Application Programming Interface) or SDK (Software Development Kit), and then the factory needs to develop adaptation at the access layer to connect industrial equipment to the platform.

[0003] However, due to the complexity of industrial equipment and bus protocols, data access is difficult, and general physical gateways cannot cope with the requirements of multiple connections and multiple protocols at the same time. At the same time, there are many types of industrial communication interfaces and communication standards, and the workload of parsing multi-source heterogeneous industrial protocols is large. Existing parsing solutions cannot support the dynamic access of multiple types of devices during application runtime. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a method, system, device and medium for parsing and processing multi-source heterogeneous devices in response to the above-mentioned shortcomings of the prior art, so as to solve the problem that general physical gateways in the prior art cannot cope with the requirements of multiple connections and multiple protocols at the same time, and cannot support dynamic access of multiple types of devices when the application is running.

[0005] In a first aspect, the present invention provides a method for parsing and processing a multi-source heterogeneous device, the method comprising:

[0006] The first service node obtains the corresponding tag group configuration ID according to the subscription request of the application;

[0007] The first service node converts the first data type corresponding to the subscription request and the tag group configuration ID into a preset unified data type and sends it to the manager, so that the manager adds the pipeline corresponding to the first service node to the tag group configuration ID, and sends the converted subscription request and the tag group configuration ID to the second service node, and the second service node converts the converted subscription request and the tag group configuration ID into a second data type, and then reads the data in the device according to the reading frequency corresponding to the tag group configuration ID.

[0008] Furthermore, the first service node includes an application server, an application plug-in and a first adapter, and the first service node obtains a corresponding tag group configuration ID according to a subscription request of the application, specifically including:

[0009] The application server receives the subscription request sent by the application and forwards the subscription request to the application plug-in;

[0010] The application plug-in registers the tag group of the subscription request into the configuration list corresponding to the device, and obtains the tag group configuration ID;

[0011] The first service node converts the subscription request and the first data type corresponding to the tag group configuration ID into a preset unified data type and sends the data to the manager, specifically including:

[0012] The application plug-in sends the subscription request and the tag group configuration ID to the first adapter;

[0013] The first adapter converts the subscription request and the first data type corresponding to the tag group configuration ID into the unified data type and sends the converted data to the manager.

[0014] Furthermore, the second service node includes a device, a device plug-in, and a second adapter, and the method further includes:

[0015] The first adapter receives the converted data message sent by the manager, wherein the converted data message is the data read from the device by the device plug-in and saved into the data variable, and the data variable is returned to the second adapter, and the second adapter converts the data variable into a data block and puts it into the data message, and converts the data message from the second data type to the unified data type and then sends it to the manager;

[0016] The first adapter converts the converted data message from the unified data type to the first data type and sends it to the application plug-in;

[0017] The application plug-in sends the data message of the first data type to the application server.

[0018] In a second aspect, the present invention provides a method for parsing and processing a multi-source heterogeneous device, the method comprising:

[0019] The manager receives the converted subscription request and label group configuration ID sent by the first service node, wherein the converted subscription request and label group configuration ID are obtained by the first service node according to the subscription request of the application, and the first data type corresponding to the subscription request and the label group configuration ID is converted into a preset unified data type and then sent;

[0020] The manager adds the pipeline corresponding to the first service node to the tag group configuration ID, and sends the converted subscription request and the tag group configuration ID to the second service node, and enables the second service node to convert the converted subscription request and the tag group configuration ID into a second data type, and then read the data in the device according to the reading frequency corresponding to the tag group configuration ID.

[0021] Further, the first service node includes an application server, an application plug-in and a first adapter, the second service node includes a device, a device plug-in and a second adapter, and the method further includes:

[0022] The manager receives the converted data message sent by the second adapter, wherein the converted data message is obtained by the device plug-in saving the data read from the device into the data variable and returning the data variable to the second adapter, and then the second adapter converts the data variable into a data block and puts it into the data message, and then converts the data message from the second data type to the unified data type and sends it;

[0023] The manager sends the converted data message to the first adapter through the pipeline, so that the first adapter converts the converted data message from the unified data type to the first data type and then sends it to the application plug-in; and the application plug-in sends the data message of the first data type to the application server.

[0024] In a third aspect, the present invention provides a method for parsing and processing a multi-source heterogeneous device, the method comprising:

[0025] The second service node receives the converted subscription request and the label group configuration ID sent by the manager after adding the pipeline corresponding to the first service node to the label group configuration ID for the subscription request, wherein the converted subscription request and the label group configuration ID are obtained by the first service node according to the subscription request of the application, and the first data type corresponding to the subscription request and the label group configuration ID is converted into a preset unified data type and then sent to the manager;

[0026] The second service node converts the converted subscription request and the tag group configuration ID into a second data type;

[0027] The second service node reads the data in the device according to the reading frequency corresponding to the tag group configuration ID.

[0028] Furthermore, the second service node includes a device, a device plug-in, and a second adapter, and the second service node converts the converted subscription request and the tag group configuration ID into a second data type, specifically including:

[0029] The second adapter converts the converted subscription request and the tag group configuration ID from the uniform data type into the second data type;

[0030] The second service node reads data in the device according to the reading frequency corresponding to the tag group configuration ID, specifically including:

[0031] The second adapter sends the subscription request of the second data type and the tag group configuration ID to the device plug-in;

[0032] The device plug-in obtains all data tags to be read according to the tag group configuration ID;

[0033] The device plug-in establishes a data tag ID queue arranged in ascending order according to the reading time intervals corresponding to all the data tags to be read, and reads data from the device according to the data tag ID queue and the reading time intervals corresponding to each data tag.

[0034] Further, the first service node includes an application server, an application plug-in and a first adapter, and the method further includes:

[0035] The device plug-in saves the data read from the device into a data variable and returns the data variable to the second adapter;

[0036] The second adapter converts the data variable into a data block and puts it into a data message, and converts the data message from the second data type to the unified data type and sends it to the manager, so that the manager sends the converted data message to the first adapter through the pipeline, so that the first adapter converts the converted data message from the unified data type to the first data type and sends it to the application plug-in, and the application plug-in sends the data message of the first data type to the application server.

[0037] In a fourth aspect, the present invention provides a system for parsing and processing multi-source heterogeneous devices, the system comprising a first service node, a manager, and a second service node

[0038] The first service node is used to execute the parsing and processing method of multi-source heterogeneous devices described in the first aspect above;

[0039] The manager is used to execute the parsing and processing method of multi-source heterogeneous devices described in the second aspect above;

[0040] The second service node is used to execute the parsing and processing method of multi-source heterogeneous devices described in the third aspect above.

[0041] In a fifth aspect, the present invention provides an apparatus for parsing and processing multi-source heterogeneous devices, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to implement the method for parsing and processing multi-source heterogeneous devices described in the first aspect, the second aspect, or the third aspect.

[0042] In a sixth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for parsing and processing multi-source heterogeneous devices described in the first aspect, the second aspect, or the third aspect is implemented.

[0043] The present invention provides a method, system, device and medium for parsing and processing multi-source heterogeneous devices. First, the first service node obtains the corresponding tag group configuration ID according to the subscription request of the application; then the first service node converts the first data type corresponding to the subscription request and the tag group configuration ID into a preset unified data type and sends it to the manager, so that the manager adds the pipeline corresponding to the first service node to the tag group configuration ID, and sends the converted subscription request and the tag group configuration ID to the second service node, and the second service node converts the converted subscription request and the tag group configuration ID into the second data type, and then reads the data in the device according to the reading frequency corresponding to the tag group configuration ID. The present invention converts the data types of different service nodes into a unified data type, thereby realizing automatic adaptation according to different device communication protocols, so that data parsing and exchange can be performed. This innovation can better manage and control the dynamic access and processing of multi-source heterogeneous devices, improve the flexibility and scalability of the system, and solve the problem that the general physical gateway in the prior art cannot cope with the requirements of multiple connections and multiple protocols at the same time, and cannot support the dynamic access of multiple types of devices when the application is running. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 This is a flow chart of a method for parsing and processing a multi-source heterogeneous device according to Embodiment 1 of the present invention;

[0045] Figure 2 A schematic diagram of the connection between the manager and the first service node and the second service node according to an embodiment of the present invention;

[0046] Figure 3 A schematic diagram of a data tag group configuration according to an embodiment of the present invention;

[0047] Figure 4A schematic diagram of the structure of a manager according to an embodiment of the present invention;

[0048] Figure 5 A schematic diagram of the connection between the adapter and the plug-in according to an embodiment of the present invention;

[0049] Figure 6 A schematic diagram of the structure of an access system for multi-source heterogeneous devices according to an embodiment of the present invention;

[0050] Figure 7 A schematic diagram of message routing and hash-aggregation data transmission processing according to an embodiment of the present invention;

[0051] Figure 8 It is another schematic diagram of message routing and hash-aggregation data transmission processing according to an embodiment of the present invention;

[0052] Fig. 9 This is a flow chart of a method for parsing and processing a multi-source heterogeneous device according to Embodiment 2 of the present invention;

[0053] Fig.10 This is a flow chart of a method for parsing and processing a multi-source heterogeneous device according to Embodiment 3 of the present invention;

[0054] Fig.11 This is a schematic diagram of the structure of a parsing and processing system for multi-source heterogeneous devices according to Embodiment 4 of the present invention;

[0055] Fig.12 This is a schematic diagram of the structure of a parsing and processing device for multi-source heterogeneous devices according to Embodiment 5 of the present invention. DETAILED DESCRIPTION

[0056] In order to enable those skilled in the art to better understand the technical solution of the present invention, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0057] It should be understood that the specific embodiments and drawings described herein are only used to explain the present invention rather than to limit the present invention.

[0058] It can be understood that, in the absence of conflict, the various embodiments of the present invention and the various features in the embodiments can be combined with each other.

[0059] It can be understood that, for the convenience of description, the drawings of the present invention only show the parts related to the present invention, while the parts irrelevant to the present invention are not shown in the drawings.

[0060] It can be understood that each unit and module involved in the embodiments of the present invention may correspond to only one physical structure, or may be composed of multiple physical structures, or multiple units and modules may be integrated into one physical structure.

[0061] It can be understood that the terms "first", "second", etc. in the embodiments of the present invention are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.

[0062] It can be understood that, without conflict, the functions and steps marked in the flowcharts and block diagrams of the present invention may occur in an order different from that marked in the drawings.

[0063] It is understood that the flowcharts and block diagrams of the present invention illustrate the possible architectures, functions, and operations of the systems, devices, equipment, and methods according to the various embodiments of the present invention. Each box in the flowchart or block diagram may represent a unit, module, program segment, or code, which contains executable instructions for implementing the specified functions. Moreover, each box or combination of boxes in the block diagram and flowchart may be implemented by a hardware-based system that implements the specified functions, or may be implemented by a combination of hardware and computer instructions.

[0064] It can be understood that the units and modules involved in the embodiments of the present invention can be implemented by software or hardware. For example, the units and modules can be located in a processor.

[0065] Embodiment 1:

[0066] This embodiment provides a method for parsing and processing multi-source heterogeneous devices, which is applied to a first service node, such as Figure 1 As shown, the method includes:

[0067] Step S101: The first service node obtains the corresponding tag group configuration ID according to the subscription request of the application.

[0068] In this embodiment, the service node may include the roles of subscriber and provider. The first service node corresponds to the role of subscriber, usually corresponding to the northbound application. Each subscription request has a corresponding tag group. The tag group can be pre-configured and defined. When defining, first create group information, fill in the time interval for collecting data from the device and the time interval for reporting data to the northbound application, then create a tag, fill in the tag information, including attributes, data types, driver addresses, multiplication coefficients, descriptions, etc. If the tag is set with a write attribute, the device can be reversed. The tag group configuration ID is used to uniquely identify a tag group.

[0069] It should be noted that the main purpose of defining tag groups is to effectively manage and organize data collected from multiple devices, ensuring that data collection and reporting can be carried out at set time intervals, thereby improving data processing efficiency and system responsiveness. In addition, by creating tags, data can be described and classified in detail to facilitate subsequent data analysis, monitoring, and device control.

[0070] Step S102: The first service node converts the first data type corresponding to the subscription request and the tag group configuration ID into a preset unified data type and sends it to the manager, so that the manager adds the pipeline corresponding to the first service node to the tag group configuration ID, and sends the converted subscription request and the tag group configuration ID to the second service node, and enables the second service node to convert the converted subscription request and the tag group configuration ID into a second data type, and then read the data in the device according to the reading frequency corresponding to the tag group configuration ID.

[0071] In this embodiment, since there are different service nodes that provide application or driver services, but each node can process different data types, it can be seen that the data types processed by different service nodes vary greatly, so an internal unified data type is needed for transit. Therefore, the service node can convert its own data type into a preset unified data type, or convert the unified data type into its own data type.

[0072] In this embodiment, the manager receives the converted subscription request and label group configuration ID sent by the first service node, and after adding the pipeline corresponding to the first service node to the label group configuration ID, sends the converted subscription request and the label group configuration ID to the second service node. After the second service node receives the converted subscription request and the label group configuration ID sent by the manager, it converts the converted subscription request and the label group configuration ID into a second data type, and reads the data in the device according to the reading frequency corresponding to the label group configuration ID. Among them, the second service node corresponds to the role of the provider, usually corresponding to the southbound device.

[0073] Optionally, the first service node includes an application server, an application plug-in, and a first adapter, and the first service node obtains a corresponding tag group configuration ID according to a subscription request of the application, specifically including:

[0074] The application server receives the subscription request sent by the application and forwards the subscription request to the application plug-in;

[0075] The application plug-in registers the tag group of the subscription request into the configuration list corresponding to the device, and obtains the tag group configuration ID;

[0076] The first service node converts the subscription request and the first data type corresponding to the tag group configuration ID into a preset unified data type and sends the data to the manager, specifically including:

[0077] The application plug-in sends the subscription request and the tag group configuration ID to the first adapter;

[0078] The first adapter converts the subscription request and the first data type corresponding to the tag group configuration ID into the unified data type and sends the converted data to the manager.

[0079] In this embodiment, the adapter corresponding to the first service node is called the first adapter. Specifically, the application sends a subscription request, which is forwarded to the application plug-in by the application server. After receiving the subscription request, the application plug-in registers the tag group of the subscription request into the configuration list corresponding to the device, obtains the ID of the tag group configuration, and notifies the first adapter of the request through the callback interface. After the first adapter performs data type conversion, it sends these subscription requests and tag group configuration IDs to the manager.

[0080] In this embodiment, the manager includes a data tag manager and a message routing manager. The manager hands over these subscription requests and tag group configuration IDs to the data tag manager for management. The data tag manager adds corresponding pipes of corresponding subscribers to these subscription request tag groups. Then the message routing manager routes the received data message to the second service node according to the tag configuration corresponding to the tag group configuration ID.

[0081] Optionally, the second service node includes a device, a device plug-in, and a second adapter, and the method further includes:

[0082] The first adapter receives the converted data message sent by the manager, wherein the converted data message is the data read from the device by the device plug-in and saved into the data variable, and the data variable is returned to the second adapter, and the second adapter converts the data variable into a data block and puts it into the data message, and converts the data message from the second data type to the unified data type and then sends it to the manager;

[0083] The first adapter converts the converted data message from the unified data type to the first data type and sends it to the application plug-in;

[0084] The application plug-in sends the data message of the first data type to the application server.

[0085] It should be noted that there are two ways to connect the plug-in and the adapter. One is that the plug-in is directly connected to the adapter, which is mostly used in the southbound direction; the other is that the plug-in is connected to the adapter through a third-party agent, which is mostly used in the northbound direction. Each adapter requires an independent thread to execute, and loading a plug-in also requires another thread to execute. Therefore, each service node has two execution threads. Users can load the required application or device plug-in into the adapter to become a service node to provide corresponding services. That is, as long as each plug-in is loaded into the adapter, it can provide different services, such as Web server, driver, MQTT, etc. Among them, the plug-in can be loaded into the adapter in the form of a Linux dynamic library (.so file), and these plug-ins support hot plugging, that is, they can be loaded or unloaded at any time during runtime, which is convenient and flexible.

[0086] In this embodiment, the adapter corresponding to the second service node is called the second adapter. Figure 2 A schematic diagram showing the connection between the manager, the first service node and the second service node is shown.

[0087] Among them, the second service node converts the converted subscription request and the tag group configuration ID into a second data type, which specifically includes the following steps: the second adapter converts the converted subscription request and the tag group configuration ID from the unified data type to the second data type; the second adapter sends the subscription request of the second data type and the tag group configuration ID to the device plug-in; the device plug-in obtains all data tags to be read according to the tag group configuration ID; and, according to the reading time intervals corresponding to all the data tags to be read, establishes a data tag ID queue arranged in order from small to large time intervals, and reads data from the device according to the data tag ID queue and the reading time intervals corresponding to each data tag.

[0088] In this embodiment, the device plug-in saves the data read from the device into a data variable and returns the data variable to the second adapter; the second adapter converts the data variable into a data block and puts it into a data message, and converts the data message from the second data type to the unified data type and sends it to the manager; the manager receives the converted data message sent by the second adapter, and sends the converted data message to the first adapter through the pipeline, so that the first adapter converts the converted data message from the unified data type to the first data type and sends it to the application plug-in; and the application plug-in sends the data message of the first data type to the application server, and the application server returns it to the corresponding application.

[0089] It should be noted that connecting a large number of devices is a major challenge for all industrial Internet projects. Device connection and data collection are different from traditional IoT projects, and it needs to be considered from an automation perspective. Not all legacy devices can be modified to provide the required device data, which must be determined by the device and the project itself. It is not easy to connect all devices in a complex industrial environment with many different manufacturers using various communication protocols, and usually requires the support of manufacturers unless the customer has its own engineers to maintain the equipment. On the other hand, the northbound needs to support more diverse applications, not just sending messages to the platform, and the extended functions allow some additional functions to be added to the basic connection, such as data stream processors. The whole process can be completed on the edge side. Therefore, the purpose of the present invention is to provide an adaptive protocol parsing mechanism and an efficient data caching and transmission method, a modular device management framework, and provide a flexible and scalable solution for multi-source heterogeneous device access and processing to simplify the device integration process of the industrial Internet of Things platform, improve the efficiency and reliability of data transmission, and support dynamic access and multi-protocol collaboration to meet the needs of various industrial application scenarios.

[0090] In a specific embodiment, the method for parsing and processing multi-source heterogeneous devices may include the following steps:

[0091] During the user configuration phase:

[0092] Step 1: Add a new device to the southbound device management interface. The device information includes the device name, device configuration button, delete button, node status, status switch button, connection status (5 states: initialization, configuring, ready, running, and stopped), and plug-in module name.

[0093] Step 2: Configure the southbound device connection, such as the terminal URL of the OPC UA server device, connect with the username and password, upload the certificate and key file, complete the device configuration, and the device card automatically enters the running state;

[0094] Step 3: Create group information and fill in the time interval for collecting data from the device and the time interval for reporting data to the northbound application; finally, create a tag for the current group and fill in the tag information, including attributes, data type, driver address, multiplication factor, and description. If the tag is set with write attributes, reverse control of the device can be achieved.

[0095] In the multi-source heterogeneous dynamic device protocol parsing and processing stage:

[0096] Step 1: The application sends a subscription request, which is forwarded by the application server to the application plug-in.

[0097] Step 2: After receiving the forwarding data subscription request, the application plug-in registers the tag group of the subscription request into the configuration list corresponding to the device, obtains the ID of the tag group configuration, and notifies the adapter of the request through the callback interface.

[0098] Step 3: Send the configuration IDs of these subscription request tag groups to the manager. The manager will hand over these subscription requests to the data tag manager for management. The data tag manager will add corresponding channels of corresponding subscribers to these subscription request tag groups.

[0099] Step 4: The manager sends a subscription request to the adapter associated with the device, and the adapter tells the driver plug-in (ie, the device plug-in) of the request through the callback interface.

[0100] Step 5: The driver plug-in obtains all data tags to be read from the configuration ID of the tag group, establishes an ID queue of data tags arranged from small to large intervals according to the time interval for reading the data tags, and sets a timer according to the time interval.

[0101] Optionally, in step 5, the driver plug-in obtains all data tags to be read from the configured ID of the tag group. The specific process is: the tag group packs the same reading frequency into a group, so each service node has many data tag groups, and each group has only one reading frequency. For example, the data tag group configuration diagram is as follows Figure 3 As shown in the figure, northbound applications can choose to subscribe to the data tag groups that users need, and register the pipeline channel in the sub-pipeline after subscription. The plug-in will read the data of the device according to the reading frequency of the tag group. After reading the data, it will be sent to the manager, and the manager will route the data message to the final station data node according to the routing table.

[0102] Step six, when the timing time is up, take out the ID of the requested data tag from the head of the queue, obtain the specific configuration information of the data tag from the data tag table through the ID, read the configuration information from the device to formulate the data to be read, and put it into the data variable.

[0103] Step 7: The driver plug-in returns the data variable information to the adapter through the callback interface.

[0104] Step 8: The adapter converts it into a data block and puts it into a data message to pass it to the manager.

[0105] Step 9: The manager calls the data tag manager, quickly matches the subscriber's adapter according to the tag group configuration ID contained in the data block, and sends the data message to all subscribers' adapters.

[0106] Step 10: The subscriber's adapter sends the data to the subscriber's plug-in through the callback interface, and the subscriber's plug-in sends the requested data to the subscriber application.

[0107] Furthermore, in steps 3, 4, 8 and 9, the manager is a very important module that manages the bus module and various adapters. Figure 4 As shown, it mainly has four modules:

[0108] Data label manager: It is a data label configuration list that maintains all data label configurations of this node.

[0109] Plugin Manager: Users can dynamically load or unload dynamic .so files at any time and register them in the plugin table as alternative plugins.

[0110] Adapter Manager: Users can select the required plug-ins based on the plug-in functions and services provided in the plug-in table.

[0111] Message Routing Manager: Routes received data messages to the final node according to the data tag configuration.

[0112] Furthermore, if Figure 5 As shown, the adapter and plug-in design in step 4 and step 10 separates two main functions: callback and interface. The service node will send the device data reading command and execute the plug-in function according to the reading frequency set by the tag group, and then execute the callback function when receiving the data response to send the data to the subscribed node.

[0113] When adding a new service node, a plugin open function must be executed, followed by an initialization function, and finally a configuration function. Before deleting the service node, the plugin unit must be run and then closed.

[0114] Because there are different service nodes that provide application or driver services, but each node can process different data types. It can be seen that the data types processed by different service nodes vary greatly, so there must be an internal unified data type for transfer. The Modbus protocol specification defines the supported data types, so the Modbus data type can be converted into a unified data type of the 5G fully connected platform device integration functional component in the service node. Generally, northbound applications such as MQTT or computing engines will send messages in JSON format, and the data types of JSON are only boolean, string, number, etc. The 5G fully connected platform device integration functional component unifies the data type, and finally converts it into a JSON data type to send the message.

[0115] There are two ways to connect the plug-in and the adapter. One is that the plug-in is directly connected to the adapter, which is mostly used in the southbound direction; the other is that the plug-in is connected to the adapter through a third-party agent, which is mostly used in the northbound direction.

[0116] Each adapter requires an independent thread to execute, and loading a plug-in also requires another thread to execute. Therefore, each service node has two execution threads. Users can load the required application or function plug-in into the adapter to become a service node to provide corresponding services. Generally, plug-ins are loaded into the adapter in the form of Linux dynamic libraries (.so files). Moreover, these plug-ins support hot plugging, which means that they can be loaded or unloaded at any time during runtime, which is convenient and flexible. The nodes of device drivers can be dynamically increased and decreased according to the working conditions on site, and have good configurability. Therefore, in general, it is only necessary to implement the required services in the plug-in, and each plug-in implements a service. This design isolates the coupling of functions between nodes.

[0117] In another specific embodiment, the method for parsing and processing multi-source heterogeneous devices is applied to an access system for multi-source heterogeneous devices, such as Figure 6 As shown, the system includes:

[0118] The top layer is third-party applications. Third-party software runs independently and provides application services, such as streaming engines, MQTT connections, etc.

[0119] The middle layer is the various functional plug-ins. As long as the plug-ins are loaded onto the adapter, they can provide different services, such as Web server, driver, MQTT, etc. Using the adapter and bridge mode, firstly, the driver variable is included in the plug-in, which is associated with the general driver interface, and the drivers of different device protocols implement the functions of the driver interface, and the functions are different. The plug-in is included by the adapter, and the plug-in implements the creation of threads (i.e., pipes / channels) and data transmission, etc.; the adapter itself has other functions such as data format conversion. Therefore, the driver and adapter can change independently. For example, the upgrade or update of the specific driver will not affect the data transmission format; and the adapter does not need to update the driver when updating the data processing format.

[0120] The bottom layer is the core framework component. The bottom layer is the basic message transmission library; the message transmission of each node depends on this library, and it provides basic thread management, dynamic library management, Web server and MQTT function functions; the functional component base lib is the basic library of the 5G fully connected platform device integration functional component itself, including general functions and logs; finally, there are various types of adapters, including streaming, MQTT connection and driver connection.

[0121] Among them, the basic message transmission library is a lightweight message layer that adopts the star message bus design method:

[0122] Point-to-point and peer-to-peer architecture: Each process communicates directly with other processes without relaying through a central node. This reduces the risk of single point failure and improves the overall robustness of the system.

[0123] Lightweight and efficient: It does not carry and maintain Brokers, which brings additional network hops, resource consumption, and delays, making message delivery faster and suitable for resource-constrained environments such as embedded systems and edge computing.

[0124] Flexible and simple deployment: No need to configure and maintain a centralized broker, which simplifies deployment, reduces operation and maintenance complexity, and reduces costs

[0125] Low latency: For scenarios that require ultra-low latency, such as real-time data stream processing, the Broker-free design reduces one layer of forwarding, enables direct interaction, and improves immediacy.

[0126] like Figure 6 As shown, there is no direct connection between the two modules of this solution, and the connection between them is completely realized through the control and call of the main module.

[0127] Among them, the transmission processing after message routing is to process data through hash-set method, which is suitable for scenarios where efficient data parallel processing and reorganization are required on the edge side, and also for scenarios where data is cached on the edge and the cloud side obtains data through message queues. For example, the schematic diagram of message routing and hash-set data transmission processing can be as follows: Figure 7 Or as shown in 8.

[0128] The parsing and processing method of multi-source heterogeneous devices provided by the embodiment of the present invention is as follows: first, the first service node obtains the corresponding tag group configuration ID according to the subscription request of the application; then, the first service node converts the first data type corresponding to the subscription request and the tag group configuration ID into a preset unified data type and sends it to the manager, so that the manager adds the pipeline corresponding to the first service node to the tag group configuration ID, and sends the converted subscription request and the tag group configuration ID to the second service node, and the second service node converts the converted subscription request and the tag group configuration ID into the second data type, and then reads the data in the device according to the reading frequency corresponding to the tag group configuration ID. The present invention realizes automatic adaptation according to different device communication protocols by converting the data types of different service nodes into a unified data type, so that data parsing and exchange can be performed. This innovation can better manage and control the dynamic access and processing of multi-source heterogeneous devices, improve the flexibility and scalability of the system, and solve the problem that the general physical gateway in the prior art cannot cope with the requirements of multiple connections and multiple protocols at the same time, and cannot support the dynamic access of multiple types of devices when the application is running.

[0129] Embodiment 2:

[0130] like Fig. 9As shown, this embodiment provides a method for parsing and processing multi-source heterogeneous devices, which is applied to a manager. The method includes:

[0131] Step S201: the manager receives a converted subscription request and a tag group configuration ID sent by the first service node, wherein the converted subscription request and the tag group configuration ID are obtained by the first service node according to the subscription request of the application, and the first data type corresponding to the subscription request and the tag group configuration ID is converted into a preset unified data type and then sent;

[0132] In this embodiment, the first service node includes an application server, an application plug-in and a first adapter. Specifically, the application sends a subscription request, which is forwarded by the application server to the application plug-in. After receiving the subscription request, the application plug-in registers the tag group of the subscription request into the configuration list corresponding to the device, obtains the ID of the tag group configuration, and notifies the first adapter of the request through the callback interface. After the first adapter performs data type conversion, it sends these subscription requests and tag group configuration IDs to the manager.

[0133] Step S202: The manager adds the pipe corresponding to the first service node to the tag group configuration ID, and sends the converted subscription request and the tag group configuration ID to the second service node, and enables the second service node to convert the converted subscription request and the tag group configuration ID into a second data type, and then read the data in the device according to the reading frequency corresponding to the tag group configuration ID.

[0134] In this embodiment, the manager includes a data tag manager and a message routing manager. The manager hands over these subscription requests and tag group configuration IDs to the data tag manager for management. The data tag manager adds corresponding pipes of corresponding subscribers to these subscription request tag groups. Then the message routing manager routes the received data message to the second service node according to the tag configuration corresponding to the tag group configuration ID.

[0135] Optionally, the second service node includes a device, a device plug-in, and a second adapter, and the method further includes:

[0136] The manager receives the converted data message sent by the second adapter, wherein the converted data message is obtained by the device plug-in saving the data read from the device into the data variable and returning the data variable to the second adapter, and then the second adapter converts the data variable into a data block and puts it into the data message, and then converts the data message from the second data type to the unified data type and sends it;

[0137] The manager sends the converted data message to the first adapter through the pipeline, so that the first adapter converts the converted data message from the unified data type to the first data type and then sends it to the application plug-in; and the application plug-in sends the data message of the first data type to the application server.

[0138] In this embodiment, the device plug-in saves the data read from the device into a data variable and returns the data variable to the second adapter; the second adapter converts the data variable into a data block and puts it into a data message, and converts the data message from the second data type to the unified data type and sends it to the manager; the manager receives the converted data message sent by the second adapter, and sends the converted data message to the first adapter through the pipeline. After the first adapter receives the converted data message sent by the manager, it converts the converted data message from the unified data type to the first data type and sends it to the application plug-in, and the application plug-in sends the data message of the first data type to the application server.

[0139] Embodiment 3:

[0140] like Fig.10 As shown, this embodiment provides a method for parsing and processing multi-source heterogeneous devices, which is applied to a second service node, and the method includes:

[0141] Step S301: the second service node receives the converted subscription request and the label group configuration ID sent by the manager after adding the pipeline corresponding to the first service node to the label group configuration ID of the subscription request, wherein the converted subscription request and the label group configuration ID are obtained by the first service node according to the subscription request of the application, and the first data type corresponding to the subscription request and the label group configuration ID is converted into a preset unified data type and then sent to the manager;

[0142] In this embodiment, the first service node includes an application server, an application plug-in and a first adapter. Specifically, the application sends a subscription request, which is forwarded to the application plug-in by the application server. After receiving the subscription request, the application plug-in registers the tag group of the subscription request in the configuration list corresponding to the device, obtains the ID of the tag group configuration, and notifies the first adapter of the request through the callback interface. After the first adapter performs data type conversion, it sends these subscription requests and tag group configuration ID to the manager. The manager adds the pipeline corresponding to the first service node to the tag group configuration ID, and sends the converted subscription request and the tag group configuration ID to the second service node.

[0143] Step S302: The second service node converts the converted subscription request and the tag group configuration ID into a second data type;

[0144] Step S303: the second service node reads data in the device according to the reading frequency corresponding to the tag group configuration ID.

[0145] Optionally, the second service node includes a device, a device plug-in, and a second adapter, and the second service node converts the converted subscription request and the tag group configuration ID into a second data type, specifically including:

[0146] The second adapter converts the converted subscription request and the tag group configuration ID from the uniform data type into the second data type;

[0147] The second service node reads data in the device according to the reading frequency corresponding to the tag group configuration ID, specifically including:

[0148] The second adapter sends the subscription request of the second data type and the tag group configuration ID to the device plug-in;

[0149] The device plug-in obtains all data tags to be read according to the tag group configuration ID;

[0150] The device plug-in establishes a data tag ID queue arranged in ascending order according to the reading time intervals corresponding to all the data tags to be read, and reads data from the device according to the data tag ID queue and the reading time intervals corresponding to each data tag.

[0151] Optionally, the method further comprises:

[0152] The device plug-in saves the data read from the device into a data variable and returns the data variable to the second adapter;

[0153] The second adapter converts the data variable into a data block and puts it into a data message, and converts the data message from the second data type to the unified data type and sends it to the manager, so that the manager sends the converted data message to the first adapter through the pipeline, so that the first adapter converts the converted data message from the unified data type to the first data type and sends it to the application plug-in, and the application plug-in sends the data message of the first data type to the application server.

[0154] It should be noted that there are two ways to connect the plug-in and the adapter. One is that the plug-in is directly connected to the adapter, which is mostly used in the southbound direction; the other is that the plug-in is connected to the adapter through a third-party agent, which is mostly used in the northbound direction. Each adapter requires an independent thread to execute, and loading a plug-in also requires another thread to execute. Therefore, each service node has two execution threads. Users can load the required application or device plug-in into the adapter to become a service node to provide corresponding services. That is, as long as each plug-in is loaded into the adapter, it can provide different services, such as Web server, driver, MQTT, etc. Among them, the plug-in can be loaded into the adapter in the form of a Linux dynamic library (.so file), and these plug-ins support hot plugging, that is, they can be loaded or unloaded at any time during runtime, which is convenient and flexible.

[0155] Embodiment 4:

[0156] refer to Fig.11 , this embodiment provides a parsing and processing system for multi-source heterogeneous devices, including a first service node 11, a manager 12 and a second service node 13;

[0157] The first service node 11 is used to execute the parsing and processing method of multi-source heterogeneous devices in embodiment 1;

[0158] The manager 12 is used to execute the parsing and processing method of multi-source heterogeneous devices in embodiment 2;

[0159] The manager 13 is used to execute the parsing and processing method of multi-source heterogeneous devices in Example 3.

[0160] Embodiment 5:

[0161] refer to Fig.12 This embodiment provides a parsing and processing device for a multi-source heterogeneous device, including a memory 21 and a processor 22. The memory 21 stores a computer program, and the processor 22 is configured to run the computer program to execute the parsing and processing method for a multi-source heterogeneous device in Example 1, Example 2, or Example 3.

[0162] The memory 21 is connected to the processor 22. The memory 21 may be a flash memory, a read-only memory or other memory. The processor 22 may be a central processing unit or a single-chip microcomputer.

[0163] Embodiment 6:

[0164] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the parsing and processing method of the multi-source heterogeneous device in the above-mentioned embodiment 1, embodiment 2 or embodiment 3 is implemented.

[0165] The computer-readable storage medium includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules or other data). Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable read only memory), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer.

[0166] In summary, the parsing and processing method, system, device and medium of multi-source heterogeneous devices provided by the embodiment of the present invention first obtain the corresponding tag group configuration ID according to the subscription request of the application; then the first service node converts the first data type corresponding to the subscription request and the tag group configuration ID into a preset unified data type and sends it to the manager, so that the manager adds the pipeline corresponding to the first service node to the tag group configuration ID, and sends the converted subscription request and the tag group configuration ID to the second service node, and the second service node converts the converted subscription request and the tag group configuration ID into the second data type, and then reads the data in the device according to the reading frequency corresponding to the tag group configuration ID. The present invention converts the data types of different service nodes into a unified data type, realizes automatic adaptation according to different device communication protocols, so that data parsing and exchange can be performed. This innovation can better manage and control the dynamic access and processing of multi-source heterogeneous devices, improve the flexibility and scalability of the system, and solves the problem that the general physical gateway in the prior art cannot cope with the requirements of multiple connections and multiple protocols at the same time, and cannot support the dynamic access of multiple types of devices when the application is running.

[0167] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present invention, but the present invention is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.

Claims

1. A method for analyzing and processing multi-source heterogeneous devices, characterized in that: The method comprises: The first service node obtains the corresponding tag group configuration ID according to the subscription request of the application; The first service node converts the first data type corresponding to the subscription request and the tag group configuration ID into a preset unified data type and sends it to the manager, so that the manager adds the pipeline corresponding to the first service node to the tag group configuration ID, and sends the converted subscription request and the tag group configuration ID to the second service node, and the second service node converts the converted subscription request and the tag group configuration ID into a second data type, and then reads the data in the device according to the reading frequency corresponding to the tag group configuration ID.

2. The method according to claim 1, characterized in that The first service node includes an application server, an application plug-in and a first adapter. The first service node obtains a corresponding tag group configuration ID according to a subscription request of the application, specifically including: The application server receives the subscription request sent by the application and forwards the subscription request to the application plug-in; The application plug-in registers the tag group of the subscription request into the configuration list corresponding to the device, and obtains the tag group configuration ID; The first service node converts the subscription request and the first data type corresponding to the tag group configuration ID into a preset unified data type and sends the data to the manager, specifically including: The application plug-in sends the subscription request and the tag group configuration ID to the first adapter; The first adapter converts the subscription request and the first data type corresponding to the tag group configuration ID into the unified data type and sends the converted data to the manager.

3. The method according to claim 2, characterized in that The second service node includes a device, a device plug-in, and a second adapter, and the method further includes: The first adapter receives the converted data message sent by the manager, wherein the converted data message is the data read from the device by the device plug-in and saved into the data variable, and the data variable is returned to the second adapter, and the second adapter converts the data variable into a data block and puts it into the data message, and converts the data message from the second data type to the unified data type and then sends it to the manager; The first adapter converts the converted data message from the unified data type to the first data type and sends it to the application plug-in; The application plug-in sends the data message of the first data type to the application server.

4. A method for parsing and processing multi-source heterogeneous devices, characterized in that: The method comprises: The manager receives the converted subscription request and label group configuration ID sent by the first service node, wherein the converted subscription request and label group configuration ID are obtained by the first service node according to the subscription request of the application, and the first data type corresponding to the subscription request and the label group configuration ID is converted into a preset unified data type and then sent; The manager adds the pipeline corresponding to the first service node to the tag group configuration ID, and sends the converted subscription request and the tag group configuration ID to the second service node, and enables the second service node to convert the converted subscription request and the tag group configuration ID into a second data type, and then read the data in the device according to the reading frequency corresponding to the tag group configuration ID.

5. The method according to claim 4, characterized in that The first service node includes an application server, an application plug-in, and a first adapter, the second service node includes a device, a device plug-in, and a second adapter, and the method further includes: The manager receives the converted data message sent by the second adapter, wherein the converted data message is obtained by the device plug-in saving the data read from the device into the data variable and returning the data variable to the second adapter, and then the second adapter converts the data variable into a data block and puts it into the data message, and then converts the data message from the second data type to the unified data type and sends it; The manager sends the converted data message to the first adapter through the pipeline, so that the first adapter converts the converted data message from the unified data type to the first data type and then sends it to the application plug-in; and the application plug-in sends the data message of the first data type to the application server.

6. A method for analyzing and processing multi-source heterogeneous devices, characterized in that: The method comprises: The second service node receives the converted subscription request and the label group configuration ID sent by the manager after adding the pipeline corresponding to the first service node to the label group configuration ID for the subscription request, wherein the converted subscription request and the label group configuration ID are obtained by the first service node according to the subscription request of the application, and the first data type corresponding to the subscription request and the label group configuration ID is converted into a preset unified data type and then sent to the manager; The second service node converts the converted subscription request and the tag group configuration ID into a second data type; The second service node reads the data in the device according to the reading frequency corresponding to the tag group configuration ID.

7. The method according to claim 6, characterized in that The second service node includes a device, a device plug-in and a second adapter, and the second service node converts the converted subscription request and the tag group configuration ID into a second data type, specifically including: The second adapter converts the converted subscription request and the tag group configuration ID from the uniform data type into the second data type; The second service node reads data in the device according to the reading frequency corresponding to the tag group configuration ID, specifically including: The second adapter sends the subscription request of the second data type and the tag group configuration ID to the device plug-in; The device plug-in obtains all data tags to be read according to the tag group configuration ID; The device plug-in establishes a data tag ID queue arranged in ascending order according to the reading time intervals corresponding to all the data tags to be read, and reads data from the device according to the data tag ID queue and the reading time intervals corresponding to each data tag.

8. The method according to claim 7, characterized in that The first service node includes an application server, an application plug-in and a first adapter, and the method further includes: The device plug-in saves the data read from the device into a data variable and returns the data variable to the second adapter; The second adapter converts the data variable into a data block and puts it into a data message, and converts the data message from the second data type to the unified data type and sends it to the manager, so that the manager sends the converted data message to the first adapter through the pipeline, so that the first adapter converts the converted data message from the unified data type to the first data type and sends it to the application plug-in, and the application plug-in sends the data message of the first data type to the application server.

9. A parsing and processing system for multi-source heterogeneous devices, characterized in that: The system comprises a first service node, a manager and a second service node: The first service node is used to execute the parsing and processing method of multi-source heterogeneous devices according to any one of claims 1 to 3; The manager is used to execute the parsing and processing method of multi-source heterogeneous devices according to claim 4 or 5; The second service node is used to execute the parsing and processing method for multi-source heterogeneous devices according to any one of claims 6 to 8.

10. A parsing and processing device for multi-source heterogeneous devices, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to implement the parsing and processing method for a multi-source heterogeneous device as described in any one of claims 1 to 3, or to implement the parsing and processing method for a multi-source heterogeneous device as described in claim 4 or 5, or to implement the parsing and processing method for a multi-source heterogeneous device as described in any one of claims 6 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, it implements the parsing and processing method of the multi-source heterogeneous device as described in any one of claims 1 to 3, or implements the parsing and processing method of the multi-source heterogeneous device as described in claim 4 or 5, or implements the parsing and processing method of the multi-source heterogeneous device as described in any one of claims 6 to 8.

Citation Information

Patent Citations

  • Internet of Things data service middleware system

    CN108093070A

  • Internet of Things cross-platform resource interaction method and system

    CN108429808A

  • Unified data processing method and system of heterogeneous equipment of IoT (Internet of Things)

    CN108769109A

  • Multi-source heterogeneous data cross-system collaborative management system and method

    CN115134421A

  • Heterogeneous device data synchronization method and system

    CN116938957A