Data transmission method and device, computer device and readable medium
Patent Information
- Application Number
- CN202210883874.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-26
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2042-07-26
AI Technical Summary
[0004]但是,现有RDMA RoCEv2不支持多路径数据传输,其根本原因在于使用多路径传输数据会导致接收端接收的数据包是乱序,且乱序成为常态
[0024] The data transmission method provided in this disclosure, applied to a first network device, includes: reading data from memory according to the data's storage order and storing the data locally; assigning addresses to the data, where each address represents the data's reading order; assigning each piece of data to one of at least two transmission paths; and for each transmission path, sending the data assigned to the transmission path and its address to a second network device via a first data packet, where the address enables the second network device to write the corresponding data into memory based on the address. This disclosure eliminates the need for data order preservation and reordering, avoiding the significant consumption of computing and storage resources associated with such reordering, enabling cost-free multi-path data transmission, supporting data center traffic engineering, reducing network congestion, lowering network latency, and thus improving network bandwidth.
Smart Images

Figure CN117424849B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of communication technology, specifically to a data transmission method, apparatus, computer equipment, and readable medium. Background Technology
[0002] RDMA (Remote Direct Memory Access), primarily RoCEv2 (Converged Ethernet RDMA protocol v2), is a widely used transmission protocol in high-performance computing (HPC) and large data centers. Due to its advantages such as zero-copy, kernel bypass, and CPU offloading, RDMA technology achieves higher bandwidth and lower latency compared to traditional Ethernet.
[0003] Data center traffic engineering has raised the need for multipath data transmission. Macro-level data center traffic exhibits distinct "large and small flow" characteristics, with high concurrency and bursts of traffic. Multipath data transmission offers the following advantages: bandwidth aggregation, increasing throughput; reducing bursts; minimizing jitter; rapid recovery from network link failures, with reduced impact from packet loss due to blockage on one path; and rerouting retransmitted packets when the original transmission path becomes unavailable without waiting for network-wide routing updates to converge. Furthermore, data centers provide the necessary conditions for implementing multipath data transmission: compared to complex, variable, and not entirely controllable heterogeneous networks like the Internet, data center networks are homogeneous network environments within a single autonomous system. End hosts, their protocols, network devices, and configurations are relatively controllable and predictable; homogeneity is reflected in fixed and regular topologies such as Fat-trees and VL2, relatively consistent buffer sizes, and link bandwidth.
[0004] However, the existing RDMA RoCEv2 does not support multipath data transmission. The fundamental reason is that using multipath data transmission leads to out-of-order data packets received by the receiver, and this out-of-order delivery is the norm. Traditional order-preserving schemes require the receiver to buffer, sort, and then write the data, consuming computational and storage resources and resulting in significant latency. With network I / O speeds increasing by 10G and 100G increments, line-speed order preservation becomes increasingly difficult to achieve. Summary of the Invention
[0005] This disclosure provides a data transmission method, apparatus, computer device, and readable medium.
[0006] In a first aspect, embodiments of this disclosure provide a data transmission method applied to a first network device, the method comprising:
[0007] Data is read from memory according to the data storage order and stored locally;
[0008] Assign an address to the data, where the address indicates the order in which the data is read;
[0009] Each of the data is assigned to one of at least two transmission paths;
[0010] For each transmission path, a first data packet is sent to the second network device, along with the data allocated to that transmission path and the address of that data. The address is used to enable the second network device to write the corresponding data into memory based on the address.
[0011] In another aspect, embodiments of this disclosure also provide a data transmission method applied to a second network device, the method comprising:
[0012] The first data packet sent by the first network device is received through at least two transmission paths;
[0013] Obtain the data carried in the first data packet and the address of the data; the data is read from memory by the first network device according to the data storage order, and the address indicates the reading order of the data;
[0014] The corresponding data is written into memory according to the address.
[0015] In another aspect, embodiments of this disclosure also provide a network device, which is a first network device, including a data reading module, an address allocation module, a path allocation module, and a data transmission module. The data reading module is used to read data from memory according to the data storage order and store the data locally.
[0016] The address allocation module is used to allocate an address to the data, where the address indicates the reading order of the data.
[0017] The path allocation module is used to assign each of the data to one of at least two transmission paths;
[0018] The data transmission module is used to send, for each transmission path, the data allocated to the transmission path and the address of the data to the second network device via a first data packet. The address is used to enable the second network device to write the corresponding data into memory according to the address.
[0019] In another aspect, this disclosure also provides a network device, which is a second network device, including a data transmission module, a data acquisition module, and a data writing module. The data transmission module is used to receive a first data packet sent by a first network device through at least two transmission paths.
[0020] The data acquisition module is used to acquire the data carried in the first data packet and the address of the data; the data is read from memory by the first network device according to the data storage order, and the address indicates the reading order of the data;
[0021] The data writing module is used to write the corresponding data into memory according to the address.
[0022] In another aspect, embodiments of this disclosure also provide a computer device, including: one or more processors; a storage device having one or more programs stored thereon; and when the one or more programs are executed by the one or more processors, causing the one or more processors to implement the data transmission method as described above.
[0023] In another aspect, embodiments of this disclosure also provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed, implements the data transmission method as described above.
[0024] The data transmission method provided in this disclosure, applied to a first network device, includes: reading data from memory according to the data's storage order and storing the data locally; assigning addresses to the data, where each address represents the data's reading order; assigning each piece of data to one of at least two transmission paths; and for each transmission path, sending the data assigned to the transmission path and its address to a second network device via a first data packet, where the address enables the second network device to write the corresponding data into memory based on the address. This disclosure eliminates the need for data order preservation and reordering, avoiding the significant consumption of computing and storage resources associated with such reordering, enabling cost-free multi-path data transmission, supporting data center traffic engineering, reducing network congestion, lowering network latency, and thus improving network bandwidth. Attached Figure Description
[0025] Figure 1 This is a schematic diagram of a traditional data transmission process;
[0026] Figure 2 This is a schematic diagram of the data transmission system architecture provided in the embodiments of this disclosure;
[0027] Figure 3 A schematic diagram of a data transmission process with a first network device as the execution entity, provided in an embodiment of this disclosure. Figure 1 ;
[0028] Figure 4 This is a schematic diagram of multipath data transmission provided in an embodiment of the present disclosure;
[0029] Figure 5 A schematic diagram of the frame format of a data packet provided in the embodiments of this disclosure;
[0030] Figure 6 A schematic diagram of a data transmission process with a first network device as the execution entity, provided in an embodiment of this disclosure. Figure 2 ;
[0031] Figure 7 A schematic diagram of a data transmission process with a first network device as the execution entity, provided in an embodiment of this disclosure. Figure 3 ;
[0032] Figure 8 This is a schematic diagram of a data transmission process with a second network device as the execution entity, provided as an embodiment of this disclosure.
[0033] Figure 9 A schematic diagram of the retransmission data flow provided in this embodiment of the disclosure;
[0034] Figure 10 This is a schematic diagram of the verification algorithm in a specific example of this disclosure;
[0035] Figure 11 This is a schematic diagram illustrating error correction coding implemented using multipath data transmission in a specific example of this disclosure;
[0036] Figure 12 Schematic diagram of the structure of the first network device provided in the embodiments of this disclosure Figure 1 ;
[0037] Figure 13 Schematic diagram of the structure of the first network device provided in the embodiments of this disclosure Figure 2 ;
[0038] Figure 14 Schematic diagram of the structure of the first network device provided in the embodiments of this disclosure Figure 3 ;
[0039] Figure 15 Schematic diagram of the structure of the second network device provided in the embodiments of this disclosure Figure 1 ;
[0040] Figure 16 Schematic diagram of the structure of the second network device provided in the embodiments of this disclosure Figure 2 . Detailed Implementation
[0041] Exemplary embodiments will be described more fully below with reference to the accompanying drawings; however, these exemplary embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will enable those skilled in the art to fully understand the scope of this disclosure.
[0042] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.
[0043] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. As used herein, the singular forms “a” and “the” are also intended to include the plural forms unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the said feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded.
[0044] The embodiments described herein can be described with reference to plan views and / or cross-sectional views using the ideal schematic diagrams of this disclosure. Therefore, the example illustrations can be modified according to manufacturing techniques and / or tolerances. Therefore, the embodiments are not limited to those shown in the drawings, but include modifications to configurations formed based on manufacturing processes. Therefore, the areas illustrated in the drawings are schematic in nature, and the shapes of the areas shown in the figures illustrate specific shapes of areas of an element, but are not intended to be limiting.
[0045] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined herein.
[0046] Multipath technology has a clear need and role, but in reality, it is not widely used. For example, multipath TCP (MultiPath TCP) within TCP (Transmission Control Protocol) is not widely adopted. The reason for this lack of widespread use is not the implementation of multipath jetting. In data centers with homogeneous networks and equal-cost multi-path routing, by modifying port numbers in the transport stream, the ECMP (Equal Cost Multi-path) protocol of routers and switches can distribute data streams across multiple transmission paths without difficulty or bottlenecks. The fundamental reason for the lack of widespread use of multipath technology lies in the out-of-order problem introduced by using multiple transmission paths. Because data is transmitted using multiple paths, each with different latency, and congestion on one path increasing latency, out-of-order data packets are received at the receiving end. This is a low-probability event in single-path data transmission, but in multipath scenarios, out-of-order delivery becomes the norm.
[0047] Traditional data order preservation schemes involve a series of processes, including storage, calculation, and sorting, based on the PSN (Package Sequence Number) in each packet. For example... Figure 1 As shown, the traditional RDMA-based data transmission process is as follows: The receiving end's RDMA NIC (Network Interface Controller) receives a packet, buffers the packet in its local buffer, and then sorts it. If packet N is received, followed by packet N+2, packet N+3, and then packet N+1, out-of-order delivery occurs. The NIC needs to buffer and reorder the packets to ensure that the data written to the QP (Queue Pair) buffer in host memory via DMA (Direct Memory Access) is ordered according to the PSN size. Here, the data address (Addr) is random and out-of-order; it is a specific address in the receiving end's memory that the sending end's CPU writes the data to, an address agreed upon between the application layers of the sending and receiving ends. As can be seen from the above data transmission process, to achieve data order preservation, the receiving end's NIC needs to buffer and sort the data before writing it to memory, consuming computational and storage resources, and increasing data transmission latency due to waiting.
[0048] To address the aforementioned problems, embodiments of this disclosure provide a data transmission method, wherein the system architecture used in the method is as follows: Figure 2 As shown, the system includes a first network device and a second network device. The first network device is a data sending device, and the second network device is a data receiving device. Both the first and second network devices can be computing node servers. The first network device connects to a remote second network device via an RDMA network card and transmits data according to the OSI (Open System Interconnection Reference Model) layered protocol from layers 1 to 4: Physical Layer -- Data Link Layer (Ethernet) -- Network Layer -- Transport Layer (RDMA). This embodiment applies the transport layer.
[0049] RDMA-based data transmission is end-to-end. The sending end (i.e., the first network device) and the receiving end (i.e., the second network device) include a CPU processor, DDR (Double Data Rate Synchronous Dynamic Random Access Memory) memory, and an RDMA network card, connected to the network via Ethernet lines (cable or fiber optic). During RDMA protocol operation, a portion of the DDR memory is used to establish a circular queue to buffer data. The circular queue at the sending end and the circular queue at the receiving end form a QP pair. The sending end CPU writes data to the circular queue according to the write pointer, and the sending end's RDMA network card reads data from the circular queue according to the read pointer. The data is encapsulated in Ethernet packets and transmitted over the network. The receiving end's RDMA network card writes data to the circular queue according to the write pointer. The receiving end CPU reads data from the circular queue according to the read pointer, thus completing the data transmission from the sending end to the receiving end.
[0050] The data transmission method of this disclosure embodiment is applied to a first network device, in combination with... Figure 3 and Figure 4 As shown, the method includes the following steps:
[0051] Step S11: Read data from memory according to the data storage order and store the data locally.
[0052] The application program of the first network device writes the data to be transmitted to the circular queue of memory according to the write pointer. After each address is written, the write pointer is incremented by 1. In this step, the network card (RDMA NIC) of the first network device uses the read pointer to read data from memory in the order of data storage via DMA and stores the read data in the cache of the RDMA NIC.
[0053] Step S12: Assign addresses to the data, where the addresses indicate the order in which the data is read.
[0054] In this step, the RDMA network card of the first network device performs RDMA protocol processing, assigning addresses to the stored data. The data address can indicate the data reading order, which is also the data storage order in memory.
[0055] Step S13: Assign each piece of data to one of at least two transmission paths.
[0056] This disclosure applies to multi-path transmission scenarios, i.e., data is transmitted through multiple transmission paths. In this step, the RDMA network card of the first network device assigns data with an allocated address to one of the multiple transmission paths, so that the data and its address can be transmitted through that transmission path.
[0057] Step S14: For each transmission path, send the data allocated to the transmission path and the address of the data to the second network device through a first data packet. The address is used to enable the second network device to write the corresponding data into memory according to the address.
[0058] In this step, the RDMA network card of the first network device encapsulates the protocol header to generate a first data packet carrying data and its address. The frame format of the first data packet is as follows: Figure 5 As shown, from the outside in and from the bottom layer to the top, the header fields are: Ethernet header, IP (Internet Protocol) header, UDP (User Datagram Protocol) header, RDMA transport protocol header, application data, and Ethernet trailer. The UDP header field carries the UDP port number. Figure 4 Four transmission paths are shown, so four different UDP port numbers are filled in the UDP header field; the IP header field can include the IP address and Ethernet frame field; the RDMA transport protocol header field includes a 3-byte (24-bit) PSN and an 8-byte (64-bit) address. In the RDMA transport protocol, the PSN field value is incremented by 1 each time the sender transmits a data packet. After the first network device's RDMA network card encapsulates the packet according to the above frame format, it sends the encapsulated first data packet to the second network device through the network.
[0059] During data transmission, due to different UDP port numbers, the switch distributes data to different transmission paths during ECMP routing, thus achieving multipath transmission and ultimately reaching the receiving end. Because of the different transmission paths, the packets arrive at the receiving end's second network device out of order. The second network device can write the corresponding data into its memory based on the address, thereby ensuring data order.
[0060] The data transmission method provided in this disclosure, applied to a first network device, includes: reading data from memory according to the data's storage order and storing the data locally; assigning addresses to the data, where each address represents the data's reading order; assigning each piece of data to one of at least two transmission paths; and for each transmission path, sending the data assigned to the transmission path and its address to a second network device via a first data packet, where the address enables the second network device to write the corresponding data into memory based on the address. This disclosure eliminates the need for data order preservation and reordering, avoiding the significant consumption of computing and storage resources associated with such reordering, enabling cost-free multi-path data transmission, supporting data center traffic engineering, reducing network congestion, lowering network latency, and thus improving network bandwidth.
[0061] In some embodiments, allocating addresses for the data (i.e., step S12) includes the following steps: allocating consecutive addresses for the data. Allocating consecutive addresses for the data facilitates the receiving end (second network device) in storing the data in memory, thereby improving data read and write efficiency.
[0062] In some embodiments, the address is a virtual address starting from 0. This eliminates the need for address negotiation between the sending end (i.e., the first network device) and the receiving end (i.e., the second network device), thereby reducing network signaling interaction and accelerating the communication link establishment process.
[0063] In some embodiments, when addresses start from 0, the addresses of each data item are incremented according to the order in which the data is read. That is, the RDMA network card of the first network device reads data from memory first and is assigned a smaller address; the RDMA network card of the first network device reads data from memory later and is assigned a larger address. Figure 4 As shown, the reading order of the four data points from first to last is: PSN1 <0> PSN2 <0> PSN3 <0> PSN1 <1> Correspondingly, the addresses allocated to these four data points are: Addr <0> Addr <1> Addr <2> Addr <3> That is, the addresses of each data item increment.
[0064] In some embodiments, the address is a circular queue address, meaning that the address allocated to the data is a circular address, and the address is refreshed in a circular fashion, reordering from the starting address after each circle. This circular queue address is the circular queue address of the memory of the second network device, and the second network device writes data into the circular queue in memory according to this circular queue address. In this embodiment of the disclosure, the memory of the first network device also uses a circular queue to store data, and data is read from the circular queue in memory and stored in the RDMA network card.
[0065] In traditional RDMA-based data transmission, when a packet is lost or a checksum error occurs—for example, if the receiver receives a packet with PSN=n first, followed by packets with PSN=n+2 and later—the receiver will wait for the packet with PSN=n+1 to arrive before writing data to memory sequentially to ensure data order. If no packet with PSN=n+1 is received within a time window, the previously received packets with PSN=n+2 and subsequent packets will be discarded, and the sender will be notified to retransmit starting from the packet with PSN=n+1. However, because RDMA network cards have very small storage space, typically in the *MB range, and a small buffer time window, a large number of packet retransmissions are prone to occur, reducing bandwidth utilization.
[0066] To address the aforementioned issues with message retransmission, in some embodiments, such as... Figure 6As shown, after sending the data allocated to the transmission path and the address of the data to the second network device via a first data packet for each transmission path (i.e., step S14), the data transmission method further includes the following steps:
[0067] Step S15: Upon receiving a retransmission request message from the second network device, obtain the address of the retransmission data carried in the retransmission request message.
[0068] Step S16: Determine the retransmitted data based on the address of the retransmitted data.
[0069] Since an address has already been assigned to the read data in step 12, in this step, after obtaining the address of the retransmission data, the data corresponding to the retransmission address can be determined. This data is the retransmission data, which is the data that needs to be resent to the second network device.
[0070] Step S17: Send the retransmitted data and the address of the retransmitted data to the second network device via the second data packet.
[0071] As can be seen from steps S15-S17, this embodiment of the present disclosure performs targeted retransmission of specific data, such as lost data or data with verification errors, i.e., selective and precise retransmission of data, which can improve bandwidth utilization. Moreover, in the event of data reception anomalies, the receiving end does not need to wait for previously unreceived packets within the current time window, which can further reduce network latency.
[0072] In some embodiments, such as Figure 7 As shown, after allocating each piece of data to one of at least two transmission paths (i.e., step 13), and before sending the data allocated to the transmission path and the address of the data to the second network device via a first data packet for each transmission path (i.e., step 14), the data transmission method further includes the following steps:
[0073] Step S14': For each transmission path, allocate a PSN to the data assigned to the transmission path to form a PSN sequence for the transmission path; wherein, in the PSN sequence of a transmission path, the PSNs are incremented according to the allocation order of the PSNs from first to last.
[0074] A separate PSN sequence is maintained for each transmission path, and the PSN sequences for different transmission paths are independent of each other. Within a PSN sequence, the PSNs allocated earlier are smaller, and the PSNs allocated later are larger. For example... Figure 4As shown, there are three transmission paths: path1, path2, and path3. The corresponding PSN sequences for the three transmission paths are: PSN1<>, PSN2<>, and PSN3<>, respectively. Each PSN sequence consists of multiple PSNs, and each PSN corresponds to a piece of data transmitted on the corresponding transmission path. Figure 4 As shown, there are a total of 4 data points: PSN1 <0> PSN2 <0> PSN3 <0> PSN1 <1> Among them, PSN1 is transmitted on path1. <0> and PSN1 <1> PSN2 is transmitted on path2. <0> PSN3 is transmitted on path3. <0> The address allocated for the above four data items is: Addr <0> Addr <1> Addr <2> Addr <3> Assign transmission paths to the above four data items: Addr <0> Transmitted on path1, corresponding to the PSN sequence PSN1<>; Addr <1> Transmitted on path2, corresponding to the PSN sequence PSN2<>; Addr <2> Transmitted on path3, corresponding to the PSN sequence PSN3<>; Addr <3> Transmitting on path1, corresponding to the PSN sequence PSN1<>. For each transmission path, assign a PSN to the data in its PSN sequence. Assuming all PSNs start from 0, then it is Addr. <0> The corresponding data is assigned a PSN of 0, resulting in PSN1. <0> ; for Addr <1> The corresponding data is assigned a PSN of 0, resulting in PSN2. <0> ; for Addr <2> The corresponding data is assigned a PSN of 0, resulting in PSN3. <0> ; for Addr <3> The corresponding data is assigned a PSN of 1, resulting in PSN1. <1> .
[0075] In this embodiment of the disclosure, the data can be transmitted in the form of block data transmission or byte stream transmission.
[0076] In block data transmission, the application (APP) can guarantee the order of addresses. The transport layer RDMA removes the PSN counting and order preservation operation, that is, it identifies the characteristics of the application data and transmits the block data. It should be noted that block data transmission does not conflict with the data transmission scheme of this disclosure that stores data according to addresses to achieve order preservation. That is, in the process of implementing data transmission, data can be transmitted in the form of block data.
[0077] In byte stream transmission, the data is a continuous, sequential string, unstructured, and without address location information. The address in the message is defined as the address of the QP cache queue. The RDMA network card of the second network device maps the addresses, providing the peer with a memory space starting from 0 and with contiguous addresses. The messages sent by the first network device carry addresses, which are sequentially incremented. The second network device receives messages out of order from multiple transmission paths, writes data directly to memory based on the addresses carried in the messages, and if packet loss is detected, it feeds back the addresses of the missing messages to the first network device. The first network device only retransmits messages with those addresses, achieving selective and precise retransmission of data. It should be noted that in RDMA-based multi-transmission path scenarios, if byte stream transmission is used, the above-described scheme of this disclosure must be adopted to ensure order preservation. The continuity of addresses can be guaranteed by the application (APP) or by the RDMA NIC; the appropriate implementation method can be selected based on the characteristics of the application data.
[0078] This disclosure also provides a data transmission method, wherein the method applies a second network device, such as... Figure 8 As shown, the method includes the following steps:
[0079] Step S21: Receive the first data packet sent by the first network device through at least two transmission paths.
[0080] In this step, the RDMA network card of the second network device receives the first data packets sent by the first network device through multiple transmission paths via the network. The received packets are out of order.
[0081] Step S22: Obtain the data and the address of the data carried in the first data packet; the data is read from memory by the first network device according to the storage order of the data, and the address indicates the reading order of the data.
[0082] In this step, the RDMA network card of the second network device performs a series of operations on the first data packet, including decapsulating the protocol header, removing the Ethernet frame field, removing the IP field, and restoring the UDP port number (i.e., the application-specified port number determined during the negotiation phase), to obtain the data carried in the packet and the address of that data.
[0083] Step S23: Write the corresponding data into memory according to the address.
[0084] In this step, the second network device's RDMA network card performs RDMA protocol processing, writing data to the circular queue in memory via DMA. The write pointer indicates the address of the data. The second network device does not need to wait; it retrieves the address carried in each arriving data packet and writes the corresponding data into memory based on that address. In other words, the data is not written to memory sequentially.
[0085] The data transmission method provided in this disclosure, applied to a second network device, includes: receiving a first data packet sent by a first network device through at least two transmission paths; obtaining data and the address of the data carried in the first data packet; the data being read from memory by the first network device according to the data's storage order, with the address indicating the data's reading order; and writing the corresponding data into memory according to the address. This disclosure eliminates the need for data order preservation and reordering, avoiding the significant consumption of computing and storage resources associated with such reordering. It enables cost-free multi-path data transmission, supports data center traffic engineering, reduces network congestion, lowers network latency, and thus improves network bandwidth.
[0086] In some embodiments, the addresses are consecutive addresses.
[0087] In some embodiments, the address is a virtual address starting from 0, and the address of each data item increments according to the order in which the first network device reads data from memory.
[0088] In some embodiments, writing the corresponding data to memory according to the address (i.e., step S23) includes the following steps: writing the corresponding data to a circular queue in memory according to the address. Since the address allocated to the data by the first network device is the address of the circular queue, in this step, data can be directly written to the circular queue in memory according to the address.
[0089] It should be noted that after the data is written to memory, the data transmission method further includes the following steps: the APP application reads data from the circular queue in memory according to the read pointer. After reading data from each address, the read pointer is incremented by 1, that is, the data is read in the storage order.
[0090] In some embodiments, such as Figure 9 As shown, after receiving the first data packet sent by the first network device through at least two transmission paths (i.e., step S21), the data transmission method further includes the following steps:
[0091] Step S31: In the event of an abnormal reception of the first data packet, determine the address for retransmitting the data.
[0092] The first data packet reception anomaly includes: failure to receive the first data packet within a preset time period, or a received first data packet verification error.
[0093] In this step, when the RDMA network card of the second network device detects an abnormality in the reception of the first data packet, it determines the data with the abnormal transmission and its address. This abnormally transmitted data is the retransmitted data. If the first data packet at a certain address is not received within a timeout period, or if the first data packet is received but an error occurs during the Layer 3 protocol processing of the IP packet CRC (Cyclic Redundancy Check), the first data packet is discarded, indicating an abnormality in the reception of the first data packet. In this case, the data carried in the first data packet needs to be retransmitted, and this data is the retransmitted data.
[0094] Step S32: Send a retransmission request message carrying the address of the retransmitted data to the first network device.
[0095] Step S33: Receive the second data packet sent by the first network device, and obtain the retransmission data and the address of the retransmission data carried in the second data packet.
[0096] The second data packet is sent by the first network device after determining the corresponding data based on the address of the retransmitted data.
[0097] Step S34: Write the retransmitted data into memory according to the address of the retransmitted data.
[0098] In this step, the RDMA network card of the second network device performs RDMA protocol processing and writes retransmission data to the circular queue in memory via DMA.
[0099] As can be seen from steps S31-S34, this embodiment of the present disclosure performs targeted retransmission of specific data, such as lost data or data with verification errors, i.e., selective and precise data retransmission, which can improve bandwidth utilization. Moreover, in the event of data reception anomalies, the receiving end does not need to wait for previously unreceived packets within the current time window, which can further reduce network latency.
[0100] RDMA is a memory-operated transport protocol that writes / reads data to / from a given address. Based on this feature, this disclosure implements out-of-order reception of data packets from multiple transmission paths by designing addresses to maintain order, and writes data to memory according to the address to achieve order preservation. This avoids the significant reliance on and consumption of computing and storage resources by existing solutions that rely on PSN calculations for reordering. This disclosure utilizes the characteristic that RDMA data packets carry data addresses, and uses the continuity of addresses to achieve order preservation. It should be noted that transport protocols such as TCP and QUIC (Quick UDP Internet Connection, a low-latency internet transport layer protocol based on UDP) transmit meaningless string streams without addresses, therefore the solution of this disclosure cannot be applied.
[0101] The RDMA transmission protocol supports multi-path data transmission. The embodiments of this disclosure can be applied in various scenarios using the RDMA transmission protocol, especially suitable for scenarios requiring high bandwidth, experiencing traffic bursts, or demanding high reliability. The embodiments of this disclosure are based on multi-path transmission, providing a foundation for many other technologies, such as real-time communication AR / VR / XR video communication services employing multi-path transmission, and combining this with network error correction codes.
[0102] To clearly describe the solutions of the embodiments of this disclosure, the following is combined with... Figure 10 and Figure 11 This paper provides a detailed explanation of the data transmission process through a specific example of a scenario involving the transmission of video data via multiple transmission paths and error correction coding.
[0103] Because video data has a large throughput and requires real-time processing, multipath technology can be used to aggregate bandwidth and avoid congestion. Combined with network error correction coding, reliability can be improved; if one transmission fails, it can be recovered without retransmission, further ensuring real-time performance.
[0104] Existing network error correction coding, taking UlpFEC (Uneven Level Protection Forward Error Correction) in the most common RTP (Real-time Transport Protocol) as an example, requires coordinating calculations before and after the error. A set of M packets is XORed to generate N (N is the FEC redundancy) FEC packets, which are then packaged and sent out. Any N packets dropped from this set can be recovered using (MN) packets plus the FEC redundancy packets. For example... Figure 10 As shown, D represents media packets, with a quantity of M=4, and R represents redundant packets. Figure 10 The redundancy shown is 2, i.e., N = 2.
[0105] Existing network error correction coding suffers from the following problems: In network transmission, congestion at a switch or routing failure healing along a path can take a long time, typically on the order of seconds. Therefore, packet loss often affects not just one packet, but packets within a certain timeframe. At a 10GE line speed and with each packet being 1KB, this translates to 1 million packets per second. Error correction coding, on the other hand, performs an XOR operation on consecutive data packets, resulting in redundancy at most on the order of K, a difference of three orders of magnitude. Therefore, error correction coding often fails, which is the main reason why it hasn't been widely adopted.
[0106] Multi-path data transmission creates the conditions for error correction coding. If a transmission path fails, resulting in a series of message errors and losses, the outcome is the same as single-path transmission. However, through array coding, messages are striped and distributed to different transmission paths. Data from one transmission path can be recovered by data verification from other transmission paths, and consecutive errors in messages on one transmission path will not lead to data transmission failure. Moreover, the coding does not require complex calculations involving sequential relationships; it can be implemented using simple coding methods, such as RAID 5 (distributed parity check independent disk structure), which reduces computational complexity, bandwidth consumption, and latency.
[0107] The encoding module first divides the data to be transmitted into n data segments and generates one checksum based on the checksum algorithm. The transmission module, following the method described above, distributes the data to n+1 transmission paths for transmission. The receiving end receives data from each transmission path and concatenates them into a single data frame.
[0108] Taking a simple RAID 5 parity algorithm as an example: P = D1 xor D2 xor D3…xor Dn, where D1, D2, D3…Dn are data blocks, P is the parity block, and xor is the XOR operation. If data is lost or corrupted in a transmission path (which can be determined through CRC checks in IP packets, Layer 4 TCP, and RDMA transmission protocol verification mechanisms), the lost or corrupted data can be recovered.
[0109] The following combination Figure 6 The process of combining multiple transmission paths with error correction coding is illustrated using n=3 as an example. Figure 6 As shown, at the sending end, the application layer data stream is formed into a 3KB byte stream with each data bit width. The network card stripes the data and generates check data, where A, B, C... represent data streams.
[0110] The data packet is sent via the sending module. Figure 5 The Ethernet frame format shown is sent into the network, with each packet carrying 1KB of payload data. Data is transmitted through four transmission paths (path1-path4) in the network. Assume that transmission path 2 fails, resulting in the consecutive loss of packets B2 and Cp.
[0111] When the network interface card (NIC) at the receiving end receives out-of-order data packets, the NIC does not need to perform excessive buffering or sorting. Instead, it sends the packets to the host's decoding module. The decoding module can recover the data through calculations, for example, A = A1 + A2 + A3, B = B1 + B2 + B3, ... After the data is recovered, it is stored in memory according to its address.
[0112] Based on the same technical concept, this disclosure also provides a network device, which is a first network device, such as... Figure 12 As shown, the network device includes a data reading module 101, an address allocation module 102, a path allocation module 103, and a data transmission module 104. The data reading module 101 is used to read data from memory according to the data storage order and store the data locally.
[0113] The address allocation module 102 is used to allocate addresses to data, where the address indicates the order in which the data is read.
[0114] The path allocation module 103 is used to assign each piece of data to one of at least two transmission paths.
[0115] The data transmission module 104 is used to send the data allocated to the transmission path and the address of the data to the second network device through a first data packet for each transmission path. The address is used to enable the second network device to write the corresponding data into memory according to the address.
[0116] In some embodiments, the address allocation module 102 is used to allocate consecutive addresses to data.
[0117] In some embodiments, the address is a virtual address starting from 0, and the address of each data item increments according to the order in which the data is read.
[0118] In some embodiments, the address is a circular queue address.
[0119] In some embodiments, such as Figure 13 As shown, the network device further includes a data retransmission module 105. The data retransmission module 105 is used to, after sending the data allocated to the transmission path and the address of the data to the second network device via a first data packet for each transmission path, obtain the address of the retransmission data carried in the retransmission request packet when receiving a retransmission request packet sent by the second network device; determine the retransmission data based on the address of the retransmission data; and send the retransmission data and the address of the retransmission data to the second network device via a second data packet.
[0120] In some embodiments, such as Figure 14 As shown, the network device further includes a PSN allocation module 106. The PSN allocation module 106 is used to allocate a packet sequence number (PSN) to the data allocated to the transmission path for each transmission path after allocating each data to one of at least two transmission paths, and before sending the data allocated to the transmission path and the address of the data to the second network device via a first data packet for each transmission path, to form a PSN sequence for the transmission path; wherein, in the PSN sequence of a transmission path, the PSNs are incremented according to the allocation order of the PSNs from first to last.
[0121] Based on the same technical concept, this disclosure also provides a network device, which is a second network device, such as... Figure 15 As shown, the network device includes a data transmission module 201, a data acquisition module 202, and a data writing module 203. The data transmission module 201 is used to receive a first data packet sent by the first network device through at least two transmission paths.
[0122] The data acquisition module 202 is used to acquire the data and the address of the data carried in the first data packet; the data is read from memory by the first network device according to the storage order of the data, and the address indicates the reading order of the data.
[0123] The data writing module 203 is used to write the corresponding data into memory according to the address.
[0124] In some embodiments, the addresses are consecutive addresses.
[0125] In some embodiments, the address is a virtual address starting from 0, and the address of each data item increments according to the order in which the first network device reads data from memory.
[0126] In some embodiments, the data writing module 203 is used to write the corresponding data into a circular queue in memory according to the address.
[0127] In some embodiments, such as Figure 16 As shown, the network device further includes a data retransmission module 204, which is used to determine the address for retransmitting data in the event of an abnormal reception of the first data packet after receiving the first data packet sent by the first network device through at least two transmission paths.
[0128] The data transmission module 201 is also used to send a retransmission request message carrying the address of the retransmission data to the first network device; and to receive a second data message sent by the first network device.
[0129] The data acquisition module 202 is also used to acquire the retransmission data and the address of the retransmission data carried in the second data packet.
[0130] The data writing module 203 is also used to write retransmitted data into memory according to the address of the retransmitted data.
[0131] This disclosure also provides a computer device, which includes one or more processors and a storage device; wherein the storage device stores one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the data transmission method provided in the foregoing embodiments.
[0132] This disclosure also provides a computer-readable medium having a computer program stored thereon, wherein the computer program, when executed, implements the data transmission method provided in the foregoing embodiments.
[0133] It will be understood by those skilled in the art that all or some of the steps in the methods disclosed above, and the functional modules / units in the apparatus, can be implemented as software, firmware, hardware, and suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0134] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in conjunction with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in conjunction with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of the invention as set forth in the appended claims.
Claims
1. A data transmission method applied to a first network device, the method comprising: Data is read from memory according to the data storage order and stored locally; Assign an address to the data, where the address indicates the order in which the data is read; Each of the data is assigned to one of at least two transmission paths; For each transmission path, a first data packet is sent to the second network device, along with the data allocated to that transmission path and the address of that data. The address is used to enable the second network device to write the corresponding data into memory based on the address.
2. The method as described in claim 1, characterized in that, Assigning an address to the data includes: assigning consecutive addresses to the data.
3. The method as described in claim 2, characterized in that, The address is a virtual address starting from 0, and the address of each piece of data increases sequentially according to the order in which the data is read.
4. The method as described in claim 2, characterized in that, The address is a circular queue address.
5. The method as described in claim 1, characterized in that, After sending the data allocated to the transmission path and the address of the data to the second network device via a first data packet for each of the transmission paths, the method further includes: Upon receiving a retransmission request message sent by the second network device, obtain the address of the retransmission data carried in the retransmission request message; The retransmitted data is determined based on the address of the retransmitted data; The retransmitted data and the address of the retransmitted data are sent to the second network device via a second data packet.
6. The method according to any one of claims 1-5, characterized in that, After allocating each of the data to one of at least two transmission paths, and before sending the data allocated to the transmission path and the address of the data to the second network device via a first data packet for each of the transmission paths, the method further includes: For each transmission path, a packet sequence number (PSN) is assigned to the data allocated to the transmission path to form a PSN sequence for the transmission path; wherein, in the PSN sequence of a transmission path, the PSNs are incremented according to the allocation order of the PSNs from first to last.
7. A data transmission method applied to a second network device, the method comprising: The first data packet sent by the first network device is received through at least two transmission paths; Obtain the data carried in the first data packet and the address of the data; wherein the data is read from memory by the first network device according to the data storage order, and the address indicates the reading order of the data; The corresponding data is written into memory according to the address.
8. The method as described in claim 7, characterized in that, The addresses are consecutive addresses.
9. The method as described in claim 8, characterized in that, The address is a virtual address starting from 0, and the address of each data item increments according to the order in which the first network device reads the data from memory.
10. The method as described in claim 8, characterized in that, The step of writing the corresponding data into memory according to the address includes: The corresponding data is written into a circular queue in memory based on the address.
11. The method according to any one of claims 7-10, characterized in that, After receiving the first data packet sent by the first network device through at least two transmission paths, the method further includes: In the event of an abnormal reception of the first data packet, determine the address for retransmitting the data; Send a retransmission request message carrying the address of the retransmitted data to the first network device; Receive a second data packet sent by the first network device, and obtain the retransmission data and the address of the retransmission data carried in the second data packet; The retransmitted data is written into the memory according to the address of the retransmitted data.
12. A network device, the network device being a first network device, comprising a data reading module, an address allocation module, a path allocation module, and a data transmission module, wherein the data reading module is configured to read data from memory according to the data storage order and store the data locally; The address allocation module is used to allocate an address to the data, where the address indicates the reading order of the data. The path allocation module is used to assign each of the data to one of at least two transmission paths; The data transmission module is used to send, for each transmission path, the data allocated to the transmission path and the address of the data to the second network device via a first data packet. The address is used to enable the second network device to write the corresponding data into memory according to the address.
13. A network device, wherein the network device is a second network device, comprising a data transmission module, a data acquisition module, and a data writing module, wherein the data transmission module is configured to receive a first data packet sent by a first network device through at least two transmission paths; The data acquisition module is used to acquire the data carried in the first data packet and the address of the data; the data is read from memory by the first network device according to the data storage order, and the address indicates the reading order of the data; The data writing module is used to write the corresponding data into memory according to the address.
14. A computer device, comprising: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the data transmission method as described in any one of claims 1-11.
15. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed, it implements the data transmission method as described in any one of claims 1-11.
Citation Information
Patent Citations
Multipath RDMA transmission
CN109936510A
Handling transport layer operations received out of order
US20150172226A1