Data transmission method and device based on network card system and medium
By using network coding technology in the network card system, the problem of high latency of traditional RoCEv2 in the face of packet loss and out-of-sequence is solved, achieving efficient reliability and low latency of data transmission, and optimizing network resource utilization and system performance. .
Patent Information
- Application Number
- CN202410990994.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-07-23
AI Technical Summary
Traditional RoCEv2 is difficult to achieve efficient data recovery in the face of packet loss and disorder, resulting in high data transmission delay, and the complex packet loss processing logic of hardware implementation is difficult to implement on the network card.
Network coding technology is used to encode and decode data through the collaborative work of the encoding decision-making sub-module, encoding execution sub-module, transmission logic and decoding module, and uses encoding tags to distinguish and process unencoded and encoded data packets to reduce retransmissions and improve data Transmission reliability and real-time performance.
It improves the reliability and real-time performance of data transmission, reduces the delay caused by retransmission, optimizes the utilization of network resources, enhances network adaptability and overall system performance, and reduces resource waste caused by retransmission.
Smart Images

Figure CN118713795A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a data transmission method, device and medium based on a network card system. Background Art
[0002] With the continuous development of network infrastructure and forwarding equipment in data centers, the link transmission speed of data center networks can now reach 100Gbps and is developing towards 400Gbps. This also encourages the operation of various online data-intensive applications, distributed computing services, and machine learning training tasks on the data center structure. These throughput-sensitive and latency-sensitive applications require low-latency, high-throughput networks and high CPU utilization server-side support. To this end, most existing solutions deploy RoCEv2.
[0003] Traditional RoCEv2 is very sensitive to packet loss and out-of-order packets because the transmission protocol implemented in hardware on the network card is difficult to implement complex packet loss processing logic. The Improved RoCE NIC (IRN) implements a new network card design, replacing the Back-Off N Frame Protocol (GBN Protocol) executed by the traditional RoCE network card for out-of-order packets with the Selective Repeat Protocol (SR Protocol), which implements a more effective loss recovery strategy. Figure 1 The figure shows the RDMA selective retransmission protocol flow chart. In simple terms, when the receiver receives an out-of-order data packet, it will be regarded as a packet loss, and a retransmission notification will be sent to the receiver. After receiving the retransmission notification, the receiver will retransmit the lost data packet, but the retransmission behavior always has a lag, which may still cause excessive delay. Summary of the invention
[0004] One or more embodiments of the present specification provide a data transmission method, device and medium based on a network card system, which are used to solve the technical problems raised by the background technology.
[0005] One or more embodiments of this specification adopt the following technical solutions:
[0006] One or more embodiments of this specification provide a data transmission method based on a network card system, wherein the network card system includes a coding decision submodule, a coding execution submodule, and a transmission logic and decoding module, and the method includes:
[0007] When the first user sends transmission data, the network card system obtains the transmission command issued by the first user, parses the address information of the data storage according to the transmission command, and transmits the address information to the encoding decision submodule;
[0008] The encoding decision submodule obtains the data volume of the transmission data according to the address information, and if it is determined based on the data volume of the transmission data that the transmission data needs to be encoded, determines the encoding behavior information of the transmission data, and calls the DMA controller to fetch the transmission data into the encoding buffer area of the encoding execution submodule, and transmits the encoding behavior information to the encoding execution submodule and the transmission logic respectively;
[0009] When the encoding execution submodule receives the encoding behavior information, it encodes the transmission data in the encoding buffer area according to the encoding behavior information, and transmits the encoded data to the transmission buffer area of the transmission logic;
[0010] The transmission logic distinguishes and encapsulates the uncoded incoming data and the coded incoming data to obtain a data packet, wherein the data packet includes the uncoded data packet and the coded data packet, and for the coded data packet, a coding tag carrying the coding behavior information is added to the message header;
[0011] When the second user receives the transmission data, the transmission logic performs an abnormality detection on the received data packet, and detects whether the message header of the data packet carries a coding tag, obtains an uncoded data packet that passes the detection and a coded data packet that passes the detection, stores the uncoded data packet that passes the detection into a corresponding position of the memory, and sends the coded data packet that passes the detection to the decoding module;
[0012] The decoding module decodes the received encoded data packet that has passed the detection to obtain decoded data, and stores the decoded data in a corresponding position of the memory.
[0013] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0014] Improve data transmission reliability: Traditional RoCEv2 is sensitive to packet loss and disorder, while this method uses network coding for data transmission. When packet loss occurs in the network, the receiving end can recover the lost data packets through decoding operations, reducing data loss and transmission errors caused by packet loss and improving data transmission reliability.
[0015] Reduce the delay caused by retransmission: Although the improved RoCE network card adopts the selective repeat protocol (SR protocol), the retransmission behavior still has a lag, which may cause excessive delay. Network coding can avoid the retransmission of lost data packets to a certain extent, thereby reducing transmission delay and improving the real-time performance of data transmission.
[0016] Enhanced network adaptability: Network coding can make data transmission more adaptable in the face of packet loss. Even if the network environment is unstable and packet loss occurs, data can be restored through decoding to ensure data integrity and accuracy.
[0017] Optimize network resource utilization: Reduce network resource waste caused by retransmission, improve network bandwidth utilization, and make more efficient use of network resources.
[0018] Improve the overall system performance: The coordinated work of the coding decision submodule, coding execution submodule, transmission logic and decoding module, as well as the application of network coding, improves the data processing efficiency and performance of the entire system, making data transmission more efficient and stable.
[0019] Further, the encoding decision submodule obtains the data volume of the transmission data according to the address information, including:
[0020] The encoding decision submodule obtains the number of addresses according to the starting address and the ending address;
[0021] The data volume of the transmission data is obtained according to the data volume of each address and the number of addresses.
[0022] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0023] Accurately calculate the amount of data: By obtaining the number of addresses based on the start address and the end address, and combining the amount of data at each address, the amount of data to be transmitted can be accurately calculated. This helps to more accurately assess the needs and resource allocation of data transmission, and improve the efficiency and accuracy of data transmission.
[0024] Optimize resource allocation: After accurately knowing the amount of data to be transmitted, you can more reasonably allocate system resources, such as memory, bandwidth, etc., to avoid waste or shortage of resources and improve the overall performance and resource utilization of the system.
[0025] Supporting encoding decisions: Provides key information for the encoding decision submodule. Based on accurate data volume calculation, the encoding decision submodule can more accurately determine whether data needs to be encoded and determine appropriate encoding behavior information, thereby improving the reliability and efficiency of data transmission.
[0026] Further, if it is determined based on the amount of the transmission data that the transmission data needs to be encoded, the method further includes:
[0027] Obtaining the current network card sending rate of the network card system;
[0028] Determine the current network round-trip time RTT and the current network packet loss rate based on the current received data packets;
[0029] Based on the amount of data to be sent, the current network card sending rate, the RTT of the current network and the packet loss rate of the current network, it is determined whether the amount of the transmitted data requires network coding.
[0030] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0031] Improve transmission efficiency: By obtaining the current network card transmission rate of the network card system, determining the current network round-trip time (RTT) and packet loss rate, and combining the amount of data to be sent to determine whether network coding is needed, you can make optimization decisions based on the actual network conditions and data volume, avoid unnecessary coding operations, and thus improve data transmission efficiency.
[0032] Optimize network resource utilization: Considering factors such as the current network card sending rate, RTT, and packet loss rate, network resources can be allocated more reasonably. For situations with good network conditions and low packet loss rates, the use of encoding can be reduced to save computing resources; for situations with poor network conditions and high packet loss rates, the reliability of data transmission can be improved by determining whether encoding is needed, making full use of network resources.
[0033] Improve the reliability of data transmission: Determine whether network coding is needed based on the current network RTT and packet loss rate, and handle the packet loss in the network accordingly. If the packet loss rate is high, coding can increase data redundancy, improve data transmission reliability, and reduce the impact of data loss on transmission.
[0034] Adapt to different network environments: This method can be adjusted according to the real-time network conditions. Different network environments may have different network card sending rates, RTTs, and packet loss rates. Through this dynamic judgment method, the transmitted data can better adapt to various network conditions and improve the stability and adaptability of data transmission.
[0035] Reduce transmission costs: By accurately determining whether network coding is needed, we can avoid the extra costs caused by excessive use of coding, such as computing costs and time costs. At the same time, reasonable coding decisions can also reduce network bandwidth consumption caused by data retransmission, thereby reducing transmission costs.
[0036] Further, judging whether the amount of the transmitted data requires network coding based on the amount of data to be sent, the current network card sending rate, the RTT of the current network and the packet loss rate of the current network includes:
[0037] Setting a first threshold and a second threshold for the RTT and packet loss rate of the network respectively;
[0038] Setting a third threshold value for data transmission time;
[0039] Determine the current data transmission time according to the current network card sending rate and the data volume of the transmission data;
[0040] Based on the amount of data to be sent, determine whether the RTT of the current network meets the first threshold, and / or determine whether the packet loss rate of the current network meets the second threshold, and / or determine whether the current data transmission time meets the third threshold.
[0041] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0042] Optimize network performance: By setting thresholds for RTT, packet loss rate, and data transmission time and making judgments based on the current situation, you can promptly discover problems in the network and take corresponding measures to optimize network performance and improve the efficiency and quality of data transmission.
[0043] Adapt to different data volume requirements: The threshold changes step by step with the amount of data to be sent, which can better adapt to data transmission requirements of different scales. For smaller data volumes, the threshold requirements can be appropriately relaxed to avoid excessive resource consumption; for larger data volumes, the strictness of the threshold can be increased to ensure the reliability and timeliness of data transmission.
[0044] Improve the reliability of data transmission: By monitoring and judging the RTT and packet loss rate, unstable factors in the network can be discovered in a timely manner, and measures can be taken to repair or adjust them, thereby reducing the risk of data loss and improving the reliability of data transmission.
[0045] Reasonable allocation of resources: Determine the current data transmission time based on the current network card sending rate and the amount of transmitted data, and compare it with the set third threshold, which can help to reasonably allocate network resources and avoid waste or shortage of resources.
[0046] Enhance network adaptability: The solution can be dynamically adjusted according to the actual situation of the network, so that the network can better adapt to different environments and needs, and improve the overall adaptability and flexibility of the network.
[0047] Further, if it is determined based on the data volume of the transmission data that the transmission data does not need to be encoded, the method further includes:
[0048] The transmission data is fetched into a sending buffer area of the transmission logic according to the address information.
[0049] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0050] Improve transmission efficiency: When it is determined that the transmitted data does not need to be encoded, it is directly taken to the sending buffer of the transmission logic according to the address information, reducing the time consumption caused by unnecessary encoding operations, thereby improving the overall efficiency of data transmission.
[0051] Save system resources: Avoid occupying system resources during the encoding process, such as computing resources, memory resources, etc., so that these resources can be better allocated to other tasks, improving the utilization of system resources.
[0052] Furthermore, the encoding behavior information includes the amount of data in the encoding batch and the amount of redundant data generated by the encoding, and the encoded data includes redundant data and initial data.
[0053] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0054] Accurately evaluate the encoding effect: By recording the amount of data in the encoding batch and the amount of redundant data generated by the encoding, the effect of the encoding behavior can be accurately evaluated. This helps to understand the changes in data during the encoding process and provides a basis for further optimizing the encoding strategy.
[0055] Improve data reliability: The encoded data includes redundant data and initial data. The existence of redundant data can be used to recover lost data when problems such as packet loss occur during data transmission, thereby improving the reliability of data transmission.
[0056] Optimize network resource utilization: Understanding the amount of data in the encoding batch and the amount of redundant data generated can help reasonably adjust the encoding parameters to minimize the generation of redundant data while ensuring data reliability, thereby optimizing the utilization of network resources and avoiding unnecessary bandwidth waste.
[0057] Facilitates error detection and recovery: The encoded data contains redundant data. When the receiver receives the data, it can detect and recover possible errors by checking and processing the redundant data, thereby improving the accuracy of the data.
[0058] Further, the transmission logic performs anomaly detection on the received data packet, and detects whether the message header of the data packet carries a coding tag, and obtains an uncoded data packet that passes the detection and a coded data packet that passes the detection, including:
[0059] The transmission logic detects whether the header of the data packet carries a coding tag, and obtains the uncoded data packet and the coded data packet;
[0060] The transmission logic performs packet loss detection and error detection on both the uncoded data packet and the coded data packet to obtain an uncoded data packet that passes the detection and a coded data packet that passes the detection.
[0061] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0062] Improve data accuracy: By performing packet loss detection and error detection on data packets, errors that occur during data transmission can be discovered and corrected in a timely manner, thereby improving data accuracy and integrity.
[0063] Ensure data reliability: Detect whether the packet header carries a coding tag, distinguish between uncoded packets and coded packets, and then perform targeted processing on different types of packets to ensure the reliability of data transmission.
[0064] Enhance system stability: Perform anomaly detection on received data packets to promptly discover and handle abnormal situations, avoid the impact of abnormal data on the system, and enhance system stability.
[0065] Improve transmission quality: After packet loss detection and error detection, uncoded data packets that pass the detection and coded data packets that pass the detection are obtained. The quality of these data packets is guaranteed, which helps to improve the quality of the entire data transmission.
[0066] Further, the transmission logic performs an abnormality detection on the received data packet, and detects whether the message header of the data packet carries a coding tag, obtains an uncoded data packet that passes the detection and a coded data packet that passes the detection, and stores the uncoded data packet that passes the detection into a corresponding position of the memory, and sends the coded data packet that passes the detection to the decoding module, including:
[0067] The transmission logic performs packet loss detection and error detection on both the uncoded data packet and the coded data packet;
[0068] If the detection result is an uncoded error data packet and / or an uncoded out-of-order data packet, a retransmission notification is sent back;
[0069] If the detection result is a coded error data packet, the coded data packet is discarded;
[0070] If the detection result is an uncoded data packet that passes the detection, decapsulate the uncoded data packet and store the decapsulated data in a corresponding position of the memory;
[0071] If the detection result is that the encoded data packets have passed the detection, when the number of the encoded data packets reaches the decoding requirement, the encoded data packets that have passed the detection are sent to the decoding module.
[0072] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0073] Improve the accuracy and integrity of data transmission: By performing packet loss detection and error detection on uncoded and coded data packets, problematic data packets can be discovered and processed in a timely manner, such as sending back retransmission notifications or discarding erroneous data packets, thereby ensuring the accuracy and integrity of data transmission.
[0074] Optimize memory usage: Uncoded data packets that have passed the inspection are decapsulated and stored in the corresponding memory location, so that the data can be reasonably stored and managed, improving memory usage efficiency.
[0075] Ensure smooth decoding: Only when the number of encoded data packets reaches the decoding requirement will they be sent to the decoding module, ensuring the decoding process can proceed smoothly and avoiding decoding failures or errors caused by insufficient number of data packets.
[0076] Improve system reliability: Comprehensive detection and classification of data packets can effectively avoid further propagation and processing of erroneous data, thereby improving system reliability and stability.
[0077] One or more embodiments of this specification provide a data transmission device based on a network card system, wherein the network card system includes a coding decision submodule, a coding execution submodule, and a transmission logic and decoding module, and the device includes:
[0078] at least one processor; and,
[0079] a memory communicatively connected to the at least one processor; wherein,
[0080] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0081] When the first user sends transmission data, the network card system obtains the transmission command issued by the first user, parses the address information of the data storage according to the transmission command, and transmits the address information to the encoding decision submodule;
[0082] The encoding decision submodule obtains the data volume of the transmission data according to the address information, and if it is determined based on the data volume of the transmission data that the transmission data needs to be encoded, determines the encoding behavior information of the transmission data, and calls the DMA controller to fetch the transmission data into the encoding buffer area of the encoding execution submodule, and transmits the encoding behavior information to the encoding execution submodule and the transmission logic respectively;
[0083] When the encoding execution submodule receives the encoding behavior information, it encodes the transmission data in the encoding buffer area according to the encoding behavior information, and transmits the encoded data to the transmission buffer area of the transmission logic;
[0084] The transmission logic distinguishes and encapsulates the uncoded incoming data and the coded incoming data to obtain a data packet, wherein the data packet includes the uncoded data packet and the coded data packet, and for the coded data packet, a coding tag carrying the coding behavior information is added to the message header;
[0085] When the second user receives the transmission data, the transmission logic performs an abnormality detection on the received data packet, and detects whether the message header of the data packet carries a coding tag, obtains an uncoded data packet that passes the detection and a coded data packet that passes the detection, stores the uncoded data packet that passes the detection into a corresponding position of the memory, and sends the coded data packet that passes the detection to the decoding module;
[0086] The decoding module decodes the received encoded data packet that has passed the detection to obtain decoded data, and stores the decoded data in a corresponding position of the memory.
[0087] One or more embodiments of this specification provide a non-volatile computer storage medium, a network card system including a coding decision submodule, a coding execution submodule, a transmission logic and decoding module, and storing computer executable instructions, which can achieve the following when executed by a computer:
[0088] When the first user sends transmission data, the network card system obtains the transmission command issued by the first user, parses the address information of the data storage according to the transmission command, and transmits the address information to the encoding decision submodule;
[0089] The encoding decision submodule obtains the data volume of the transmission data according to the address information, and if it is determined based on the data volume of the transmission data that the transmission data needs to be encoded, determines the encoding behavior information of the transmission data, and calls the DMA controller to fetch the transmission data into the encoding buffer area of the encoding execution submodule, and transmits the encoding behavior information to the encoding execution submodule and the transmission logic respectively;
[0090] When the encoding execution submodule receives the encoding behavior information, it encodes the transmission data in the encoding buffer area according to the encoding behavior information, and transmits the encoded data to the transmission buffer area of the transmission logic;
[0091] The transmission logic distinguishes and encapsulates the uncoded incoming data and the coded incoming data to obtain a data packet, wherein the data packet includes the uncoded data packet and the coded data packet, and for the coded data packet, a coding tag carrying the coding behavior information is added to the message header;
[0092] When the second user receives the transmission data, the transmission logic performs an abnormality detection on the received data packet, and detects whether the message header of the data packet carries a coding tag, obtains an uncoded data packet that passes the detection and a coded data packet that passes the detection, stores the uncoded data packet that passes the detection into a corresponding position of the memory, and sends the coded data packet that passes the detection to the decoding module;
[0093] The decoding module decodes the received encoded data packet that has passed the detection to obtain decoded data, and stores the decoded data in a corresponding position of the memory.
[0094] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:
[0095] Improve data transmission reliability: Traditional RoCEv2 is sensitive to packet loss and disorder, while this method uses network coding for data transmission. When packet loss occurs in the network, the receiving end can recover the lost data packets through decoding operations, reducing data loss and transmission errors caused by packet loss and improving data transmission reliability.
[0096] Reduce the delay caused by retransmission: Although the improved RoCE network card adopts the selective repeat protocol (SR protocol), the retransmission behavior still has a lag, which may cause excessive delay. Network coding can avoid the retransmission of lost data packets to a certain extent, thereby reducing transmission delay and improving the real-time performance of data transmission.
[0097] Enhanced network adaptability: Network coding can make data transmission more adaptable in the face of packet loss. Even if the network environment is unstable and packet loss occurs, data can be restored through decoding to ensure data integrity and accuracy.
[0098] Optimize network resource utilization: Reduce network resource waste caused by retransmission, improve network bandwidth utilization, and make more efficient use of network resources.
[0099] Improve the overall system performance: The coordinated work of the coding decision submodule, coding execution submodule, transmission logic and decoding module, as well as the application of network coding, improves the data processing efficiency and performance of the entire system, making data transmission more efficient and stable. BRIEF DESCRIPTION OF THE DRAWINGS
[0100] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. In the drawings:
[0101] Figure 1 A schematic diagram of the RDMA selective retransmission protocol flow provided for one or more embodiments of this specification;
[0102] Figure 2 A flowchart of a data transmission method based on a network card system provided in one or more embodiments of this specification;
[0103] Figure 3 A network card system architecture diagram provided for one or more embodiments of this specification;
[0104] Figure 4 A schematic diagram showing the comparison of the completion time of a small data volume transmission stream provided by one or more embodiments of this specification;
[0105] Figure 5 A schematic diagram showing the time taken to complete a large data volume transmission stream provided by one or more embodiments of this specification;
[0106] Figure 6 A schematic diagram showing a comparison of downstream completion times at different packet loss rates provided by one or more embodiments of this specification;
[0107] Figure 7 A schematic diagram showing a comparison of completion times of different round-trip transmission delay flows provided in one or more embodiments of this specification;
[0108] Figure 8 A schematic diagram of the structure of a data transmission device based on a network card system provided in one or more embodiments of this specification. DETAILED DESCRIPTION
[0109] The embodiments of the present specification provide a data transmission method, device and medium based on a network card system.
[0110] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0111] Figure 2 A flowchart of a data transmission method based on a network card system is provided for one or more embodiments of this specification. The process can be executed by a data transmission system. The embodiments of this specification are applied to scenarios supporting RDMA transmission on lossy networks. The network card system may include a coding decision submodule, a coding execution submodule, and a transmission logic and decoding module. Certain input parameters or intermediate results in the process allow manual intervention and adjustment to help improve accuracy.
[0112] The method steps of the embodiment of this specification are as follows:
[0113] S202, when the first user sends transmission data, the network card system obtains the transmission command issued by the first user, parses the address information of the data storage according to the transmission command, and transmits the address information to the encoding decision submodule.
[0114] In the embodiment of this specification, when the first user sends transmission data, the network card system can first receive the transmission notification and then obtain the transmission command issued by the first user. Regarding the above content, the following specific implementation scheme can be adopted:
[0115] Acquisition of transmission commands: The network card system can set up a monitoring mechanism to monitor the operation of the first user in real time. When the first user sends an operation to transmit data, the network card system can capture this event in time and obtain the transmission command issued by the first user.
[0116] Parsing of transmission commands: A special parsing module can be configured in the network card system to analyze the transmission commands. The parsing module extracts information related to the data storage address from the transmission command according to preset rules and formats.
[0117] Transmission of address information: After parsing the address information, the network card system transmits the address information to the encoding decision submodule through the internal data channel. To ensure the stability and accuracy of data transmission, some verification mechanisms may be required to verify the integrity and correctness of the address information.
[0118] S204, the encoding decision submodule obtains the data amount of the transmission data according to the address information, and if it is determined based on the data amount of the transmission data that the transmission data needs to be encoded, the encoding behavior information of the transmission data is determined, and the DMA controller is called to obtain the transmission data to the encoding buffer area of the encoding execution submodule, and the encoding behavior information is passed to the encoding execution submodule and the transmission logic respectively.
[0119] In the embodiment of this specification, when determining the amount of data to be transmitted, the coding decision submodule can obtain the number of addresses based on the starting address and the ending address, and obtain the amount of data to be transmitted based on the amount of data at each address and the number of addresses, wherein the addresses of each data in the transmitted data are continuous addresses.
[0120] It should be noted that the above-mentioned determination of the amount of data to be transmitted may be implemented by the following specific implementation scheme:
[0121] Obtaining the starting address and the ending address: The encoding decision submodule extracts the starting address and the ending address from the received address information.
[0122] Calculate the number of addresses: Use mathematical calculation methods to subtract the value of the starting address from the value of the ending address, and then add 1 to get the number of addresses.
[0123] Get the data volume of each address: Get the data volume information corresponding to each address from the relevant configuration.
[0124] Calculate the amount of data transmitted: multiply the amount of data per address by the number of addresses to get the amount of data transmitted.
[0125] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0126] Accurately calculate the amount of data: Accurately calculate the amount of data: The decision submodule needs to calculate the total amount of data sent and the amount of data to be sent to make coding decisions. The network card obtains the transmission command issued by the user, parses the data storage address, calculates the total amount of transmission through the first address and the last address, and obtains the amount of data to be sent through the current sending address and the last address.
[0127] Optimize resource allocation: After accurately knowing the amount of data to be transmitted, you can more reasonably allocate system resources, such as memory, bandwidth, etc., to avoid waste or shortage of resources and improve the overall performance and resource utilization of the system.
[0128] Supporting encoding decisions: Provides key information for the encoding decision submodule. Based on accurate data volume calculation, the encoding decision submodule can more accurately determine whether data needs to be encoded and determine appropriate encoding behavior information, thereby improving the reliability and efficiency of data transmission.
[0129] Furthermore, before determining that the transmission data needs to be encoded based on the data volume of the transmission data, the current network card sending rate of the network card system can be obtained; the round-trip time RTT of the current network and the packet loss rate of the current network are determined according to the current situation of receiving data packets; based on the amount of data to be sent, the current network card sending rate, the RTT of the current network and the packet loss rate of the current network, it is determined whether the data volume of the transmission data requires network coding.
[0130] It should be noted that the above content can be implemented through the following specific implementation plans:
[0131] Get the current network card sending rate: You can use the interface or tool provided by the network card system to read the network card sending rate information. This may require interaction with the network card driver or related system API.
[0132] Determine the round-trip time (RTT) and packet loss rate of the current network: You can determine the RTT by sending a test packet and measuring its round-trip time. You can periodically send packets to the target address, record the sending time and the time to receive the response, and calculate the difference between the two as the RTT measurement. For the determination of the packet loss rate, you can calculate it by counting the number of packets sent and the number of packets received. Send a certain number of packets within a certain period of time, and then compare the actual number of packets received. The proportion of packet loss is the packet loss rate.
[0133] Determine whether the amount of data to be transmitted requires network coding: Based on actual needs and experience, determine some judgment conditions to decide whether network coding is required. For example, you can set a threshold. If the amount of data to be sent is large, the network card sending rate is low, the RTT is long, or the packet loss rate is high, then network coding is considered necessary; otherwise, it is not necessary. Substitute the obtained amount of data to be sent, the current network card sending rate, the current network RTT and packet loss rate into the judgment rules for calculation and comparison. Based on the judgment result, determine whether the amount of data to be transmitted requires network coding.
[0134] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0135] Improve transmission efficiency: By obtaining the current network card transmission rate of the network card system, determining the current network round-trip time (RTT) and packet loss rate, and combining the amount of data to be sent to determine whether network coding is needed, you can make optimization decisions based on the actual network conditions and data volume, avoid unnecessary coding operations, and thus improve data transmission efficiency.
[0136] Optimize network resource utilization: Considering factors such as the current network card sending rate, RTT, and packet loss rate, network resources can be allocated more reasonably. For situations with good network conditions and low packet loss rates, the use of encoding can be reduced to save computing resources; for situations with poor network conditions and high packet loss rates, the reliability of data transmission can be improved by determining whether encoding is needed, making full use of network resources.
[0137] Improve the reliability of data transmission: Determine whether network coding is needed based on the current network RTT and packet loss rate, and handle the packet loss in the network accordingly. If the packet loss rate is high, coding can increase data redundancy, improve data transmission reliability, and reduce the impact of data loss on transmission.
[0138] Adapt to different network environments: This method can be adjusted according to the real-time network conditions. Different network environments may have different network card sending rates, RTTs, and packet loss rates. Through this dynamic judgment method, the transmitted data can better adapt to various network conditions and improve the stability and adaptability of data transmission.
[0139] Reduce transmission costs: By accurately determining whether network coding is needed, we can avoid the extra costs caused by excessive use of coding, such as computing costs and time costs. At the same time, reasonable coding decisions can also reduce network bandwidth consumption caused by data retransmission, thereby reducing transmission costs.
[0140] Furthermore, when judging whether the amount of the transmitted data requires network coding based on the amount of data to be sent, the current network card sending rate, the RTT of the current network and the packet loss rate of the current network, a first threshold and a second threshold can be set for the RTT and packet loss rate of the network respectively; a third threshold can be set for the data transmission time; the current data transmission time is determined according to the current network card sending rate and the amount of the transmitted data; based on the amount of data to be sent, judging whether the RTT of the current network meets the first threshold, and / or judging whether the packet loss rate of the current network meets the second threshold, and / or judging whether the current data transmission time meets the third threshold.
[0141] It should be noted that the above content can be implemented through the following specific implementation plans:
[0142] Set thresholds: Determine the range of the amount of data to be sent and divide it into multiple steps. For example, it can be divided into step 1, step 2, step 3, etc. according to the size of the data. For the amount of data to be sent in each step, set the first threshold of RTT, the second threshold of packet loss rate, and the third threshold of data transmission time. These thresholds can be determined based on actual experience and network performance requirements. For example, when the amount of data to be sent is small, the first threshold of RTT can be set relatively high, the second threshold of packet loss rate can be set relatively low, and the third threshold of data transmission time can be set relatively long; as the amount of data to be sent increases, gradually reduce the first threshold of RTT, increase the strictness of the second threshold of packet loss rate, and shorten the third threshold of data transmission time. Determine the current data transmission time: obtain the current network card sending rate and the amount of data transmitted. The current data transmission time is calculated by the formula: data transmission time = amount of data transmitted / current network card sending rate.
[0143] Determine whether the threshold meets the requirements: obtain the RTT and packet loss rate of the current network. According to the ladder to which the amount of data to be sent belongs, determine the corresponding first threshold of RTT, the second threshold of packet loss rate, and the third threshold of data transmission time. Determine whether the RTT of the current network is less than or equal to the first threshold. If so, it is considered that the RTT meets the requirements; otherwise, it is considered that it does not meet the requirements. Determine whether the packet loss rate of the current network is less than or equal to the second threshold. If so, it is considered that the packet loss rate meets the requirements; otherwise, it is considered that it does not meet the requirements. Determine whether the current data transmission time is less than or equal to the third threshold. If so, it is considered that the data transmission time meets the requirements; otherwise, it is considered that it does not meet the requirements.
[0144] Take appropriate measures: If the RTT of the current network meets the first threshold, and the packet loss rate of the current network meets the second threshold, and the current data transmission time meets the third threshold, data transmission can be performed in a normal manner without special processing. If the RTT of the current network does not meet the first threshold, or the packet loss rate of the current network does not meet the second threshold, or the current data transmission time does not meet the third threshold, it is necessary to take appropriate measures according to the specific circumstances. For example, the encoding method can be adjusted, redundant information can be added, the transmission rate can be adjusted, etc., to improve the performance and reliability of data transmission. It should be noted that the embodiments of this specification have the following beneficial effects through the above content:
[0145] Optimize network performance: By setting thresholds for RTT, packet loss rate, and data transmission time and making judgments based on the current situation, you can promptly discover problems in the network and take corresponding measures to optimize network performance and improve the efficiency and quality of data transmission.
[0146] Adapt to different data volume requirements: The threshold changes step by step with the amount of data to be sent, which can better adapt to data transmission requirements of different scales. For smaller data volumes, the threshold requirements can be appropriately relaxed to avoid excessive resource consumption; for larger data volumes, the strictness of the threshold can be increased to ensure the reliability and timeliness of data transmission.
[0147] Improve the reliability of data transmission: By monitoring and judging the RTT and packet loss rate, unstable factors in the network can be discovered in a timely manner, and measures can be taken to repair or adjust them, thereby reducing the risk of data loss and improving the reliability of data transmission.
[0148] Reasonable allocation of resources: Determine the current data transmission time based on the current network card sending rate and the amount of transmitted data, and compare it with the set third threshold, which can help to reasonably allocate network resources and avoid waste or shortage of resources.
[0149] Enhance network adaptability: The solution can be dynamically adjusted according to the actual situation of the network, so that the network can better adapt to different environments and needs, and improve the overall adaptability and flexibility of the network.
[0150] Further, if it is determined based on the data volume of the transmission data that the transmission data does not need to be encoded, the transmission data may be fetched into a sending buffer area of the transmission logic according to the address information.
[0151] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0152] Improve transmission efficiency: When it is determined that the transmitted data does not need to be encoded, it is directly taken to the sending buffer of the transmission logic according to the address information, reducing the time consumption caused by unnecessary encoding operations, thereby improving the overall efficiency of data transmission.
[0153] Save system resources: Avoid occupying system resources during the encoding process, such as computing resources, memory resources, etc., so that these resources can be better allocated to other tasks, improving the utilization of system resources.
[0154] Further, regarding the above-mentioned determination of the encoding behavior information of the transmission data, and calling the DMA controller to fetch the transmission data into the encoding buffer area of the encoding execution submodule, the following specific implementation scheme can be adopted:
[0155] Determine the encoding behavior information: Once it is determined that the transmitted data needs to be encoded, further determine the encoding behavior information, which may include the amount of data in the encoding batch and the amount of redundant data generated by the encoding. Regarding the amount of data in the encoding batch, the amount of data processed each time can be determined based on the overall amount of data transmitted and the encoding requirements. Regarding the amount of redundant data generated by the encoding, the amount of redundant data generated during the encoding process can be calculated based on the encoding algorithm and requirements.
[0156] Call DMA controller: Start the DMA (Direct Memory Access) controller to directly transfer data between memories through hardware to improve data transmission efficiency.
[0157] Fetch the transmission data to the encoding buffer: The DMA controller transfers the transmission data directly from the original storage location to the encoding buffer of the encoding execution submodule according to the data volume of the set encoding batch, so as to perform subsequent encoding operations.
[0158] S206: When the encoding execution submodule receives the encoding behavior information, it encodes the transmission data in the encoding buffer area according to the encoding behavior information, and transmits the encoded data to the sending buffer area of the transmission logic.
[0159] In the embodiments of this specification, S206 may be implemented by the following specific implementation scheme:
[0160] Receiving encoding behavior information: The encoding execution submodule continuously monitors and waits to receive encoding behavior information.
[0161] Obtaining the transmission data in the encoding buffer: After receiving the encoding behavior information, the encoding execution submodule reads the transmission data to be encoded from the encoding buffer.
[0162] Perform encoding operation: encode the transmission data in the encoding buffer according to the encoding method specified in the encoding behavior information.
[0163] Transmit the encoded data: The encoded data is transferred to the transmission buffer of the transmission logic for subsequent data transmission operations.
[0164] S208, the transmission logic distinguishes and encapsulates the unencoded incoming data and the encoded incoming data to obtain a data packet, which includes an unencoded data packet and an encoded data packet, and for the encoded data packet, a coding tag carrying the encoding behavior information is added to the message header.
[0165] In the embodiment of this specification, the encoded data includes redundant data and initial data. S208 can be implemented as follows:
[0166] Data reception and classification: The transmission logic module receives the incoming data and classifies the data into uncoded incoming data and coded incoming data according to whether the data has been coded.
[0167] Data encapsulation: Encapsulate the uncoded incoming data to obtain an uncoded data packet. Encapsulate the coded incoming data to obtain a coded data packet.
[0168] Coding label addition: For the encoded data packet, a coding label is added to the message header. The coding label carries the coding behavior information, including the amount of data in the encoding batch and the amount of redundant data generated by the encoding.
[0169] Data processing: The encoded data is divided into redundant data and initial data for processing.
[0170] S210, when the second user receives the transmission data, the transmission logic performs an anomaly detection on the received data packet, and detects whether the message header of the data packet carries a coding tag, obtains an uncoded data packet that passes the detection and a coded data packet that passes the detection, stores the uncoded data packet that passes the detection into a corresponding position in the memory, and sends the coded data packet that passes the detection to the decoding module.
[0171] In an embodiment of the present specification, when an uncoded data packet that passes detection and a coded data packet that passes detection are obtained, the transmission logic can detect whether a message header of the data packet carries a coding tag to obtain the uncoded data packet and the coded data packet; the transmission logic performs packet loss detection and error detection on both the uncoded data packet and the coded data packet to obtain an uncoded data packet that passes detection and a coded data packet that passes detection.
[0172] It should be noted that the above content can be implemented through the following specific implementation plans:
[0173] Detection of coding tags: After receiving a data packet, the transmission logic reads the header of the data packet and checks whether the header carries a coding tag. Based on whether there is a coding tag, the data packet is divided into an uncoded data packet and a coded data packet.
[0174] Packet loss detection: Packet loss detection is performed for both uncoded and coded packets. Packet loss can be determined by checking the sequence number or other identifiers of the packet. If packet loss is found, appropriate processing measures are taken according to the specific transmission protocol and requirements, such as requesting retransmission or performing error processing.
[0175] Error detection: Error detection is performed on uncoded and coded data packets. Error detection methods such as checksum and cyclic redundancy check (CRC) can be used. The checksum value of the data packet is calculated and compared with the preset standard value. If the checksum value does not match, it means there is an error, and appropriate error handling measures are taken, such as error correction or request for retransmission.
[0176] Obtaining the data packets that have passed the detection: After the packet loss detection and the error detection, the uncoded data packets and the coded data packets that have passed the detection are marked as the uncoded data packets that have passed the detection and the coded data packets that have passed the detection, respectively.
[0177] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0178] Improve data accuracy: By performing packet loss detection and error detection on data packets, errors that occur during data transmission can be discovered and corrected in a timely manner, thereby improving data accuracy and integrity.
[0179] Ensure data reliability: Detect whether the packet header carries a coding tag, distinguish between uncoded packets and coded packets, and then perform targeted processing on different types of packets to ensure the reliability of data transmission.
[0180] Enhance system stability: Perform anomaly detection on received data packets to promptly discover and handle abnormal situations, avoid the impact of abnormal data on the system, and enhance system stability.
[0181] Improve transmission quality: After packet loss detection and error detection, uncoded data packets that pass the detection and coded data packets that pass the detection are obtained. The quality of these data packets is guaranteed, which helps to improve the quality of the entire data transmission.
[0182] Furthermore, the transmission logic can perform packet loss detection and error detection on both the uncoded data packet and the coded data packet; if the detection result is an uncoded error data packet and / or an uncoded out-of-order data packet, a retransmission notification is sent back; if the detection result is an encoded error data packet, the encoded data packet is discarded; if the detection result is an uncoded data packet that passes the detection, the uncoded data packet is decapsulated and the decapsulated data is stored in the corresponding position of the memory; if the detection result is an encoded data packet that passes the detection, when the number of the encoded data packets reaches the decoding requirement, the encoded data packet that passes the detection is sent to the decoding module.
[0183] It should be noted that the above content can be implemented through the following specific implementation plans:
[0184] Packet loss detection and error detection: The transmission logic performs packet loss detection and error detection on uncoded packets and coded packets respectively. Packet loss detection can determine whether a packet is lost by checking the sequence number, confirmation number and other information of the packet. Error detection can use methods such as checksum and cyclic redundancy check (CRC) to check whether there are errors in the packet.
[0185] Processing is performed according to the detection result: if the detection result is an uncoded error data packet and / or an uncoded out-of-order data packet, the transmission logic sends back a retransmission notification and requests the sender to resend the corresponding data packet; if the detection result is an encoded error data packet, the transmission logic directly discards the encoded data packet; if the detection result is an uncoded data packet that passes the detection, the transmission logic decapsulates the uncoded data packet, extracts the data therein, and stores the decapsulated data according to its corresponding position in the memory; if the detection result is an encoded data packet that passes the detection, the transmission logic counts the encoded data packets that pass the detection, and when the number of encoded data packets reaches the decoding requirement, these data packets are sent to the decoding module.
[0186] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0187] Improve the accuracy and integrity of data transmission: By performing packet loss detection and error detection on uncoded and coded data packets, problematic data packets can be discovered and processed in a timely manner, such as sending back retransmission notifications or discarding erroneous data packets, thereby ensuring the accuracy and integrity of data transmission.
[0188] Optimize memory usage: Uncoded data packets that have passed the inspection are decapsulated and stored in the corresponding memory location, so that the data can be reasonably stored and managed, improving memory usage efficiency.
[0189] Ensure smooth decoding: Only when the number of encoded data packets reaches the decoding requirement will they be sent to the decoding module, ensuring the decoding process can proceed smoothly and avoiding decoding failures or errors caused by insufficient number of data packets.
[0190] Improve system reliability: Comprehensive detection and classification of data packets can effectively avoid further propagation and processing of erroneous data, thereby improving system reliability and stability.
[0191] S212, the decoding module decodes the received encoded data packet that has passed the detection to obtain decoded data, and stores the decoded data in a corresponding position of a memory.
[0192] In the embodiments of this specification, S212 may be implemented by the following specific implementation scheme:
[0193] Data reception: The decoding module waits for the encoded data packet sent by the transmission logic that has passed the detection.
[0194] Decoding operation: When the encoded data packet is received, the corresponding decoding algorithm is used to decode the data packet. Make sure that the decoding algorithm corresponds to the algorithm used in the encoding process to correctly restore the data.
[0195] Data storage: The decoded data obtained after decoding is stored according to its corresponding position in the memory. The storage location plan of each data in the memory needs to be determined in advance in order to accurately store the data.
[0196] It should be noted that with the continuous development of network infrastructure and forwarding equipment in data centers, the link transmission speed of data center networks can now reach 100Gbps and is developing towards 400Gbps. This also encourages the operation of various online data-intensive applications, distributed computing services, and machine learning training tasks on the data center structure. These throughput-sensitive and latency-sensitive applications require low-latency, high-throughput networks and high-CPU utilization server-side support. However, the traditional software-implemented TCP / IP protocol greatly reduces CPU utilization and is difficult to provide low latency guarantees. Therefore, the Remote Direct Memory Access (RDMA) technology of the hardware offload transmission protocol has been widely used on data center Ethernet. Data center operators such as Google, Microsoft, and Alibaba have deployed RoCEv2 (RDMA over Converged Ethernet version 2).
[0197] The deployment of RDMA technology on Ethernet has achieved initial success. However, when the scale of RDMA network expands, it will be difficult to maintain high bandwidth utilization and low transmission latency. This is because RoCEv2 runs on a lossless network guaranteed by the priority flow control (PFC) mechanism. The negative effects of the PFC mechanism, such as head-of-line blocking, congestion propagation, and unfairness, will cause network performance loss. In addition, the mechanism faces the risk of blocking the entire network due to pause frame storms and occasional deadlocks. These disadvantages will also be magnified when the network scale expands. Therefore, abandoning the lossless network guarantee and supporting RDMA on a lossy network becomes a feasible solution.
[0198] Supporting RDMA on lossy networks also faces severe challenges. Unlike TCP / IP, traditional RoCEv2 is very sensitive to packet loss and out-of-order packets. This is because the transmission protocol implemented in hardware on the network card is difficult to implement complex packet loss processing logic. The Improved RoCE NIC (IRN) implements a new network card design, replacing the Back-Off N Frame Protocol (GBN Protocol) executed by the traditional RoCE network card for out-of-order packets with the Selective Repeat Protocol (SR Protocol), achieving a more effective loss recovery strategy. Figure 1 As shown in the figure, in simple terms, when the receiver receives out-of-order data packets, it will be considered as packet loss, and a retransmission notification will be sent to the receiver. After receiving the retransmission notification, the receiver retransmits the lost data packets. However, there is always a lag in the retransmission behavior, which will affect the low-latency guarantee of the flow.
[0199] The present invention is applied to scenarios supporting RDMA transmission on lossy networks (such as Ethernet). When network packet loss or failure occurs, loss recovery can be completed by retransmitting data packets. The problems to be solved by the present invention are: 1. Alleviating the negative impact of delayed flow completion time caused by retransmission. 2. Achieving lower time delay without affecting throughput.
[0200] The problem of loss recovery when deploying RDMA on a large-scale network aims to avoid data packet retransmission as much as possible to reduce latency. The present invention innovatively applies network coding to RDMA networks for data transmission. When packet loss occurs in the network, the receiving end can still recover the lost data packets through decoding operations. First, the encoding and decoding time introduced by various network coding schemes are tested. The current experimental test confirms that the encoding and decoding speed of the Cauchy coding method can match the RDMA transmission speed. Of course, other types of coding (such as Raptor coding, LT code, etc.) can also be used under the premise that performance can be guaranteed. In the experiment, the factors affecting the encoding and decoding speed of Cauchy coding and the impact of coding behavior on network performance are analyzed at the same time. The key factors affecting cluster performance such as time overhead, network throughput sinking, and decoding guarantee are studied in the case of changing network congestion and packet loss. The model is further constructed to express the problem, quantify the impact of redundant data packets introduced by network coding on the effective network throughput, and reduce the impact of retransmission behavior on the flow completion time. We then designed a dynamic coding strategy that can respond quickly to changes in network performance, and used FPGA technology to design a network card with integrated network coding function and self-adjusting coding scheme, which we named RDMA network card with network coding support.
[0201] The network card system architecture is as follows Figure 3As shown in the figure, the main functional modules are encoding module, decoding module and transmission logic. The encoding module includes encoding decision submodule and encoding execution submodule. The specific functions of each module are described as follows.
[0202] The coding module is responsible for adjusting and executing the coding scheme. The coding decision submodule formulates a suitable coding scheme according to the current network conditions to minimize the flow completion time. The influencing factors are complex and changeable. The establishment process of the mathematical model is as follows:
[0203] The encoding execution submodule in the encoding module performs calculations according to the encoding scheme at that time.
[0204] The transmission logic is responsible for encapsulating the coded or uncoded data into the protocol stack and sending it, and calculating the network's RTT (round trip time) and packet loss rate based on the current received data packets, and transmitting this information to the encoding module. For the received data packets, the loss and error conditions will be checked, and for the lost or erroneous data packets, decoding will be performed or retransmission notifications will be sent back based on the encoding conditions.
[0205] The decoding module is responsible for decoding the transmitted data and putting the data into the corresponding position of the memory through the DMA technology.
[0206] The above functional modules always play a role in the entire process of data stream transmission. The data plane process of data transmission will be explained in more detail below.
[0207] For the sender, the network card first obtains the transmission command issued by the user, parses the address information where the data is stored, and transmits the address information to the encoding decision submodule.
[0208] The coding decision submodule obtains the amount of data to be transmitted based on the address information where the data is stored, and decides whether to perform network coding at present by combining the recorded RTT, packet loss rate, and network card sending rate (these three factors are considered comprehensively to decide whether to perform network coding. If the RTT is long, the packet loss rate is high, or the network card sending rate is limited, it may be considered that the current network condition is not ideal. At this time, network coding may help improve the efficiency and reliability of data transmission.). If coding is required, the coding behavior is formulated, including the amount of data in the coding batch (the amount of data in the coding batch refers to the amount of data processed each time) and the amount of redundant data generated by the coding (the amount of redundant data is the amount of data generated additionally to improve the reliability and fault tolerance of the data), and the DMA controller is called to fetch the corresponding data into the coding buffer of the coding execution submodule, and then the previously generated coding behavior information is passed to the coding execution submodule and the transmission logic respectively. If coding is not required, no coding behavior is formulated, and the data is fetched into the transmission buffer of the transmission logic according to the address.
[0209] When the encoding execution submodule receives the encoding behavior information (which means that the encoding execution submodule has received relevant instructions and information on how to encode), it encodes the content in the encoding buffer according to the description (after receiving the encoding behavior information, the encoding execution submodule will encode the content in the encoding buffer according to the requirements of this information. The encoding buffer is an area for storing data to be encoded, and the encoding execution submodule will process the content therein according to specific encoding algorithms and rules), and then transmits the generated redundant data and the initial data to the sending buffer of the transmission logic (after the encoding operation is completed, redundant data (used to improve data reliability and fault tolerance) and initial data will be generated. These data will be transmitted to the sending buffer of the transmission logic. The sending buffer is an area for temporarily storing data to be transmitted so that subsequent data transmission operations can be carried out more efficiently).
[0210] The transmission logic distinguishes between directly transmitted data and encoded data, and performs inconsistent protocol encapsulation behaviors on the two types of data. For the encoded data packets, an encoding label will be added to the data packet header and the necessary encoding behavior information will be carried.
[0211] The transmission logic sends the encapsulated data packets according to the current sending rate.
[0212] For the receiver, the transmission logic first performs packet loss detection and error detection on the received data packets and checks whether the data packet header carries the coding tag, and performs corresponding processing: 1) For uncoded error data packets and out-of-order data packets, a retransmission notification is immediately sent back; 2) For coded error data packets, they are discarded without any processing; 3) For uncoded sequential data packets, the data packets will be decapsulated and the data will be stored in the corresponding position of the memory, and a confirmation will be replied after a certain number of accumulations; 4) For coded data packets, the coding behavior information will be obtained and waited. When the number of received data packets reaches the decoding requirement, the data packets will be decapsulated and the data and data sequence number will be sent to the decoding module, and a confirmation will be replied to the sender. For the redundant data packets that arrive later in the coding batch, a redundant notification will be immediately sent back so that the sender can stop sending the current coded data block in time and start sending the next data block. In the case of timeout but failure to receive enough data packets to support decoding, a coded data packet retransmission notification will be sent back. Note that for coded data packets, both retransmission notifications and redundant notifications will immediately trigger the sender to re-formulate the coding behavior.
[0213] The decoding module decodes the received data to recover lost or erroneous data and puts it into the correct memory address in the order in which it was received.
[0214] For the sender, if it receives a retransmission notification or confirmation information during the sending process, the receiving logic first determines whether the retransmission / confirmation data packet is a retransmission / confirmation of the encoded data packet. And according to the relevant information, the key information such as the transmission rate adjustment, packet loss rate and RTT parameter correction are changed. For data that is still lost after encoding, it will be retransmitted immediately. For unencoded lost data, the loss information is sent to the encoding decision submodule, which decides whether to encode and transmit the retransmitted data packet.
[0215] The sender and receiver will communicate according to the protocol until the transmission is completed.
[0216] The simulation results (mainly implementing random packet loss simulation) show that the transmission method using network coding can achieve lower latency for short flows, and through the control of coding decisions, it will not reduce the throughput of long flows. In addition, its advantages are still significant when network reliability decreases or the network scale increases. The experiment first compared the flow completion time of the coding scheme and the non-coding scheme as the amount of transmitted data increases, with a fixed packet loss rate of 0.1, an RTT of 8 microseconds, and a transmission rate of 100Gbps. Figure 4 As shown in the diagram of the small data volume transmission flow completion time comparison, when the data transmission volume is small, the encoding completion time is always less than the non-encoding completion time, and when the data volume is 50KB, the transmission data flow can be sent within 1 RTT. At this time, the encoding scheme avoids the delay introduced by retransmission, and its flow completion time is reduced by 56.5% compared with the non-encoding scheme. In addition, Figure 5 The diagram shown is a comparison diagram of the completion time of a large data volume transmission stream. When the amount of transmitted data is large, the method proposed in the present invention can still achieve a lower delay, which indicates that by controlling the encoding decision, low delay can be achieved without wasting too much throughput.
[0217] like Figure 6 The following is a comparison diagram of the completion time of different packet loss rates. The fixed transmission data volume is 500KB and the RTT is 8 microseconds. When the network packet loss rate increases, the low latency advantage of the coding scheme will be more significant. This also shows that in the case of large-scale networks, when reliability is difficult to guarantee, the scheme proposed in the present invention can still achieve effective low-latency transmission. Finally, Figure 7 The diagram shows a comparison of flow completion time for different round-trip transmission delays. As the RTT increases, the flow completion time will fluctuate dramatically. However, the flow completion time of the encoding scheme is always lower than that of the non-coding scheme, which means that the scheme proposed in the present invention still maintains the advantage of low delay when facing scenarios such as network congestion or wide-area transmission.
[0218] Figure 8A schematic diagram of a data transmission device based on a network card system provided in one or more embodiments of this specification, wherein the network card system includes a coding decision submodule, a coding execution submodule, a transmission logic and decoding module, and the device includes:
[0219] at least one processor; and,
[0220] a memory communicatively connected to the at least one processor; wherein,
[0221] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0222] When the first user sends transmission data, the network card system obtains the transmission command issued by the first user, parses the address information of the data storage according to the transmission command, and transmits the address information to the encoding decision submodule;
[0223] The encoding decision submodule obtains the data volume of the transmission data according to the address information, and if it is determined based on the data volume of the transmission data that the transmission data needs to be encoded, determines the encoding behavior information of the transmission data, and calls the DMA controller to fetch the transmission data into the encoding buffer area of the encoding execution submodule, and transmits the encoding behavior information to the encoding execution submodule and the transmission logic respectively;
[0224] When the encoding execution submodule receives the encoding behavior information, it encodes the transmission data in the encoding buffer area according to the encoding behavior information, and transmits the encoded data to the transmission buffer area of the transmission logic;
[0225] The transmission logic distinguishes and encapsulates the uncoded incoming data and the coded incoming data to obtain a data packet, wherein the data packet includes the uncoded data packet and the coded data packet, and for the coded data packet, a coding tag carrying the coding behavior information is added to the message header;
[0226] When the second user receives the transmission data, the transmission logic performs an abnormality detection on the received data packet, and detects whether the message header of the data packet carries a coding tag, obtains an uncoded data packet that passes the detection and a coded data packet that passes the detection, stores the uncoded data packet that passes the detection into a corresponding position of the memory, and sends the coded data packet that passes the detection to the decoding module;
[0227] The decoding module decodes the received encoded data packet that has passed the detection to obtain decoded data, and stores the decoded data in a corresponding position of the memory.
[0228] One or more embodiments of this specification provide a non-volatile computer storage medium, a network card system including a coding decision submodule, a coding execution submodule, a transmission logic and decoding module, and storing computer executable instructions, which can achieve the following when executed by a computer:
[0229] When the first user sends transmission data, the network card system obtains the transmission command issued by the first user, parses the address information of the data storage according to the transmission command, and transmits the address information to the encoding decision submodule;
[0230] The encoding decision submodule obtains the data volume of the transmission data according to the address information, and if it is determined based on the data volume of the transmission data that the transmission data needs to be encoded, determines the encoding behavior information of the transmission data, and calls the DMA controller to fetch the transmission data into the encoding buffer area of the encoding execution submodule, and transmits the encoding behavior information to the encoding execution submodule and the transmission logic respectively;
[0231] When the encoding execution submodule receives the encoding behavior information, it encodes the transmission data in the encoding buffer area according to the encoding behavior information, and transmits the encoded data to the transmission buffer area of the transmission logic;
[0232] The transmission logic distinguishes and encapsulates the uncoded incoming data and the coded incoming data to obtain a data packet, wherein the data packet includes the uncoded data packet and the coded data packet, and for the coded data packet, a coding tag carrying the coding behavior information is added to the message header;
[0233] When the second user receives the transmission data, the transmission logic performs an abnormality detection on the received data packet, and detects whether the message header of the data packet carries a coding tag, obtains an uncoded data packet that passes the detection and a coded data packet that passes the detection, stores the uncoded data packet that passes the detection into a corresponding position of the memory, and sends the coded data packet that passes the detection to the decoding module;
[0234] The decoding module decodes the received encoded data packet that has passed the detection to obtain decoded data, and stores the decoded data in a corresponding position of the memory.
[0235] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
Claims
1. A data transmission method based on a network card system, characterized in that: The network card system includes a coding decision submodule, a coding execution submodule, and a transmission logic and decoding module. The method includes: When the first user sends transmission data, the network card system obtains the transmission command issued by the first user, parses the address information of the data storage according to the transmission command, and transmits the address information to the encoding decision submodule; The encoding decision submodule obtains the data volume of the transmission data according to the address information, and if it is determined based on the data volume of the transmission data that the transmission data needs to be encoded, determines the encoding behavior information of the transmission data, and calls the DMA controller to fetch the transmission data into the encoding buffer area of the encoding execution submodule, and transmits the encoding behavior information to the encoding execution submodule and the transmission logic respectively; When the encoding execution submodule receives the encoding behavior information, it encodes the transmission data in the encoding buffer area according to the encoding behavior information, and transmits the encoded data to the transmission buffer area of the transmission logic; The transmission logic distinguishes and encapsulates the uncoded incoming data and the coded incoming data to obtain a data packet, wherein the data packet includes the uncoded data packet and the coded data packet, and for the coded data packet, a coding tag carrying the coding behavior information is added to the message header; When the second user receives the transmission data, the transmission logic performs an abnormality detection on the received data packet, and detects whether the message header of the data packet carries a coding tag, obtains an uncoded data packet that passes the detection and a coded data packet that passes the detection, stores the uncoded data packet that passes the detection into a corresponding position of the memory, and sends the coded data packet that passes the detection to the decoding module; The decoding module decodes the received encoded data packet that has passed the detection to obtain decoded data, and stores the decoded data in a corresponding position of the memory.
2. The method according to claim 1, characterized in that: The encoding decision submodule obtains the data volume of the transmission data according to the address information, including: The encoding decision submodule obtains the number of addresses according to the starting address and the ending address; The data volume of the transmission data is obtained according to the data volume of each address and the number of addresses.
3. The method according to claim 1, characterized in that If it is determined based on the amount of the transmission data that the transmission data needs to be encoded, the method further includes: Obtaining the current network card sending rate of the network card system; Determine the current network round-trip time RTT and the current network packet loss rate based on the current received data packets; Based on the amount of data to be sent, the current network card sending rate, the RTT of the current network and the packet loss rate of the current network, it is determined whether the amount of the transmitted data requires network coding.
4. The method according to claim 3, characterized in that The determining whether the amount of the transmitted data requires network coding based on the amount of data to be sent, the current network card sending rate, the RTT of the current network, and the packet loss rate of the current network includes: Setting a first threshold and a second threshold for the RTT and packet loss rate of the network respectively; Setting a third threshold value for data transmission time; Determine the current data transmission time according to the current network card sending rate and the data volume of the transmission data; Based on the amount of data to be sent, determine whether the RTT of the current network meets the first threshold, and / or determine whether the packet loss rate of the current network meets the second threshold, and / or determine whether the current data transmission time meets the third threshold.
5. The method according to claim 1, characterized in that If it is determined based on the amount of the transmission data that the transmission data does not need to be encoded, the method further includes: The transmission data is fetched into a sending buffer area of the transmission logic according to the address information.
6. The method according to claim 1, characterized in that The encoding behavior information includes the data amount of the encoding batch and the redundant data amount generated by the encoding, and the encoded data includes redundant data and initial data.
7. The method according to claim 1, characterized in that The transmission logic performs an abnormality detection on the received data packet, and detects whether the message header of the data packet carries a coding tag, and obtains an uncoded data packet that passes the detection and a coded data packet that passes the detection, including: The transmission logic detects whether the header of the data packet carries a coding tag, and obtains the uncoded data packet and the coded data packet; The transmission logic performs packet loss detection and error detection on both the uncoded data packet and the coded data packet to obtain an uncoded data packet that passes the detection and a coded data packet that passes the detection.
8. The method according to claim 7, characterized in that The transmission logic performs an abnormality detection on the received data packet, and detects whether the message header of the data packet carries a coding tag, obtains an uncoded data packet that passes the detection and a coded data packet that passes the detection, and stores the uncoded data packet that passes the detection into a corresponding position of the memory, and sends the coded data packet that passes the detection to the decoding module, including: The transmission logic performs packet loss detection and error detection on both the uncoded data packet and the coded data packet; If the detection result is an uncoded error data packet and / or an uncoded out-of-order data packet, a retransmission notification is sent back; If the detection result is a coded error data packet, the coded data packet is discarded; If the detection result is an uncoded data packet that passes the detection, decapsulate the uncoded data packet and store the decapsulated data in a corresponding position of the memory; If the detection result is that the encoded data packets have passed the detection, when the number of the encoded data packets reaches the decoding requirement, the encoded data packets that have passed the detection are sent to the decoding module.
9. A data transmission device based on a network card system, characterized in that: The network card system includes a coding decision submodule, a coding execution submodule, a transmission logic and decoding module, and the device includes: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: When the first user sends transmission data, the network card system obtains the transmission command issued by the first user, parses the address information of the data storage according to the transmission command, and transmits the address information to the encoding decision submodule; The encoding decision submodule obtains the data volume of the transmission data according to the address information, and if it is determined based on the data volume of the transmission data that the transmission data needs to be encoded, determines the encoding behavior information of the transmission data, and calls the DMA controller to fetch the transmission data into the encoding buffer area of the encoding execution submodule, and transmits the encoding behavior information to the encoding execution submodule and the transmission logic respectively; When the encoding execution submodule receives the encoding behavior information, it encodes the transmission data in the encoding buffer area according to the encoding behavior information, and transmits the encoded data to the transmission buffer area of the transmission logic; The transmission logic distinguishes and encapsulates the uncoded incoming data and the coded incoming data to obtain a data packet, wherein the data packet includes the uncoded data packet and the coded data packet, and for the coded data packet, a coding tag carrying the coding behavior information is added to the message header; When the second user receives the transmission data, the transmission logic performs an abnormality detection on the received data packet, and detects whether the message header of the data packet carries a coding tag, obtains an uncoded data packet that passes the detection and a coded data packet that passes the detection, stores the uncoded data packet that passes the detection into a corresponding position of the memory, and sends the coded data packet that passes the detection to the decoding module; The decoding module decodes the received encoded data packet that has passed the detection to obtain decoded data, and stores the decoded data in a corresponding position of the memory.
10. A non-volatile computer storage medium, characterized in that: The network card system includes a coding decision submodule, a coding execution submodule, a transmission logic and decoding module, and stores computer executable instructions. When the computer executable instructions are executed by a computer, the following can be achieved: When the first user sends transmission data, the network card system obtains the transmission command issued by the first user, parses the address information of the data storage according to the transmission command, and transmits the address information to the encoding decision submodule; The encoding decision submodule obtains the data volume of the transmission data according to the address information, and if it is determined based on the data volume of the transmission data that the transmission data needs to be encoded, determines the encoding behavior information of the transmission data, and calls the DMA controller to fetch the transmission data into the encoding buffer area of the encoding execution submodule, and transmits the encoding behavior information to the encoding execution submodule and the transmission logic respectively; When the encoding execution submodule receives the encoding behavior information, it encodes the transmission data in the encoding buffer area according to the encoding behavior information, and transmits the encoded data to the transmission buffer area of the transmission logic; The transmission logic distinguishes and encapsulates the uncoded incoming data and the coded incoming data to obtain a data packet, wherein the data packet includes the uncoded data packet and the coded data packet, and for the coded data packet, a coding tag carrying the coding behavior information is added to the message header; When the second user receives the transmission data, the transmission logic performs an abnormality detection on the received data packet, and detects whether the message header of the data packet carries a coding tag, obtains an uncoded data packet that passes the detection and a coded data packet that passes the detection, stores the uncoded data packet that passes the detection into a corresponding position of the memory, and sends the coded data packet that passes the detection to the decoding module; The decoding module decodes the received encoded data packet that has passed the detection to obtain decoded data, and stores the decoded data in a corresponding position of the memory.
Citation Information
Patent Citations
Video quality evaluation processing method, device and system
CN110913213A
Data transmission control method of congestion algorithm based on different packet sending modes
CN112866137A
Video stream processing method and device based on confluence sending mechanism, equipment and medium
CN116634187A
In-network forward error correction coding method in 5G live scene
CN118199797A
Transaction accelerator for client-server communications systems
US20080320151A1
Cited By
RDMA network transmission packet loss recovery method and system
CN120150906A
Rdma network transmission packet loss recovery method and system
CN120150906B
File transmission method and device based on RDMA network
CN122513392A
