Data retransmission method and apparatus, electronic device, and computer program product

CN123019976APending Publication Date: 2026-10-30CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611179216.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-04
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

这种重传策略造成了巨大的带宽浪费,在高速网络环境中尤为严重

Benefits of technology

[0020]本发明的优点和有益效果将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123019976A_ABST
    Figure CN123019976A_ABST
Patent Text Reader

Abstract

The application discloses a data retransmission method and device, electronic equipment and computer program product, comprising: sending target data packets by a sending end according to PSN serial numbers, and caching copies in a retransmission buffer; when an intermediate device detects that a target data packet is lost, generating a corresponding LNP control message and sending the LNP control message to a receiving end and the sending end; the receiving end determines a target PSN serial number according to the LNP control message, and transmits disordered arriving packets of the receiving end to user memory based on DMA technology and marks the disordered arriving packets in a data bitmap; the sending end determines retransmission data packets from the copies cached in the retransmission buffer according to the target PSN serial number, and performs selective retransmission; and the receiving end performs PSN continuity verification on the retransmission data packets according to the data bitmap, and transmits the retransmission data packets to the user memory based on DMA technology after the verification is passed. The application improves network effective throughput and reliability, reduces data transmission delay, and can be widely applied to the technical field of communication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and in particular to a data retransmission method, apparatus, electronic device, and computer program product. Background Technology

[0002] With the rapid development of data-intensive applications such as artificial intelligence training, high-performance computing, and distributed storage, Remote Direct Memory Access (RDMA) technology has become a core transmission protocol in modern data center networks due to its extremely low CPU overhead and microsecond-level latency. Among them, the RDMA (RoCEv2) protocol based on converged Ethernet has been widely deployed due to its good Ethernet compatibility.

[0003] However, the Go-Back-N retransmission mechanism used by RoCEv2 in Reliable Connection (RC) mode has serious performance flaws. When packet loss occurs, the sender must retransmit all packets within the entire sending window from the point of loss, even if those packets have already arrived correctly at the receiver. This retransmission strategy results in a huge waste of bandwidth, especially in high-speed network environments.

[0004] Existing solutions mainly focus on end-to-end optimization, such as adjusting congestion control parameters and optimizing buffer management, but these methods cannot fundamentally overcome the inherent limitations of Go-Back-N. On the other hand, although the traditional TCP protocol supports the Selective Acknowledgment (SACK) mechanism, its software-implemented processing latency cannot meet the microsecond-level performance requirements of RDMA.

[0005] Therefore, there is an urgent need for a new retransmission mechanism that is compatible with the existing RoCEv2 protocol and can overcome the Go-Back-N limitation in order to meet the stringent requirements of next-generation data center networks for high throughput, low latency and high reliability. Summary of the Invention

[0006] The purpose of this invention is to at least partially solve one of the technical problems existing in the prior art.

[0007] Therefore, one objective of this invention is to provide a data retransmission method that avoids large-scale redundant retransmissions of the Go-Back-N mechanism, improves network throughput and reliability, and reduces data transmission latency.

[0008] Another objective of this invention is to provide a data retransmission device.

[0009] To achieve the above-mentioned technical objectives, the technical solutions adopted in the embodiments of the present invention include: On one hand, embodiments of the present invention provide a data retransmission method, including the following steps: The target data packet is sent by the sending end according to the PSN sequence number, and a copy of the target data packet is cached in the retransmission buffer; When the intermediate device detects the loss of the target data packet, it generates a corresponding LNP control message and sends the LNP control message to the receiving end and the sending end. When the receiving end receives the LNP control message, it determines the target PSN sequence number according to the LNP control message, and transmits the out-of-order packets of the receiving end to the user memory based on DMA technology and maps them to the data bitmap for marking according to the target PSN sequence number. When the sending end receives the LNP control message, it determines the target PSN sequence number according to the LNP control message, and determines the retransmission data packet from the copy cached in the retransmission buffer according to the target PSN sequence number, and then performs selective retransmission on the retransmission data packet. When the receiving end receives the retransmission data packet, it performs PSN continuity verification on the retransmission data packet according to the data bitmap, and after the verification is successful, it transmits the retransmission data packet to the user memory based on DMA technology.

[0010] Furthermore, in one embodiment of the present invention, the step of sending the target data packet by the sending end according to the PSN sequence number and caching a copy of the target data packet by a retransmission buffer specifically includes: When the sending end receives a data transmission request from the application layer, it determines the target data packet based on the data transmission request and assigns the corresponding PSN sequence number to the target data packet. The target data packet is added to the sending queue according to the PSN sequence number, a copy of the target data packet is copied to the retransmission buffer, and the mapping relationship between the copy and the PSN sequence number is stored. The target data packet is sent to the receiving end according to the sending queue.

[0011] Furthermore, in one embodiment of the present invention, the step of generating a corresponding LNP control message and sending the LNP control message to the receiving end and the sending end when the intermediate device detects packet loss of the target data packet specifically includes: The intermediate device monitors the sending queue of the sending end; When packet loss occurs in the sending queue, the target PSN sequence number corresponding to the lost target data packet is determined, and the LNP control message is generated based on the target PSN sequence number; The LNP control message is sent to the receiving end and the sending end through the control message queue.

[0012] Furthermore, in one embodiment of the present invention, the step of determining the target PSN sequence number based on the LNP control message, and transferring the out-of-order packets of the receiving end to the user memory based on DMA technology and mapping them to a data bitmap for marking according to the target PSN sequence number, specifically includes: The target PSN sequence number is obtained by parsing the LNP control message, and the target data packet corresponding to the target PSN sequence number is recorded as lost at the receiving end. When a first data packet with a PSN sequence number greater than the target PSN sequence number arrives at the receiving end, the first data packet is determined to be the out-of-order arrival packet. The first virtual address is obtained by parsing the out-of-order packet, and the out-of-order packet is transferred to the user memory based on DMA technology according to the first virtual address. The PSN sequence number corresponding to the out-of-order arrival packet is mapped to the data bitmap for marking.

[0013] Further, in one embodiment of the present invention, the step of determining the target PSN sequence number based on the LNP control message, determining the retransmission data packet from the copy cached in the retransmission buffer based on the target PSN sequence number, and then selectively retransmitting the retransmission data packet specifically includes: The target PSN sequence number is obtained by parsing the LNP control message, and the target data packet corresponding to the target PSN sequence number is recorded as lost at the sending end. The corresponding target copy is obtained by querying the retransmission buffer based on the target PSN sequence number, and the retransmission data packet is generated based on the target copy; The retransmission data packet is added to the sending queue, and the retransmission data packet is sent to the receiving end according to the sending queue.

[0014] Furthermore, in one embodiment of the present invention, the step of performing PSN continuity verification on the retransmitted data packet according to the data bitmap, and transferring the retransmitted data packet to the user memory based on DMA technology after successful verification, specifically includes: Determine the target PSN sequence number corresponding to the retransmitted data packet, and determine whether the target PSN sequence number is missing in the data bitmap and whether there is a PSN sequence number before / after the target PSN sequence number; When the target PSN sequence number is missing in the data bitmap, but there are PSN sequence numbers before and after the target PSN sequence number, the PSN continuity verification is determined to be successful, and the corresponding second virtual address is obtained by parsing the retransmitted data packet. The retransmission data packet is transmitted to the user memory based on DMA technology using the second virtual address, and the target PSN sequence number corresponding to the retransmission data packet is mapped to the data bitmap for marking.

[0015] Furthermore, in one embodiment of the present invention, the data bitmap is used to record the reception status of the target data packet. Each bit in the data bitmap corresponds to a PSN sequence number. When the bit is 1, it indicates that the target data packet with the corresponding PSN sequence number has been received. When the bit is 0, it indicates that the target data packet with the corresponding PSN sequence number has not been received.

[0016] On the other hand, embodiments of the present invention provide a data retransmission apparatus, including: The data packet sending module is used to send the target data packet according to the PSN sequence number through the sending end, and to cache a copy of the target data packet through the retransmission buffer; The sending detection module is used to generate a corresponding LNP control message when the intermediate device detects the loss of the target data packet, and send the LNP control message to the receiving end and the sending end; The out-of-order packet processing module is used to determine the target PSN sequence number according to the LNP control message when the receiving end receives the LNP control message, and to transfer the out-of-order packets of the receiving end to the user memory based on DMA technology and map them to the data bitmap for marking according to the target PSN sequence number. The data packet retransmission module is used to determine the target PSN sequence number according to the LNP control message when the sending end receives the LNP control message, and determine the retransmission data packet from the copy cached in the retransmission buffer according to the target PSN sequence number, and then select and retransmit the retransmission data packet. The retransmission data packet processing module is used to perform PSN continuity verification on the retransmission data packet according to the data bitmap when the receiving end receives the retransmission data packet, and transfer the retransmission data packet to the user memory based on DMA technology after the verification is successful.

[0017] On the other hand, embodiments of the present invention provide an electronic device, the electronic device including a memory, a processor, a computer program stored in the memory and executable on the processor, and a data bus for implementing connection communication between the processor and the memory, wherein the computer program, when executed by the processor, implements the data retransmission method as described above.

[0018] On the other hand, embodiments of the present invention also provide a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more computer programs, which can be executed by one or more processors to implement the data retransmission method as described above.

[0019] On the other hand, embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the data retransmission method as described above.

[0020] The advantages and beneficial effects of the present invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention: In this embodiment of the invention, the sending end sends the target data packet according to the PSN sequence number and caches a copy of the target data packet in the retransmission buffer. When the intermediate device detects the loss of the target data packet, it generates a corresponding LNP control message and sends the LNP control message to both the receiving end and the sending end. When the receiving end receives the LNP control message, it determines the target PSN sequence number based on the LNP control message, and transfers the out-of-order packets of the receiving end to the user memory using DMA technology and marks them by mapping them to the data bitmap. When the sending end receives the LNP control message, it determines the target PSN sequence number based on the LNP control message, and determines the retransmission data packet from the copy cached in the retransmission buffer based on the target PSN sequence number, and then performs selective retransmission of the retransmission data packet. When the receiving end receives the retransmission data packet, it performs PSN continuity verification on the retransmission data packet according to the data bitmap, and after successful verification, it transfers the retransmission data packet to the user memory using DMA technology. This invention, through the proactive detection and precise notification of the PSN sequence number of lost data packets by intermediate network devices, enables the sender to retransmit only the specific lost packets rather than the entire transmission window. This fundamentally avoids the large-scale redundant retransmissions of the Go-Back-N mechanism, improving network throughput and reducing data transmission latency. Upon receiving packet loss information, the receiver can preemptively place out-of-order valid data packets directly into user memory, breaking the traditional strict sequential processing limitation and significantly reducing the impact of packet loss recovery on upper-layer application performance. Furthermore, by establishing a three-way collaborative mechanism between the intermediate device, sender, and receiver through LNP control messages, the network devices are deeply involved in ensuring transmission reliability, constructing an intelligent end-network collaborative data plane. This enhances the network's ability to respond to sudden congestion and instantaneous packet loss, improving network service stability. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the embodiments of the present invention are described below. It should be understood that the drawings described below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 A flowchart illustrating one step of the data retransmission method provided in this embodiment of the invention; Figure 2 A flowchart of step S101 provided in an embodiment of the present invention; Figure 3 A flowchart of step S102 provided in an embodiment of the present invention; Figure 4 A flowchart of step S103 provided in an embodiment of the present invention; Figure 5 A flowchart of step S104 provided in an embodiment of the present invention; Figure 6 A flowchart of step S105 provided in an embodiment of the present invention; Figure 7 This is a schematic diagram illustrating an application scenario of the data retransmission method provided in this embodiment of the invention. Figure 8 A schematic diagram of the message format of the LNP control message provided in an embodiment of the present invention; Figure 9 This is a schematic diagram of the data retransmission device provided in an embodiment of the present invention; Figure 10 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention; Figure 11 This is a schematic diagram of the structure of the storage medium provided in an embodiment of the present invention. Detailed Implementation

[0023] The embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application. It should be noted that although functional modules are divided in the system schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system schematic diagram or the order in the flowchart. The step numbers in the following embodiments are only set for ease of explanation and do not limit the order between steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.

[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0025] The existing RoCEv2 transmission scheme has the following problems: 1) RoCEv2 has high requirements for network quality; packet loss will cause a significant drop in the actual network transmission efficiency. If the sender receives a NAK, it will retransmit the expected PSN packet in the buffer and subsequent packets (GO-BACK-N), resulting in a large number of retransmissions and reducing the effective transmission efficiency.

[0026] 2) Intermediate devices do not handle packet loss; packet loss is determined at the receiving end, which cannot quickly determine whether the packet is lost or arrived out of order. Out-of-order packets are first placed in an out-of-order queue, and then a timer is started to wait. Considering the queue length, the timer will not wait for a long time. If out-of-order packets overflow the out-of-order queue, they will be discarded.

[0027] This invention provides a data retransmission scheme for reliable transmission of RDMA, eliminating the need for the original GO-BACK-N mechanism, and greatly improving the effective transmission efficiency in networks with poor quality and packet loss.

[0028] The following explains some of the terms used in the embodiments of the present invention.

[0029] RDMA: Remote Direct Memory Access is a network technology that allows a computer to directly access the memory of another computer without operating system intervention, achieving ultra-low latency and zero CPU copy data transfer.

[0030] RoCEv2: RDMA version 2 based on converged Ethernet, is an implementation of RDMA technology on Ethernet. It uses UDP / IP encapsulation, supports operation on standard Ethernet infrastructure, and enables high-performance network communication at the data center level.

[0031] Queue Pair (QP): An endpoint for RDMA communication, consisting of a transmit queue (SQ) and a receive queue (RQ).

[0032] Send queue (SQ): A queue where applications submit requests for operations such as "send" or "write". DRAM can reside in user space or kernel space.

[0033] Receive Queue (RQ): A buffer reserved for applications to submit "receive" operation requests (for receiving messages) or for "remote direct write" operations. DRAM can be in user space or kernel space.

[0034] Work Request (WR): A description of an operation submitted by an application to SQ or RQ.

[0035] Work Queue Element (WQE): An entry in the SQ / RQ that carries specific information about the WR.

[0036] PSN (Packet Sequence Number): The sequence number of each data packet, which is the cornerstone of reliability, order, and retransmission.

[0037] NAK (Negative Acknowledgment): Used to indicate that data reception failed or was incorrect. It is the opposite of ACK (Acknowledgment).

[0038] GO-BACK-N: RoCE2's packet loss mechanism. After a packet is lost, the sender retransmits the lost frame and all subsequent unacknowledged packets.

[0039] Selective retransmission: After packet loss, the sender only retransmits the lost data packets. For example, the TCP retransmission mechanism.

[0040] The data retransmission method provided in this application can be applied to a terminal, a server, or software running on a terminal or server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or vehicle terminal, but is not limited thereto; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application implementing a driver status monitoring method based on machine vision, but is not limited to the above forms.

[0041] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0042] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards of the relevant countries and regions. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirects to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data for the proper functioning of the embodiments of this application obtained.

[0043] like Figure 1 The diagram shown is a flowchart of one step of the data retransmission method provided in an embodiment of the present invention. (Refer to...) Figure 1This invention provides a data retransmission method, which specifically includes the following steps: S101. The target data packet is sent by the sending end according to the PSN sequence number, and a copy of the target data packet is cached in the retransmission buffer; S102. When the intermediate device detects that the target data packet is lost, it generates the corresponding LNP control message and sends the LNP control message to the receiving end and the sending end. S103. When the receiving end receives the LNP control message, it determines the target PSN sequence number according to the LNP control message, and transmits the out-of-order packets of the receiving end to the user memory based on DMA technology and marks them in the data bitmap according to the target PSN sequence number. S104. When the sending end receives the LNP control message, it determines the target PSN sequence number according to the LNP control message, and determines the retransmission data packet from the copy cached in the retransmission buffer according to the target PSN sequence number, and then selects and retransmits the retransmission data packet. S105. When the receiving end receives a retransmission data packet, it performs PSN continuity verification on the retransmission data packet according to the data bitmap, and after the verification is successful, it transfers the retransmission data packet to the user memory based on DMA technology.

[0044] It can be recognized that, through the proactive detection and precise notification of the PSN sequence number of lost data packets by intermediate network devices, the sending end only retransmits specific lost packets rather than the entire sending window, fundamentally avoiding the large-scale redundant retransmissions of the Go-Back-N mechanism, improving the effective network throughput, and reducing data transmission latency. After learning of the packet loss information, the receiving end can pre-place out-of-order valid data packets directly into the user memory, breaking the traditional limitation of strict in-order processing and significantly reducing the impact of packet loss recovery on the performance of upper-layer applications. By establishing a three-way collaborative mechanism between intermediate devices, sending end, and receiving end through LNP control messages, the network devices are deeply involved in ensuring transmission reliability, constructing an intelligent end-network collaborative data plane, enhancing the network's ability to cope with sudden congestion and instantaneous packet loss, and improving the stability of network services.

[0045] like Figure 2 The diagram shown is a flowchart of step S101 provided in an embodiment of the present invention. (Refer to...) Figure 2 As an optional implementation, the target data packet is sent by the sending end according to the PSN sequence number, and a copy of the target data packet is cached in the retransmission buffer, specifically including: S1011. When the sending end receives a data transmission request from the application layer, it determines the target data packet according to the data transmission request and assigns a corresponding PSN sequence number to the target data packet. S1012. Add the target data packet to the sending queue according to the PSN sequence number, copy a copy of the target data packet to the retransmission buffer and store the mapping relationship between the copy and the PSN sequence number; S1013. Send the target data packet to the receiving end according to the sending queue.

[0046] Specifically, the application layer submits a send request to the RDMA sender, for example, by submitting a Send WR (Work Request, RDMA write mode messages can carry virtual addresses) via the Verbs API. The sender detects that the application layer wants to send data packets via the RDMA protocol, consumes the WQE (Work Queue Element) in the SQ through the RNIC hardware, assigns a PSN (PACKet Sequence Number) to the data packet, copies the data packet to the retransmission buffer, and finally sends the data packet to the network. The sender maintains a range of sent but unacknowledged PSNs, and the retransmission buffer stores copies of these data packets. Ultimately, the RNIC hardware consumes the application layer's request, and the RDMA data packets are sent out in order.

[0047] like Figure 3 The diagram shown is a flowchart of step S102 provided in an embodiment of the present invention. (Refer to...) Figure 3 As an optional implementation, when the intermediate device detects packet loss of the target data packet, it generates a corresponding LNP control message and sends the LNP control message to both the receiver and the sender, specifically including: S1021. Monitor the sending queue of the sending end through intermediate devices; S1022. When packet loss occurs in the sending queue, determine the target PSN sequence number of the lost target data packet, and generate an LNP control message based on the target PSN sequence number. S1023. Send LNP control messages to the receiver and sender through the control message queue.

[0048] Specifically, the queue status is monitored through intermediate devices (intermediate routers / switches). When packet loss occurs (e.g., queue overflow), the specific dropped data packets are detected. The RoCEv2 header of the lost packet is parsed to obtain the target QP number and PSN sequence number. An LNP control message is generated, an extended LNP control message is encapsulated, and then the extended LNP is sent to both the sender and receiver. To ensure that control messages are not lost, control messages and data messages use different queues. Control messages and data messages are classified using opcodes; those with the highest bit (bit 7) set to 1 are control messages.

[0049] like Figure 4 The diagram shown is a flowchart of step S103 provided in an embodiment of the present invention. (Refer to...) Figure 4As an optional implementation, the target PSN sequence number is determined based on the LNP control message, and out-of-order packets arriving at the receiving end are transferred to user memory using DMA technology and marked in a data bitmap based on the target PSN sequence number. Specifically, this includes: S1031. Parse the LNP control message to obtain the target PSN sequence number, and record at the receiving end that the target data packet corresponding to the target PSN sequence number has been lost; S1032. When the first data packet with a PSN sequence number greater than the target PSN sequence number arrives at the receiving end, the first data packet is determined to be an out-of-order packet. S1033. Obtain the corresponding first virtual address by parsing the out-of-order packet, and transfer the out-of-order packet to the user memory based on DMA technology according to the first virtual address; S1034. Map the PSN sequence number corresponding to the out-of-order packets to the data bitmap for marking.

[0050] Specifically, upon receiving an LNP control message, the receiving end identifies the LNP control message, extracts the PSN sequence number (let's call it L) of the lost data packet, and determines that the data packet with PSN=L has been lost. For out-of-order packets with PSN>L, the receiving end directly accesses the user memory based on the virtual address in the message and writes the out-of-order packet. Simultaneously, it maps the PSN sequence number to the data bitmap for marking, waiting for lost packets to fill in the gaps. The receiving end uses the data bitmap to record the received PSN sequence numbers and updates the Expected PSN list based on the data bitmap.

[0051] like Figure 5 The diagram shown is a flowchart of step S104 provided in an embodiment of the present invention. (Refer to...) Figure 5 As an optional implementation, the target PSN sequence number is determined based on the LNP control message, and retransmitted data packets are determined from the copy cached in the retransmission buffer based on the target PSN sequence number. Then, the retransmitted data packets are selectively retransmitted, specifically including: S1041. Parse the LNP control message to obtain the target PSN sequence number, and record at the sending end that the target data packet corresponding to the target PSN sequence number has been lost; S1042. Query the corresponding target copy in the retransmission buffer according to the target PSN sequence number, and generate a retransmission data packet based on the target copy; S1043. Add the retransmission data packet to the sending queue, and send the retransmission data packet to the receiving end according to the sending queue.

[0052] Specifically, when the sending end receives the LNP control message, it extracts key information such as the target QP, the lost PSN sequence number (L), and the reason for packet loss. Then, it enables selective retransmission, retrieving only packets with PSN=L from the retransmission buffer and retransmitting these specific data packets, without executing Go-Back-N (not retransmitting packets with PSN>L).

[0053] like Figure 6 The diagram shown is a flowchart of step S105 provided in an embodiment of the present invention. (Refer to...) Figure 6 As an optional implementation, the retransmitted data packets are subjected to PSN continuity verification based on the data bitmap, and after successful verification, the retransmitted data packets are transferred to user memory using DMA technology, specifically including: S1051. Determine the target PSN sequence number corresponding to the retransmitted data packet, and determine whether the target PSN sequence number is missing in the data bitmap and whether there is a PSN sequence number before / after the target PSN sequence number. S1052. When the target PSN sequence number is missing in the data bitmap, and there are PSN sequence numbers before and after the target PSN sequence number, the PSN continuity verification is confirmed to be successful, and the corresponding second virtual address is obtained by parsing the retransmitted data packet. S1053. Based on the second virtual address and using DMA technology, the retransmission data packet is transferred to the user memory, and the target PSN sequence number corresponding to the retransmission data packet is mapped to the data bitmap for marking.

[0054] Specifically, when the receiving end receives the retransmitted PSN=L packet, it verifies the continuity of the PSN, confirms whether to update the ExpectedPSN list, maps the PSN sequence number of the retransmitted data packet to the data bitmap for marking, and then directly accesses the user memory according to the virtual address in the message and writes the retransmitted data packet.

[0055] As an optional implementation, the data bitmap is used to record the reception status of the target data packet. Each bit in the data bitmap corresponds to a PSN sequence number. When the bit is 1, it indicates that the target data packet with the corresponding PSN sequence number has been received. When the bit is 0, it indicates that the target data packet with the corresponding PSN sequence number has not been received.

[0056] It should be noted that this embodiment of the invention achieves a precise selective retransmission mechanism by extending the LNP control message of RoCEv2 and reconstructing the receiving and sending end processing engine. When queue overflow packet loss is detected, the intermediate forwarding device will parse the BTH header of the dropped data packet in real time, extract its 24-bit PSN sequence number, encapsulate it into an LNP message, and then notify the receiving end first and then the sending end. After the receiving end learns the specific lost PSN through the LNP message, it accurately tracks the packet reception status by maintaining a bitmap data structure. Each bit in the bitmap corresponds to a PSN, with 1 indicating that it has been received and 0 indicating that it has not been received. For data packets that arrive out of order after the PSN is lost, the receiving end breaks through the traditional strict order processing limitation and directly performs DMA to write the data into user memory based on the virtual address and rkey carried in the packet, and marks the corresponding PSN in the bitmap. After receiving the LNP, the sending end only accurately retrieves the data packet corresponding to the lost PSN from the retransmission buffer for retransmission, instead of retransmitting the entire window as in the traditional Go-Back-N mechanism. When a lost packet finally arrives, the receiver quickly identifies the continuity recovery point using a bitmap, updates the ExpectedPSN, and achieves coordinated optimization of selective retransmission and out-of-order handling under zero-copy premise. The receiver determines whether the application has completed the transmission task based on the bitmap. If the sender does not receive acknowledgment control messages such as ACK, NACK, or PSN, triggering a timer timeout, given that this situation is unlikely, the traditional Go-Back-N method will be used to retransmit packets with a buffer PSN greater than the Last ACKed PSN.

[0057] Furthermore, this embodiment of the invention extends the RoCEv2 control plane message by adding an LNP message while maintaining compatibility with existing types. The type of the control message is 0x88 in the Opcode field of the BTH header. This control message is used to notify the sending and receiving intermediate devices which specific data packets have been lost. When the switch detects packet loss, it parses the BTH header of the dropped data packets, extracts key metadata such as the 24-bit PSN sequence number and the target QP number, and encapsulates it into an LNP message. The message format is as follows: Figure 8 As shown, the message is first sent to the receiver and then to the sender, establishing a three-way collaborative recovery mechanism. The receiver adjusts its original packet reception strategy accordingly; out-of-order packets are no longer cached in the out-of-order queue, but are directly written to user memory based on the virtual address in the message. The sender avoids the bandwidth waste of Go-Back-N by accurately locating the retransmission target. Figure 8 In this context, Se|M represents the request event flag / migration status flag, Tver represents the transport protocol version, P_Key represents the partition key, Lost PSN represents the PSN sequence number that identifies the lost message, and Destination QP represents the destination QP number.

[0058] like Figure 7 The diagram illustrates an application scenario of the data retransmission method provided in this embodiment of the invention. This invention is applicable to scenarios such as wide-area lossless collaborative training / inference. Taking Xincheng Network as an example, the intelligent computing servers in the customer's data center and the intelligent computing servers in the intelligent computing center are connected via the Xincheng Network. To meet the high-quality transmission requirements of intelligent computing services, technologies such as SRV6-TE, small-granularity slicing, and flow-following detection are used to provide end-to-end highly elastic and reliable dedicated lines for intelligent computing services. When congestion occurs in intermediate network devices, wide-area precise flow control technology is used to backpressure hop-by-hop, reducing the sending end's speed and minimizing packet loss. These technologies effectively reduce the probability of packet loss, but cannot completely eliminate it. For example, when the distance of the wide-area connection is too far, some packet loss will still occur. In this situation, the data retransmission method in this embodiment of the invention can reduce excessive retransmissions of RoCEv2 and improve the actual transmission efficiency of the network.

[0059] like Figure 7 As shown, one intelligent computing server is deployed at both the client-side intelligent computing center and the intelligent computing side, deploying a large language model and adopting a lossless intelligent computing leased line network solution. The metropolitan area network carries lossless leased line services through SRv6-TE small-granularity slices. Wide-area lossless operation is enabled globally, with zero packet loss end-to-end, ensuring high-throughput lossless parameter plane operation. 10G small-granularity slices are deployed throughout the SRv6Policy tunnels between CPE and Sleaf, and between CPE and the interconnected computing gateway.

[0060] When training begins on the intelligent computing server, the training sample data reaches the intelligent computing server in the data center through a high-security network constructed using Srv6-te and small-granular slices. During the training / inference of large models, many sudden spikes in traffic occur. These spikes can be mitigated through the large buffers of network devices and wide-area, precise flow control, minimizing packet loss.

[0061] When Spine detects packet loss in the queue, it encapsulates the PSN, QP, and other information of the lost data packets into an LNP control message, which is then sent to the receiver first and then to the sender. Upon receiving the LNP message, the intelligent computing server extracts the message information. For out-of-order data packets arriving after the PSN loss, the receiver breaks away from the traditional strict order processing limitation and directly performs DMA to write the data to user memory based on the virtual address and rkey carried in the packet, marking the corresponding PSN in the bitmap. Upon receiving the LNP, the sending intelligent computing server only precisely retrieves the data packet corresponding to the lost PSN from the retransmission buffer for retransmission, instead of retransmitting the entire window as in the traditional Go-Back-N mechanism. When the lost packet finally arrives at the receiving intelligent computing server after retransmission, the intelligent computing server's RNIC quickly identifies the continuity recovery point through the bitmap, confirms whether the Expected PSN has been updated, and determines whether the application has completed the transmission task for that QP based on the bitmap. If the sender does not receive an ACK or nACK and triggers a timer timeout, it will use the traditional go-back-n method to retransmit packets with a buffer PSN greater than the Last ACKed PSN.

[0062] The implementation process of this invention has been described above. It is understood that, through the proactive detection and precise notification of the PSN sequence number of lost data packets by intermediate network devices, the sending end only retransmits specific lost packets rather than the entire sending window. This fundamentally avoids the large-scale redundant retransmissions of the Go-Back-N mechanism, improves the effective network throughput, and reduces data transmission latency. Upon learning of packet loss information, the receiving end can preemptively place out-of-order valid data packets directly into user memory, breaking the traditional strict sequential processing limitation and significantly reducing the impact of packet loss recovery on the performance of upper-layer applications. By establishing a three-way collaborative mechanism between the intermediate device, the sending end, and the receiving end through LNP control messages, deep participation of network devices in ensuring transmission reliability is achieved, constructing an intelligent end-network collaborative data plane, enhancing the network's ability to cope with sudden congestion and instantaneous packet loss, and improving network service stability.

[0063] like Figure 9 The diagram shown is a structural schematic of the data retransmission device provided in an embodiment of the present invention. (Refer to...) Figure 9 This invention provides a data retransmission device, comprising: The data packet sending module is used to send target data packets according to the PSN sequence number through the sending end, and to cache copies of the target data packets through the retransmission buffer; The sending detection module is used to generate a corresponding LNP control message when the intermediate device detects the loss of the target data packet, and send the LNP control message to the receiving end and the sending end; The out-of-order packet processing module is used to determine the target PSN sequence number based on the LNP control message when the receiving end receives the LNP control message, and to transfer the out-of-order packets of the receiving end to the user memory based on DMA technology and map them to the data bitmap for marking according to the target PSN sequence number. The data packet retransmission module is used to determine the target PSN sequence number based on the LNP control message when the sending end receives the LNP control message, and then determine the retransmission data packet from the copy cached in the retransmission buffer based on the target PSN sequence number, and then select and retransmit the retransmission data packet. The retransmission data packet processing module is used to perform PSN continuity verification on the retransmission data packet according to the data bitmap when the receiving end receives the retransmission data packet, and transfer the retransmission data packet to the user memory based on DMA technology after the verification is successful.

[0064] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0065] This invention also provides an electronic device, comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for communication between the processor and the memory. When the program is executed by the processor, it implements the aforementioned data retransmission method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0066] like Figure 10 The diagram shown is a hardware structure schematic of an electronic device provided in an embodiment of the present invention. (Refer to...) Figure 10 This invention provides an electronic device, comprising: The processor 1001 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention. The memory 1002 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called and executed by the processor 1001 to execute the data retransmission method of the embodiments of this invention. Input / output interface 1003 is used to implement information input and output; The communication interface 1004 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004); The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.

[0067] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0068] like Figure 11 The diagram shown is a structural schematic of the storage medium provided in an embodiment of the present invention. (Refer to...) Figure 11 The present invention also provides a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs 1101, which can be executed by one or more processors to implement the above-described data retransmission method.

[0069] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0070] This invention also discloses a computer program product, including a computer program that, when executed by a processor, implements the above-described data retransmission method.

[0071] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0072] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0073] The embodiments described in this invention are for the purpose of more clearly illustrating the technical solutions of the embodiments of this invention, and do not constitute a limitation on the technical solutions provided by the embodiments of this invention. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this invention are also applicable to similar technical problems.

[0074] The terms "first," "second," "third," "fourth," etc. (if present) in the specification and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0075] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the aforementioned blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.

[0076] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the aforementioned functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.

[0077] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0078] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0079] More specific examples (a non-exhaustive list) of computer-readable media include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the aforementioned program can be printed, because the aforementioned program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0080] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0081] In the foregoing description of this specification, references to terms such as "one embodiment," "another embodiment," or "some embodiments" indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of the present invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0082] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

[0083] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.

Claims

1. A data retransmission method, characterized in that, Includes the following steps: The target data packet is sent by the sending end according to the PSN sequence number, and a copy of the target data packet is cached in the retransmission buffer; When the intermediate device detects the loss of the target data packet, it generates a corresponding LNP control message and sends the LNP control message to the receiving end and the sending end. When the receiving end receives the LNP control message, it determines the target PSN sequence number according to the LNP control message, and transmits the out-of-order packets of the receiving end to the user memory based on DMA technology and maps them to the data bitmap for marking according to the target PSN sequence number. When the sending end receives the LNP control message, it determines the target PSN sequence number according to the LNP control message, and determines the retransmission data packet from the copy cached in the retransmission buffer according to the target PSN sequence number, and then performs selective retransmission on the retransmission data packet. When the receiving end receives the retransmission data packet, it performs PSN continuity verification on the retransmission data packet according to the data bitmap, and after the verification is successful, it transmits the retransmission data packet to the user memory based on DMA technology.

2. The data retransmission method according to claim 1, characterized in that, The step of sending the target data packet according to the PSN sequence number at the sending end and caching a copy of the target data packet in the retransmission buffer specifically includes: When the sending end receives a data transmission request from the application layer, it determines the target data packet based on the data transmission request and assigns the corresponding PSN sequence number to the target data packet. The target data packet is added to the sending queue according to the PSN sequence number, a copy of the target data packet is copied to the retransmission buffer, and the mapping relationship between the copy and the PSN sequence number is stored. The target data packet is sent to the receiving end according to the sending queue.

3. The data retransmission method according to claim 1, characterized in that, When the intermediate device detects packet loss of the target data packet, it generates a corresponding LNP control message and sends the LNP control message to both the receiving end and the sending end. Specifically, this includes: The intermediate device monitors the sending queue of the sending end; When packet loss occurs in the sending queue, the target PSN sequence number corresponding to the lost target data packet is determined, and the LNP control message is generated based on the target PSN sequence number; The LNP control message is sent to the receiving end and the sending end through the control message queue.

4. The data retransmission method according to claim 1, characterized in that, The step of determining the target PSN sequence number based on the LNP control message, and then transferring the out-of-order packets from the receiving end to user memory using DMA technology and mapping them to a data bitmap for marking based on the target PSN sequence number, specifically includes: The target PSN sequence number is obtained by parsing the LNP control message, and the target data packet corresponding to the target PSN sequence number is recorded as lost at the receiving end. When a first data packet with a PSN sequence number greater than the target PSN sequence number arrives at the receiving end, the first data packet is determined to be the out-of-order arrival packet. The first virtual address is obtained by parsing the out-of-order packet, and the out-of-order packet is transferred to the user memory based on DMA technology according to the first virtual address. The PSN sequence number corresponding to the out-of-order arrival packet is mapped to the data bitmap for marking.

5. The data retransmission method according to claim 1, characterized in that, The step of determining the target PSN sequence number based on the LNP control message, determining the retransmission data packet from the copy cached in the retransmission buffer based on the target PSN sequence number, and then selectively retransmitting the retransmission data packet specifically includes: The target PSN sequence number is obtained by parsing the LNP control message, and the target data packet corresponding to the target PSN sequence number is recorded as lost at the sending end. The corresponding target copy is obtained by querying the retransmission buffer based on the target PSN sequence number, and the retransmission data packet is generated based on the target copy; The retransmission data packet is added to the sending queue, and the retransmission data packet is sent to the receiving end according to the sending queue.

6. The data retransmission method according to claim 1, characterized in that, The step of performing PSN continuity verification on the retransmitted data packet according to the data bitmap, and transferring the retransmitted data packet to the user memory based on DMA technology after successful verification, specifically includes: Determine the target PSN sequence number corresponding to the retransmitted data packet, and determine whether the target PSN sequence number is missing in the data bitmap and whether there is a PSN sequence number before / after the target PSN sequence number; When the target PSN sequence number is missing in the data bitmap, but there are PSN sequence numbers before and after the target PSN sequence number, the PSN continuity verification is determined to be successful, and the corresponding second virtual address is obtained by parsing the retransmitted data packet. The retransmission data packet is transmitted to the user memory based on DMA technology using the second virtual address, and the target PSN sequence number corresponding to the retransmission data packet is mapped to the data bitmap for marking.

7. A data retransmission method according to any one of claims 1 to 6, characterized in that, The data bitmap is used to record the reception status of the target data packet. Each bit in the data bitmap corresponds to a PSN sequence number. When the bit is 1, it indicates that the target data packet with the corresponding PSN sequence number has been received. When the bit is 0, it indicates that the target data packet with the corresponding PSN sequence number has not been received.

8. A data retransmission device, characterized in that, include: The data packet sending module is used to send the target data packet according to the PSN sequence number through the sending end, and to cache a copy of the target data packet through the retransmission buffer; The sending detection module is used to generate a corresponding LNP control message when the intermediate device detects the loss of the target data packet, and send the LNP control message to the receiving end and the sending end; The out-of-order packet processing module is used to determine the target PSN sequence number according to the LNP control message when the receiving end receives the LNP control message, and to transfer the out-of-order packets of the receiving end to the user memory based on DMA technology and map them to the data bitmap for marking according to the target PSN sequence number. The data packet retransmission module is used to determine the target PSN sequence number according to the LNP control message when the sending end receives the LNP control message, and determine the retransmission data packet from the copy cached in the retransmission buffer according to the target PSN sequence number, and then select and retransmit the retransmission data packet. The retransmission data packet processing module is used to perform PSN continuity verification on the retransmission data packet according to the data bitmap when the receiving end receives the retransmission data packet, and transfer the retransmission data packet to the user memory based on DMA technology after the verification is successful.

9. An electronic device, characterized in that, The electronic device includes a memory, a processor, a computer program stored in the memory and executable on the processor, and a data bus for implementing communication between the processor and the memory. When the computer program is executed by the processor, it implements the data retransmission method as described in any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the data retransmission method as described in any one of claims 1 to 7.