Data transmission method, computing device, network device and data transmission system

文档序号:1601343 发布日期:2020-01-07 浏览:17次 中文

阅读说明:本技术 一种数据传输方法、计算设备、网络设备及数据传输系统 (Data transmission method, computing device, network device and data transmission system ) 是由 谭焜 胡水海 付斌章 陈凯 于 2018-06-29 设计创作,主要内容包括:本申请实施例提供一种数据传输方法、相关设备及系统。发送端在首个RTT内发大量的数据包,从而充分利用网络空余带宽来使新数据流无延迟快速启动,同时以一条数据流是否新流为标准进行流分类,并对不同流设置不同的网络传输优先级,以免新流的数据包干扰旧流数据包传输,造成网络拥塞。本申请实施例提供的数据传输方法,在网络带宽利用率和网络拥塞发生概率之间取得了更好的平衡,在充分利用网络带宽的同时也尽量避免造成网络拥塞。(The embodiment of the application provides a data transmission method, related equipment and a system. A sending end sends a large number of data packets within the first RTT, so that the free bandwidth of a network is fully utilized to enable a new data flow to be started quickly without delay, meanwhile, flow classification is carried out by taking whether one data flow is a new flow or not as a standard, and different network transmission priorities are set for different flows, so that the situation that the data packets of the new flow interfere the transmission of old data packets to cause network congestion is avoided. The data transmission method provided by the embodiment of the application obtains better balance between the network bandwidth utilization rate and the network congestion occurrence probability, and avoids network congestion as much as possible while fully utilizing the network bandwidth.)

1. A method of data transmission, comprising:

a sending end sends a plurality of data packets within a first Round Trip Time (RTT) of a data transmission stage with a receiving end;

the sending end adds a first mark to the multiple data packets sent within the first RTT, so that after receiving a data packet carrying the first mark, a network device buffers the data packet carrying the first mark to a low priority queue or discards the data packet, wherein a data packet in a high priority queue of the network device is forwarded before a data packet in the low priority queue, and the data packet buffered in the high priority queue does not carry the first mark.

2. The method of claim 1, further comprising:

the sending end confirms the number of data packets successfully received by the receiving end in the plurality of data packets sent in the first RTT;

the sending end determines the number or sending rate of data packets sent within the second RTT according to the determined number of the data packets successfully received;

and the sending end sends one or more data packets based on the determined number or sending rate of the sending data packets within the second RTT.

3. The method of claim 2, further comprising:

and adding a second mark to the one or more data packets sent within the second RTT by the sending end, so that after receiving the data packet carrying the second mark, the network device caches the data packet carrying the second mark to a high-priority queue, where the data packet cached in the low-priority queue does not carry the second mark.

4. The method of claim 2, further comprising:

and adding a second mark to the one or more data packets sent within the second RTT by the sending end, so that after receiving the data packets carrying the second mark, if the receiving queue is full or the number of the data packets in the receiving queue exceeds a set threshold, the network device discards the one or more data packets not carrying the second mark in the receiving queue.

5. The method of claim 1, wherein the first flag is used for indicating a data packet sent within the first RTT.

6. A method according to claim 3 or 4, wherein said second flag is used to indicate that the data packet is not sent within said first RTT.

7. The method according to any one of claims 1 to 6, wherein the first RTT is a first RTT after the sender establishes a communication connection with the receiver.

8. A method of data transmission, comprising:

the network equipment receives a data packet sent by a sending end;

if the data packet is sent by the sending end within the first round trip time RTT of the data transmission stage with the receiving end, the network equipment caches the data packet to a low-priority queue;

if the data packet is not sent within the first RTT, the network device caches the data packet to a high priority queue; wherein data packets in the high priority queue are forwarded in preference to data packets in the low priority queue.

9. The method of claim 8, further comprising:

the network device determines whether the data packet is sent by the sender within the first RTT.

10. The method according to claim 9, wherein the data packet carries a first flag, and the first flag is added by the sending end and used for indicating that the data packet is sent within the first RTT; the determining step includes:

and the network equipment determines that the data packet is sent by the sending end within the first RTT according to the first mark carried by the data packet.

11. The method according to claim 9 or 10, wherein the data packet carries a second flag, the second flag being added by the sending end for indicating that the data packet is not sent within the first RTT; the determining step includes:

and the network equipment determines that the data packet is not sent by the sending end in the first RTT according to the second mark carried by the data packet.

12. The method of claim 9, wherein the determining step comprises:

and the network equipment queries a flow table according to the characteristic information of the data packet to determine whether the data packet is sent by the sending end in the first RTT, wherein the flow table stores the characteristic information of one or more data flows.

13. A method of data transmission, comprising:

the network equipment receives a data packet sent by a sending end;

if the data packet is sent by the sending end within the first round trip time RTT of the data transmission stage of the receiving end and the number of the data packets in the receiving queue of the network equipment exceeds a set threshold value, the network equipment discards the data packet;

and if the data packet is not sent within the first RTT and the receiving queue is not full, the network equipment adds the data packet into the receiving queue.

14. The method of claim 13, further comprising:

if the data packet is not sent within the first RTT and the receive queue is full, the network device discards the data packet.

15. The method of claim 14, further comprising:

if the data packet is not sent within the first RTT and the receive queue is full, the network device discards one data packet in the receive queue, where the discarded data packet is a data packet sent by the sending end within the first RTT.

16. The method of claim 14 or 15, further comprising: the network device determines whether the data packet is sent by the sender within the first RTT.

17. The method according to claim 16, wherein the data packet carries a first flag, and the first flag is added by the sending end and used for indicating that the data packet is sent within the first RTT; the determining step includes:

and the network equipment determines that the data packet is sent by the sending end within the first RTT according to the first mark carried by the data packet.

18. The method according to claim 16 or 17, wherein the data packet carries a second flag, and the second flag is added by the sending end to indicate that the data packet is not sent within the first RTT; the determining step includes:

and the network equipment determines that the data packet is not sent by the sending end in the first RTT according to the second mark carried by the data packet.

19. The method of claim 16, wherein the determining step comprises:

and the network equipment queries a flow table according to the characteristic information of the data packet to determine whether the data packet is sent by the sending end in the first RTT, wherein the flow table stores the characteristic information of one or more data flows.

20. A computing device, comprising: processor, memory and executable program stored on the memory, characterized in that the steps of the method according to any of claims 1 to 7 are implemented when the processor executes the program.

21. A network device, comprising: processor, memory and executable program stored on the memory, characterized in that the steps of the method according to any of claims 8 to 12 are implemented when the processor executes the program.

22. A network device, comprising: processor, memory and executable program stored on the memory, characterized in that the steps of the method according to any of claims 13 to 19 are implemented when the processor executes the program.

23. A network card, comprising: an input/output port, a processor, wherein the processor is configured to send a plurality of data packets through the input/output port within a first round trip time RTT of a data transmission phase of a sending end and a receiving end; adding a first mark to the multiple data packets sent within the first RTT, so that after receiving a data packet carrying the first mark, a network device buffers the data packet carrying the first mark to a low priority queue or discards the data packet, wherein a data packet in a high priority queue of the network device is forwarded before a data packet in the low priority queue, and a data packet buffered in the high priority queue does not carry the first mark.

24. The network card of claim 23, wherein the processor is further configured to determine a number of data packets successfully received by the receiving end in the plurality of data packets sent within the first RTT; determining the number or the sending rate of data packets sent in the second RTT according to the determined number of the data packets successfully received; and transmitting one or more data packets based on the determined number of the transmitted data packets or the determined transmission rate within the second RTT.

25. The network card of claim 24, wherein the processor is further configured to add a second label to the one or more packets sent within the second RTT, so that after receiving a packet carrying the second label, a network device buffers the packet carrying the second label into a high priority queue, wherein a packet buffered in the low priority queue does not carry the second label.

26. A computing device comprising the network card of any one of claims 23 to 25.

27. A network device, comprising:

the receiver is used for receiving a data packet sent by the sending end to the receiving end;

a processor, configured to add the data packet to a low-priority queue when the data packet is sent by the sending end within a first round trip time RTT of a data transmission stage with the receiving end; when the data packet is not sent within the first RTT, caching the data packet to a high priority queue; wherein the data packets in the high priority queue are forwarded in preference to the data packets in the low priority queue;

a memory for buffering the high priority queue and the low priority queue.

28. The network device of claim 27, wherein the processor is further configured to determine whether the data packet was sent by the sender within the first RTT.

29. The network device according to claim 28, wherein the data packet carries a first flag, and the first flag is added by the sending end and used for indicating that the data packet is sent within the first RTT; the processor is specifically configured to determine, according to the first flag carried by the data packet, that the data packet is sent by the sending end within the first RTT.

30. The network device of claim 28, wherein the memory has a flow table stored therein, the flow table containing characteristic information of one or more data flows; the processor is specifically configured to query the flow table according to the feature information of the data packet, so as to determine whether the data packet is sent by the sending end within the first RTT.

31. A network device, comprising:

the receiver is used for receiving a data packet sent by the sending end to the receiving end;

the processor is used for discarding the data packet when the data packet is sent by the sending end within the first round trip time RTT of the data transmission stage of the receiving end and the number of the data packets in the receiving queue of the network equipment exceeds a set threshold; when the data packet is not sent within the first RTT and the receiving queue is not full, adding the data packet into the receiving queue;

a memory to buffer the receive queue.

32. The network device of claim 31, wherein the processor is further configured to discard the packet if the packet is not sent within the first RTT and the receive queue is full.

33. The network device of claim 31 or 32, wherein the processor is further configured to determine whether the data packet is sent by the sender within the first RTT.

34. The network device according to claim 33, wherein the data packet carries a first flag, and the first flag is added by the sending end and used for indicating that the data packet is sent within the first RTT; the processor is specifically configured to determine, according to the first flag carried by the data packet, that the data packet is sent by the sending end within the first RTT.

35. The network device of claim 33, wherein the memory stores a flow table containing characteristic information of one or more data flows; the processor is specifically configured to query the flow table according to the feature information of the data packet, so as to determine whether the data packet is sent by the sending end within the first RTT.

36. A computer-readable storage medium, on which an executable program (instructions) is stored, characterized in that the program (instructions), when executed by a processor, implements the steps of the method of any one of claims 1 to 7.

37. A computer-readable storage medium, on which an executable program (instructions) is stored, characterized in that the program (instructions), when executed by a processor, implements the steps of the method of any one of claims 8 to 12.

38. A computer-readable storage medium, on which an executable program (instructions) is stored, characterized in that the program (instructions), when executed by a processor, implements the steps of the method of any one of claims 13 to 19.

39. A data transmission system, comprising: the computing device of claim 20, and the network device of claim 21 or 22.

Technical Field

The present application relates to the field of communications technologies, and in particular, to a data transmission method, a related device, and a system.

Background

In a network, data Transmission is performed between devices based on various types of communication protocols, for example, a Transmission Control Protocol (TCP) is a connection-oriented, reliable, byte stream-based transport layer communication Protocol, and is defined by RFC793 issued by Internet Engineering Task Force (IETF), which is the most widely used transport layer Protocol in the current network. In order to ensure reliable transmission of data packets, TCP assigns a Sequence Number (SN) to each data packet, and for a data packet that has been successfully received, the receiving end replies a corresponding Acknowledgement (ACK) to the sending end, where the ACK carries the Sequence Number of the received data packet. If the sender does not receive an acknowledgement within a reasonable Round-Trip Time (RTT), the corresponding packet will be retransmitted, and this mechanism is also commonly referred to as timeout retransmission. Although TCP guarantees reliable transmission of data through an acknowledgment and timeout retransmission mechanism, network resources (including link bandwidth, cache in a switching node, etc.) are usually limited, and if too many data packets are transmitted in the network within a certain period of time, the transmission performance of the network is rapidly deteriorated, which is called network congestion. When a network is congested, packet loss, transmission delay increase, throughput decrease, and even "congestion collapse" in severe cases generally occur.

To prevent network congestion, TCP introduced a series of congestion control algorithms, including the "slow start" and "congestion avoidance" algorithms originally proposed by v.jacobson in 1988, and the "Fast retransmit" and "Fast recovery" algorithms later incorporated in the TCP Reno version. Common to these congestion control algorithms is that the rate of data transmission is adjusted based on a congestion window. The size of the congestion window, i.e. the cwnd value, represents the maximum number of data packets that can be sent but have not received ACK, the larger the window is, the faster the data sending rate is, but the more likely the network is congested, and if the window value is 1, each time one data is sent, a second data packet can be sent until the other side confirms, which obviously results in low data transmission efficiency. It is the core of the congestion control algorithm to choose the optimal cwnd value so that the network throughput is maximized and congestion is not generated.

Fig. 1 shows the main procedures of TCP congestion control in the prior art, including slow start, congestion avoidance, fast retransmission and fast recovery phases, in which there are two important parameters cwnd (congestion window size) and ssthresh (slow start threshold), and these two parameters are all changed to control the sending rate of data. As shown in fig. 1, in the slow start phase, the sender sends 1 data packet (cwnd ═ 1), if the receiver successfully receives the data packet, the sender starts sending 2 data packets (cwnd ═ 2), if the receiver successfully receives the 2 data packets, then sends 4 data packets (cwnd ═ 4), that is, the size of the congestion window increases exponentially until the set slow start threshold ssthresh is reached. After cwnd is ssthresh, the congestion avoidance stage is entered, and the sender does not increase cwnd in the above exponential manner any more but increases cwnd in a linear manner, that is, only 1/cwnd packet is added after receiving ACK from the receiver each time. Thus cwnd increases by at most 1 within one RTT. If a timeout occurs while cwnd is 24, cwnd is reset to 1 and the slow start threshold ssthresh is decreased, e.g. ssthresh is current cwnd/2.

It can be seen that the existing congestion control algorithm avoids impact on the network by slowly increasing the data transmission rate when the network condition is good, and meanwhile, drastically reduces the data transmission rate when packet loss is detected, so as to avoid further deterioration of the network state, and is a congestion control algorithm mainly based on "congestion prevention". Although the algorithm can inhibit network congestion to a certain extent, the algorithm can unreasonably limit the data transmission rate, increase the data transmission delay and reduce the network bandwidth utilization rate. Especially in the environment of wireless network, data center network, Remote Direct Memory Access (RDMA) network, etc., the situations of reduced throughput, large data transmission delay and network bandwidth waste caused by the existing congestion control algorithm are common.

Disclosure of Invention

The embodiment of the application provides a data transmission method, and related equipment and system, aiming at reducing network congestion and simultaneously fully utilizing network bandwidth, improving the data transmission rate and reducing the data transmission delay.

To achieve the above object, in one aspect, an embodiment of the present application provides a data transmission method, where the method includes: a sending end sends a plurality of data packets at a very large rate (line speed or any user-defined rate) within a first RTT of a data transmission stage with a receiving end, and adds a first mark to the plurality of data packets sent within the first RTT, so that a network device caches the data packets carrying the first mark to a low priority queue or discards the data packets carrying the first mark after receiving the data packets carrying the first mark, wherein the data packets in a high priority queue of the network device are forwarded in preference to the data packets in the low priority queue, and the data packets cached in the high priority queue do not carry the first mark. The method utilizes the free bandwidth of the network to quickly start the new data flow without delay, and simultaneously marks the data packet sent by the first round of RTT, so that the network equipment forwards the packet sent by the first round of RTT with lower priority, thereby reducing the impact of the quick start of the new flow on the old flow (non-first round of RTT packet) and reducing the probability of network congestion.

In one possible design, the sending end may adjust a sending rate in the next RTT or a number of sent data packets based on a number of data packets successfully received by the receiving end in the plurality of data packets sent within the first RTT, and send data packets in the next RTT based on the adjusted sending rate or the number of data packets, thereby implementing congestion control in time based on the perceived network condition, so as to avoid causing rapid deterioration of the network condition.

In a possible design, the sending end may add a second flag to a data packet sent within a non-first RTT, so as to indicate that the data packet is sent within the non-first RTT, and the network device further caches the data packet in the high-priority queue based on the second flag carried in the data packet, and forwards the data packet in preference to the data packet sent within the first RTT, so as to reduce an influence on an old flow (a non-first round RTT packet).

In one possible design, the first flag and the second flag are fields or specific bits of a packet header.

In a possible design, before sending a data packet, a sending end establishes a communication connection with a receiving end, where the first RTT or the first round RTT is the first RTT after the communication connection is established.

In a possible design, the sending end performs data transmission during the process of establishing a communication connection with the receiving end, and the first RTT or the first round RTT is the first RTT of the communication connection establishment stage.

In one possible design, the sending end determines, based on one or an acknowledgement received from the receiving end, the number of data packets successfully received by the receiving end in the plurality of data packets sent within the first RTT.

In one possible design, the upper limit of the number of data packets allowed to be sent by the sending end within the second RTT is linear with the number of data packets successfully received by the receiving end in the data packets sent by the first RTT.

In a second aspect, an embodiment of the present application provides a data transmission method, including: the network equipment receives a data packet sent by a sending end; if the data packet is sent by the sending end within the first Round Trip Time (RTT) of the data transmission stage with the receiving end, the network equipment caches the data packet to a low-priority queue; if the data packet is not sent within the first RTT, the network device caches the data packet to a high priority queue; wherein data packets in the high priority queue are forwarded in preference to data packets in the low priority queue.

By adopting the method, the network equipment distinguishes the data packet sent by the first round of RTT and the data packet sent by the non-first round of RTT and gives higher forwarding priority to the data packet sent by the non-first round of RTT, thereby reducing the impact of the fast packet sending of the first round of RTT on the old flow (the non-first round of RTT packet) and reducing the probability of network congestion.

In one possible design, a specific mark is added to a data packet sent by a sending end to a first round RTT, and the network device determines whether the data packet is sent by the sending end within the first round RTT based on the mark carried by the received data packet.

In one possible design, the network device maintains a flow table to record all active flow information. If the quintuple information of a flow can not be found in the flow table, classifying the flow as a new flow and inserting a new flow record in the flow table. When the subsequent data packet is checked, the newly inserted flow table entry is hit, and the current data packet is determined to belong to a new flow according to the content of the flow table entry, namely, the packet sent by the first round of RTT. When a new flow finishes the data transmission of the first round of RTT, the flow table entry is updated to be the 'old flow', so that the subsequent data packets of the flow are identified as non-first round of RTT packets according to the updated flow table entry.

In one possible design, each flow record of the flow table has a validity time, and if the flow does not subsequently send any new packets within the validity time, the flow record is deleted.

In a third aspect, an embodiment of the present application provides a data transmission method, including: the network equipment receives a data packet sent by a sending end; if the data packet is sent by the sending end within the first Round Trip Time (RTT) of the data transmission stage with the receiving end, and the number of the data packets in the receiving queue of the network equipment exceeds a set threshold value, the network equipment discards the data packet; and if the data packet is not sent within the first RTT and the receiving queue is not full, the network equipment adds the data packet into the receiving queue.

By adopting the method, the network equipment selectively discards the data packet sent by the first round of RTT based on the depth of the receiving queue, thereby reducing the impact of the quick packet sending of the first round of RTT on the old flow (non-first round of RTT packets) and reducing the probability of network congestion.

In one possible design, if the packet is not sent within the first RTT and the receive queue is full, the network device discards the packet.

In one possible design, if the data packet is not sent within the first RTT and the receive queue is full, the network device discards one data packet in the receive queue, where the discarded data packet is a data packet sent by the sending end within the first RTT.

In one possible design, a specific mark is added to a data packet sent by a sending end to a first round RTT, and the network device determines whether the data packet is sent by the sending end within the first round RTT based on the mark carried by the received data packet.

In one possible design, the network device maintains a flow table to record all active flow information. If the quintuple information of a flow can not be found in the flow table, classifying the flow as a new flow and inserting a new flow record in the flow table. When the subsequent data packet is checked, the newly inserted flow table entry is hit, and the current data packet is determined to belong to a new flow according to the content of the flow table entry, namely, the packet sent by the first round of RTT. When a new flow finishes the data transmission of the first round of RTT, the flow table entry is updated to be the 'old flow', so that the subsequent data packets of the flow are identified as non-first round of RTT packets according to the updated flow table entry.

In one possible design, each flow record of the flow table has a validity time, and if the flow does not subsequently send any new packets within the validity time, the flow record is deleted.

In a fourth aspect, an embodiment of the present application provides a computing device, where the computing device has a function of implementing the sending end in the above method example. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.

In one possible design, the computing device includes a processor, a memory, and a network card for receiving and sending data packets, the processor running a protocol stack program in the memory for performing the functions of the sender in the above method examples.

In another possible design, the computing device may have a structure including a receiving unit, a processing unit, and a sending unit, which may perform corresponding functions in the above method examples, for example, the receiving unit and the sending unit are respectively used for receiving and sending data packets, and the processing unit is used for processing the data packets, such as adding the first and/or second tags.

In a fifth aspect, an embodiment of the present application provides a network device, where the network device has a function of a network device in any one of the foregoing aspects or any one of the possible implementations of any one of the foregoing aspects. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.

In one possible design, the network device includes a processor, a memory, and an input/output port, the input/output port is used for receiving and sending data packets, the processor runs a protocol stack program in the memory, and is used for performing the functions of the network in the above method examples, such as identifying data packets sent by first round RTT, buffering the data packets to a receiving queue, discarding the data packets when the receiving queue is full or the queue depth exceeds a set threshold, and the like.

In one possible design, the network device includes a receiving unit, a processing unit, and a sending unit, which may perform corresponding functions in the above method examples, for example, the receiving unit and the sending unit are respectively used for receiving and sending data packets, the processing unit is used for processing data packets, for example, identifying data packets sent by the first round RTT, buffering the data packets to a receiving queue, discarding the data packets when the receiving queue is full or the queue depth exceeds a set threshold, and the like.

In one possible design, the receiving unit and the transmitting unit are transceivers, network cards or communication interfaces, and the processing unit is a processor, a hardware circuit such as a Field Programmable Gate Array (FPGA) or an Application Specific Integrated Circuit (ASIC), or a dedicated chip.

In a sixth aspect, an embodiment of the present application provides a network card, including: the processor is used for sending a plurality of data packets through the input/output port within the first round trip time RTT of the data transmission stage of the sending end and the receiving end; adding a first mark to the multiple data packets sent within the first RTT, so that after receiving a data packet carrying the first mark, a network device buffers the data packet carrying the first mark to a low priority queue or discards the data packet, wherein a data packet in a high priority queue of the network device is forwarded before a data packet in the low priority queue, and a data packet buffered in the high priority queue does not carry the first mark.

In another aspect, an embodiment of the present application provides a computing device, where the computing device includes the network card.

In another aspect, an embodiment of the present application provides a data transmission system, where the system includes the computing device and the network device.

In yet another aspect, the present application provides a computer storage medium for storing computer software instructions for the computing device or the network device, which includes a program designed to execute the above aspects.

Compared with the prior art, in the scheme provided by the embodiment of the present application, the sending end sends a large number of data packets within the first RTT after the TCP connection is established, so that the free bandwidth of the network is fully utilized to enable the new data stream to be started quickly without delay, and meanwhile, whether a data stream is a new stream or not is taken as a standard to perform stream classification, and different network transmission priorities are set for different streams, so as to prevent the data packets of the new stream from interfering with the transmission of the old data stream packets, thereby causing network congestion. That is to say, the data transmission method provided in the embodiment of the present application makes a better balance between the network bandwidth utilization rate and the network congestion occurrence probability, and avoids causing network congestion as much as possible while making full use of the network bandwidth.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments of the present application will be briefly described below.

Fig. 1 is a schematic diagram of a congestion control algorithm in the prior art.

Fig. 2 is an architecture diagram of a data transmission system according to an embodiment of the present application.

Fig. 3 is a schematic structural diagram of a computing device according to an embodiment of the present application.

Fig. 4 is a schematic structural diagram of a computing device according to another embodiment of the present application.

Fig. 5 is a schematic structural diagram of a computing device according to another embodiment of the present application.

Fig. 6 is a flowchart of a data transmission method according to an embodiment of the present application.

Fig. 7 is a schematic diagram of data transmission based on high and low priority queues according to an embodiment of the present application.

Fig. 8 is a schematic diagram of a selective packet loss process according to an embodiment of the present application.

Fig. 9 is a flowchart of a data transmission method according to an embodiment of the present application.

Fig. 10 is a schematic diagram of a format of a TCP packet according to an embodiment of the present application.

Fig. 11 is a schematic structural diagram of a network device according to an embodiment of the present application.

Fig. 12 is a schematic diagram of another data transmission system according to an embodiment of the present application.

Detailed Description

Technical solutions in the embodiments of the present application will be described in detail below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments.

Before starting to describe specific embodiments of the present application, terms and their meanings that will be mentioned in the following embodiments of the present application will be introduced. It is to be understood that the terms and their meanings in the various embodiments of the application may be identical throughout the description.

Data packet: also called messages, are the basic units of network transmission, and are data organized in a certain format. Different types of network protocols define the format of data packets differently, but generally, a data packet can be divided into a header (header) and a payload (payload), wherein the header includes information necessary for the transmission of the data packet, such as address information, flag bits, etc., and the payload is also called the data portion of the data packet, which includes the data content to be transmitted.

The switch: a network device capable of forwarding packets provides more connection ports for the network to connect more devices to the network.

The switch queue: and the functional unit is used for storing the received data packet in the switch.

A server: an apparatus for providing computing services. Since the server needs to respond to and process the service request, the server generally has the capability of assuming and securing the service. Under a network environment, the server is divided into a file server, a database server, an application server, a WEB server and the like according to different service types provided by the server.

The terminal equipment: devices that provide voice and/or data connectivity to a user include wireless terminals or wired terminals. The wireless terminal may be a mobile terminal such as a mobile telephone (or "cellular" telephone) or a computer having a mobile terminal, such as a portable, pocket, hand-held, computer-included, or vehicle-mounted mobile device.

The data center comprises: a data center is a complex suite of facilities. It includes not only computer systems and other associated equipment (e.g., communications and storage systems), but also redundant data communications networks, environmental control equipment, monitoring equipment, and various security devices. These devices are placed together because they have the same environmental requirements and physical security requirements, and such placement facilitates maintenance.

A data center network: a network connecting all computer systems in the data center.

Network bandwidth: network bandwidth refers to the amount of data that can be transmitted in a unit of time (typically referred to as 1 second).

Data flow: a group of packets sent from one computing device (e.g., server a) to another computing device (e.g., server B) in a network, and the definition of a data flow may vary according to the application requirements, and a data flow is generally defined by a five-tuple (source IP address, destination IP address, source port number, destination port number, protocol type).

Network congestion: network congestion refers to a situation where network transmission performance is degraded due to limited network resources when the amount of data transmitted in the network is too large. Network congestion typically occurs when the network performance degrades due to excessive load increases in the network.

And (3) congestion control: i.e., by some means to resolve or alleviate network congestion. Congestion control, which requires ensuring that the network can carry the traffic submitted by the users, is a global problem involving many factors such as hosts, switches, etc. The parameters for measuring whether the network is congested are mainly as follows: packet loss rate, switch queue depth (average or instantaneous), number of packets retransmitted over time, average transmission delay, etc.

And (3) a congestion control algorithm: an algorithm for resolving network congestion.

Acknowledgement (ACK): the control packet sent to the sending end by the receiving end in the data transmission process is used for indicating that the data sent by the sending end is confirmed to be received.

Round-Trip Time (Round-Trip Time, RTT): an important performance indicator in network transmission indicates the total time delay from the time when the transmitting end transmits data to the time when the transmitting end receives an Acknowledgement (ACK) from the receiving end. The RTT is determined by three parts: i.e. the propagation time of the link, the processing time of the sender and receiver, and the queuing and processing time in the intermediate network device cache. The values of the first two parts are relatively fixed, and the queuing and processing time in the network equipment buffer memory can change along with the change of the congestion degree of the whole network. The variation in RTT reflects to some extent the variation in the degree of network congestion.

Transmission Control Protocol (TCP): is a connection-oriented, reliable, byte stream-based transport layer communication protocol, defined by the IETF RFC 793.

Explicit Congestion Notification (ECN): is an extension of the TCP protocol, defined in IETF RFC 3168. ECN allows end-to-end notification of congestion control while avoiding packet loss. ECN is an optional feature that may be used by both ECN-enabled endpoints if supported by the underlying network infrastructure. Typically, networks indicate channel congestion by dropping packets. In the event that the ECN negotiates successfully, the ECN capable switch may set a flag in the packet header instead of dropping the packet to indicate that congestion is imminent. After detecting that the data packet is marked by the network equipment, a receiving end of the data packet makes a corresponding mark in the returned ACK to inform the sending end that the network is congested; accordingly, the transmitting end reduces its transmission rate as if packet loss was detected in the conventional TCP congestion control algorithm.

Remote Direct Memory Access (RDMA): a technique is provided for solving the delay of server-side data processing in network transmission. RDMA rapidly moves data from one server to the memory of another server in a mode of unloading a protocol stack by a network card, and the whole process does not need the participation of an operating system (kernel bypass), so that the load of a CPU (Central processing Unit) can be reduced.

Data Plane Development Kit (DPDK): the system is a development platform and an interface for rapidly processing data packets. DPDK provides a simple and complete framework for fast packet processing and network transmission at the application layer. The DPDK allows the data packet packaged by the application layer to be directly sent to the network card without the participation of an operating system in the process, so that the loads of a memory and a CPU can be reduced.

In the description of the embodiments of the present application, "a plurality" means two or more unless otherwise specified.

Fig. 2 shows a simplified architecture of a data transmission system 10 to which the inventive solution is applicable. As shown in FIG. 2, a plurality of computing devices 100 are communicatively connected by a network 200. The computing device 100 may be any device with data transceiving capabilities, such as a server, a terminal device, or a virtual machine, among others. The network 200 may be a data center network, the internet, a local area network, a wide area network, or the like. Network 200 includes one or more network devices 210, such as switches, gateways, routers, etc., that enable packet forwarding. The two devices establish communication connection using communication-related components, such as protocol stacks, network cards, and the like, and transmit data in units of data packets according to the established connection. During transmission, the data packet may pass through one or more network devices 200 in the network 200, and the network device 200 buffers the received data packet in a switch queue and then forwards the data packet to other devices. For simplicity of description, in the embodiment of the present application, one of two devices that have established a communication connection is referred to as a sending end, and the other is referred to as a receiving end. It is to be understood that the transmitting end and the receiving end may be any devices having data transceiving capabilities. For example, the sending end may be one server, and the receiving end may be another server; or the sending end is a terminal device and the receiving end is a server; or both the sending end and the receiving end are terminal equipment. In addition, the sending end and the receiving end have two opposite roles and can be switched with each other, that is, the same device may be the sending end or the receiving end in different scenes.

Those skilled in the art will appreciate that a data transmission system may generally include fewer or more components than shown in fig. 2, or include different components than those shown in fig. 2, and fig. 2 shows only those components more relevant to the implementations disclosed in the embodiments of the present application.

The data transmission system 10 shown in fig. 2 is only an exemplary application scenario of the present invention, and should not be construed as limiting the application scenario of the present invention.

Data packets are inevitably lost during data transmission in a data transmission system, so in order to ensure reliable data transmission, the data transmission system usually introduces congestion control algorithms such as slow start, congestion avoidance and the like to suppress network congestion, but the congestion control algorithms also greatly limit the data transmission rate of the data, increase transmission delay and reduce the bandwidth utilization rate. The embodiment of the application provides a data transmission method, which can fully utilize network bandwidth, improve data transmission rate and reduce data transmission delay while reducing network congestion. The method can be used for equipment for data transmission based on TCP. It is understood that other networks that allow packet loss may also use this method for congestion control.

Fig. 3 shows an exemplary structural diagram of the computing device 100 according to the embodiment of the present application. As shown in fig. 3, computing device 100 includes: a processor 110, a memory 130, and a Network Interface Card (NIC) 150. These components may communicate over one or more communication buses or signal lines. Those skilled in the art will appreciate that computing device 100 may include more or fewer components than illustrated, or some components may be combined.

Processor 110 is the control center for computing device 100, and connects the various components of computing device 100 using various interfaces and buses. In some embodiments, processor 110 may include one or more processing units.

Stored in memory 130 are executable programs, such as operating system 131 and application programs 133 shown in FIG. 3. The processor 110 is configured to execute an executable program in the memory 130 to implement the functions defined by the program, e.g., the processor 110 executes an operating system 131 to implement various functions of the operating system on the computing device 100. Memory 130 also stores data other than executable programs, such as data generated during the operation of operating system 131 and application programs 133. Memory 130 may include one or more memory devices. In some embodiments, storage 130 is a non-volatile storage medium, generally comprising memory and external storage. The Memory includes, but is not limited to, Random Access Memory (RAM), Read-Only Memory (ROM), or cache. External memory includes, but is not limited to, flash memory (flash memory), hard disk, Universal Serial Bus (USB) disk, and the like. The executable program is typically stored on an external memory, from which the processor loads the program into the memory before executing the executable program.

The memory 130 may be separate and connected to the processor 110 through a bus; memory 130 may also be integrated with processor 110 into a chip subsystem.

The network card 150 is a hardware unit that implements functions such as data packet transmission and reception, data packet encapsulation and decapsulation, media access control, and data caching. Network card 150 includes a processor, a memory (including RAM and/or ROM), and an input/output port, wherein the input/output port is used for receiving and transmitting data packets, the memory is used for buffering received data packets or data packets to be transmitted, and the processor processes the data packets by executing a program in the memory, such as encapsulation/decapsulation, and the like.

The operating system 131 carried by the computing device 100 may be

Figure BDA0001716825270000081

Or other operating system, to which the embodiments of the present application do not impose any limitations.

Further, in one embodiment, as shown in FIG. 3, the computing device 100 is logically divided into a hardware layer 21, an operating system 131, and an application layer 27. The hardware layer 21 includes hardware resources such as the processor 110, the memory 130, the network card 150, and the like, as described above. The application layer 31 includes one or more application programs, such as application program 133. The operating system 131, as software middleware between the hardware layer 21 and the application layer 31, is an executable program that manages and controls hardware and software resources.

The operating system 131 includes a kernel 23, the kernel 23 being used to provide underlying system components and services, such as: power management, memory management, protocol stack 25, hardware drivers 26, etc. The protocol stack 25 is a component that implements network protocols. In one embodiment, hardware drivers 26 include a memory driver 233 and a network card driver 235. In one embodiment, the protocol stack 25 includes a network layer protocol component 253 and a transport layer protocol component 255 for implementing network protocol functions of the network layer and the transport layer, respectively. The data transmission method provided by the embodiment of the present application may be implemented by the transport layer protocol component 255 in the kernel 12.

In one embodiment, the computing device 100 may offload functions of components associated with the protocol stack to the network card, thereby implementing kernel bypass and improving data forwarding performance. As shown in fig. 4, the network card 150 is a programmable network card, and the transport layer protocol component 255 is implemented in the programmable network card 150. Accordingly, the data transmission method provided in the embodiment of the present application may be implemented by the network card 150, for example, the method may be implemented by modifying hardware or firmware of the network card 150.

In one embodiment, as shown in fig. 5, the computing device 100 may implement the transport layer protocol component 255 at the application layer (e.g., DPDK technology), so as to implement kernel bypass and improve data forwarding performance. Accordingly, the data transmission method provided by the embodiment of the present application may be implemented by software of an application layer.

Fig. 6 shows a flowchart of a data transmission method provided in an embodiment of the present application. For convenience of description, in the embodiment of the present application, one of the two computing devices 100 performing data transmission through the network device 210 is referred to as a sending end, and the other is referred to as a receiving end. As shown in fig. 6, the data transmission method includes the following steps:

step 610: the sending end sends a plurality of data packets within the first RTT of the data transmission stage with the receiving end, or sends the data packets at a large rate (line speed or any custom rate) within the first RTT. RTT is the time that the transmitting end takes from sending data to receiving an acknowledgement from the receiving end. RTT is not a fixed value but a measured value, and it varies with the congestion level of the entire network. For the first RTT, it is the time duration from when the sender sends the first data packet until the sender receives the acknowledgement from the receiver. In the data transmission process, the sending end can dynamically estimate the RTT value according to the timestamp of the sent data packet and the timestamp of the received acknowledgement, so that the RTT changes along with the change of the network congestion degree.

In step 610, the sender may send multiple packets without limitation before receiving the acknowledgement from the receiver, instead of sending only one packet as in the slow start mechanism of the prior art. The plurality of data packets herein includes at least two data packets, and preferably includes more than two data packets, and even more than two data packets. The data transfer phase is relative to the connection establishment phase. The sending end and the receiving end need to be able to implement data transmission, and need to establish a communication connection, and the connection establishment phase usually involves one or more message interactions. The "first RTT" described in the embodiments of the present application generally refers to a first RTT for data transmission after a communication connection between a sending end and a receiving end is established. In some special cases, the connection establishment phase and the data transmission phase may not be serial, but parallel, that is, the sending end starts data transmission during the connection establishment with the receiving end. In this case, the "first RTT" refers to the first RTT at which the transmitting end starts to transmit data to the receiving end.

Step 630: the network device 210 receives one or more of the plurality of data packets, buffers the one or more data packets to a receiving queue, and forwards the one or more data packets at a suitable time;

step 650: the sending end adjusts the next RTT (non-first round RTT), namely the number or sending rate of the data packets sent in the second RTT, according to the number of the data packets successfully received by the receiving end in the data packets sent in the first RTT, and continues to send the data packets based on the adjusted number or sending rate. For example, if the number of data packets successfully received by the receiving end in the data packets sent in the first RTT is N, the upper limit of the data packets allowed to be sent in the next RTT may be adjusted to N, N +1, or an integer value having a linear relationship with N.

It should be noted that the "number of data packets successfully received by the receiving end" in step 650 is generally determined or estimated by the transmitting end based on the feedback from the receiving end, and there may be an error with the number of data packets successfully received by the receiving end actually. In one embodiment, each time the receiving end receives a packet, it replies a corresponding acknowledgement (acknowledgement) to the sending node indicating that the receiving end has successfully received the packet. Accordingly, the sending end confirms the number of the data packets successfully received by the receiving end in the plurality of data packets sent within the first RTT based on the received confirmation from the receiving end. In an embodiment, the receiving end may also feed back information of a plurality of data packets that have been successfully received or information of one or more data packets that have not been successfully received through an acknowledgment carrying an extension field, and the transmitting end may determine, based on the extension field in the received acknowledgment, a data packet that is successfully received by the receiving end among the plurality of data packets sent within the first RTT, and further determine the number of the data packets.

Step 670: the network device 210 receives one or more data packets sent by the sending end at the non-first round RTT, buffers the data packets to a receiving queue, and forwards the data packets at a suitable time.

To reduce network congestion, the network device 210 may differentiate between data packets sent within the first RTT and data packets sent within a non-first RTT. The network device 210 may use multiple ways to distinguish the data packet sent by the sender within the first RTT from the data packet sent by the sender within the non-first RTT.

In one embodiment, as shown in step 640 in fig. 6, the sender may add a first marker to the data packet sent within the first RTT, so that the network device 210 can quickly identify the data packet sent within the first RTT.

Optionally, as shown in step 680, the sending end may also add a second flag to the data packet sent in the non-first RTT, so that the network device 210 can quickly identify the data packet sent in the non-first RTT. The first flag and the second flag may be located in some extension field of the header of the data packet, such as an Option (Option) field, a reserved (reserved) field, or the like. In one embodiment, the first flag and the second flag may be ECN bits of a header of the packet, and the ECN bits are used to indicate that the packet is a packet sent within the first RTT when the ECN bits are a specific value (e.g., 0 or 1). Accordingly, after receiving any data packet, the network device 210 may determine whether the data packet is a data packet sent within the first RTT according to the flag carried by the data packet.

In another embodiment, the network device 210 may maintain a flow table that records information of all active data flows and perform new and old flow classification based on the flow table to determine whether the data packet was sent within the first RTT. Wherein, the active data flow refers to a data flow which has completed the first round of RTT data transmission. If the quintuple information of a flow can not be found in the flow table, classifying the flow as a new flow and inserting a new flow record in the flow table. And if the flow table is inquired according to the quintuple of the data packet and the newly inserted flow table entry is hit, determining that the current data packet belongs to a new flow, namely the data packet sent by the first RTT. When a new flow finishes the data transmission of the first round of RTT, the flow table entry is updated to be the 'old flow', so that the subsequent data packet can be identified as the old flow according to the updated flow table entry, namely the data packet sent by the non-first RTT. Optionally, each flow record of the flow table has a validity time, and if the flow does not transmit any new data packet within the validity time, the flow record is deleted. And otherwise, the effective time is calculated again after the effective time is expired.

In one embodiment, in step 650, after the data transmission of the first round of RTT, the flow rate of the second round of RTT may be calculated according to the following method (1) or (2):

(1) the flow rate for the second RTT is determined based on the number of packets successfully transmitted by the first RTT. Assuming that the congestion window is initialized to 1(cwnd ═ 1), the congestion window does not function at the first RTT. The value of cwnd is incremented by 1 every acknowledgement received in the second RTT, and the number of packets allowed to be sent in the second RTT is determined by the value of cwnd.

(2) Active congestion control algorithm: starting from the second round of RTT, the sending rate is calculated using existing congestion control algorithms.

Further, the network device 210 performs differentiated caching and forwarding according to the data packet sent within the identified first RTT and the data packet sent within the non-first RTT.

In one embodiment, as shown in fig. 7, the network device 210 includes a plurality of priority queues, such as a high priority queue and a low priority queue, and the network device 210 buffers the data packets sent in the first RTT into the low priority queue and buffers the data packets sent in the non-first RTT into the high priority queue. And the data packets in the high-priority queue are preferentially forwarded, and when the high-priority queue is empty or the depth of the high-priority queue is smaller than a preset threshold value, the data packets in the low-priority queue are forwarded. The depth of the queue refers to the number of packets buffered in the queue. There may be one or more high priority queues and one or more low priority queues, for example, the network device 210 has 2 high priority queues and 2 low priority queues, or 3 high priority queues and 1 low priority queue.

In another embodiment, as shown in fig. 8, a selective packet loss threshold k is set for the receive queue of the network device 210, and when the depth of the receive queue is smaller than the threshold k, both the data packet sent in the first RTT and the data packet sent in the non-first RTT received by the network device 210 may be buffered in the receive queue; when the depth of the receive queue is greater than or equal to the threshold k, if the currently received data packet is a data packet sent within the first RTT, the network device 210 discards the data packet. If the currently received data packet is a data packet sent within the non-first RTT and the receive queue is not full, the network device 210 will buffer the currently received data packet into the receive queue. The depth of the receiving queue refers to the number of data packets in the receiving queue.

As an alternative embodiment, when the receive queue is full or the depth of the receive queue is greater than or equal to the threshold k, if the currently received data packet is a data packet sent within a non-first RTT, the network device 210 may also discard one or more data packets cached within the first RTT in the receive queue, so as to "make room" for a newly received data packet sent within the non-first RTT.

As an alternative embodiment, when the receiving queue is full, if the currently received data packet is a data packet sent within a non-first RTT, the network device 210 may also discard the currently received data packet.

As an alternative embodiment, when the depth of the receive queue is greater than or equal to another threshold s, if the currently received packet is a packet sent within a non-first RTT, the network device 210 may also discard the currently received packet, where the threshold s is greater than or equal to the selective packet loss threshold k.

As an alternative embodiment, when the network device 210 has multiple receive queues, different selective packet loss thresholds may be set for different receive queues. For example, a first threshold m is set for a low priority queue for buffering packets sent within the first RTT, and a first threshold n is set for a high priority queue for buffering packets sent within a non-first RTT, where m < n. Thus, when the depth of the low priority queue is greater than or equal to m, if the network device 210 receives the data packet sent within the first RTT, the data packet is discarded; when the depth of the high priority queue is greater than or equal to n, if the network device 210 receives a data packet sent within a non-first RTT, the data packet is discarded.

Fig. 9 is a flowchart illustrating a data transmission method to which the embodiment of the present application is applied when the computing device 100 performs data transmission based on TCP. It should be understood that TCP is only one transport protocol that may be used by a computing device and that other transport protocols may be suitable for use with the methods of embodiments of the present application. For convenience of description, in the embodiment of the present application, one of the two computing devices 100 performing data transmission through the network device 210 is referred to as a sending end, and the other is referred to as a receiving end. As shown in fig. 9, the data transmission method includes the following steps:

step 910: and the sending end and the receiving end establish TCP connection.

In one embodiment, the establishment of the TCP connection may be initiated by an application on the sender. The application generates a socket open command that is passed to the protocol stack at the sender to trigger the protocol stack to establish a TCP connection with the receiver through three message interactions (also referred to as a "three-way handshake"), which then notifies the application that a connection has been established. The format of the TCP packet is as shown in fig. 10, where a source port number and a destination port number are used to determine application processes of a sending end and a receiving end, a TCP connection can be uniquely determined by a quintuple (source port number, destination port number, source IP address, destination IP address, and transport layer protocol number), and the packets transmitted on the TCP connection form a data stream, that is, the packets in the same data stream have the same quintuple; the Sequence Number (seq) field of the TCP packet header is used to indicate the Sequence Number of the packet, which is typically the Sequence Number of the first data byte in the packet payload. After receiving the TCP packet, the receiving end sends an Acknowledgement (ACK) to the sending end. The window size is used to indicate the size of the current receive buffer at the receiving end. In addition, the TCP data packet header also has 6 control bits and a customizable Option (Option) field, and the Option field can be used for carrying additional information; wherein the 6 control bits are defined as follows:

URG: the emergency pointer is valid;

and ACK: the confirmation number is valid;

PSH: immediately uploading the data to an application layer for processing;

RST: resetting the abnormity;

SYN: the synchronous mark is set to 1 to establish connection;

FIN: and a termination flag requesting to release the connection.

Referring to fig. 9, a sending end and a receiving end establish a TCP connection through three-way handshake, which is as follows:

(1) the sending end firstly sends a SYN (synchronize) packet to the receiving end to tell the receiving end to request to establish connection; the SYN packet is a TCP packet whose SYN control bit is set to 1 (see the TCP packet format in fig. 10).

(2) After receiving the SYN packet, the receiving end returns an acknowledgement packet (SYN/ACK) to the SYN packet to the sending end, which indicates the acknowledgement to the first SYN packet; here, the SYN/ACK packet is a packet in which only SYN and ACK flags are 1.

(3) After receiving the SYN/ACK packet, the sending end sends an acknowledgement packet (ACK) to the receiving end to inform the receiving end that the connection is established. At this point, the three-way handshake is completed and the TCP connection is established.

Step 930: and the sending end sends a plurality of data packets in the first RTT after the connection is established.

According to a slow start mechanism in the existing congestion control algorithm, the congestion window size cwnd is initialized to 1, and the first RTT of a sending end after connection establishment only sends 1 data packet. In the embodiment of the present application, a plurality of data packets are sent at the first RTT after the connection is established, that is, the data packets are sent at a higher rate by fully utilizing the network bandwidth at the first RTT. Specifically, for the purpose of transmitting a plurality of packets with the first RTT, the transmitting end may initialize the congestion window size cwnd to a larger value (cwnd ═ n, n >1), and then transmit a corresponding number of packets based on the initialized cwnd. It is to be understood that the sender may also initialize the congestion window size to 1(cwnd ═ 1) in the existing manner, but make the congestion window inoperative at the first RTT by other means.

Step 950: when a plurality of data packets sent within the first RTT of the sending end pass through the network device 210, the network device 210 buffers the plurality of data packets to a receiving queue, and sequentially forwards the data packets at a proper time.

Step 970: the sending end adjusts the congestion window size cwnd according to the number of data packets successfully received by the receiving end in the data packets sent by the first RTT, and sends a corresponding number of data packets based on the adjusted cwnd in a second RTT, wherein the second RTT refers to the next RTT after the first RTT. RTT is an estimated value, and the detailed estimation method can refer to the prior art, which is not described herein.

In one embodiment, each time the receiving end successfully receives a data packet, the receiving end returns a corresponding ACK to the transmitting end. In another embodiment, the receiving end may also indicate a plurality of successfully received data packets by using a data packet to carry an extension option, such as Selective Acknowledgement (SACK). The sender may determine, based on the acknowledgment received from the receiver, that the packet was successfully received by the receiver, and adjust cwnd accordingly.

In one embodiment, if the number of packets successfully received by the receiving end in the packets sent by the first RTT is m, cwnd may be adjusted to m +1 or a value having some linear constraint relationship with m.

In one embodiment, a slow start, congestion avoidance, etc. congestion control algorithm may be employed to adjust the congestion window size cwnd. The process of the algorithm of slow start is as follows:

1) initializing a congestion window cwnd equal to 1, indicating that a packet can be sent;

2) every time an ACK is received, cwnd + +; linearly rises;

3) every time an RTT elapses, cwnd 2;

certainly, cwnd cannot be increased without limit, so the sender also sets a slow start threshold (ssthresh) that represents the upper limit of the congestion window, and when cwnd > ssthresh, the congestion avoidance algorithm is triggered. A typical congestion avoidance algorithm is as follows:

1) when an ACK is received, cwnd +1/cwnd

2) Cwnd +1 when every RTT passes

Thus, the situation that the data packet grows too fast to cause network congestion can be avoided, and the data packet slowly increases to adjust to the optimal value of the network.

Step 990: after receiving the data packet sent within the second RTT, the network device 210 buffers the data packet into a receiving queue, and forwards the data packet in sequence.

Step 1000: and after the data transmission is finished, the sending end is disconnected from the receiving end. In an embodiment, if the connection between the sending end and the receiving end is a TCP connection, the sending end and the receiving end may specifically disconnect through "four-way handshake", and the specific process may refer to related descriptions in the prior art and is not described herein again.

Similar to the embodiment shown in fig. 6, the network device 210 may perform differentiation between the data packet sent in the first RTT and the data packet sent in the non-first RTT.

The network device 210 may use multiple ways to distinguish the data packet sent by the sender within the first RTT from the data packet sent by the sender within the non-first RTT. For example, the sending end may add a first flag to a packet sent within the first RTT, or may add a second flag to a packet sent within a non-first RTT, or the sending end may mark both a packet sent within the first RTT and a packet sent within a non-first RTT. The first flag and the second flag may be located in a field of the header of the data packet, such as an Option (Option) field, a reserved (reserved) field, or a control bit field. In one embodiment, the first flag and the second flag may be ECN bits of a header of the packet, and the ECN bits are used to indicate that the packet is a packet sent within the first RTT when the ECN bits are a specific value (e.g., 0 or 1). Accordingly, after receiving any data packet, the network device 210 may determine whether the data packet is a data packet sent within the first RTT according to the flag carried by the data packet. For another example, the network device 210 may also maintain a flow table for recording data flow information, and perform new and old flow classification based on the flow table to determine whether the data packet is sent within the first RTT, and refer to the foregoing embodiment for details about querying the flow table to determine whether the data packet is sent within the first RTT, which is not described again.

Further, the network device 210 performs differentiated caching and forwarding according to the data packet sent within the identified first RTT and the data packet sent within the non-first RTT. For example, the network device 210 may use the high-low priority queue to perform differentiated buffering on the data packets sent in the first RTT and the data packets sent in the non-first RTT, and specific details may refer to the embodiment related to fig. 7. For another example, when the depth of the receive queue exceeds the selective packet loss threshold, the network device 210 may drop one or more data packets sent by the first round of RTT using the selective packet loss scheme shown in fig. 8.

According to the data transmission method provided by the embodiment of the application, a sending end sends a large number of data packets in the first RTT of a data transmission stage with a receiving end, so that the free bandwidth of a network is fully utilized to enable a new data stream to be started quickly without delay, meanwhile, whether the new data stream is the new data stream or not is taken as a standard to carry out stream classification, and different network transmission priorities are set for different streams, so that the situation that the data packets of the new data stream interfere the transmission of old data stream packets to cause network congestion is avoided. That is to say, the data transmission method provided in the embodiment of the present application makes a better balance between the network bandwidth utilization rate and the network congestion occurrence probability, and avoids causing network congestion as much as possible while making full use of the network bandwidth.

In one embodiment, the functionality of the sender described in relation to the embodiments of fig. 6-9 is implemented by the protocol stack 25 of the computing device 100, as shown in fig. 3. Accordingly, the functions of the network device 210 described in the above embodiments may also be implemented by the protocol stack of the network device 210. The protocol stack 25 of the computing device 100 may be executed by a suitable combination of software, hardware, and/or firmware on the computing device 100. For example, in one possible implementation, the protocol stack 25 is stored in the memory 130 in the form of an executable program; the processor 110 of the computing device 100 runs an executable program corresponding to the protocol stack to perform some or all of the steps of the transmitting end described in the above method embodiments.

In one possible implementation, the protocol stack 25 is a stand-alone executable program that the operating system 131 calls for packet processing and transmission via an interface. In another possible implementation, the protocol stack 25 may also be included in the operating system 131 as part of the operating system kernel 23. The protocol stack may be further divided into a plurality of protocol components or modules according to the protocol hierarchy or function, each component implementing a function of a layer protocol, such as a network layer protocol component for implementing a network layer protocol (e.g., an IP protocol), a transport layer protocol component for implementing a transport layer protocol (e.g., a TCP or UDP protocol), and so on.

It should be noted that the term "executable program" used in the embodiments of the present application should be construed broadly to include but not be limited to: instructions, instruction sets, code segments, subroutines, software modules, applications, software packages, threads, processes, functions, firmware, middleware, and the like.

The functions of the transmitting end described in the embodiments related to fig. 6 to fig. 9 may also be implemented by the network card 150 of the computing device 100. In a possible implementation manner, as shown in fig. 4, the network card 150 is a Programmable network card, and the functions of the transport layer protocol component 255 may be implemented by a hardware Circuit or a dedicated chip, such as a Field Programmable Gate Array (FPGA) or an Application Specific Integrated Circuit (ASIC), and the hardware Circuit or the dedicated chip may be Integrated in the Programmable network card 150. In another possible implementation, the network card 150 includes: the transmitter includes a processor, a memory, and an input/output port, where the input/output port is used to receive and transmit a data packet, the memory is used to buffer the received data packet or a data packet to be transmitted, and the processor implements the functions of the transmitter described in the embodiments related to fig. 6 to 9 by executing a program in the memory.

It can be understood that the data transmission method described in the embodiments of the present application is applied to data transmission between a sending end and a receiving end in a network such as a data network, the internet, a local area network, and the like, where the sending end and the receiving end are devices that establish a communication connection and have data transceiving capabilities, such as a computer, a terminal device, a server, a switch, a router, and the like.

An embodiment of the present application further provides a network device 400, as shown in fig. 11, where the network device 400 includes: a processing circuit 402, and a communication interface 404 and a storage medium 406 connected thereto.

The processing circuitry 402 is used to process data, control data access and storage, issue commands, and control other components to perform operations. The processing circuit 402 may be implemented as one or more processors, one or more controllers, and/or other structures operable to execute programs. The processing circuit 402 may specifically include at least one of a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other programmable logic component. A general-purpose processor may include a microprocessor, as well as any conventional processor, controller, microcontroller, or state machine. The processing circuit 302 may also be implemented as a combination of computing components, such as a DSP and a microprocessor.

The storage media 406 may include computer-readable storage media, such as magnetic storage devices (e.g., hard disks, floppy disks, magnetic strips), optical storage media (e.g., Digital Versatile Disks (DVDs)), smart cards, flash memory devices, Random Access Memories (RAMs), Read Only Memories (ROMs), programmable ROMs (proms), erasable proms (eproms), registers, and any combination thereof. A storage medium 406 may be coupled to the processing circuit 402 such that the processing circuit 402 may read information and write information to the storage medium 406. In particular, the storage medium 406 may be integrated into the processing circuit 402, or the storage medium 406 and the processing circuit 302 may be separate.

Communication interface 404 may include circuitry and/or programming to enable bidirectional communication between network device 400 and one or more wireless network devices (e.g., routers, switches, access points, etc.). The communication interface 404 includes at least one receive circuit 416 and/or at least one transmit circuit 418. In one embodiment, the communication interface 404 may be implemented in whole or in part by a wireless modem.

In one embodiment, the storage medium 406 stores a protocol stack program 420 therein, and the processing circuit 402 is adapted to execute the protocol stack program 420 stored in the storage medium 406 to implement part or all of the functions of the network device in the embodiments related to fig. 6 to 9 described above.

Based on the data transmission methods described in the above embodiments, the present embodiment also provides a data transmission system, as shown in fig. 12, that includes a plurality of servers (e.g., servers 103, 105, and 107 shown in fig. 12) connected by a physical switch 230. Taking the server 103 as an example, the hardware of the server 103 includes the processor 102, the memory 104, and the network card 106, the software of the server 103 includes a virtual switch 250, Virtual Machines (VMs) 205 and 206, the VM 205 and the VM 206 on the server 103 communicate through the virtual switch 250, and the VM 205 and the VM 206 communicate with VMs on other servers through the virtual switch 250 and the network card 103. The server 103 is configured to implement the functions of the transmitting end described in the embodiments related to fig. 6 to 9, and the physical switch 230 is configured to implement the functions of the network device described in the embodiments related to fig. 6 to 9. Specifically, in an embodiment, the server 103 may implement the functions of the transmitting end described above by executing the executable program in the memory 104 by the processor 102, and it is understood that, during the program execution process, if it involves sending a data packet to the outside (for example, sending a data packet to another server), a driver of the network card 106 needs to be called to drive the network card 106 to perform a sending operation of the data packet. In another embodiment, the server 103 may also separately implement the functions of the transmitting end described above through the network card 106, for example, the functions may be implemented by a hardware circuit such as an FPGA or an ASIC integrated in the network card 106 or a dedicated chip.

The data transmission system is only an example, and the data transmission system applicable to the technical solution of the present invention is not limited thereto, for example, the servers may also be installed with containers or other virtual operating system software, the number of the servers may also be other numbers, and the hardware included in each server is also not limited to the hardware shown in fig. 12.

In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.

In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.

The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a terminal device, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing executable programs.

27页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种分配缓存的方法和设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!