A control method, device and system for data transmission of a 5G industrial gateway
By utilizing the multiple network interfaces and global message ID database of 5G industrial gateway devices, the problem of low data transmission efficiency of redundant links in 5G networks and wired ring network scenarios is solved, achieving efficient data transmission and uniqueness determination.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU TONGKANG CHUANGZHI SOFTWARE CO LTD
- Filing Date
- 2022-08-22
- Publication Date
- 2026-05-29
AI Technical Summary
Existing network redundancy technologies cannot achieve redundant link data transmission between Layer 2 switching networks and Layer 3 routing networks in 5G networks and wired ring network scenarios, resulting in low data transmission efficiency.
The 5G industrial gateway device connects different data transmission links through three network interfaces. It uses a global message ID database and preset fields to judge and process the legality of network messages, adds or deletes custom fields to achieve marking and parsing, and combines multiple network interfaces for data transmission.
It improves the data transmission efficiency of industrial control systems by adding redundant links, ensures data uniqueness and avoids redundant operations, and reduces the processor load.
Smart Images

Figure CN117081981B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network multimedia terminal technology, and in particular to a control method, apparatus and system for data transmission in a 5G industrial gateway device. Background Technology
[0002] With the popularization of 5G technology and the increasing development of the Industrial Internet, there is a need for 5G networks as redundant links (multiple transmit, multiple receive) in traditional industrial scenarios (layer two ring networks). However, there are no readily available technologies or methods for network redundancy that are directly applicable to this scenario.
[0003] Existing link backup technologies include the LACP and VRRP protocols. However, the LACP protocol only supports Layer 2 and Layer 3 aggregation, while the VRRP protocol only supports link backup for Layer 3 NAT routers. Therefore, for application scenarios of wired ring networks (Layer 2 switching networks) and 5G wireless communication networks (Layer 3 routing networks), existing link backup technologies cannot achieve data transmission in scenarios with redundant links between Layer 2 switching networks and Layer 3 routing networks.
[0004] Therefore, there is an urgent need for a control strategy for data transmission in 5G industrial gateway devices to solve the problem of low data transmission efficiency after adding redundant links in industrial control systems. Summary of the Invention
[0005] This invention provides a control method, apparatus, and system for data transmission in 5G industrial gateway devices, in order to improve data transmission efficiency after adding redundant links in industrial control systems.
[0006] To address the aforementioned problems, one embodiment of the present invention provides a control method for data transmission in a 5G industrial gateway device, comprising:
[0007] The system acquires network packets sent by external devices and determines the device interface receiving the network packets. The network packets include one or more of a first network packet or a second network packet, wherein the first network packet includes raw fields, and the second network packet includes raw fields and custom fields. The device interfaces include a first network interface, a second network interface, and a third network interface, wherein the first network interface is used to connect industrial control equipment, the second network interface is used to connect the main network link between 5G industrial gateway devices, and the third network interface is used to connect redundant network links between 5G industrial gateway devices.
[0008] When the device interface receiving the network packet is the first network interface, the network packet is the first network packet. Based on the first network packet, the third network packet is obtained through the newly added fields and the global packet ID database, and the third network packet is transmitted through the second network interface and the third network interface. The third network packet includes original fields and custom fields.
[0009] When the device interface receiving the network packet is the second network interface or the third network interface, the network packet is the second network packet. Based on the second network packet, the fourth network packet is obtained through the first preset field, the second preset field, and the global packet ID database, and the fourth network packet is transmitted through the first network interface; wherein, the fourth network packet includes the original fields.
[0010] As can be seen from the above, the present invention has the following beneficial effects:
[0011] This invention provides a control method for data transmission in a 5G industrial gateway device. The 5G industrial gateway device enables connections between different devices through its three network interfaces, thereby establishing different data transmission links. By identifying the device interface receiving network packets, and upon identifying the first network interface, adding fields to the network packet, and transmitting the resulting third network packet through the second and third network interfaces, the invention achieves packet marking and multi-link transmission. Conversely, upon identifying the second or third network interface, fields are deleted from the network packet, and the resulting fourth network packet is transmitted through the first network interface, achieving packet parsing. This invention integrates multiple network interfaces to build different types of network connections, adding redundant links to industrial control systems. Furthermore, the combination of custom field technology for network packets and multiple network interfaces improves the data transmission efficiency of the industrial control system after adding redundant links.
[0012] As an improvement to the above scheme, the step of obtaining the third network packet based on the first network packet by adding a new field and a global packet ID database is as follows:
[0013] Based on the basic information of the 5G industrial gateway device, obtain the local ID data; based on the packet counter of the 5G industrial gateway device, obtain the packet count data.
[0014] Based on the local ID data and the message count data, global message data is obtained, and based on the global message data, the validity of the global message data is judged through the global message ID database.
[0015] If the global message data matches the data in the global message ID database, it is determined to be invalid, and the addition of fields to the first network message is stopped; if the global message data fails to match the data in the global message ID database, it is determined to be valid, the generation time of the global message data and the global message data are recorded in the global message ID database, and the global message data is combined with the third preset field and the fourth preset field to obtain the new field;
[0016] Based on the original fields of the first network packet, the new fields are added to the original fields of the first network packet to obtain the third network packet data; wherein, the custom fields of the third network packet are specifically the new fields.
[0017] The improved scheme of this embodiment obtains global packet data from the basic information and packet counter of the 5G industrial gateway device, and matches the data in the global packet ID database. If a match is successful, it means that the first network packet has already been processed in this device and there is no need to repeat the operation, so the field addition operation is stopped. Furthermore, by combining the third and fourth preset fields to generate a custom field, the network packet with the added custom field becomes unique, laying the foundation for improving data transmission efficiency.
[0018] As an improvement to the above scheme, the step of obtaining the fourth network packet based on the second network packet using the first preset field, the second preset field, and the global packet ID database specifically involves:
[0019] The validity of the second network packet is determined based on its original fields and custom fields; wherein the custom fields include: local ID data, packet count data, first field and second field;
[0020] If the first field of the second network packet is inconsistent with the first preset field or the second field is inconsistent with the second preset field, it is determined to be invalid and the second network packet is discarded.
[0021] If the first field of the second network packet matches the first preset field, the second field matches the second preset field, and the local ID data and packet count data of the second network packet exist in the global packet ID database, then it is determined to be invalid and the second network packet is discarded.
[0022] If the first field of the second network packet matches the first preset field, the second field matches the second preset field, and the local ID data and packet count data of the second network packet do not exist in the global packet ID database, then it is considered valid, and the custom field in the second network packet is deleted to obtain the fourth network packet.
[0023] The improved scheme of this embodiment determines the uniqueness of the second network packet by identifying the custom field of the second network packet. If it is valid, it is a network packet that the device can process. The device also determines whether the second network packet has been processed by the device by checking whether the local ID data and packet count data of the second network packet exist in the global packet ID database, so as to avoid duplicate operations and improve the efficiency of data transmission.
[0024] As an improvement to the above solution, this embodiment further includes: performing a cleanup operation on the global message ID database based on a first time threshold, specifically:
[0025] Determine the storage time of global message data stored in the global message ID database;
[0026] If the storage time of global message data is greater than or equal to the first time threshold, then the global message data corresponding to the storage time being greater than or equal to the first time threshold will be deleted.
[0027] The improved scheme of this embodiment determines whether global message data has timed out by identifying the storage time of global message data in the global message ID database. By deleting timed-out global message data, the global message ID database maintains a certain amount of global message data, reducing the processor's workload. In order to save computation, message count data is usually reused when generating global message data. However, this reuse operation can lead to duplicate or invalid global message data. Therefore, deleting timed-out global message data can ensure the uniqueness of global message data and avoid the problems of duplication or invalid identification.
[0028] As an improvement to the above scheme, the transmission of the fourth network message through the first network interface specifically involves: transmitting the fourth network message to the system LAN bridge through the first network interface, so that the system LAN bridge transmits the fourth network message to the industrial control equipment through the fourth network interface according to the FDB forwarding table.
[0029] The improved scheme of this embodiment, after receiving the fourth network packet, needs to transmit the fourth network packet to the industrial control equipment through the system LAN bridge according to the FDB forwarding table, thus realizing the function of the 5G industrial gateway device to forward network packets to the industrial control equipment.
[0030] Accordingly, one embodiment of the present invention also provides a control device for data transmission of a 5G industrial gateway device, comprising: a data acquisition module, a first data processing module, and a second data processing module;
[0031] The data acquisition module is used to acquire network packets sent by external devices and determine the device interface receiving the network packets; wherein, the network packets include one or more of a first network packet or a second network packet, the first network packet includes original fields, and the second network packet includes original fields and custom fields; and the device interface includes a first network interface, a second network interface, and a third network interface, wherein the first network interface is used to connect industrial control equipment, the second network interface is used to connect the main network link between 5G industrial gateway devices, and the third network interface is used to connect redundant network links between 5G industrial gateway devices;
[0032] The first data processing module is configured to, when the device interface receiving the network packet is the first network interface, then the network packet is the first network packet; based on the first network packet, obtain the third network packet by adding new fields and a global packet ID database, and transmit the third network packet through the second network interface and the third network interface; wherein, the third network packet includes original fields and custom fields;
[0033] The second data processing module is configured to, when the device interface receiving the network packet is a second network interface or a third network interface, then the network packet is a second network packet; based on the second network packet, obtain a fourth network packet through a first preset field, a second preset field, and a global packet ID database, and transmit the fourth network packet through the first network interface; wherein, the fourth network packet includes original fields.
[0034] As an improvement to the above scheme, the step of obtaining the third network packet based on the first network packet by adding a new field and a global packet ID database is as follows:
[0035] Based on the basic information of the 5G industrial gateway device, obtain the local ID data; based on the packet counter of the 5G industrial gateway device, obtain the packet count data.
[0036] Based on the local ID data and the message count data, global message data is obtained, and based on the global message data, the validity of the global message data is judged through the global message ID database.
[0037] If the global message data matches the data in the global message ID database, it is determined to be invalid, and the addition of fields to the first network message is stopped; if the global message data fails to match the data in the global message ID database, it is determined to be valid, the generation time of the global message data and the global message data are recorded in the global message ID database, and the global message data is combined with the third preset field and the fourth preset field to obtain the new field;
[0038] Based on the original fields of the first network packet, the new fields are added to the original fields of the first network packet to obtain the third network packet data; wherein, the custom fields of the third network packet are specifically the new fields.
[0039] As an improvement to the above scheme, the step of obtaining the fourth network packet based on the second network packet using the first preset field, the second preset field, and the global packet ID database specifically involves:
[0040] The validity of the second network packet is determined based on its original fields and custom fields; wherein the custom fields include: local ID data, packet count data, first field and second field;
[0041] If the first field of the second network packet is inconsistent with the first preset field or the second field is inconsistent with the second preset field, it is determined to be invalid and the second network packet is discarded.
[0042] If the first field of the second network packet matches the first preset field, the second field matches the second preset field, and the local ID data and packet count data of the second network packet exist in the global packet ID database, then it is determined to be invalid and the second network packet is discarded.
[0043] If the first field of the second network packet matches the first preset field, the second field matches the second preset field, and the local ID data and packet count data of the second network packet do not exist in the global packet ID database, then it is considered valid, and the custom field in the second network packet is deleted to obtain the fourth network packet.
[0044] As an improvement to the above solution, this embodiment further includes a data cleaning module, which is used to clean the global message ID database according to a first time threshold. Specifically, the module determines the storage time of global message data stored in the global message ID database. When the storage time of global message data is greater than or equal to the first time threshold, the global message data with a storage time greater than or equal to the first time threshold is deleted.
[0045] As an improvement to the above scheme, the transmission of the fourth network message through the first network interface specifically involves: transmitting the fourth network message to the system LAN bridge through the first network interface, so that the system LAN bridge transmits the fourth network message to the industrial control equipment through the fourth network interface according to the FDB forwarding table.
[0046] Accordingly, this invention also provides a control system for data transmission of 5G industrial gateway devices, comprising: a plurality of control devices for data transmission of 5G industrial gateway devices, a plurality of PLC devices, a plurality of DCS devices, a wired ring network switch network, and a 5G dedicated network; wherein, each of the control devices for data transmission of 5G industrial gateway devices is applied to the control method for data transmission of 5G industrial gateway devices as described in this invention; each of the control devices for data transmission of 5G industrial gateway devices is connected to each of the PLC devices and each of the DCS devices through a first network interface; a second network interface of each control device for data transmission of 5G industrial gateway devices is connected through the wired ring network switch network, and a third network interface of each control device for data transmission of 5G industrial gateway devices is connected through the 5G dedicated network. Attached Figure Description
[0047] Figure 1 This is a flowchart illustrating a control method for data transmission in a 5G industrial gateway device according to an embodiment of the present invention.
[0048] Figure 2 This is a schematic diagram of the structure of a control device for data transmission in a 5G industrial gateway device according to an embodiment of the present invention;
[0049] Figure 3 This is a schematic diagram of the control system for data transmission of a 5G industrial gateway device according to an embodiment of the present invention;
[0050] Figure 4 This is a schematic diagram illustrating the differences between a first network packet and a third network packet provided in an embodiment of the present invention;
[0051] Figure 5 This is a schematic diagram illustrating the differences between the second network message and the fourth network message provided in an embodiment of the present invention;
[0052] Figure 6 This is a schematic diagram of the control system for data transmission of a 5G industrial gateway device provided in another embodiment of the present invention;
[0053] Figure 7 This is a schematic diagram of the data transmission process of redundant links in the data transmission control system of a 5G industrial gateway device provided in an embodiment of the present invention.
[0054] Figure 8 This is a schematic diagram illustrating the networking effect of the access fiber optic network link of a 5G industrial gateway device provided in an embodiment of the present invention;
[0055] Figure 9 This is a schematic diagram illustrating the networking effect of the access fiber optic network link and the 5G network link of a 5G industrial gateway device provided in an embodiment of the present invention.
[0056] Figure 10 This is a schematic diagram of a terminal device structure provided in an embodiment of the present invention. Detailed Implementation
[0057] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0058] Example 1
[0059] See Figure 1 , Figure 1 This is a flowchart illustrating a control method for data transmission in a 5G industrial gateway device according to an embodiment of the present invention. Figure 1 As shown, this embodiment includes steps 101 to 103, and the specific steps are as follows:
[0060] Step 101: Obtain network packets sent by external devices and determine the device interface receiving the network packets; wherein, the network packets include one or more of a first network packet or a second network packet, the first network packet includes original fields, the second network packet includes original fields and custom fields; and the device interface includes a first network interface, a second network interface and a third network interface, the first network interface is used to connect industrial control equipment, the second network interface is used to connect the main network link between 5G industrial gateway devices, and the third network interface is used to connect the redundant network link between 5G industrial gateway devices.
[0061] In one specific embodiment, the first network interface can be tapmtsr0, used to connect industrial control equipment (including DCS equipment or PLC equipment); the second network interface can be vxlanA, used to connect fiber optic network links between various 5G industrial gateway devices; and the third network interface can be vxlanB, used to connect 5G network links between various 5G industrial gateway devices.
[0062] Step 102: When the device interface receiving the network packet is the first network interface, the network packet is the first network packet. Based on the first network packet, the third network packet is obtained through the newly added fields and the global packet ID database, and the third network packet is transmitted through the second network interface and the third network interface. The third network packet includes original fields and custom fields.
[0063] In this embodiment, obtaining the third network packet based on the first network packet by adding a new field and accessing the global packet ID database specifically involves:
[0064] Based on the basic information of the 5G industrial gateway device, obtain the local ID data; based on the packet counter of the 5G industrial gateway device, obtain the packet count data.
[0065] Based on the local ID data and the message count data, global message data is obtained, and based on the global message data, the validity of the global message data is judged through the global message ID database.
[0066] If the global message data matches the data in the global message ID database, it is determined to be invalid, and the addition of fields to the first network message is stopped; if the global message data fails to match the data in the global message ID database, it is determined to be valid, the generation time of the global message data and the global message data are recorded in the global message ID database, and the global message data is combined with the third preset field and the fourth preset field to obtain the new field;
[0067] Based on the original fields of the first network packet, the new fields are added to the original fields of the first network packet to obtain the third network packet data; wherein, the custom fields of the third network packet are specifically the new fields.
[0068] In this embodiment, transmitting the fourth network message through the first network interface specifically involves: transmitting the fourth network message to the system LAN bridge through the first network interface, so that the system LAN bridge transmits the fourth network message to the industrial control equipment through the fourth network interface according to the FDB forwarding table.
[0069] In a specific embodiment, taking the DCS (external device) actively accessing the PLC (external device) as an example, the first network message sent by the application of the DCS (external device) is sent to the LAN bridge of the 5G industrial gateway device. The system LAN bridge forwards the first network message to the virtual Ethernet interface tapmtsr0 (first network interface). At this time, according to the network message received by tapmtsr0, the following processing is performed: a globally unique message ID is generated, a custom data format is inserted, and redundant links are sent to multiple network interfaces.
[0070] Taking DCS actively accessing PLC as an example, the steps include:
[0071] 1) When the application layer receives the first network packet from tapmtsr0;
[0072] 2) Generate a globally unique message ID (global message data) and increment the local counter by one;
[0073] 3) Compare the globally unique packet ID with the globally unique packet ID database. If it already exists, the first network packet will not be processed. If it does not exist, record the packet ID and the current time information in the database (since generating a globally unique packet ID can guarantee uniqueness, this condition will not be met).
[0074] 4) Combine the globally unique message ID, the third preset field, and the fourth preset field to generate a custom field, and insert the custom field into the original message.
[0075] In a specific embodiment, for a better illustration of the difference between the first network packet and the third network packet, please refer to [link to relevant documentation]. Figure 4 ,like Figure 4 As shown: The first network packet is the original packet, including: DST-MAC (6B), SRC-MAC (6B), proto (2B), and IP packet (L3 packet); the third network packet is the modified packet, including: the original packet: DST-MAC (6B), SRC-MAC (6B), proto (2B), and IP packet (L3 packet) and the custom packet: proto (2B), magic (4B), local ID (4B), and local packet counter increment (4B); among them, the local ID and the local packet counter increment form a globally unique packet ID (i.e., the global packet data mentioned in the summary), which is 8 bytes in total and can be used as a unique identifier for each packet. Since each 5G industrial gateway device ID is unique and the local packet counter increment is unique, the 8 bytes formed are unique for all packet IDs in the entire network topology.
[0076] In one specific embodiment, the custom message is as follows:
[0077] proto: Use a custom value of 0x8478 (this value is only used here for the purpose of explaining this proposal; other values can be modified in actual application scenarios) to represent the protocol field of the L2 layer;
[0078] magic: Use the custom value 0xde0dfee1 (this value is only used here for illustration and can be customized) to indicate that the message belongs to the 5G industrial gateway device.
[0079] Local ID: Defined using 4 bytes, it is necessary to ensure the uniqueness of the local ID of each 5G industrial gateway device in the entire network topology when applying the scenario;
[0080] The local message counter increments automatically: the 5G industrial gateway device increments automatically each time a message is received, until the counter overflows to a 4-byte unsigned integer (the value range is 0 to 4294967295) and then loops.
[0081] Step 103: When the device interface receiving the network packet is the second network interface or the third network interface, the network packet is the second network packet. Based on the second network packet, the fourth network packet is obtained through the first preset field, the second preset field and the global packet ID database, and the fourth network packet is transmitted through the first network interface; wherein, the fourth network packet includes the original fields.
[0082] In this embodiment, obtaining the fourth network packet based on the second network packet using the first preset field, the second preset field, and the global packet ID database specifically involves:
[0083] The validity of the second network packet is determined based on its original fields and custom fields; wherein the custom fields include: local ID data, packet count data, first field and second field;
[0084] If the first field of the second network packet is inconsistent with the first preset field or the second field is inconsistent with the second preset field, it is determined to be invalid and the second network packet is discarded.
[0085] If the first field of the second network packet matches the first preset field, the second field matches the second preset field, and the local ID data and packet count data of the second network packet exist in the global packet ID database, then it is determined to be invalid and the second network packet is discarded.
[0086] If the first field of the second network packet matches the first preset field, the second field matches the second preset field, and the local ID data and packet count data of the second network packet do not exist in the global packet ID database, then it is considered valid, and the custom field in the second network packet is deleted to obtain the fourth network packet.
[0087] In one specific embodiment, such as Figure 6 As shown, the packets received by the 5G industrial gateway from the fiber optic VXLAN network or the 5G VXLAN network all originate from packets sent by other 5G industrial gateway devices. Therefore, the processing flow is described below. The general process involves checking packet validity, removing duplicate packets, and submitting the packet to the system LAN bridge for further transmission to the DCS / PLC. The specific steps are as follows:
[0088] 1) When a packet is received from the vxlanA or vxlanB interface, check whether the value of the proto field is equal to 0x8478 (the definition of this value is consistent with the specific embodiment described in step 102 above). If the field is not equal, discard the packet (indicating that the packet does not belong to the packet sent by the redundant link).
[0089] 2) Check if the value of the magic field is equal to 0xde0dfee1 (the definition of this value is consistent with the specific embodiment in step 102 above). If the fields are not equal, discard the message (indicating that the message does not belong to the message sent by the redundant link).
[0090] 3) Extract the globally unique message ID and compare it with the globally unique message ID database. If it already exists, discard the message (indicating that the device has already received and processed the message). If it does not exist, record the message ID and the current time information in the globally unique message ID database.
[0091] 4) Delete the custom data in the message, restore the message and copy it to the tapmtsr0 interface, and let the system's LAN bridge handle it.
[0092] In a specific embodiment, for a better explanation of the difference between the second network packet and the fourth network packet, please refer to [link to relevant documentation]. Figure 5 ,like Figure 5 As shown: The second network packet is the received original packet, including: original packet: DST-MAC (6B), SRC-MAC (6B), proto (2B) and IP packet (L3 packet) and custom packet: proto (2B), magic (4B), local ID (4B) and local packet count auto-increment (4B); the fourth network packet is the recovered packet, including: DST-MAC (6B), SRC-MAC (6B), proto (2B) and IP packet (L3 packet).
[0093] In this embodiment, the method further includes: performing a cleanup operation on the global message ID database based on a first time threshold, specifically:
[0094] Determine the storage time of global message data stored in the global message ID database;
[0095] If the storage time of global message data is greater than or equal to the first time threshold, then the global message data corresponding to the storage time being greater than or equal to the first time threshold will be deleted.
[0096] In one specific embodiment, the "auto-incrementing local message count" value of the 5G industrial gateway device is reused cyclically, leading to conflicts in the globally unique message IDs generated by the gateway device. Considering that there is no delay in the transmission of a message to the destination device beyond a first time threshold in the network, this invention uses timed deletion of timed-out message IDs from the globally unique message ID database. The goal is to ensure that the "auto-incrementing local message count" does not cyclically occur within the first time threshold; in other words, to ensure that the 5G industrial gateway device receives no more than 4,294,967,295 messages from the DCS / PLC within the first time threshold.
[0097] In one specific embodiment, the first threshold can be 30 seconds.
[0098] Accordingly, this embodiment also provides a control system for data transmission of 5G industrial gateway devices, including: a control device 301 for data transmission of 5G industrial gateway devices, a plurality of PLC devices 302, a plurality of DCS devices 303, a wired ring network switch network 304, and a 5G dedicated network 305; wherein, each of the 5G industrial gateway devices data transmission control devices 301 is applied to the control method for data transmission of 5G industrial gateway devices as described in this invention; each of the 5G industrial gateway devices data transmission control devices 301 is connected to each of the PLC devices 302 and each of the DCS devices 303 through a first network interface; a second network interface of each of the 5G industrial gateway devices data transmission control devices 301 is connected through the wired ring network switch network 304, and a third network interface of each of the 5G industrial gateway devices data transmission control devices is connected through the 5G dedicated network 305.
[0099] In one specific embodiment, each PLC is assigned a fixed IP address and is located in the same subnet as the DCS. Several DCS devices access all PLC devices through fixed IP addresses, and the PLC device IPs and DCS IPs belong to the same subnet segment. The 5G industrial gateway device not only supports optical communication technology, connecting to the ring network through the optical network physical layer to provide a Layer 2 wired communication network for the DCS / PLC, but also supports 5G wireless communication technology, providing the DCS / PLC with a 5G wireless network connection to the 5G private network (Note: Under the 5G network, the wireless IPs of the 5G industrial gateways can communicate with each other, but the 5G IPs cannot directly communicate with the ring network).
[0100] In a specific embodiment, for a better illustration of the data transmission process of redundant links in the control system of 5G industrial gateway equipment data transmission, please refer to [link to relevant documentation]. Figure 7 ,like Figure 7 As shown, Figure 7A schematic diagram of the data transmission process for redundant links in the control system for data transmission in 5G industrial gateway devices, including steps 701 to 707, each step is detailed below:
[0101] Step 701: Create a tap virtual Ethernet interface and add it to the system LAN bridge, thereby generating the tapmtsr0 interface (the first network interface) in the system; execute the first command as follows:
[0102] iptuntap add dev tapmtsr0 mode tap;
[0103] ip link set dev tapmtsr0 mtu 1500;
[0104] ip link set dev tapmtsr0 up;
[0105] brctladdif br0 tapmtsr0;
[0106] Specifically, when the DCS / PLC sends a network packet to the LAN bridge of the 5G industrial gateway device, the system LAN bridge will forward it to the network interface tapmtsr0 according to the fdb, and the application layer will receive the network packet; at the same time, when the application layer sends a network packet to the tapmtsr0 interface, the system LAN bridge will forward it to the DCS / PLC device according to the fdb forwarding table.
[0107] Step 702: Establish a large Layer 2 network A based on the fiber optic network using the VXLAN protocol, thereby generating a vxlanA interface (second network interface) in the system;
[0108] The second command is executed as follows:
[0109] ip link add vxlanA type vxlan id 1dstport 1701;
[0110] bridge fdb append 00:00:00:00:00:00 dev vxlanAdst 192.168.0.101 viaeth1.5;
[0111] bridge fdb append 00:00:00:00:00:00 dev vxlanAdst 192.168.0.102 viaeth1.5;
[0112] The command `bridge fdb append 00:00:00:00:00:00dev vxlanAdstxxx.xxx.xxx.xxx viaeth1.5` creates a VXLANA interface and establishes a VXLAN connection with other 5G industrial gateway devices via a fiber optic network. It also forwards unidentified MAC addresses to other 5G industrial gateway devices. The `xxx.xxx.xxx.xxx` in the command represents the IP address of the 5G industrial gateway device's fiber optic network. (Note: Fiber optic networks are Layer 2 networks. Regarding the large Layer 2 network requiring VXLAN technology based on fiber optics, the following explanation is provided: When a 5G industrial gateway receives a message with a maximum MTU from a downstream device (DCS / PLC), the modified message may exceed the MTU due to the insertion of a private data format. Therefore, a large Layer 2 network using VXLAN technology (based on the UDP protocol) can transmit messages exceeding the MTU (the system kernel automatically performs IP packet grouping and reassembly), without requiring manual packet grouping and reassembly at the application layer). For a better explanation, please refer to [link to relevant documentation]. Figure 8 , Figure 8 This is a diagram showing the network configuration after step 702.
[0113] Step 703: Establish a large Layer 2 network B based on the 5G network and the VXLAN protocol, thereby generating a vxlanB interface (third network interface) in the system;
[0114] The third command is executed as follows:
[0115] ip link add vxlanB type vxlan id 1dstport 1701;
[0116] bridge fdb append 00:00:00:00:00:00 dev vxlanBdst 172.10.1.201 viarmnet_data0;
[0117] bridge fdb append 00:00:00:00:00:00 dev vxlanBdst 172.10.1.202 viarmnet_data0;
[0118] bridge fdb append 00:00:00:00:00:00 dev vxlanBdstxxx.xxx.xxx.xxx viarmnet_data0;
[0119] The system creates a VXLANB interface and establishes a VXLAN connection with other 5G industrial gateway devices over the 5G network. It also forwards unidentified MAC addresses to these other 5G industrial gateway devices. The xxx.xxx.xxx.xxx in the above command represents the IP address of the 5G network of the 5G industrial gateway device; these are not listed here. (Note: Since the 5G network is an IP-based Layer 3 network, a large Layer 2 network is established here using VXLAN technology. VXLAN technology is a Layer 2 VPN technology based on IP networks and using "MAC in UDP" encapsulation. VXLAN technology implements an IP network based on 5G connections, providing Layer 2 interconnection for various access points, thus achieving "L2 over L3" communication between two Layer 2 networks connected through a Layer 3 network. If a packet exceeds the MTU during forwarding, the system kernel can still resolve this based on IP packet reassembly, similar to step two above.) For a better explanation, please refer to [link to relevant documentation]. Figure 9 , Figure 9 This is a diagram showing the network configuration after steps 702 and 703.
[0120] Step 704: Listen for network packets on the tapmtsr0 / vxlanA / vxlanB interfaces. If the packet comes from the tapmtsr0 interface, proceed to step 705; if the packet comes from the vxlanA / vxlanB interface, proceed to step 706.
[0121] Step 705: Based on the message received by tapmtsr0, generate a globally unique message ID and insert a custom data format. At the same time, check if the global message ID exists in the globally unique message database. If it does, stop inserting the custom data format and return to step 704. Otherwise, store the globally unique message ID in the globally unique message database and send messages with the inserted custom data format to both vxlanA and vxlanB interfaces.
[0122] Step 706: Based on the messages received by the vxlanA and vxlanB interfaces, check, interpret, and customize the data format, extract the globally unique message ID, and simultaneously check whether the extracted globally unique message ID exists in the globally unique insulation database: if it does, stop interpreting the customized data format and return to step 704; otherwise, store the globally unique message ID in the globally unique message database, and simultaneously send a message to delete the customized data format to both the vxlanA and vxlanB interfaces.
[0123] Step 707: A scheduled task triggers the deletion of data that has timed out in the globally unique message ID database.
[0124] This embodiment enables the connection of different devices through the three network interfaces of the 5G industrial gateway device, thereby connecting different data transmission links. By identifying the device interface receiving network packets, and when the first network interface is identified, fields are added to the network packet, and the resulting third network packet is transmitted through the second and third network interfaces, achieving network packet marking and multi-link transmission. Conversely, when the second or third network interface is identified, fields are deleted from the network packet, and the resulting fourth network packet is transmitted through the first network interface, achieving network packet parsing. This embodiment is not only applicable to 5G network communication scenarios but also to scenarios where 4G, Wi-Fi, and other network technologies are used as redundant links. By simultaneously sending data through multiple paths and removing duplicates at the receiving end, a failure in one link will not affect the transmission and reception of network packets, improving the data transmission efficiency of the industrial control system after adding redundant links.
[0125] Example 2
[0126] See Figure 2 , Figure 2 This is a schematic diagram of a control device for data transmission in a 5G industrial gateway device according to an embodiment of the present invention, including: a data acquisition module 201, a first data processing module 202 and a second data processing module 203;
[0127] The data acquisition module 201 is used to acquire network packets sent by external devices and determine the device interface receiving the network packets; wherein, the network packets include one or more of a first network packet or a second network packet, the first network packet includes original fields, and the second network packet includes original fields and custom fields; and the device interface includes a first network interface, a second network interface, and a third network interface, wherein the first network interface is used to connect industrial control equipment, the second network interface is used to connect the main network link between 5G industrial gateway devices, and the third network interface is used to connect the redundant network link between 5G industrial gateway devices;
[0128] The first data processing module 202 is configured to, when the device interface receiving the network packet is the first network interface, then the network packet is the first network packet; based on the first network packet, obtain the third network packet by adding new fields and a global packet ID database, and transmit the third network packet through the second network interface and the third network interface; wherein, the third network packet includes original fields and custom fields;
[0129] The second data processing module 203 is used to determine the network message as the second network message when the device interface receiving the network message is the second network interface or the third network interface. Based on the second network message, it obtains the fourth network message through the first preset field, the second preset field, and the global message ID database, and transmits the fourth network message through the first network interface. The fourth network message includes the original fields.
[0130] As an improvement to the above scheme, the step of obtaining the third network packet based on the first network packet by adding a new field and a global packet ID database is as follows:
[0131] Based on the basic information of the 5G industrial gateway device, obtain the local ID data; based on the packet counter of the 5G industrial gateway device, obtain the packet count data.
[0132] Based on the local ID data and the message count data, global message data is obtained, and based on the global message data, the validity of the global message data is judged through the global message ID database.
[0133] If the global message data matches the data in the global message ID database, it is determined to be invalid, and the addition of fields to the first network message is stopped; if the global message data fails to match the data in the global message ID database, it is determined to be valid, the generation time of the global message data and the global message data are recorded in the global message ID database, and the global message data is combined with the third preset field and the fourth preset field to obtain the new field;
[0134] Based on the original fields of the first network packet, the new fields are added to the original fields of the first network packet to obtain the third network packet data; wherein, the custom fields of the third network packet are specifically the new fields.
[0135] As an improvement to the above scheme, the step of obtaining the fourth network packet based on the second network packet using the first preset field, the second preset field, and the global packet ID database specifically involves:
[0136] The validity of the second network packet is determined based on its original fields and custom fields; wherein the custom fields include: local ID data, packet count data, first field and second field;
[0137] If the first field of the second network packet is inconsistent with the first preset field or the second field is inconsistent with the second preset field, it is determined to be invalid and the second network packet is discarded.
[0138] If the first field of the second network packet matches the first preset field, the second field matches the second preset field, and the local ID data and packet count data of the second network packet exist in the global packet ID database, then it is determined to be invalid and the second network packet is discarded.
[0139] If the first field of the second network packet matches the first preset field, the second field matches the second preset field, and the local ID data and packet count data of the second network packet do not exist in the global packet ID database, then it is considered valid, and the custom field in the second network packet is deleted to obtain the fourth network packet.
[0140] As an improvement to the above solution, this embodiment further includes: a data cleaning module 204, which is used to clean the global message ID database according to a first time threshold. Specifically, it determines the storage time of global message data stored in the global message ID database; when the storage time of global message data is greater than or equal to the first time threshold, it deletes the global message data whose storage time is greater than or equal to the first time threshold.
[0141] As an improvement to the above scheme, the transmission of the fourth network message through the first network interface specifically involves: transmitting the fourth network message to the system LAN bridge through the first network interface, so that the system LAN bridge transmits the fourth network message to the industrial control equipment through the fourth network interface according to the FDB forwarding table.
[0142] This embodiment acquires network packets sent by external devices through a data acquisition module and determines the device interface receiving the network packets. When the device interface receiving the network packets is the first network interface, a third network packet is generated through the first data processing module and transmitted through the second and third network interfaces. When the device interface receiving the network packets is either the second or third network interface, a fourth network packet is generated through the second data processing module and transmitted through the first network interface. This invention enables the establishment of different types of network connections through the integration of multiple network interfaces, thereby adding redundant links in industrial control systems. Furthermore, the combination of custom field technology for network packets and multiple network interfaces improves the data transmission efficiency of industrial control systems after adding redundant links.
[0143] Example 3
[0144] See Figure 10 , Figure 10 This is a schematic diagram of the terminal device structure provided in an embodiment of the present invention.
[0145] One terminal device in this embodiment includes: a processor 1001, a memory 1002, and a computer program stored in the memory 1002 and executable on the processor 1001. When the processor 1001 executes the computer program, it implements the steps of the control method for data transmission of the various 5G industrial gateway devices described above in this embodiment, for example... Figure 1 All steps of the control method for data transmission in the 5G industrial gateway device shown. Alternatively, when the processor executes the computer program, it implements the functions of each module in the above-described device embodiments, for example: Figure 2 The diagram shows all modules of the control device for data transmission in the 5G industrial gateway equipment.
[0146] In addition, embodiments of the present invention also provide a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the control method for data transmission of the 5G industrial gateway device as described in any of the above embodiments.
[0147] Those skilled in the art will understand that the schematic diagram is merely an example of a terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than shown in the diagram, or combine certain components, or different components. For example, the terminal device may also include input / output devices, network access devices, buses, etc.
[0148] The processor 1001 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. The processor 1001 is the control center of the terminal device, connecting various parts of the terminal device through various interfaces and lines.
[0149] The memory 1002 can be used to store the computer programs and / or modules. The processor 1001 implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory 1002. The memory 1002 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital card (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0150] Wherein, if the modules / units integrated in the terminal device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, it can implement the steps of the various method embodiments described above. Wherein, the computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0151] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0152] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A control method for data transmission in a 5G industrial gateway device, characterized in that, include: The system acquires network packets sent by external devices and determines the device interface receiving the network packets. The network packets include one or more of a first network packet or a second network packet, wherein the first network packet includes raw fields, and the second network packet includes raw fields and custom fields. The device interfaces include a first network interface, a second network interface, and a third network interface, wherein the first network interface is used to connect industrial control equipment, the second network interface is used to connect the main network link between 5G industrial gateway devices, and the third network interface is used to connect redundant network links between 5G industrial gateway devices. When the device interface receiving the network packet is the first network interface, the network packet is the first network packet. Based on the first network packet, the third network packet is obtained through the newly added fields and the global packet ID database, and the third network packet is transmitted through the second network interface and the third network interface. The third network packet includes original fields and custom fields. When the device interface receiving the network packet is the second network interface or the third network interface, the network packet is the second network packet. Based on the second network packet, the fourth network packet is obtained through the first preset field, the second preset field, and the global packet ID database, and the fourth network packet is transmitted through the first network interface; wherein, the fourth network packet includes the original fields.
2. The control method for data transmission of a 5G industrial gateway device according to claim 1, characterized in that, The process of obtaining the third network packet based on the first network packet by adding new fields and accessing the global packet ID database is as follows: Based on the basic information of the 5G industrial gateway device, obtain the local ID data; based on the packet counter of the 5G industrial gateway device, obtain the packet count data. Based on the local ID data and the message count data, global message data is obtained, and based on the global message data, the validity of the global message data is judged through the global message ID database. If the global message data matches the data in the global message ID database, it is determined to be invalid, and the process of adding fields to the first network message is stopped. When the global message data fails to match the data in the global message ID database, it is determined to be valid. The time of the global message data generation and the global message data are recorded in the global message ID database. The global message data is then combined with the third preset field and the fourth preset field to obtain the newly added field. Based on the original fields of the first network packet, the new fields are added to the original fields of the first network packet to obtain the third network packet data; wherein, the custom fields of the third network packet are specifically the new fields.
3. The control method for data transmission of a 5G industrial gateway device according to claim 2, characterized in that, The step of obtaining the fourth network packet based on the second network packet using the first preset field, the second preset field, and the global packet ID database specifically involves: The validity of the second network packet is determined based on its original fields and custom fields; wherein the custom fields include: local ID data, packet count data, first field and second field; If the first field of the second network packet is inconsistent with the first preset field or the second field is inconsistent with the second preset field, it is determined to be invalid and the second network packet is discarded. If the first field of the second network packet matches the first preset field, the second field matches the second preset field, and the local ID data and packet count data of the second network packet exist in the global packet ID database, then it is determined to be invalid and the second network packet is discarded. If the first field of the second network packet matches the first preset field, the second field matches the second preset field, and the local ID data and packet count data of the second network packet do not exist in the global packet ID database, then it is considered valid, and the custom field in the second network packet is deleted to obtain the fourth network packet.
4. The control method for data transmission of a 5G industrial gateway device according to claim 3, characterized in that, Also includes: Based on the first time threshold, a cleanup operation is performed on the global message ID database, specifically as follows: Determine the storage time of global message data stored in the global message ID database; If the storage time of global message data is greater than or equal to the first time threshold, then the global message data corresponding to the storage time being greater than or equal to the first time threshold will be deleted.
5. The control method for data transmission of a 5G industrial gateway device according to claim 1, characterized in that, The transmission of the fourth network message through the first network interface specifically involves: transmitting the fourth network message to the system LAN bridge through the first network interface, so that the system LAN bridge transmits the fourth network message to the industrial control equipment through the fourth network interface according to the FDB forwarding table.
6. A control device for data transmission in a 5G industrial gateway device, characterized in that, include: Data acquisition module, first data processing module, and second data processing module; The data acquisition module is used to acquire network packets sent by external devices and determine the device interface receiving the network packets; wherein, the network packets include one or more of a first network packet or a second network packet, the first network packet includes original fields, and the second network packet includes original fields and custom fields; and the device interface includes a first network interface, a second network interface, and a third network interface, wherein the first network interface is used to connect industrial control equipment, the second network interface is used to connect the main network link between 5G industrial gateway devices, and the third network interface is used to connect redundant network links between 5G industrial gateway devices; The first data processing module is configured to, when the device interface receiving the network packet is the first network interface, then the network packet is the first network packet; based on the first network packet, obtain the third network packet by adding new fields and a global packet ID database, and transmit the third network packet through the second network interface and the third network interface; wherein, the third network packet includes original fields and custom fields; The second data processing module is configured to, when the device interface receiving the network packet is a second network interface or a third network interface, then the network packet is a second network packet; based on the second network packet, obtain a fourth network packet through a first preset field, a second preset field, and a global packet ID database, and transmit the fourth network packet through the first network interface; wherein, the fourth network packet includes original fields.
7. The control device for data transmission of a 5G industrial gateway device according to claim 6, characterized in that, The process of obtaining the third network packet based on the first network packet by adding a new field and accessing the global packet ID database specifically involves: Based on the basic information of the 5G industrial gateway device, obtain the local ID data; based on the packet counter of the 5G industrial gateway device, obtain the packet count data. Based on the local ID data and the message count data, global message data is obtained, and based on the global message data, the validity of the global message data is judged through the global message ID database. If the global message data matches the data in the global message ID database, it is determined to be invalid, and the process of adding fields to the first network message is stopped. When the global message data fails to match the data in the global message ID database, it is determined to be valid. The time of the global message data generation and the global message data are recorded in the global message ID database. The global message data is then combined with the third preset field and the fourth preset field to obtain the newly added field. Based on the original fields of the first network packet, the new fields are added to the original fields of the first network packet to obtain the third network packet data; wherein, the custom fields of the third network packet are specifically the new fields.
8. The control device for data transmission of a 5G industrial gateway device according to claim 7, characterized in that, The step of obtaining the fourth network packet based on the second network packet using the first preset field, the second preset field, and the global packet ID database specifically involves: The validity of the second network packet is determined based on its original fields and custom fields; wherein the custom fields include: local ID data, packet count data, first field and second field; If the first field of the second network packet is inconsistent with the first preset field or the second field is inconsistent with the second preset field, it is determined to be invalid and the second network packet is discarded. If the first field of the second network packet matches the first preset field, the second field matches the second preset field, and the local ID data and packet count data of the second network packet exist in the global packet ID database, then it is determined to be invalid and the second network packet is discarded. If the first field of the second network packet matches the first preset field, the second field matches the second preset field, and the local ID data and packet count data of the second network packet do not exist in the global packet ID database, then it is considered valid, and the custom field in the second network packet is deleted to obtain the fourth network packet.
9. The control device for data transmission of a 5G industrial gateway device according to claim 8, characterized in that, Also includes: The data cleaning module is used to perform a cleaning operation on the global message ID database according to a first time threshold, specifically: determining the storage time of global message data stored in the global message ID database; If the storage time of global message data is greater than or equal to the first time threshold, then the global message data corresponding to the storage time being greater than or equal to the first time threshold will be deleted.
10. A control system for data transmission in a 5G industrial gateway device, characterized in that, include: The system comprises a control device for data transmission of several 5G industrial gateway devices, several PLC devices, several DCS devices, a wired ring network switch network, and a 5G dedicated network; wherein, the control device for data transmission of each 5G industrial gateway device is applied to the control method for data transmission of 5G industrial gateway devices as described in claims 1 to 5; each control device for data transmission of 5G industrial gateway devices is connected to each PLC device and each DCS device through a first network interface; a second network interface of each control device for data transmission of 5G industrial gateway devices is connected through the wired ring network switch network; and a third network interface of each control device for data transmission of 5G industrial gateway devices is connected through the 5G dedicated network.