Industrial data access and forwarding system, method, device and electronic equipment
By providing an industrial data access and forwarding system, using the combination of core framework layer, extension layer and external function plug-in layer, the problem of lack of unified protocol specifications when accessing data of massive industrial equipment is solved, and the data is accurate and real-time Conversion and flexible access, supporting hot plugging of devices.
Patent Information
- Application Number
- CN202310708742.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-14
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2043-06-14
AI Technical Summary
In the prior art, the lack of unified data transmission protocol specifications when accessing data of massive industrial equipment, which increases the difficulty of data access, and the existing access equipment cannot achieve accurate and real-time conversion of access data.
It provides an industrial data access and forwarding system, including the core framework layer, the extension layer and the external function plug-in layer. Through the control panel, the plug-in library, the adapter library and the console, data reception, conversion and forwarding are realized. The system can select different plug-ins and adapters according to the data acquisition instructions, form different data nodes, and realize flexible access and forwarding of data.
It realizes the collection, conversion, aggregation and forwarding of equipment data from different manufacturers and different communication protocols, solves the problem of protocol inconsistency during data access, and realizes the accurate and real-time conversion of data. At the same time, the system supports dynamic loading and uninstalling plug-ins, achieving the hot plug-in effect of the device.
Smart Images

Figure CN116743808B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial data processing, and in particular to an industrial data access and forwarding system, method, device and electronic equipment. Background Art
[0002] Modern industrial scenarios require massive equipment data access, which mainly faces the following problems:
[0003] 1. There are no unified data transmission protocol specifications. Different equipment manufacturers use different data transmission protocols. There can be dozens or even hundreds of devices and communication protocols that make up a complete industrial scene. Different data formats and device communication protocols pose huge challenges to data aggregation.
[0004] 2. Massive streaming data has high requirements for protocol conversion and data transmission efficiency. Currently, most edge devices have insufficient performance. At the same time, the protocol conversion programs running on edge devices are inefficient and cannot achieve accurate and real-time conversion. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides an industrial data access and forwarding system, method, device and electronic device to solve the technical problems in the prior art that there is no unified data transmission protocol specification requirement when accessing massive industrial equipment data, which increases the difficulty of data access, and the existing access equipment cannot achieve accurate and real-time conversion of access data.
[0006] The technical solution proposed by the present invention is as follows:
[0007] In a first aspect, an embodiment of the present invention provides an industrial data access and forwarding system, which is connected to industrial equipment; the industrial data access and forwarding system includes: a core framework layer, an extension layer and an external function plug-in layer, the core framework layer includes a console and an adapter library, the extension layer includes a control panel and a plug-in library, and the extension layer is connected and communicated with the core framework layer and the external function plug-in layer respectively; the control panel is used to receive a data acquisition instruction, and based on the data acquisition instruction, call a first plug-in in the plug-in library, and send the data acquisition instruction and the plug-in data of the first plug-in to the console; the console is used to call a first adapter in the adapter library based on the plug-in data, and compare the plug-in data with the first The adapter is bound to obtain a first data node, and based on the data acquisition instruction, the first data node is controlled to obtain the first device data of the industrial device; the console is also used to convert the first device data into second device data that meets the preset format requirements, and based on the second device data, call the second adapter in the adapter library, and send the second device data and the adapter data of the second adapter to the control panel; the control panel is also used to call the second plug-in in the plug-in library based on the adapter data, bind the adapter data with the second plug-in to obtain a second data node, and control the second data node to send the second device data to the external function plug-in layer.
[0008] In combination with the first aspect, in a possible implementation of the first aspect, the first data node is used to receive the first device data sent by the industrial device, and send the first data node to the console, wherein when the number of the first device data is greater than one, each first device data is sent to the first data node according to a preset queue.
[0009] In combination with the first aspect, in another possible implementation of the first aspect, the core framework layer also includes a basic library for storing communication serial ports; the extension layer also includes a command line tool, a data persistence plug-in and an SDK interface, the command line tool is used to receive the data acquisition instruction, and the data persistence plug-in and the SDK interface are used to develop and obtain each of the plug-ins in the plug-in library.
[0010] In combination with the first aspect, in another possible implementation of the first aspect, the core framework layer communicates internally via an internal message bus; a state storage is provided in the internal message bus for storing the processing status of each of the first device data received by the core framework layer.
[0011] In combination with the first aspect, in another possible implementation manner of the first aspect, the external function plug-in layer includes: a message agent, a database, a message flow, a message queue and other applications.
[0012] In a second aspect, an embodiment of the present invention provides an industrial data access and forwarding method, which is used in an industrial data access and forwarding system as described in the first aspect and any one of the first aspects of the embodiments of the present invention, wherein the system is connected to industrial equipment; the industrial data access and forwarding method comprises: a control panel in the industrial data access and forwarding system receives a data acquisition instruction, and based on the data acquisition instruction, calls a first plug-in in the plug-in library, and sends the data acquisition instruction and the plug-in data of the first plug-in to a console in the industrial data access and forwarding system; the console calls a first adapter in the adapter library in the industrial data access and forwarding system based on the plug-in data, and binds the plug-in data to the first adapter, A first data node is obtained, and based on the data acquisition instruction, the first data node is controlled to obtain the first device data of the industrial device; the console converts the first device data into second device data that meets the preset format requirements, and calls the second adapter in the adapter library based on the second device data, and sends the second device data and the adapter data of the second adapter to the control panel; the control panel calls the second plug-in in the plug-in library based on the adapter data, binds the adapter data with the second plug-in, obtains the second data node, and controls the second data node to send the second device data to the external function plug-in layer in the industrial data access and forwarding system.
[0013] In combination with the second aspect, in another possible implementation manner of the second aspect, the method further includes: the first data node receives the first device data sent by the industrial device, and sends the first device data to the console.
[0014] In combination with the second aspect, in another possible implementation of the second aspect, the first data node receives the first device data sent by the industrial device, including: when the first device data sent by the industrial device is greater than one, each first device data is sent to the first data node according to a preset queue.
[0015] In a third aspect, an embodiment of the present invention provides an industrial data access and forwarding device, which is used in an industrial data access and forwarding system as described in the first aspect and any one of the first aspects of the embodiment of the present invention, and the system is connected to industrial equipment; the industrial data access and forwarding device includes: an acquisition and sending module, which is used for the control panel in the industrial data access and forwarding system to receive a data acquisition instruction, and call a first plug-in in the plug-in library based on the data acquisition instruction, and send the data acquisition instruction and the plug-in data of the first plug-in to the console in the industrial data access and forwarding system; a first processing module, which is used for the console to call a first adapter in the adapter library in the industrial data access and forwarding system based on the plug-in data, and bind the plug-in data with the first adapter, A first data node is obtained, and based on the data acquisition instruction, the first data node is controlled to obtain the first device data of the industrial device; a second processing module is used for the console to convert the first device data into second device data that meets the preset format requirements, and based on the second device data, a second adapter is called in the adapter library, and the second device data and the adapter data of the second adapter are sent to the control panel; a third processing module is used for the control panel to call a second plug-in in the plug-in library based on the adapter data, and bind the adapter data with the second plug-in to obtain a second data node, and control the second data node to send the second device data to the external function plug-in layer in the industrial data access and forwarding system.
[0016] In a fourth aspect, an embodiment of the present invention provides an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing a computer program, and the processor executing the computer program to execute the industrial data access and forwarding method as described in the first aspect and any one of the first aspects of the embodiment of the present invention.
[0017] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is used to enable the computer to execute the industrial data access and forwarding method as described in the first aspect and any one of the first aspects of the embodiment of the present invention.
[0018] The technical solution provided by the present invention has the following effects:
[0019] The industrial data access and forwarding system provided by the embodiment of the present invention can select different plug-ins to load into the corresponding adapter according to different data acquisition instructions during data access, forming different first data nodes for data acquisition; when forwarding data, it can also select different plug-ins to load into the corresponding adapter according to different received data, forming different second data nodes for data forwarding; at the same time, before forwarding the accessed data, the format of the accessed data will be converted so that it can adapt to different adapters and plug-ins, and complete the forwarding. Therefore, all data processing processes in the present invention are run in a loosely coupled thread environment, realizing a mechanism similar to hot-swappable devices, and the device can be connected to the entire system without shutting down. At the same time, any data node can be easily created or destroyed without affecting the normal operation of other nodes.
[0020] The industrial data access and forwarding method provided in the embodiment of the present invention utilizes the industrial data access and forwarding system provided in the embodiment of the present invention to access and forward industrial data, thereby realizing the collection, conversion, aggregation, and forwarding of streaming data continuously generated by devices from different manufacturers and with different communication protocols. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0022] Figure 1 is a structural block diagram of an industrial data access and forwarding system provided according to an embodiment of the present invention;
[0023] Figure 2 is a flow chart of sending data according to a preset convection provided by an embodiment of the present invention;
[0024] Figure 3 is a schematic diagram of a topological structure of a message bus mode provided according to an embodiment of the present invention;
[0025] Figure 4 is a structural block diagram of an industrial protocol gateway system running on edge gateway hardware provided in an embodiment of the present invention;
[0026] Figure 5 It is a schematic diagram of the data transmission and conversion process of an industrial protocol gateway system running on edge gateway hardware provided by an embodiment of the present invention;
[0027] Figure 6It is a schematic diagram of an edge streaming computing process of an industrial protocol gateway system running on edge gateway hardware provided by an embodiment of the present invention;
[0028] Figure 7 is a flow chart of an industrial data access and forwarding method provided according to an embodiment of the present invention;
[0029] Figure 8 is a structural block diagram of an industrial data access and forwarding device provided according to an embodiment of the present invention;
[0030] Fig. 9 is a schematic diagram of the structure of a computer-readable storage medium provided according to an embodiment of the present invention;
[0031] Fig.10 It is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present invention. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0034] The embodiment of the present invention provides an industrial data access and forwarding system, which is connected to industrial equipment; Figure 1 As shown, the industrial data access and forwarding system includes: a core framework layer 11, an extension layer 12 and an external function plug-in layer 13.
[0035] The extension layer 12 is connected and communicated with the core framework layer 11 and the external function plug-in layer 13 respectively.
[0036] Furthermore, the core framework layer 11 includes a console 111, an adapter library 112 and a basic library 113; the extension layer 12 includes a control panel 121, a command line tool 122, a plug-in library 123, a data persistence plug-in 124 and an SDK interface 125; the external function plug-in layer 13 includes: a message agent 131, a database 132, a message flow 133, a message queue 134 and other applications 135.
[0037] Among them, the plug-in library 123 may include protocol plug-ins, MQTT plug-ins, other service plug-ins, etc. Each plug-in can be developed according to the data persistence plug-in and SDK interface; the adapter library 112 may include protocol driver adapters, MQTT adapters and other adapters, etc.
[0038] Furthermore, the interaction between the core framework layer 11, the extension layer 12 and the external function plug-in layer 13 is described. Through the interaction between these three layers, the access and forwarding of industrial data can be achieved.
[0039] Specifically, the control panel 121 or the command line tool 122 in the extension layer 12 receives a data acquisition instruction, and under the control of the data acquisition instruction, calls the first plug-in in the plug-in library 123, and further sends the data acquisition instruction and the plug-in data of the called first plug-in to the console 111 in the core framework layer 11; wherein the first plug-in can be any plug-in in the plug-in library 123, determined according to the data acquisition instruction.
[0040] After receiving the plug-in data of the first plug-in, the console 111 calls the first adapter matching the plug-in data in the adapter library 112, and binds the plug-in data with the first adapter to obtain a first data node. Further, the first data node is a functional node that can configure the IP, protocol parameters, transmission mode (active, passive), etc. of the data acquisition device. The first adapter can be any adapter library in the adapter library 112, determined according to the plug-in data.
[0041] Further, under the control of the data acquisition instruction, the console 111 controls the first data node to acquire the first device data sent by the industrial device 2 connected to the industrial data access and forwarding system.
[0042] The first data node uses the first adapter as a carrier of the first plug-in and controls the plug-in to obtain data.
[0043] Specifically, during the communication process, the first adapter sends a command to obtain data to the first plug-in. After receiving the command, the first plug-in communicates with the industrial device 2 and returns the communication data, that is, the first device data, through the callback function interface.
[0044] Further, after obtaining the first device data, the console 111 uses a specific protocol conversion program to convert the first device data of different protocol types into a unified data format, namely, second device data. Then, the console 111 forwards the second device data to the external function plug-in layer 13.
[0045] First, the console 111 calls the second adapter in the adapter library 112 according to the second device data, and sends the adapter data of the second adapter and the second device data together to the control panel 121 .
[0046] After receiving the adapter data, the control panel 121 calls the second plug-in matching the adapter data in the plug-in library 123, and binds the adapter data with the second plug-in to obtain a second data node. Further, the second data node is a functional node that forwards the second device data.
[0047] Through the above embodiments, any data node in the system can be dynamically created or destroyed without interfering with other running nodes, that is, the industrial data access and forwarding system can very flexibly start a new node service by loading a plug-in module at runtime, or uninstall the plug-in module of a stopped node service.
[0048] Furthermore, the industrial device 2 will actively send the first device data to the first data node. After receiving the first device data, the first data node will send the first device data to the console 111 for storage until a data acquisition instruction is received. The console 111 then forwards the first device data to the external function plug-in layer 13.
[0049] When the industrial device 2 sends a plurality of first device data to the first data node, each first device data is sent to the first data node in sequence according to a preset queue, such as Figure 2 As shown, the sequential processing of device data is guaranteed, achieving the purpose of loose coupling and fast message transmission.
[0050] Furthermore, in the above-mentioned interaction process between the core framework layer 11 and the extension layer 12, a connection needs to be made through a serial port. Therefore, a basic library 113 is provided in the core framework layer for storing the communication serial port.
[0051] Furthermore, in the above-mentioned interaction process, all nodes are centered around a star-shaped message bus, which adopts a broker-less mode. Generally, data may be lost in a broker-less mode. Therefore, in the embodiment of the present invention, the core framework layer communicates internally through an internal message bus. Therefore, a message bus is provided to store the processing status of each first device data received by the core framework layer. By adding a state storage to record the processing status of the message, it is ensured that a device data message is processed exactly once.
[0052] The industrial data access and forwarding system provided by the embodiment of the present invention can select different plug-ins to load into the corresponding adapter according to different data acquisition instructions during data access, forming different first data nodes for data acquisition; when forwarding data, it can also select different plug-ins to load into the corresponding adapter according to different received data, forming different second data nodes for data forwarding; at the same time, before forwarding the accessed data, the format of the accessed data will be converted so that it can adapt to different adapters and plug-ins, and complete the forwarding. Therefore, all data processing processes in the present invention are run in a loosely coupled thread environment, realizing a mechanism similar to hot-swappable devices, and the device can be connected to the entire system without shutting down. At the same time, any data node can be easily created or destroyed without affecting the normal operation of other nodes.
[0053] Based on the internal interaction process of the industrial data access and forwarding system provided by the above embodiment of the present invention, in one embodiment, a topology structure of a message bus mode is provided, such as Figure 3 As shown, the message bus mode is used for internal interaction of industrial data access and forwarding systems.
[0054] Specifically, the message bus is based on the pair-1 feature of the NNG library to organize a star-shaped scalable framework. There is a message router core in the center. There are two types of nodes around the router core. The southbound driver node is the node that communicates with the device, and it is a data producer. The northbound application node is a data consumer that processes or forwards data information. The communication between nodes relies on NNG's efficient asynchronous I / O to fully utilize the capabilities of multi-core CPUs.
[0055] Each node (southbound or northbound) consists of a plug-in adapter and a plug-in.
[0056] Specifically, all plugins (such as Figure 1Other services, MQTT Broker and protocol plug-ins in the MQTT broker are based on the Adapter as a carrier. Users can dynamically add plug-ins with different functions according to the functional requirements of the application scenario to obtain different nodes. Each node runs independently. When a node plug-in is upgraded, loaded or unloaded, it will not affect the normal operation of other nodes.
[0057] Further, in one example, based on Figure 3 The topology of the message bus mode shown in FIG. 1 provides an industrial protocol gateway system running on edge gateway hardware. The hierarchical structure of the system is as follows: Figure 4 shown.
[0058] Specifically, the lowest level design in the system is the basic message communication library based on NNG. The message transmission of each node must rely on this communication library, and it provides basic thread management, dynamic library management, and various basic function functions. It also includes various types of adapters, such as streaming computing, MQTT connection, and driver connection. The middle layer is various functional plug-ins, and each plug-in provides different services through the loading of adapters, such as drivers, MQTT conversion, etc. The top layer is third-party applications that run independently and provide application services, such as edge streaming computing frameworks, MQTT-brokers, etc. The basic message communication library based on NNG solves the problem of repeated messages, and can fully utilize multiple cores of the CPU.
[0059] The data transmission and conversion process of this system is as follows Figure 5 As shown, the user dynamically loads the required application or function plug-in into the adapter (generally in the form of a Linux dynamic library .so file) according to the on-site working conditions. After loading, the plug-in initialization and configuration process is executed. The service node will issue a device data reading command and execute the plug-in function (request) according to the reading frequency set by the data tag. After receiving the data reply, it will execute the callback function (response). Through a specific protocol conversion program, data of different protocol types are converted into a unified data format to facilitate internal data processing. The system forwards the received data to the consumer end through the message bus according to the needs of the data consumer end, such as the MQTT agent, edge streaming computing framework, etc.
[0060] Therefore, in general, users only need to implement the required services in different plug-ins independently, isolating the coupling of functions between nodes. At the same time, the system supports third-party proxy plug-ins (such as remote calls), and can realize data exchange according to the communication interface API of the third-party proxy plug-in, and load it into the adapter to realize the connection with third-party software.
[0061] Furthermore, the edge streaming computing process is as follows Figure 6 As shown, the edge streaming computing module is integrated into the system in plug-in mode. The data is converted into JSON format through the NNG message bus for data exchange and consumed by the edge computing module. Real-time status analysis and calculation are performed on the infinite data stream. SQL is used for data processing, and built-in functions are used to quickly process structured and unstructured data, thereby directly processing the data sources of different industrial equipment and forwarding the processing results to other consumers or importing them into local storage.
[0062] Specifically, since streaming data is infinite, it is impossible to process it as a whole. Therefore, a window method is used to process streaming data. The window divides the unbounded data into a series of continuous bounded data for calculation. Here, windows are divided into two types: time windows: windows divided by time. Count windows: windows divided by element count. Among them, the commonly used time windows are divided into rolling windows (0-5s, 5-10s), jumping windows (0-5s, 2-10s), sliding windows, session windows, etc. These windows are called in the edge streaming computing framework in the form of built-in functions, so that the unbounded data is cut into limited data sets for analysis and calculation. Based on the limited data sets, conventional SQL functions can be called for calculation or custom algorithms can be implemented in the framework with code. The data in the continuous window is continuously calculated to obtain continuously updated calculation results.
[0063] The embodiment of the present invention further provides an industrial data access and forwarding method, which is used in the industrial data access and forwarding system as described in the embodiment of the present invention, wherein the system is connected to the industrial equipment; Figure 7 As shown, the method comprises the following steps:
[0064] Step 101: The control panel in the industrial data access and forwarding system receives a data acquisition instruction, and based on the data acquisition instruction, calls a first plug-in in the plug-in library, and sends the data acquisition instruction and the plug-in data of the first plug-in to the control console in the industrial data access and forwarding system.
[0065] The specific interaction process refers to the above-mentioned description of the interaction process between the core framework layer 11 and the extension layer 12 in the industrial data access and forwarding system 1 provided in the embodiment of the present invention, the interaction process between the control panel 121 and the plug-in library 123 in the extension layer 12, and the interaction process between the control panel 121 and the console 111 in the core framework layer 11, and will not be repeated here.
[0066] Step 102: Based on the plug-in data, the console calls the first adapter in the adapter library in the industrial data access and forwarding system, binds the plug-in data with the first adapter to obtain a first data node, and based on the data acquisition instruction, controls the first data node to obtain the first device data of the industrial device.
[0067] The specific process refers to the functional description of the console 111 in the industrial data access and forwarding system 1 provided in the embodiment of the present invention, the description of the interaction process between the console 111 and the adapter library 112, and the description of the interaction process between the generated first data node and the industrial equipment, which will not be repeated here.
[0068] Step 103: The console converts the first device data into second device data that meets preset format requirements, calls a second adapter in the adapter library based on the second device data, and sends the second device data and adapter data of the second adapter to the control panel.
[0069] The specific process refers to the functional description of the console 111 in the industrial data access and forwarding system 1 provided in the embodiment of the present invention, the description of the interaction process between the console 111 and the adapter library 112, and the description of the interaction process between the console 111 and the control panel 121, which will not be repeated here.
[0070] Step 104: The control panel calls the second plug-in in the plug-in library based on the adapter data, binds the adapter data with the second plug-in, obtains a second data node, and controls the second data node to send the second device data to the external function plug-in layer in the industrial data access and forwarding system.
[0071] For the specific process, please refer to the functional description of the control panel 121 in the industrial data access and forwarding system 1 provided in the embodiment of the present invention, the description of the interaction process between the control panel 121 and the plug-in library 123, and the description of the interaction process between the generated second data node and the middle and external functional plug-in layer, which will not be repeated here.
[0072] The industrial data access and forwarding method provided in the embodiment of the present invention utilizes the industrial data access and forwarding system provided in the embodiment of the present invention to access and forward industrial data, thereby realizing the collection, conversion, aggregation, and forwarding of streaming data continuously generated by devices from different manufacturers and with different communication protocols.
[0073] As an optional implementation of the embodiment of the present invention, the method further includes: the first data node receives the first device data sent by the industrial device, and sends the first device data to the console.
[0074] Specifically, the industrial equipment will actively send the first device data to the first data node. After receiving the first device data, the first data node will send the first device data to the console for storage until it receives a data acquisition instruction, and then the console will forward the first device data to the external function plug-in layer.
[0075] Furthermore, when the industrial device sends multiple first device data to the first data node, each first device data is sent to the first data node in sequence according to a preset queue, thereby ensuring sequential processing of the device data and achieving the purpose of loose coupling and fast message transmission.
[0076] The embodiment of the present invention also provides an industrial data access and forwarding device, such as Figure 8 As shown, the device comprises:
[0077] The acquisition and sending module 201 is used for the control panel in the industrial data access and forwarding system to receive the data acquisition instruction, and call the first plug-in in the plug-in library based on the data acquisition instruction, and send the data acquisition instruction and the plug-in data of the first plug-in to the console in the industrial data access and forwarding system; for details, please refer to the relevant description of step 101 in the above method embodiment.
[0078] The first processing module 202 is used for the console to call the first adapter in the adapter library of the industrial data access and forwarding system based on the plug-in data, and bind the plug-in data with the first adapter to obtain the first data node, and control the first data node to obtain the first device data of the industrial device based on the data acquisition instruction; for details, please refer to the relevant description of step 102 in the above method embodiment.
[0079] The second processing module 203 is used for the console to convert the first device data into second device data that meets the preset format requirements, and call the second adapter in the adapter library based on the second device data, and send the second device data and the adapter data of the second adapter to the control panel; for details, please refer to the relevant description of step 103 in the above method embodiment.
[0080] The third processing module 204 is used for the control panel to call the second plug-in in the plug-in library based on the adapter data, bind the adapter data with the second plug-in, obtain the second data node, and control the second data node to send the second device data to the external function plug-in layer in the industrial data access and forwarding system; for details, please refer to the relevant description of step 104 in the above method embodiment.
[0081] The industrial data access and forwarding device provided in the embodiment of the present invention uses the industrial data access and forwarding system provided in the embodiment of the present invention to access and forward industrial data, thereby realizing the collection, conversion, aggregation, and forwarding of streaming data continuously generated by equipment from different manufacturers and with different communication protocols.
[0082] As an optional implementation of the embodiment of the present invention, the device further includes: a transmission module, which is used for the first data node to receive the first device data sent by the industrial device and send the first device data to the console.
[0083] As an optional implementation of the embodiment of the present invention, the transmission module includes: a sending submodule, which is used for sending each first device data to the first data node according to a preset queue when the first device data sent by the industrial device is greater than one.
[0084] For a detailed description of the functions of the industrial data access and forwarding device provided in the embodiment of the present invention, please refer to the description of the industrial data access and forwarding method in the above embodiment.
[0085] The embodiment of the present invention also provides a storage medium, such as Fig. 9 As shown, a computer program 301 is stored thereon, and when the program is executed by the processor, the steps of the industrial data access and forwarding method in the above embodiment are implemented. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memory.
[0086] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.
[0087] The embodiment of the present invention further provides an electronic device, such as Fig.10 As shown, the electronic device may include a processor 41 and a memory 42, wherein the processor 41 and the memory 42 may be connected via a bus or other means. Fig.10 The example of connecting through bus is taken in the following.
[0088] The processor 41 may be a central processing unit (CPU). The processor 41 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0089] The memory 42 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as the corresponding program instructions / modules in the embodiment of the present invention. The processor 41 executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory 42, that is, the industrial data access and forwarding method in the above method embodiment is realized.
[0090] The memory 42 may include a program storage area and a data storage area, wherein the program storage area may store an application required for operating the device and at least one function; the data storage area may store data created by the processor 41, etc. In addition, the memory 42 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 42 may optionally include a memory remotely arranged relative to the processor 41, and these remote memories may be connected to the processor 41 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0091] The one or more modules are stored in the memory 42 and when executed by the processor 41, perform the following steps: Figure 7 The industrial data access and forwarding method in the illustrated embodiment.
[0092] For details of the above electronic equipment, please refer to Figure 7 The corresponding related descriptions and effects in the illustrated embodiments can be understood and will not be repeated here.
[0093] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. An industrial data access and forwarding system connected to industrial equipment; characterized in that: The system comprises: a core framework layer, an extension layer and an external function plug-in layer, wherein the core framework layer comprises a console and an adapter library, the extension layer comprises a control panel and a plug-in library, and the extension layer is connected and communicated with the core framework layer and the external function plug-in layer respectively; The control panel is configured to receive a data acquisition instruction, call a first plug-in in the plug-in library based on the data acquisition instruction, and send the data acquisition instruction and plug-in data of the first plug-in to the console; The console is used to call the first adapter in the adapter library based on the plug-in data, bind the plug-in data with the first adapter, obtain a first data node, and control the first data node to obtain the first device data of the industrial device based on the data acquisition instruction. The first data node is a functional node, which is composed of the first adapter and the first plug-in. The first adapter is used as a carrier of the first plug-in and the first plug-in is controlled to obtain data, so as to configure the IP, protocol parameters, and transmission mode of the data acquisition device. The first device data is an instruction to obtain data sent to the first plug-in through the first adapter. After receiving the instruction, the first plug-in communicates with the industrial device and returns the communication data through the callback function interface; The control console is further configured to convert the first device data into second device data that meets a preset format requirement, call a second adapter in the adapter library based on the second device data, and send the second device data and adapter data of the second adapter to the control panel; The control panel is also used to call the second plug-in in the plug-in library based on the adapter data, bind the adapter data with the second plug-in to obtain a second data node, and control the second data node to send the second device data to the external function plug-in layer. The second data node is composed of the second adapter and the second plug-in. The second data node is a functional node for forwarding the second device data. The second data node and the first data node are dynamically created or destroyed and will not interfere with other running nodes.
2. The system according to claim 1, characterized in that The first data node is used to receive the first device data sent by the industrial device and send the first device data to the console, wherein when the number of the first device data is greater than one, each first device data is sent to the first data node according to a preset queue.
3. The system according to claim 1, characterized in that The core framework layer also includes a basic library for storing communication serial ports; The extension layer also includes a command line tool, a data persistence plug-in and an SDK interface. The command line tool is used to receive the data acquisition instruction, and the data persistence plug-in and the SDK interface are used to develop and obtain each plug-in in the plug-in library.
4. The system according to claim 3, characterized in that The core framework layer communicates internally via an internal message bus; The internal message bus is provided with a state storage for storing the processing status of each first device data received by the core framework layer.
5. The system according to claim 1, characterized in that The external function plug-in layer includes: message broker, database, message stream, message queue and other applications.
6. An industrial data access and forwarding method, used in the industrial data access and forwarding system according to any one of claims 1 to 5, wherein the system is connected to industrial equipment; characterized in that: The method comprises: The control panel in the industrial data access and forwarding system receives a data acquisition instruction, calls a first plug-in in the plug-in library based on the data acquisition instruction, and sends the data acquisition instruction and the plug-in data of the first plug-in to the control console in the industrial data access and forwarding system; The console calls the first adapter in the adapter library in the industrial data access and forwarding system based on the plug-in data, binds the plug-in data with the first adapter, obtains a first data node, and controls the first data node to obtain the first device data of the industrial device based on the data acquisition instruction. The first data node is a functional node, which is composed of the first adapter and the first plug-in. The first adapter is used as a carrier of the first plug-in and the first plug-in is controlled to obtain data, so as to configure the IP, protocol parameters, and transmission mode of the data acquisition device. The first device data is an instruction to obtain data sent to the first plug-in through the first adapter. After receiving the instruction, the first plug-in communicates with the industrial device and returns the communication data through the callback function interface. The console converts the first device data into second device data that meets preset format requirements, calls a second adapter in the adapter library based on the second device data, and sends the second device data and adapter data of the second adapter to the control panel; Based on the adapter data, the control panel calls the second plug-in in the plug-in library, binds the adapter data with the second plug-in, obtains a second data node, and controls the second data node to send the second device data to the external function plug-in layer in the industrial data access and forwarding system. The second data node is a functional node, composed of the second adapter and the second plug-in, and is used to forward the second device data. The second data node and the first data node are dynamically created or destroyed and will not interfere with other running nodes.
7. The method according to claim 6, characterized in that The method further comprises: The first data node receives the first device data sent by the industrial device, and sends the first device data to the console.
8. The method according to claim 7, characterized in that The first data node receives the first device data sent by the industrial device, including: When the industrial device sends more than one first device data, each first device data is sent to the first data node according to a preset queue.
9. An industrial data access and forwarding device, used in the industrial data access and forwarding system according to any one of claims 1 to 5, wherein the system is connected to industrial equipment; characterized in that: The device comprises: An acquisition and sending module is used for the control panel in the industrial data access and forwarding system to receive a data acquisition instruction, and based on the data acquisition instruction, calls the first plug-in in the plug-in library, and sends the data acquisition instruction and the plug-in data of the first plug-in to the control console in the industrial data access and forwarding system. The first data node is a functional node, which is composed of the first adapter and the first plug-in. The first adapter is used as a carrier of the first plug-in and the first plug-in is controlled to acquire data, so as to configure the IP, protocol parameters, and transmission mode of the data acquisition device. The first device data is an instruction to acquire data sent to the first plug-in through the first adapter. After receiving the instruction, the first plug-in communicates with the industrial device and returns the communication data through the callback function interface; A first processing module is used for the console to call a first adapter in an adapter library in the industrial data access and forwarding system based on the plug-in data, bind the plug-in data with the first adapter, obtain a first data node, and control the first data node to obtain first device data of the industrial device based on the data acquisition instruction; a second processing module, configured for the console to convert the first device data into second device data that meets a preset format requirement, to call a second adapter in the adapter library based on the second device data, and to send the second device data and adapter data of the second adapter to the control panel; The third processing module is used for the control panel to call the second plug-in in the plug-in library based on the adapter data, bind the adapter data with the second plug-in, obtain the second data node, and control the second data node to send the second device data to the external function plug-in layer in the industrial data access and forwarding system. The second data node is a functional node, composed of the second adapter and the second plug-in, and is used to forward the second device data. The second data node and the first data node are dynamically created or destroyed and will not interfere with other running nodes.
10. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores a computer program, and the processor executes the industrial data access and forwarding method according to any one of claims 6 to 8 by executing the computer program.
Citation Information
Patent Citations
Platform-based computer room monitoring system and a method
CN109344038A
Community data processing system, method, and device based on Internet of Things platform and equipment
CN112714193A