A packet loss recovery method, a receiving end device, a sending end device and a storage medium

By recovering lost data packets in real time by the receiving device, the problems of latency and resource consumption in RDMA transmission are solved, and efficient packet loss recovery and resource utilization are achieved.

CN118802069BActive Publication Date: 2025-11-07CHINA MOBILE COMM LTD RES INST +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410382582.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2025-11-07
Estimated Expiration
2044-03-29

AI Technical Summary

Technical Problem

In a wide area network environment, RDMA transmission technology suffers from packet loss recovery latency, which consumes additional CPU resources and RDMA network card hardware resources, resulting in reduced resource utilization.

Method used

The receiving device receives m data packets and r redundant repair data packets, determines r first target decoding values ​​based on the m data packets, and performs real-time recovery processing using the r redundant repair data packets and r first target decoding values ​​to avoid retransmission requests and reduce CPU involvement and the use of QP queue pairs.

Benefits of technology

It enables real-time packet loss recovery, saves CPU resources, reduces the use of RDMA network card hardware resources, and improves resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802069B_ABST
    Figure CN118802069B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a packet loss recovery method, a receiving end device, a sending end device and a storage medium. The method is applied to the receiving end device, and includes: the receiving end device receiving m data packets and r redundancy repair data packets sent by the sending end device; wherein m and r are positive integers; in a case where it is determined based on the m data packets that there is a packet loss, determining r first target decoding values based on the m data packets; and performing recovery processing based on the r redundancy repair data packets and the r first target decoding values to obtain the lost data packet, without the receiving end device requesting the sending end device to perform retransmission of the lost data packet after detecting the data packet loss, so that real-time packet loss recovery can be performed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of transmission and bearing, and in particular to a packet loss recovery method, a receiving end device, a sending end device and a storage medium. BACKGROUND

[0002] Remote Direct Memory Access (RDMA) is a technology that accesses data in the memory of a remote host by bypassing the kernel of the operating system. Unlike the traditional Transmission Control Protocol / Internet Protocol (TCP / IP) software and hardware architecture, which involves multiple kernel copies, system interrupts and context switching, RDMA eliminates the copying process of data to the operating system buffer through an RDMA network card and directly transmits data between application memories. At present, the demand for high-performance data transmission in a wide area network (WAN) scenario is increasingly widespread. In a WAN environment, data packet loss caused by traffic congestion and other reasons makes the RDMA transmission technology unable to be efficiently deployed and applied. Therefore, it is necessary to study real-time packet loss recovery technology in the RDMA transmission process in a WAN environment to avoid the loss of RDMA transmission performance caused by data packet loss.

[0003] An RDMA network data transmission method based on erasure coding reduces transmission latency through fine-grained transmission and multi-path parallel transmission. However, this method has the following disadvantages in the WAN RDMA transmission scenario: (1) The receiving end only notifies the sending end to perform erasure coding and check block transmission after discovering that the RDMA transmission sends a packet loss. The receiving end must wait for the check block requested by it to be completely received before it can recover the lost RDMA data packet, resulting in a large additional transmission latency; (2) The judgment of packet loss, the encoding of data and the decoding of data all require the continuous participation of the CPU in control, occupying a large amount of CPU time and causing additional CPU burden; (3) The transmission of redundant data must use an additional Queue Pair (QP) queue, thus requiring more RDMA network card hardware resources and reducing resource utilization. In summary, the RDMA network data transmission method has a latency problem when recovering packet loss, and consumes additional CPU resources and RDMA network card hardware resources, thereby reducing resource utilization. SUMMARY

[0004] The embodiments of the present application provide a packet loss recovery method, a receiving end device, a sending end device and a storage medium, which can perform real-time packet loss recovery without consuming additional CPU resources and RDMA network card hardware resources, thereby improving resource utilization.

[0005] The technical scheme of the embodiment of the present application is implemented as follows:

[0006] In a first aspect, the embodiment of the present application provides a packet loss recovery method, which is applied to a receiving end device, and the method comprises the following steps:

[0007] m data packets and r redundant repair data packets sent by a sending end device are received; wherein m and r are positive integers;

[0008] in a case where it is determined that there is packet loss based on the m data packets, r first target decoding values are determined based on the m data packets;

[0009] recovery processing is performed based on the r redundant repair data packets and the r first target decoding values, so that lost data packets are obtained.

[0010] In a second aspect, the embodiment of the present application provides a packet loss recovery method, which is applied to a sending end device, and the method comprises the following steps:

[0011] s original data packets sent by an RDMA protocol stack module are received, and grouping processing is performed on the s original data packets, so that q original data packet groups are obtained; wherein the q original data packet groups respectively comprise m data packets, and s, m and q are positive integers;

[0012] r redundant repair data packets corresponding to the m data packets are determined based on the m data packets; wherein r is a positive integer;

[0013] the m data packets and the corresponding r redundant repair data packets are respectively sent to a receiving end device, so that the receiving end device performs packet loss recovery processing based on the m data packets and the corresponding r redundant repair data packets, and lost data packets are obtained.

[0014] In a third aspect, the embodiment of the present application provides a receiving end device, which comprises an identification and recovery module,

[0015] the identification and recovery module is configured to receive m data packets and r redundant repair data packets sent by a sending end device; wherein m and r are positive integers; the identification and recovery module is further configured to determine r first target decoding values based on the m data packets in a case where it is determined that there is packet loss based on the m data packets; and the identification and recovery module is further configured to perform recovery processing based on the r redundant repair data packets and the r first target decoding values, so that lost data packets are obtained.

[0016] In a fourth aspect, the embodiment of the present application provides a receiving end device, which comprises a first processor and a first memory; wherein

[0017] the first memory is configured to store a computer program capable of running on the processor;

[0018] The first processor is configured to execute the packet loss recovery method as described above when the computer program is running.

[0019] In a fifth aspect, an embodiment of the present application provides a sending-end device, the sending-end device comprising: a redundancy generation module,

[0020] The redundancy generation module is configured to receive s original data packets sent by a remote direct memory access (RDMA) protocol stack module, and perform grouping processing on the s original data packets to obtain q original data packet groups; wherein each of the q original data packet groups comprises m data packets, and s, m, and q are positive integers; the redundancy generation module is further configured to determine r redundancy repair data packets corresponding to the m data packets based on the m data packets; wherein r is a positive integer; and the redundancy generation module is further configured to send the m data packets and the r redundancy repair data packets corresponding thereto to a receiving-end device, so that the receiving-end device performs packet loss recovery processing based on the m data packets and the r redundancy repair data packets corresponding thereto to obtain lost data packets.

[0021] In a sixth aspect, an embodiment of the present application provides a sending-end device, the sending-end device comprising: a second processor and a second memory; wherein

[0022] The second memory is configured to store a computer program capable of running on the processor.

[0023] The second processor is configured to execute the packet loss recovery method as described above when the computer program is running.

[0024] In a seventh aspect, an embodiment of the present application provides a computer readable storage medium, characterized in that the storage medium stores computer program code, and when the computer program code is executed by a computer, the packet loss recovery method as described above is implemented.

[0025] In an eighth aspect, an embodiment of the present application provides a computer program product, comprising a computer program, characterized in that the computer program, when executed by a processor, implements the packet loss recovery method as described above.

[0026] This application provides a packet loss recovery method, a receiving device, a sending device, and a storage medium. The receiving device receives m data packets and r redundant repair data packets sent by the sending device, where m and r are both positive integers. If packet loss is determined based on the m data packets, r first target decoding values ​​are determined based on the m data packets. Recovery processing is performed based on the r redundant repair data packets and the r first target decoding values ​​to obtain the lost data packets. The sending device receives s raw data packets sent by an RDMA protocol stack module and groups the s raw data packets to obtain q raw data packet groups, where each q raw data packet group includes m data packets, and s, m, and q are all positive integers. R corresponding redundant repair data packets are determined based on the m data packets, where r is a positive integer. The m data packets and the corresponding r redundant repair data packets are sent to the receiving device, so that the receiving device performs packet loss recovery processing based on the m data packets and the corresponding r redundant repair data packets to obtain the lost data packets. Therefore, the receiving device can simultaneously receive m data packets and r redundant repair data packets. If packet loss is detected, recovery processing can be performed based on the r redundant repair data packets and r first target decoding values ​​to obtain the lost data packets. This enables real-time packet loss recovery without requiring the receiving device to request retransmission of lost data packets after detection, thus avoiding latency issues. Furthermore, this application can determine the r first target decoding values ​​based on the m data packets, and then perform recovery processing based on the r redundant repair data packets and r first target decoding values ​​without CPU involvement, saving valuable CPU resources. Since the receiving device receives the m data packets and r redundant repair data packets simultaneously, there is no need to introduce new QP queue pairs, thereby reducing the use of RDMA network card hardware resources and improving resource utilization. Attached Figure Description

[0027] Figure 1 This is a schematic diagram of the packet loss recovery method proposed in the embodiments of this application. Figure One ;

[0028] Figure 2 This is a schematic diagram of the packet loss recovery method proposed in the embodiments of this application. Figure Two ;

[0029] Figure 3 This is a schematic diagram of the packet loss recovery method proposed in the embodiments of this application. Figure Three ;

[0030] Figure 4 This is a schematic diagram of the redundant repair data packet structure proposed in an embodiment of this application;

[0031] Figure 5 This is a schematic diagram of the packet loss recovery method proposed in the embodiments of this application.Figure Four ;

[0032] Figure 6 The working flow diagram of the WAN RDMA real-time packet loss recovery technology based on forward error correction proposed by the embodiment of the application is shown in the figure.

[0033] Figure 7 The structure diagram of the forward error correction redundancy generation module proposed by the embodiment of the application is shown in the figure.

[0034] Figure 8 The structure diagram of the packet loss identification and recovery module of the receiving end proposed by the embodiment of the application is shown in the figure.

[0035] Figure 9 The switching condition diagram between the three states proposed by the embodiment of the application is shown in the figure.

[0036] Figure 10 The composition structure diagram of the receiving end device proposed by the embodiment of the application is shown in the figure Figure One ;

[0037] Figure 11 The composition structure diagram of the receiving end device proposed by the embodiment of the application is shown in the figure Figure Two ;

[0038] Figure 12 The composition structure diagram of the sending end device proposed by the embodiment of the application is shown in the figure Figure One ;

[0039] Figure 13 The composition structure diagram of the sending end device proposed by the embodiment of the application is shown in the figure Figure Two . DETAILED DESCRIPTION

[0040] The technical solutions in the embodiments of the application will be clearly and completely described in conjunction with the drawings in the embodiments of the application. It can be understood that the specific embodiments described herein are only used to explain the related application, and not to limit the application. In addition, it should be noted that, in order to facilitate description, only the parts related to the application are shown in the drawings.

[0041] Remote Direct Memory Access (RDMA) is a technology that bypasses the operating system kernel of a remote host to access data in its memory. Unlike the traditional TCP / IP software and hardware architecture, which involves multiple kernel copies, system interrupts and context switching, RDMA eliminates the data copy process to the operating system buffer through the RDMA network card, directly transmits data between application memories, thereby saving a large amount of CPU resources, improving the system throughput and reducing the system network communication delay.

[0042] Due to the hardware resource limitation of the RDMA network card, the RDMA protocol uses a Go-Back-N (GBN) retransmission mechanism to cope with the data packet loss, and the data packet loss will cause a rapid decline in the RDMA transmission performance. At present, the demand for high-performance data transmission in a wide area network scenario is becoming more and more widespread. In a wide area network environment, the data packet loss caused by traffic congestion and other reasons makes the RDMA transmission technology cannot be efficiently deployed and applied. Therefore, it is necessary to study the real-time packet loss recovery technology in the RDMA transmission process in the wide area network environment to avoid the performance loss of the RDMA transmission caused by the data packet loss.

[0043] In the case of potential data loss in the communication channel, it is widely recognized that introducing moderate data redundancy through forward error correction (FEC) is an effective strategy, and packet-level FEC has become a common method to solve the adverse network conditions in packet switching networks. By performing forward error correction calculation on the original data packet, additional redundant repair data packets are generated and transmitted to the receiving end together with the original data packet. This enables the receiving end to restore the lost data packet through the received redundant repair data packet when the original data packet is lost in transmission, thereby avoiding the performance degradation problem caused by data packet loss.

[0044] The patent "RDMA network data transmission method based on erasure code" discloses that the transmission delay is reduced through fine-grained transmission and multi-path parallel transmission, and the long tail effect of network transmission is eliminated and the reordering operation of the receiving end is simplified by using erasure code, and the CPU computing overhead is reduced by using the erasure code hardware offload of the RDMA network card to calculate the erasure code. However, this method has the following disadvantages in the wide area network RDMA transmission scenario: (1) the receiving end only notifies the sending end to perform erasure code encoding and check block sending after discovering that the RDMA transmission sending packet is lost, and the receiving end must wait for the check block requested by it to be completely received before the lost RDMA data packet can be recovered, resulting in a large additional transmission delay; (2) the judgment of the lost packet, the encoding of the data and the decoding of the data all need the CPU to continuously participate in the control, occupying a large amount of CPU time and causing additional CPU burden; (3) the transmission of redundant data must use an additional Queue Pair (QP) queue, so more RDMA network card hardware resources are needed, reducing the resource utilization. In summary, the RDMA network data transmission method has a latency problem when recovering the lost packet, and consumes additional CPU resources and RDMA network card hardware resources, thereby reducing the resource utilization.

[0045] To solve the problem that the current packet loss recovery has time delay and consumes additional CPU resources and RDMA card hardware resources, thereby reducing the resource utilization, the embodiment of the present application provides a packet loss recovery method, a receiving end device, a sending end device and a storage medium. The receiving end device receives m data packets and r redundant repair data packets sent by the sending end device; wherein m and r are positive integers; in the case of determining that there is packet loss based on the m data packets, r first target decoding values are determined based on the m data packets; the r redundant repair data packets and the r first target decoding values are processed to obtain the lost data packet; the sending end device receives s original data packets sent by the RDMA protocol stack module, and groups the s original data packets to obtain q original data packet groups; wherein the q original data packet groups each include m data packets, and s, m and q are positive integers; the corresponding r redundant repair data packets are determined based on the m data packets; wherein r is a positive integer; the m data packets and the corresponding r redundant repair data packets are sent to the receiving end device, so that the receiving end device performs packet loss recovery processing based on the m data packets and the corresponding r redundant repair data packets to obtain the lost data packet. As can be seen, the receiving end device can simultaneously receive m data packets and r redundant repair data packets, and if it is detected that there is a packet loss, the r redundant repair data packets and the r first target decoding values can be processed to obtain the lost data packet, so that real-time packet loss recovery can be performed without the receiving end device requesting the sending end device to retransmit the lost data packet after detecting the data packet loss, thereby avoiding the time delay problem; and in the present application, the r first target decoding values can be determined based on the m data packets; then the r redundant repair data packets and the r first target decoding values can be processed without the CPU participating in the recovery processing, thereby saving valuable CPU resources, and since the m data packets and the r redundant repair data packets are simultaneously received by the receiving end device, a new QP queue is not needed, thereby reducing the use of RDMA card hardware resources, and thereby improving the resource utilization.

[0046] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application.

[0047] Embodiment one

[0048] The embodiment of the present application provides a packet loss recovery method, which is applied to a receiving end device, and the receiving end device can include an identification recovery module, Figure 1 The packet loss recovery method provided in the embodiment of the present application is shown Figure One As Figure 1 shown, the packet loss recovery method can include the following steps:

[0049] Step 101, receiving m data packets and r redundancy repair data packets sent by the sending end device; wherein m and r are positive integers.

[0050] In the embodiment of the present application, the receiving end device can receive m data packets and r redundancy repair data packets sent by the sending end device; wherein m and r are positive integers.

[0051] It should be noted that in the embodiment of the present application, the receiving end device can be a receiving end RDMA network card, and the type of the receiving end device is not limited in the present application.

[0052] It should be noted that in the embodiment of the present application, the newly added identification and recovery module works in the receiving end RDMA network card, so it will not increase the additional CPU burden, thereby saving the CPU resources.

[0053] It should be noted that in the embodiment of the present application, Figure 2 The packet loss recovery method proposed in the embodiment of the present application Figure Two As shown in Figure 2 After the receiving end device receives m data packets and r redundancy repair data packets sent by the sending end device, i.e. after step 101, the receiving end device can further include the following steps:

[0054] Step 104, in the case that the first preset field value in the m data packets is the first preset value, determining that the identity information corresponding to the m data packets is the redundancy repair data packet identity; in the case that the first preset field value in the m data packets is not the first preset value, determining that the identity information corresponding to the m data packets is the original data packet identity; in the case that the second preset field value in the r redundancy repair data packets is the first preset value, determining that the identity information corresponding to the r redundancy repair data packets is the redundancy repair data packet identity; in the case that the second preset field value in the r redundancy repair data packets is not the first preset value, determining that the identity information corresponding to the r redundancy repair data packets is the original data packet identity.

[0055] It should be noted that in the embodiment of the present application, the first preset field value can be the value of the RC_RDMA_REPAIR field, and the RC_RDMA_REPAIR field can be the field of the first 8 bits in the Repair Header header field in the data packet, and the size of the first preset field value is not limited in the present application.

[0056] It should be noted that in the embodiment of the present application, the first preset value can be 0x1F, and the size of the first preset value is not limited in the present application.

[0057] It should be noted that in the embodiments of the present application, the second preset field value can be the value of the RC_RDMA_REPAIR field, and the size of the second preset field value is not limited in the present application.

[0058] That is, in the embodiments of the present application, the identification and recovery module in the receiving end device can judge and distinguish the identity information of the m data packets and the r redundant repair data packets after receiving the m data packets and the r redundant repair data packets sent by the redundancy generation module in the sending end device, that is, the type of the received data packet can be judged according to the RC_RDMA_REPAIR field in the data packet header, that is, whether it is an original data packet or a redundant repair data packet.

[0059] It should be noted that in the embodiments of the present application, the identification and recovery module in the receiving end device can determine the packet sequence number (PSN) corresponding to the fth data packet in the m data packets; wherein f is a positive integer less than or equal to m; in the case that the PSN corresponding to the fth data packet is different from the preset PSN, it is determined that there is a packet loss behavior.

[0060] For example, in the embodiments of the present application, it is assumed that the identification and recovery module in the receiving end device determines that the PSN corresponding to the fth data packet in the m data packets is 60, and it is assumed that the preset PSN is 55, and the PSN corresponding to the fth data packet is different from the preset PSN, so it is considered that there is a packet loss behavior.

[0061] It should be noted that in the embodiments of the present application, in the case that the first data packet in the m data packets received by the identification and recovery module in the receiving end device is the first data packet of the current group, the state of the receiving end device can be determined as an ordered state; accordingly, in the case that there is a packet loss behavior in the m data packets, the state of the receiving end device can be updated to an unordered state; in the case that there is no packet loss behavior in the m data packets, the state of the receiving end device can be maintained as an ordered state.

[0062] For example, in the embodiments of the present application, it is assumed that 128 data packets are a group of data packets, and in the case that the first data packet in the 128 data packets received by the identification and recovery module in the receiving end device is the first data packet of the current group, that is, the first data packet in the new group, the state of the receiving end device can be determined as an ordered state, and if there is a packet loss behavior in the m data packets, the state of the receiving end device can be updated to an unordered state; in the case that there is no packet loss behavior in the m data packets, the state of the receiving end device can be maintained as an ordered state.

[0063] It should be noted that in the embodiments of the present application, the current state of the receiving end device is switched to the invalid state when the number of lost packets in the m data packets meets the first preset condition.

[0064] It should be noted that in the embodiments of the present application, the first preset condition can be that the number of lost packets is greater than r, and r is a positive integer, and the present application does not make specific limitation on the size of r.

[0065] It should be noted that in the embodiments of the present application, the r redundant repair data packets are discarded when the r redundant repair data packets meet the second preset condition.

[0066] It should be noted that in the embodiments of the present application, the second preset condition can include that the Source Start PSN field of the redundant repair data packet does not match the PSN field of the first original data packet of the current group of the receiving end, and / or that the receiving end device is in the invalid state (invalid state), and / or that the receiving end is in the unordered state but has received all k original data packets related to the generation of the redundant repair data packet, and / or that the receiving end is in the ordered state but the received redundant repair data packet is insufficient to recover the lost original data packet (the number of lost packets meets the first preset condition), and / or that the receiving end device is in the ordered state and has received all original data packets in the current group.

[0067] Step 102, determining r first target decoding values based on the m data packets when it is determined that there are lost packets based on the m data packets.

[0068] In the embodiments of the present application, the identification and recovery module in the receiving end device can determine r first target decoding values based on the m data packets when it is determined that there are lost packets based on the m data packets after receiving the m data packets and the r redundant repair data packets sent by the redundancy generation module in the sending end device.

[0069] It should be noted that in the embodiments of the present application, the identification and recovery module in the receiving end device can group the m data packets to determine r data packet groups when determining the r first target decoding values based on the m data packets, wherein each data packet group includes the i-th data packet, the i+r-th data packet, the i+2r-th data packet, …, the i+[(m / r)-1]r-th data packet in the m data packets, and i is an integer greater than or equal to 0 and less than or equal to r-1; and then the r first target decoding values can be determined based on the r data packet groups.

[0070] For example, in the embodiment of the present application, assuming that m is 128 and r is 8, the identification recovery module in the receiving end device can receive the first group of data sent by the redundancy generation module in the sending end device, i.e., 128 data packets and 8 redundancy repair data packets, and then can group the 128 data packets to determine 8 data packet groups, each of which includes the i-th data packet, the i+r-th data packet, the i+2r-th data packet,..., the i+[(m / r)-1]×r-th data packet in the 128 data packets, i being an integer greater than or equal to 0 and less than or equal to 7; assuming that i is 0, the first data packet group includes the 0-th data packet, the 8-th data packet, the 16-th data packet,..., the 0+[(128 / 8)-1]×8-th data packet, assuming that i is 1, the second data packet group includes the 1-th data packet, the 9-th data packet, the 17-th data packet,..., the 1+[(128 / 8)-1]×8-th data packet, and so on until the eighth data packet group is determined when i is 7, so that the 8 data packet groups can be determined in turn, and then the corresponding 8 first target decoding values can be determined based on the 8 data packet groups.

[0071] It should be noted that in the embodiment of the present application, when the identification recovery module in the receiving end device determines the r first decoding values based on the i-th data packet and the i+r-th data packet, after receiving the i-th data packet and the i+r-th data packet, the r first decoding values can be determined based on the i-th data packet and the i+r-th data packet; after receiving the i+2r-th data packet, the r first decoding values can be updated based on the i+2r-th data packet respectively to obtain r second decoding values; and after receiving the i+[(m / r)-1]×r-th data packet, the r Nth decoding values can be updated based on the i+[(m / r)-1]×r-th data packet respectively to obtain the r first target decoding values; wherein the r Nth decoding values are obtained by updating the r (N-1)th decoding values based on the i+[(m / r)-2]×r-th data packet respectively.

[0072] It should be noted that in the embodiment of the present application, when the identification recovery module in the receiving end device determines the r first decoding values based on the i-th data packet and the i+r-th data packet, after receiving the i-th data packet and the i+r-th data packet, the r first decoding values can be determined based on the i-th data packet and the i+r-th data packet; after receiving the i+2r-th data packet, the r first decoding values can be updated based on the i+2r-th data packet respectively to obtain r second decoding values; and after receiving the i+[(m / r)-1]×r-th data packet, the r Nth decoding values can be updated based on the i+[(m / r)-1]×r-th data packet respectively to obtain the r first target decoding values; wherein the r Nth decoding values are obtained by updating the r (N-1)th decoding values based on the i+[(m / r)-2]×r-th data packet respectively.

[0073] DEC(i) = RDMA(i) ^ RDMA(i+r) (1)

[0074] wherein RDMA(i) represents the ith data packet, and RDMA(i+r) represents the ith+r data packet.

[0075] It should be noted that in the embodiments of the present application, when the ith+2r data packet is received, the identification recovery module in the receiving end device can perform exclusive-OR operation on the ith+2r data packet and the r first decoding values respectively to update the r first decoding values and obtain r second decoding values.

[0076] For example, in the embodiments of the present application, assuming that r is 8, i is an integer greater than or equal to 0 and less than or equal to 7, and i is 0, when the 16th data packet is received, the identification recovery module can perform exclusive-OR operation on the 16th data packet and DEC(0) to update DEC(0) and obtain a second decoding value; when the 17th data packet is received, the identification recovery module can perform exclusive-OR operation on the 17th data packet and DEC(1) to update DEC(1) and obtain a second decoding value; and so on, until i is 7, when the 23rd data packet is received, the identification recovery module can perform exclusive-OR operation on the 23rd data packet and DEC(7) to update DEC(7) and obtain a second decoding value, thereby updating the 8 first decoding values and obtaining 8 second decoding values.

[0077] It should be noted that in the embodiments of the present application, when the ith+[(m / r)-1]×r data packet is received, i.e., the last data packet in the r data packet group is received, the r first decoding values can be updated based on the ith+[(m / r)-1]×r data packet, and r first target decoding values are obtained; wherein the r first decoding values are obtained by updating the r first N-1 decoding values based on the ith+[(m / r)-2]×r data packet.

[0078] For example, in the embodiment of the present application, it is assumed that r is 8, i is an integer greater than or equal to 0 and less than or equal to 7, when i is 0, after the 120th data packet is received, the 120th data packet and the Nth decoding value DEC(0) are XORed to update DEC(0) to obtain the first target decoding value; when i is 1, after the 121st data packet is received, the 121st data packet and the Nth decoding value DEC(1) are XORed to update DEC(1) to obtain the first target decoding value; when i is 7, after the 127th data packet is received, the 127th data packet and the Nth decoding value DEC(7) are XORed to update DEC(7) to obtain the first target decoding value, thereby obtaining eight first target decoding values.

[0079] In step 103, the r redundant repair data packets and the r first target decoding values are used for recovery processing to obtain the missing data packet.

[0080] In the embodiment of the present application, after the r first target decoding values are determined based on the m data packets, the identification and recovery module in the receiving end device can perform recovery processing based on the r redundant repair data packets and the r first target decoding values to obtain the missing data packet when it is determined that there is a missing packet based on the m data packets.

[0081] It should be noted that in the embodiment of the present application, when the identification and recovery module in the receiving end device performs recovery processing based on the r redundant repair data packets and the r first target decoding values to obtain the missing data packet, the target group corresponding to the missing data packet can be determined based on the r data packet groups; the target group is any one of the r data packet groups; then the target redundant repair data packet corresponding to the missing data packet can be determined based on the target group and the r redundant repair data packets; further, the second target decoding value corresponding to the missing data packet can be determined based on the target group and the r first target decoding values; thereby the missing data packet can be determined based on the target redundant repair data packet and the second target decoding value.

[0082] For example, in the embodiments of the present application, assuming that r is 8, assuming that the 8 redundant repair data packets are XOR(0)~XOR(7), and assuming that the 8 data packet groups correspond to the 8 redundant repair data packets one by one, that is, the redundant repair data packet corresponding to the first data packet group is XOR(0), if the lost data packet is RDMA(48), the identification and recovery module can determine that the target group corresponding to the lost data packet is the first data packet group based on the 8 data packet groups, then can determine that the target redundant repair data packet corresponding to the lost data packet is the first redundant repair data packet XOR(0) based on the first data packet group and the 8 redundant repair data packets, and further can determine that the second target decoding value corresponding to the lost data packet is DEC(0) based on the first data packet group and the 8 first target decoding values, so that the lost data packet can be determined based on the target redundant repair data packet XOR(0) and the second target decoding value DEC(0), as shown in the following formula (2), and the lost data packet can be obtained by performing XOR operation on the target redundant repair data packet XOR(0) and the second target decoding value DEC(0).

[0083] RDMA(i+p*r) = XOR(i) ^ DEC(i) (2)

[0084] wherein XOR(i) represents the target redundant repair data packet, DEC(i) represents the second target decoding value, and i is an integer greater than or equal to 0 and less than or equal to r-1.

[0085] It should be noted that in the embodiments of the present application, the receiving end device can perform real-time packet loss recovery while receiving data packets, reducing the need to temporarily store the entire data packet sequence, reducing memory resource occupation, and recovering the lost data packet through the received redundant repair data packet in a very short time, thus having the advantage of real-time packet loss recovery, and avoiding the negative impact of retransmission on the performance of RDMA transmission.

[0086] In summary, the identification and recovery module newly added in the present application works in the receiving end RDMA network card, does not increase the additional CPU burden, thereby saving the CPU resources, and the identification and recovery module in the receiving end device can simultaneously receive the m data packets and the r redundant repair data packets sent by the redundancy generation module in the sending end device, in the case of packet loss, the identification and recovery module can recover the lost data packet through the received redundant repair data packet in a very short time, thus having the advantage of real-time packet loss recovery.

[0087] The embodiment of the present application provides a packet loss recovery method, which is applied to a receiving end device, the receiving end device receives m data packets and r redundant repair data packets sent by a sending end device; wherein m and r are positive integers; in the case that it is determined that there is a packet loss based on the m data packets, r first target decoding values are determined based on the m data packets; and recovery processing is performed based on the r redundant repair data packets and the r first target decoding values to obtain the lost data packet. As can be seen, the receiving end device can receive the m data packets and the r redundant repair data packets simultaneously, if it is detected that there is a packet loss, recovery processing can be performed based on the r redundant repair data packets and the r first target decoding values to obtain the lost data packet, so that real-time packet loss recovery can be performed, the receiving end device does not need to request the sending end device to perform retransmission of the lost data packet after detecting the loss of the data packet, and the time delay problem is avoided; and the present application can determine the r first target decoding values based on the m data packets; and then recovery processing can be performed based on the r redundant repair data packets and the r first target decoding values, without the participation of the CPU in the recovery processing, so that the valuable CPU resources are saved, and the resource utilization is improved.

[0088] Embodiment two

[0089] Based on the above embodiment, another embodiment of the present application provides a packet loss recovery method, which is applied to a sending end device, the sending end device can include a redundancy generation module, Figure 3 The packet loss recovery method provided in the embodiment of the present application is shown Figure Three As shown in the figure, Figure 3 The packet loss recovery method can include the following steps:

[0090] Step 201, receiving s original data packets sent by an RDMA protocol stack module, and performing grouping processing on the s original data packets to obtain q original data packet groups; wherein the q original data packet groups respectively include m data packets, and s, m and q are positive integers.

[0091] In the embodiment of the present application, the redundancy generation module in the sending end device can receive s original data packets sent by the RDMA protocol stack module, and perform grouping processing on the s original data packets to obtain q original data packet groups.

[0092] It should be noted that, in the embodiment of the present application, the sending end device can be a sending end RDMA network card, and the type of the sending end device is not limited in the present application.

[0093] It should be noted that in the embodiments of the present application, the newly added redundancy generation module in the present application works in the sending end RDMA network card, and does not increase the additional CPU burden, thereby saving the CPU resources.

[0094] For example, in the embodiments of the present application, the redundancy generation module in the sending end device receives 1152 original data packets sent by the RDMA protocol stack module, can group the same RDMA transmission data stream, for example, 128 original data packets for a group, and can obtain 9 original data packet groups, that is, each original data packet group includes 128 original data packets.

[0095] Step 202, determining r redundancy repair data packets corresponding to m data packets; wherein r is a positive integer.

[0096] In the embodiments of the present application, the redundancy generation module in the sending end device receives s original data packets sent by the RDMA protocol stack module, and after grouping s original data packets to obtain q original data packet groups, can determine r redundancy repair data packets corresponding to m data packets.

[0097] It should be noted that in the embodiments of the present application, when the redundancy generation module in the sending end device determines r redundancy repair data packets corresponding to m data packets, it can determine r data packet groups corresponding to m data packets; and then determine r redundancy repair data packets corresponding to r data packet groups.

[0098] It should be noted that in the embodiments of the present application, when the redundancy generation module in the sending end device determines r data packet groups corresponding to m data packets, it can group m data packets to determine r data packet groups; wherein each data packet group includes the i-th data packet, the i+r-th data packet, the i+2r-th data packet, …, the i+[(m / r)-1]×r-th data packet in the m data packets, and i is an integer greater than or equal to 0 and less than or equal to r-1.

[0099] For example, in the embodiment of the present application, assuming that m is 128 and r is 8, when the redundancy generating module in the sending terminal device determines the corresponding 8 data packet groups based on the 128 data packets, the redundancy generating module can group the 128 data packets to determine 8 data packet groups, each of which includes the i-th data packet, the i+r-th data packet, the i+2r-th data packet,..., the i+[(m / r)-1]×r-th data packet in the 128 data packets, where i is an integer greater than or equal to 0 and less than or equal to 7; assuming that i is 0, the first data packet group includes the 0-th data packet, the 8-th data packet, the 16-th data packet,..., the 0+[(128 / 8)-1]×8-th data packet; assuming that i is 1, the second data packet group includes the 1-th data packet, the 9-th data packet, the 17-th data packet,..., the 1+[(128 / 8)-1]×8-th data packet, and so on until the 8th data packet group is determined when i is 7, so that the 8 data packet groups can be determined in turn.

[0100] It should be noted that in the embodiment of the present application, when the redundancy generating module receives the i-th data packet and the i+r-th data packet, the redundancy generating module can determine r first encoding values based on the i-th data packet and the i+r-th data packet; when the redundancy generating module receives the i+2r-th data packet, the redundancy generating module can update the r first encoding values based on the i+2r-th data packet to obtain r second encoding values; when the redundancy generating module receives the i+[(m / r)-1]×r-th data packet, the redundancy generating module can update the r Nth encoding values based on the i+[(m / r)-1]×r-th data packet to obtain r first target encoding values; where the r Nth encoding values are obtained by updating the r (N-1)th encoding values based on the i+[(m / r)-2]×r-th data packet; and then the redundancy generating module can determine the corresponding r redundant repair data packets based on the r first target encoding values; where i is an integer greater than or equal to 0 and less than or equal to r-1.

[0101] It should be noted that in the embodiment of the present application, when the redundancy generating module receives the i-th data packet and the i+r-th data packet, the redundancy generating module can determine r first encoding values based on the i-th data packet and the i+r-th data packet; when the redundancy generating module receives the i+2r-th data packet, the redundancy generating module can update the r first encoding values based on the i+2r-th data packet to obtain r second encoding values; when the redundancy generating module receives the i+[(m / r)-1]×r-th data packet, the redundancy generating module can update the r Nth encoding values based on the i+[(m / r)-1]×r-th data packet to obtain r first target encoding values; where the r Nth encoding values are obtained by updating the r (N-1)th encoding values based on the i+[(m / r)-2]×r-th data packet; and then the redundancy generating module can determine the corresponding r redundant repair data packets based on the r first target encoding values; where i is an integer greater than or equal to 0 and less than or equal to r-1.

[0102] XOR(i) = DATA(i) ^ DATA(i+r) (3)

[0103] Where DATA(i) represents the i-th data packet, and DATA(i+r) represents the i+r-th data packet.

[0104] It should be noted that, in the embodiments of this application, when the (i+2r)th data packet is received, the redundancy generation module can perform an XOR operation on the (i+2r)th data packet and the r first encoded values ​​respectively to update the r first encoded values ​​and obtain the r second encoded values.

[0105] For example, in the embodiments of this application, assuming r is 8 and i is an integer greater than or equal to 0 and less than or equal to 7, assuming i is 0, after receiving the 16th data packet, the redundancy generation module can perform an XOR operation on the 16th data packet and XOR(0), that is, update XOR(0) to obtain the second encoding value. assuming i is 1, when receiving the 17th data packet, the 17th data packet can perform an XOR operation on XOR(1), that is, update XOR(1) to obtain the second encoding value, ..., until i is 7. When receiving the 23rd data packet, the 23rd data packet can perform an XOR operation on XOR(7), that is, update XOR(7) to obtain the second encoding value, thereby completing the update processing of 8 first encoding values ​​and obtaining 8 second encoding values.

[0106] It should be noted that, in the embodiments of this application, after receiving the (i+[(m / r)-1]×r)th data packet, that is, after receiving the last data packet in the group of r data packets, the r Nth encoded values ​​can be updated based on the (i+[(m / r)-1]×r)th data packet to obtain the r first target encoded values; wherein, the r Nth encoded values ​​are obtained by updating the r N-1th encoded values ​​based on the (i+[(m / r)-2]×r)th data packet.

[0107] For example, in the embodiment of the present application, it is assumed that r is 8, i is an integer greater than or equal to 0 and less than or equal to 7, when i is 0, after receiving the 120th data packet, the 120th data packet and the Nth encoding value (XOR(0)) can be XORed, so that the XOR(0) can be updated to obtain the first target encoding value, when i is 1, after receiving the 121st data packet, the 121st data packet and the Nth encoding value (XOR(1)) can be XORed, so that the XOR(1) can be updated to obtain the first target encoding value, when i is 7, after receiving the 127th data packet, the 127th data packet and the Nth encoding value (XOR(7)) can be XORed, so that the XOR(7) can be updated to obtain the first target encoding value, so that eight first target encoding values can be obtained.

[0108] Further, in the embodiment of the present application, after obtaining the r first target encoding values, the redundancy generation module can determine the corresponding r redundancy repair data packets based on the r first target encoding values, for example, it is assumed that r is 8, and the eight first target encoding values obtained are the corresponding eight redundancy repair data packets.

[0109] It should be noted that, in the embodiment of the present application, the redundancy repair data packet includes a first header field; the first header field includes at least a second preset field, a third preset field, a fourth preset field, a fifth preset field, a sixth preset field and a seventh preset field; wherein the second preset field is used for the receiving end device to judge the identity information corresponding to the redundancy repair data packet; wherein the identity information includes the original data packet identity or the redundancy repair data packet identity, the third preset field is used to represent the target queue pair number (QPN), the fourth preset field is used to represent the source segment start point PSN, the fifth preset field is used to represent the number of packets in the interleaving interval, the sixth preset field is used to represent the number of redundancy repair data packets, and the seventh preset field is used to represent the number of the current redundancy repair data packet. The present application does not make specific limitation on the number of preset fields included in the first header field.

[0110] It should be noted that, in the embodiment of the present application, the redundancy repair data packet includes a first header field; the first header field includes at least a second preset field, a third preset field, a fourth preset field, a fifth preset field, a sixth preset field and a seventh preset field; wherein the second preset field is used for the receiving end device to judge the identity information corresponding to the redundancy repair data packet; wherein the identity information includes the original data packet identity or the redundancy repair data packet identity, the third preset field is used to represent the target queue pair number (QPN), the fourth preset field is used to represent the source segment start point PSN, the fifth preset field is used to represent the number of packets in the interleaving interval, the sixth preset field is used to represent the number of redundancy repair data packets, and the seventh preset field is used to represent the number of the current redundancy repair data packet. The present application does not make specific limitation on the number of preset fields included in the first header field.

[0111] For example, in the embodiment of the present application, Figure 4 The redundancy repair data packet structure diagram proposed in the embodiment of the present application is as follows: Figure 4As shown, the redundancy repair data packet comprises a first header field; the first header field can be a RepairHeader header field, and can further comprise an Ethernet field, an Internet Protocol (IP) field, a User Datagram Protocol (UDP) field, a Redundancy Payload field, and an ICRC field; wherein the first header field can comprise at least a second preset field, a third preset field, a fourth preset field, a fifth preset field, a sixth preset field, and a seventh preset field; the second preset field can be an RC_RDMA_REPAIR field, the third preset field can be a Destination QP field, the fourth preset field can be a Sourcestart PSN field, the fifth preset field can be a Shift size field, the sixth preset field can be a Totalrepairs number field, and the seventh preset field can be a Repair number field.

[0112] In step 203, the m data packets and the corresponding r redundancy repair data packets are respectively sent to the receiving end device, so that the receiving end device performs packet loss recovery processing based on the m data packets and the corresponding r redundancy repair data packets to obtain the lost data packet.

[0113] In the embodiments of the present application, after the redundancy generation module in the sending end device determines the corresponding r redundancy repair data packets based on the m data packets, the m data packets and the corresponding r redundancy repair data packets can be respectively sent to the receiving end device, so that the receiving end device performs packet loss recovery processing based on the m data packets and the corresponding r redundancy repair data packets to obtain the lost data packet.

[0114] In summary, the redundancy generation module in the sending end device can group the m data packets to determine r data packet groups, and then determine the corresponding r redundancy repair data packets based on the r data packet groups, and further send the m data packets and the corresponding r redundancy repair data packets to the receiving end device, so that the receiving end device performs packet loss recovery processing based on the m data packets and the corresponding r redundancy repair data packets to obtain the lost data packet, without introducing a new QP queue, without making any modifications to the application program, maintaining compatibility with the existing application program, and without consuming more RDMA network card hardware resources, reducing resource utilization.

[0115] The embodiment of the application provides a packet loss recovery method, which is applied to a sending end device, the sending end device receives s original data packets sent by an RDMA protocol stack module, and performs grouping processing on the s original data packets to obtain q original data packet groups; wherein each of the q original data packet groups comprises m data packets, and s, m and q are all positive integers; r corresponding redundant repair data packets are determined based on the m data packets; wherein r is a positive integer; the m data packets and the r corresponding redundant repair data packets are sent to a receiving end device, so that the receiving end device performs packet loss recovery processing based on the m data packets and the r corresponding redundant repair data packets to obtain lost data packets. As can be seen, the sending end device can determine r corresponding redundant repair data packets based on m data packets, and then can send the m data packets and the r corresponding redundant repair data packets to the receiving end device together, so that the receiving end device performs packet loss recovery processing based on the m data packets and the r corresponding redundant repair data packets to obtain lost data packets, without introducing a new QP queue, without making any modification to an application program, maintaining compatibility with an existing application program, and without consuming more RDMA network card hardware resources, reducing resource utilization.

[0116] Embodiment three

[0117] Based on the above embodiment, another embodiment of the application provides a packet loss recovery method, which is applied to a receiving end device and a sending end device, Figure 5 The packet loss recovery method provided in the embodiment of the application is shown in Figure Four As shown in Figure 5 The packet loss recovery method can include the following steps:

[0118] In step 301, the sending end device receives s original data packets sent by an RDMA protocol stack module, and performs grouping processing on the s original data packets to obtain q original data packet groups; wherein each of the q original data packet groups comprises m data packets, and s, m and q are all positive integers.

[0119] It should be noted that, in the embodiment of the application, the sending end device can be a sending end RDMA network card, and the type of the sending end device is not limited in the application.

[0120] It should be noted that, in the embodiment of the application, the sending end device can include a redundancy generation module, and the newly added redundancy generation module works in the sending end RDMA network card, without increasing the CPU burden, thereby saving CPU resources.

[0121] Exemplarily, in the embodiment of the present application, the redundancy generation module in the sending end device receives the 1152 original data packets sent by the RDMA protocol stack module, can group the same RDMA transmission data stream, for example, each 128 original data packets form a group, and can obtain 9 original data packet groups, that is, each original data packet group includes 128 original data packets.

[0122] In step 302, the sending end device determines the corresponding r redundancy repair data packets based on the m data packets; wherein r is a positive integer.

[0123] It should be noted that in the embodiment of the present application, when the redundancy generation module in the sending end device determines the corresponding r redundancy repair data packets based on the m data packets, it can determine the corresponding r data packet groups based on the m data packets; and then can determine the corresponding r redundancy repair data packets based on the r data packet groups.

[0124] It should be noted that in the embodiment of the present application, when the redundancy generation module in the sending end device determines the corresponding r data packet groups based on the m data packets, it can group the m data packets to determine the r data packet groups; wherein each data packet group includes the i-th data packet, the i+r-th data packet, the i+2r-th data packet, …, the i+[(m / r)-1]×r-th data packet in the m data packets, and i is an integer greater than or equal to 0 and less than or equal to r-1.

[0125] Exemplarily, in the embodiment of the present application, assuming that m is 128 and r is 8, when the redundancy generation module in the sending end device determines the corresponding 8 data packet groups based on the 128 data packets, it can group the 128 data packets to determine the 8 data packet groups, and each data packet group includes the i-th data packet, the i+r-th data packet, the i+2r-th data packet, …, the i+[(m / r)-1]×r-th data packet in the 128 data packets, and i is an integer greater than or equal to 0 and less than or equal to 7; assuming that i is 0, the first data packet group includes the 0th data packet, the 8th data packet, the 16th data packet, …, the 0+[(128 / 8)-1]×8th data packet; assuming that i is 1, the second data packet group includes the 1st data packet, the 9th data packet, the 17th data packet, …, the 1+[(128 / 8)-1]×8th data packet, and up to assuming that i is 7, the eighth data packet group can be determined, so that the eight data packet groups can be determined in turn.

[0126] It should be noted that in the embodiments of the present application, when the redundancy generation module receives the ith data packet and the ith+r data packet, the redundancy generation module can determine r first encoding values based on the ith data packet and the ith+r data packet; when the redundancy generation module receives the ith+2r data packet, the redundancy generation module can update the r first encoding values based on the ith+2r data packet, respectively, to obtain r second encoding values; when the redundancy generation module receives the ith+[(m / r)-1]×r data packet, the redundancy generation module can update the r Nth encoding values based on the ith+[(m / r)-1]×r data packet, respectively, to obtain r first target encoding values; wherein the r Nth encoding values are obtained by updating the r (N-1)th encoding values based on the ith+[(m / r)-2]×r data packet, respectively; and then the redundancy generation module can determine the corresponding r redundant repair data packets based on the r first target encoding values, respectively; i is an integer greater than or equal to 0 and less than or equal to r-1.

[0127] It should be noted that in the embodiments of the present application, when the redundancy generation module receives the ith data packet and the ith+r data packet, the redundancy generation module can determine r first encoding values based on the ith data packet and the ith+r data packet; when the redundancy generation module receives the ith+2r data packet, the redundancy generation module can update the r first encoding values based on the ith+2r data packet, respectively, to obtain r second encoding values; when the redundancy generation module receives the ith+[(m / r)-1]×r data packet, the redundancy generation module can update the r Nth encoding values based on the ith+[(m / r)-1]×r data packet, respectively, to obtain r first target encoding values; wherein the r Nth encoding values are obtained by updating the r (N-1)th encoding values based on the ith+[(m / r)-2]×r data packet, respectively; and then the redundancy generation module can determine the corresponding r redundant repair data packets based on the r first target encoding values, respectively; i is an integer greater than or equal to 0 and less than or equal to r-1.

[0128] It should be noted that in the embodiments of the present application, when the redundancy generation module receives the ith+2r data packet, the redundancy generation module can update the r first encoding values based on the ith+2r data packet, respectively, to obtain r second encoding values.

[0129] For example, in the embodiments of the present application, assuming that r is 8, i is an integer greater than or equal to 0 and less than or equal to 7, and assuming that i is 0, when the redundancy generation module receives the 16th data packet, the redundancy generation module can perform XOR operation between the 16th data packet and XOR(0), i.e., update XOR(0) to obtain a second encoding value; when the redundancy generation module receives the 17th data packet, the redundancy generation module can perform XOR operation between the 17th data packet and XOR(1), i.e., update XOR(1) to obtain a second encoding value; and so on, until i is 7, when the redundancy generation module receives the 23rd data packet, the redundancy generation module can perform XOR operation between the 23rd data packet and XOR(7), i.e., update XOR(7) to obtain a second encoding value, thereby updating the 8 first encoding values to obtain 8 second encoding values.

[0130] It should be noted that in the embodiments of the present application, when the last data packet in the r data packet groups is received, i.e., after the i+[(m / r)-1]x r data packets are received, the r first target encoding values can be obtained by updating the rth N encoding values based on the i+[(m / r)-1]x r data packets, respectively; wherein the rth N encoding values are obtained by updating the rth N-1 encoding values based on the i+[(m / r)-2]x r data packets, respectively.

[0131] For example, in the embodiments of the present application, assuming that r is 8, i is an integer greater than or equal to 0 and less than or equal to 7, assuming that i is 0, when the 120th data packet is received, the 120th data packet and the Nth encoding value (XOR(0)) can be subjected to XOR operation, so that the XOR(0) can be updated to obtain the first target encoding value, assuming that i is 1, when the 121th data packet is received, the 121th data packet and the Nth encoding value (XOR(1)) can be subjected to XOR operation, so that the XOR(1) can be updated to obtain the first target encoding value, …, assuming that i is 7, until when the 127th data packet is received, the 127th data packet and the Nth encoding value (XOR(7)) can be subjected to XOR operation, so that the XOR(7) can be updated to obtain the first target encoding value, so that 8 first target encoding values can be obtained.

[0132] Further, in the embodiments of the present application, after the r first target encoding values are obtained, the redundancy generation module can determine the corresponding r redundancy repair data packets based on the r first target encoding values, for example, assuming that r is 8, the 8 first target encoding values obtained are the corresponding 8 redundancy repair data packets.

[0133] It should be noted that in the embodiments of the present application, the redundancy repair data packet includes a first header field; the first header field includes at least a second preset field, a third preset field, a fourth preset field, a fifth preset field, a sixth preset field and a seventh preset field; wherein the second preset field is used for the receiving end device to judge the identity information corresponding to the redundancy repair data packet; wherein the identity information includes the original data packet identity or the redundancy repair data packet identity, the third preset field is used to represent the target queue pair number (Queue Pair Number, QPN), the fourth preset field is used to represent the source segment start point PSN, the fifth preset field is used to represent the number of packets in the interleaving interval, the sixth preset field is used to represent the number of redundancy repair data packets, and the seventh preset field is used to represent the number of the current redundancy repair data packet. The present application does not make specific limitation on the number of preset fields included in the first header field.

[0134] The redundancy repair data packet identity, the third preset field is used to represent the target queue pair number (Queue Pair Number, QPN), the fourth preset field is used to represent the source segment start point PSN, the fifth preset field is used to represent the number of packets in the interleaving interval, the sixth preset field is used to represent the number of redundancy repair data packets, and the seventh preset field is used to represent the number of the current redundancy repair data packet. The present application does not make specific limitation on the number of preset fields included in the first header field.

[0135] For example, in the embodiments of the present application, as shown in the figure, Figure 4 The redundant repair data packet includes a first header field; the first header field can be a Repair Header header field, and can also include an Ethernet field, an Internet Protocol (IP) field, a User Datagram Protocol (UDP) field, a Redundancy Payload field, and an ICRC field; wherein the first header field can include at least a second preset field, a third preset field, a fourth preset field, a fifth preset field, a sixth preset field, and a seventh preset field; the second preset field can be an RC_RDMA_REPAIR field, the third preset field can be a Destination QP field, the fourth preset field can be a Source start PSN field, the fifth preset field can be a Shift size field, the sixth preset field can be a Total repairs number field, and the seventh preset field can be a Repair number field.

[0136] Step 303, the sending end device sends the m data packets and the corresponding r redundant repair data packets to the receiving end device respectively.

[0137] Step 304, when the receiving end device determines that there are lost packets based on the m data packets, the receiving end device determines r first target decoding values based on the m data packets.

[0138] It should be noted that in the embodiments of the present application, when the receiving end device determines the r first target decoding values based on the m data packets, the m data packets can be grouped to determine r data packet groups; wherein each data packet group includes an i-th data packet, an i+r-th data packet, an i+2r-th data packet,..., and an i+[(m / r)-1]×r-th data packet in the m data packets, i is an integer greater than or equal to 0 and less than or equal to r-1; and then the corresponding r first target decoding values can be determined based on the r data packet groups.

[0139] For example, in the embodiment of the present application, assuming that m is 128 and r is 8, the identification recovery module in the receiving end device can receive the first group of data, i.e., 128 data packets and 8 redundancy repair data packets, sent by the redundancy generation module in the sending end device, and then can group the 128 data packets to determine 8 data packet groups, each of which includes the i-th data packet, the i+r-th data packet, the i+2r-th data packet,..., the i+[(m / r)-1]r-th data packet in the 128 data packets, i being an integer greater than or equal to 0 and less than or equal to 7; assuming that i is 0, the first data packet group includes the 0-th data packet, the 8-th data packet, the 16-th data packet,..., the 0+[(128 / 8)-1]8-th data packet, assuming that i is 1, the second data packet group includes the 1-th data packet, the 9-th data packet, the 17-th data packet,..., the 1+[(128 / 8)-1]8-th data packet, and up to assuming that i is 7, the eighth data packet group can be determined, so that the 8 data packet groups can be determined in turn, and then the corresponding 8 first target decoding values can be determined based on the 8 data packet groups.

[0140] It should be noted that in the embodiment of the present application, when the identification recovery module in the receiving end device determines the r first decoding values based on the i-th data packet and the i+r-th data packet, after receiving the i-th data packet and the i+r-th data packet, the r first decoding values can be obtained based on the i-th data packet and the i+r-th data packet, i.e., the i-th data packet and the i+r-th data packet can be subjected to XOR operation, so that the r first decoding values, e.g., DEC(0), DEC(1),..., DEC(r-1), can be obtained; i being an integer greater than or equal to 0 and less than or equal to r-1.

[0141] It should be noted that in the embodiment of the present application, when the identification recovery module in the receiving end device determines the r first decoding values based on the i-th data packet and the i+r-th data packet, after receiving the i-th data packet and the i+r-th data packet, the r first decoding values can be obtained based on the i-th data packet and the i+r-th data packet, i.e., the i-th data packet and the i+r-th data packet can be subjected to XOR operation, so that the r first decoding values, e.g., DEC(0), DEC(1),..., DEC(r-1), can be obtained; i being an integer greater than or equal to 0 and less than or equal to r-1.

[0142] It should be noted that in the embodiments of the present application, when the i+2rth data packet is received, the identification recovery module in the receiving end device can perform exclusive OR operation on the i+2rth data packet and the r first decoding values respectively to update the r first decoding values and obtain r second decoding values.

[0143] For example, in the embodiments of the present application, assuming that r is 8 and i is an integer greater than or equal to 0 and less than or equal to 7, when the 16th data packet is received, the identification recovery module can perform exclusive OR operation on the 16th data packet and DEC(0) to update DEC(0) and obtain a second decoding value, when the 17th data packet is received, the identification recovery module can perform exclusive OR operation on the 17th data packet and DEC(1) to update DEC(1) and obtain a second decoding value, and so on, until when the 23rd data packet is received, the identification recovery module can perform exclusive OR operation on the 23rd data packet and DEC(7) to update DEC(7) and obtain a second decoding value, thereby updating the 8 first decoding values and obtaining 8 second decoding values.

[0144] It should be noted that in the embodiments of the present application, when the i+[(m / r)-1]×rth data packet is received, that is, the last data packet in the r data packet group is received, the r first N decoding values can be updated based on the i+[(m / r)-1]×rth data packet to obtain r first target decoding values; wherein the r first N decoding values are obtained by updating the r first N-1 decoding values based on the i+[(m / r)-2]×rth data packet.

[0145] For example, in the embodiments of the present application, assuming that r is 8 and i is an integer greater than or equal to 0 and less than or equal to 7, when the 120th data packet is received, the identification recovery module can perform exclusive OR operation on the 120th data packet and the first N decoding value DEC(0) to update DEC(0) and obtain a first target decoding value, when the 121th data packet is received, the identification recovery module can perform exclusive OR operation on the 121th data packet and the first N decoding value DEC(1) to update DEC(1) and obtain a first target decoding value, and so on, until when the 127th data packet is received, the identification recovery module can perform exclusive OR operation on the 127th data packet and the first N decoding value DEC(7) to update DEC(7) and obtain a first target decoding value, thereby obtaining 8 first target decoding values.

[0146] At step 305, the receiving end device performs recovery processing based on the r redundant repair data packets and the r first target decoding values to obtain the missing data packet.

[0147] It should be noted that in the embodiments of the present application, when the identification and recovery module in the receiving end device performs recovery processing based on the r redundant repair data packets and the r first target decoding values to obtain the missing data packet, the identification and recovery module can determine the target group corresponding to the missing data packet based on the r data packet groups; the target group is any one of the r data packet groups; then the identification and recovery module can determine the target redundant repair data packet corresponding to the missing data packet based on the target group and the r redundant repair data packets; further, the identification and recovery module can determine the second target decoding value corresponding to the missing data packet based on the target group and the r first target decoding values; and thus the identification and recovery module can determine the missing data packet based on the target redundant repair data packet and the second target decoding value.

[0148] For example, in the embodiments of the present application, assuming that r is 8, and the 8 redundant repair data packets are XOR(0) to XOR(7), and the 8 data packet groups correspond to the 8 redundant repair data packets one by one, i.e., the redundant repair data packet corresponding to the first data packet group is XOR(0), and if the missing data packet is RDMA(48), the identification and recovery module can determine the target group corresponding to the missing data packet based on the 8 data packet groups to be the first data packet group, then the identification and recovery module can determine the target redundant repair data packet corresponding to the missing data packet based on the first data packet group and the 8 redundant repair data packets to be the first redundant repair data packet XOR(0), further, the identification and recovery module can determine the second target decoding value corresponding to the missing data packet based on the first data packet group and the 8 first target decoding values to be DEC(0), and thus the identification and recovery module can determine the missing data packet based on the target redundant repair data packet XOR(0) and the second target decoding value DEC(0), as shown in the above formula (2), the missing data packet can be obtained by performing XOR operation on the target redundant repair data packet XOR(0) and the second target decoding value DEC(0).

[0149] It should be noted that in the embodiments of the present application, the receiving end device can perform real-time packet loss recovery while receiving data packets, which reduces the need to temporarily store the entire data packet sequence, reduces the memory resource occupation, and can recover the missing data packet through the received redundant repair data packet in a very short time, thus having the advantage of real-time packet loss recovery, and avoiding the negative impact of retransmission on the performance of RDMA transmission.

[0150] In summary, the redundancy generation module in the sending end device can group m data packets, determine r data packet groups, and then determine corresponding r redundancy repair data packets based on the r data packet groups. The m data packets and the corresponding r redundancy repair data packets can be sent to the receiving end device without introducing a new QP queue, without making any modifications to the application program, maintaining compatibility with the existing application program, without consuming more RDMA network card hardware resources, and reducing resource utilization. The newly added redundancy generation module and the identification and recovery module work in the sending end RDMA network card and the receiving end RDMA network card, respectively, so that no additional CPU burden is added, CPU resources are saved, and the identification and recovery module in the receiving end device can receive the m data packets and the r redundancy repair data packets sent by the redundancy generation module in the sending end device at the same time. In the case of packet loss, the identification and recovery module can recover the lost data packets through the received redundancy repair data packets in a very short time, thus having the advantage of real-time packet loss recovery.

[0151] The embodiment of the application provides a packet loss recovery method, which is applied to a receiving end device and a sending end device. The receiving end device receives m data packets and r redundancy repair data packets sent by the sending end device; wherein m and r are positive integers; in the case that it is determined that there is packet loss based on the m data packets, r first target decoding values are determined based on the m data packets; recovery processing is performed based on the r redundancy repair data packets and the r first target decoding values, so that the lost data packet is obtained; the sending end device receives s original data packets sent by an RDMA protocol stack module, and performs grouping processing on the s original data packets, so that q original data packet groups are obtained; wherein the q original data packet groups respectively include m data packets, and s, m and q are positive integers; corresponding r redundancy repair data packets are determined based on the m data packets; wherein r is a positive integer; the m data packets and the corresponding r redundancy repair data packets are respectively sent to the receiving end device, so that the receiving end device performs packet loss recovery processing based on the m data packets and the corresponding r redundancy repair data packets, and the lost data packet is obtained. Therefore, the receiving end device can simultaneously receive the m data packets and the r redundancy repair data packets. If it is detected that there is a packet loss condition, recovery processing can be performed based on the r redundancy repair data packets and the r first target decoding values, so that the lost data packet is obtained, so that real-time packet loss recovery can be performed, and the receiving end device does not need to request the sending end device to retransmit the lost data packet after detecting the data packet loss, so that the time delay problem is avoided. The application can determine the r first target decoding values based on the m data packets. Then, recovery processing can be performed based on the r redundancy repair data packets and the r first target decoding values, without the participation of the CPU in the recovery processing, so that valuable CPU resources are saved. Since the m data packets and the r redundancy repair data packets are simultaneously received by the receiving end device, a new QP queue is not needed, so that the use of RDMA network card hardware resources is reduced, and the resource utilization is improved.

[0152] Embodiment four

[0153] Based on the above embodiment, another embodiment of the application provides a packet loss recovery method. Compared with the RDMA protocol stack modules of the sending end and the receiving end in the traditional RDMA transmission, the application adds a sending end forward error correction redundancy generation module (redundancy generation module) and a receiving end packet loss identification and recovery module (identification and recovery module). Figure 6 The working process diagram of the wide area network RDMA real-time packet loss recovery technology based on forward error correction provided by the embodiment of the application is as follows: Figure 6As shown, the sending end device includes an RDMA protocol stack and a forward error correction redundancy generation module (redundancy generation module), and the receiving end device can include an RDMA protocol stack and a packet loss identification and recovery module (identification and recovery module). The redundancy generation module can receive the original data packet sent by the RDMA protocol stack, then can generate a redundancy repair data packet, and transmit the original data packet and the redundancy repair data packet to the receiving end device through a lossy wide area network, and the identification and recovery module determines the original lossless data packet based on the lossy original data packet and the redundancy repair data packet.

[0154] It should be noted that in the embodiments of the present application, Figure 7 The structure diagram of the forward error correction redundancy generation module proposed in the embodiments of the present application is as shown in Figure 7 As shown, the redundancy generation module can receive the original data packet sent by the RDMA protocol stack, then can constantly update the redundancy encoding record table (r first target encoding values) based on the original data packet, so as to generate a redundancy repair data packet, and then can transmit the original data packet and the redundancy repair data packet to the receiving end device based on the sending selector.

[0155] It should be noted that in the embodiments of the present application, Figure 8 The structure diagram of the packet loss identification and recovery module of the receiving end proposed in the embodiments of the present application is as shown in Figure 8 As shown, the packet loss identification and recovery module (identification and recovery module) can receive the lossy original data packet and the redundancy repair data packet, then can identify the packet loss and update the redundancy decoding and module state record table (r first target decoding values), and perform packet loss recovery based on the redundancy repair data packet and the record table (r first target decoding values) to obtain a lossless data packet, and then can transmit the original ordered data packet to the RDMA protocol stack.

[0156] It should be noted that in the embodiments of the present application, the functions of the newly added modules are as follows: (1) The main function of the forward error correction redundancy generation module (redundancy generation module) of the sending end is: according to the original data packet sent by the RDMA protocol stack of the sending end, forward error correction encoding is performed to generate a redundancy repair data packet and send it to the receiving end together with the original data packet; (2) The main function of the packet loss identification and recovery module (identification and recovery module) of the receiving end is: according to the PSN field in the header of the RDMA original data packet received from the lossy wide area network, it is judged whether the original data packet is lost, the reordered original data packet caused by packet loss is temporarily stored in the reorder buffer, and the redundancy repair data packet arriving at the receiving end together with the original data packet is used to immediately recover the lost original data packet, and the ordered and lossless original data packet recovered is transmitted to the RDMA protocol stack module of the receiving end.

[0157] Further, in the embodiments of the present application, the working principle of the sending end forward error correction redundancy generation module (redundancy generation module) is as follows: the sending end divides the same RDMA transmission data stream into groups. In the data transmission process of the RDMA protocol stack, the packet sequence numbers PSN of all RDMA original data packets in the same data stream remain continuously increasing without loss. In order to effectively generate redundancy repair data packets, the redundancy calculation method is used according to grouping, and the data packets are grouped according to their PSN. In grouping, according to the specified grouping size, the appropriate first PSN is selected to align the grouping, so as to ensure that whether two data packets belong to the same group can be accurately determined according to the PSN and the grouping size. This mechanism helps the receiving end to orderly organize and identify the original data packets and the redundancy repair data packets, so as to maintain the integrity and reliability of data transmission; each group (Group) contains m consecutive RDMA original data packets, and a corresponding redundancy data packet is generated every k original data packets. In this way, r redundancy repair data packets generated by redundancy calculation are generated for each group, and the relationship of m, r and k is shown in the following formula (4).

[0158] m=r*k (4)

[0159] It should be noted that in the embodiments of the present application, the m original data packets are sent in increasing order according to their PSN sequence numbers through the RDMA protocol stack and the network card during transmission. In the forward error correction encoding stage, the XOR operation at the data packet level is used to operate on each data packet in the group to create a redundancy repair data packet. Here, we use the interleaving encoding technology to encode the original data packet, which contains a fixed interval, called interleaving interval, denoted by r. On this basis, each redundancy repair data packet XOR(i) generated by the same group has the following relationship with the data packet DATA(i) in the same group.

[0160] XOR(i)=DATE(i)^DATE(i+r)^……^DATE(i+(k-1)*r) (5)

[0161] where DATE(i) represents the i th data packet, DATE(i+r) represents the i+r th data packet, …, DATE(i+(k-1)*r) represents the i+(k-1)*r th data packet, and k is an integer of m / r.

[0162] It should be noted that in the embodiments of the present application, the RDMA original packet, i.e. RDMA(i), referred to herein and hereinafter refers to a complete RDMA transport layer packet defined by the RDMA protocol, for example, in the InfiniBand protocol, i.e. a transport layer packet with a structure including a BTH header, an optional AETH header, an optional RETH header, an RDMA data load and an ICRC check code.

[0163] It should be noted that in the embodiments of the present application, due to the properties of the XOR operation, the calculation can be performed in a way of step-by-step XOR calculation without the need to retain the RDMA original packets participating in the XOR operation during the calculation process. Specifically, each RDMA original packet can be determined its position in the packet according to its PSN, and further determine the corresponding encoded redundant packet, i.e. the redundant repair packet corresponding to the i-th RDMA original packet DATA(i) must be XOR(imodr). Therefore, to calculate the final result of each redundant repair packet, only need to let it perform XOR operation with XOR(i mod r) to update the calculation of the encoding value when the i-th RDMA original packet is sent, then when the last RDMA original packet of the packet is sent, the obtained XOR calculation value (the first target encoding value) is the required redundant repair packet.

[0164] It should be noted that in the embodiments of the present application, when the last packet in the packet, i.e. the m-th packet, is sent by the RDMA protocol stack and the network card, the r redundant repair packets generated will be sent to the receiving end corresponding to the current packet before the next RDMA original packet of the packet is sent.

[0165] It should be noted that in the embodiments of the present application, in the process of sending the redundant repair packets, the structure of each redundant repair packet is constructed as the packet structure shown in Figure 4 The "Repair Header" header field (the first header field) contains the relevant control information of the redundant packet, such as the QPN of the receiving end (the third preset field), the initial PSN number of the current packet (the fourth preset field), the number of the redundant repair packet (the seventh preset field), etc. In particular, in the "Repair Header" header field, the field of the first 8 bits (i.e. RC_RDMA_REPAIR field) is in the same position as the operation code in the RDMA protocol header, and its value is set to 0x1F, which belongs to the reserved field of the RDMA protocol operation code. The RDMA network card can accurately identify and distinguish the original packet and the redundant repair packet by identifying the value of the operation code field.

[0166] Further, in the embodiments of the present application, the working principle of the receiving end packet loss identification and recovery module is as follows: when the receiving end receives any data packet from the sending end, it first judges the type of the data packet according to the RDMA operation code field in the data packet header, i.e. whether it is an original data packet or a redundant repair data packet. Based on the judgment of the data packet type, the receiving end will take different processing operations according to its current state.

[0167] It should be noted that in the embodiments of the present application, Figure 9 The switching condition diagram between the three states proposed in the embodiments of the present application is shown in Figure 9 The receiving end (receiving end device) has three states, namely: ordered (ORDERED), reordering (REORDERING), and invalid (INVALID). The ordered state means that all the received data packets are in order and have been delivered to the RDMA protocol stack of the receiving end; the reordering (disorder) state indicates that the current RDMA data packet group being processed has packet loss, so the original data packets received subsequently are stored in the reordering buffer and their existence is identified by a bitmap; the invalid (invalid) state means that the current group has unrecoverable packet loss and all the data in the reordering buffer has been delivered to the RDMA protocol stack of the receiving end.

[0168] It should be noted that in the embodiments of the present application, the conditions for state transition and the operations to be performed at the time of state transition are as follows: (1) when the original data packet received by the receiving end (receiving end device) is marked as reordering, it indicates that there is a missing data packet, at this time the reordered data packet and the original data packet in the same group received subsequently will be stored in the reordering buffer; (2) when the original data packet received by the receiving end is the first data packet in a new group and all the possible data packets in the reordering buffer have been submitted to the RDMA protocol stack, the receiving end will switch back to the ordered state; (3) if in the reordering state, the reordered original data packet received by the receiving end indicates that the number of missing packets exceeds the upper limit of the redundancy recovery capability (i.e. the number of missing data packets in the group exceeds the number of redundant repair data packets generated by the group r), and all the possible data packets in the reordering buffer have been submitted to the RDMA protocol stack, the receiving end will no longer track the current group; (4) the received original data packet is the first original data packet of a new group, and the order is recovered; (5) if in the ordered state, the number of reordered original data packets received by the receiving end exceeds the upper limit of the redundancy recovery capability, the receiving end will no longer track the current group.

[0169] It should be noted that in the embodiments of the present application, the decoding principle of the receiving end is consistent with the encoding process of the sending end, and the repair calculation of the XOR redundancy is dispersed into each separate data packet receiving process by fully utilizing the step-by-step property of XOR calculation. To achieve this purpose, the receiving end needs to pre-set r storage units DEC(0)~DEC(r), the size of which is the same as that of the redundant repair data packet, for storing the intermediate results in the XOR redundancy repair calculation process of the receiving end. The initial value of each storage unit DEC(i) is 0.

[0170] It should be noted that in the embodiments of the present application, when the receiving end receives the original data packet, it will check the sequence number of the original data packet, and if the sequence number of the original data packet in the group is i, i+r, i+2r, …, the receiving end will perform XOR operation on the original data packet and DEC(i) and update the value of DEC(i) at the same time, as shown in the following formula (6).

[0171] DEC(i) = RDMA(i) ^ RDMA(i+r) ^ RDMA(i+2r) ^… (6)

[0172] Wherein, RDMA(i) represents the i-th data packet in the group, RDMA(i+r) represents the i+r-th data packet in the group, and RDMA(i+2r) represents the i+2r-th data packet in the group.

[0173] It should be noted that in the embodiments of the present application, if there is a loss in the data packets with sequence numbers i, i+r, i+2r, … of the original data packet in the group, the receiving end will perform XOR operation on the redundant repair data packet XOR(i) and DEC(i). As shown in the above formula (2), according to the characteristics of XOR operation, the result obtained will be the lost original data packet RDMA(i+p*r), which enables the receiving end to perform real-time packet loss recovery while receiving data, reduces the need to temporarily store the entire data packet sequence, and reduces the memory resource occupation.

[0174] It should be noted that in the embodiments of the present application, for the out-of-order original data packets in the same group, they need to be temporarily stored in the reordering buffer, and after the redundant repair data packet corresponding to the group is received by the receiving end and the lost data packet is recovered, the reordering buffer submits the repaired and ordered original data packet to the RDMA protocol stack of the receiving end.

[0175] It should be noted that in the embodiments of the present application, considering the higher demand of the reordering buffer on memory and the fact that packet loss does not always occur in large quantities, the present application sets up q shared reordering buffers, each of which has a size equal to one encoding packet, i.e. contains m data packets. Each reordering buffer is equipped with a timeout timer. When a new data packet enters the reordering buffer, the timer is updated. If the timer times out, all the data in the reordering buffer will be transmitted to the RDMA protocol stack at the receiving end.

[0176] Further, in the embodiments of the present application, the processing flow involved when the receiving end receives the RDMA raw data packet is as follows: (1) If the received raw data packet does not belong to the current group of the receiving end, i.e. the PSN indicates that the position of the data packet is outside the current group, the receiving end can make the following judgment: a. If the PSN position of the raw data packet is greater than r, it means that more than r data packets have been lost in front of it. In this case, the redundancy mechanism cannot recover these lost data packets. Therefore, the receiving end will directly pass the data packet to the RDMA protocol stack and trigger the retransmission mechanism of the RDMA protocol stack. The receiving end enters the invalid state at the same time; b. If the PSN position of the raw data packet is less than or equal to r, but it is not the first data packet in the group, it means that there are some lost data packets in front of it, but the number does not exceed the maximum recoverable data packet number. The receiving end will pass the data packet to the reordering buffer after passing the data packets already in the reordering buffer to the RDMA protocol stack and emptying the buffer, and update the information of the current group of the receiving end. At this time, the receiving end enters the out-of-order state; c. If the PSN of the received RDMA data packet indicates that it is the first data packet in the group, it means that a new data packet group has started. In this case, the receiving end will directly pass the data packet to the RDMA protocol stack and update the information of the current group of the receiving end, and the receiving end enters the in-order state; (2) If the received raw data packet belongs to the current group of the receiving end, i.e. the PSN indicates that the position of the data packet is within the current group, the receiving end can make the following judgment: a. If the receiving end is in the out-of-order state, add the raw data packet to the reordering buffer and update the corresponding bitmap information to mark that this data packet has been received; b. If the receiving end is in the in-order state and the PSN of the raw data packet is equal to the PSN of the next expected in-order data packet (EPSN), pass the data packet to the RDMA protocol stack of the receiving end and update the value of EPSN; c. If the receiving end is in the in-order state, but the PSN of the received raw data packet does not match EPSN, it means that packet loss has occurred. In this case, the receiving end will enter the out-of-order state and add the raw data packet and the subsequent raw data packets possibly received in the current group to the reordering buffer; d. If the receiving end is in the invalid state, pass the raw data packet directly to the RDMA protocol stack of the receiving end.

[0177] It should be noted that, in the embodiments of the present application, the processing flow involved by the receiving end when receiving the redundant repair data packet is as follows: (1) in the following cases (the second preset condition), the redundant repair data packet will be discarded directly: a. the Source Start PSN field of the redundant repair data packet does not match the PSN field of the first original data packet of the current packet of the receiving end; b. the receiving end is in the failure state; c. the receiving end is in the out-of-order state, but all the k original data packets related to the generation of the redundant repair data packet have been received; d. the receiving end is in the in-order state, but the received redundant repair data packet is insufficient to recover the lost original data packet; e. the receiving end is in the in-order state, and all the original data packets in the current packet have been received; (2) if the repair packet is not discarded, the redundant repair data packet will be used to repair the lost data packet: a. if the receiving end is in the in-order state, the lost original data packet recovered through the foregoing steps will be directly transmitted into the receiving end RDMA protocol stack; b. if the receiving end is in the out-of-order state, the lost original data packet recovered through the foregoing steps will be transmitted to the reordering buffer, and after each repair, it is checked whether all the lost packets in the current packet have been repaired; c. on the basis of b), if all the original data packets in the current packet have been completely received in the packet through the reception of the original data packet and the recovery of the lost data packet, all the data packets in the reordering buffer will be transmitted into the receiving end RDMA protocol stack, and the reordering buffer is emptied.

[0178] For example, in the embodiments of the present application, it is assumed that the set packet size is m=128, and the interleaving interval of the data packet when performing the forward error correction coding based on XOR is r=8. As shown in Table 1 below, the packet contains 128 RDMA original data packets, and the PSN thereof is set to 0-127. After the sending end RDMA protocol stack generates the RDMA original data packets of the packet, all the original data packets of the packet enter the sending end forward error correction redundancy generation module (redundancy generation module) to generate redundant repair data packets. When performing the generation of the redundant repair data packet of the forward error correction, the interleaving interval of the data packet participating in the XOR calculation is set to r=8, that is, the original data packets RDMA(0), RDMA(8), …, RDMA(112), RDMA(120) perform XOR calculation, and the corresponding redundant repair data packet XOR(0) is generated. The generation of the redundant repair data packets XOR(1)-XOR(7) is similar.

[0179] Table 1

[0180]

[0181] For example, in the embodiment of the present application, when generating the forward error correction redundancy repair data packet, due to the characteristics of the exclusive or calculation, it is not necessary to cache the data packets participating in the calculation. Taking the process of generating the redundancy repair data packet XOR(0) from the original data packets RDMA(0), RDMA(8), …, RDMA(112), RDMA(120) as an example, when the original data packet RDMA(0) is sent through the RDMA network card, it is subjected to an exclusive or calculation with XOR(0) which is initially 0, and the value of XOR(0) is updated as shown in the following formula (7), and then, for RDMA(8), …, RDMA(112), RDMA(120), when they are generated and sent through the RDMA network card, they are subjected to an exclusive or calculation with XOR(0) and the value of XOR(0) is updated. After RDMA(120) completes the update of XOR(0), according to the properties of the exclusive or calculation, the final XOR(0) (the first target encoding value) obtained is the exclusive or calculation result of RDMA(0), RDMA(8), …, RDMA(112), RDMA(120) as a whole. Therefore, the RDMA network card actually only needs to save the intermediate value result of each packet corresponding to the redundancy repair data packet, and does not need to save the original data of all the data packets participating in the forward error correction calculation, which helps to save a large amount of network card hardware resources.

[0182] XOR(0) = XOR(0) ^ RDMA(0) (7)

[0183] It should be noted that in the embodiment of the present application, when the last original data packet RDMA(127) in the packet is sent and the update of the redundancy repair data packet XOR(7) is completed, the RDMA network card of the sending end will send all the redundancy repair data packets XOR(0) to XOR(7).

[0184] It should be noted that in the embodiment of the present application, when each redundancy repair data packet is sent, the Repair Header header is added, and each field of the header is filled according to the context of the QP queue pair used in this RDMA transmission and the setting of the forward error correction mechanism. The value of the Source Start PSN field in the Repair Header is 0, indicating that the current packet starts from the RDMA original data packet with PSN = 0; the RepairNumber fields of the redundancy repair data packets XOR(0) ~ XOR(7) are 0 ~ 7 respectively, indicating the number of the redundancy repair data packet; the Shift Size is set to 8, indicating the interleaving interval; the Cluster Size is set to 128, indicating the number of original data packets in the group; the Total Repair Number is set to 8, indicating the total number of redundancy repair data packets; then, the 128 RDMA original data packets and 8 redundancy repair data packets are transmitted in sequence through the lossy wide area network, and packet loss occurs during transmission, so that the consecutive 7 RDMA original data packets RDMA(43) ~ RDMA(49) are lost, and the remaining data packets are correctly received by the receiving end.

[0185] It should be noted that in the embodiment of the present application, as shown in Table 2 below, the receiving end receives the RDMA original data packets RDMA(0) ~ RDMA(127) with PSN = 0 ~ 127, and uses the received redundancy repair data packets XOR(0) ~ XOR(7) to recover the lost data packets during the receiving process. Among them, the RDMA original data packets with PSN = 0 ~ 42, 50 ~ 127 and all redundancy repair data packets are successfully received by the receiving end, and the RDMA data packets with PSN = 43 ~ 49 are lost during transmission.

[0186] Table 2

[0187]

[0188] It should be noted that in the embodiment of the present application, when the receiving end receives the RDMA original data packet with PSN = 0, since the PSN value is the first data packet of the new packet, the receiving end will pass the original data packet directly to the RDMA protocol stack according to step c in the data packet processing flow (1) which does not belong to the current packet processing flow in the original data packet processing flow, and set its own state to the ordered state. At the same time, the receiving end will set the value of EPSN (the expected PSN of the next ordered data packet) to 1. Similarly, the receiving end will also record in the bitmap that the original data packet with PSN equal to 0 has been received. At the same time, the RDMA original data packet participates in the update of the intermediate value DEC(0) in the redundancy calculation of the receiving end, as shown in the following formula (8).

[0189] DEC (0) = DEC (0) ^ RDMA (0) (8)

[0190] It should be noted that in the embodiments of the present application, when the receiving end receives the RDMA data packet with PSN equal to 1, since the receiving end has updated the current packet to the packet being received at this time, the receiving end performs the comparison between EPSN and PSN according to step b in the processing procedure (2) of the data packet belonging to the current packet in the original data packet processing procedure. Since EPSN equal to PSN are both equal to 1, the receiving end submits this data packet to the receiving end RDMA protocol stack and updates the value of EPSN to 2. Meanwhile, the receiving end records in the bitmap that the original data packet with PSN equal to 1 has been received. This process is repeated until the reception of the data packet with PSN equal to 43 is completed. Meanwhile, each original data packet participates in the update of the corresponding DEC(i) value to ensure the correct calculation of the intermediate value, as shown in the following formula (9).

[0191] DEC(i mod r) = DEC(i mod r) ^ RDMA(i) (9)

[0192] It should be noted that in the embodiments of the present application, the RDMA original data packets with PSN from 43 to 49 are all lost, so when the receiving end receives the original data packet with PSN equal to 50, the receiving end determines that this data packet belongs to the packet being tracked according to the PSN value. Therefore, the receiving end compares EPSN and PSN according to step c in the processing procedure (2) of the data packet belonging to the current packet in the original data packet processing procedure. Since EPSN≠PSN, the receiving end identifies this original data packet as an out-of-sequence data packet and records its reception in the bitmap. The receiving end uses this data packet to update the corresponding DEC(2) value and then puts this data packet into the reordering buffer. Meanwhile, the receiving end changes its state to the REORDERING state.

[0193] It should be noted that in the embodiments of the present application, when the receiving end receives the subsequent original data packets with PSN from 50 to 127, since the receiving end is currently in the REORDERING state, the receiving end follows step a in the processing procedure (2) of the data packet belonging to the current packet in the original data packet processing procedure. The receiving end records the reception of these data packets in the bitmap, uses them to update the corresponding DEC value DEC(i), and then stores them in the reordering buffer.

[0194] It should be noted that in the embodiment of the present application, when the receiving end receives the XOR(0) redundancy repair data packet, it does not satisfy any discard condition in the redundancy repair data packet processing flow, and thus according to the redundancy repair packet processing flow (2), it uses the redundancy data thereof to repair the lost original data packet. According to the bitmap, among the original data packets of 0, 8, 16, … generated by participating in the XOR(0) redundancy repair data packet calculation, the receiving end has not received the original data packet of PSN=48. XOR operation of the DEC(0) value of the receiving end at this time and the redundancy repair data packet XOR(0) is performed, and the result obtained is the original data packet of PSN=48. Since the current state of the receiving end is out of order (REORDERING), the recovered original data packet is put into the reordering buffer. Finally, it is checked that the receiving end has not received all the lost original data packets, and thus the state of the receiving end and the reordering buffer are not changed. The same flow is performed for XOR(1) and XOR(3) to XOR(7).

[0195] It should be noted that in the embodiment of the present application, in particular, when the receiving end receives the XOR(2) redundancy repair data packet, since all the original data packets generated by participating in XOR(2) have been received, the receiving end directly discards the redundancy repair data packet according to the processing flow (1).

[0196] It should be noted that in the embodiment of the present application, when the receiving end receives the XOR(7) redundancy repair data packet, the same processing flow as XOR(0) is performed. However, after the recovered lost original data packet is put into the reordering buffer, according to the information of the original data packets recorded in the bitmap that have been received, the receiving end has received all the RDMA original data packets in the current packet, and thus all the RDMA original data packets temporarily stored in the reordering buffer need to be sent to the RDMA protocol stack and the contents in the reordering buffer are emptied.

[0197] It should be noted that in the embodiment of the present application, the receiving end RDMA protocol stack receives all the RDMA original data packets of PSN=0 to 127 completely and in order, and the original GBN retransmission mechanism of the RDMA protocol stack is not triggered. Since the time required for recovering the lost packets is much less than the time required for recovering the lost packets by retransmission in a wide area network, real-time recovery of the RDMA lost data packets is realized.

[0198] In summary, the redundancy generation module in the sending end device can group m data packets, determine r data packet groups, and then determine corresponding r redundancy repair data packets based on the r data packet groups. The m data packets and the corresponding r redundancy repair data packets can be sent to the receiving end device without introducing a new QP queue, without making any modifications to the application program, maintaining compatibility with the existing application program, without consuming more RDMA network card hardware resources, and reducing resource utilization. The newly added redundancy generation module and the identification and recovery module work in the sending end RDMA network card and the receiving end RDMA network card, respectively, so that no additional CPU burden is added, CPU resources are saved, and the identification and recovery module in the receiving end device can receive the m data packets and the r redundancy repair data packets sent by the redundancy generation module in the sending end device at the same time. In the case of packet loss, the identification and recovery module can recover the lost data packets through the received redundancy repair data packets in a very short time, thus having the advantage of real-time packet loss recovery.

[0199] The embodiment of the present application provides a packet loss recovery method, which is applied to a receiving end device and a sending end device. The receiving end device comprises an identification and recovery module, and the sending end device comprises a redundancy generation module. The identification and recovery module in the receiving end device receives m data packets and r redundancy repair data packets sent by the redundancy generation module in the sending end device. Wherein, m and r are positive integers. In the case that it is determined that there is packet loss based on the m data packets, r first target decoding values are determined based on the m data packets. Recovery processing is performed based on the r redundancy repair data packets and the r first target decoding values, so as to obtain the lost data packet. The sending end device receives s original data packets sent by an RDMA protocol stack module, and performs grouping processing on the s original data packets, so as to obtain q original data packet groups. Wherein, the q original data packet groups respectively comprise m data packets, and s, m and q are positive integers. Corresponding r redundancy repair data packets are determined based on the m data packets. Wherein, r is a positive integer. The m data packets and the corresponding r redundancy repair data packets are respectively sent to the receiving end device, so that the receiving end device performs packet loss recovery processing based on the m data packets and the corresponding r redundancy repair data packets, and obtains the lost data packet. Therefore, the receiving end device can simultaneously receive the m data packets and the r redundancy repair data packets. If it is detected that there is a packet loss, recovery processing can be performed based on the r redundancy repair data packets and the r first target decoding values, so as to obtain the lost data packet. Therefore, real-time packet loss recovery can be performed without the receiving end device requesting the sending end device to retransmit the lost data packet after detecting the loss of the data packet, so as to avoid the problem of time delay. The identification and recovery module in the present application can determine the r first target decoding values based on the m data packets. Then, recovery processing can be performed based on the r redundancy repair data packets and the r first target decoding values without the participation of the CPU in the recovery processing, so as to save valuable CPU resources. Since the m data packets and the r redundancy repair data packets are simultaneously received by the receiving end device, a new QP queue is not needed, so that the use of the RDMA network card hardware resources can be reduced, and the resource utilization rate is improved.

[0200] Embodiment five

[0201] Based on the above embodiment, the embodiment of the present application provides a receiving end device, Figure 10 The composition structure of the receiving end device is shown Figure One As shown in the figure, Figure 10 The receiving end device 10 comprises an identification and recovery module 11.

[0202] The identification and recovery module 11 is used for receiving m data packets and r redundancy repair data packets sent by a sending end device. Wherein, m and r are positive integers.

[0203] The identification and recovery module 11 is further configured to determine r first target decoding values based on the m data packets, in a case where it is determined that there is a missing data packet based on the m data packets.

[0204] The identification and recovery module 11 is further configured to perform recovery processing based on the r redundant repair data packets and the r first target decoding values to obtain the missing data packet.

[0205] In an embodiment of the present application, further, Figure 11 A schematic diagram of a constituent structure of a receiving end device Figure Two As shown in Figure 11 The receiving end device 10 can further include a first processor 12, a first memory 13 storing executable instructions of the first processor 12, and a first communication interface 14, and a first bus 15 for connecting the first processor 12, the first memory 13, and the first communication interface 14.

[0206] In an embodiment of the present application, the first processor 12 can be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, or a microprocessor. It can be understood that, for different devices, the electronic device for implementing the above processor functions can also be other devices, and the embodiments of the present application are not limited in this regard. The receiving end device 10 can further include a first memory 13, which can be connected to the first processor 12. The first memory 13 is configured to store executable program codes, and the program codes include computer operation instructions. The first memory 13 can include a high-speed RAM memory and can also include a non-volatile memory, such as at least two disk memories.

[0207] In an embodiment of the present application, the first bus 15 is configured to connect the first communication interface 14, the first processor 12, and the first memory 13, and enable mutual communication among these devices.

[0208] In an embodiment of the present application, the first memory 13 is configured to store instructions and data.

[0209] Further, in the embodiments of the present application, the first processor 12 is configured to receive m data packets and r redundancy repair data packets sent by a redundancy generation module in a sending end device; wherein m and r are both positive integers; in a case where it is determined based on the m data packets that there is a packet loss, determine r first target decoding values based on the m data packets; and perform recovery processing based on the r redundancy repair data packets and the r first target decoding values to obtain the lost data packet.

[0210] In actual applications, the first memory 13 can be a volatile memory such as a Random-Access Memory (RAM), or a non-volatile memory such as a Read-Only Memory (ROM), a flash memory, a Hard Disk Drive (HDD) or a Solid-State Drive (SSD), or a combination of the above types of memories, and provides instructions and data to the first processor 12.

[0211] The embodiments of the present application provide a receiving end device, which comprises an identification and recovery module. The identification and recovery module in the receiving end device receives m data packets and r redundancy repair data packets sent by a redundancy generation module in a sending end device; wherein m and r are both positive integers; in a case where it is determined based on the m data packets that there is a packet loss, determines r first target decoding values based on the m data packets; and performs recovery processing based on the r redundancy repair data packets and the r first target decoding values to obtain the lost data packet. As can be seen, the receiving end device can receive m data packets and r redundancy repair data packets at the same time, and if it is detected that there is a packet loss, recovery processing can be performed based on the r redundancy repair data packets and the r first target decoding values to obtain the lost data packet, so that real-time packet loss recovery can be performed without the receiving end device requesting the sending end device to retransmit the lost data packet after detecting the packet loss, thereby avoiding the problem of time delay. Moreover, the identification and recovery module in the present application can determine r first target decoding values based on the m data packets, and then perform recovery processing based on the r redundancy repair data packets and the r first target decoding values without the participation of a CPU, thereby saving valuable CPU resources. Moreover, the m data packets and the r redundancy repair data packets are received by the receiving end device at the same time, so that a new QP queue is not needed, thereby reducing the use of RDMA network card hardware resources, and further improving the resource utilization rate.

[0212] The embodiment of the present application provides a computer readable storage medium, which stores a program, and the program is executed by a processor to realize the packet loss recovery method.

[0213] Specifically, the program instruction corresponding to the packet loss recovery method in the embodiment can be stored on an optical disc, a hard disk, a U disk or the like, and when the program instruction corresponding to the packet loss recovery method in the storage medium is read or executed by an electronic device, the following steps are included.

[0214] receiving m data packets and r redundant repair data packets sent by the sending end device; wherein m and r are positive integers;

[0215] determining r first target decoding values based on the m data packets in a case where it is determined that there is packet loss based on the m data packets;

[0216] performing recovery processing based on the r redundant repair data packets and the r first target decoding values to obtain the lost data packet.

[0217] In the embodiment of the present application, further, Figure 12 The component structure of the sending end device is shown in the figure Figure One As shown in the figure, Figure 12 The sending end device 20 includes a redundancy generation module 21.

[0218] The redundancy generation module 21 is configured to receive s original data packets sent by a remote direct memory access (RDMA) protocol stack module, and perform grouping processing on the s original data packets to obtain q original data packet groups; wherein each of the q original data packet groups includes m data packets, and s, m and q are positive integers.

[0219] The redundancy generation module 21 is further configured to determine r redundant repair data packets corresponding to the m data packets based on the m data packets; wherein r is a positive integer.

[0220] The redundancy generation module 21 is further configured to send the m data packets and the r redundant repair data packets corresponding thereto to a receiving end device, so that the receiving end device performs packet loss recovery processing based on the m data packets and the r redundant repair data packets corresponding thereto to obtain a lost data packet.

[0221] In the embodiment of the present application, further, Figure 13 The component structure of the sending end device is shown in the figure Figure Two As shown in the figure, Figure 13As shown, the sending device 20 proposed in the embodiments of the present application can further include a second processor 22, a second memory 23 storing executable instructions of the second processor 22, further, the sending device 20 can further include a second communication interface 24, and a second bus 25 for connecting the second processor 22, the second memory 23 and the second communication interface 24.

[0222] In the embodiments of the present application, the second processor 22 can be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, or a microprocessor. It can be understood that, for different devices, the electronic device for realizing the functions of the processor can also be other devices, and the embodiments of the present application are not limited specifically. The sending device 20 can further include the second memory 23, which can be connected with the second processor 22, wherein the second memory 23 is used for storing executable program codes, the program codes including computer operation instructions, and the second memory 23 can include a high-speed RAM memory, and can also include a non-volatile memory, for example, at least two disk memories.

[0223] In the embodiments of the present application, the second bus 25 is used for connecting the second communication interface 24, the second processor 22 and the second memory 23 and the mutual communication among these devices.

[0224] In the embodiments of the present application, the second memory 23 is used for storing instructions and data.

[0225] Further, in the embodiments of the present application, the second processor 22 is configured to receive s original data packets sent by the RDMA protocol stack module, and perform grouping processing on the s original data packets to obtain q original data packet groups; wherein each of the q original data packet groups includes m data packets, and s, m and q are positive integers; determine r corresponding redundant repair data packets based on the m data packets; wherein r is a positive integer; and send the m data packets and the r corresponding redundant repair data packets to a receiving end device respectively, so that the receiving end device performs packet loss recovery processing based on the m data packets and the r corresponding redundant repair data packets to obtain lost data packets.

[0226] In actual applications, the second memory 23 can be a volatile memory such as a Random-Access Memory (RAM), or a non-volatile memory such as a Read-Only Memory (ROM), a flash memory, a Hard Disk Drive (HDD) or a Solid-State Drive (SSD), or a combination of the above types of memories, and provides instructions and data to the second processor 22.

[0227] The embodiments of the present application provide a sending end device. The sending end device includes a redundancy generation module. The sending end device receives s original data packets sent by an RDMA protocol stack module, and performs grouping processing on the s original data packets to obtain q original data packet groups; wherein each of the q original data packet groups includes m data packets, and s, m and q are positive integers; determines r corresponding redundant repair data packets based on the m data packets; wherein r is a positive integer; and sends the m data packets and the r corresponding redundant repair data packets to a receiving end device respectively, so that the receiving end device performs packet loss recovery processing based on the m data packets and the r corresponding redundant repair data packets to obtain lost data packets. Thus, the sending end device can determine r corresponding redundant repair data packets based on m data packets, and then send the m data packets and the r corresponding redundant repair data packets to the receiving end device together, so that the receiving end device performs packet loss recovery processing based on the m data packets and the r corresponding redundant repair data packets to obtain lost data packets, without introducing a new QP queue, without making any modifications to an application program, maintaining compatibility with the existing application program, and without consuming more RDMA network card hardware resources, reducing resource utilization.

[0228] The embodiment of the present application provides a computer readable storage medium, which stores a program, and the program is executed by a processor to realize the packet loss recovery method.

[0229] Specifically, the program instruction corresponding to the packet loss recovery method in the embodiment can be stored on an optical disc, a hard disk, a U disk or the like, and when the program instruction corresponding to the packet loss recovery method in the storage medium is read or executed by an electronic device, the following steps are included:

[0230] The s original data packets sent by the RDMA protocol stack module are received, and grouping processing is performed on the s original data packets to obtain q original data packet groups; wherein the q original data packet groups respectively include m data packets, and the s, m and q are positive integers;

[0231] The corresponding r redundant repair data packets are determined based on the m data packets; wherein the r is a positive integer;

[0232] The m data packets and the corresponding r redundant repair data packets are respectively sent to a receiving end device, so that the receiving end device performs packet loss recovery processing based on the m data packets and the corresponding r redundant repair data packets to obtain lost data packets.

[0233] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the present application can be in the form of a hardware embodiment, a software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage and optical storage) containing computer usable program codes.

[0234] The present application is described with reference to the implementation flowcharts and / or block diagrams of the method, device (system) and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram and the combination of the flows and / or blocks in the flowchart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device that realizes the functions specified in the flowchart and / or block diagram. Figure One The device that realizes the functions specified in one or more flows or one or more blocks Figure One The device that realizes the functions specified in one or more flows or one or more blocks

[0235] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the Figure One function specified in the flowchart or flowsheet and / or block Figure One s or blocks.

[0236] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions that are executed on the computer or other programmable apparatus provide steps for implementing the Figure One function specified in the flowchart or flowsheet and / or block Figure One s or blocks.

[0237] The above specification, examples and data provide essential information for constructing and using the application. They are not intended to limit the scope of the application, which is defined by the appended claims.

Claims

1. A packet loss recovery method, characterized by, The method is applied to a receiving end device, and the method comprises: receiving m data packets and r redundancy repair data packets sent by a sending end device; wherein m and r are positive integers; in a case where it is determined based on the m data packets that there is packet loss, determining r first target decoding values based on the m data packets; wherein the determining of the r first target decoding values based on the m data packets comprises: The m data packets are grouped to determine r data packet groups; wherein each data packet group includes the i-th data packet, the (i+r)-th data packet, the (i+2r)-th data packet, ..., the (i+1)-th data packet from the m data packets. There are 10 data packets, where i is an integer greater than or equal to 0 and less than or equal to r-1; determining the r first target decoding values corresponding to the r data packet groups based on the r data packet groups; wherein the determining of the r first target decoding values corresponding to the r data packet groups based on the r data packet groups comprises: after receiving an i th data packet and an i+r th data packet, determining r first decoding values based on the i th data packet and the i+r th data packet; after receiving an i+2r th data packet, updating the r first decoding values based on the i+2r th data packet respectively to obtain r second decoding values; When until receiving the ith data packet, based on the ith data packet, r Nth decoding values are updated respectively to obtain the r first target decoding values; wherein the r Nth decoding values are obtained based on the i-1th data packet and the i-2th data packet; and the r N-1th decoding values are obtained based on the i-1th data packet and the i-2th data packet. -2 ​​​ performing recovery processing based on the r redundancy repair data packets and the r first target decoding values to obtain lost data packets.

2. The method of claim 1, wherein, The performing of the recovery processing based on the r redundancy repair data packets and the r first target decoding values to obtain lost data packets comprises: determining a target group corresponding to the lost data packets based on the r data packet groups; wherein the target group is any one of the r data packet groups; determining a target redundancy repair data packet corresponding to the lost data packets based on the target group and the r redundancy repair data packets; determining a second target decoding value corresponding to the lost data packets based on the target group and the r first target decoding values; determining the lost data packets based on the target redundancy repair data packet and the second target decoding value.

3. The method of claim 1, wherein, After the receiving of the m data packets and the r redundancy repair data packets sent by the sending end device, the method further comprises: in a case where a first preset field value in the m data packets is a first preset value, determining identity information corresponding to the m data packets as redundancy repair data packet identity; or, in a case where the first preset field value in the m data packets is not the first preset value, determining identity information corresponding to the m data packets as original data packet identity; or, in a case where a second preset field value in the r redundancy repair data packets is the first preset value, determining identity information corresponding to the r redundancy repair data packets as redundancy repair data packet identity; or, in a case where the second preset field value in the r redundancy repair data packets is not the first preset value, determining identity information corresponding to the r redundancy repair data packets as original data packet identity.

4. The method of claim 1, wherein, The method further comprises: determining a packet sequence number PSN corresponding to an f th data packet in the m data packets; wherein f is a positive integer less than or equal to m; in a case where the PSN corresponding to the f th data packet is different from a preset PSN, determining that there is packet loss behavior.

5. The method of claim 4, wherein, The method further comprises: In a case where the first data packet in the received m data packets is the first data packet of the current group, it is determined that the state of the receiving end device is an in-order state; Correspondingly, the method further comprises: In a case where there is a packet loss behavior in the m data packets, the state of the receiving end device is updated to an out-of-order state; or, In a case where there is no packet loss behavior in the m data packets, the state of the receiving end device is maintained as the in-order state.

6. The method of claim 5, wherein, The method further comprises: In a case where the number of lost packets in the m data packets satisfies a first preset condition, the current state of the receiving end device is switched to an invalid state.

7. The method of claim 1, wherein, The method further comprises: In a case where the r redundant repair data packets satisfy a second preset condition, the r redundant repair data packets are discarded.

8. A packet loss recovery method, characterized by, The method is applied to a sending end device, and the method comprises: Receiving s original data packets sent by a remote direct memory access (RDMA) protocol stack module and performing grouping processing on the s original data packets to obtain q original data packet groups; wherein the q original data packet groups each comprise m data packets, and s, m, and q are positive integers; Determining r redundant repair data packets corresponding to the m data packets based on the m data packets; wherein r is a positive integer; The method further comprises: Determining r data packet groups corresponding to the m data packets based on the m data packets; and determining r redundant repair data packets corresponding to the r data packet groups based on the r data packet groups; The method further comprises: grouping the m data packets to determine r data packet groups; wherein each data packet group comprises an i-th data packet, an i+r-th data packet, an i+2r-th data packet, an i+3r-th data packet,..., and an i+nr-th data packet of the m data packets, i is an integer greater than or equal to 0 and less than or equal to r-1, and n is an integer greater than or equal to 1 and less than or equal to m / r; and performing error correction on each data packet group. The method further comprises: After receiving an i th data packet and an i+r th data packet, determining r first encoding values based on the i th data packet and the i+r th data packet; After receiving an i+2r th data packet, performing update processing on the r first encoding values based on the i+2r th data packet respectively to obtain r second encoding values; When until receiving the ith data packet, update rth Nth encoding values respectively based on the ith data packet; obtain the r first target encoding values; wherein the rth Nth encoding values are obtained by updating rth N-1th encoding values respectively based on r data packets. -2] ​ Determining r redundant repair data packets corresponding to the r first target encoding values respectively based on the r first target encoding values; Sending the m data packets and the corresponding r redundant repair data packets to a receiving end device respectively, so that the receiving end device performs packet loss recovery processing based on the m data packets and the corresponding r redundant repair data packets to obtain lost data packets.

9. The method of claim 8, wherein, The redundant repair data packet comprises a first header field; the first header field comprises at least a second preset field, a third preset field, a fourth preset field, a fifth preset field, a sixth preset field and a seventh preset field; the second preset field is used for the receiving end device to judge identity information corresponding to the redundant repair data packet; the identity information comprises original data packet identity or redundant repair data packet identity; the third preset field is used for representing target queue pair number QPN; the fourth preset field is used for representing source segment start point PSN; the fifth preset field is used for representing the number of packet intervals; the sixth preset field is used for representing the number of redundant repair data packets; and the seventh preset field is used for representing the number of the current redundant repair data packet.

10. A receiving end device, characterized by The receiving end device comprises an identification recovery module. The identification and recovery module is used to receive m data packets and r redundant repair data packets sent by the sending device; where m and r are both positive integers; it is also used to determine r first target decoding values ​​based on the m data packets if packet loss is determined based on the m data packets; wherein, determining r first target decoding values ​​based on the m data packets includes: grouping the m data packets to determine r data packet groups; wherein each data packet group includes the i-th data packet, the (i+r)-th data packet, the (i+2r)-th data packet, ..., the (i+1)-th data packet from the m data packets. There are r data packets, where i is an integer greater than or equal to 0 and less than or equal to r-1; the r first target decoded values ​​are determined based on the r data packet groups; wherein, determining the r first target decoded values ​​based on the r data packet groups includes: after receiving the i-th data packet and the (i+r)-th data packet, determining r first decoded values ​​based on the i-th data packet and the (i+r)-th data packet; after receiving the (i+2r)-th data packet, updating the r first decoded values ​​based on the (i+2r)-th data packet to obtain r second decoded values; until the i+... After the i+th data packet, based on the i+th... Each data packet updates the r-th Nth decoded value to obtain the r-th first target decoded value; wherein, the r-th Nth decoded value is based on the (i+1)th... -2 The data is obtained by updating the r (N-1)th decoded value using r data packets; it is also used to perform recovery processing based on the r redundant repair data packets and the r first target decoded values ​​to obtain the lost data packets.

11. A receiving end device, characterized by The receiving end device comprises a first processor and a first memory; wherein The first memory is used for storing a computer program capable of running on the processor; The first processor is used for executing the method according to any one of claims 1-7 when the computer program is run.

12. A transmitting device, comprising: The sending end device comprises a redundancy generation module. The redundancy generation module is used to receive s raw data packets sent by the Remote Direct Memory Access (RDMA) protocol stack module, and to group the s raw data packets to obtain q raw data packet groups; wherein each q raw data packet group includes m data packets, and s, m, and q are all positive integers; it is also used to determine r corresponding redundancy repair data packets based on the m data packets; wherein r is a positive integer; wherein determining the r corresponding redundancy repair data packets based on the m data packets includes: determining r corresponding data packet groups based on the m data packets; determining r corresponding redundancy repair data packets based on the r data packet groups; wherein determining the r corresponding data packet groups based on the m data packets includes: grouping the m data packets to determine r data packet groups; wherein each data packet group includes the i-th data packet, the (i+r)-th data packet, the (i+2r)-th data packet, ..., the (i+1)-th data packet from the m data packets. There are r data packets, where i is an integer greater than or equal to 0 and less than or equal to r-1; wherein, determining the corresponding r redundancy repair data packets based on the r data packet groups includes: after receiving the i-th data packet and the (i+r)-th data packet, determining r first encoded values ​​based on the i-th data packet and the (i+r)-th data packet; after receiving the (i+2r)-th data packet, updating the r first encoded values ​​based on the (i+2r)-th data packet to obtain r second encoded values; until the i+... After the data packet, based on the i+th... Each data packet updates the r Nth encoded values; the r first target encoded values ​​are obtained; wherein the r Nth encoded values ​​are based on the i+1th [ -2] The data is obtained by updating r (N-1)th encoded values ​​with r data packets respectively; based on the r first target encoded values, r corresponding redundancy repair data packets are determined respectively; the data packets and the corresponding r redundancy repair data packets are also sent to the receiving device respectively, so that the receiving device can perform packet loss recovery processing based on the m data packets and the corresponding r redundancy repair data packets to obtain the lost data packets.

13. A transmitting device, comprising: The sending end device comprises a second processor and a second memory; wherein The second memory is used for storing a computer program capable of running on the processor; The second processor is used for executing the method according to any one of claims 8-9 when the computer program is run.

14. A computer-readable storage medium, characterized in that, The storage medium stores computer program code, which, when executed by a computer, executes the method according to any one of claims 1-7 or 8-9.

15. A computer program product comprising a computer program, characterized in that, The computer program, when executed by a processor, implements the method according to any one of claims 1-7 or 8-9.

Citation Information

Patent Citations

  • Method and device for verifying data recovered by forward error correction

    CN101662339A

  • Apparatus and method for remote direct data access

    CN116389611A