Tsn-based dds data distribution method, computing device, and storage medium
By combining TSN technology in DDS data distribution and utilizing the priority forwarding mechanism of IEEE 1722 Ethernet data frames and TSN switches, the problems of low-latency transmission of real-time data and priority service of critical data in industrial IoT are solved, realizing low-latency transmission of critical data and system reliability and stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ANJIE ZHONGKE (BEIJING) DATA TECH CO LTD
- Filing Date
- 2024-12-03
- Publication Date
- 2026-06-16
Smart Images

Figure CN119544622B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data communication distribution technology, specifically relating to a DDS data distribution method, computing device and storage medium based on TSN. Background Technology
[0002] DDS is a distributed real-time communication middleware protocol with a publish / subscribe architecture, belonging to the higher-level network. TSN is a protocol that enables deterministic and highly reliable communication over standard Ethernet, belonging to the lower-level network. With the development of Industrial Internet of Things (IIoT) technology, distributed intelligent systems built on DDS data distribution technology are widely used. In typical intelligent distributed system applications, DDS data distribution technology is used to sample sensor data from multiple sources (multiple network channels) in real time, perform real-time data cleaning and processing, and execute real-time inference calculations. Based on this architecture, real-time intelligent application systems and services are built. During data communication, the system simultaneously stores critical control command data, real-time sensor sampling data, and other non-urgent data in the same network channel. This places higher demands on ensuring low latency for real-time sensor data and critical command data transmission services, requiring solutions to the priority and shaping of different data streams in the same network channel. This is a fundamental requirement for building reliable and efficient IIoT intelligent systems. The traditional DDS mechanism based on UDP / TCP communication can only provide best-effort communication performance services and cannot solve the problems of low-latency real-time data transmission and priority service for critical data. Summary of the Invention
[0003] To address the problems existing in the prior art, this invention combines DDS data distribution with TSN technology to solve the problems of traffic shaping and forwarding scheduling of message data with different priorities on the network in terms of data transmission mechanism, thereby ensuring low-latency priority transmission services for critical control data and real-time data. Specifically, a TSN-based DDS data distribution method includes: constructing a DDS data distribution system, which includes publisher TSN node devices, a first TSN switch, a first transceiver device, a second TSN switch, a second transceiver device, and subscriber TSN node devices; the DDS data distribution system distributes data including:
[0004] The distribution process involves acquiring and dividing the data into critical and non-critical data. Critical data is encapsulated into IEEE 1722 Ethernet frames using the TSN protocol stack of the publisher TSN node device, and these frames are set to high priority and sent to the first TSN switch. Non-critical data is encapsulated into regular Ethernet frames using the TCP / UDP protocol stack of the first transceiver device and sent to the first TSN switch. The first TSN switch schedules the Ethernet frames and sends data to the second TSN switch based on their priority. The second transceiver device receives regular Ethernet frames. The subscriber TSN node device acquires IEEE 1722 Ethernet frames to complete the data distribution.
[0005] To achieve the above objectives, the present invention also provides a computing device comprising a bus; a communication structure connected to the bus; at least one processor connected to the bus; and at least one memory connected to the bus and storing program instructions, which, when executed by the at least one processor, cause the at least one processor to perform the above-described TSN-based DDS data distribution method.
[0006] To achieve the above objectives, the present invention also provides a computer-readable storage medium having program instructions stored thereon, which, when executed by a computer, cause the computer to perform any of the embodiments described in the first aspect.
[0007] The beneficial effects of this invention are:
[0008] 1. This invention designs a new real-time publish and subscribe mechanism in DDS data distribution technology, adds the TSSQOS mechanism, encapsulates DDS message data into IEEE 1722 Ethernet packets with VLAN tags, and utilizes the TSN switch priority forwarding mechanism to reduce the transmission latency of critical data in the network.
[0009] 2. This invention enables priority-based shaping and scheduling forwarding of Ethernet data through DDS data publishing and subscription TSN unit devices and TSN switches, reducing the transmission latency of critical and real-time data in DDS data services and ensuring the stability and reliability of system functions.
[0010] 3. This invention utilizes the TSN switch's support for the IEEE 802.1Qbv and IEEE 802.1Qbu protocol specifications to achieve the switching network's priority forwarding of critical DDS data and preemption of other low-priority Ethernet packets, ensuring the real-time transmission of critical control data and real-time sensor data in the Industrial Internet of Things (IIOT), thereby guaranteeing the system's reliability.
[0011] 4. This invention is applicable to application scenarios that transmit critical and real-time data via the DDS data publish-subscribe protocol. Attached Figure Description
[0012] Figure 1 This is a structural diagram of the TSN-based DDS data distribution system of the present invention;
[0013] Figure 2 This is a schematic diagram of the structure of encapsulating a DDS message into a TSN IEEE 1722 Ethernet data frame according to the present invention;
[0014] Figure 3 This is a schematic diagram illustrating the forwarding of DDS-TSN converged data packets via TSN switch traffic scheduling according to the present invention.
[0015] Figure 4 This is a schematic diagram of the functional modules for low-latency data distribution between TSN node devices according to the present invention via DDS-TSN. Detailed Implementation
[0016] 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.
[0017] A TSN-based DDS data distribution method includes: constructing a DDS data distribution system, which includes publisher TSN node devices, a first TSN switch, a first transceiver device, a second TSN switch, a second transceiver device, and subscriber TSN node devices; the DDS data distribution system distributes data by: acquiring distribution data and dividing the distribution data into critical data and non-critical data; encapsulating the critical data into IEEE 1722 Ethernet data frames through the TSN protocol stack of the publisher TSN node devices, setting the data frames to high priority, and sending them to the first TSN switch; encapsulating the non-critical data into regular Ethernet data frames through the TCP / UDP protocol stack of the first transceiver devices and sending them to the first TSN switch; the first TSN switch reshaping and scheduling the Ethernet data frames, and sending the data to the second TSN switch based on the priority of the Ethernet data frames; the second transceiver device is used to receive regular Ethernet data frames; and the subscriber TSN node devices are used to acquire IEEE 1722 Ethernet data frames to complete data distribution.
[0018] like Figure 1As shown, the low-latency DDS data distribution system based on TSN technology described in this invention includes a DDS data publishing TSN node device 1, a TSN switch 1 and a TSN switch 2, a DDS data subscription TSN node device 2, a conventional Ethernet data transceiver device 1 and a conventional Ethernet data transceiver device 2. A DDS-TSN low-latency data distribution protocol stack is deployed on the TSN node device.
[0019] On the DDS-TSN data publishing node device, key control messages and real-time sensor data are determined based on industrial application business decisions and encapsulated into IEEE 1722 Ethernet data frames via the DDS-TSN protocol stack, such as... Figure 2 As shown, the PCP attribute is set to high priority, and low-latency forwarding is performed through the TSN switch. The DDS data publishing TSN node sends IEEE 1722 Ethernet data frames to the TSN switch. The TSN switch then performs traffic shaping and scheduling to send these frames to the DDS data subscription TSN node. The TSN switch performs scheduling and preemption operations based on the PCP priority of the Ethernet packets. Packets without VLAN tags are given low priority by default, and high-priority packets preempt low-priority packets for forwarding, ensuring low-latency forwarding and transmission of critical data IEEE 1722 Ethernet frames. Figure 3 As shown.
[0020] In this embodiment, the Ethernet data frame includes a preamble, destination MAC address, source MAC address, VLAN tag, data type, critical data (IEEE 1722 Frame (AVTP), and checksum (CRC). The preamble is 8 bytes, the destination MAC address is 6 bytes, the source MAC address is 6 bytes, the VLAN tag is 4 bytes, the data type is 2 bytes, the critical data ranges from 42 to 1500 bytes, and the CRC is 4 bytes.
[0021] The priority tag VLAN TAG consists of the Tag Protocol Identifier (TPID), Priority Code Point (PCP), Canonical Format Indicator (CFI), and Virtual Local Area Network Identifier (VLAN ID). The TPID is 16 bits in size and has a data format of 0x8100. The PCP is 3 bits in size and is used to determine whether the data is of high priority. The CFI is 1 bit in size, and the VLAN ID is 12 bits in size.
[0022] The data type of data type Type is 0x22F0.
[0023] The key data IEEE 1722 Frame (AVTP) consists of an AVTP Header containing control information and metadata, and an AVTP Payload (DDS RTPS message data). The AVTP Payload includes a DDSI-RTPS Header and DDSI-RTPS sub-message groups.
[0024] The DDS data publishing TSN node device provides a DDS data publishing node and a TSN protocol stack. The DDS data publishing node is responsible for publishing key control messages and real-time data, while the TSN protocol stack is responsible for encapsulating DDS data into IEEE 1722 Ethernet data frames for transmission.
[0025] TSN switches support the IEEE 802.1Qbv and IEEE 802.1Qbu protocol specifications. The Qbv protocol performs traffic shaping and scheduling, while the Qbu protocol performs frame preemption of low-priority packets by high-priority packets. TSN switches will forward high-priority data frames first.
[0026] In this embodiment, the traffic shaping and scheduling performed by the TSN switch includes: the Qbv specification shapes and sorts the data queues of incoming data frames according to priority, and schedules the forwarding of frames according to priority; the Qbu specification performs the operation of high-priority data frames preempting low-priority data frames during the scheduling and forwarding of data frames.
[0027] The DDS data subscription TSN node device provides a DDS data subscription node and a TSN protocol stack. The TSN protocol stack is responsible for extracting DDS message data from the received IEEE 1722 Ethernet data frames, and the DDS data subscription node is responsible for handing the received DDS message data to the application for processing.
[0028] Conventional Ethernet data transceiver devices run a TCP / IP protocol stack to send and receive ordinary Ethernet data packets to and from TSN switches.
[0029] In this embodiment, as Figure 4 As shown, the low-latency DDS data distribution method based on TSN technology described in this invention includes the following steps:
[0030] Step 1: In the DDS data publishing node, DDS messages are classified into critical data messages and non-urgent data messages according to application business requirements. A brand-new TSS (Time Sensitive Service) QoS based on TSN protocol transmission is designed at the RTPS layer. Critical data messages are published through the TSN protocol stack, and non-urgent data messages are published through the TCP / UDP protocol stack.
[0031] Step 2: The critical DDS data message is encapsulated into an IEEE 1722 Ethernet data frame through the TSN protocol stack, the PCP attribute is set to high priority, and it is sent to the TSN switch through the operating system's Ethernet module.
[0032] Step 3: DDS non-urgent data messages are encapsulated into regular Ethernet data frames via the TCP / UDP protocol stack, with the default PCP attribute set to low priority, and sent to the TSN switch through the operating system's Ethernet module.
[0033] Step 4: The TSN switch is equipped with IEEE 802.1Qbv and IEEE 802.1Qbu protocol processing mechanisms. After Ethernet data frames arrive at the TSN switch, the TSN switch performs data frame shaping and scheduling, as well as frame preemption. After passing through the TSN switch, high-priority data frames are forwarded first, reducing the transmission latency of data on the network link.
[0034] Step 5: After the DDS data subscription node receives the Ethernet data frame, the DDS message data encapsulated in the TSN data frame is preferentially transmitted to the DCPS layer for processing through the RTPS layer.
[0035] This invention achieves low-latency transmission of critical DDS data messages through DDS data publishing nodes, TSN switches, and DDS data subscription nodes, thereby improving the reliability of critical DDS data transmission and ensuring the reliability and stability of industrial IoT systems.
[0036] This invention also provides a computing device, which includes a processor, a memory, a communication interface, and a bus. The communication interface in the computing device can be used to communicate with other devices. The processor can be connected to the memory. The memory can be used to store program code and data. Therefore, the memory can be an internal storage unit of the processor, an external storage unit independent of the processor, or a component including both internal storage units and external storage units independent of the processor.
[0037] Optionally, the computing device may also include a bus. The memory and communication interface can be connected to the processor via the bus. The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc.
[0038] It should be understood that, in the embodiments of the present invention, the processor may be a central processing unit (CPU). The processor may also be 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. Alternatively, the processor may employ one or more integrated circuits to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
[0039] The memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of the processor may also include non-volatile random access memory. For example, the processor may also store information about the device type.
[0040] When the computing device is running, the processor executes computer execution instructions in the memory to perform the operation steps of each method embodiment.
[0041] It should be understood that the computing device according to the embodiments of the present invention can correspond to the corresponding subject executing the methods according to the various embodiments of the present invention, and the above and other operations and / or functions of each module in the computing device are respectively for implementing the corresponding processes of the methods of this embodiment. For the sake of brevity, they will not be described in detail here.
[0042] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0043] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0044] In the embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0045] The units described as separate components may or may not be physically separate. 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 units can be selected to achieve the purpose of this embodiment according to actual needs.
[0046] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0047] If the aforementioned functions 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, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0048] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is used to perform the operation steps of the various method embodiments.
[0049] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0050] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0051] The program code contained on a computer-readable medium may be transmitted using any suitable medium, including, but not limited to, wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0052] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0053] The above-described embodiments further illustrate the purpose, technical solution, and advantages of the present invention. It should be understood that the above-described embodiments are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made to the present invention within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A DDS data distribution method based on TSN, characterized in that, include: Construct a DDS data distribution system, which includes publisher TSN node devices, a first TSN switch, a first transceiver device, a second TSN switch, a second transceiver device, and subscriber TSN node devices; the data distribution process of the DDS data distribution system includes: The distribution process involves acquiring and dividing the data into critical and non-critical data. Critical data is encapsulated into IEEE 1722 Ethernet frames using the TSN protocol stack of the publisher TSN node device, and these frames are set to high priority and sent to the first TSN switch. Non-critical data is encapsulated into regular Ethernet frames using the TCP / UDP protocol stack of the first transceiver device and sent to the first TSN switch. The first TSN switch schedules the Ethernet frames and sends data to the second TSN switch based on their priority. The second transceiver device receives regular Ethernet frames. The subscriber TSN node device acquires IEEE 1722 Ethernet frames to complete the data distribution. Sending data to the second TSN switch based on the priority of Ethernet data frames includes: the first TSN switch detects the priority label of the Ethernet data frame; when a priority label exists, it forwards the Ethernet data frame; if no priority label exists, and the first TSN switch has a data frame with a priority label, it stops sending low-priority data and sends high-priority data to the second TSN switch.
2. The DDS data distribution method based on TSN according to claim 1, characterized in that, Ethernet data frames include a preamble, destination MAC address, source MAC address, priority tag, data type, key data, and checksum.
3. The DDS data distribution method based on TSN according to claim 1, characterized in that, Scheduling Ethernet data frames includes: determining whether a priority label exists in the Ethernet data frame; if a priority label exists, marking the priority of the data frame according to the priority label information; if no priority label exists, not marking the priority of the data frame.
4. The DDS data distribution method based on TSN according to claim 1, characterized in that, Ethernet data frames are sent to the first TSN switch via the Ethernet module.
5. The DDS data distribution method based on TSN according to claim 1, characterized in that, After receiving data, the subscriber TSN node device first transmits it to the DCPS layer for processing via the RTPS layer.
6. A computing device, characterized in that, Includes a bus; a communication structure connected to the bus; and at least one processor connected to the bus. And at least one memory connected to the bus and storing program instructions that, when executed by the at least one processor, cause the at least one processor to perform the method of any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that, It stores program instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 5.