A data transmission method and system

By generating sending events during the data transmission process and dynamically adjusting the redundant sending threshold, and actively copying data packets, the performance degradation problem of the passive retransmission system in severe packet loss situations is solved, and network performance is improved.

CN114928573BActive Publication Date: 2024-09-24INST OF COMPUTING TECH CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210558480.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-20
Publication Date
2024-09-24
Estimated Expiration
2042-05-20

AI Technical Summary

Technical Problem

The performance of the existing passive retransmission system degrades when packet loss is severe, and it cannot proactively avoid packet loss, resulting in reduced network performance.

Method used

By generating sending events during the data transmission process, adjusting the redundant sending threshold, actively copying data packets to avoid packet loss, and dynamically adjusting the redundant sending threshold size to adapt to packet loss, the reliability of data packet reception is improved.

Benefits of technology

It reduces the packet loss probability of the receiver, reduces the retransmission probability of the sender, improves the overall performance of the network, and avoids the transmission of too many redundant data packets caused by too small a redundant transmission threshold.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114928573B
    Figure CN114928573B
Patent Text Reader

Abstract

The embodiment of the present invention provides a data transmission method, including: sending a data packet on a connection established with a receiving party, wherein each connection is provided with a corresponding connection number; generating a corresponding sending event according to the sent data packet, wherein the sending event indicates the connection number of the connection established for the data packet and the sending sequence number of the data packet; in response to the sending event, adjusting the value of the count of the data packets sent in the corresponding connection, and determining whether the current count value reaches a specified redundant sending threshold, and if so, copying the corresponding data packet according to the sending sequence number in the sending event to send it as a redundant data packet, wherein the redundant sending threshold is related to the packet loss situation corresponding to the connection. The technical solution of the embodiment of the present invention reduces the packet loss probability of the receiving party to a certain extent by actively copying the corresponding data packet when the count value reaches the specified redundant sending threshold, so as to send it again as a redundant data packet, thereby improving the overall network performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network communication technology, and in particular to a data transmission method and system. Background Art

[0002] In modern data centers, distributed applications carry the vast majority of core services, and a variety of distributed applications are used to meet the diverse needs of users. These applications will perform a large amount of network communication during operation, and once data packet loss occurs, it will have a serious impact on application performance. Therefore, how to provide efficient and reliable network transmission guarantees for applications is a crucial issue.

[0003] Currently, there are two main types of network transmission to ensure the reliability of the application layer:

[0004] The first type: point-to-point flow control is performed at the data link layer. When the available space in the receiver's buffer is lower than a certain threshold, the sender suspends the sending of data packets until the available space in the receiver's buffer is restored. Although this type of method can ensure that data packets will not be discarded due to buffer overflow and can significantly reduce the packet loss rate in the network, when congestion occurs at the input port of a switch in the network, the congestion will be transmitted step by step along the uplink, eventually causing congestion in the entire network.

[0005] The second type is to implement an efficient packet retransmission mechanism at the transport layer. This type of method triggers the retransmission mechanism by sensing packet loss events.

[0006] For the second category above, the existing system that retransmits by sensing packet loss events is called a passive retransmission system. A typical passive retransmission system consists of a processor, a data packet buffer, a system bus, a network interface, and an interconnection network. Among them, the processor is used to prepare the network data to be sent and notify the network interface to send the data; the data packet buffer temporarily stores the data to be sent; the network interface processes the sending and receiving of data; and the network interconnection connects different network interfaces. In this passive retransmission system, when the processor prepares the network data to be sent, it puts it into the data packet buffer and notifies the network interface to send the data. The network interface reads the data from the data packet buffer and sends it to the network via the network interface. When packet loss occurs in the network, the network interconnection will return a packet loss event to the network interface. After the sending control module detects the packet loss event, it confirms the information of the lost data packet, reads the lost data packet from the data packet buffer, and resends it to the network.

[0007] This passive retransmission system avoids the congestion transmission that is easily caused by the first type of method, and can achieve better retransmission performance when the network congestion is light and the packet loss rate is low. However, there are problems such as: the network interface uses a passive retransmission mechanism, and the network interface will only retransmit the packet loss event after receiving the packet loss event returned by the network interconnection. Therefore, this system cannot actively avoid packet loss, and will cause serious performance degradation in the case of severe packet loss.

[0008] Therefore, it is necessary to improve the prior art. Summary of the invention

[0009] Therefore, the purpose of the present invention is to overcome the above-mentioned defects of the prior art and provide a data transmission method and system.

[0010] The objective of the present invention is achieved through the following technical solutions:

[0011] According to a first aspect of the present invention, there is provided a method for transmitting data, comprising: sending a data packet on a connection established with a receiving party, wherein each connection is provided with a corresponding connection number; generating a corresponding sending event according to the sent data packet, wherein the sending event indicates the connection number of the connection established for the data and the sending sequence number of the data packet; in response to the sending event, adjusting the count of the sent data packets in the corresponding connection, and determining whether the current count value reaches a specified redundant sending threshold, and if so, copying the corresponding data packet according to the sending sequence number in the sending event to be sent as a redundant data packet, wherein the redundant sending threshold is related to the packet loss situation corresponding to the connection.

[0012] In some embodiments of the present invention, the redundant sending threshold corresponding to the connection is dynamically adjusted according to the packet loss situation of the connection and the operation of sending redundant data packets in the connection established by the data.

[0013] In some embodiments of the present invention, the redundant sending threshold corresponding to the connection decreases as a packet loss event of the current connection occurs, and increases as redundant data packets corresponding to the current connection are sent.

[0014] In some embodiments of the present invention, the adjustment method of the redundant sending threshold corresponding to each connection is set to: each time a packet loss event is received for the connection, the redundant sending threshold is halved, and each time a redundant data packet of the connection is sent, the redundant sending threshold is doubled.

[0015] In some embodiments of the present invention, the method further includes: obtaining data to be sent, dividing the data into multiple data packets; establishing a connection for sending data, sending multiple data packets corresponding to the data in sequence, and generating a corresponding sending event after each data packet is sent.

[0016] In some embodiments of the present invention, the method further includes: obtaining a packet loss event for the data fed back by a receiver, and retransmitting a corresponding data packet according to the packet loss event.

[0017] In some embodiments of the present invention, the retransmission of the corresponding data packets according to the packet loss event includes: obtaining the number in the packet loss event, and based on the established corresponding connection, obtaining the sending sequence number of the data packet currently being sent to the network and the number of the first data packet sent to the network and not received; based on the number of the packet loss event, the number of the first data packet sent to the network and not received, and the sending sequence number of the data packet currently being sent to the network, determining one or more data packets that have not been received and have been discarded; and retransmitting one or more data packets that have not been received and have been discarded.

[0018] In some embodiments of the present invention, the method further includes: when receiving a data packet of a connection, if the data packet has been correctly received before, discarding the data packet.

[0019] In some embodiments of the present invention, the method further includes: obtaining a response data packet for the data fed back by the receiver, the number of the response data packet and the number of the first data packet sent to the network and not received, wherein the number of the response data packet corresponds to the number of the data packet that is correctly received; based on the number of the response data packet and the number of the first data packet sent to the network and not received, updating the number of the first data packet sent to the network and not received, and determining the data packet that has been correctly received.

[0020] In some embodiments of the present invention, the method further includes: each time a sending event is responded to, the value of the count of data packets sent in the corresponding connection is increased by one; each time a redundant data packet corresponding to the connection is sent, the value of the count of data packets sent in the connection is set to an initial value.

[0021] According to a second aspect of the present invention, there is provided a system based on the method described in the first aspect of the present invention, comprising: a sending control module, for sending a data packet on a connection established with a receiving party, wherein each connection is provided with a corresponding connection number, and a corresponding sending event is generated according to the sent data packet, the sending event indicating the connection number of the connection established for the data and the sending sequence number of the data packet; a redundant packet sending module, for adjusting the count of sent data packets in the corresponding connection in response to the sending event, and determining whether the current count value reaches a specified redundant sending threshold, and if so, copying the corresponding data packet according to the sending sequence number in the sending event to be sent as a redundant data packet, wherein the redundant sending threshold is related to the packet loss situation corresponding to the connection.

[0022] In some embodiments of the present invention, the system also includes: a receiving control module, which is used to provide feedback when receiving a data packet of a certain connection, including providing feedback to the sender of a response data packet indicating that the corresponding data packet has been received or providing feedback to the sender of a packet loss event indicating that the corresponding data packet has been discarded and needs to be retransmitted; a scheduler, which is used to call out and send the data packet to the network according to a predetermined scheduling method; and an interconnection unit, which is used to interconnect the sending control module, the redundant packet sending module, the receiving control module and the scheduler.

[0023] In some embodiments of the present invention, the system further includes: a data packet buffer for storing a plurality of data packets in each connection obtained by dividing the data to be sent; a metadata module for storing the numerical value of the count in each connection, a redundant sending threshold, the numbers of a plurality of data packets, the numbers in the packet loss event, the number of the response data packet, the number of the first data packet sent to the network and not received, and the sending sequence number of the data packet currently being sent to the network.

[0024] According to a third aspect of the present invention, there is provided an electronic device comprising: one or more processors; and a memory, wherein the memory is used to store executable instructions; the one or more processors are configured to implement the steps of any one of the methods described in the first aspect of the present invention by executing the executable instructions.

[0025] Compared with the prior art, the advantages of the present invention are:

[0026] 1. The present invention is based on a sending event generated corresponding to each data packet sent, and is adjusted to a count value of the data packets sent in the corresponding connection, and the redundant sending threshold is related to the packet loss situation corresponding to the connection. In order to avoid a high probability of packet loss due to the inability of the receiving party to receive the corresponding data packet when the count value reaches the specified redundant sending threshold, when the count value reaches the specified redundant sending threshold, the corresponding data packet is actively copied and re-sent as a redundant data packet, thereby increasing the probability of the receiving party receiving the corresponding data packet, reducing the packet loss probability of the receiving party to a certain extent, and reducing the retransmission probability of the sending party, thereby improving the overall network performance.

[0027] 2. The present invention sets the size of the redundant sending threshold corresponding to each connection to decrease with the occurrence of a packet loss event of the current connection, and to increase with the sending of redundant data packets corresponding to the current connection, that is, after a packet loss event occurs, the redundant sending threshold is reduced, and the counted value can also reach the currently specified redundant sending threshold when a small number of data packets are sent, so that the subsequently sent data packets are copied in time, and the copied data packets are sent again as redundant data packets, thereby increasing the probability of the receiver receiving the corresponding data packets, and reducing the packet loss probability of the receiver to a certain extent. As the redundant data packets corresponding to the current connection are sent, the packet loss probability at this time is reduced, and the redundant sending threshold is increased, which can avoid the redundant sending threshold being too small, causing the sender to send too many redundant data packets, thereby further improving the overall performance of network data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The embodiments of the present invention are further described below with reference to the accompanying drawings, in which:

[0029] Figure 1 is a flow chart of a data transmission method according to an embodiment of the present invention;

[0030] Figure 2 FIG. 1 is a schematic diagram of the structure of a data transmission system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below through specific embodiments in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0032] As mentioned in the background technology section, the existing passive retransmission system consists of a processor, a data packet buffer, a system bus, a network interface and an interconnection network. Among them, the processor is used to prepare the network data to be sent and notify the network interface to send the data; the data packet buffer temporarily stores the data to be sent; the network interface processes the sending and receiving of data; and the network interconnection connects different network interfaces. In this passive retransmission system, when the processor prepares the network data to be sent, it puts it into the data packet buffer and notifies the network interface to send the data. The network interface reads the data from the data packet buffer and sends it to the network via the network interface. When packet loss occurs in the network, the network interconnection will return a packet loss event to the network interface. After the sending control module detects the packet loss event, it confirms the information of the lost data packet, reads the lost data packet from the data packet buffer, and resends it to the network. This passive retransmission system avoids the congestion transmission that is easy to cause by the first type of method, and can obtain better retransmission performance when the network congestion is relatively light and the packet loss rate is relatively low. However, there are problems including: the network interface uses a passive retransmission mechanism, and the network interface will only retransmit the lost packet after receiving the packet loss event returned by the network interconnection. Therefore, this system cannot actively avoid packet loss, which will cause serious performance degradation in the case of severe packet loss.

[0033] Based on the above research, the present invention provides a data transmission method, including: obtaining data to be sent, dividing the data into multiple data packets; establishing a connection for sending data, sending multiple data packets corresponding to the data in sequence, and generating a corresponding sending event after each data packet is sent; obtaining a sending event corresponding to the sent data, which indicates the connection number of the connection established for the data and the sending sequence number of the data packet just sent for the data; in response to the sending event, adjusting to the value of the count of the data packets sent in the corresponding connection, and determining whether the current count value reaches a specified redundant sending threshold, and if so, copying the corresponding data packet according to the sending sequence number in the sending event to be sent as a redundant data packet, wherein the redundant sending threshold is related to the packet loss situation corresponding to the connection. The present invention adjusts the value of the count based on the sending event generated corresponding to each data packet sent, and the redundant sending threshold is related to the packet loss situation corresponding to the connection. In order to avoid a high packet loss probability due to the receiver being unable to receive the corresponding data packet when the value of the count reaches the specified redundant sending threshold, when the value of the count reaches the specified redundant sending threshold, the corresponding data packet is actively copied and sent again as a redundant data packet, thereby increasing the reception probability of the receiver receiving the corresponding data packet, reducing the packet loss probability of the receiver to a certain extent, and reducing the retransmission probability of the sender, thereby improving the overall network performance.

[0034] According to one embodiment of the present invention, the redundant transmission threshold corresponding to the corresponding connection is dynamically adjusted according to the packet loss situation of the connection and the operation of sending redundant data packets in the connection established by the data. The size of the redundant transmission threshold corresponding to each connection decreases with the occurrence of the packet loss event of the current connection, and increases with the sending of the redundant data packets corresponding to the current connection. That is, after the packet loss event occurs, it means that the current packet loss probability is high. The redundant transmission threshold is reduced, and the count value can also reach the currently specified redundant transmission threshold when a small number of data packets are sent, so that the subsequent data packets sent are copied in time, and the copied data packets are sent again as redundant data packets, increasing the probability of the receiving party receiving the corresponding data packets, and reducing the packet loss probability of the receiving party to a certain extent. With the sending of the redundant data packets corresponding to the current connection, the packet loss probability at this time is reduced, and the redundant transmission threshold is increased, which can avoid the redundant transmission threshold being too small, causing the sender to send too many redundant data packets, thereby reducing the overall performance of network data transmission. Therefore, the size of the redundant transmission threshold corresponding to each connection is set to decrease with the occurrence of the packet loss event of the current connection, and increase with the sending of the redundant data packets corresponding to the current connection, effectively improving the overall performance of network data transmission.

[0035] According to an embodiment of the present invention, in the initial sending state, it can be considered that the probability of packet loss events in the network is extremely low, and the redundant sending threshold corresponding to each connection can be set to a very large value (for example, a 32-bit hexadecimal number represents the redundant sending threshold: 32'hFFFFFFFF), and the adjustment method of the redundant sending threshold is set to: each time a packet loss event of the connection is received, the redundant sending threshold is halved, and each time a redundant data packet of the connection is sent, the redundant sending threshold is doubled. For those of ordinary skill in the art, it should be understood that this is only for illustration, and it can also be set to each time a packet loss event of the connection is received, the redundant sending threshold is reduced by one third, one fourth, etc. on the original size, and each time a redundant data packet of the connection is sent, the redundant sending threshold is set to the value of the initial size (increase one third, one fourth on the original size), which can be set according to the needs of the specific situation, and the present invention does not impose any restrictions on this. When the counted value reaches the redundant sending threshold, it means that the probability of packet loss in the network is high at this time. If the set redundant sending threshold is not reached, the probability of packet loss is low, and the sending event continues to be waited.

[0036] Further, according to an embodiment of the present invention, when packet loss occurs, the receiver generates a packet loss event, and the sender obtains the packet loss event for the data fed back by the receiver, and retransmits the corresponding data packet according to the packet loss event. In the process of retransmitting data packets, it is still necessary to generate a corresponding sending event after each data packet is sent; obtain the sending event corresponding to the sent data, which indicates the connection number of the connection established for the data and the sending sequence number of the data packet just sent for the data; in response to the sending event, adjust the count of the sent data packets in the corresponding connection, and determine whether the current count value reaches the specified redundant sending threshold. If so, copy the corresponding data packet according to the sending sequence number in the sending event to send it as a redundant data packet. Therefore, when retransmitting a data packet, the present invention will still determine whether it is necessary to actively copy the corresponding data packet according to the relationship between the count value and the set redundant sending threshold, so as to send it again as a redundant data packet, thereby reducing the probability of packet loss during the retransmission process and improving network transmission performance.

[0037] According to an embodiment of the present invention, a data transmission method is provided. Figure 1 , including steps S1, S2, S3, S4 and S5. In order to better understand the present invention, each step is described in detail below in conjunction with specific embodiments.

[0038] Step S1: Acquire data to be sent, and divide the data into multiple data packets.

[0039] According to one embodiment of the present invention, when there is data to be sent in the host memory, the data to be sent is obtained from the memory, and the data is divided according to the maximum data packet length preset by the link layer to obtain multiple data segments, and a corresponding packet header is added to each data segment to obtain multiple data packets.

[0040] Step S2: Establishing a connection for sending data, sending out multiple data packets corresponding to the data in sequence, and generating a corresponding sending event after each data packet is sent out.

[0041] According to one embodiment of the present invention, step S2 specifically includes:

[0042] Step S201: Send a data packet on the connection established with the receiver, wherein each connection is provided with a corresponding connection number.

[0043] According to one embodiment of the present invention, a network connection is established between a sending end and a receiving end through a corresponding connection number, multiple data packets corresponding to the data to be sent are stored in a corresponding sending queue, and a data packet is selected from the corresponding sending queue according to a corresponding scheduling method and sent to the network on the connection established with the receiving party.

[0044] Step S202: generating a corresponding sending event according to the sent data packet, wherein the sending event indicates the connection number of the connection established for the data packet and the sending sequence number of the data packet.

[0045] Step S3: Acquire a sending event corresponding to the sent data, which indicates the connection number of the connection established for the data and the sending sequence number of the data packet just sent for the data.

[0046] According to one embodiment of the present invention, the connection number of the established connection is that when the sender sends the corresponding data, it must first determine the recipient who will receive the corresponding data. Therefore, the connection is made through a unified connection number, such as the port number of the recipient as the connection number, and the sender includes the specified port number of the recipient in the data sent to establish the connection.

[0047] Step S4: In response to a sending event, adjust the value of the count of data packets sent for the corresponding connection, and determine whether the current count value reaches a specified redundant sending threshold. If so, copy the corresponding data packet according to the sending sequence number in the sending event to send it as a redundant data packet, wherein the redundant sending threshold is related to the packet loss situation corresponding to the connection.

[0048] According to one embodiment of the present invention, in response to a sending event, the count of the data packets sent in the corresponding connection is adjusted, and each time a sending event is responded to, the value of the count of the data packets sent in the corresponding connection is increased by 1. Each time a redundant data packet of the corresponding connection is sent, the value of the count of the data packets sent in the connection is set to an initial value. If the initial value of the count is 0, the value of the count is set to 0.

[0049] Step S5: Use a predetermined scheduling method to call out the data packet and send it to the network.

[0050] According to an embodiment of the present invention, the present invention divides data into multiple data packets, puts the data packets into corresponding sending queues, and puts multiple redundant data packets obtained by duplicating the corresponding data packets into corresponding sending queues, and uses a predetermined scheduling method to call out the data packets in the corresponding sending queues and send them to the network. The scheduling method can be a polling scheduling method or scheduling and sending the data packets to the network according to the preset priority of the data packets.

[0051] Furthermore, after sending the data packet to the receiver, the receiver will confirm whether it is the data packet that the receiver expects to receive based on the data packet number, and process the data packet. According to one embodiment of the present invention, when a data packet of a certain connection is received, if the data packet has been correctly received before, the data packet will be discarded; if the data packet received from a certain connection is the data packet expected to be received, it will be written and stored in the receiver, and all of the above require feedback of a response data packet to the sender of the corresponding connection; if the data packet received from a certain connection is not the data packet expected to be received and has not been received before, the data packet will be discarded, and a packet loss event will be fed back to the sender of the corresponding connection.

[0052] According to one embodiment of the present invention, each established connection includes a corresponding expected data packet sequence number (Expected Number, denoted as EN), a data packet sending sequence number (Send Number, abbreviated as SN) and a number of the first data packet sent to the network and not received (Unacknowledged Number, abbreviated as UN). The sending and receiving status of the data packet is recorded and responded to based on the corresponding sequence number and number information to ensure the correct sending of data.

[0053] According to an embodiment of the present invention, determining whether a corresponding data packet is a data packet expected to be received in the current connection includes: comparing the number of the data packet (Packet Number, denoted as PN) with the data packet sequence number EN preset by the receiver to be received. If EN is equal to PN, it is the expected data packet, and the data packet is written and stored in the receiver; if EN is greater than PN, it is not the expected data packet, and it is a redundant data packet. The data packet is directly discarded, and a response packet is sent, and the PN value in the response packet is set to EN; if EN is less than PN, it is not the expected data packet, and it is not a redundant data packet, the data packet is directly discarded, and a packet loss event is sent.

[0054] According to an embodiment of the present invention, the sender needs to perform corresponding processing according to different feedbacks from the receiver:

[0055] According to an embodiment of the present invention, for a packet loss event fed back by a receiver, a packet loss event for the data is obtained, and a corresponding data packet is retransmitted according to the packet loss event, including steps A1, A2 and A3:

[0056] Step A1: Obtain the number in the packet loss event, and based on the established corresponding connection, obtain the sending sequence number SN of the data packet currently being sent to the network and the number UN of the first data packet sent to the network and not received.

[0057] Step A2: Based on the number of the packet loss event, the number UN of the first data packet sent to the network and not received, and the sending sequence number SN of the data packet currently being sent to the network, determine one or more data packets that have not been received and are discarded. The number in the packet loss event corresponds to the number of the data packet that has not been received and is discarded.

[0058] According to one embodiment of the present invention, the number in the packet loss event is compared with UN, and different actions are performed according to the comparison result. If UN is less than or equal to the number in the packet loss event, the buffer space occupied by all data packets with numbers between UN and the number in the packet loss event is released, and UN is set to the result of the number in the packet loss event plus one, and all data packets with numbers between the result of the number in the packet loss event plus one and SN are retransmitted; if UN is greater than the number in the packet loss event, it indicates that a network error has occurred, and the processing is terminated.

[0059] Step A3: retransmit one or more data packets that have not been received and discarded.

[0060] According to one embodiment of the present invention, after determining one or more data packets that need to be retransmitted, in the same manner as steps S2, S3, S4 and S5 in the above-mentioned data transmission method, a connection for sending data is first established, and one or more data packets that need to be retransmitted are sent out in sequence, and a corresponding sending event is generated after each data packet is sent out; a sending event corresponding to the sent data is obtained, which indicates the connection number of the connection established for the data and the sending sequence number of the data packet just sent out for the data; in response to the sending event, the count of the sent data packets in the corresponding connection is adjusted, and it is determined whether the current count value reaches the specified redundant sending threshold. If so, the corresponding data packet is copied according to the sending sequence number in the sending event to be sent out as a redundant data packet, and the corresponding data packet is resent. The probability of packet loss during the retransmission process is further reduced, and network transmission performance is improved.

[0061] For the feedback response data packet, according to one embodiment of the present invention, processing according to the response data packet includes step B1 and step B2:

[0062] Step B1: Obtain the response data packet fed back by the receiver for the data, the number of the response data packet and the number UN of the first data packet sent to the network and not received, wherein the number of the response data packet corresponds to the number of the data packet that is correctly received.

[0063] Step B2: According to the number of the response data packet and the number UN of the first data packet sent to the network and not received, the number of the first data packet sent to the network and not received is updated, and the data packet that has been correctly received is determined.

[0064] According to one embodiment of the present invention, the number of the response data packet is compared with UN, and different actions are performed according to the comparison result. If UN is less than or equal to the number of the response data packet, the buffer space occupied by all data packets with numbers between UN and the number of the response data packet is released, and UN is set to the result of the number of the response data packet plus one to update UN, and wait for the next response data packet or packet loss event to be fed back; if UN is greater than the number of the response data packet, wait for the next response data packet or packet loss event to be fed back by the receiver.

[0065] According to an embodiment of the present invention, a data transmission system is provided. Figure 2 , including: an application module, a data packet buffer module, a metadata module, a system bus module, a network interface device and a network interconnection module. Among them, the application module, the data packet buffer module, the metadata module and the network interface device are interconnected through the system bus module, and the network interface device is also connected to the network interconnection module. In addition, the network interface device includes a sending control module, a receiving control module, a redundant packet sending module, an interconnection unit and a scheduler, and the sending control module, the receiving control module, the redundant packet sending module and the scheduler are interconnected through the interconnection unit; the sending control module writes normal data packets and retransmitted data packets to the data packet buffer module through the system bus module, and sends normal data packets and retransmitted data packets through the scheduler, receives response data packets and packet loss events sent by the network interconnection module, and the redundant packet sending module writes redundant data packets to the data packet buffer module, and sends redundant data packets through the scheduler. Among them, the normal data packet is a data packet composed of data segmentation that the application module needs to send, and the retransmitted data packet is a data packet that needs to be re-sent through the sending control module according to the packet loss event.

[0066] According to one embodiment of the present invention, the application module needs to send and receive network data when running, and stores the data to be sent in the data packet buffer module, wherein the application module is a piece of code running on the processor or a dedicated computing module.

[0067] According to one embodiment of the present invention, the data packet buffer module is an independent storage module that provides a read-write access interface for the sending control module, the receiving control module and the redundant packet sending module, which can be a host memory (Dynamic Random Access Memory, Dynamic Random Access Memory, DRAM) or a cache inside the network interface. The data packet buffer module is used to store network data that the application module needs to send, and to cache received data packets for use by the application module.

[0068] According to one embodiment of the present invention, the metadata module is an independent storage module, which provides a read-write access interface for the sending control module, the receiving control module and the redundant packet sending module, which can be a host memory (Dynamic Random Access Memory, DRAM) or a cache inside the network interface. The metadata module stores the metadata required by the sending control module, the receiving control module and the redundant packet sending module when processing data packets. During the communication process, each established connection has its own metadata, the content of which includes: the corresponding expected data packet sequence number (Expected Number, denoted as EN), the sending sequence number of the data packet (Send Number, abbreviated as SN) and the number of the first data packet sent to the network and not received (Unacknowledged Number, abbreviated as UN), and the sending and receiving of the data packet is recorded and responded according to the corresponding sequence number and number information to ensure the correct sending of the data. Among them, SN can be understood as the number of the data packet currently being sent to the network, which points to the tail element in the sending queue; UN can be understood as the number of the data packet that was first sent to the network and has not been received by the other party, which points to the head element in the sending queue.

[0069] According to an embodiment of the present invention, the transmission control module, the receiving control module, the redundant packet transmission module, the interconnection unit and the scheduler in the network interface device coordinate with each other to realize the data transmission processing. The data transmission processing process is described below with a specific embodiment:

[0070] According to an embodiment of the present invention, for the transmission process of normal data packets, the sending control module obtains the data to be sent stored in the data packet buffer module through the system bus module, and executes steps S1 and S2 in the above embodiment, and the data packets sent in sequence are normal data packets; the redundant packet sending module obtains the sending event generated after the sending control module sends the data packet through the interconnection unit, and executes steps S3 and S4 in the above embodiment to send the redundant data packet; the scheduler executes step S5 in the above embodiment. For the transmission process of retransmitted data packets, that is, the above data transmission system executes steps S2, S3, S4 and S5 in the above embodiment.

[0071] According to one embodiment of the present invention, when executing step S3 and step S4 in the above embodiment, the redundant packet sending module needs to respond to the sending event and adjust to the value of the count of the data packets sent in the corresponding connection. The count value can be counted by the counter of the sending connection. Each time a data packet is sent, the redundant packet sending module adds one to the counter of the connection corresponding to the data packet. If the counter value is equal to the set redundant sending threshold, the corresponding data packet is copied according to the sending sequence number in the sending event to be sent as a redundant data packet, so as to reduce the probability of triggering a retransmission event when the data packet is discarded. After each redundant data packet is sent, the counter is reset. Among them, the counter corresponding to each established connection is set in the metadata module, and the value obtained by the counter count and the redundant sending threshold are stored in the metadata module for the redundant packet sending module to determine whether the redundant data packet should be sent. The counter and the redundant sending threshold exist in the form of a read-write memory, and the metadata module provides an interface for reading and writing these memories for the redundant packet sending module. When the redundant packet sending module needs to read and write the counter value and the redundant sending threshold, it provides the read and write address and content to the metadata module, and the metadata module reads the counter count value and the redundant sending threshold content and returns them to the redundant packet sending module or writes the counter count value and the redundant sending threshold into the metadata module.

[0072] According to one embodiment of the present invention, the receiving control module responds to the feedback of the transmitted corresponding data packet, determines whether the current data packet is the data packet expected to be received in the current connection according to the number of the transmitted corresponding data packet, and feeds back a response event packet to the sender of the connection according to the judgment result, and the type of the response event packet is a packet loss event or a response data packet.

[0073] According to one embodiment of the present invention, in response to the receiver's feedback on the corresponding data packet transmitted, the sending control module determines whether the corresponding data packet is successfully received by the receiver according to the type and number of the response event packet for further processing. This includes after receiving a packet loss event feedback from the receiver, executing steps A1 and A2 in the above embodiment, obtaining the corresponding data packet that needs to be retransmitted, and transmitting it as a retransmitted data packet. After receiving a response data packet feedback from the receiver, the sending control module indicates that the corresponding data packet has been successfully received, and only needs to update the number UN of the first data packet sent to the network and not received, and execute steps B1 and B2 in the above embodiment.

[0074] According to one embodiment of the present invention, there are four types of data packets that the scheduler needs to schedule: normal data packets, redundant data packets, retransmitted data packets and response event packets, wherein normal data packets and retransmitted data packets are sent by the sending control module and written into the scheduler, response event packets (data packets and packet loss events) are sent by the receiving control module and written into the scheduler, and redundant data packets are sent by the redundant packet sending module and written into the scheduler. For each data packet, the scheduler maintains a buffer for each data packet, and the buffer is logically a sending queue. The sending control module and the redundant packet sending module write data packets to the tail position of the corresponding sending queue, and the scheduler reads data packets from the head position of the corresponding sending queue, so that the data packets that enter the corresponding sending queue first are transmitted to the network interconnection module before the data packets that enter the corresponding sending queue later. The present invention does not limit the form in which the corresponding sending queue occupies the buffer, and can adopt a continuous allocation or discrete allocation method. The scheduler is used to schedule the data packets in the corresponding sending queue to the network interconnection module according to a preset scheduling method, and distribute the data packets received from the network interconnection module to each module in the network interface device. There are four types of data packets received from the network interconnection module: normal data packets, redundant data packets, retransmitted data packets and response event packets. Normal data packets, redundant data packets and retransmitted data packets are scheduled to the receiving control module for processing, and response event packets are scheduled to the sending control module for processing. The present invention does not limit the scheduling algorithm used by the scheduler, which can be polling scheduling or priority-based scheduling.

[0075] According to an embodiment of the present invention, the scheduler selects one from the data packets waiting to be sent to the network interconnection module according to the first-in-first-out polling scheduling strategy. Specifically, each data packet is stored in an independent buffer in the scheduler, and the first written data packet is arranged at the head of the queue according to the order of writing time, and the data packets written subsequently are arranged in the back in sequence, and stored in the form of a sending queue. For example, there are three types of data packets waiting to be sent: normal data packets, redundant data packets and retransmission data packets, which are stored in the normal data packet sending queue, redundant data packet sending queue and retransmission data packet sending queue respectively. The scheduler continuously polls and schedules the data packets in the three sending queues to the network interconnection module. For example, the normal data packet sending queue is scheduled first. If the current normal data packet sending queue is not empty, the normal data packet at the head of the sending queue is sent to the network interconnection module to achieve a first-in-first-out order. After the sending is completed, the next redundant data packet sending queue is polled. If the current redundant data packet sending queue is empty, the next retransmission data packet sending queue is directly polled. If the retransmission data packet sending queue is not empty, the retransmission data packet at the head of the sending queue is sent to the network interconnection module. The polling and scheduling are performed in the order of the normal data packet sending queue, the redundant data packet sending queue and the retransmission data packet sending queue.

[0076] According to one embodiment of the present invention, the system bus module itself has a routing function, and can forward control information and data information between different modules in the data transmission system according to the relevant bus protocol fields in the carried data packets. The present invention does not limit the bus type of the system bus module, and can adopt the peripheral component interconnection standard: PCI (Peripheral Component Interconnect, PCI) or PCI-X, the high-speed serial computer expansion bus standard PCI-E (peripheral component interconnect express), the bus protocol: AXI (Advanced eXtensibleInterface), etc.

[0077] According to one embodiment of the present invention, the interconnection unit is a unit inside the network interface device, which is used to interconnect various modules inside the network interface device. The present invention does not limit the interconnection type used by the interconnection unit, which can be a peripheral component interconnection standard: PCI (Peripheral Component Interconnect, PCI) or PCI-X, a high-speed serial computer expansion bus standard PCI-E (peripheral component interconnect express), a bus protocol: AXI (Advanced eXtensible Interface), etc.

[0078] According to one embodiment of the present invention, the network interconnection module is a controller for interconnecting the network interface devices of the senders and the network interface devices of the receivers. The present invention does not limit the type of network transmission protocol in the network interconnection module, which may be InfiniBand, Ethernet or Fibre Channel.

[0079] It should be noted that although the above describes the various steps in a specific order, it does not mean that the various steps must be executed in the above specific order. In fact, some of these steps can be executed concurrently or even in a different order as long as the required functions can be achieved.

[0080] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.

[0081] Computer readable storage medium can be a tangible device that holds and stores instructions used by an instruction execution device. Computer readable storage medium can include, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a protruding structure in a groove on which instructions are stored, and any suitable combination thereof.

[0082] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A data transmission method, characterized in that: include: Send a data packet on the connection established with the recipient, wherein each connection is provided with a corresponding connection number; Generate a corresponding sending event according to the sent data packet, the sending event indicating the connection number of the connection established for the data and the sending sequence number of the data packet; In response to a sending event, adjusting the value of the count of the data packets sent in the corresponding connection, and determining whether the current count value reaches a specified redundant sending threshold, and if so, duplicating the corresponding data packet according to the sending sequence number in the sending event to send it as a redundant data packet, wherein the redundant sending threshold is related to the packet loss situation corresponding to the connection; The redundant sending threshold corresponding to the connection is dynamically adjusted according to the packet loss situation of the connection and the operation of sending redundant data packets in the connection established by the data; The size of the redundant sending threshold corresponding to the connection decreases as a packet loss event of the current connection occurs, and increases as redundant data packets corresponding to the current connection are sent.

2. The method according to claim 1, characterized in that: The adjustment method of the redundant sending threshold corresponding to the connection is set as follows: each time a packet loss event of the connection is received, the redundant sending threshold is halved, and each time a redundant data packet of the connection is sent, the redundant sending threshold is doubled.

3. The method according to any one of claims 1-2, characterized in that: The method further comprises: Acquire data to be sent, and divide the data into multiple data packets; A connection for sending data is established, multiple data packets corresponding to the data are sent out in sequence, and a corresponding sending event is generated after each data packet is sent out.

4. The method according to claim 3, characterized in that The method further comprises: A packet loss event for the data fed back by a receiver is obtained, and a corresponding data packet is retransmitted according to the packet loss event.

5. The method according to claim 4, characterized in that The retransmitting the corresponding data packet according to the packet loss event includes: Get the number in the packet loss event, and based on the established corresponding connection, get the sending sequence number of the data packet currently being sent to the network and the number of the first data packet sent to the network and not received; Based on the number of the packet loss event, the number of the first data packet sent to the network and not received, and the send sequence number of the data packet currently being sent to the network, determine one or more data packets that have not been received and are discarded; Retransmit one or more packets that were not received and discarded.

6. The method according to claim 3, characterized in that The method further comprises: When receiving a data packet for a connection, if the data packet has been received correctly before, the data packet will be discarded.

7. The method according to claim 6, characterized in that The method further comprises: Obtaining a response data packet fed back by the receiver for the data, the number of the response data packet, and the number of the first data packet sent to the network and not received, wherein the number of the response data packet is the number of the data packet that is correctly received; According to the number of the response data packet and the number of the first data packet sent to the network and not received, the number of the first data packet sent to the network and not received is updated, and the data packet that has been correctly received is determined.

8. The method according to claim 1, characterized in that The method further comprises: Each time a sending event is responded, the count of the number of packets sent in the corresponding connection is increased by one; Each time a redundant data packet corresponding to a connection is sent, the value of the count of data packets sent in the connection is set to the initial value.

9. A system for the method according to any one of claims 1 to 8, characterized in that: include: A sending control module, configured to send a data packet on a connection established with a receiving party, wherein each connection is provided with a corresponding connection number, and to generate a corresponding sending event according to the sent data packet, wherein the sending event indicates the connection number of the connection established for the data and the sending sequence number of the data packet; A redundant packet sending module is used to adjust the count of data packets sent in the corresponding connection in response to a sending event, and determine whether the current count value reaches a specified redundant sending threshold. If so, the corresponding data packet is copied according to the sending sequence number in the sending event to be sent as a redundant data packet, wherein the redundant sending threshold is related to the packet loss situation corresponding to the connection.

10. The system according to claim 9, characterized in that The system further comprises: A receiving control module, configured to provide feedback upon receiving a data packet of a connection, including providing feedback to the sender of a response data packet indicating that the corresponding data packet has been received or providing feedback to the sender of a packet loss event indicating that the corresponding data packet has been discarded and needs to be retransmitted; The scheduler is used to call out and send data packets to the network according to a predetermined scheduling method; The interconnection unit is used to interconnect the sending control module, the redundant packet sending module, the receiving control module and the scheduler.

11. The system according to claim 10, characterized in that The system further comprises: A data packet buffer, used for storing a plurality of data packets composed of the data to be sent in each connection; The metadata module is used to store the value of the count in each connection, the redundant sending threshold, the number of multiple data packets, the number in the packet loss event, the number of the response data packet, the number of the first data packet sent to the network and not received, and the sending sequence number of the data packet currently being sent to the network.

12. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program can be executed by a processor to implement the steps of the method according to any one of claims 1 to 8.

13. An electronic device, characterized in that: include: one or more processors; as well as A memory, wherein the memory is used to store executable instructions; The one or more processors are configured to implement the steps of the method of any one of claims 1 to 8 by executing the executable instructions.