Soft gateway system supporting data exchange among multiple devices
By providing a soft gateway system that supports data exchange between multiple devices, it solves the problem of insufficient scalability and ease of use of traditional hardware gateways when dealing with data exchange between sensor devices in multiple communication protocols and large production sites, and achieves more flexible and efficient data exchange and system maintenance.
Patent Information
- Application Number
- CN202411632278.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-03-28
AI Technical Summary
Traditional hardware gateways lack scalability and ease of use when handling data exchange between sensor devices in multiple communication protocols and large production sites, resulting in insufficient iteration and high cost.
It provides a soft gateway system that supports data exchange between multiple devices, including an interface driver unit and a data link unit, which can establish connections with devices of different protocols, perform data acquisition and protocol conversion, and reduce field wiring and system development costs.
The soft gateway supports multiple interfaces and protocols, flexibly handles the transformation requirements of different interface protocols, reduces system development and operation costs, improves scalability and ease of use, and can count data link dynamic data in real time, making it easy to troubleshoot and system maintenance.
Smart Images

Figure CN119728796A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a soft gateway system supporting data exchange among multiple devices. Background Art
[0002] With the continuous development of industrial Ethernet and Internet of Things technology, different hardware devices will have different communication protocols, and traditional hardware gateways can only support the conversion of one or two standard protocols.
[0003] In order to solve this problem, a gateway is needed to perform protocol analysis and conversion. Conventional hardware gateways need to use their own hardware for decoding. However, due to many limitations of the hardware, when new protocols are introduced, the iteration is not fast enough, and there are major defects in scalability and ease of use.
[0004] In addition, in large-scale production sites, data exchange between sensor devices is cumbersome and often requires a large number of protocol master devices or hard gateways as media. The interfaces of sensors or devices produced by each manufacturer are different. To complete data exchange between sensor devices, a large number of protocol converters or interface converters need to be purchased, which is very troublesome.
[0005] Therefore, there is an urgent need for a soft gateway system that supports data exchange between multiple devices and can solve the above problems. Summary of the invention
[0006] The purpose of the present invention is to provide a soft gateway system supporting data exchange between multiple devices to solve the problems existing in the above-mentioned prior art.
[0007] To achieve the above object, the present invention provides the following solutions:
[0008] The present invention provides a soft gateway system supporting data exchange between multiple devices, comprising an interface driver unit and a data link unit connected thereto, wherein the interface driver unit is used to establish a connection relationship with various field devices, complete data acquisition, complete the mapping of external interface data to memory data, and send data to a designated field device; the data link unit is used to establish an input node data pool, select input node data from the input node data pool for protocol conversion, and construct an output node data pool.
[0009] Preferably, the interface driving unit comprises:
[0010] The communication configuration module is used to set the communication protocol parameters of the device to be connected and establish a connection communication with the device according to the communication protocol parameters;
[0011] A data mapping module is used to package and encode the data received from the external device according to a certain format and store it in a FIFO queue;
[0012] The data transceiver module is used to obtain the data output by the device from the device's connection interface and distribute the corresponding data to the specified device according to the configured data link.
[0013] Preferably, the interface of the interface driving unit adopts one or more of a serial port, a USB, an Ethernet port, a CAN, and a WIFI.
[0014] Preferably, the communication protocol parameters include protocol type, communication mode, port number, verification mode, and communication rate.
[0015] Preferably, the data link unit comprises:
[0016] The protocol conversion module is used for data protocol format conversion, converting the input node data into data protocol and putting it into the output node data pool;
[0017] Link management module, used to manage internal node data and link data;
[0018] The link scheduling module is used to prepare for allocating data in the output node data pool to other devices.
[0019] Preferably, the link created by the link management module has label attribute information, including link sequence number, link direction, link status, link data, link priority, and link enable.
[0020] Compared with the prior art, the present invention has achieved the following beneficial technical effects:
[0021] 1. The soft gateway supports a variety of interfaces and protocols, and can establish communication relationships for devices that adapt to different protocol interfaces;
[0022] 2. Use different protocol driver libraries to parse data and flexibly handle different interface protocol conversion requirements;
[0023] 3. In large-scale fieldbus integrated applications, the amount of field wiring required is reduced, reducing system development and operating costs;
[0024] 4. It can collect statistics of dynamic data of each data link in real time, which is convenient for troubleshooting line faults and development and operation and maintenance.
[0025] 5. Dynamic configuration of data exchange between devices facilitates system application transformation, reduces the cost of upgrading and transformation, and uses soft gateways to build production systems with greater flexibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0027] Figure 1 A diagram of the architecture of a soft gateway system supporting data exchange between multiple devices provided by the present invention;
[0028] Figure 2 A flow chart of a method for implementing a soft gateway system supporting data exchange between multiple devices provided by the present invention;
[0029] Figure 3 A flowchart of an embodiment of a soft gateway system supporting data exchange between multiple devices provided by the present invention. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0031] The purpose of the present invention is to provide a soft gateway system supporting data exchange between multiple devices to solve the problems existing in the prior art.
[0032] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0033] Embodiment 1:
[0034] This embodiment provides a soft gateway system that supports data exchange between multiple devices. Figure 1 and 2 As shown, it includes an interface driver unit and a data link unit connected thereto. The interface driver unit is used to establish a connection relationship with various field devices, complete data collection, complete the mapping of external interface data to memory data, and send data to designated field devices; the data link unit is used to establish an input node data pool, select input node data from the input node data pool for protocol conversion, and construct an output node data pool.
[0035] The interface driver unit is an important unit for controlling device actions, such as opening, closing, reading, and writing devices. It is used to control the transmission of data on the device. It is closely related to the hardware and is used to process I / O requests issued by user processes.
[0036] The interface driver unit is mainly responsible for establishing connections with various field devices, completing data collection, mapping external interface data to memory data, and sending data to designated field devices. Commonly used physical interfaces include serial ports, USB, network ports, CAN, WIFI and other interfaces, but are not limited to the above physical interfaces. The main function is to convert external data into FIFO queue node data inside the software;
[0037] The main steps are as follows:
[0038] 1. Establish communication connection with external devices through the communication configuration module, including opening and closing of the device;
[0039] 2. When the device is turned on, it is equivalent to the data transceiver module performing read and write operations with the external device. In the process of converting external data into node data, it is equivalent to a read operation;
[0040] 3. The original external data is integrated into node data according to a certain regular format through the data mapping module, so as to establish an input node data pool to facilitate the management of node data (including node data addition, deletion and disablement, etc.).
[0041] Specifically include:
[0042] The communication configuration module is used to set the communication protocol parameters of the device to be connected and establish a connection communication with the device based on the communication protocol parameters, which mainly include protocol type, communication mode, port number, verification mode, communication rate, etc. Each protocol requires different communication connection parameters, but are not limited to the above; a device may support multiple physical interfaces for data exchange.
[0043] The data mapping module is used to package and encode the data received from the external device in a certain format and store it in the FIFO queue; if the device data of the device is not needed, the communication configuration is not required, and the data of the device is not obtained; the input node data field mapping table is as follows:
[0044]
[0045]
[0046] The data transceiver module includes read and write operations on external devices. The read operation refers to obtaining the original protocol data from the external device, and the write operation refers to sending new protocol data to the external device. The data transceiver module is used to obtain the data spit out by the device from the device's connection interface and distribute the corresponding data to the specified device according to the configured data link.
[0047] The data link unit consists of:
[0048] The protocol conversion module is used for data protocol format conversion, and performs data protocol conversion on the input node data and puts it into the output node data pool. For example, the original message data that complies with the RS232 protocol is converted into message data that complies with the TCP / IP protocol, and an output node data is generated. It can also convert the multi-protocol of an input node into two output node data. The node data includes some label information, mainly including the basic information of the node data, namely the data initiator, the original data protocol, the data length, the data content, the data receiver, the current data protocol, the data length, the protocol conversion type, etc.; taking the RS232 protocol to TCP / IP protocol as an example, the output node data field mapping table is as follows:
[0049] Node number Output node data 1 Data Originator Device 1 Original data protocol RS232 Input data length 100 Data content XX XX XX....XXX Data Recipients Device 3 New Data Protocol TCP / IP Data length 100 Protocol conversion type RS232->TCP / IP
[0050] The link management module is used to manage the internal node data and link data, mainly including the creation, deletion, and disabled node data of nodes and links, so as to achieve the practical control of nodes and link data flow problems;
[0051] According to the existing input node data and output node data, in the link configuration module, the user can freely select the input node data and the output node data to combine into a data link;
[0052] The device sends data to the soft gateway, which automatically establishes N data links. A link is configured for each node data. There can be multiple link data, which must be normal when the device supports the interface.
[0053] Each link has its own attributes, which are mainly some label attribute information, including link sequence number, link direction, link status, link data, link priority, link enable and other attribute information; the data link field mapping table is as follows:
[0054] Link number 1 Link direction Device 2 -> Device 3 Link Status 0 means normal, 1 means abnormal Link Data XX XX XX...XX XX XX Link Priority 0 Link Enable yes
[0055] In order to maintain the unidirectional fluidity of the data link, it is stipulated that all external data of the soft gateway will be converted into an input node data. Each input node data is only allowed to have one data source (external device). One node data can correspond to output nodes of different protocol types. All data outputs of the soft gateway must come from the output node data.
[0056] The link scheduling module is used to distribute the data in the output node data pool to other devices in preparation;
[0057] During the operation of the soft gateway, in order to ensure the real-time nature of the data, the soft gateway opens up three background threads by default. The priorities of the three background threads are 0, 1, and 2 respectively. The three background threads can be turned on, off, and paused.
[0058] All links of the same priority are automatically placed in threads of the corresponding priority, so there is no competition between threads of different priorities for the same link;
[0059] Link priority represents the priority of data exchange between devices on the link. Some external data has been transferred to output node data. When there are multiple link number options, the system will select the link type with a higher priority. The smaller the priority number, the higher the priority.
[0060] The following is a practical application scenario to further introduce the technical solution in this application. Figure 3 As shown, the hardware in this scenario includes:
[0061] An industrial computer or server with industrial Ethernet port and serial port, and deployed with soft gateway software;
[0062] A communication device 1 that only supports RS485 interface protocol;
[0063] A communication device that only supports TCP / IP interface protocol 2;
[0064] A communication device that only supports UDP interface protocol 3;
[0065] Depend on Figure 3 It can be seen that the data link implemented by the soft gateway has a total of three links, namely:
[0066] Link 1: Device 1 sends service data 1 to device 2;
[0067] Link 2: Device 1 sends service data 1 to device 3;
[0068] Link 3: Device 2 sends service data 2 to device 3;
[0069] The implementation process of the soft gateway system supporting data exchange between multiple devices in this application is as follows:
[0070] Device Connection
[0071] First, establish a communication connection. Device 1 uses a serial bus device to connect to the industrial computer, and devices 2 and 3 use Ethernet cables to connect to the industrial computer. According to the requirements, there are two input devices, namely device 1 and device 2;
[0072] Start configuring device 1, which is used to set the communication protocol parameters of device 1 to be connected, and according to the communication protocol parameters;
[0073]
[0074]
[0075] Device 2 is both a receiver and a sender of device data, so two ports are required.
[0076] Node data
[0077] The soft gateway inputs the parameters provided in the above table into the communication configuration module, establishes a connection, and the reception is completed.
[0078] After receiving, generate input node data 1 and input node data 2; according to the requirements,
[0079] Convert the input node data 1 into output node 1 through TCP / IP protocol.
[0080] Convert the input node data 2 into the output node 3 through the TCP / IP protocol;
[0081] Link composition
[0082] Depend on Figure 3 It can be seen that:
[0083] Link 1 consists of input node data 1, protocol conversion 1 and output node data 1.
[0084] Link 2 consists of input node data 1, protocol conversion 2, and output node data 2.
[0085] Link 3 consists of input node data 2, protocol conversion 3 and output node data 3.
[0086] Data Generation
[0087] At this point, all data links are completed.
[0088] The soft gateway system supporting data exchange between multiple devices provided by the present application is compared with traditional soft gateways. Traditional soft gateways are generally protocol conversions between pure application layers, such as modbus to mqtt soft gateways, which lack hardware protocols such as USB, CAN, UART, etc., and increase the support for a large number of hardware protocols. The soft gateway of the present invention makes up for this. The soft gateway of the present invention adds the concepts of node data and data links, ensures the uniqueness of data, ensures the adjustability of links, supports the conversion of one type of data into multiple protocol types for output, and similarly supports the conversion of multiple types of protocol data into one type of protocol data for output, and can flexibly adjust the input and output of the soft gateway.
[0089] The soft gateway system supporting data exchange between multiple devices provided by this application has the following characteristics compared with the hard gateway:
[0090] Cost saving: Since the software gateway does not require additional hardware support, users only need to install the software on existing industrial computers or general-purpose computers. If they encounter complex hardware interface protocols, they can use conversion interface devices, such as CAN bus, which greatly reduces costs.
[0091] High flexibility: The software gateway can run on a variety of operating systems and hardware platforms, which is extremely flexible. Users can choose the appropriate operating system and hardware platform according to actual needs to meet the needs of different application scenarios.
[0092] High point capacity: One of the characteristics of software gateway is the large point capacity, ranging from 3,000 to 30,000 points. The point capacity is affected by the number of physical interfaces of the industrial computer, the CPU processor and the memory RAM. One set of software can complete the data collection of the entire factory.
[0093] Easy to deploy and maintain: The installation and deployment process of the software gateway is relatively simple. Users only need to follow the instructions to complete the installation and configuration. At the same time, the maintenance of the software gateway is also very convenient, and it can be kept up to date through remote upgrades and configurations.
[0094] Strong scalability: The software gateway can expand its functions by upgrading the software version or adding functional modules. This means that users can add new functions and services at any time according to their needs without replacing hardware equipment.
[0095] The present invention uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only used to help understand the method and core ideas of the present invention. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A soft gateway system supporting data exchange between multiple devices, characterized in that: It includes an interface driver unit and a data link unit connected thereto. The interface driver unit is used to establish a connection relationship with various field devices, complete data collection, complete the mapping of external interface data to memory data, and send data to designated field devices; the data link unit is used to establish an input node data pool, select input node data from the input node data pool for protocol conversion, and construct an output node data pool.
2. The soft gateway system supporting data exchange between multiple devices according to claim 1, characterized in that: The interface driving unit comprises: The communication configuration module is used to set the communication protocol parameters of the device to be connected and establish a connection communication with the external device according to the communication protocol parameters; A data mapping module is used to package and encode the data received from the external device according to a certain format and store it in a FIFO queue; The data transceiver module is used to obtain the data output by the device from the device's connection interface and distribute the corresponding data to the specified device according to the configured data link.
3. The soft gateway system supporting data exchange between multiple devices according to claim 2, characterized in that: The interface of the interface driving unit adopts one or more of a serial port, a USB, an Ethernet port, a CAN port, and a WIFI port.
4. The soft gateway system supporting data exchange between multiple devices according to claim 2, characterized in that: The communication protocol parameters include protocol type, communication mode, port number, verification mode, and communication rate.
5. The soft gateway system supporting data exchange between multiple devices according to claim 2, characterized in that: The data link unit comprises: The protocol conversion module is used for data protocol format conversion, converting the input node data into data protocol and putting it into the output node data pool; Link management module, used to manage internal node data and link data; The link scheduling module is used to prepare for allocating data in the output node data pool to other devices.
6. The soft gateway system supporting data exchange between multiple devices according to claim 5, characterized in that: The link created by the link management module has label attribute information, including link sequence number, link direction, link status, link data, link priority, and link enable.
Citation Information
Cited By
Intelligent construction site hardware equipment data acquisition operation and maintenance method, system, equipment and medium
CN120434313A
Smart construction site hardware equipment data collection and operation and maintenance methods, systems, equipment and media
CN120434313B