DDS data distribution method based on TSN, computing device and storage medium
By combining TSN technology, a TSN-based DDS data distribution method is designed, which solves the problem of shaping of different data streams priorities in DDS data distribution, realizes low-latency transmission of key data and real-time data, and improves the stability and reliability of the system.
Patent Information
- Application Number
- CN202411759116.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-12-03
AI Technical Summary
The existing DDS data distribution technology cannot effectively solve the priority and shaping problems of different data streams in the same network channel, resulting in high delays in real-time data and key instruction data transmission, which cannot meet the low latency and high reliability requirements of industrial IoT systems.
Combined with TSN technology, a TSN-based DDS data distribution method is designed. By building a DDS data distribution system, the priority shaping and scheduling functions of the TSN switch are used to encapsulate critical data into high-priority IEEE 1722 Ethernet data frames, and priority forwarding is carried out through the TSN switch to ensure low-latency transmission of critical data and real-time data.
It realizes low-latency transmission of critical data and real-time data in DDS data services, reduces transmission delay, improves system stability and reliability, and meets the needs of industrial IoT systems for low-latency and high-priority data transmission.
Smart Images

Figure CN119544622A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data communication distribution, and in particular relates to a TSN-based DDS data distribution method, computing equipment and storage medium. Background Art
[0002] DDS is a distributed real-time communication middleware protocol that adopts a publish / subscribe architecture and belongs to a high-level network. TSN is a protocol that can achieve deterministic and highly reliable communication on a standard Ethernet network and belongs to a low-level network. With the development of industrial Internet of Things (IIOT) technology, distributed intelligent systems built on DDS data distribution technology have been 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, and the data is cleaned and processed in real time, and real-time reasoning calculations are performed at the same time, and real-time intelligent application systems and services are established based on this architecture. In the process of data communication, the system simultaneously stores key control instruction data, sensor real-time sampling data, and other non-urgent data in the same network channel, which puts higher requirements on ensuring the low latency of real-time sensor data and key instruction data transmission services. It is necessary to solve the priority and shaping problems of different data streams in the same network channel, which is the basic requirement for building a reliable and efficient IIoT intelligent system. 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 transmission of real-time data and priority services for key data. Summary of the invention
[0003] In order to solve the problems existing in the above prior art, the present invention combines DDS data distribution with TSN technology to solve the problems of traffic shaping and forwarding scheduling of message data of different priorities on the network in the data transmission mechanism, thereby ensuring low-latency priority transmission services for critical control data and real-time data. Specifically, a DDS data distribution method based on TSN, the method includes: constructing a DDS data distribution system, the system includes a publisher TSN node device, a first TSN switch, a first transceiver device, a second TST switch, a second transceiver device and a subscriber TSN node device; the DDS data distribution system distributes data including:
[0004] Obtain distribution data and divide the distribution data into critical data and non-critical data; encapsulate the critical data into IEEE 1722 Ethernet data frames through the TSN protocol stack of the publisher TSN node device, set the data frame to a high priority, and send it to the first TSN switch; encapsulate the non-critical data into regular Ethernet data frames through the TCP / UDP protocol stack of the first transceiver device, and send it to the first TSN switch; the first TSN switch schedules the Ethernet data frames and sends the data to the second TST switch based on the priority of the Ethernet data frames; the second transceiver device is used to receive regular Ethernet data frames; the subscriber TSN node device is used to obtain the IEEE 1722 Ethernet data frames and complete data distribution.
[0005] To achieve the above objectives, the present invention also provides a computing device, which includes 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, enables the at least one processor to execute the above-mentioned TSN-based DDS data distribution method.
[0006] To achieve the above-mentioned object, the present invention further provides a computer-readable storage medium having program instructions stored thereon, and when the program instructions are executed by a computer, the computer executes any one of the implementations described in the first aspect.
[0007] Beneficial effects of the present invention:
[0008] 1. The present invention designs a new real-time publishing and subscription mechanism in the DDS data distribution technology, adds the TSSQOS mechanism, encapsulates the DDS message data into the IEEE 1722 Ethernet message with VLAN TAG, and uses the TSN switch priority forwarding mechanism to reduce the transmission delay of critical data in the network.
[0009] 2. The present invention realizes shaping and scheduling forwarding operations on Ethernet data according to priority through DDS data publishing and subscription TSN unit devices and TSN switches, reduces the transmission delay of critical data and real-time data in DDS data services, and ensures the stability and reliability of system functions.
[0010] 3. The present invention utilizes the TSN switch to support IEEE802.1Qbv and IEEE802.1Qbu protocol specifications, realizes the switching network's characteristics of giving priority to forwarding critical DDS data and preempting other low-priority Ethernet packets, and ensures the real-time transmission of key control data and real-time sensor data in the Industrial Internet of Things (IIOT), thereby ensuring the reliability of the system.
[0011] 4. The present invention is applicable to application scenarios where key data and real-time data are transmitted through the DDS data publish-subscribe protocol. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 This is a framework diagram of the TSN-based DDS data distribution system of the present invention;
[0013] Figure 2 It is a schematic diagram of the structure of encapsulating the DDS message of the present invention into the TSN IEEE 1722 Ethernet data frame;
[0014] Figure 3 A schematic diagram of DDS-TSN fusion data packets of the present invention being forwarded through traffic scheduling of a TSN switch;
[0015] Figure 4 It is a schematic diagram of the functional modules of the TSN node devices of the present invention through DDS-TSN low-latency data distribution. DETAILED DESCRIPTION
[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0017] A DDS data distribution method based on TSN, the method comprising: constructing a DDS data distribution system, the system comprising a publisher TSN node device, a first TSN switch, a first transceiver device, a second TST switch, a second transceiver device and a subscriber TSN node device; the DDS data distribution system distributing data comprises: obtaining distribution data, dividing the distribution data into critical data and non-critical data; encapsulating the critical data into an IEEE1722 Ethernet data frame through the TSN protocol stack of the publisher TSN node device, setting the data frame to a high priority, and sending it to the first TSN switch; encapsulating the non-critical data into a regular Ethernet data frame through the TCP / UDP protocol stack of the first transceiver device, and sending it to the first TSN switch; the first TSN switch shapes and schedules the Ethernet data frame, and sends the data to the second TST switch based on the priority of the Ethernet data frame; the second transceiver device is used to receive the regular Ethernet data frame; the subscriber TSN node device is used to obtain the IEEE 1722 Ethernet data frame to complete data distribution.
[0018] like Figure 1As shown, the low-latency DDS data distribution system based on TSN technology described in the present 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. The DDS-TSN low-latency data distribution protocol stack is deployed on the TSN node device.
[0019] On the DDS data publishing TSN node device, key control messages and real-time sensor data are generated based on industrial application business decisions and encapsulated into IEEE 1722 Ethernet data frames through the DDS-TSN protocol stack, such as Figure 2 As shown in the figure, the PCP attribute is set to high priority, and low-latency forwarding is performed through the TSN switch. The DDS data publishing TSN node device sends the IEEE 1722 Ethernet data frame to the TSN switch, which is sent to the DDS data subscription TSN node device through the TSN switch traffic shaping scheduling. The TSN switch performs scheduling and preemption operations according to the PCP priority of the Ethernet message. The message without VLAN TAG defaults to low priority. The high-priority message preempts the low-priority message forwarding to ensure the low-latency forwarding and transmission of the critical data IEEE 1722 Ethernet frame, as shown in the figure. Figure 3 shown.
[0020] In this embodiment, the Ethernet data frame includes a preamble signal Preamble, a destination MAC address, a source MAC address, a priority tag VLAN TAG, a data type Type, key data IEEE 1722Frame (AVTP) and a check code CRC. The size of the preamble signal Preamble is 8 bytes, the size of the destination MAC address is 6 bytes, the size of the source MAC address is 6 bytes, the size of the priority tag VLAN TAG is 4 bytes, the size of the data type Type is 2 bytes, the size of the key data is 42 to 1500 bytes, and the size of the check code CRC is 4 bytes.
[0021] The priority tag VLAN TAG consists of a tag protocol identifier TPID, a priority code point PCP, a canonical format indicator CFI, and a virtual LAN identifier VLAN ID; the size of the tag protocol identifier is 16 bits, and the data format is 0x8100; the size of the priority code point is 3 bits, and the attribute of the priority code point is used to determine whether the data is a high priority data tag; the size of the canonical format indicator is 1 bit; and the size of the virtual LAN identifier is 12 bits.
[0022] The data type of data type Type is 0x22F0.
[0023] Key data IEEE 1722Frame (AVTP) consists of AVTP Header containing control information and metadata and AVTP Payload (DDS RTPS message data). AVTP Payload contains DDSI-RTPS Header and DDSI-RTPS sub-message group.
[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, and the TSN protocol stack is responsible for encapsulating the DDS data into IEEE 1722 Ethernet data frames and sending them out.
[0025] TSN switches support IEEE802.1Qbv and IEEE802.1Qbu protocol specifications. The Qbv protocol performs traffic shaping and scheduling, and the Qbu protocol performs frame preemption of high-priority messages for low-priority messages. TSN switches forward high-priority data frames first.
[0026] In this embodiment, the TSN switch performs traffic shaping and scheduling including: the Qbv specification shapes and sorts the data queues of the data frames entering the switch according to the priority, and schedules the frame forwarding according to the priority; the Qbu specification performs the operation of high-priority data frames preempting low-priority data frames in the process of scheduling and forwarding 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 frame, and the DDS data subscription node is responsible for handing over the received DDS message data to the application for processing.
[0028] The TCP / IP protocol stack runs on conventional Ethernet data transceiver devices to send and receive ordinary Ethernet data packets to the TSN switch.
[0029] In this embodiment, if Figure 4 As shown, the low-latency DDS data distribution method based on TSN technology described in the present 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 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 DDS critical data message is encapsulated into the 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 Ethernet module of the operating system.
[0032] Step 3: The DDS non-urgent data message is encapsulated into a regular Ethernet data frame through the TCP / UDP protocol stack, with the default PCP attribute as low priority, and is sent to the TSN switch through the Ethernet module of the operating system.
[0033] Step 4: The IEEE802.1Qbv and IEEE802.1Qbu protocol standard processing mechanisms are deployed on the TSN switch. After the Ethernet data frame reaches the TSN switch, the TSN switch runs 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 data transmission delay 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] The present invention realizes low-latency transmission of critical DDS data messages through DDS data publishing nodes, TSN switches, and DDS data subscription nodes, improves the reliability of critical DDS data transmission, and ensures the reliability and stability of the industrial Internet of Things system.
[0036] The embodiment of the present invention further 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 the program code and data. Therefore, the memory can be a storage unit inside the processor, or an external storage unit independent of the processor, or a component including a storage unit inside the processor and an external storage unit independent of the processor.
[0037] Optionally, the computing device may further include a bus. The memory and the communication interface may be connected to the processor via the bus. The bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, and the like.
[0038] It should be understood that in the embodiment of the present invention, the processor may adopt a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Or the processor may adopt one or more integrated circuits to execute relevant programs to implement the technical solutions provided in the embodiment of the present invention.
[0039] The memory may include a read-only memory and a random access memory, and provides instructions and data to the processor. A portion of the processor may also include a 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 the computer-executable 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 embodiment of the present invention can correspond to the corresponding subjects in the methods according to the various embodiments of the present invention, and the above-mentioned and other operations and / or functions of each module in the computing device are respectively for implementing the corresponding processes of each method of the present embodiment. For the sake of brevity, they will not be repeated here.
[0042] Those skilled in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0043] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0044] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0045] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0046] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0047] If the functions are implemented in the form of 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 the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0048] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, it is used to execute the operating steps of each method embodiment.
[0049] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0050] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0051] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0052] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0053] The above embodiments further illustrate the purpose, technical solutions and advantages of the present invention in detail. It should be understood that the above embodiments are only preferred implementation modes 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 in 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 a publisher TSN node device, a first TSN switch, a first transceiver device, a second TST switch, a second transceiver device, and a subscriber TSN node device; the DDS data distribution system distributes data including: Obtain distribution data and divide the distribution data into critical data and non-critical data; encapsulate the critical data into IEEE 1722 Ethernet data frames through the TSN protocol stack of the publisher TSN node device, set the data frame to a high priority, and send it to the first TSN switch; encapsulate the non-critical data into regular Ethernet data frames through the TCP / UDP protocol stack of the first transceiver device, and send it to the first TSN switch; the first TSN switch schedules the Ethernet data frames and sends the data to the second TST switch based on the priority of the Ethernet data frames; the second transceiver device is used to receive regular Ethernet data frames; the subscriber TSN node device is used to obtain the IEEE 1722 Ethernet data frames and complete data distribution.
2. According to a TSN-based DDS data distribution method according to claim 1, it is characterized in that: The Ethernet data frame includes a leading signal, a destination MAC address, a source MAC address, a priority tag, a data type, key data, and a checksum.
3. According to a TSN-based DDS data distribution method according to claim 1, it is characterized in that: Scheduling the Ethernet data frame includes: determining whether there is a priority tag in the Ethernet data frame, if there is a priority tag, marking the priority of the data frame according to the priority tag information, and if there is no priority tag, not marking the data frame with priority.
4. According to a TSN-based DDS data distribution method according to claim 1, it is characterized in that: The Ethernet data frame is sent to the first TST switch through the Ethernet module.
5. The TSN-based DDS data distribution method according to claim 1, characterized in that: The first TSN switch forwards the frame data to the second TSN switch, including: the first TSN switch detects the priority tag of the Ethernet frame data, and when the priority tag exists, forwards the Ethernet frame data; if the priority tag does not exist, and when the data frame with the priority tag is sent to the first TSN switch, stops sending low priority data and sends high priority data to the second TSN switch.
6. The TSN-based DDS data distribution method according to claim 1, characterized in that: After receiving the data, the subscriber TSN node device transmits it to the DCPS layer for processing through the RTPS layer.
7. A computing device, characterized in that A system comprising 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, wherein when the program instructions are executed by the at least one processor, the at least one processor executes the method according to any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that: Program instructions are stored thereon, and when the program instructions are executed by a computer, the computer is caused to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Vehicle-mounted network redundant communication method and system based on DDS protocol and TSN technology
CN112422700A
Ethernet and controller area network protocol interconversion for in-vehicle networks
CN113302885A
Method for secure transmission of TSN network data based on domestic data distribution service
CN117176384A
Management method, equipment and system based on AUTOSAR
CN117319261A
Method for guarantee service quality of radio local network
CN1658611A
Cited By
Communication method and communication device of TSN terminal, computing equipment and storage medium
CN121056535A