Data transmission method and device, electronic equipment and storage medium

By segmenting RDMA data packets and storing segmented information in high-performance systems, the problem of large memory space occupies during data transmission retransmission in the prior art is solved, and more efficient data transmission and system performance are achieved.

CN120223649APending Publication Date: 2025-06-27BEIJING XINWANG RUIJIE NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311828338.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-27
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The prior art cannot meet performance requirements in high-performance systems, especially in RDMA data transmission, packet loss may occur, resulting in data retransmission. However, the existing methods store complete data packets in memory, occupying a large space and cannot meet the needs of high-performance systems.

Method used

By segmenting the data packets and storing the segment information of each segment data in memory, the segment information occupies less space than the segment data. When a retransmission message is received, the target segment information is acquired in the memory according to the segment information indication information, and the corresponding target segment data is retransmitted according to the information.

Benefits of technology

It reduces the amount of data stored in the memory, reduces the use of memory bandwidth, improves system performance, and meets the needs of high-performance systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120223649A_ABST
    Figure CN120223649A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data transmission method and device, electronic equipment and a storage medium, and the method comprises the steps: transmitting a data packet to a receiving end, and storing the segment information in at least one piece of segment data of the data packet in a memory, the storage space occupied by the segment information is smaller than the storage space occupied by the segment data corresponding to the segment information; when a retransmission message from a receiving end is received, obtaining target segment information corresponding to segment information indication information from at least one piece of segment information stored in a memory according to the segment information indication information carried in the retransmission message; and transmitting target segment data corresponding to the target segment information to the receiving end according to the target segment information. In this way, in a high-bandwidth scene, the segment information of the segment data can be stored in the DDR, and the system performance is not affected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and in particular, to a data transmission method, apparatus, electronic device, and storage medium. Background Art

[0002] Remote Direct Memory Access (RDMA) can use Direct Memory Access (DMA) when communicating between two or more electronic devices to directly access the memory of another electronic device from the memory of one electronic device, so as to quickly move the memory data of one electronic device to the memory of another electronic device, without the need for the CPU of the electronic device to participate in forwarding. When data is transmitted through RDMA, packet loss may occur and data retransmission is required.

[0003] In the prior art, when electronic device A transmits a data packet to electronic device B through RDMA, while electronic device A sends the data packet to be transmitted to electronic device B, all the contents of the data packet are stored in the memory cache. If the data packet transmission fails and data transmission is required, then electronic device A can obtain the data packet in the DDR cache and retransmit the data packet to electronic device B.

[0004] However, the method of the prior art does not meet the performance requirements in a high-performance system. Summary of the Invention

[0005] Embodiments of this application provide a data transmission method, apparatus, electronic device, and storage medium, which can store less data in the memory and meet the performance requirements of a high-performance system.

[0006] In a first aspect, an embodiment of this application provides a data transmission method, which is applied to a requesting end. The data transmission method includes:

[0007] Sending a data packet to a receiving end, and storing the segment information in at least one segment data of the data packet in a memory, where the storage space occupied by the segment information is smaller than the storage space occupied by the segment data corresponding to the segment information;

[0008] When receiving a retransmission message from the receiving end, obtaining, according to the segment information indication information carried in the retransmission message, target segment information corresponding to the segment information indication information from at least one segment information stored in the memory;

[0009] Transmitting, according to the target segment information, the target segment data corresponding to the target segment information to the receiving end.

[0010] In a possible implementation, the target segmentation information includes a target segmentation type and a header information, and the target segmentation type is used to indicate whether the target segmentation data carries payload data;

[0011] Obtaining, from at least one segmentation information stored in the memory, a target segmentation information corresponding to the segmentation information indication information according to the segmentation information indication information carried in the retransmission message includes:

[0012] Determining, from at least one segmentation information stored in the memory, the target segmentation type and the header information corresponding to the segmentation information indication information according to the segmentation information indication information carried in the retransmission message;

[0013] Judging whether the target segmentation data corresponding to the target segmentation information carries target payload data according to the target segmentation type;

[0014] If it is determined that the target segmentation data does not carry target payload data, obtaining the header information of the target segmentation data in the memory.

[0015] In a possible implementation, transmitting, to the receiving end, the target segmentation data corresponding to the target segmentation information according to the target segmentation information includes:

[0016] Transmitting the header information to the receiving end according to the header information of the target segmentation data.

[0017] In a possible implementation, the target segmentation information further includes target payload information, and the storage space occupied by the target payload information is smaller than the storage space occupied by the target payload data corresponding to the target payload information. The method further includes:

[0018] If it is determined that the target segmentation data carries target payload data, obtaining the target payload information and the header information in the memory.

[0019] In a possible implementation, transmitting, to the receiving end, the target segmentation data corresponding to the target segmentation information according to the target segmentation information includes:

[0020] Obtaining the target payload data carried by the target segmentation data in the local memory of the requesting end according to the target payload information in the target segmentation information;

[0021] Recombining the header information and the target payload data into the target segmentation data, and transmitting the target segmentation data to the receiving end.

[0022] In a possible implementation, the target payload information includes a virtual address and a target payload data length;

[0023] Obtaining the target payload data carried in the target segment data from the local memory of the requesting end according to the target payload information in the target segment information includes:

[0024] Converting the virtual address to a physical address using a pre-created memory address translation table, where the physical address is the starting position of the target payload data in the local memory;

[0025] Obtaining the target payload data from the local memory in a direct memory access manner according to the physical address and the target payload data length.

[0026] In a possible implementation, the segment information indication information includes a sequence number;

[0027] Obtaining target segment information corresponding to the segment information indication information from at least one segment information stored in the memory according to the segment information indication information carried in the retransmission message includes:

[0028] Determining an index number corresponding to the sequence number according to the sequence number carried in the retransmission message;

[0029] Obtaining the target segment information from at least one segment information stored in the memory based on the index number.

[0030] In a possible implementation, storing the segment information in at least one segment data of the data packet in a memory includes:

[0031] When it is determined that the type of the data packet is a type carrying payload data, determining whether the length of the payload data carried in the data packet is greater than the path maximum transmission unit, where the path maximum transmission unit is the maximum amount of data allowed to pass through by the network used to send data to the data request segment;

[0032] When the length of the payload data carried in the data packet is greater than the path maximum transmission unit, splitting the data packet into at least one segment data, where the data volume of each segment data in the at least one segment data is less than or equal to the path maximum transmission unit;

[0033] For each segment data in the at least one segment data, obtaining the header information, segment type, and payload information of the segment data to obtain the segment information of the segment data, where the segment type is used to indicate that the segment data carries payload data;

[0034] Add a sequence number and an index number to the segmented information, and store the segmented information after adding the sequence number and the index number in the memory.

[0035] In a possible implementation, the method further includes:

[0036] When receiving a message indicating successful transmission of segmented data, delete, according to the segmented information indication information carried in the message, the segmented information corresponding to the successfully transmitted segmented data in the memory.

[0037] In a second aspect, an embodiment of the present application provides a data transmission device, where the data transmission device includes:

[0038] A sending module, configured to send a data packet to a receiving end;

[0039] A storage module, configured to store the segmented information in at least one segmented data of the data packet in a memory, where the storage space occupied by the segmented information is smaller than the storage space occupied by the segmented data corresponding to the segmented information;

[0040] A processing module, configured to, when receiving a retransmission message from the receiving end, obtain, according to the segmented information indication information carried in the retransmission message, target segmented information corresponding to the segmented information indication information from at least one segmented information stored in the memory;

[0041] The sending module is further configured to transmit, according to the target segmented information, target segmented data corresponding to the target segmented information to the receiving end.

[0042] In a possible implementation, the target segmented information includes a target segmented type and header information, where the target segmented type is used to indicate whether the target segmented data carries payload data; the processing module is specifically configured to determine, according to the segmented information indication information carried in the retransmission message, the target segmented type and the header information corresponding to the segmented information indication information from at least one segmented information stored in the memory; according to the target segmented type, determine whether the target segmented data corresponding to the target segmented information carries target payload data; if it is determined that the target segmented data does not carry target payload data, obtain the header information of the target segmented data in the memory.

[0043] In a possible implementation, the sending module is specifically configured to transmit the header information to the receiving end according to the header information of the target segmented data.

[0044] In a possible implementation, the target segmentation information further includes target payload information, and the storage space occupied by the target payload information is smaller than the storage space occupied by the target payload data corresponding to the target payload information. The processing module is specifically configured to, if it is determined that the target segmented data carries target payload data, obtain the target payload information and the header information in the memory.

[0045] In a possible implementation, the sending module is specifically configured to obtain the target payload data carried by the target segmented data in the local memory of the request end according to the target payload information in the target segmentation information; recombine the header information and the target payload data into the target segmented data, and transmit the target segmented data to the receiving end.

[0046] In a possible implementation, the target payload information includes a virtual address and a target payload data length; the processing module is specifically configured to use a pre-created memory address translation table to convert the virtual address into a physical address, and the physical address is the starting position of the target payload data in the local memory; according to the physical address and the target payload data length, obtain the target payload data in the local memory in a direct memory access manner.

[0047] In a possible implementation, the segmentation information indication information includes a sequence number; the processing module is specifically configured to determine an index number corresponding to the sequence number according to the sequence number carried in the retransmission message; based on the index number, obtain the target segmentation information from at least one segmentation information stored in the memory.

[0048] In a possible implementation, the storage module is specifically configured to, when it is determined that the type of the data packet is a type carrying payload data, determine whether the length of the payload data carried by the data packet is greater than the path maximum transmission unit, and the path maximum transmission unit is the maximum value of the data volume allowed to pass through by the network used to send data to the data request segment; when the length of the payload data carried by the data packet is greater than the path maximum transmission unit, split the data packet into at least one segmented data, and the data volume of each segmented data in the at least one segmented data is less than or equal to the path maximum transmission unit; for each segmented data in the at least one segmented data, obtain the header information, the segmentation type, and the payload information of the segmented data to obtain the segmentation information of the segmented data, and the segmentation type is used to indicate that the segmented data carries payload data; add a sequence number and an index number to the segmentation information, and store the segmentation information after adding the sequence number and the index number in the memory.

[0049] In a possible implementation, the processing module is further configured to, when receiving a message indicating successful segmented data transmission, delete the segmented information corresponding to the successfully transmitted segmented data in the memory according to the segmented information indication information carried in the message.

[0050] In a third aspect, an embodiment of the present application further provides an electronic device, which includes: a processor, and a memory communicatively connected to the processor;

[0051] The memory stores computer-executable instructions;

[0052] The processor executes the computer-executable instructions stored in the memory to implement the method described in any possible implementation of the first aspect above.

[0053] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the processor executes the computer-executable instructions, the method described in any possible implementation of the first aspect above is implemented.

[0054] In a fifth aspect, an embodiment of the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements the method described in any possible implementation of the first aspect above.

[0055] It can be seen that the embodiments of the present application provide a data transmission method, device, electronic device, and storage medium. The method includes sending a data packet to a receiving end, and storing the segmented information in at least one segmented data of the data packet in a memory, where the storage space occupied by the segmented information is smaller than the storage space occupied by the segmented data corresponding to the segmented information; when receiving a retransmission message from the receiving end, obtaining target segmented information corresponding to the segmented information indication information from at least one segmented information stored in the memory according to the segmented information indication information carried in the retransmission message; and transmitting the target segmented data corresponding to the target segmented information to the receiving end according to the target segmented information. In this way, the data packet is transmitted by transmitting segmented data, and the segmented information that occupies a smaller storage space is stored in the memory. When data transmission is required, the data that needs to be retransmitted can be found according to the segmented information and sent to the receiving end. It can reduce the occupation of the storage space of the memory and reduce the occupation of the bandwidth when storing data in the memory, meeting the performance requirements of high-performance systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 FIG. is a schematic diagram of a data transmission scenario provided by an embodiment of the present application;

[0057] Figure 2Schematic flowchart of a data transmission method provided by an embodiment of the present application;

[0058] Figure 3 Schematic structural diagram of a segmented information provided by an embodiment of the present application;

[0059] Figure 4 Schematic flowchart of another data transmission method provided by an embodiment of the present application;

[0060] Figure 5 Schematic flowchart of a process for a request end to send data packets provided by an embodiment of the present application;

[0061] Figure 6 Schematic diagram of a message queue window provided by an embodiment of the present application;

[0062] Figure 7 Schematic structural diagram of a data transmission device provided by an embodiment of the present application;

[0063] Figure 8 Schematic structural diagram of an electronic device provided by an embodiment of the present application.

[0064] Through the above-mentioned drawings, specific embodiments of the present disclosure have been shown, and there will be more detailed descriptions hereinafter. These drawings and the written descriptions are not intended to limit the scope of the concept of the present disclosure in any way, but to illustrate the concept of the present disclosure to those skilled in the art by referring to specific embodiments. Detailed Description of the Embodiments

[0065] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0066] In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. Here, A and B can be singular or plural. In the written description of the present application, the character " / " generally represents an "or" relationship between the associated objects before and after.

[0067] DMA can directly send the data in an attached device (such as a disk drive, etc.) to the memory on the motherboard of the electronic device, so that the data transfer does not require the participation of the CPU, which can reduce the CPU load.

[0068] RDMA can use DMA when communicating between two or more electronic devices to directly access the memory of another electronic device from the memory of one electronic device. RDMA can achieve the rapid movement of data from one system to the memory of a remote system without the participation of the CPU for forwarding.

[0069] RoCEv2 (RDMA over Converged Ethernet Version 2) can carry RDMA based on the User Datagram Protocol (UDP) / Internet Protocol (IP) protocol. The packet structure of RoCEv2 adds a UDP header, an IP header, and a layer 2 Ethernet header to the original Infiniband (IB) architecture packet, and identifies the RoCE packet through the UDP destination port number. RoCEv2 supports load sharing based on the source port number using Equal-cost multi-path routing (ECMP), improving network utilization.

[0070] In a RoCEv2 network, an Ethernet needs to be constructed for data transmission. However, when data is transmitted through the Ethernet, packet loss may occur, and the lost packets need to be retransmitted.

[0071] In the prior art, there are the following two implementations for data transmission:

[0072] In one implementation, when the requesting end sends a data packet to the data receiving end, the requesting end stores all the contents of the data packet in an off-chip memory through the Host Channel Adapter (HCA) in the requesting end while sending the data packet. When the transmitted data packet is lost, the requesting end obtains all the contents of the data packet to be retransmitted in the off-chip memory and resends the data packet to the data receiving end.

[0073] However, in this implementation, the ability of the memory to cache data is limited. For the case where the amount of data transmitted by the requesting end is large, the amount of transmitted data may exceed the ability of the memory to cache data, resulting in a decline in system performance.

[0074] In another implementation, when the requesting end sends a data packet to the data receiving end, while sending the data packet, the requesting end stores all the contents of the data packet in the on-chip cache through the Host Channel Adapter (HCA) in the requesting end. When a packet loss occurs in the transmitted data packet, the requesting end obtains all the contents of the data packet that needs to be retransmitted from the on-chip cache and resends the data packet to the data receiving end.

[0075] However, in this implementation, the HCA is implemented by an FPGA. The on-chip RAM belongs to the on-chip cache of the FPGA. The capacity of the on-chip cache of the FPGA is limited. For scenarios with high bandwidth, large data volume transmission, and high latency, the limited on-chip cache of the FPGA can only support limited connections and does not meet the requirements of large-scale systems.

[0076] Based on this, the embodiments of the present application provide a data transmission method. When performing data transmission, the transmitted data packet is segmented, and the segmentation information of each segmented data is stored in a memory. The storage space occupied by the segmentation information is smaller than the storage space occupied by the segmented data corresponding to the segmentation information. When performing data transmission, the segmentation information of the data that needs to be retransmitted can be obtained from the memory, and thus the data can be retransmitted according to the segmentation information. In this way, the storage space occupied by the data stored in the memory can be reduced, and there is no need to store the complete data packet in the memory. When the amount of data being transmitted is large, it is not necessary to occupy a large amount of storage space in the memory, and data retransmission can be achieved, meeting the requirements of high bandwidth and large-scale connections.

[0077] In the embodiments of the present application, the memory may include volatile memories, such as Random Access Memory (RAM), Double Data Rate (DDR), etc., and may also include non-volatile memories, such as FALSH memories, etc. The embodiments of the present application do not make specific limitations on the memory.

[0078] The data transmission method provided by the embodiments of the present application can be applied to scenarios where data is transmitted between devices, as Figure 1 shown. Figure 1 FIG. is a schematic diagram of a data transmission scenario provided by the embodiments of the present application.

[0079] It should be noted that Figure 1 the description is made by taking the memory as the Double Data Rate synchronous dynamic random access memory DDR as an example, which does not constitute any limitation.

[0080] As Figure 1As shown, the requesting end can send data packets to the receiving end through the sending module in the requesting end. When the receiving end receives the data packets sent by the requesting end, it can feedback data to the receiving end according to the content carried in the data packets.

[0081] Exemplarily, the data packet sent by the receiving end to the requesting end can be a request message, and the request message can be a read request, a write request, etc., which are not limited in the embodiments of the present application.

[0082] For example, when the request message sent by the receiving end to the requesting end is a read request, the receiving end can feedback the data corresponding to the information according to the information of the data to be read carried in the read request to the requesting end.

[0083] For another example, when the request message sent by the receiving end to the requesting end is a write request, the requesting end can send a write request for writing data to the receiving end, and this request can include the data to be written to the receiving end. When the receiving end receives this write request, it can write the data into the memory of the receiving end according to the information carried in the write request.

[0084] As Figure 1 shown, while the requesting end sends a data packet to the receiving end through the sending module in the requesting end, the requesting end can store the relevant information of this data packet in the double data rate synchronous dynamic random access memory (DDR). This relevant information can include partial content of the sent data packet, information for obtaining all content of the data packet, etc. Among them, the storage space occupied by the relevant information is smaller than the storage space occupied by its corresponding data packet, and the embodiments of the present application do not limit the relevant information.

[0085] Further, when a packet loss occurs in the sent data packet, the receiving module can feedback the packet loss information to the sending module, and the receiving module can obtain the relevant information of the lost data packet in the DDR based on this packet loss information, so as to resend this data packet according to this relevant information.

[0086] It should be noted that Figure 1 the shown requesting end can be an HCA, and the receiving end can be a target channel adapter (TCA for short). The data transmission between the requesting end and the receiving end can be implemented through RDMA.

[0087] It can be understood that the data transmission method provided by the embodiments of the present application is applied to the requesting end as Figure 1 shown.

[0088] Combined with the above application scenarios, below, the data transmission method provided by the present application will be described in detail through specific embodiments. It can be understood that these several specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0089] Figure 2 This is a schematic flowchart of a data transmission method provided by an embodiment of the present application. This data transmission method can be executed by software and / or a hardware device. For example, the hardware device can be a data transmission device, and the data transmission device can be a terminal or a processing chip in the terminal. Exemplarily, please refer to Figure 2 As shown, this data transmission method may include:

[0090] S201. The requesting end sends a data packet to the receiving end, and stores the segmentation information of at least one segmented data of the data packet in a memory. The storage space occupied by the segmentation information is smaller than the storage space occupied by the segmented data corresponding to the segmentation information.

[0091] Exemplarily, at least one segmented data can be obtained by segmenting the data packet sent by the requesting end. For example, the data packet can be split to obtain 10 segmented data. The number of segmented data obtained can be 1 or multiple, and the embodiments of the present application do not limit this.

[0092] The segmentation information can be a part of the corresponding segmented data, and this part of the content can be used for data transmission. In this way, data transmission can be achieved through the segmentation information.

[0093] In the embodiments of the present application, when the receiving end receives the data packet sent by the requesting end, it can first determine whether there is a packet loss situation for the data packet. If not, the receiving end can feedback the data corresponding to the data packet to the requesting end. If there is a packet loss situation, a retransmission message can be feedback to the requesting end according to the packet loss information. When there is a packet loss situation, the requesting end can execute the following step S202:

[0094] S202. When receiving the retransmission message from the receiving end, the requesting end obtains the target segmentation information corresponding to the segmentation information indication information from at least one segmentation information stored in the memory according to the segmentation information indication information carried in the retransmission message.

[0095] It should be noted that the retransmission message can be a message of data packet loss received from the receiving end, or a message generated when the requesting end detects data transmission failure.

[0096] The segmentation information indication information carried in the retransmission message can be the sequence number of the segmented data indicating packet loss, and the embodiments of the present application do not limit this.

[0097] Taking the case where the segmented information indication information includes a sequence number as an example, when the requesting end obtains the target segmented information corresponding to the segmented information indication information from at least one piece of segmented information stored in the memory according to the segmented information indication information carried in the retransmission message, the requesting end may determine the index number corresponding to the sequence number according to the sequence number carried in the retransmission message; based on the index number, obtain the target segmented information from at least one piece of segmented information stored in the memory.

[0098] The sequence number may be added by the requesting end when storing the segmented information in the memory.

[0099] Exemplarily, when the requesting end stores the segmented information in the memory, it may generate the corresponding relationship between the index number and the sequence number, so that when data transmission is required, the index number corresponding to the sequence number of the data to be retransmitted can be determined in the corresponding relationship, and thus the target segmented information can be obtained according to the index number.

[0100] The index number may include the high index and the low index established when storing the target segmented information. The requesting end may obtain the target segmented information from the memory according to the high index and the low index.

[0101] The embodiments of the present application do not make specific limitations on the forms of the sequence number and the index number.

[0102] In this way, through the index number, the target segmented information corresponding to the sequence number can be obtained more accurately and quickly in the memory.

[0103] In the embodiments of the present application, the target segmented information may include a target segmented type and a header information, and the target segmented type is used to indicate whether the target segmented data carries payload data. When the requesting end obtains the target segmented information corresponding to the segmented information indication information from at least one piece of segmented information stored in the memory according to the segmented information indication information carried in the retransmission message, the requesting end may determine the target segmented type and the header information corresponding to the segmented information indication information from at least one piece of segmented information stored in the DDR according to the segmented information indication information carried in the retransmission message.

[0104] Exemplarily, the segmented information indication information may include a sequence number. Therefore, the requesting end may determine the target segmented type and the header information corresponding to the sequence number from at least one piece of segmented information stored in the DDR according to the sequence number carried in the retransmission message. Exemplarily, the target segmented type may be set according to the type of the message sent by the requesting end. For example, when the data packet sent by the requesting end is a read request message, since the read request message is a request without payload, the target segmented type of the read request message may be set to indicate the type without carrying payload data.

[0105] It can be understood that the segmented information indication information may include a sequence number. When obtaining the target segment type and header information, the corresponding index number can be determined according to the sequence number as shown in the above method, and the target segment type and header information can be obtained according to the index number.

[0106] Since the target segment data may carry payload data or may not carry payload data, the requesting end can determine whether the target segment data corresponding to the target segment information carries the target payload data according to the target segment type. The cases of carrying payload data and not carrying payload data may include the following two possible implementations:

[0107] In one possible implementation, if it is determined that the target segment data does not carry the target payload data, the header information of the target segment data is obtained in the memory.

[0108] In this way, for the memory, when the segment data does not carry payload data, only the header information of the segment data can be stored in the memory, which can further reduce the amount of data stored in the memory, enable the memory to store more content of the segmented information, and reduce the occupation of the memory bandwidth.

[0109] In another possible implementation, the target segment information further includes target payload information. If it is determined that the target segment data carries the target payload data, the target payload information and header information are obtained in the memory. The storage space occupied by the target payload information is smaller than the storage space occupied by the target payload data corresponding to the target payload information.

[0110] The target payload information can be used to obtain the target payload data of the segment data in the local memory.

[0111] In this way, when the segment data carries payload data, the header information and payload information of the segment data can be stored in the memory. Since the payload information occupies less storage space, the amount of data stored in the memory can be reduced, enabling the memory to store more content of the segmented information.

[0112] S203. Transmit the target segment data corresponding to the target segment information to the receiving end according to the target segment information.

[0113] As shown in step S202 above, since the target segment data may carry payload data or may not carry payload data, when the requesting end transmits the target segment data corresponding to the target segment information to the receiving end according to the target segment information, the following two possible implementations may be included:

[0114] In one possible implementation, when the target segment data does not carry payload data, the requesting end can transmit the header information to the receiving end according to the header information of the target segment data.

[0115] Since the header information includes the content of the target segmented data, sending the header information to the receiving end can achieve sending the target segmented data to the receiving end and realizing the retransmission of the data.

[0116] In this way, the high-performance system bandwidth requirements and the large-scale system connection number requirements can be met while saving the memory resources of the memory.

[0117] In another possible implementation, when the target segmented data carries payload data, the requesting end can obtain the target payload data carried by the target segmented data in the local memory of the requesting end according to the payload information in the target segmented information; reorganize the header information and the target payload data into the target segmented data, and transmit the target segmented data to the receiving end.

[0118] In this way, when the segmented data to be retransmitted carries payload data, the requesting end can use the payload information obtained in the memory to obtain the payload data in the local memory, so as to transmit the header information and the payload data to the receiving end. It enables the retransmission of the data without storing the payload data in the memory, effectively reducing the occupation of the memory resources of the memory.

[0119] Exemplarily, the payload information obtained by the requesting end may include a virtual address and the length of the target payload data. When the requesting end obtains the target payload data carried by the target segmented data in the local memory according to the payload information, the requesting end can use a pre-created memory translation table (abbreviated as MTT) to convert the virtual address into a physical address, and the physical address is the starting position of the target payload data in the local memory; according to the physical address and the length of the target payload data, the target payload data is obtained in the local memory by means of direct memory access.

[0120] In this way, the requesting end can obtain the target payload data in the local memory according to the starting position and length of the target payload data in the local memory without storing the target payload data in the memory. Since the storage space occupied by the target payload data is large, when the payload data is not stored in the memory, the occupation of the memory resources of the memory can be reduced, so that when the amount of data transmitted is large, the segmented information can also be stored in the memory, improving the situation that some data cannot be stored in the memory due to limited memory of the memory.

[0121] It can be seen that, in the data transmission method provided by the embodiments of the present application, when transmitting a data packet, it is not necessary to store the complete data packet in the memory. Only the segmentation information of multiple segmented data included in the data packet needs to be stored in the memory. Since the storage space occupied by the segmentation information is smaller than the storage space occupied by the corresponding segmented data, the memory can store more segmentation information of data packets. It can improve the situation of slow storage due to insufficient memory capacity interface bandwidth and enhance the system performance. And it can improve the situation where the number of stored data packets is small due to the small capacity of the on-chip cache of the FPGA when using the on-chip cache of the FPGA.

[0122] In the embodiments of the present application, after the requesting end sends segmented data to the receiving end, the receiving end can receive the transmitted segmented data. When the receiving end can receive the transmitted segmented data, the receiving end can feedback a message indicating that the segmented data has been received to the requesting end.

[0123] Exemplarily, when receiving a message indicating successful transmission of segmented data, the segmentation information corresponding to the successfully transmitted segmented data can be deleted from the memory according to the indication information of the successfully transmitted segmentation information carried in the message.

[0124] Taking the segmentation information indication information including a sequence number as an example, when receiving a message indicating successful transmission of segmented data, the segmentation information corresponding to the successfully transmitted segmented data can be deleted from the memory according to the sequence number carried in the message.

[0125] It can be understood that the method of deleting the segmentation information corresponding to the successfully transmitted segmented data from the memory according to the sequence number carried in the message is similar to the method of obtaining the target segmentation information corresponding to the sequence number from at least one piece of segmentation information stored in the memory according to the sequence number carried in the retransmission message in the above embodiments, and will not be elaborated here.

[0126] In this way, when the segmented data is successfully transmitted to the receiving end, the memory can be freed by deleting the segmentation information corresponding to the segmented data from the memory.

[0127] Combined with the above embodiments, when the requesting end stores the segmentation information of each segmented data in at least one segmented data in a double data rate synchronous dynamic random access memory, the requesting end can split the data packet to be sent to the receiving end into at least one segmented data.

[0128] Exemplarily, the requesting end can determine whether the data packet carries payload data according to the type of the data packet. If it is determined that the data packet carries payload data, the data packet is segmented. If the data packet does not carry payload data, the data packet may not be split.

[0129] For example, when the message type is a write request message, it can be determined that the data packet carries payload data, and then the data packet can be segmented.

[0130] Exemplarily, when splitting a data packet carrying payload data, it can be determined whether the length of the payload data carried by the data packet is greater than the path maximum transmission unit. When the length of the payload data carried by the data packet is greater than the path maximum transmission unit, the data packet is split into at least one segmented data, and the data volume of each segmented data in the at least one segmented data is less than or equal to the path maximum transmission unit. Herein, the path maximum transmission unit is the maximum value of the data volume allowed to pass through the network used for sending data to the data request segment.

[0131] Further, for each segmented data in the at least one segmented data, the header information, segmented type, and payload information of the segmented data are obtained to obtain the segmentation information of the segmented data. The segmented type is used to indicate that the segmented data carries payload data; a sequence number and an index number are added to the segmentation information, and the segmentation information after adding the sequence number and the index number is stored in the memory.

[0132] Exemplarily, the structure of the segmentation information stored in the memory can be seen in Figure 3 as shown Figure 3 which is a schematic diagram of the structure of a segmentation information provided by an embodiment of the present application.

[0133] As Figure 3 shown, the segmentation information includes a segmented type, header information, payload information, payload data length, and virtual address. Among them, the segmented type opcode can be used to indicate the first / middle / last segmented types of RDMA READ / RDMA WRITE / SEND, etc., and is used to determine whether the segmented data carries payload data. RDMA READ has no payload data, and when other opcode and the payload data length length is 0, it means no payload.

[0134] The virtual address va is used to represent the virtual start address of the payload data of the segmented data. The virtual address can be first converted into an IOVA through the MTT table, and the IOVA is the first address during the DMA transmission of the segmented payload data.

[0135] The unit of the payload data length length is bytes, and the maximum can be 4096 bytes, which is used to indicate the length of the payload data for DMA transmission. The embodiments of the present application do not make specific limitations on the payload data length.

[0136] The header information info can be used to reorganize the segmented header information and payload data during data transmission.

[0137] As Figure 3As shown, when data is transmitted, the number of in-transit data packets being transmitted simultaneously is MAX_SQ, Figure 3 and MAX_SQ in-transit data packets are shown in Figure 3 . Among them, each in-transit data packet may include multiple segmented data, and the segmented messages of each segmented data are as Figure 3 shown.

[0138] In Figure 3 , in the embodiments of the present application, an example is given where the segmentation type is 8 bits, the virtual address is 64 bits, the payload data length is 13 bits, and the header information is n bits, which does not constitute any limitation.

[0139] It should be noted that for data packets without payload data, there may also be a situation where the data in the data packet is relatively long. For this situation, the data packets without payload data can be split. The splitting method is similar to that of splitting data packets with payload data and will not be elaborated here.

[0140] In this way, by splitting the data packet and storing the information of the split data packet in the memory, when the data packet is relatively long, compared with directly storing the data packet in the memory, the data volume of the segmented message stored in the memory is smaller than that of the original data packet.

[0141] To facilitate understanding of the data transmission method provided by the embodiments of the present application, the following takes the message sent from the request end to the receiving end as a write message as an example to describe in detail the technical solution provided by the embodiments of the present application. Specifically, refer to Figure 4 shown, Figure 4 which is a schematic flowchart of another data transmission method provided by the embodiments of the present application.

[0142] It should be noted that Figure 4 in Figure 4 , an example is given with the memory being a double data rate synchronous dynamic random access memory DDR, which does not constitute any limitation.

[0143] As Figure 4 shown, the local memory 1 of the request end can transmit the data packet in the local memory 1 that needs to be written to the receiving end to the sending unit in the form of a write request message through DMA. The sending unit sends the write request message to the receiving end. While the request end sends the write request message, the sending unit can cache the sent write request message in the DDR. When the sending unit caches the write request message in the DDR, it can segment the write request message according to the PMTU to obtain at least one segmented data. Then, the header information and payload information of each segmented data are cached in the DDR.

[0144] The method of segmenting the write request message into segmented data and storing segmented information such as the header information of the segmented data can be referred to the above embodiments and will not be elaborated here.

[0145] Exemplarily, for the process of the requesting end sending data packets to the receiving end, refer to Figure 5 as shown in Figure 5 FIG. 5, which is a schematic flowchart of a data packet sending process of a requesting end provided by an embodiment of the present application.

[0146] As Figure 5 shown in FIG. 5, the requesting end can send a message msg to the receiving end through k + 1 message queues SQ (Send Queue). The requesting end can split the message msg into segmented data and assign a packet sequence number (Packet Sequence Number, abbreviated as PSN) to each segmented data. For segmented data of SEND and RDMA WRITE types, each segmented data is assigned one PSN. For segmented data of RDMA READ type, one or more PSNs are assigned according to the length of the segmented data.

[0147] It should be noted that Figure 5 the segmentation in FIG. 5 represents segmented data.

[0148] As Figure 5 shown in FIG. 6, the requesting end can maintain a message queue window sq_window, the maximum value of the window is BDP, and can also establish a mapping table between the segmented index number and the PSN. The high bit of the DMA cache index can be sq_id, that is, the sending queue index number, and the low bit of the DMA retransmission cache index can be sgm_id (segment index).

[0149] Through the above method, the segmented data can be transmitted to the receiving end through the sending unit, and the segmentation information of the segmented data can be stored in the DDR.

[0150] Exemplarily, for the message queue window maintained by the requesting end, refer to Figure 6 as shown in Figure 6 FIG. 7, which is a schematic diagram of a message queue window provided by an embodiment of the present application.

[0151] As Figure 6 shown in FIG. 7, the SQ sending window is a circular window. The segmentation of the message queue window can be sgm_id, the bit width can be N, and 2 N is equal to BDP multiplied by 2. The minimum unacknowledged sgm_id can be the starting point of the valid window, and the maximum valid window is BDP.

[0152] The situation where the requesting end sends a request to update the maximum progress segmentation sgm_id of the window and the receiving end acknowledges and updates the minimum unacknowledged segmentation sgm_id of the window can be as Figure 6 shown in FIG. 8.

[0153] It should be noted that the embodiments of the present application only use Figure 6Brief descriptions of the message queue window are given by way of example and do not constitute any limitation.

[0154] Furthermore, after the requesting end sends the segmented data to the receiving end, the receiving end can receive the segmented data, extract the PSN of the segmented data, and match it with the PSN expected by the receiving end. If the match is successful, the sending unit sends an acknowledgment character (ACK) response or an RDMA READ response. The ACK response carries information such as the PSN. If the match fails, the sending unit sends a NAK PSN out-of-order response.

[0155] Among them, the NAK PSN out-of-order response can be a message used to prompt the requesting end to retransmit data.

[0156] It should be noted that in the go-back-N mode, the PSN carried in the NAK PSN out-of-order response is used to indicate the starting point of the lost packet; in the selective repeat Select Ack mode, the NAK PSN out-of-order response carries the PSN of the starting point of the lost packet and the PSN of the ending point of the lost packet.

[0157] Therefore, when a packet loss occurs during data transmission, the receiving end can detect the packet loss and send a negative acknowledgment (NAK) message to notify the requesting end to retransmit the data.

[0158] Such as Figure 5 As shown, the requesting end can receive response messages such as ACK responses, RDMA READ responses, and NAK out-of-order responses through the receiving unit, extract the PSN from the response messages, and obtain the segmented sgm_id from the mapping table. For the PSN carried in the ACK response, a completion queue element (CQE) can be sent to the local HOST completion queue CQ, so that the corresponding segmented information can be deleted in the DDR to release the memory of the DDR.

[0159] For NAK out-of-order responses and go-back-N mode retransmissions, segmented data retransmission can be performed for each segment from the starting sgm_id of the lost packet to the maximum progress sgm_id. For Select Ack mode retransmissions, segmented data retransmission can be performed according to each lost packet segment indicated by the NAK.

[0160] When retransmitting segmented data, the sq_id and sgm_id can be used as indexes to read the header information and payload information from the DDR (DMA retransmission buffer). If the retransmitted segment is a segment without payload such as RDMA READ, the header information can be used to complete the retransmission. If the retransmitted segment is a segment carrying payload data, the MTT table can be read using the index within the L_KEY to implement the conversion from VA to IOVA (IO Virtual Address), obtaining the physical address of the payload data. The DMA transfer is initiated using the IOVA and the payload data length length to read the payload data from the local memory, and then the segment header and payload are recombined into segmented data, and the segmented data is retransmitted.

[0161] In this way, the receiving end can receive the retransmitted segmented data to achieve packet loss recovery.

[0162] It should be noted that the data transmission method provided by the embodiments of this application can be implemented in a Field Programmable Gate Array (FPGA), and can also be extended to be implemented on an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a System on Chip (SOC), etc.

[0163] In the embodiments of this application, DDR4 can be used as off-chip cache, which supports 25G, 100G, and 200G bandwidths, and can be extended to High Bandwidth Memory DRAM (HBM for short) as off-chip cache to support higher bandwidths.

[0164] In summary, for the data transmission method provided by the embodiments of this application, the local HCA caches the header information of all in-flight segmented data of SQ less than 512 bits to the off-chip DDR, and the DDR can meet the bandwidth requirements of 25G, 100G, 200G or even higher. The local HCA caches all in-flight segmented payload data of SQ to the off-chip DDR, which can occupy less DDR memory and save costs. The local HCA only caches the header information and payload information, and uses a large-capacity DDR as cache. Only a single piece of DDR can meet the requirements of multiple QPs. For example, a piece of 8Gbits-capacity DDR4, the maximum number of in-flight messages of a single SQ is 256, the segment header and DMA retransmission information are 512 bits, and it can support 64K QPs. The local HCA caches fields such as the VA and payload length of the payload data after segmentation. After packet loss, the DMA transfer can be initiated to obtain the payload without re-moving the SQ WQE, which does not affect the DMA processing flow.

[0165] Figure 7 It is a schematic structural diagram of a data transmission device 70 provided by the embodiments of this application. For example, please refer to Figure 7 As shown, the data transmission device 70 may include:

[0166] A sending module 701 for sending data packets to a receiving end.

[0167] A storage module 702 for storing the segmentation information in at least one segmented data of the data packet in a memory, where the storage space occupied by the segmentation information is smaller than the storage space occupied by the segmented data corresponding to the segmentation information.

[0168] A processing module 703 for, when receiving a retransmission message from the receiving end, obtaining, according to the segmentation information indication information carried in the retransmission message, target segmentation information corresponding to the segmentation information indication information from at least one segmentation information stored in the memory.

[0169] The sending module 701 is further configured to transmit, according to the target segmentation information, target segmented data corresponding to the target segmentation information to the receiving end.

[0170] In a possible implementation, the target segmentation information includes a target segmentation type and header information, where the target segmentation type is used to indicate whether the target segmented data carries payload data; the processing module 703 is specifically configured to determine, according to the segmentation information indication information carried in the retransmission message, the target segmentation type and header information corresponding to the segmentation information indication information from at least one segmentation information stored in the memory; judge whether the target segmented data corresponding to the target segmentation information carries target payload data according to the target segmentation type; if it is determined that the target segmented data does not carry the target payload data, obtain the header information of the target segmented data in the memory.

[0171] In a possible implementation, the sending module 701 is specifically configured to transmit the header information to the receiving end according to the header information of the target segmented data.

[0172] In a possible implementation, the target segmentation information further includes target payload information, where the storage space occupied by the target payload information is smaller than the storage space occupied by the target payload data corresponding to the target payload information, and the processing module 703 is specifically configured to, if it is determined that the target segmented data carries the target payload data, obtain the target payload information and the header information in the memory.

[0173] In a possible implementation, the sending module 701 is specifically configured to obtain, according to the target payload information in the target segmentation information, the target payload data carried by the target segmented data in the local memory of the requesting end; recombine the header information and the target payload data into the target segmented data, and transmit the target segmented data to the receiving end.

[0174] In a possible implementation, the target payload information includes a virtual address and a target payload data length; the processing module 703 is specifically configured to convert the virtual address into a physical address by using a pre-created memory address translation table, where the physical address is the starting position of the target payload data in the local memory; and obtain the target payload data from the local memory in a direct memory access manner according to the physical address and the target payload data length.

[0175] In a possible implementation, the segmentation information indication information includes a sequence number; the processing module 703 is specifically configured to determine an index number corresponding to the sequence number according to the sequence number carried in the retransmission message; and obtain the target segmentation information from at least one piece of segmentation information stored in the memory based on the index number.

[0176] In a possible implementation, the storage module 702 is specifically configured to, when determining that the type of the data packet is a type carrying payload data, determine whether the length of the payload data carried in the data packet is greater than the path maximum transmission unit, where the path maximum transmission unit is the maximum amount of data allowed to pass through by the network used to send data to the data request segment; when the length of the payload data carried in the data packet is greater than the path maximum transmission unit, split the data packet into at least one piece of segmented data, where the amount of data of each piece of segmented data in the at least one piece of segmented data is less than or equal to the path maximum transmission unit; for each piece of segmented data in the at least one piece of segmented data, obtain the header information, the segmentation type, and the payload information of the segmented data to obtain the segmentation information of the segmented data, where the segmentation type is used to indicate that the segmented data carries payload data; add a sequence number and an index number to the segmentation information, and store the segmentation information after adding the sequence number and the index number in the memory.

[0177] In a possible implementation, the processing module 703 is further configured to, when receiving a message indicating successful transmission of segmented data, delete the segmentation information corresponding to the successfully transmitted segmented data from the memory according to the segmentation information indication information carried in the message.

[0178] The data transmission device provided by the embodiments of the present application can execute the technical solutions of the data transmission method in any of the above embodiments. The implementation principle and the beneficial effects are similar to those of the data transmission method. For details, refer to the implementation principle and the beneficial effects of the data transmission method, which will not be elaborated here.

[0179] Figure 8 This is a schematic structural diagram of an electronic device provided by the embodiments of the present application. As Figure 8 shown, the electronic device 800 may include: at least one processor 801 and a memory 802.

[0180] A memory 802 for storing programs. Specifically, the program may include program codes, and the program codes include computer operation instructions.

[0181] The memory 802 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.

[0182] A processor 801 is configured to execute the computer-executable instructions stored in the memory 802 to implement the data transmission method described in the foregoing method embodiments. Among them, the processor 801 may be a central processing unit (CPU for short), or an application specific integrated circuit (ASIC for short), or one or more integrated circuits configured to implement the embodiments of the present application. Specifically, when implementing the data transmission method described in the foregoing method embodiments, the electronic device may be, for example, an electronic device with processing functions such as a terminal or a server.

[0183] Optionally, the electronic device 800 may further include a communication interface 803. In a specific implementation, if the communication interface 803, the memory 802, and the processor 801 are independently implemented, the communication interface 803, the memory 802, and the processor 801 may be interconnected through a bus and communicate with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc., but it does not mean that there is only one bus or one type of bus.

[0184] Optionally, in a specific implementation, if the communication interface 803, the memory 802, and the processor 801 are integrated on a chip, the communication interface 803, the memory 802, and the processor 801 may communicate through an internal interface.

[0185] The present application also provides a computer-readable storage medium, which may include: various media capable of storing program codes such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs. Specifically, program instructions are stored in the computer-readable storage medium, and the program instructions are used for the method in the above embodiments.

[0186] The present application also provides a program product, which includes execution instructions stored in a readable storage medium. At least one processor of an electronic device can read the execution instructions from the readable storage medium, and the execution of the execution instructions by at least one processor enables the electronic device to implement the data transmission methods provided by the above various embodiments.

[0187] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the various embodiments of the present application.

Claims

1. A data transmission method, characterized in that, Applied to the requesting end, the method includes: Sending a data packet to the receiving end and storing the segmentation information in at least one segmented data of the data packet in a memory, where the storage space occupied by the segmentation information is smaller than the storage space occupied by the segmented data corresponding to the segmentation information; When receiving a retransmission message from the receiving end, obtaining, according to the segmentation information indication information carried in the retransmission message, target segmentation information corresponding to the segmentation information indication information from at least one segmentation information stored in the memory; Transmitting, according to the target segmentation information, the target segmented data corresponding to the target segmentation information to the receiving end.

2. The method according to claim 1, characterized in that, The target segmentation information includes a target segmentation type and header information, and the target segmentation type is used to indicate whether the target segmented data carries payload data; The obtaining, according to the segmentation information indication information carried in the retransmission message, target segmentation information corresponding to the segmentation information indication information from at least one segmentation information stored in the memory includes: Determining, according to the segmentation information indication information carried in the retransmission message, the target segmentation type and header information corresponding to the segmentation information indication information from at least one segmentation information stored in the memory; Judging, according to the target segmentation type, whether the target segmented data corresponding to the target segmentation information carries target payload data; If it is determined that the target segmented data does not carry target payload data, obtaining the header information of the target segmented data in the memory.

3. The method according to claim 2, characterized in that, The transmitting, according to the target segmentation information, the target segmented data corresponding to the target segmentation information to the receiving end includes: Transmitting the header information to the receiving end according to the header information of the target segmented data.

4. The method according to claim 2, wherein The target segmentation information further includes target payload information, where the storage space occupied by the target payload information is smaller than the storage space occupied by the target payload data corresponding to the target payload information, and the method further includes: If it is determined that the target segmented data carries target payload data, obtaining the target payload information and the header information in the memory.

5. The method according to claim 4, characterized in that The transmitting, according to the target segmentation information, the target segmented data corresponding to the target segmentation information to the receiving end includes: Obtaining, according to the target payload information in the target segmentation information, the target payload data carried by the target segmented data in the local memory of the requesting end; Recombining the header information and the target payload data into the target segmented data and transmitting the target segmented data to the receiving end.

6. The method according to claim 5, wherein The target payload information includes a virtual address and a target payload data length; The obtaining, according to the target payload information in the target segmentation information, the target payload data carried by the target segmented data in the local memory of the requesting end includes: Converting the virtual address to a physical address using a pre-created memory address translation table, where the physical address is the starting position of the target payload data in the local memory; Obtaining the target payload data in the local memory in a direct memory access manner according to the physical address and the target payload data length.

7. The method according to any one of claims 1-6, characterized in that The segmented information indication information includes a sequence number; Obtaining, from at least one piece of segmented information stored in the memory, target segmented information corresponding to the segmented information indication information according to the segmented information indication information carried in the retransmission message includes: Determining an index number corresponding to the sequence number according to the sequence number carried in the retransmission message; Obtaining the target segmented information from at least one piece of segmented information stored in the memory based on the index number.

8. The method according to claim 7, characterized in that Storing the segmented information in at least one piece of segmented data of the data packet in a memory includes: When it is determined that the type of the data packet is a type carrying payload data, determining whether the length of the payload data carried in the data packet is greater than the path maximum transmission unit, where the path maximum transmission unit is the maximum amount of data allowed to pass through by the network used to send data to the data request segment; When the length of the payload data carried in the data packet is greater than the path maximum transmission unit, splitting the data packet into at least one piece of segmented data, and the data amount of each piece of segmented data in the at least one piece of segmented data is less than or equal to the path maximum transmission unit; For each piece of segmented data in the at least one piece of segmented data, obtaining the header information, segmented type, and payload information of the segmented data to obtain the segmented information of the segmented data, where the segmented type is used to indicate that the segmented data carries payload data; Adding a sequence number and an index number to the segmented information, and storing the segmented information after adding the sequence number and the index number in the memory.

9. The method according to claim 1, wherein The method further includes: When receiving a message indicating successful transmission of segmented data, deleting, from the memory, the segmented information corresponding to the segmented data with successful transmission according to the segmented information indication information carried in the message.

10. A data transmission device, characterized in that, Includes: A sending module, configured to send a data packet to a receiving end; A storage module, configured to store the segmented information of each piece of segmented data in at least one piece of segmented data of the data packet in a memory, where the storage space occupied by the segmented information is smaller than the storage space occupied by the segmented data corresponding to the segmented information; A processing module, configured to, when receiving a retransmission message, obtain, from at least one piece of segmented information stored in the memory, target segmented information corresponding to the sequence number carried in the retransmission message; The sending module is further configured to transmit, to the receiving end, target segmented data corresponding to the target segmented information according to the target segmented information.

11. An electronic device, characterized in that, Includes a memory and a processor; wherein, The memory is configured to store a computer program; The processor is configured to read the computer program stored in the memory and execute a data transmission method according to any one of claims 1-9 above according to the computer program in the memory.

12. A computer-readable storage medium, characterized in that, Computer-executable instructions are stored in the computer-readable storage medium, and when the processor executes the computer-executable instructions, a data transmission method according to any one of claims 1-9 above is implemented.