A data packet sending method, a receiving method, a message sending method and a product

By sending request messages in the data center and calculating the window value based on the receiving terminal and switch information in the ACK message, proactively adjusting data packet sending solves the problem of slow congestion control response in the data center and improves the success rate of data interaction and Bandwidth utilization.

CN116233002BActive Publication Date: 2024-10-22CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211733327.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2024-10-22
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

Existing passive congestion control strategies have slow response, inaccurate rate control, and poor deployability in data centers. They are difficult to adapt to the differentiated needs of different application scenarios, resulting in data center performance degradation.

Method used

By sending a request message from the sending terminal to the receiving terminal, carrying the initial window value, and calculating the appropriate window value based on the window value of the receiving terminal in the received ACK message, the available window value of the switch, and the stamp information, the data packet is actively adjusted. Send to avoid data congestion.

Benefits of technology

It improves the success rate of data interaction, improves bandwidth utilization, is suitable for various network architectures, achieves precise control of traffic, and avoids packet loss and traffic bursts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116233002B_ABST
    Figure CN116233002B_ABST
Patent Text Reader

Abstract

The present invention provides a data packet sending method, a receiving method, a message sending method and a product. The data packet sending method is applied to a sending terminal, and includes: sending a request message to a receiving terminal; the request message carries an initial window value; receiving a first ACK message returned by the receiving terminal through a switch, the first ACK message including: a receiving terminal window value, a switch available window value, and timestamp information of the receiving terminal; calculating a first window value according to the first ACK message; and sending a data packet to the receiving terminal according to the first window value in the opposite direction of the path of receiving the first ACK message. The present invention actively sends a request message, thereby determining a suitable first window value according to the receiving terminal window value, the switch available window value and the timestamp information in the ACK message returned by the receiving terminal, thereby sending a data packet according to the first window value, avoiding data congestion problems, and improving the success rate of data interaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data interaction, and in particular to a data packet sending method, a receiving method, a message sending method and a product. Background Art

[0002] With the rapid development of information technology, the traffic of data center networks has exploded. Today, large-scale data centers need to run tens of thousands or even hundreds of thousands of servers, carrying a variety of business types, with complex traffic types and performance requirements. The network congestion caused by frequent data interactions between nodes will lead to a sharp decline in the overall performance of the data center. Therefore, traffic congestion control strategies have become the key to ensuring the efficient operation of data centers.

[0003] However, many passive congestion control strategies that have been proposed have the disadvantages of slow response to congestion, inaccurate rate control, poor deployability, etc., and are difficult to adapt to the differentiated needs of different application scenarios. Therefore, there is an urgent need for a data packet sending method, a receiving method, a message sending method and a product to implement an efficient congestion control algorithm and improve the success rate of data interaction. Summary of the invention

[0004] In view of the above problems, the embodiments of the present invention provide a data packet sending method, a receiving method, a message sending method and a product, so as to overcome the above problems or at least partially solve the above problems.

[0005] A first aspect of an embodiment of the present invention provides a method for sending a data packet, which is applied to a sending terminal, and the method includes:

[0006] Sending a request message to a receiving terminal; the request message carries an initial window value;

[0007] receiving a first ACK message returned by the receiving terminal through the switch, wherein the first ACK message includes: a window value of the receiving terminal, an available window value of the switch, and timestamp information of the receiving terminal;

[0008] Calculate a first window value according to the first ACK message;

[0009] According to the first window value, a data packet is sent to the receiving terminal in a direction opposite to the path of receiving the first ACK message.

[0010] Optionally, the first ACK message is determined by the following steps:

[0011] The receiving terminal determines the receiving terminal window value according to the initial window value, the local receiving capability and the priority of the sending terminal;

[0012] Generate a candidate ACK message using the receiving terminal window value and timestamp information, and send it to the switch;

[0013] The switch writes the switch ID and the queue available window value into the candidate ACK message to obtain a first ACK message;

[0014] The switch sends the first ACK message to the sending terminal.

[0015] Optionally, calculating a first window value according to the first ACK message includes:

[0016] Determine the minimum value between the receiving terminal window value and the queue available window value as a candidate window value;

[0017] Calculate the delay coefficient according to the timestamp information;

[0018] The first window value is determined according to the delay coefficient and the candidate window value.

[0019] Optionally, calculating a delay coefficient according to the timestamp information includes:

[0020] Determine a time difference between the time information of receiving the first ACK message and the timestamp information;

[0021] Obtaining a delay duration, where the delay duration is determined based on the number of switch hops and a target delay pre-set by the sender for each flow;

[0022] When the time difference is greater than or equal to the delay duration, the delay coefficient is determined according to the following formula:

[0023] α=1-(E2E_de lay-Target_de lay) / Target_de lay

[0024] Wherein, E2E_de l ay is the time difference, and Target_de l ay is the delay duration;

[0025] When the time difference is less than the delay duration, the delay coefficient is determined according to the following formula:

[0026] α=1+(Target_delay-E2E_delay) / Target_delay.

[0027] Optionally, the method further comprises:

[0028] receiving a second ACK message returned by the receiving terminal through the switch;

[0029] Calculate a second window value according to the second ACK message;

[0030] sending a data packet to the receiving terminal according to the second window value;

[0031] Repeat the above steps until the data packet is sent.

[0032] Optionally, the second ACK message is obtained through the following steps:

[0033] The receiving terminal writes the available receiving terminal window value and the timestamp information of the current moment into the second candidate ACK message every time N data packets are received;

[0034] Sending the second candidate ACK message to the switch;

[0035] The switch writes the Switch ID and the available window value of the queue at the current moment into the second candidate ACK message to obtain the second ACK message;

[0036] The switch sends the second ACK message to the sending terminal.

[0037] Optionally, calculating a second window value according to the second ACK message includes:

[0038] Determine the minimum value of the receiving terminal window value in the second ACK message and the queue available window value as the second candidate window value;

[0039] Determine a time difference between the time information of receiving the second ACK message and the timestamp information in the second ACK message;

[0040] Obtaining a delay duration, where the delay duration is determined based on the number of switch hops and a target delay pre-set by the sender for each flow;

[0041] When the time difference is greater than or equal to the delay duration, the delay coefficient is determined according to the following formula:

[0042] α=1-(E2E_de l ay-Target_de lay) / N*Target_de lay

[0043] Wherein, E2E_de l ay is the time difference, and Target_de l ay is the delay duration;

[0044] When the time difference is less than the delay duration, the delay coefficient is determined according to the following formula:

[0045] α=1+(Target_de lay-E2E_de lay) / N*Target_de lay

[0046] The second window value is determined according to the delay coefficient and the second candidate window value.

[0047] Optionally, the method further comprises:

[0048] Detecting the available window value of the queue of the switch in real time;

[0049] When the available window value of the queue of the switch is less than a preset threshold, receiving a congestion notification message sent by the switch;

[0050] According to the received congestion notification message, a window value used for sending data packets is adjusted.

[0051] Optionally, the method further comprises:

[0052] If the first ACK message is not received within a preset time period, resend the request message and reduce the carried initial window value according to a preset ratio;

[0053] If the second ACK message is not received within the preset time period, the request message is resent, and the initial window value carried in the request message is reduced according to a preset ratio of the window value at the last time it was sent.

[0054] A second aspect of the present embodiment provides a method for receiving a data packet, which is applied to a receiving terminal. The method includes:

[0055] Receiving a request message sent by a sending terminal, wherein the request message carries an initial window value;

[0056] Determining the receiving terminal window value according to the request message, the local receiving capability and the priority of the sending terminal;

[0057] Generate a candidate ACK message according to the receiving terminal window value and timestamp information;

[0058] Sending the candidate ACK message to the sending terminal through the switch;

[0059] Receive a data packet sent by the sending terminal in a direction opposite to the sending path of the candidate ACK message.

[0060] A third aspect of this embodiment provides a message sending method, which is applied to a switch. The method includes:

[0061] receiving a candidate ACK message sent by a receiving terminal;

[0062] Writing the Switch ID and its own queue available window value into the candidate ACK message to obtain a first ACK message;

[0063] Sending the first ACK message to a sending terminal;

[0064] Receive a data packet sent by the sending terminal, and send the data packet to the receiving terminal.

[0065] Optionally, the method further comprises:

[0066] Detecting the available window value of the queue of the switch in real time;

[0067] When the available window value of the queue of the switch is less than a preset threshold, a congestion notification message is sent to the sending terminal.

[0068] A fourth aspect of this embodiment provides a sending terminal, the sending terminal including:

[0069] A sending module, used for sending a request message to a receiving terminal; the request message carries an initial window value and a FloWID;

[0070] A first ACK message receiving module, configured to receive a first ACK message returned by the receiving terminal through the switch, wherein the first ACK message includes: a window value of the receiving terminal, an available window value of the switch, and timestamp information of the receiving terminal;

[0071] A first window value calculation module, used to calculate a first window value according to the first ACK message;

[0072] The first sending module is used to send a data packet to the receiving terminal according to the first window value and in a direction opposite to the path of receiving the first ACK message.

[0073] Optionally, the sending terminal includes a first ACK message determining module:

[0074] A receiving terminal window value determination submodule, configured to determine the receiving terminal window value according to the initial window value, the local receiving capability and the priority of the sending terminal;

[0075] A candidate ACK message generation submodule, used to generate a candidate ACK message using the receiving terminal window value and timestamp information, and send it to the switch;

[0076] A first ACK message generation submodule, used for writing the Switch ID and the queue available window value into the candidate ACK message to obtain a first ACK message;

[0077] The first ACK message sending submodule is used to send the first ACK message to the sending terminal.

[0078] Optionally, the first window value calculation module includes:

[0079] A candidate window value calculation submodule, used to determine the minimum value between the receiving terminal window value and the queue available window value as a candidate window value;

[0080] A delay coefficient calculation submodule, used to calculate the delay coefficient according to the timestamp information;

[0081] The first calculation submodule is used to determine the first window value according to the delay coefficient and the candidate window value.

[0082] Optionally, the delay coefficient calculation submodule includes:

[0083] A time difference calculation unit, used to determine the time difference between the time information of receiving the first ACK message and the timestamp information;

[0084] A delay duration acquisition unit, used to acquire a delay duration, wherein the delay duration is determined according to a target delay pre-set by the switch for each flow;

[0085] The first calculation unit is configured to determine the delay coefficient according to the following formula when the time difference is greater than or equal to the delay duration:

[0086] α=1-(E2E_de lay-Target_de lay) / Target_de lay

[0087] Wherein, E2E_de l ay is the time difference, and Target_de l ay is the delay duration;

[0088] The second calculation unit is configured to determine the delay coefficient according to the following formula when the time difference is less than the delay duration:

[0089] α=1+(Target_delay-E2E_delay) / Target_delay.

[0090] Optionally, the sending terminal further includes:

[0091] A second ACK message receiving module, configured to receive a second ACK message returned by the receiving terminal through the switch;

[0092] A second window value calculation module, used to calculate a second window value according to the second ACK message;

[0093] A second sending module, used for sending a data packet to the receiving terminal according to the second window value;

[0094] The repeating module is used to repeat the above steps until the data packet is sent.

[0095] Optionally, the sending terminal includes a second ACK message acquiring module, including:

[0096] A second candidate ACK message generation submodule is used to write the current available receiving terminal window value and the current time stamp information into the second candidate ACK message every time N data packets are received;

[0097] A second candidate ACK message sending submodule, configured to send the second candidate ACK message to the switch;

[0098] A second ACK message generating submodule, configured for the switch to write the Switch ID and the available window value of the queue at the current moment into the second candidate ACK message to obtain the second ACK message;

[0099] The second ACK message sending submodule is used for the switch to send the second ACK message to the sending terminal.

[0100] Optionally, the second window value calculation module includes:

[0101] A second candidate window value calculation submodule, configured to determine the minimum value of the receiving terminal window value in the second ACK message and the queue available window value as the second candidate window value;

[0102] A second time difference calculation submodule, used to determine the time difference between the moment information of receiving the second ACK message and the timestamp information in the second ACK message;

[0103] A second delay duration acquisition submodule is used to acquire a delay duration, where the delay duration is determined according to the number of switch hops and a target delay pre-set by the sending end for each flow;

[0104] The third calculation submodule is used to determine the delay coefficient according to the following formula when the time difference is greater than or equal to the delay duration:

[0105] α=1-(E2E_de l ay-Target_de lay) / N*Target_de lay

[0106] Wherein, E2E_de l ay is the time difference, and Target_de l ay is the delay duration;

[0107] The fourth calculation submodule is used to determine the delay coefficient according to the following formula when the time difference is less than the delay duration:

[0108] α=1+(Target_de lay-E2E_de lay) / N*Target_de lay

[0109] The second window value determination submodule is used to determine the second window value according to the delay coefficient and the second candidate window value.

[0110] Optionally, the sending terminal further includes:

[0111] A detection module, used for detecting the available window value of the queue of the switch in real time;

[0112] A congestion notification message receiving module, configured to receive a congestion notification message sent by the switch when the available window value of the queue of the switch is less than a preset threshold;

[0113] The window value adjustment module is used to adjust the window value used for sending data packets according to the received congestion notification message.

[0114] Optionally, the sending terminal further includes:

[0115] A first reduction module, configured to resend the request message and reduce the carried initial window value according to a preset ratio if the first ACK message is not received within a preset time period;

[0116] The second reduction module is used to resend the request message if the second ACK message is not received within the preset time period, and reduce the initial window value carried by the request message according to a preset ratio of the window value at the last time it was sent.

[0117] A fifth aspect of this embodiment further provides a receiving terminal, the receiving terminal including:

[0118] A request message receiving module, used for receiving a request message sent by a sending terminal, wherein the request message carries an initial window value and a FlowID;

[0119] A receiving terminal window value determination module, used to determine the receiving terminal window value according to the request message, the local receiving capability and the priority of the sending terminal;

[0120] A candidate ACK message generation module, used to generate a candidate ACK message according to the receiving terminal window value and timestamp information;

[0121] A candidate ACK message sending module, used to send the candidate ACK message to the sending terminal through the switch;

[0122] The receiving module is used to receive the data packet sent by the sending terminal in the opposite direction of the sending path of the candidate ACK message.

[0123] A sixth aspect of this embodiment further provides a switch, the switch comprising:

[0124] A candidate ACK message receiving module, used for receiving a candidate ACK message sent by a receiving terminal;

[0125] A first ACK message generating module, used for writing the Switch ID and its own queue available window value into the candidate ACK message to obtain a first ACK message;

[0126] A first ACK message sending module, used for sending the first ACK message to a sending terminal;

[0127] The data packet receiving module is used to receive the data packet sent by the sending terminal;

[0128] The data packet sending module is used to send the data packet to the receiving terminal.

[0129] The seventh aspect of the embodiments of the present invention also provides an electronic device, comprising a memory, a processor and a computer program stored on the memory, wherein the processor executes the computer program to implement the steps in a data packet sending method described in the first aspect of the embodiments of the present invention, or the steps in a data packet receiving method described in the second aspect, or the steps in a message sending method described in the third aspect.

[0130] The eighth aspect of the embodiments of the present invention also provides a computer-readable storage medium having a computer program / instruction stored thereon. When the computer program / instruction is executed by a processor, the steps in a data packet sending method described in the first aspect of the embodiments of the present invention, or the steps in a data packet receiving method described in the second aspect, or the steps in a message sending method described in the third aspect are implemented.

[0131] The embodiment of the present invention provides a data packet sending method, a receiving method, a message sending method and a product. The data packet sending method is applied to a sending terminal, and includes: sending a request message to a receiving terminal; the request message carries an initial window value; receiving a first ACK message returned by the receiving terminal through a switch, the first ACK message including: a receiving terminal window value, a switch available window value, and a timestamp information of the receiving terminal; calculating a first window value according to the first ACK message; according to the first window value, sending a data packet to the receiving terminal in the opposite direction of the path of receiving the first ACK message. The present invention actively sends a request message, thereby determining a suitable first window value according to the receiving terminal window value, the switch available window value and the timestamp information in the ACK message returned by the receiving terminal, thereby sending data according to the first window value, avoiding data congestion problems, and improving the success rate of data interaction.

[0132] 1) Avoiding data congestion problems. In the embodiment of the present invention, the sending terminal actively sends a request message to the receiving terminal before sending a data packet, so that the switch can determine a suitable first window value according to the receiving terminal window value in the ACK message returned by the receiving terminal, the switch can use the window value and the timestamp information, and thus send the data packet according to the calculated first window value, so that the sending end adapts the device receiving capacity before sending the data packet, avoiding the problem of data congestion caused by the directly sent data packet being too large.

[0133] 2) Wide application. The data packet sending method proposed in the embodiment of the present invention does not require additional hardware equipment for support, and the data packet sending method proposed in the embodiment of the present invention can be implemented by information interaction between the sending terminal, the receiving terminal and the switches involved, so the method can be widely used in various network architectures and has strong applicability.

[0134] 3) Improve bandwidth utilization and short-flow performance. The embodiment of the present invention calculates the accurate window value available at the next moment based on the obtained receiving terminal window value, the switch available window value, and the timestamp information. Thus, by controlling the window value size, accurate control of the flow is achieved, rapid convergence, effective avoidance of packet loss and flow bursts, and improved bandwidth utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0135] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0136] Figure 1It is a flowchart of a method for sending a data packet provided by an embodiment of the present invention;

[0137] Figure 2 This is a schematic diagram of a network structure of a data center provided by an embodiment of the present invention;

[0138] Figure 3 It is a schematic diagram of the sending principle of a congestion notification message provided by an embodiment of the present invention;

[0139] Figure 4 is a flowchart of a method for receiving a data packet provided by an embodiment of the present invention;

[0140] Figure 5 It is a flowchart of a method for sending a message provided by an embodiment of the present invention;

[0141] Figure 6 is a schematic structural diagram of a sending terminal provided by an embodiment of the present invention;

[0142] Figure 7 is a structural schematic diagram of a receiving terminal provided by an embodiment of the present invention;

[0143] Figure 8 It is a schematic diagram of the structure of a switch provided by an embodiment of the present invention;

[0144] Fig. 9 It is a schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0145] The exemplary embodiments of the present invention will be described in more detail below in conjunction with the accompanying drawings in the embodiments of the present invention. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0146] First, relevant technical terms involved in the embodiments of the present invention are briefly explained.

[0147] The following is the specific content of the embodiments of the present invention.

[0148] The embodiment of the present invention provides a method for sending a data packet, which is applied to a sending terminal, referring to Figure 1 , Figure 1 A flow chart of the steps of a method for sending a data packet is shown, such as Figure 1 As shown, the method includes:

[0149] Step S101, sending a request message to a receiving terminal; the request message carries an initial window value.

[0150] In this embodiment, before the sending terminal sends a data packet to the receiving terminal, that is, when there is a new flow to be sent, it is necessary to first send a request message to the receiving terminal, and the request message carries an initial window value. The window value indicates the amount of data allowed to be sent. This is because the data cache space of the recipient is limited and also changes dynamically. Therefore, when the amount of data sent exceeds the data cache capacity of the recipient, problems such as packet loss and jamming are prone to occur. Therefore, it is necessary to set the window value so that the amount of data sent by the sending terminal does not exceed the window value, thereby limiting the amount of data transmitted and ensuring that the receiving terminal effectively processes the received data.

[0151] The initial window value is determined by the sending terminal according to the size of the data packet to be sent, indicating the window size required by the sending terminal to start data transmission, and the initial window needs to be set larger to improve the fast start capability of the flow. In this embodiment, the initial window value can be expressed as a number of bytes, and specifically, the initial window value can be calculated based on the required bandwidth, or set according to the QoS requirement of the flow.

[0152] Step S102: receiving a first ACK message returned by the receiving terminal through the switch, wherein the first ACK message includes: a window value of the receiving terminal, an available window value of the switch, and timestamp information of the receiving terminal.

[0153] In this embodiment, after receiving the request message, the receiving terminal returns the first ACK message to the sending terminal through the switch. Specifically, the receiving terminal determines the receiving terminal window value according to the request message, and then writes the receiving terminal window value into the first ACK message, and writes the timestamp information into the message. Then the message is sent to the switch, and the switch writes the switch available window value into the message, and sends the first ACK message to the sending terminal. Among them, the receiving terminal window value indicates the ability of the receiving terminal to cache the data sent by the sending terminal, the switch window value indicates the amount of data that the switch's cache queue can receive and process, and the timestamp information indicates the time information when the receiving terminal sends the message to the sending terminal.

[0154] Step S103: Calculate a first window value according to the first ACK message.

[0155] In this embodiment, the sending terminal calculates the first window value according to the receiving terminal window value in the first ACK message, the switch available window value, and the timestamp information of the receiving terminal. The first window value indicates a window value that can be quickly started, and is also the window value sent by the sending terminal to the data packet to the receiving terminal. Specifically, the sending terminal perceives the receiving capability of the switches along the way according to the switch available window value in the first ACK message. In the case where multiple switches need to be passed through in the transmission path between the sending terminal and the receiving terminal, there are also multiple corresponding available window values ​​of the switch; the receiving terminal window value in the message is adapted to the receiving capability of the receiving terminal, and the timestamp information is used to analyze the time taken for the first ACK message to be sent from the receiving terminal to the sending terminal through the time information of the message sent by the receiving terminal, and the network fluency is analyzed by the length of time, and then the information is used to assist in calculating the first window value, so as to achieve accurate control of traffic, fast convergence, effectively avoid packet loss and traffic bursts, and improve bandwidth utilization.

[0156] Step S104: Send a data packet to the receiving terminal according to the first window value and in a direction opposite to the path for receiving the first ACK message.

[0157] After calculating the first window value, a data packet is sent to the receiving terminal according to the size of the window value. Specifically, the size of the data packet sent by the sending terminal cannot exceed the first window value, and the path for the sending terminal to send the data packet needs to be sent in the opposite direction of the receiving path of the first ACK message. Generally speaking, data needs to be transmitted between the sending terminal and the receiving terminal through one or more switches. Exemplarily, the receiving terminal sends the first ACK message to switch 3, and then switch 3 sends the first ACK message to switch 2, and then switch 2 sends the first ACK message to switch 1, and finally switch 1 sends the first ACK message to the sending terminal. Correspondingly, when the sending terminal sends a data packet to the receiving terminal according to the first window value, it needs to be sent in the opposite direction of the path, that is, the sending terminal needs to first send the data packet to switch 1, and switch 1 sends the data packet to switch 2, and then switch 2 sends the data packet to switch 3, and finally switch 3 sends the data packet to the receiving terminal. That is, the five-tuple information of the sending traffic and the ACK message (if the traffic is RoCEv2 traffic, it is a four-tuple) is the same, which can be guaranteed by ECMP technology.

[0158] The data packet sending method proposed in this embodiment can be applied to a data center network based on RoCEv2. Figure 2 , Figure 2 A schematic diagram of a data center network structure is shown. Figure 2As shown in the figure, the bottom layer is the terminal, which includes the sending terminal and the receiving terminal, the second layer is the leaf switch layer, and the top layer is the spike switch layer. Therefore, in the data center network based on the RoCEv2 protocol, the sending end and the receiving end realize data interaction through the leaf switch and the spike switch. Figure 2 The dotted line in exemplifies an interaction path between a sending end and a receiving end.

[0159] Therefore, this embodiment sends a request message to the receiving terminal; the request message carries an initial window value; receives the first ACK message returned by the receiving terminal through the switch, the first ACK message includes: the receiving terminal window value, the switch available window value, and the timestamp information of the receiving terminal; according to the first ACK message, the first window value is calculated; according to the first window value, a data packet is sent to the receiving terminal in the opposite direction of the path of receiving the first ACK message. The present invention actively sends a request message, thereby determining a suitable first window value according to the receiving terminal window value in the ACK message returned by the receiving terminal, the switch available window value and the timestamp information, thereby sending data according to the first window value, avoiding data congestion problems and improving the success rate of data interaction.

[0160] In one embodiment, the first ACK message is determined by the following steps:

[0161] The receiving terminal determines the receiving terminal window value according to the initial window value, the local receiving capability and the priority of the sending terminal;

[0162] Generate a candidate ACK message using the receiving terminal window value and timestamp information, and send it to the switch;

[0163] The switch writes the switch ID and the queue available window value into the candidate ACK message to obtain a first ACK message;

[0164] The switch sends the first ACK message to the sending terminal.

[0165] In this embodiment, after receiving the request message, the receiving terminal determines the receiving terminal window value according to the initial window value carried therein, its own local receiving capability and the priority of the sending terminal. Specifically, the receiving terminal first determines its own local receiving capability, which indicates the amount of data that the receiving terminal can receive and process, or the size of the cache capability at the current moment. Since the receiving terminal will receive data from multiple terminals at the same time, it is not possible to directly allocate all the local receiving capabilities to the sending terminal. At this time, it is necessary to consider the priority of the sending terminal, that is, the priority of the sending terminal in the receiving terminal. The receiving terminal preferentially allocates a larger part of the local receiving capability to the terminal with a higher priority. Therefore, if the priority of the sending terminal is higher, the receiving terminal allocates a larger cred it value to the requesting sending terminal according to the initial window value and the local receiving capability as the receiving terminal window value; if the priority of the sending terminal is lower, the receiving terminal allocates a smaller cred it value to the requesting sending terminal according to the initial window value and the local receiving capability as the receiving terminal window value. The receiving terminal window value indicates the amount of data that can be received and processed and allocated to the sending terminal.

[0166] After determining the receiving terminal window value, the receiving terminal also needs to generate timestamp information, which is used to indicate the current specific time information, and then write the receiving terminal window value and timestamp information into the response ACK message to obtain a candidate ACK message. Then the message is sent to the switch, and the switch sends it to the sending terminal.

[0167] In this embodiment, when the switch sends the message to the sending terminal, each time it passes through a hop switch, the switch writes its own Switch ID (which can be the last 12 bits of the IP address) and the queue available window value into the candidate ACK message. The queue available window value represents the ability of the switch to cache data and transmit data. At the same time, there is an nHop value in the message, which is used to identify the number of hops forwarded by the ACK message. It is increased by one every time it passes through a hop switch and is written into the above ACK message in the order of switch forwarding, thereby obtaining the first ACK message. Therefore, after receiving the first ACK message, the sending terminal can determine the transmission path of the first ACK message based on the recorded Switch ID and nHop value of each switch, as well as the switch forwarding order, so that the subsequent data packets can be sent to the receiving terminal according to the path.

[0168] In one embodiment, calculating a first window value according to the first ACK message includes:

[0169] Determine the minimum value between the receiving terminal window value and the queue available window value as a candidate window value;

[0170] Calculate the delay coefficient according to the timestamp information;

[0171] The first window value is determined according to the delay coefficient and the candidate window value.

[0172] In this embodiment, the first window value is calculated based on the receiving terminal window value in the first ACK message, the queue available window value of each switch, and the timestamp information. First, the minimum value is determined from the receiving terminal window value and the queue available window value. When there are multiple switches, the minimum value is also selected from the queue available window value and the receiving terminal window value corresponding to each switch. This minimum value is the bottleneck point of the transmission link as a candidate window value. It means that if the data packet needs to be transmitted to the receiving terminal through this link, it cannot exceed the size of the candidate window value. Then, this embodiment determines the smoothness of the current network link based on the timestamp information, calculates the end-to-end delay, and estimates the queuing delay of the next cycle, thereby generating a delay coefficient, and dynamically adjusts the window size using the delay coefficient to obtain the first window value. Specifically, the candidate window value can be directly multiplied by the delay coefficient to obtain the first window value. Therefore, this embodiment dynamically adjusts the window value according to the window value of the receiving terminal obtained from the first ACK message, the available window value of the queue of each switch, and the timestamp information. Based on the credit request pre-fetch mechanism, before the traffic is sent, the receiving terminal is requested to allocate the corresponding window value, and the receiving capacity of the switches along the way is sensed. According to the timestamp information, the size of the window value used to send the data packet is set to improve the rapid startup capability of the traffic, improve the bandwidth utilization while ensuring no packet loss, and reduce the short flow completion time to ensure short flow performance.

[0173] In one embodiment, calculating the delay coefficient according to the timestamp information includes:

[0174] Determine a time difference between the time information of receiving the first ACK message and the timestamp information;

[0175] Obtaining a delay duration, where the delay duration is determined based on the number of switch hops and a target delay pre-set by the sender for each flow;

[0176] When the time difference is greater than or equal to the delay duration, the delay coefficient is determined according to the following formula:

[0177] α=1-(E2E_de lay-Target_de lay) / Target_de lay

[0178] Wherein, α represents the delay coefficient, E2E_de l ay is the time difference, and Target_de l ay is the delay duration;

[0179] When the time difference is less than the delay duration, the delay coefficient is determined according to the following formula:

[0180] α=1+(Target_delay-E2E_delay) / Target_delay.

[0181] In this embodiment, it is first necessary to calculate the time difference of the first ACK message from the receiving terminal to the sending terminal. According to the end-to-end message transmission time, the data transmission efficiency at the current moment can be analyzed. Specifically, assuming that the timestamp of the first ACK message received by the sending terminal is TS2, and the timestamp information of the receiving terminal in the first ACK message is TS1, then using TS2-TS1, the time difference E2E_de l ay is obtained, and the queuing delay and link delay of the ACK message are obtained by this value. Then, the delay duration is obtained, and the delay duration is determined according to the number of switch hops and the target delay pre-set by the sending end for each flow. Since the receiving terminal needs to pass through one or more switches to send the ACK message to the sending terminal, each time it passes through a switch, the switch will write the corresponding ID information and queue available window value and other information in the ACK message. The above operations will extend the time for the ACK message to reach the sending terminal, so the sending end will set the target delay for each flow in advance. Specifically, a fixed target delay is set for each flow, and the number of switch hops is determined by the nHop value in the first ACK message, so that the delay duration is determined according to the number of switch hops and the target delay. For example, suppose the target delay duration set by the sending terminal for the flow is 2s. According to the nHop value in the first ACK message, it can be known that three switches have passed between the sending terminal and the receiving terminal, so the product of the number of hops and the target delay is used to obtain a delay duration of 6s. Finally, the delay coefficient α is calculated according to the corresponding formula. Therefore, this embodiment can determine the delay information between the receiving terminal and the sending terminal based on the timestamp information, estimate the queuing delay of the next cycle, and obtain the delay coefficient, so as to dynamically adjust the size of the sending window according to the delay coefficient, so as to achieve elastic scaling according to the network scale and queuing delay, adapt to the dynamic changes of network scale and traffic, and improve bandwidth utilization.

[0182] In one embodiment, the method further comprises:

[0183] receiving a second ACK message returned by the receiving terminal through the switch;

[0184] Calculate a second window value according to the second ACK message;

[0185] sending a data packet to the receiving terminal according to the second window value;

[0186] Repeat the above steps until the data packet is sent.

[0187] In this embodiment, when there are many data packets to be sent for the traffic flow, and the first window value is small, so that the data packets cannot be sent all at once, it is necessary to recalculate the window value for sending the data packets next time, so as to continue to send the data packets according to the recalculated second window value. The receiving end can return an ACK message for each data packet received, or it can merge and confirm the receipt of n data packets and reply to an ACK message. This method can be set in the data packet by the sending end. Specifically, after receiving the data packet, the receiving terminal actively returns an ACK message to the sending terminal, and carries the available Credit value (receiving terminal window value) and timestamp information allocated for the traffic flow in the returned ACK message. The sending terminal calculates the window value required for the next cycle, that is, the second window value, according to the message, and then continues to send the data packet to the receiving terminal according to the window value. If the sending is still not completed this time, the above operation is repeated, and the receiving terminal continues to return the ACK message, and the sending terminal calculates the window value required for the next cycle, so as to send the data packet according to the window value until the data packet of the traffic flow is sent.

[0188] In one embodiment, the second ACK message is obtained by the following steps:

[0189] The receiving terminal writes the available receiving terminal window value and the timestamp information of the current moment into the second candidate ACK message every time N data packets are received;

[0190] Sending the second candidate ACK message to the switch;

[0191] The switch writes the Switch ID and the available window value of the queue at the current moment into the second candidate ACK message to obtain the second ACK message;

[0192] The switch sends the second ACK message to the sending terminal.

[0193] In this embodiment, it can be pre-set that each time the receiving terminal receives a data packet, it returns an ACK message to the sending terminal, or it can be set that each time the receiving terminal receives N data packets, it returns an ACK message to the sending terminal. When returning the ACK message, the receiving terminal needs to determine the second candidate window value, which indicates the cred it value that can be allocated to the sending terminal in the next cycle, that is, the window value of the receiving terminal available at the current moment. Similar to the method of sending the first ACK message, the receiving terminal writes the receiving terminal window value and timestamp information into the second candidate ACK message and sends it to the switch. Each hop switch writes the Switch ID and queue available window value corresponding to the switch in the ACK message. The queue available window value indicates the amount of data that the switch can cache and process at the current moment, which can be expressed by the cred it value. The switch sends the generated second ACK message to the sending terminal. Therefore, this embodiment sets the sending window based on the allocated receiving terminal window value of the receiving end and the perception of the available credit of the switches along the way, so that the sending end adapts the receiving capability of the device (receiving terminal and switch) before sending the data packet, realizes precise control of the flow, fast convergence, effectively avoids packet loss and traffic bursts, and improves bandwidth utilization; at the same time, the ACK message of the previous cycle carries the available window value of the next cycle, which can effectively reduce the transmission cost.

[0194] In one embodiment, calculating the second window value according to the second ACK message includes:

[0195] Determine the minimum value of the receiving terminal window value in the second ACK message and the queue available window value as the second candidate window value;

[0196] Determine a time difference between the time information of receiving the second ACK message and the timestamp information in the second ACK message;

[0197] Obtaining a delay duration, where the delay duration is determined based on the number of switch hops and a target delay pre-set by the sender for each flow;

[0198] When the time difference is greater than or equal to the delay duration, the delay coefficient is determined according to the following formula:

[0199] α=1-(E2E_de l ay-Target_de lay) / N*Target_de lay

[0200] Wherein, E2E_de la ay is the time difference, Target_de la ay is the delay duration; N means that an ACK message is returned every time N data packets are received.

[0201] When the time difference is less than the delay duration, the delay coefficient is determined according to the following formula:

[0202] α=1+(Target_de lay-E2E_de lay) / N*Target_de lay

[0203] The second window value is determined according to the delay coefficient and the second candidate window value.

[0204] In this embodiment, in the process of calculating the delay coefficient according to the timestamp information in the second ACK message, the calculation method of the time difference remains unchanged, and the time from the receiving end to the sending end of the ACK message is still calculated. When calculating the delay duration, the number of switch hops is still determined by the nHop value in the second ACK message, and the delay duration is determined according to the number of switch hops and the target delay. When calculating the delay coefficient according to the formula, it should be noted that the calculation of the delay coefficient is related to the frequency of ACK replies. Therefore, this embodiment calculates the end-to-end delay information through the timestamp information in the second ACK message, estimates the queuing delay of the next cycle, and obtains the delay coefficient, thereby dynamically adjusting the sending window size according to the delay coefficient, realizing elastic scaling according to the network scale and queuing delay, adapting to the dynamic changes of network scale and traffic, and improving bandwidth utilization.

[0205] In one embodiment, the method further comprises:

[0206] Detecting the available window value of the queue of the switch in real time;

[0207] When the available window value of the queue of the switch is less than a preset threshold, receiving a congestion notification message sent by the switch;

[0208] According to the received congestion notification message, a window value used for sending data packets is adjusted.

[0209] In this embodiment, in order to prevent Incast traffic or burst traffic in the switch, a switch active congestion notification mechanism (Congestion Notification Packet, CNP) is proposed. Specifically, the available window value of the queue of the switch is detected in real time, that is, the available Cred it of the switch is detected. The available window value of the queue indicates the ability of the switch to cache or process data at the current moment. Figure 3 , Figure 3 A schematic diagram of the sending principle of a congestion notification message is shown in FIG. Figure 3 As shown in Figure 1, when the value is less than the preset threshold, the switch can actively send a congestion notification message to the sender of all traffic passing through the node. Figure 3In the figure, CNP represents the congestion notification message sent by the switch, the dotted line represents the sending direction of the congestion notification message, and the arrow represents the destination terminal of the congestion notification message. The congestion notification message carries information such as the switch ID and the queue available window value. After receiving the congestion notification message, the sending terminal immediately adjusts the sending window according to the queue available window value carried in the message to achieve emergency speed reduction. In addition, the switch needs to construct and maintain the flow table to maintain the status information of each flow. In addition, the congestion notification message sent by the switch is set with a higher priority, so that the sending terminal processes the message first according to the priority after receiving the message, thereby immediately reducing the speed according to the queue available window value in the message. According to the above-mentioned active congestion notification mechanism of the switch, this embodiment can effectively cope with traffic burst scenarios, and notify the sending end to reduce the speed in time before traffic congestion occurs, so as to avoid packet loss caused by traffic overflow.

[0210] In one embodiment, the method further comprises:

[0211] If the first ACK message is not received within a preset time period, resend the request message and reduce the carried initial window value according to a preset ratio;

[0212] If the second ACK message is not received within the preset time period, the request message is resent, and the initial window value carried in the request message is reduced according to a preset ratio of the window value at the last time it was sent.

[0213] In this embodiment, in order to solve the problem of data transmission blocking caused by ACK message loss, this embodiment also proposes a packet loss detection strategy based on a timer, by setting a timer at the sending terminal, using the timer to detect whether the corresponding ACK message is received within the preset time length after the data packet is sent. Specifically, after the request message is sent, it is detected whether the first ACK message is received within the preset time length. If the first ACK message is lost due to timeout, the initial window value is reduced according to the preset ratio, for example, reduced by half, and the request message is resent. If in the process of data packet sending, after the data packet is sent, it is detected that the second ACK message is not received within the preset time length, then the Cred it request message is resent, and the initial window value in the request message is reduced according to the preset ratio of the window value at the last time of sending, exemplarily, carrying half of the window value calculated in the previous cycle. The preset ratio can be adjusted according to the actual application situation. In this embodiment, the preset ratio is not limited. Therefore, this embodiment detects whether the ACK message is lost due to timeout by the timer, resends the request message, and adjusts the window size in time, thereby solving the data congestion problem caused by the loss of the ACK message.

[0214] This embodiment provides a data packet receiving method, which is applied to a receiving terminal. Figure 4 , Figure 4 A flow chart of the steps of a method for receiving a data packet is shown, such as Figure 4 As shown, the method includes:

[0215] Step S201, receiving a request message sent by a sending terminal, wherein the request message carries an initial window value;

[0216] Step S202, determining the receiving terminal window value according to the request message, the local receiving capability and the priority of the sending terminal;

[0217] Step S203, generating a candidate ACK message according to the receiving terminal window value and timestamp information;

[0218] Step S204, sending the candidate ACK message to the sending terminal through the switch;

[0219] Step S205: receiving a data packet sent by the sending terminal in a direction opposite to the sending path of the candidate ACK message.

[0220] This embodiment provides a message sending method, which is applied to a switch. Figure 5 , Figure 5 A flowchart of a method for sending a message is shown. Figure 5 As shown, the method includes:

[0221] Step S301, receiving a candidate ACK message sent by a receiving terminal;

[0222] Step S302, write the Switch ID and its own queue available window value into the candidate ACK message to obtain a first ACK message;

[0223] Step S303, sending the first ACK message to the sending terminal;

[0224] Step S304: receiving a data packet sent by the sending terminal, and sending the data packet to the receiving terminal.

[0225] In one embodiment, the method further comprises:

[0226] Detecting the available window value of the queue of the switch in real time;

[0227] When the available window value of the queue of the switch is less than a preset threshold, a congestion notification message is sent to the sending terminal.

[0228] This embodiment provides a sending terminal, referring to Figure 6 , Figure 6 A schematic diagram of the structure of a sending terminal is shown. Figure 6 As shown, the sending terminal includes:

[0229] A sending module, used for sending a request message to a receiving terminal; the request message carries an initial window value and a FloWID;

[0230] A first ACK message receiving module, configured to receive a first ACK message returned by the receiving terminal through the switch, wherein the first ACK message includes: a window value of the receiving terminal, an available window value of the switch, and timestamp information of the receiving terminal;

[0231] A first window value calculation module, used to calculate a first window value according to the first ACK message;

[0232] The first sending module is used to send a data packet to the receiving terminal according to the first window value and in a direction opposite to the path of receiving the first ACK message.

[0233] In one embodiment, the sending terminal includes a first ACK message determining module:

[0234] A receiving terminal window value determination submodule, configured to determine the receiving terminal window value according to the initial window value, the local receiving capability and the priority of the sending terminal;

[0235] A candidate ACK message generation submodule, used to generate a candidate ACK message using the receiving terminal window value and timestamp information, and send it to the switch;

[0236] A first ACK message generation submodule, used for writing the Switch ID and the queue available window value into the candidate ACK message to obtain a first ACK message;

[0237] The first ACK message sending submodule is used to send the first ACK message to the sending terminal.

[0238] In one embodiment, the first window value calculation module includes:

[0239] A candidate window value calculation submodule, used to determine the minimum value between the receiving terminal window value and the queue available window value as a candidate window value;

[0240] A delay coefficient calculation submodule, used to calculate the delay coefficient according to the timestamp information;

[0241] The first calculation submodule is used to determine the first window value according to the delay coefficient and the candidate window value.

[0242] In one embodiment, the delay coefficient calculation submodule includes:

[0243] A time difference calculation unit, used to determine the time difference between the time information of receiving the first ACK message and the timestamp information;

[0244] A delay time acquisition unit, used to acquire a delay time, wherein the delay time is determined according to the number of switch hops and a target delay pre-set by the sending end for each flow;

[0245] The first calculation unit is configured to determine the delay coefficient according to the following formula when the time difference is greater than or equal to the delay duration:

[0246] α=1-(E2E_de lay-Target_de lay) / Target_de lay

[0247] Wherein, E2E_de l ay is the time difference, and Target_de l ay is the delay duration;

[0248] The second calculation unit is configured to determine the delay coefficient according to the following formula when the time difference is less than the delay duration:

[0249] α=1+(Target_delay-E2E_delay) / Target_delay.

[0250] In one embodiment, the sending terminal further includes:

[0251] A second ACK message receiving module, configured to receive a second ACK message returned by the receiving terminal through the switch;

[0252] A second window value calculation module, used to calculate a second window value according to the second ACK message;

[0253] A second sending module, used for sending a data packet to the receiving terminal according to the second window value;

[0254] The repeating module is used to repeat the above steps until the data packet is sent.

[0255] In one embodiment, the sending terminal includes a second ACK message acquisition module, including:

[0256] A second candidate ACK message generation submodule is used to write the current available receiving terminal window value and the current time stamp information into the second candidate ACK message every time N data packets are received;

[0257] A second candidate ACK message sending submodule, configured to send the second candidate ACK message to the switch;

[0258] A second ACK message generating submodule, configured for the switch to write the Switch ID and the available window value of the queue at the current moment into the second candidate ACK message to obtain the second ACK message;

[0259] The second ACK message sending submodule is used for the switch to send the second ACK message to the sending terminal.

[0260] In one embodiment, the second window value calculation module includes:

[0261] A second candidate window value calculation submodule, configured to determine the minimum value of the receiving terminal window value in the second ACK message and the queue available window value as the second candidate window value;

[0262] A second time difference calculation submodule, used to determine the time difference between the moment information of receiving the second ACK message and the timestamp information in the second ACK message;

[0263] A second delay duration acquisition submodule is used to acquire a delay duration, where the delay duration is determined according to the number of switch hops and a target delay pre-set by the sending end for each flow;

[0264] The third calculation submodule is used to determine the delay coefficient according to the following formula when the time difference is greater than or equal to the delay duration:

[0265] α=1-(E2E_de l ay-Target_de lay) / N*Target_de lay

[0266] Wherein, E2E_de l ay is the time difference, and Target_de l ay is the delay duration;

[0267] The fourth calculation submodule is used to determine the delay coefficient according to the following formula when the time difference is less than the delay duration:

[0268] α=1+(Target_de lay-E2E_de lay) / N*Target_de lay

[0269] The second window value determination submodule is used to determine the second window value according to the delay coefficient and the second candidate window value.

[0270] In one embodiment, the sending terminal further includes:

[0271] A detection module, used for detecting the available window value of the queue of the switch in real time;

[0272] A congestion notification message receiving module, configured to receive a congestion notification message sent by the switch when the available window value of the queue of the switch is less than a preset threshold;

[0273] The window value adjustment module is used to adjust the window value used for sending data packets according to the received congestion notification message.

[0274] In one embodiment, the sending terminal further includes:

[0275] A first reduction module, configured to resend the request message and reduce the carried initial window value according to a preset ratio if the first ACK message is not received within a preset time period;

[0276] The second reduction module is used to resend the request message if the second ACK message is not received within the preset time period, and reduce the initial window value carried by the request message according to a preset ratio of the window value at the last time it was sent.

[0277] This embodiment also provides a receiving terminal, referring to Figure 7 , Figure 7 A schematic diagram of the structure of a receiving terminal is shown. Figure 7 As shown, the receiving terminal includes:

[0278] A request message receiving module, used for receiving a request message sent by a sending terminal, wherein the request message carries an initial window value and a FlowID;

[0279] A receiving terminal window value determination module, used to determine the receiving terminal window value according to the request message, the local receiving capability and the priority of the sending terminal;

[0280] A candidate ACK message generation module, used to generate a candidate ACK message according to the receiving terminal window value and timestamp information;

[0281] A candidate ACK message sending module, used to send the candidate ACK message to the sending terminal through the switch;

[0282] The receiving module is used to receive the data packet sent by the sending terminal in the opposite direction of the sending path of the candidate ACK message.

[0283] This embodiment also provides a switch, referring to Figure 8 , Figure 8 A schematic diagram of the structure of a switch is shown. Figure 8 As shown, the switch includes:

[0284] A candidate ACK message receiving module, used for receiving a candidate ACK message sent by a receiving terminal;

[0285] A first ACK message generating module, used for writing the Switch ID and its own queue available window value into the candidate ACK message to obtain a first ACK message;

[0286] A first ACK message sending module, used for sending the first ACK message to a sending terminal;

[0287] A data packet receiving module, used for receiving data packets sent by the sending terminal;

[0288] The data packet sending module is used to send the data packet to the receiving terminal.

[0289] In one embodiment, the switch further includes:

[0290] A second candidate ACK message receiving module, used for receiving a second candidate ACK message sent by a receiving terminal;

[0291] A second ACK message generating module, used for writing the Switch ID and the queue available window value at the current moment into the second candidate ACK message to obtain the second ACK message;

[0292] The second ACK message sending module is used to send the second ACK message to the sending terminal.

[0293] The embodiment of the present invention further provides an electronic device, referring to Fig. 9 , Fig. 9 FIG. 1 is a schematic diagram of an electronic device proposed in an embodiment of the present application. Fig. 9 As shown, the electronic device 100 includes: a memory 110 and a processor 120, the memory 110 and the processor 120 are connected via a bus communication, the memory 110 stores a computer program, and the computer program can be run on the processor 120 to implement the steps in a data packet sending method, or the steps in a data packet receiving method, or the steps in a message sending method disclosed in an embodiment of the present invention.

[0294] An embodiment of the present application also provides a computer-readable storage medium having a computer program / instruction stored thereon. When the computer program / instruction is executed by a processor, the computer program / instruction implements the steps in a data packet sending method, or the steps in a data packet receiving method, or the steps in a message sending method as disclosed in an embodiment of the present invention.

[0295] An embodiment of the present invention also provides a computer program product. When the computer program product is run on an electronic device, the processor is enabled to implement the steps of a data packet sending method, a data packet receiving method, or a message sending method disclosed in an embodiment of the present invention.

[0296] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0297] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, apparatuses, electronic devices, and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0298] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0299] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable terminal device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0300] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0301] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0302] The above is a detailed introduction to a data packet sending method, a receiving method, a message sending method and a product provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for a general technician in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for sending a data packet, characterized in that: Applied to a sending terminal, the method includes: Sending a request message to a receiving terminal; the request message carries an initial window value; receiving a first ACK message returned by the receiving terminal through the switch, wherein the first ACK message includes: a window value of the receiving terminal, an available window value of the switch, and timestamp information of the receiving terminal; Calculate a first window value according to the first ACK message; sending a data packet to the receiving terminal according to the first window value in a direction opposite to the path of receiving the first ACK message; The first ACK message is determined by the following steps: The receiving terminal determines the receiving terminal window value according to the initial window value, the local receiving capability and the priority of the sending terminal; Generate a candidate ACK message using the receiving terminal window value and timestamp information, and send it to the switch; The switch writes the SwitchID and the queue available window value into the candidate ACK message to obtain a first ACK message; The switch sends the first ACK message to the sending terminal; Calculating a first window value according to the first ACK message includes: Determine the minimum value between the receiving terminal window value and the queue available window value as a candidate window value; Calculate the delay coefficient according to the timestamp information; Determining the first window value according to the delay coefficient and the candidate window value; The delay coefficient is calculated according to the timestamp information, including: Determine a time difference between the time information of receiving the first ACK message and the timestamp information; Obtaining a delay duration, where the delay duration is determined based on the number of switch hops and a target delay pre-set by the sender for each flow; The delay coefficient is determined according to the following formula: α=1-(E2E_delay-Target_delay) / Target_delay; Among them, E2E_delay is the time difference, and Target_delay is the delay duration.

2. The method for sending a data packet according to claim 1, characterized in that: The method further comprises: receiving a second ACK message returned by the receiving terminal through the switch; Calculate a second window value according to the second ACK message; sending a data packet to the receiving terminal according to the second window value; Repeat the above steps until the data packet is sent.

3. The method for sending a data packet according to claim 2, characterized in that: The second ACK message is obtained through the following steps: Each time the receiving terminal receives N data packets, the receiving terminal writes the current available receiving terminal window value and the current time stamp information into the second candidate ACK message; Sending the second candidate ACK message to the switch; The switch writes the SwitchID and the available window value of the queue at the current moment into the second candidate ACK message to obtain the second ACK message; The switch sends the second ACK message to the sending terminal.

4. The method for sending a data packet according to claim 3, characterized in that: Calculating a second window value according to the second ACK message includes: Determine the minimum value of the receiving terminal window value in the second ACK message and the queue available window value as the second candidate window value; Determine a time difference between the time information of receiving the second ACK message and the timestamp information in the second ACK message; Obtaining the delay duration; Determine the delay factor according to the following formula: α=1-(E2E_delay-Target_delay) / N*Target_delay; Wherein, E2E_delay is the time difference, and Target_delay is the delay duration; The second window value is determined according to the delay coefficient and the second candidate window value.

5. The method for sending a data packet according to claim 1, characterized in that: The method further comprises: Detecting the available window value of the queue of the switch in real time; When the available window value of the queue of the switch is less than a preset threshold, receiving a congestion notification message sent by the switch; According to the received congestion notification message, a window value used for sending data packets is adjusted.

6. The method for sending a data packet according to claim 2, characterized in that: The method further comprises: If the first ACK message is not received within a preset time period, resend the request message and reduce the carried initial window value according to a preset ratio; If the second ACK message is not received within the preset time period, the request message is resent, and the initial window value carried in the request message is reduced according to a preset ratio of the window value at the last time it was sent.

7. A sending terminal, characterized in that: The method for sending a data packet according to any one of claims 1 to 6, wherein the sending terminal comprises: A sending module, used for sending a request message to a receiving terminal; the request message carries an initial window value and a FlowID; A first ACK message receiving module, configured to receive a first ACK message returned by the receiving terminal through the switch, wherein the first ACK message includes: a window value of the receiving terminal, an available window value of the switch, and timestamp information of the receiving terminal; A first window value calculation module, used to calculate a first window value according to the first ACK message; The first sending module is used to send a data packet to the receiving terminal according to the first window value and in a direction opposite to the path of receiving the first ACK message.

8. A receiving terminal, characterized in that: The method for sending a data packet according to any one of claims 1 to 6, wherein the receiving terminal comprises: A request message receiving module, used to receive a request message sent by a sending terminal, wherein the request message carries an initial window value and a FlowID; A receiving terminal window value determination module, used to determine the receiving terminal window value according to the request message, the local receiving capability and the priority of the sending terminal; A candidate ACK message generation module, used to generate a candidate ACK message according to the receiving terminal window value and timestamp information; A candidate ACK message sending module, used to send the candidate ACK message to the sending terminal through the switch; The receiving module is used to receive the data packet sent by the sending terminal in the opposite direction of the sending path of the candidate ACK message.

9. A switch, characterized in that: The method for sending a data packet according to any one of claims 1 to 6, wherein the switch comprises: A candidate ACK message receiving module, used for receiving a candidate ACK message sent by a receiving terminal; A first ACK message generating module, used for writing the SwitchID and its own queue available window value into the candidate ACK message to obtain a first ACK message; A first ACK message sending module, used for sending the first ACK message to a sending terminal; The data packet receiving module is used to receive the data packet sent by the sending terminal; The data packet sending module is used to send the data packet to the receiving terminal.