A data transmission method, apparatus and device

By obtaining the identification information of out-of-order packets during data transmission to determine the continuity of data packets, and directly sending continuous packets, the problem of large transmission delay for reassembling out-of-order data is solved, and data transmission efficiency is improved.

CN118826969BActive Publication Date: 2026-01-20CHINA MOBILE COMM LTD RES INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311732964.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-15
Publication Date
2026-01-20
Estimated Expiration
2043-12-15

AI Technical Summary

Technical Problem

Existing data transmission schemes for reassembling out-of-order data suffer from significant transmission delays.

Method used

After sending the first data packet from the out-of-order packet to the upper-layer application, the identification information corresponding to the second data packet in the out-of-order packet is obtained, and it is determined whether it is continuous with the first data packet. If it is continuous, it is sent directly to reduce the traversal addressing operation of the out-of-order information.

Benefits of technology

It reduces the logical resource consumption during addressing, lowers transmission latency, and improves data transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118826969B_ABST
    Figure CN118826969B_ABST
Patent Text Reader

Abstract

The application provides a data transmission method, device and equipment, wherein the data transmission method comprises the following steps: after a first data packet in a disordered packet is sent to an upper layer application, obtaining identification information corresponding to a second data packet in the disordered packet; the second data packet is a next data packet received adjacent to the first data packet; the identification information is used for indicating whether the second data packet is continuous with the first data packet; in the case that the identification information indicates that the second data packet is continuous with the first data packet, the second data packet is sent to the upper layer application. The present application solves the problem of large transmission delay in the prior art data transmission scheme for disordered data recombination.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of communication technology, and in particular to a data transmission method, device and equipment. BACKGROUND

[0002] In the prior art, in order to ensure that the data packets received in disorder can be assembled in the correct order in selective retransmission, the data parameter table needs to be addressed so as to read the corresponding storage information from the data parameter table according to the sequence number of the next data packet to be received, and then the corresponding data packet is sent; the commonly used method is to traverse the data packet addressing until the sequence number A' = sequence number A + 1 is found, wherein the sequence number A is the sequence number of the last data packet correctly received by the receiving party, and it is assumed here that all data packets are out of order.

[0003] However, in actual network transmission, the data in the sending window may have only one or a few data packets lost and retransmitted, and the data packets in a certain interval may be continuously and normally received in order. If the data parameter table is traversed and addressed for each data packet sent, the logical resources will be greatly occupied and the time delay will be increased.

[0004] From the above, the data transmission scheme for reordering data in the prior art has the problem of large transmission time delay. SUMMARY

[0005] The purpose of the present application is to provide a data transmission method, device and equipment to solve the problem of large transmission time delay in the prior art data transmission scheme for reordering data.

[0006] In order to solve the above technical problem, the embodiment of the present application provides a data transmission method, comprising:

[0007] After sending the first data packet in the out-of-order packet to the upper layer application, the identification information corresponding to the second data packet in the out-of-order packet is obtained; the second data packet is the next data packet received adjacent to the first data packet; the identification information is used to indicate whether the second data packet is continuous with the first data packet or not;

[0008] In the case where the identification information indicates that the second data packet is continuous with the first data packet, the second data packet is sent to the upper layer application.

[0009] Optionally, it further comprises:

[0010] After sending the first data packet in the out-of-order packet to the upper layer application, the current target sequence number is updated; the first sequence number of the first data packet matches the current target sequence number before the update;

[0011] In a case where the identification information indicates that the second data packet is not continuous with the first data packet, according to the updated current target sequence number, the parameter information corresponding to a second sequence number is searched in the out-of-order information; the second sequence number matches the updated current target sequence number; each data packet in the out-of-order packet corresponds to a parameter information respectively, and the parameter information includes identification information, which is used to indicate whether the corresponding data packet is continuous with a last data packet received adjacently.

[0012] In a case where the parameter information corresponding to the second sequence number is searched, a third data packet in the out-of-order packet is sent to the upper layer application; the third data packet refers to a data packet corresponding to the parameter information corresponding to the second sequence number.

[0013] In a case where the parameter information corresponding to the second sequence number is not searched, the third data packet is waited to be received.

[0014] Optionally, before the first data packet in the out-of-order packet is sent to the upper layer application, the method further includes:

[0015] The fourth data packet is received.

[0016] In a case where a third sequence number carried by the fourth data packet matches a current target sequence number, the fourth data packet is sent to the upper layer application, and the current target sequence number is updated.

[0017] In a case where the third sequence number carried by the fourth data packet does not match the current target sequence number, according to the current target sequence number, parameter information corresponding to a first sequence number is searched in the out-of-order information; the first sequence number matches the current target sequence number.

[0018] The first data packet in the out-of-order packet is sent to the upper layer application, including:

[0019] In a case where the parameter information corresponding to the first sequence number is searched, the first data packet in the out-of-order packet is sent to the upper layer application; the first data packet refers to a data packet corresponding to the parameter information corresponding to the first sequence number.

[0020] Optionally, the method further includes:

[0021] In a case where the third sequence number carried by the fourth data packet does not match the current target sequence number, identification information corresponding to the fourth data packet is obtained.

[0022] According to the identification information corresponding to the fourth data packet, parameter information corresponding to the fourth data packet is obtained.

[0023] In the out-of-order information, the parameter information corresponding to the fourth data packet is added.

[0024] Optionally, the obtaining the identification information corresponding to the fourth data packet in the case that the third sequence number carried in the fourth data packet does not match the current target sequence number comprises:

[0025] In the case that the third sequence number carried in the fourth data packet does not match the current target sequence number and the fourth data packet is not the first stored data packet, determining whether the fourth data packet is continuous with a fifth data packet according to the third sequence number and a fifth sequence number carried in the fifth data packet, obtaining the identification information corresponding to the fourth data packet according to the determination result, wherein the fifth data packet is a last data packet stored before the fourth data packet is stored.

[0026] In the case that the third sequence number carried in the fourth data packet does not match the current target sequence number and the fourth data packet is the first stored data packet, obtaining identification information used for indicating that the fourth data packet is not continuous with a last data packet received adjacently.

[0027] Embodiments of the present application also provide a data transmission device, comprising:

[0028] The first obtaining module is configured to obtain identification information corresponding to a second data packet in the out-of-order packet after a first data packet in the out-of-order packet is sent to an upper layer application, the second data packet being a next data packet received adjacently with the first data packet, and the identification information being used for indicating whether the second data packet is continuous with the first data packet.

[0029] The first sending module is configured to send the second data packet to the upper layer application in the case that the identification information indicates that the second data packet is continuous with the first data packet.

[0030] Optionally, the device further comprises:

[0031] The first processing module is configured to update a current target sequence number after a first data packet in the out-of-order packet is sent to an upper layer application, the first sequence number of the first data packet matching the current target sequence number before the update.

[0032] The first finding module is configured to find parameter information corresponding to a second sequence number in out-of-order information according to the updated current target sequence number in the case that the identification information indicates that the second data packet is not continuous with the first data packet, the second sequence number matching the updated current target sequence number, and each data packet in the out-of-order packet corresponding to a parameter information, the parameter information comprising identification information used for indicating whether a corresponding data packet is continuous with a last data packet received adjacently.

[0033] The second sending module is configured to send a third data packet in the out-of-sequence packets to the upper layer application if the parameter information corresponding to the second sequence number is found.

[0034] The second processing module is configured to wait for receiving the third data packet if the parameter information corresponding to the second sequence number is not found.

[0035] Optionally, the method further comprises:

[0036] The first receiving module is configured to receive a fourth data packet before sending a first data packet in the out-of-sequence packets to the upper layer application.

[0037] The third processing module is configured to send the fourth data packet to the upper layer application and update the current target sequence number if a third sequence number carried by the fourth data packet matches the current target sequence number.

[0038] The second finding module is configured to find parameter information corresponding to a first sequence number in the out-of-sequence information according to the current target sequence number if the third sequence number carried by the fourth data packet does not match the current target sequence number; the first sequence number matches the current target sequence number.

[0039] The sending of the first data packet in the out-of-sequence packets to the upper layer application comprises:

[0040] The first data packet is a data packet corresponding to the parameter information corresponding to the first sequence number.

[0041] Optionally, the method further comprises:

[0042] The second obtaining module is configured to obtain identification information corresponding to the fourth data packet if the third sequence number carried by the fourth data packet does not match the current target sequence number.

[0043] The fourth processing module is configured to obtain parameter information corresponding to the fourth data packet according to the identification information corresponding to the fourth data packet.

[0044] The fifth processing module is configured to add the parameter information corresponding to the fourth data packet in the out-of-sequence information.

[0045] Optionally, the obtaining of the identification information corresponding to the fourth data packet if the third sequence number carried by the fourth data packet does not match the current target sequence number comprises:

[0046] In a case that the third sequence number carried by the fourth data packet does not match the current target sequence number and the fourth data packet is the first stored data packet, obtaining identification information indicating that the fourth data packet is discontinuous with the last data packet received adjacently.

[0047] In a case that the third sequence number carried by the fourth data packet does not match the current target sequence number and the fourth data packet is the first stored data packet, obtaining identification information indicating that the fourth data packet is discontinuous with the last data packet received adjacently.

[0048] Embodiments of the present application also provide a data transmission device, comprising a processor and a transceiver.

[0049] The processor is configured to obtain identification information corresponding to a second data packet in a disordered packet after sending a first data packet in the disordered packet to an upper layer application; the second data packet is a next data packet received adjacently with the first data packet; and the identification information is used to indicate whether the second data packet is continuous with the first data packet.

[0050] In a case that the identification information indicates that the second data packet is continuous with the first data packet, the transceiver is configured to send the second data packet to the upper layer application.

[0051] Optionally, the processor is further configured to:

[0052] After sending the first data packet in the disordered packet to the upper layer application, updating a current target sequence number; a first sequence number of the first data packet matches the current target sequence number before updating.

[0053] In a case that the identification information indicates that the second data packet is discontinuous with the first data packet, searching for parameter information corresponding to a second sequence number in disordered information according to the current target sequence number after updating; the second sequence number matches the current target sequence number after updating; each data packet in the disordered packet corresponds to a parameter information respectively, and the parameter information comprises identification information used to indicate whether a corresponding data packet is continuous with a last data packet received adjacently.

[0054] In a case that the parameter information corresponding to the second sequence number is found, the transceiver is configured to send a third data packet in the disordered packet to the upper layer application; the third data packet is a data packet corresponding to the parameter information corresponding to the second sequence number.

[0055] In a case where the parameter information corresponding to the second sequence number is not found, waiting for receiving the third data packet.

[0056] Optionally, the processor is further configured to:

[0057] receiving, by the transceiver, a fourth data packet before sending the first data packet in the out-of-order packets to the upper layer application;

[0058] in a case where a third sequence number carried by the fourth data packet matches a current target sequence number, sending, by the transceiver, the fourth data packet to the upper layer application and updating the current target sequence number;

[0059] in a case where the third sequence number carried by the fourth data packet does not match the current target sequence number, searching, according to the current target sequence number, parameter information corresponding to a first sequence number in out-of-order information; the first sequence number matches the current target sequence number;

[0060] the sending of the first data packet in the out-of-order packets to the upper layer application comprises:

[0061] in a case where the parameter information corresponding to the first sequence number is found, sending, by the transceiver, the first data packet in the out-of-order packets to the upper layer application; the first data packet refers to a data packet corresponding to the parameter information corresponding to the first sequence number.

[0062] Optionally, the processor is further configured to:

[0063] in a case where the third sequence number carried by the fourth data packet does not match the current target sequence number, obtaining identification information corresponding to the fourth data packet;

[0064] obtaining, according to the identification information corresponding to the fourth data packet, parameter information corresponding to the fourth data packet;

[0065] adding, in the out-of-order information, the parameter information corresponding to the fourth data packet.

[0066] Optionally, the obtaining of the identification information corresponding to the fourth data packet in the case where the third sequence number carried by the fourth data packet does not match the current target sequence number comprises:

[0067] in a case where the third sequence number carried by the fourth data packet does not match the current target sequence number and the fourth data packet is not a first stored data packet, determining, according to the third sequence number and a fifth sequence number carried by a fifth data packet, whether the fourth data packet is continuous with the fifth data packet; obtaining the identification information corresponding to the fourth data packet according to a determination result; wherein the fifth data packet is a last data packet stored before the fourth data packet is stored.

[0068] In a case where the third sequence number carried in the fourth data packet does not match the current target sequence number and the fourth data packet is the first stored data packet, identification information indicating that the fourth data packet is discontinuous with the last data packet received adjacently is obtained.

[0069] The embodiment of the present application further provides a data transmission device, comprising a memory, a processor and a program stored in the memory and executable on the processor; the processor implements the data transmission method when executing the program.

[0070] The embodiment of the present application further provides a readable storage medium, which stores a program, and the program is executable on a processor to implement the steps in the data transmission method.

[0071] The embodiment of the present application further provides a readable storage medium, which stores a program, and the program is executable on a processor to implement the steps in the data transmission method.

[0072] In the above scheme, the data transmission method acquires identification information corresponding to a second data packet in the out-of-order packet after sending a first data packet in the out-of-order packet to an upper layer application; the second data packet is a next data packet received adjacently with the first data packet; the identification information is used to indicate whether the second data packet is continuous with the first data packet; in a case where the identification information indicates that the second data packet is continuous with the first data packet, the second data packet is sent to the upper layer application; the method can support implementation of not needing to perform traversal addressing (on out-of-order information corresponding to the out-of-order packet) every time a data packet is sent, thereby reducing logical resource occupation when addressing (out-of-order information), and reducing transmission time delay caused by continuous addressing, and the method well solves the problem of large transmission time delay in the prior art data transmission scheme for recombining out-of-order data. BRIEF DESCRIPTION OF DRAWINGS

[0073] Figure 1 The figure is a flowchart of the data transmission method of the embodiment of the present application;

[0074] Figure 2 The figure is a flowchart of the specific implementation of the data transmission method of the embodiment of the present application;

[0075] Figure 3 The figure is a format diagram of the data parameter table of the embodiment of the present application;

[0076] Figure 4 The figure is an example diagram of the out-of-order data packet of the embodiment of the present application;

[0077] Figure 5 The figure is a data parameter diagram of the embodiment of the present application;

[0078] Figure 6 The figure is a structure diagram of the data transmission device of the embodiment of the present application;

[0079] Figure 7 The figure is a structural schematic diagram of a data transmission device according to an embodiment of the present application. DETAILED DESCRIPTION

[0080] In order to make the technical problems, technical solutions and advantages of the present application clearer, the following will be described in detail with reference to the accompanying drawings and specific embodiments.

[0081] First, the related content of the present solution will be introduced.

[0082] RDMA (Remote Direct Memory Access) is a data transmission technology used for efficient data transmission in computer networks. RDMA allows network devices to directly access memory data without going through the CPU (Central Processing Unit) of the host, thereby providing low-latency and high-bandwidth data transmission. There are currently three kinds of RDMA networks, namely Infiniband, RoCE (RDMA over Converged Ethernet) and iWARP (Internet Wide Area RDMA Protocol), among which ROCE can be deployed on Ethernet and is the most widely used transmission protocol. ROCE network can use ordinary Ethernet switches, but it needs a network card that supports ROCE. Although ROCE has many advantages in providing low-latency and high-bandwidth data transmission, it also has some disadvantages, especially when facing Ethernet packet loss: if the network packet is lost, retransmission is needed, and reliable transmission of data needs to consume a lot of on-chip memory to save the transmission state of the data; therefore, the current hardware implementation technology usually adopts a back N-frame retransmission mechanism, that is, after detecting a lost frame, all data after the lost frame packet is retransmitted, but this will cause a large retransmission overhead, especially in the case of high network delay or high packet loss rate.

[0083] In order to solve the shortcomings of the back N-frame transmission technology, selective retransmission is commonly used in TCP (Transmission Control Protocol) to ensure reliable data transmission: the receiver will send an acknowledgement message to the sender after receiving the data packet, informing the sender which data packets have been received; if the sender receives the acknowledgement message but finds that some data packets have not been acknowledged by the receiver, the sender will selectively retransmit these unacknowledged data packets; only when all frames in the sending window are correctly received and the reordering of the data packets is completed (by the receiver), will the data packets be submitted together to the upper layer application (by the receiver).

[0084] However, the main reason that selective retransmission has not been widely used on RDMA network cards is that in selective retransmission, the receiver needs to maintain a large buffer to store out-of-order data packets. This requires more memory resources and processing power to ensure that out-of-order data packets at the receiver can be assembled in the correct order. For this, the method of reordering can be:

[0085] If the received data packet at the receiver is an out-of-order packet, the receiver will store the data packet in the RAM (Random Access Memory); and determine the parameters of the current data packet (which can include the sequence number (such as the data packet sequence number PSN), the first address addr_F of the current data packet storage, the tail address addr_L of the current data packet storage, etc.), write the data parameter table; the receiver can read the corresponding storage information (which can include the first address addr_F of the out-of-order data packet storage, the tail address addr_L of the out-of-order data packet storage, etc.) from the data parameter table according to the sequence number PSN_n of the data packet to be received at present, and obtain the data packet according to the storage information, and then send the data packet to the upper layer application. Based on the above, the reordering and sending of the out-of-order data packet can be completed by indexing the parameter table (such as obtaining the storage information according to the sequence number).

[0086] Based on the above, the present application provides a data transmission method to solve the problem of large transmission delay in the existing data transmission scheme for out-of-order data reordering, as shown in Figure 1 , which comprises:

[0087] Step 11: After sending the first data packet in the out-of-order packet to the upper layer application, obtaining the identification information corresponding to the second data packet in the out-of-order packet; the second data packet is the next data packet received adjacent to the first data packet; the identification information is used to indicate whether the second data packet is continuous with the first data packet;

[0088] Step 12: If the identification information indicates that the second data packet is continuous with the first data packet, send the second data packet to the upper layer application.

[0089] Wherein, "adjacent reception" can also be adjacent storage; and / or, "the identification information indicates that the second data packet is continuous with the first data packet", can mean that the sequence number of the second data packet matches the current target sequence number updated after the first data packet is sent; but not limited thereto.

[0090] The data transmission method provided in this embodiment of the invention obtains the identification information corresponding to the second data packet in the out-of-order packet after sending the first data packet in the out-of-order packet to the upper-layer application; the second data packet is the next data packet received adjacent to the first data packet; the identification information is used to indicate whether the second data packet is continuous with the first data packet; if the identification information indicates that the second data packet is continuous with the first data packet, the second data packet is sent to the upper-layer application; this method can support the implementation of eliminating the need to traverse and address (the out-of-order information corresponding to the out-of-order packet) for each data packet sent, thereby reducing the logical resource occupation during addressing (out-of-order information) and reducing the transmission latency caused by continuous addressing, thus effectively solving the problem of large transmission latency in the existing data transmission schemes for out-of-order data reassembly.

[0091] Furthermore, the data transmission method further includes: after sending a first data packet from the out-of-order packet to the upper-layer application, updating the current target sequence number; the first sequence number of the first data packet matches the current target sequence number before the update; if the identification information indicates that the second data packet is not continuous with the first data packet, searching for parameter information corresponding to the second sequence number in the out-of-order information according to the updated current target sequence number; the second sequence number matches the updated current target sequence number; each data packet in the out-of-order packet corresponds to a parameter information, the parameter information including: identification information, the identification information being used to indicate whether the corresponding data packet is continuous with the adjacent received previous data packet; if the parameter information corresponding to the second sequence number is found, sending a third data packet from the out-of-order packet to the upper-layer application; the third data packet refers to the data packet corresponding to the parameter information corresponding to the second sequence number; if the parameter information corresponding to the second sequence number is not found, waiting to receive the third data packet.

[0092] This ensures that data is sent in the correct order as much as possible. After sending the third data packet, the process may further include deleting the parameter information corresponding to the second sequence number from the out-of-order information, but is not limited to this. The phrase "the second sequence number matches the updated current target sequence number" can mean that they are the same or correspond to each other. Regarding the case of "the same," updating the current target sequence number can include updating the current target sequence number to the second sequence number. Regarding the case of "corresponding," updating the current target sequence number can include updating the current target sequence number to the Xth sequence number according to a correspondence relationship. This correspondence relationship can include a correspondence between sequence numbers, such as the correspondence between the second sequence number and the Xth sequence number. The out-of-order information can be information corresponding to the out-of-order packet, and may include the parameter information of each data packet in the out-of-order packet; it is not limited here. This scheme may further include: after sending the first data packet in the out-of-order packet to the upper-layer application, deleting the parameter information corresponding to the first sequence number from the (stored) out-of-order information; and / or, the parameter information may further include at least one of the following: sequence number and information indicating the storage location of the corresponding data packet (such as the storage start address and storage end address); and / or, "the previously received adjacent data packet" may be the previously received adjacent data packet in the target window, and the data packet corresponding to the identification information may also be received in the target window; and / or, this scheme may further include: after step 12, deleting the parameter information corresponding to the first sequence number from the out-of-order information and continuing to update the current target sequence number; but it is not limited thereto.

[0093] In this embodiment of the invention, before sending the first data packet from the out-of-order packet to the upper-layer application, the method further includes: receiving a fourth data packet; if the third sequence number carried by the fourth data packet matches the current target sequence number, sending the fourth data packet to the upper-layer application and updating the current target sequence number; if the third sequence number carried by the fourth data packet does not match the current target sequence number, searching for parameter information corresponding to the first sequence number in the out-of-order information according to the current target sequence number; the first sequence number matches the current target sequence number; sending the first data packet from the out-of-order packet to the upper-layer application includes: if the parameter information corresponding to the first sequence number is found, sending the first data packet from the out-of-order packet to the upper-layer application; the first data packet refers to the data packet corresponding to the parameter information corresponding to the first sequence number.

[0094] This ensures the normal transmission of sequential packets (with sequence numbers matching the current target sequence number) and, in the case of receiving out-of-order packets, strives to transmit data packets in order. The phrase "finding the parameter information corresponding to the first sequence number" can be understood as: obtaining the data packet corresponding to the expected sequence number from the out-of-order packets; and / or, this solution may also include: waiting to receive the first data packet if the parameter information corresponding to the first sequence number is not found; however, it is not limited to this.

[0095] Furthermore, the data transmission method further includes: when the third sequence number carried by the fourth data packet does not match the current target sequence number, obtaining the identification information corresponding to the fourth data packet; obtaining the parameter information corresponding to the fourth data packet based on the identification information corresponding to the fourth data packet; and adding the parameter information corresponding to the fourth data packet to the out-of-order information.

[0096] This facilitates subsequent data packet transmission. For example, if the identification information indicates that the fourth data packet is consecutive to the previous data packet, it can be sent directly to the upper-layer application without needing to traverse the out-of-order information to find the data packet to be sent after sending the previous data packet. The "parameter information corresponding to the fourth data packet" can include, but is not limited to, the identification information corresponding to the fourth data packet.

[0097] Wherein, the step of obtaining the identification information corresponding to the fourth data packet when the third sequence number carried by the fourth data packet does not match the current target sequence number includes: (1) when the third sequence number carried by the fourth data packet does not match the current target sequence number and the fourth data packet is not the first stored data packet, determining whether the fourth data packet is continuous with the fifth data packet based on the third sequence number and the fifth sequence number carried by the fifth data packet; obtaining the identification information corresponding to the fourth data packet based on the determination result; wherein the fifth data packet is the previous data packet stored before the fourth data packet; (2) when the third sequence number carried by the fourth data packet does not match the current target sequence number and the fourth data packet is the first stored data packet, obtaining identification information used to indicate that the fourth data packet is not continuous with the adjacent received previous data packet.

[0098] This allows for the accurate acquisition of the identification information corresponding to the fourth data packet. Here, "the fourth data packet is not the first stored data packet" can be understood as: the fourth data packet is not the first out-of-order packet stored; and / or, "determining whether the fourth data packet is consecutive to the fifth data packet" can be understood as: determining whether the fourth data packet is the next sequential packet adjacent to the fifth data packet; and / or, "the fifth data packet is the previous data packet stored before the fourth data packet" can also mean: the fifth data packet is the previous data packet received before the fourth data packet was received; and / or, "the fourth data packet is the first stored data packet" can be understood as: the fourth data packet is the first out-of-order packet stored; however, these are not limitations.

[0099] The following is an example illustrating the data transmission method provided in the embodiments of the present invention. The out-of-order information is represented by a data parameter table, and the serial number is represented by a PSN.

[0100] First, let's introduce the parameters that may be involved:

[0101] W: Represents the sending or receiving window size for selective retransmission, i.e., the number of data packets transmitted simultaneously;

[0102] PSN: In a ROCE message, a 24-bit space is used in the header to represent the sequence number of the ROCE message. The presence of a lost data packet can be determined by checking whether the PSN is continuous. If a packet loss occurs, a NAK (Negative Acknowledgment) message will be returned to request the retransmission of the data packet.

[0103] PMTU: Indicates the length of the data packet; the maximum length of a ROCE message is 4096 bits.

[0104] addr_F: Indicates the starting address of the data packet stored in memory;

[0105] addr_L: Represents the tail address of the data packet stored in memory;

[0106] PSN_c: Represents the sequence number of the last data packet that has been correctly received; where "correctly received" can be understood as the sequence number of the data packet being the same as the expected sequence number (which can correspond to the current target sequence number mentioned above);

[0107] PSN_n: Represents the sequence number of the next expected data packet (which may correspond to the updated current target sequence number mentioned above);

[0108] Identifier Flag (corresponding to the identification information above): used to indicate whether the data packet is consecutive to the previous data packet (which can be understood as: whether the sequence number of the data packet is consecutive to the sequence number of the previous data packet), usually 1 bit.

[0109] Based on the above, and addressing the aforementioned technical problems, this invention provides a data transmission method, specifically a method for reassembling out-of-order data based on an RDMA network. This method primarily involves: Based on the phenomenon that "in actual network transmission, only one or a few data packets in the sending window may be lost and retransmitted, while data packets within a certain interval may arrive consecutively and in normal order," this solution adds an identifier (Flag) indicating the continuity of data packets. If the identifier Flag is detected as valid during subsequent transmission (corresponding to the identifier information indicating that the corresponding data packet is consecutive to the previously received data packet), then there is no need to traverse and address the data parameter table; the data packet corresponding to this identifier Flag can be directly read and passed to the upper-layer application. Specifically, the implementation steps of this solution are as follows: Figure 2 (Flowchart of disordered data reconstruction) includes the following steps:

[0110] Step 1: The receiver (corresponding to the aforementioned data transmission device) receives the current data packet (which may correspond to the aforementioned fourth data packet); it determines whether the current data packet is a duplicate packet. If so, it discards the packet and can continue to execute the operation of receiving the current data packet; if not, it proceeds to Step 2.

[0111] Specifically, each time the receiver receives a data packet (transmitted from the sending window), it can first compare the sequence number of this data packet (i.e., the current data packet) with the sequence number already cached in the data parameter table. This comparison operation can be performed after the current data packet is received and the data parameter table is not empty. In addition, the data parameter table can be updated according to the data packet sending situation. For example, if a cached out-of-order packet - data packet 1 is sent to the upper layer application, the information corresponding to data packet 1 in the data parameter table can be deleted.

[0112] If the sequence number of the current data packet is the same as a cached sequence number, it indicates that the current data packet is a duplicate packet and can be discarded directly to avoid duplicate data processing.

[0113] Step 2: The receiver determines whether the current data packet is out of order. If yes, proceed to Step 3. If no, the receiver updates the expected sequence number (corresponding to the current target sequence number mentioned above) and sends the current data packet to the upper-layer application (corresponding to sending the fourth data packet to the upper-layer application and updating the current target sequence number when the third sequence number carried by the fourth data packet matches the current target sequence number mentioned above). Then, it can return to Step 1.

[0114] Specifically, if the current data packet is not a duplicate packet, then it is determined whether the current data packet is out of order. If the sequence number of the current data packet does not match the expected sequence number (i.e., the desired sequence number), that is, it does not satisfy PSN_n = PSN_c + 1, then it is an out-of-order packet; otherwise, it is a sequentially received packet (i.e., it is consecutive to the previously received data packet). For example, if the sequence number PSN_c of the last correctly received data packet (i.e., the data packet whose sequence number matches the previously expected sequence number up to the current time) is 2, and the sequence number of the next received data packet (i.e., the current data packet) is 3, then this data packet can be determined to be a sequential packet, and the receiver can then update the desired sequence number and send the data packet to the upper-layer application; if the sequence number of the next received data packet (i.e., the current data packet) is greater than 3 (such as 4, 5, etc.), then this data packet can be determined to be out of order.

[0115] The receiver will generate a desired sequence number before performing step two, so that the sequence numbers can be compared.

[0116] Step 3: The receiver determines whether the expected sequence number exists in the data parameter table (corresponding to the above-mentioned situation where the third sequence number carried in the fourth data packet does not match the current target sequence number, and the parameter information corresponding to the first sequence number is searched in the out-of-order information according to the current target sequence number; the first sequence number matches the current target sequence number). If so, the receiver obtains valid data (i.e., the data packet corresponding to the expected sequence number) according to the parameter information corresponding to the expected sequence number and sends it to the upper-layer application (corresponding to the above-mentioned situation where the parameter information corresponding to the first sequence number is found, the receiver sends the first data packet in the out-of-order packet to the upper-layer application; the first data packet refers to the data packet corresponding to the parameter information corresponding to the first sequence number; or it can correspond to the above-mentioned situation where the identification information indicates that the second data packet and the first data packet are not continuous). In the case of the updated current target sequence number, the parameter information corresponding to the second sequence number is searched in the out-of-order information; the second sequence number matches the updated current target sequence number; each data packet in the out-of-order packet corresponds to a parameter information, which includes: identification information, which indicates whether the corresponding data packet is continuous with the previously received adjacent data packet; if the parameter information corresponding to the second sequence number is found, the third data packet in the out-of-order packet is sent to the upper-layer application; the third data packet refers to the data packet corresponding to the parameter information corresponding to the second sequence number, and then the value of the expected sequence number is updated (corresponding to the above update of the current target sequence number after sending the first data packet in the out-of-order packet to the upper-layer application), and then proceed to step four; if not, proceed to step five;

[0117] Specifically, upon receiving an out-of-order packet, the receiver can check in the data parameter table whether the data packet parameter (i.e., parameter information) corresponding to the expected sequence number exists. If it exists, valid data can be obtained based on the parameter corresponding to the expected sequence number and sent to the upper-layer application, and then the value of the expected sequence number can be updated. If it does not exist, it indicates that valid data that should be sent to the upper-layer application has not yet been received (i.e., the data packet corresponding to the expected sequence number has not been received). At this time, the receiver can wait for the next data packet transmitted by the sender (corresponding to waiting to receive the first data packet corresponding to the parameter information of the first sequence number when the parameter information corresponding to the first sequence number is not found; or corresponding to waiting to receive the third data packet when the parameter information corresponding to the second sequence number is not found).

[0118] Step 4: The receiver determines whether the Flag in the next parameter information (which can be a group of parameters) adjacent to the parameter information corresponding to the sent valid data in the data parameter table is set to the first value (e.g., 1). If yes, it reads the corresponding data packet from the next parameter information and sends it to the upper-layer application (corresponding to the above process of obtaining the identification information corresponding to the second data packet in the out-of-order packet after sending the first data packet to the upper-layer application; and sending the second data packet to the upper-layer application when the identification information indicates that the second data packet is consecutive to the first data packet). Then, it continues to update the value of the expected sequence number and returns to the operation of determining whether the Flag in the next parameter information adjacent to the parameter information corresponding to the sent valid data in the data parameter table is set to the first value; if no, it returns to Step 3.

[0119] Specifically, after obtaining the data packet corresponding to the expected sequence number in step three, it can be determined whether the Flag in the next parameter information (in the data parameter table) is set to the first value (e.g., 1). If so, it indicates that the two sets of data (i.e., the data packet corresponding to the obtained expected sequence number and the data packet corresponding to the next parameter information) are sequential and without gaps (i.e., they are continuous), and can be directly read and passed to the upper-layer application, while continuing to update the value of the expected sequence number; if it is the first value (e.g., 0), it indicates that the two sets of data are out of order, and it is necessary to jump back to step three to perform the next round of sequence number lookup. Here, the next parameter information refers to the next parameter information adjacent to the parameter information corresponding to the data packet (i.e., the data packet corresponding to the obtained expected sequence number).

[0120] Step 5: The receiver stores the out-of-order packet (i.e., the current data packet) and records the corresponding parameter information in the data parameter table (corresponding to the above steps when the third sequence number carried by the fourth data packet does not match the current target sequence number, obtaining the identification information corresponding to the fourth data packet; obtaining the parameter information corresponding to the fourth data packet based on the identification information; adding the parameter information corresponding to the fourth data packet to the out-of-order information). The receiver then continues with the first operation, including: receiving the data packet and determining whether it is a duplicate packet; if the received data packet is not a duplicate packet, treating the received data packet as an out-of-order packet and performing the operation of "storing the out-of-order packet and recording the corresponding parameter information in the data parameter table"; until a certain duration is reached (e.g., the timer starts from the moment the first out-of-order packet is received or stored and reaches the first duration; or until the sending window ends), then returns to Step 3.

[0121] Specifically, the receiver stores the received data packet (i.e., the current data packet) in the RAM of the receive buffer and records the parameter information of this data packet in the data parameter table. This parameter information may include at least one of the following: the PSN of this data packet, the flag indicating whether the data packets are consecutive, the starting address of this data packet (addr_F), and the ending address of this data packet (addr_L). Specifically, the format of the data parameter table can be as follows: Figure 3 As shown, but not limited to this. In this scheme, the receive buffer and data parameter table can be used only to store the parameter information and valid data of out-of-order packets, while sequential packets are not treated similarly, but not limited to this.

[0122] The determination of the Flag corresponding to the current data packet can include the following two cases:

[0123] Scenario 1: If the current data packet is not the first out-of-order packet stored, then based on the sequence number of the previously stored out-of-order packet and the sequence number of the current data packet (the currently stored out-of-order packet), it is determined whether the current data packet is consecutive to the previously stored out-of-order packet. If yes, the Flag corresponding to the current data packet is set to the first value; otherwise, it is set to the second value. This scenario corresponds to the situation described above where the third sequence number carried by the fourth data packet does not match the current target sequence number and the fourth data packet is not the first stored data packet. Based on the third sequence number and the fifth sequence number carried by the fifth data packet, it is determined whether the fourth data packet is consecutive to the fifth data packet. Based on the determination result, the identification information corresponding to the fourth data packet is obtained. Here, the fifth data packet is the previous data packet stored before the fourth data packet.

[0124] Scenario 2: If the current data packet is the first out-of-order packet stored, then the Flag corresponding to the current data packet can be directly set to the second value. This scenario corresponds to the situation described above where the third sequence number carried by the fourth data packet does not match the current target sequence number and the fourth data packet is the first stored data packet, thus obtaining identification information to indicate that the fourth data packet is not continuous with the previously received adjacent data packet; however, this is not a limitation.

[0125] To clarify, Figure 2 The process shown can end when the sending window closes or after all out-of-order packets corresponding to the data parameter table have been sent, but it is not limited to these. For example, the process may end when a user command is received.

[0126] In addition, the above-mentioned data reading can be performed based on the storage location information in the data parameter table (such as the storage start address and storage end address, etc.), but is not limited to this.

[0127] The following example illustrates this scheme using the reassembly of eight out-of-order data packets. The first value is 1, and the second value is 0.

[0128] Suppose the sender sends 8 data packets at once, namely data packets B1 to B8, and the data packets arrive at the receiver out of order: (Details follow...) Figure 4 As shown in the example of out-of-order data packets, the receiver received data packets B2, B3, B4, B1, B6, B7, B8, and B5 in sequence. Subsequently, the receiver obtained the corresponding data parameter table based on the received data packets, as detailed below. Figure 5 (The data parameter table corresponding to out-of-order data packets is shown). Based on this, the reassembly process of this scheme may include the following parts:

[0129] Part 1: The receiver stores the received data packets in the RAM of the receive buffer, such as... Figure 4 As shown; and record the parameter information of this data packet (this parameter information may include PSN, the identifier Flag indicating whether this data packet is consecutive, the starting address of this data packet addr_F, the ending address of this data packet addr_L, etc.), and store it in the data parameter table, such as Figure 5 As shown in the diagram, since data packets B2, B3, and B4 are consecutive, the flag indicating whether the data packets are consecutive is set to 1 for B3 and B4; since B6, B7, and B8 are consecutive, the flag indicating whether the data packets are consecutive is set to 1 for B7 and B8; the remaining data packets are non-consecutive, and the flag indicating whether the data packets are consecutive is set to 0 for each of them.

[0130] Part Two: Check the data parameter table to see if the data packet parameter (i.e., parameter information) corresponding to the desired sequence number exists. Assuming the desired sequence number (corresponding to the current target sequence number mentioned above) is 1, by traversing the data parameter table, we find that the parameter information 1 corresponding to the sequence number matching 1 is stored in the fourth row. Then, based on the parameter information 1 corresponding to the current sequence number (i.e., the currently desired sequence number), we can obtain valid data (i.e., data packet B1) and send it to the upper-layer application. Afterward, we can update the value of the desired sequence number to 2.

[0131] Part Three: Determine if the Flag in the next parameter information (parameter information 2) adjacent to parameter information 1 is 1, that is, determine if the Flag in the fifth row of the data parameter table is 1. Looking up the table, we find that the Flag in the fifth row of the parameter table is 0. This means that the data packet corresponding to the parameter information in the fifth row is not consecutive with data packet B1. Therefore, we need to search the data parameter table again to see if there is a parameter information corresponding to the (updated) expected sequence number (value 2). This can be understood as returning to Part Two, "Search the data parameter table to see if there is a data packet parameter corresponding to the expected sequence number". For details, please refer to Part Four below.

[0132] Part Four: Check the data parameter table to see if the data packet parameter corresponding to the expected sequence number exists. Currently, the expected sequence number is 2. By traversing the data parameter table, we find that the parameter information 3 corresponding to the sequence number matching 2 is stored in the first row. Therefore, we can obtain valid data (i.e., data packet B2) based on the parameter information corresponding to the current sequence number and send it to the upper-layer application. Then, we can update the expected sequence number to 3.

[0133] Part 5: Determine if the Flag in the next parameter information (parameter information 4) adjacent to parameter information 3 is 1, that is, determine if the Flag in the second row of the data parameter table is 1. Looking up the table, we find that the Flag in the second row of the parameter table is 1. This indicates that the data packet corresponding to the second row of parameter information is sequential and without gaps with data packet B2, i.e., they are consecutive. The data packet corresponding to the next parameter information is data packet B3, which can be directly read and passed to the upper-layer application, while simultaneously updating the expected sequence number to 4. Similarly, data packet B4 can also be read and passed to the upper-layer application following the same steps as in Part 5.

[0134] The sequential reading of data packets B5 to B8 can be performed with reference to the above content, and then passed to the upper-layer application respectively, which will not be elaborated here.

[0135] Furthermore, the examples above are for the purpose of simplifying the explanation of this solution, so it is assumed that the data parameter table is fixed. In practice, when the solution is applied, the data parameter table can be updated as out-of-order packets are sent. For example, after data packet B1 is sent, the parameter information corresponding to data packet B1 can be deleted. At this time, the row number corresponding to each parameter information in the table can be updated accordingly. For example, the row number of data packet B6 is updated to the fourth row. The "determining whether the Flag in the fifth row of the data parameter table is 1" mentioned in Part 3 above can be specifically referred to as: determining whether the Flag in the fourth row of the updated data parameter table is 1. Other similar cases will not be elaborated here.

[0136] It should be noted that this solution does not execute other parts after completing Part 1 above. Instead, other parts can be executed during the data reception and storage process in Part 1 (the content segmentation in the above example is only for easier understanding of the use of Flags). For details, please refer to [link to relevant documentation]. Figure 2 The process shown will not be repeated here.

[0137] Therefore, the solution provided by the embodiments of the present invention can achieve the following:

[0138] (1) Based on the phenomenon that “in actual network transmission, only one or a few data packets of the sending window may be lost and retransmitted, and data packets of a certain interval may arrive in a continuous and normal order”, add an identifier Flag to the data parameter table to indicate whether the data packets are continuous (for example, if the current data packet and the previous data packet are continuous, set it to 1; if they are not continuous, set it to 0).

[0139] (2) If the data continuation identifier Flag is detected to be valid, there is no need to traverse and address the data parameter table. The corresponding data packet can be directly read out and passed to the upper layer application.

[0140] Based on the above, under network channels with a low packet loss rate, this scheme can reduce the logical resource consumption when addressing data parameter tables, and at the same time reduce the transmission delay caused by continuous addressing.

[0141] This invention also provides a data transmission device, such as... Figure 6 As shown, it includes:

[0142] The first acquisition module 61 is used to acquire the identification information corresponding to the second data packet in the out-of-order packet after sending the first data packet in the out-of-order packet to the upper layer application; the second data packet is the next data packet received adjacent to the first data packet; the identification information is used to indicate whether the second data packet is consecutive to the first data packet;

[0143] The first sending module 62 is used to send the second data packet to the upper-layer application when the identification information indicates that the second data packet is consecutive to the first data packet.

[0144] The data transmission device provided in this embodiment of the invention obtains the identification information corresponding to the second data packet in the out-of-order packet after sending the first data packet in the out-of-order packet to the upper-layer application; the second data packet is the next data packet received adjacent to the first data packet; the identification information is used to indicate whether the second data packet is continuous with the first data packet; when the identification information indicates that the second data packet is continuous with the first data packet, the second data packet is sent to the upper-layer application; it can support the implementation of not needing to traverse and address (the out-of-order information corresponding to the out-of-order packet) for each data packet sent, thereby reducing the logical resource occupation during addressing (out-of-order information), and reducing the transmission latency caused by continuous addressing, thus effectively solving the problem of large transmission latency in the existing data transmission schemes for out-of-order data reassembly.

[0145] Furthermore, the data transmission device further includes: a first processing module, configured to update the current target sequence number after sending the first data packet in the out-of-order packet to the upper-layer application; the first sequence number of the first data packet matches the current target sequence number before the update; a first lookup module, configured to, when the identification information indicates that the second data packet is not continuous with the first data packet, search for parameter information corresponding to the second sequence number in the out-of-order information according to the updated current target sequence number; the second sequence number matches the updated current target sequence number; each data packet in the out-of-order packet corresponds to a parameter information, the parameter information including: identification information, the identification information being used to indicate whether the corresponding data packet is continuous with the adjacent received previous data packet; a second sending module, configured to send the third data packet in the out-of-order packet to the upper-layer application when the parameter information corresponding to the second sequence number is found; the third data packet refers to the data packet corresponding to the parameter information corresponding to the second sequence number; a second processing module, configured to wait to receive the third data packet when the parameter information corresponding to the second sequence number is not found.

[0146] In this embodiment of the invention, the data transmission device further includes: a first receiving module, configured to receive a fourth data packet before sending a first data packet from the out-of-order packet to the upper-layer application; a third processing module, configured to send the fourth data packet to the upper-layer application and update the current target sequence number if the third sequence number carried by the fourth data packet matches the current target sequence number; and a second searching module, configured to search for parameter information corresponding to the first sequence number in the out-of-order information according to the current target sequence number if the third sequence number carried by the fourth data packet does not match the current target sequence number; the first sequence number matches the current target sequence number; sending the first data packet from the out-of-order packet to the upper-layer application includes: sending the first data packet from the out-of-order packet to the upper-layer application if the parameter information corresponding to the first sequence number is found; the first data packet refers to the data packet corresponding to the parameter information corresponding to the first sequence number.

[0147] Furthermore, the data transmission device further includes: a second acquisition module, configured to acquire identification information corresponding to the fourth data packet when the third sequence number carried by the fourth data packet does not match the current target sequence number; a fourth processing module, configured to obtain parameter information corresponding to the fourth data packet based on the identification information corresponding to the fourth data packet; and a fifth processing module, configured to add the parameter information corresponding to the fourth data packet to the out-of-order information.

[0148] In this embodiment of the invention, obtaining the identification information corresponding to the fourth data packet when the third sequence number carried by the fourth data packet does not match the current target sequence number includes: (1) when the third sequence number carried by the fourth data packet does not match the current target sequence number and the fourth data packet is not the first stored data packet, determining whether the fourth data packet is continuous with the fifth data packet based on the third sequence number and the fifth sequence number carried by the fifth data packet; obtaining the identification information corresponding to the fourth data packet based on the determination result; wherein the fifth data packet is the previous data packet stored before the fourth data packet; (2) when the third sequence number carried by the fourth data packet does not match the current target sequence number and the fourth data packet is the first stored data packet, obtaining identification information indicating that the fourth data packet is not continuous with the adjacent received previous data packet.

[0149] The implementation embodiments of the above data transmission method are all applicable to the embodiments of the data transmission device and can achieve the same technical effect.

[0150] This invention also provides a data transmission device, such as... Figure 7 As shown, it includes: a processor 71 and a transceiver 72;

[0151] The processor 71 is configured to obtain identification information corresponding to a second data packet in the out-of-order packet after sending a first data packet in the out-of-order packet to the upper-layer application; the second data packet is the next data packet received adjacent to the first data packet; the identification information is used to indicate whether the second data packet is consecutive to the first data packet;

[0152] When the identification information indicates that the second data packet is consecutive to the first data packet, the second data packet is sent to the upper-layer application via the transceiver 72.

[0153] The data transmission device provided in this embodiment of the invention obtains the identification information corresponding to the second data packet in the out-of-order packet after sending the first data packet in the out-of-order packet to the upper-layer application; the second data packet is the next data packet received adjacent to the first data packet; the identification information is used to indicate whether the second data packet is continuous with the first data packet; when the identification information indicates that the second data packet is continuous with the first data packet, the second data packet is sent to the upper-layer application; it can support the implementation of not needing to traverse and address (the out-of-order information corresponding to the out-of-order packet) for each data packet sent, thereby reducing the logical resource occupation during addressing (out-of-order information), and reducing the transmission latency caused by continuous addressing, thus effectively solving the problem of large transmission latency in the existing data transmission schemes for out-of-order data reassembly.

[0154] Furthermore, the processor is also configured to: after sending the first data packet in the out-of-order packet to the upper-layer application, update the current target sequence number; the first sequence number of the first data packet matches the current target sequence number before the update; if the identification information indicates that the second data packet is not continuous with the first data packet, search for parameter information corresponding to the second sequence number in the out-of-order information according to the updated current target sequence number; the second sequence number matches the updated current target sequence number; each data packet in the out-of-order packet corresponds to a parameter information, the parameter information including: identification information, the identification information being used to indicate whether the corresponding data packet is continuous with the previously received adjacent data packet; if the parameter information corresponding to the second sequence number is found, send the third data packet in the out-of-order packet to the upper-layer application through the transceiver; the third data packet refers to the data packet corresponding to the parameter information corresponding to the second sequence number; if the parameter information corresponding to the second sequence number is not found, wait to receive the third data packet.

[0155] In this embodiment of the invention, the processor is further configured to: receive a fourth data packet via the transceiver before sending the first data packet in the out-of-order packet to the upper-layer application; if the third sequence number carried by the fourth data packet matches the current target sequence number, send the fourth data packet to the upper-layer application via the transceiver and update the current target sequence number; if the third sequence number carried by the fourth data packet does not match the current target sequence number, search for parameter information corresponding to the first sequence number in the out-of-order information according to the current target sequence number; the first sequence number matches the current target sequence number; sending the first data packet in the out-of-order packet to the upper-layer application includes: if the parameter information corresponding to the first sequence number is found, sending the first data packet in the out-of-order packet to the upper-layer application via the transceiver; the first data packet refers to the data packet corresponding to the parameter information corresponding to the first sequence number.

[0156] Furthermore, the processor is also configured to: obtain identification information corresponding to the fourth data packet when the third sequence number carried by the fourth data packet does not match the current target sequence number; obtain parameter information corresponding to the fourth data packet based on the identification information corresponding to the fourth data packet; and add the parameter information corresponding to the fourth data packet to the out-of-order information.

[0157] In this embodiment of the invention, obtaining the identification information corresponding to the fourth data packet when the third sequence number carried by the fourth data packet does not match the current target sequence number includes: (1) when the third sequence number carried by the fourth data packet does not match the current target sequence number and the fourth data packet is not the first stored data packet, determining whether the fourth data packet is continuous with the fifth data packet based on the third sequence number and the fifth sequence number carried by the fifth data packet; obtaining the identification information corresponding to the fourth data packet based on the determination result; wherein the fifth data packet is the previous data packet stored before the fourth data packet; (2) when the third sequence number carried by the fourth data packet does not match the current target sequence number and the fourth data packet is the first stored data packet, obtaining identification information indicating that the fourth data packet is not continuous with the adjacent received previous data packet.

[0158] The implementation embodiments of the above data transmission method are all applicable to the embodiments of the data transmission device and can achieve the same technical effect.

[0159] This invention also provides a data transmission device, including a memory, a processor, and a program stored in the memory and executable on the processor; when the processor executes the program, it implements the above-described data transmission method.

[0160] The implementation embodiments of the above data transmission method are all applicable to the embodiments of the data transmission device and can achieve the same technical effect.

[0161] This invention also provides a readable storage medium storing a program that, when executed by a processor, implements the steps in the data transmission method described above.

[0162] The implementation embodiments of the above data transmission method are all applicable to the embodiments of the readable storage medium and can achieve the same technical effect.

[0163] It should be noted that many of the functional components described in this specification are referred to as modules in order to more specifically emphasize the independence of their implementation.

[0164] In this embodiment of the invention, the module can be implemented in software so that it can be executed by various types of processors. For example, an identified executable code module may include one or more physical or logical blocks of computer instructions, which may be constructed as objects, procedures, or functions. Nevertheless, the executable code of the identified module does not need to be physically located together, but may include different instructions stored in different bits, which, when logically combined, constitute the module and achieve the module's intended purpose.

[0165] In practice, an executable code module can be a single instruction or many instructions, and can even be distributed across multiple different code segments, different programs, and across multiple memory devices. Similarly, operational data can be identified within the module and can be implemented in any suitable form and organized within any suitable type of data structure. This operational data can be collected as a single dataset or distributed across different locations (including different storage devices), and can exist, at least in part, solely as electronic signals within the system or network.

[0166] When a module can be implemented using software, considering the current level of hardware technology, modules that can be implemented in software can be implemented using hardware circuits by those skilled in the art to achieve the corresponding functions, without considering cost. These hardware circuits include conventional very-large-scale integrated circuits (VLSI) or gate arrays, as well as existing semiconductors such as logic chips and transistors, or other discrete components. Modules can also be implemented using programmable hardware devices, such as field-programmable gate arrays, programmable array logic, and programmable logic devices.

[0167] The above describes the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A data transmission method, characterized in that, include: After sending the first data packet in the out-of-order packet to the upper-layer application, obtain the identification information corresponding to the second data packet in the out-of-order packet; The second data packet is the next data packet received adjacent to the first data packet; The identification information is used to indicate whether the second data packet is consecutive to the first data packet; If the identification information indicates that the second data packet is consecutive to the first data packet, the second data packet is sent to the upper-layer application; The data transmission method further includes: After sending the first data packet from the out-of-order packet to the upper-layer application, the current target sequence number is updated; the first sequence number of the first data packet matches the current target sequence number before the update. When the identification information indicates that the second data packet is not continuous with the first data packet, the parameter information corresponding to the second sequence number is searched in the out-of-order information according to the updated current target sequence number; the second sequence number matches the updated current target sequence number; each data packet in the out-of-order packet corresponds to a parameter information, the parameter information including: identification information, the identification information is used to indicate whether the corresponding data packet is continuous with the adjacent received previous data packet; If the parameter information corresponding to the second sequence number is found, the third data packet in the out-of-order packet is sent to the upper-layer application; the third data packet refers to the data packet corresponding to the parameter information of the second sequence number. If the parameter information corresponding to the second sequence number is not found, wait to receive the third data packet.

2. The data transmission method according to claim 1, characterized in that, Before sending the first packet in the out-of-order packet to the upper-layer application, the following is also included: Receive the fourth data packet; If the third sequence number carried by the fourth data packet matches the current target sequence number, the fourth data packet is sent to the upper-layer application, and the current target sequence number is updated. If the third sequence number carried in the fourth data packet does not match the current target sequence number, the parameter information corresponding to the first sequence number is searched in the out-of-order information according to the current target sequence number; the first sequence number matches the current target sequence number. Sending the first data packet from the out-of-order packets to the upper-layer application includes: If the parameter information corresponding to the first sequence number is found, the first data packet in the out-of-order packet is sent to the upper-layer application; the first data packet refers to the data packet corresponding to the parameter information corresponding to the first sequence number.

3. The data transmission method according to claim 2, characterized in that, Also includes: If the third sequence number carried by the fourth data packet does not match the current target sequence number, the identification information corresponding to the fourth data packet is obtained; Based on the identifier information corresponding to the fourth data packet, the parameter information corresponding to the fourth data packet is obtained; The parameter information corresponding to the fourth data packet is added to the out-of-order information.

4. The data transmission method according to claim 3, characterized in that, When the third sequence number carried by the fourth data packet does not match the current target sequence number, obtaining the identification information corresponding to the fourth data packet includes: If the third sequence number carried by the fourth data packet does not match the current target sequence number and the fourth data packet is not the first data packet stored, it is determined whether the fourth data packet is consecutive to the fifth data packet based on the third sequence number and the fifth sequence number carried by the fifth data packet; based on the determination result, the identification information corresponding to the fourth data packet is obtained; wherein, the fifth data packet is the previous data packet stored before the fourth data packet. If the third sequence number carried by the fourth data packet does not match the current target sequence number and the fourth data packet is the first stored data packet, identification information is obtained to indicate that the fourth data packet is not continuous with the previously received adjacent data packet.

5. A data transmission device, characterized in that, include: The first acquisition module is used to acquire the identification information corresponding to the second data packet in the out-of-order packet after sending the first data packet in the out-of-order packet to the upper layer application; The second data packet is the next data packet received adjacent to the first data packet; The identification information is used to indicate whether the second data packet is consecutive to the first data packet; A first sending module is configured to send the second data packet to the upper-layer application when the identification information indicates that the second data packet is consecutive to the first data packet; The data transmission device further includes: The first processing module is used to update the current target sequence number after sending the first data packet in the out-of-order packet to the upper-layer application; the first sequence number of the first data packet matches the current target sequence number before the update; The first lookup module is used to, when the identification information indicates that the second data packet is not continuous with the first data packet, search for parameter information corresponding to the second sequence number in the out-of-order information according to the updated current target sequence number; the second sequence number matches the updated current target sequence number; each data packet in the out-of-order packet corresponds to a parameter information, the parameter information including: identification information, the identification information is used to indicate whether the corresponding data packet is continuous with the previously received adjacent data packet; The second sending module is used to send the third data packet in the out-of-order packet to the upper-layer application when the parameter information corresponding to the second sequence number is found; the third data packet refers to the data packet corresponding to the parameter information corresponding to the second sequence number. The second processing module is used to wait to receive the third data packet if the parameter information corresponding to the second sequence number is not found.

6. The data transmission device according to claim 5, characterized in that, Also includes: The first receiving module is used to receive the fourth data packet before sending the first data packet in the out-of-order packet to the upper-layer application; The third processing module is used to send the fourth data packet to the upper-layer application and update the current target sequence number when the third sequence number carried by the fourth data packet matches the current target sequence number. The second lookup module is used to search for parameter information corresponding to the first sequence number in the out-of-order information according to the current target sequence number when the third sequence number carried by the fourth data packet does not match the current target sequence number. The first sequence number matches the current target sequence number; Sending the first data packet from the out-of-order packets to the upper-layer application includes: If the parameter information corresponding to the first sequence number is found, the first data packet in the out-of-order packet is sent to the upper-layer application; The first data packet refers to the data packet corresponding to the parameter information of the corresponding first sequence number.

7. The data transmission device according to claim 6, characterized in that, Also includes: The second acquisition module is used to acquire the identification information corresponding to the fourth data packet when the third sequence number carried by the fourth data packet does not match the current target sequence number. The fourth processing module is used to obtain the parameter information corresponding to the fourth data packet based on the identification information corresponding to the fourth data packet; The fifth processing module is used to add parameter information corresponding to the fourth data packet to the out-of-order information.

8. The data transmission device according to claim 7, characterized in that, When the third sequence number carried by the fourth data packet does not match the current target sequence number, obtaining the identification information corresponding to the fourth data packet includes: If the third sequence number carried by the fourth data packet does not match the current target sequence number and the fourth data packet is not the first data packet stored, it is determined whether the fourth data packet is consecutive to the fifth data packet based on the third sequence number and the fifth sequence number carried by the fifth data packet; based on the determination result, the identification information corresponding to the fourth data packet is obtained; wherein, the fifth data packet is the previous data packet stored before the fourth data packet. If the third sequence number carried by the fourth data packet does not match the current target sequence number and the fourth data packet is the first stored data packet, identification information is obtained to indicate that the fourth data packet is not continuous with the previously received adjacent data packet.

9. A data transmission device, characterized in that, include: Processor and transceiver; The processor is configured to obtain the identification information corresponding to the second data packet in the out-of-order packet after sending the first data packet in the out-of-order packet to the upper-layer application; The second data packet is the next data packet received adjacent to the first data packet; the identification information is used to indicate whether the second data packet is consecutive to the first data packet; When the identification information indicates that the second data packet is consecutive to the first data packet, the second data packet is sent to the upper-layer application via the transceiver. The processor is further configured to: After sending the first data packet from the out-of-order packet to the upper-layer application, the current target sequence number is updated; the first sequence number of the first data packet matches the current target sequence number before the update. When the identification information indicates that the second data packet is not continuous with the first data packet, the parameter information corresponding to the second sequence number is searched in the out-of-order information according to the updated current target sequence number; the second sequence number matches the updated current target sequence number; each data packet in the out-of-order packet corresponds to a parameter information, the parameter information including: identification information, the identification information is used to indicate whether the corresponding data packet is continuous with the adjacent received previous data packet; If the parameter information corresponding to the second sequence number is found, the transceiver sends the third data packet from the out-of-order packet to the upper-layer application; the third data packet refers to the data packet corresponding to the parameter information of the second sequence number. If the parameter information corresponding to the second sequence number is not found, wait to receive the third data packet.

10. A data transmission device, comprising a memory, a processor, and a program stored in the memory and executable on the processor; characterized in that, When the processor executes the program, it implements the data transmission method as described in any one of claims 1 to 4.

11. A readable storage medium having a program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the data transmission method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Customer premises equipment (CPE) and data forwarding method thereof, and communication system

    CN107454276A

  • Data packet processing method and device

    CN116346735A