TCP sending rate adjusting method and communication device

During the TCP data transmission process, the relay device measures and carries the available bandwidth of the sending end, allowing the sending end to dynamically adjust the transmission rate, solving the problem that the existing TCP technology cannot dynamically adjust the transmission rate, and improving network resource utilization and data transmission efficiency.

CN119544828APending Publication Date: 2025-02-28HUAWEI TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311099356.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-29
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The existing TCP technology cannot dynamically adjust the transmission rate during data transmission, resulting in low network resource utilization and low data transmission efficiency.

Method used

During the TCP data transmission process, the relay device measures the available bandwidth of the sending end and carries this information in the TCP acknowledgement message, allowing the sending end to adjust the transmission rate according to the real-time bandwidth.

Benefits of technology

It realizes dynamic adjustment of the transmission rate during TCP data transmission, improving the utilization rate of network resources and the efficiency of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544828A_ABST
    Figure CN119544828A_ABST
Patent Text Reader

Abstract

The invention provides a TCP sending rate adjusting method and a communication device, which are applied to the technical field of networks. In the method, a first device forwards a first TCP message from a third device to a second device, and receives a second TCP message corresponding to the first TCP message from the second device. And the first equipment modifies the value of the ECE field of the second TCP message into a first numerical value, modifies the value of the window size field of the second TCP message according to the first available bandwidth, and forwards the second TCP message to the third equipment. Wherein the first available bandwidth is the available bandwidth, measured by the first device, of the third device for sending data to the second device, and the value of the window size field of the modified second TCP message is obtained through conversion according to the first available bandwidth. Based on the method, the relay device can carry the current available bandwidth of the TCP sending end measured by the relay device in the acknowledgement message of the TCP message sent by the TCP sending end, so that the TCP sending end can adjust the sending rate according to the available bandwidth.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network technology, and in particular to a transmission control protocol (TCP) sending rate adjustment method and a communication device. Background Art

[0002] In the field of TCP technology, the Internet Engineering Task Force (IETF)'s request for comments (RFC) 4782 defines a TCP quick start technology that is designed to allow a connection to use a higher sending rate when there is a large amount of unused bandwidth on the path and the sender and all routers on the path approve the quick start request.

[0003] In this scheme, the sender can add a bandwidth request in the request message sent during the handshake phase, and the intermediate device can approve the available bandwidth in the request message. After the receiver receives the request message carrying the available bandwidth, it will return the available bandwidth to the sender in the response message. Therefore, after receiving the response message, the sender can determine the sending rate based on the available bandwidth carried in the response message.

[0004] However, this solution is only used in the TCP startup process and cannot set the sending rate during TCP data transmission, so the scenario is relatively limited. Summary of the invention

[0005] The present application provides a TCP sending rate adjustment method and a communication device, which are used to adjust the sending rate according to the available bandwidth of the sending end to send data during TCP data transmission, thereby improving network utilization and improving data transmission efficiency.

[0006] In a first aspect, a TCP sending rate adjustment method is provided, which can be executed by a first device, or by a component of the first device, such as a processor, a chip, or a chip system of the first device, or by a logic module or software that can realize all or part of the functions of the first device. The method may include: the first device sends a first TCP message from a third device to a second device, and the first TCP message is a TCP data message. The second device establishes a TCP connection with the third device, and the first device is a relay device between the second device and the third device. The first device receives a second TCP message from the second device, and the second TCP message is a confirmation message of the first TCP message. The first device modifies the value of the ECE field of the second TCP message to a first value, and modifies the value of the window size field of the second TCP message according to the first available bandwidth. The first available bandwidth is the available bandwidth for the third device to send data to the second device, measured when the first device receives the second TCP message. The value of the window size field of the modified second TCP message has a first operational relationship with the first available bandwidth, and the first operational relationship is preconfigured in the first device. The modified ECE field of the second TCP message is used to indicate that the value of the window size field of the modified second TCP message is converted according to the first available bandwidth. The first device sends the modified second TCP message to the third device.

[0007] Based on this method, the relay device can carry the current available bandwidth of the TCP sender measured by the relay device in the TCP data message confirmation message sent by the TCP sender, so that the TCP sender can learn the available bandwidth through the TCP data message confirmation message. It should be understood that the above-mentioned first TCP message can be a TCP message sent by the TCP sender at any time during the data transmission process. Therefore, the TCP sender can timely learn the changes in the available bandwidth in the network during the transmission of the TCP data message. Based on this, the TCP sender device can adjust the sending rate in time according to the bandwidth during the transmission process, which can improve the utilization rate of the network and improve the TCP data transmission performance.

[0008] In combination with the first aspect above, as a possible implementation manner, the first operation relationship is: the value of the window size field of the modified second TCP message = the first available bandwidth × the first parameter, and the first parameter is preconfigured in the first device.

[0009] In combination with the first aspect, as a possible implementation, the second device is a TCP client, and the third device is a TCP server. Alternatively, the second device is a TCP server, and the third device is a TCP client.

[0010] In combination with the above-mentioned first aspect, as a possible implementation method, before the first device modifies the value of the ECE field of the second TCP message to the first value, and modifies the value of the window size field of the second TCP message according to the first available bandwidth, the method also includes: the first device determines that the third device enables TCP rate adjustment technology.

[0011] In combination with the first aspect above, as a possible implementation manner, the first device determines that the third device enables the TCP rate adjustment technology, including: the first device determines that the third device enables the TCP rate adjustment technology according to preconfigured information.

[0012] In combination with the first aspect, as a possible implementation, when the second device is a TCP server and the third device is a TCP client, the first device determines that the third device enables the TCP rate adjustment technology, including: the first device receives a third TCP message from the third device, the third TCP message is a first handshake message for establishing a TCP connection, and the third TCP message includes a first identifier. The first device determines that the third device enables the TCP rate adjustment technology according to the first identifier.

[0013] In combination with the above-mentioned first aspect, as a possible implementation method, the method also includes: the first device sends a third TCP message to the second device. The first device receives a fourth TCP message from the second device, and the fourth TCP message is a second handshake message for establishing a TCP connection. The first device sets the value of the ECE field of the fourth TCP message to the first value, and modifies the value of the window size field of the fourth TCP message according to the second available bandwidth. Among them, the second available bandwidth is the available bandwidth for the third device to send data to the second device, which is measured when the first device receives the fourth TCP message. The value of the window size field of the modified fourth TCP message has a first operational relationship with the second available bandwidth, and the ECE field of the modified fourth TCP message is used to indicate that the value of the window size field of the modified fourth TCP message is obtained by converting according to the second available bandwidth. The first device sends a modified fourth TCP message to the third device, and the modified fourth TCP message indicates that the first device enables the TCP rate adjustment technology.

[0014] In combination with the first aspect, as a possible implementation, when the second device is a TC client and the third device is a TCP server, the first device determines that the third device enables the TCP rate adjustment technology, including: the first device receives a fifth TCP message from the third device, the fifth TCP message is a second handshake message for establishing a TCP connection, and the fifth TCP message includes a first identifier. The first device determines that the third device enables the TCP rate adjustment technology according to the first identifier in the fifth TCP message.

[0015] In combination with the above-mentioned first aspect, as a possible implementation method, the method also includes: the first device sends a fifth TCP message to the second device. The first device receives a sixth TCP message from the second device, and the sixth TCP message is a third handshake message for establishing a TCP connection. The first device sets the value of the ECE field of the sixth TCP message to the first value, and modifies the value of the window size field of the sixth TCP message according to the third available bandwidth. Among them, the third available bandwidth is the available bandwidth for the third device to send data to the second device, which is measured when the first device receives the sixth TCP message. The value of the window size field of the modified sixth TCP message has a first operational relationship with the third available bandwidth, and the ECE field of the modified sixth TCP message is used to indicate that the value of the window size field of the modified sixth TCP message is obtained by converting according to the third available bandwidth. The first device sends the modified sixth TCP message to the third device, and the modified sixth TCP message indicates that the first device enables the TCP rate adjustment technology.

[0016] In a second aspect, a TCP sending rate adjustment method is provided, which can be executed by a third device, or by a component of the third device, such as a processor, a chip, or a chip system of the third device, or by a logic module or software that can realize all or part of the functions of the third device. The method may include: the third device sends a first TCP message to the first device at a first sending rate, the destination of the first TCP message is the second device, and the first TCP message is a TCP data message. The second device establishes a TCP connection with the third device, and the first device is a relay device between the second device and the third device. The third device receives a modified second TCP message from the first device, and the second TCP message is a confirmation message of the first TCP message sent by the second device. The value of the displayed congestion notification echo ECE field of the modified second TCP message is a first value, and the value of the window size field of the modified second TCP message is converted according to the first available bandwidth. The first available bandwidth is the available bandwidth for the third device to send data to the second device, measured when the first device receives the second TCP message. The third device determines the first available bandwidth according to the value of the window size field of the modified second TCP message and the first operation relationship. The first operation relationship is preconfigured in the third device. The third device adjusts the first sending rate to the second sending rate according to the first available bandwidth.

[0017] Based on the above scheme, the relay device can carry the current available bandwidth of the TCP sender measured by the relay device in the TCP data message confirmation message sent by the TCP sender, so that the TCP sender can obtain the available bandwidth through the confirmation message of its TCP data message. Further, the TCP sender can adjust the sending rate according to the current available bandwidth of the TCP sender measured by the relay device. It should be understood that the above-mentioned first TCP message can be a TCP message sent by the TCP sender at any time during the data transmission process. Through this method, the TCP sender can timely obtain the changes in the available bandwidth in the network during the transmission of the TCP data message, and then adjust the sending rate in time according to the available bandwidth. Based on this, the TCP sender can utilize the bandwidth in the network to a greater extent for TCP data transmission, which can improve the utilization rate of the network and improve the TCP data transmission performance. In addition, the method can adjust the rate at any time during the TCP data transmission process, which is very flexible.

[0018] In combination with the above-mentioned second aspect, as a possible implementation method, the third device is a TCP client and the second device is a server. Before the third device sends the first TCP message, the method also includes: the third device sends a third TCP message to the first device, the destination of the third TCP message is the second device, and the third TCP message is a first handshake message for establishing a TCP connection. The third TCP message includes a first identifier, and the first identifier is used to indicate that the third device enables the TCP rate adjustment technology. The third device receives a modified fourth TCP message from the first device, and the fourth TCP message is a second handshake message sent by the second device for establishing a TCP connection. The value of the ECE field of the modified fourth TCP message is the first value, and the value of the window size field of the modified fourth TCP message is obtained by conversion based on the second available bandwidth. The second available bandwidth is the available bandwidth for the third device to send data to the second device when the first device receives the fourth TCP message. The third device determines that the first device enables the TCP rate adjustment technology based on the modified fourth TCP message.

[0019] In combination with the above second aspect, as a possible implementation manner, the method further includes: the third device sets an initial sending rate according to the second available bandwidth.

[0020] In combination with the above-mentioned second aspect, as a possible implementation method, the second device is a TCP client and the third device is a server. Before the third device sends the first TCP message, the method also includes: the third device sends a fifth TCP message to the first device, the destination of the fifth TCP message is the second device, and the fifth TCP message is a second handshake message for establishing a TCP connection. The fifth TCP message includes a first identifier, and the first identifier is used to indicate that the third device enables the TCP rate adjustment technology. The third device receives a modified sixth TCP message from the first device, and the sixth TCP message is a third handshake message sent by the second device for establishing a TCP connection. The value of the ECE field of the modified sixth TCP message is the first value, and the value of the window size field of the modified sixth TCP message is obtained by converting the third available bandwidth. The third available bandwidth is the available bandwidth for the third device to send data to the second device when the first device receives the sixth TCP message. The third device determines that the first device enables the TCP rate adjustment technology based on the modified sixth TCP message.

[0021] In combination with the above second aspect, as a possible implementation manner, the method further includes: the third device sets an initial sending rate according to a third available bandwidth.

[0022] In combination with the above second aspect, as a possible implementation manner, the initial sending rate of the third device is preconfigured.

[0023] In combination with the above second aspect, as a possible implementation, the method further includes: the third device sends the seventh TCP message at a third sending rate. The third device continues to send TCP data messages at the third sending rate until receiving a confirmation message for the seventh TCP message. The cumulative amount of data sent by the third device before receiving the confirmation message for the seventh TCP message is allowed to exceed the size of the TCP receive window.

[0024] In combination with the above second aspect, as a possible implementation manner, the first operation relationship is: the value of the window size field of the modified second TCP message = the first available bandwidth × the first parameter, and the first parameter is preconfigured in the third device.

[0025] In combination with the above second aspect, as a possible implementation, the second device is a TCP client, and the third device is a TCP server. Alternatively, the second device is a TCP server, and the third device is a TCP client.

[0026] In a third aspect, the present application provides a communication device, which may be the first device of the first aspect, or a chip or chip system in the first device of the first aspect, or a functional module in the first device of the first aspect. The communication device may implement the function performed by the first device in any possible design of the first aspect, and the function may be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. For example, the communication device may include: a transceiver module and a processing module. The transceiver module is used to send a first TCP message from a third device to a second device, and the first TCP message is a TCP data message. The transceiver module is also used to receive a second TCP message from the second device, and the second TCP message is a confirmation message of the first TCP message. The processing module is used to modify the value of the ECE field of the second TCP message to a first value, and modify the value of the window size field of the second TCP message according to the first available bandwidth. The first available bandwidth is the available bandwidth for the third device to send data to the second device when the first device receives the second TCP message. The value of the window size field of the modified second TCP message has a first operational relationship with the first available bandwidth, and the first operational relationship is preconfigured in the first device. The ECE field of the modified second TCP message is used to indicate that the value of the window size field of the modified second TCP message is obtained by converting the first available bandwidth. The transceiver module is also used to send the modified second TCP message to the third device. The second device establishes a TCP connection with the third device, and the first device is a relay device between the second device and the third device.

[0027] In combination with the third aspect, as a possible implementation manner, the first operation relationship is: the value of the window size field of the modified second TCP message = the first available bandwidth × the first parameter, and the first parameter is preconfigured in the first device.

[0028] In combination with the third aspect, as a possible implementation, the second device is a TCP client, and the third device is a TCP server. Alternatively, the second device is a TCP server, and the third device is a TCP client.

[0029] In combination with the third aspect above, as a possible implementation manner, the processing module is further used to determine that the third device enables the TCP rate adjustment technology.

[0030] In combination with the third aspect above, as a possible implementation method, the processing module is used to determine whether the third device enables the TCP rate adjustment technology, which may specifically include: the processing module is also used to determine whether the third device enables the TCP rate adjustment technology according to pre-configured information.

[0031] In combination with the third aspect, as a possible implementation, when the second device is a TCP server and the third device is a TCP client, the transceiver module is further used to receive a third TCP message from the third device, the third TCP message is a first handshake message for establishing a TCP connection, and the third TCP message includes a first identifier. The processing module is used to determine that the third device enables the TCP rate adjustment technology, which may include: the processing module is used to determine that the third device enables the TCP rate adjustment technology according to the first identifier in the third TCP message.

[0032] In combination with the third aspect above, as a possible implementation method, the transceiver module is also used to send a third TCP message to the second device. The transceiver module is also used to receive a fourth TCP message from the second device, and the fourth TCP message is a second handshake message for establishing a TCP connection. The processing module is also used to set the value of the ECE field of the fourth TCP message to the first value, and to modify the value of the window size field of the fourth TCP message according to the second available bandwidth. Among them, the second available bandwidth is the available bandwidth for the third device to send data to the second device when the first device receives the fourth TCP message. The value of the window size field of the modified fourth TCP message has a first operational relationship with the second available bandwidth, and the ECE field of the modified fourth TCP message is used to indicate that the value of the window size field of the modified fourth TCP message is obtained by converting according to the second available bandwidth. The transceiver module is also used to send a modified fourth TCP message to the third device, and the modified fourth TCP message indicates that the first device enables the TCP rate adjustment technology.

[0033] In combination with the third aspect, as a possible implementation, when the second device is a TC client and the third device is a TCP server, the transceiver module is further used to receive a fifth TCP message from the third device, the fifth TCP message is a second handshake message for establishing a TCP connection, and the fifth TCP message includes a first identifier. The processing module is used to determine that the third device enables the TCP rate adjustment technology, which may include: the first device determines that the third device enables the TCP rate adjustment technology according to the first identifier in the fifth TCP message.

[0034] In combination with the third aspect above, as a possible implementation method, the transceiver module is also used to send a fifth TCP message to the second device. The first device receives a sixth TCP message from the second device, and the sixth TCP message is a third handshake message for establishing a TCP connection. The processing module is also used to set the value of the ECE field of the sixth TCP message to the first value, and to modify the value of the window size field of the sixth TCP message according to the third available bandwidth. Among them, the third available bandwidth is the available bandwidth for the third device to send data to the second device when the first device receives the sixth TCP message. The value of the window size field of the modified sixth TCP message has a first operational relationship with the third available bandwidth, and the ECE field of the modified sixth TCP message is used to indicate that the value of the window size field of the modified sixth TCP message is obtained by converting according to the third available bandwidth. The transceiver module is also used to send a modified sixth TCP message to the third device, and the modified sixth TCP message indicates that the first device enables the TCP rate adjustment technology.

[0035] In a fourth aspect, the present application provides a communication device, which may be the third device of the first aspect, or a chip or chip system in the third device of the first aspect, or a functional module in the third device of the first aspect. The communication device may implement the function performed by the third device in any possible design of the first aspect, and the function may be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. For example, the communication device may include: a transceiver module and a processing module. The transceiver module is used to send a first TCP message to the first device at a first sending rate, the destination of the first TCP message is the second device, and the first TCP message is a TCP data message. The transceiver module is also used to receive a modified second TCP message from the first device, the second TCP message is a confirmation message of the first TCP message sent by the second device. The value of the display congestion notification echo ECE field of the modified second TCP message is a first value, and the value of the window size field of the modified second TCP message is converted according to the first available bandwidth. The first available bandwidth is the available bandwidth for the third device to send data to the second device measured when the first device receives the second TCP message. The processing module is used to determine the first available bandwidth according to the value of the window size field of the modified second TCP message and the first operation relationship. The first operation relationship is preconfigured in the third device. The processing module is also used to adjust the first sending rate to the second sending rate according to the first available bandwidth. The second device establishes a TCP connection with the third device, and the first device is a relay device between the second device and the third device.

[0036] In combination with the fourth aspect above, as a possible implementation method, the third device is a TCP client and the second device is a server. The transceiver module is also used to send a third TCP message to the first device, the destination of the third TCP message is the second device, and the third TCP message is a first handshake message for establishing a TCP connection. The third TCP message includes a first identifier, and the first identifier is used to indicate that the third device enables the TCP rate adjustment technology. The transceiver module is also used to receive a modified fourth TCP message from the first device, and the fourth TCP message is a second handshake message sent by the second device to establish a TCP connection. The value of the ECE field of the modified fourth TCP message is the first value, and the value of the window size field of the modified fourth TCP message is obtained by conversion based on the second available bandwidth. The second available bandwidth is the available bandwidth for the third device to send data to the second device when the first device receives the fourth TCP message. The processing module is also used to determine that the first device enables the TCP rate adjustment technology based on the modified fourth TCP message.

[0037] In combination with the fourth aspect, as a possible implementation manner, the processing module is further configured to set an initial sending rate according to the second available bandwidth.

[0038] In combination with the fourth aspect above, as a possible implementation method, the second device is a TCP client and the third device is a server. The transceiver module is also used to send a fifth TCP message to the first device, the destination of the fifth TCP message is the second device, and the fifth TCP message is a second handshake message for establishing a TCP connection. The fifth TCP message includes a first identifier, and the first identifier is used to indicate that the third device enables the TCP rate adjustment technology. The transceiver module is also used to receive a modified sixth TCP message from the first device, and the sixth TCP message is a third handshake message sent by the second device for establishing a TCP connection. The value of the ECE field of the modified sixth TCP message is the first value, and the value of the window size field of the modified sixth TCP message is obtained by converting the third available bandwidth. The third available bandwidth is the available bandwidth for the third device to send data to the second device when the first device receives the sixth TCP message. The processing module is also used to determine that the first device enables the TCP rate adjustment technology based on the modified sixth TCP message.

[0039] In combination with the fourth aspect, as a possible implementation manner, the processing module is further configured to set an initial sending rate according to a third available bandwidth.

[0040] In combination with the fourth aspect above, as a possible implementation manner, an initial sending rate of the third device is preconfigured.

[0041] In combination with the fourth aspect, as a possible implementation, the transceiver module is further configured to send a seventh TCP message at a third sending rate. The third device continues to send TCP data messages at the third sending rate until a confirmation message for the seventh TCP message is received. The transceiver module is further configured to allow the cumulative amount of data sent before receiving the confirmation message for the seventh TCP message to exceed the size of the TCP receive window.

[0042] In combination with the fourth aspect, as a possible implementation manner, the first operation relationship is: the value of the window size field of the modified second TCP message = the first available bandwidth × the first parameter, and the first parameter is preconfigured in the third device.

[0043] In combination with the fourth aspect, as a possible implementation, the second device is a TCP client, and the third device is a TCP server. Alternatively, the second device is a TCP server, and the third device is a TCP client.

[0044] In a fifth aspect, a communication device is provided, comprising: a processor and a memory; the memory is used to store computer instructions, and when the communication device is running, the processor executes the computer instructions stored in the memory to enable the communication device to perform the TCP sending rate adjustment method as described in any one of the first aspect or the second aspect above.

[0045] In conjunction with the fifth aspect, in a possible implementation, the communication device further includes a communication interface; the communication interface is used for the communication device to communicate with other devices. Exemplarily, the communication interface can be a transceiver, an input / output interface, an interface circuit, an output circuit, an input circuit, a pin or a related circuit, etc.

[0046] In a sixth aspect, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is executed on a computer, the computer can execute the TCP sending rate adjustment method described in any one of the first aspect or the second aspect.

[0047] In a seventh aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the TCP sending rate adjustment method described in any one of the first aspect or the second aspect.

[0048] Among them, the technical effects brought about by any design method in the third to seventh aspects can refer to the technical effects brought about by different design methods in the first or second aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 A schematic diagram of the format of a TCP message provided in an embodiment of the present application;

[0050] Figure 2 A schematic diagram of a three-way handshake to establish a TCP connection provided in an embodiment of the present application;

[0051] Figure 3 A schematic diagram of an application process of XCP provided in an embodiment of the present application;

[0052] Figure 4 A schematic diagram of a communication system provided in an embodiment of the present application;

[0053] Figure 5 A schematic diagram of another communication system provided in an embodiment of the present application;

[0054] Figure 6 A flow chart of a TCP sending rate adjustment method provided in an embodiment of the present application;

[0055] Figure 7 A flowchart of another TCP sending rate adjustment method provided in an embodiment of the present application;

[0056] Figure 8 A flowchart of another TCP sending rate adjustment method provided in an embodiment of the present application;

[0057] Fig. 9 A flowchart of a TCP handshake process provided in an embodiment of the present application;

[0058] Fig.10 A schematic diagram of the structure of a communication device provided in an embodiment of the present application;

[0059] Fig.11 A schematic diagram of the structure of another communication device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0060] To facilitate understanding, first, a brief introduction is given to the technical terms and related technologies involved in this application.

[0061] TCP is a connection-oriented, reliable, byte-stream-based transport layer communication protocol defined by IETF's RFC793. Connection-oriented means that two applications must first establish a TCP protocol connection before using the TCP protocol to transmit data. The reliability of the TCP protocol is provided by "checksum", "timer", "data sequence number" and "confirmation". By assigning a sequence number to each byte sent, the receiving end sends a confirmation message after receiving the data to ensure reliable data transmission. The data sequence number is used to ensure the order of data and eliminate duplicate data.

[0062] The format of TCP message can be as follows Figure 1 As shown, a TCP message may include two parts: a TCP header and data.

[0063] The TCP header may include the following fields in sequence:

[0064] Source port: The port number of the source application, which occupies 16 bits.

[0065] Destination port: The application port number of the destination, which occupies 16 bits.

[0066] Sequence number: occupies 32 bits. It indicates the number of the first byte of the data sent in this message. In a TCP connection, each byte of the transmitted byte stream is numbered in sequence. When the data segments are transmitted in the network, the order may be misplaced. The receiving end can correctly reassemble the data based on the sequence number to ensure the order of the data.

[0067] Acknowledgment number (ACK number): occupies 32 bits. It indicates confirmation of received data. Acknowledgment sequence number = received data sequence number + 1.

[0068] Header length: Also called data offset, occupies 4 bits. Since the TCP header contains a variable-length option part, it is necessary to specify how long the TCP message is. It indicates how far the start of the data part of the TCP message is from the start of the TCP message.

[0069] Reserved: 3 bits. Reserved for future expansion. The default value is 0.

[0070] Flag bit: Currently, 9 flag bits are defined, namely NS, CWR, ECE, URG, ACK, PSH, RST, SYN, and FIN. Each flag bit occupies 1 bit. The specific meanings are as follows:

[0071] (1) NS: The full name is nonce sum. The nonce refers to ECN-nonce, and ECN refers to explicit congestion notification. This flag is defined in RFC3540. When ordered packets arrive, the ECN-nonce receiver maintains the sum of the random numbers and returns the current sum of the random numbers in each confirmation. In the case of marked packets, the receiver may not know one or more random numbers. In this case, when calculating the sum, the receiver will ignore the missing random numbers and set ECE to send a blocking signal to the sender. The NS flag is used to enable the sender to verify the ECN-nonce receiver and that there are no other interferences hiding the marked (or discarded) packets in the signaling path.

[0072] (2) CWR: The full name is congestion window reduce, which is used to indicate that it has received a TCP packet with the ECE flag set. After receiving the message, the sender reduces the sending rate by reducing the size of the sending window.

[0073] (3) ECE: The full name is ECN echo, which is used to indicate that a TCP end has ECN function during the TCP three-way handshake. It is also used to indicate network line congestion during data transmission.

[0074] (4) URG: Urgent, used to indicate whether the data sent in this message contains urgent data. When URG = 1, it indicates that there is urgent data. When URG = 1, the following urgent pointer field is valid.

[0075] (5) ACK: The full name is acknowledgment, which is used to indicate whether the previous acknowledgment number field is valid. ACK = 1 indicates validity. Only when ACK = 1, the previous acknowledgment number field is valid. TCP stipulates that after a TCP connection is established, ACK must be 1.

[0076] (6) PSH: The full name is push. It is used to tell the other end whether to push the data to the upper layer immediately after receiving the message. If the value is 1, it means that the data should be submitted to the upper layer immediately instead of being cached.

[0077] (7) RST: The full name is reset, which is used to indicate whether to reset the connection. If RST = 1, it means that a serious error has occurred in the TCP connection (such as a host crash), and the connection must be released and then reestablished.

[0078] (8) SYN: The full name is synchronous. It is used when establishing a connection to synchronize the sequence number. When SYN=1 and ACK=0, it means that this is a message requesting to establish a connection; when SYN=1 and ACK=1, it means that the other party agrees to establish a connection. When SYN=1, it means that this is a message requesting to establish a connection or agreeing to establish a connection. SYN is 1 only in the first two handshakes.

[0079] (9) FIN: The full name is finish, which is used to mark whether the data has been sent. If FIN = 1, it means that the data has been sent and the connection can be released.

[0080] Window size: occupies 16 bits. It is used to indicate the number of bytes that the sender of this message can receive starting from the confirmation number, that is, the receive window size. This field can be used for TCP flow control.

[0081] Checksum: occupies 16 bits. It is used to confirm whether the transmitted data is damaged. The sender generates a value based on the data content check, and the receiver generates a value based on the received data check. The two values ​​must be the same to prove that the data is valid. If the two values ​​are different, the data packet is discarded. The checksum is calculated based on the pseudo header + TCP header + TCP data.

[0082] Urgent pointer: It is only meaningful when the previous URG control bit is 1. It indicates the number of bytes in this data segment that are urgent data, occupying 16 bits. When all urgent data is processed, TCP will tell the application to resume normal operation. Urgent data can be sent even if the current window size is 0, because urgent data does not need to be cached.

[0083] Option: An optional field with an indefinite length, but the length must be an integer multiple of 32 bits and a maximum of 40 bytes (320 bits).

[0084] TCP is a connection-oriented protocol that transmits TCP messages based on transport connections. The establishment and release of TCP transport connections are essential processes in every connection-oriented communication.

[0085] Among two devices that need to communicate based on TCP, the device that actively initiates the establishment of a TCP connection can be called a TCP client, and the device that passively waits for the establishment of a TCP connection can be called a TCP server. Usually, a TCP client and a TCP server can establish a TCP connection through a three-way handshake.

[0086] Figure 2A schematic diagram of establishing a TCP connection through a three-way handshake is shown. Figure 2 As shown, the handshake process for establishing a TCP connection is as follows:

[0087] Step 201: The TCP client sends a TCP connection request message to the TCP server. The TCP connection request message is the first handshake message used to establish a TCP connection.

[0088] The SYN flag in the message header is set to 1 (i.e., SYN=1), which indicates that the message is used to establish a TCP connection. The sequence number in the message header is set to an initial value x (i.e., sequence number=x), which is the initial sequence number selected by the TCP client, and x is randomly generated by the TCP client.

[0089] Step 202: After receiving the TCP connection request message, if the TCP server agrees to establish a connection, it sends a TCP connection request confirmation message to the TCP client. The TCP connection request confirmation message is a second handshake message for establishing a TCP connection.

[0090] Among them, the SYN flag and ACK flag in the message header are both set to 1 (i.e. SYN=1, ACK=1), SYN=1 indicates that the message is used to establish a TCP connection, and ACK=1 indicates confirmation of receipt of the TCP connection request message sent by the TCP client in the previous step. The sequence number in the message header is set to the initial value y (i.e. sequence number=y), as the initial sequence number selected by the TCP server, y is randomly generated by the server. The confirmation number in the message header is set to x+1 (i.e. confirmation number=x+1), indicating confirmation of the initial sequence number selected by the TCP client.

[0091] After receiving the TCP connection request confirmation message (the second handshake message), the TCP client can enter the connection established state.

[0092] Step 203: After receiving the TCP connection request confirmation message, the TCP client also sends a common TCP confirmation message to the TCP server, which is the third handshake message for establishing a TCP connection.

[0093] The ACK flag in the header of the TCP confirmation message is set to 1 (i.e., ACK=1), indicating that this is a normal TCP confirmation message. The sequence number in the message header is set to x+1 (i.e., sequence number=x+1), because the sequence number of the previous TCP message (i.e., TCP connection request message) sent by the TCP client is x, and it does not carry data, so the sequence number of the TCP confirmation message is x+1 (i.e., sequence number=x+1). The confirmation number in the message header is set to y+1 (i.e., confirmation number=y+1), which is a confirmation of the initial sequence number selected by the TCP server process.

[0094] After receiving the TCP confirmation message (the third handshake message), the TCP server also enters the connection established state.

[0095] Based on the above handshake process, both the TCP client and the TCP server have entered the connection established state, after which reliable data transmission can be performed based on the established TCP connection.

[0096] In the field of TCP technology, RFC 4782 records a TCP fast start technology that is designed to allow a connection to use a higher sending rate when there is a large amount of unused bandwidth on the path, and the sender and all routers on the path approve the fast start request. In this scheme, the sender can add a bandwidth request in the request message sent during the handshake phase, and the intermediate device can approve the available bandwidth in the request message. After the receiver receives the request message carrying the available bandwidth, it will include the available bandwidth in the response message and return it to the sender. Therefore, after receiving the response message, the sender can know the available bandwidth on the path to the receiver, and then determine the sending rate based on the available bandwidth.

[0097] However, the TCP Fast Start technology documented in RFC 4782 defines very complex router behaviors, such as hop-by-hop reservation, TTL difference check, TCP options, and IP options, making the entire solution too heavy to deploy. In addition, the TCP Fast Start technology is only for the startup phase, and there is no way to handle the situation where the sending rate needs to be adjusted during normal data transmission.

[0098] The explicit control protocol (XCP) is a transmission protocol that uses the perception of the bandwidth of the network by the intermediate nodes to determine the available bandwidth from the source to the destination. XCP can effectively control the congestion window size of the sender, thereby avoiding the traditional slow start and congestion avoidance phases. In the XCP technical solution, the sender can carry the desired bandwidth in the sent message. The intermediate node can measure the available bandwidth from the sender to the receiver, and can carry the measured available bandwidth in the forwarded message. The receiver determines the actual available bandwidth from the sender to the receiver based on the minimum value of the available bandwidth measured by each intermediate node, and carries the actual available bandwidth in the response message to the sender. The sender sets the sending rate based on the actual available bandwidth fed back by the receiver.

[0099] Figure 3 A schematic diagram of an application process of XCP is shown below. Figure 3 As shown in the figure, the sender sets the expected bandwidth to 10 megabits per second (Mbps) in the request message sent, intermediate node 1 inserts the available bandwidth of 5Mbps in the message and forwards it to intermediate node 2, and intermediate node 2 inserts the available bandwidth of 5Mbps in the message and forwards it to the receiver. The receiver sends a response message to the sender, and the response message carries the available bandwidth of 5Mbps of the link. After receiving the response message, the sender sets the transmission rate to 5Mbps according to the response message.

[0100] XCP technology can achieve the same technical effect as TCP fast start technology. However, XCP technology is not adapted to TCP and cannot be used for transmission control of TCP messages.

[0101] The above TCP fast start technology and XCP technology both propose some solutions for setting the sending rate by sensing the available bandwidth through intermediate nodes. However, there is no relevant technology to achieve the speed increase or speed decrease requirements during TCP transmission. The present application provides a TCP sending rate adjustment method, which can adjust the sending rate of the sender during TCP transmission, thereby improving the utilization of the network and improving the transmission performance.

[0102] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Among them, in the description of the present application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; "and / or" in the present application is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. And, in the description of the present application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with basically the same functions and effects. It can be understood by those skilled in the art that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not limit them to be necessarily different. At the same time, in the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design solutions. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way for easy understanding. In addition, the network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. It can be known to those of ordinary skill in the art that with the evolution of the network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0103] Before introducing the message processing method provided in the embodiment of the present application, the communication system / service scenario to which the message processing method of the present application is applied is first introduced.

[0104] Figure 4 A schematic diagram of a communication system provided in the present application, the communication system may include a first device, a second device and a third device, the second device and the third device are connected through the first device, and the first device is a relay device for the second device and the third device. The second device and the third device may communicate based on TCP.

[0105] Optionally, the second device is a TCP client, and the third device is a TCP server. Alternatively, the second device is a TCP server, and the third device is a TCP client.

[0106] The TCP sending rate adjustment method provided in the embodiment of the present application can be applied to the above Figure 4 The communication system shown in FIG. Specific implementation can refer to the following method embodiment, which will not be described in detail here.

[0107] Figure 5 A schematic diagram of another communication system provided for the present application, which may include a user equipment (UE), a relay device and a cloud server. The UE is connected to the cloud server through the relay device, and the UE and the cloud server can communicate based on TCP.

[0108] Optionally, Figure 5 The relay device in the network can be a router, switch or base station. Figure 5 The communication system shown may be a scenario of home routing access or mobile communication access.

[0109] For example, Figure 4 and Figure 5 compared to, Figure 5 The relay device in can correspond to Figure 4 The first device in Figure 5 The UE and cloud server in can correspond to Figure 4 The second device and the third device in.

[0110] It should be understood that the network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0111] The following will be combined Figure 4 and Figure 5 The communication system shown describes the message processing method provided by the embodiment of the present application. The actions, terms, etc. involved in the various embodiments of the present application can refer to each other without limitation. The message name or parameter name in the message in the embodiment of the present application is only an example, and other names can also be used in the specific implementation without limitation.

[0112] Figure 6 A flow chart of a TCP sending rate adjustment method provided in an embodiment of the present application is as follows: Figure 6 As shown, the method may include the following steps:

[0113] Step 601: The third device sends a first TCP message to the first device at a first sending rate, where the first TCP message is a TCP data message and the destination of the first TCP message is the second device.

[0114] The second device is connected to the third device through the first device, and the first device is a relay device between the second device and the third device. The second device establishes a TCP connection with the third device, and the second device and the third device communicate based on TCP.

[0115] For example, the relationship between the first device, the second device, and the third device may be as follows: Figure 4 As shown, please refer to the above Figure 4 The relevant description will not be repeated here.

[0116] The first sending rate is a sending rate that is locally set when the third device sends the first TCP message.

[0117] Step 602: The first device sends a first TCP message to the second device, where the first TCP message is a TCP data message.

[0118] Step 603: The second device sends a second TCP message to the first device, where the second TCP message is a confirmation message of the first TCP message, and the destination of the second TCP message is the third device.

[0119] TCP specifies a confirmation mechanism. After the TCP datagram sent by the sender reaches the receiver, the receiver needs to reply with an acknowlegement (ACK) message to indicate that the receiver has received the TCP datagram from the sender. After receiving the acknowledgment message from the receiver, the sender can also be sure that the TCP datagram it sent has been received by the other party. This confirmation mechanism ensures the reliability of TCP transmission.

[0120] In this embodiment, the third device is a sender of a TCP data message, and the second device is a receiver of a TCP data message. The first TCP message is a data message sent by the sender, and the second TCP message is a confirmation message fed back by the receiver. The second TCP message is used to indicate that the second device has received the first TCP message.

[0121] Step 604: The first device modifies the value of the ECE field of the second TCP message to the first value, and modifies the value of the window size field of the second TCP message according to the first available bandwidth.

[0122] The first available bandwidth is the available bandwidth for the third device to send data to the second device, measured when the first device receives the second TCP message. The value of the window size field of the modified second TCP message has a first operational relationship with the first available bandwidth, and the ECE field of the modified second TCP message is used to indicate that the value of the window size field of the modified second TCP message is converted according to the first available bandwidth. The first operational relationship is preconfigured in the first device.

[0123] Optionally, the first device can serve as a relay device for at least one group of transceiver devices, forwarding data transmitted between at least one group of transceiver devices, one of the at least one group of transceiver devices being the third device and the second device. The first device can determine the available bandwidth for the third device to send data to the second device based on its total bandwidth and the number of transceiver groups to which the data it simultaneously forwards belongs. Thus, the first available bandwidth is determined by the first device based on the total bandwidth and the number of transceiver groups corresponding to the currently forwarded data when the first device receives the second TCP message.

[0124] For example, assuming that when the first device receives the second TCP message, the first device only forwards data for the third device and the second device, then the first available bandwidth is the total bandwidth of the first device. For another example, assuming that when the first device receives the second TCP message, the third device is simultaneously forwarding data for three groups of transceiver devices, then the first available bandwidth may be one third of the total bandwidth of the first device.

[0125] Optionally, after measuring the first available bandwidth, the first device may convert the first available bandwidth into a window size value according to a locally configured first operation relationship. Further, the first device modifies the value of the window size field of the second TCP message into the window size value converted from the first available bandwidth.

[0126] Optionally, the first operation relationship is: the value of the window size field of the modified second TCP message = the first available bandwidth × the first parameter. The first parameter can be preconfigured in the first device. For example, the first parameter is 200 milliseconds (ms), the first available bandwidth is 400Mbps, the unit of the value of the window size field is byte, 400Mbps = 50 megabytes per second (MB / s), then the converted value of the window size field = 50MB / s × 200ms = 10 megabytes (million bytes, MB).

[0127] The above ECE field refers to Figure 1The ECE flag in the TCP packet header shown is described here. As a possible implementation, the first value may be "1", that is, when the value of the ECE field is 1, it indicates that the value of the window size field of the modified second TCP packet is converted according to the first available bandwidth.

[0128] It should be understood that the embodiment of the present application reuses the window size field to carry the converted first available bandwidth, without the need to expand additional fields, with good compatibility and easy implementation. Furthermore, the first available bandwidth is converted based on the preconfigured first parameter and the first operation relationship, and no additional measurement of other information is required. In addition, the embodiment of the present application reuses the ECE field to indicate that the value of the window size field is obtained by conversion based on the first available bandwidth, without the need to expand additional fields, with good compatibility and easy implementation. Moreover, compared with multiplexing other fields, the indication through the ECE field is more convenient for congestion control algorithm perception, and there are fewer modifications and configurations at the software level.

[0129] Step 605: The first device sends the modified second TCP message to the third device, and correspondingly, the third device receives the modified second TCP message.

[0130] Step 606: The third device determines a first available bandwidth according to the value of the modified window size field of the second TCP message and the first operation relationship.

[0131] After receiving the modified second TCP message, the third device can identify the value of the ECE field. When the third device identifies that the value of the ECE field in the modified second TCP message is the first value, it can determine that the value of the window size field of the modified second TCP message is converted according to the first available bandwidth.

[0132] Further, the third device may calculate the first available bandwidth according to the value of the window size field and the first operation relationship. In the embodiment of the present application, the first relationship may also be preconfigured in the third device. For example, the first parameter is 200ms, and the value of the window size field is 10MB, then the first available bandwidth calculated by the third device = 10MB ÷ 200ms = 50MB / s = 400Mbps.

[0133] Step 607: The third device adjusts the first sending rate to a second sending rate according to the first available bandwidth.

[0134] Optionally, the second sending rate is equal to the first available bandwidth.

[0135] Optionally, the second sending rate may be greater than the first sending rate, or the second sending rate may be equal to the first sending rate, or the second sending rate may be less than the first sending rate, which is not limited in the present application.

[0136] For example, the first transmission rate when the third device sends the first TCP message is 40MB / s, and the first available bandwidth determined by the third device according to the modified second TCP message is 50MB / s, so the third device can adjust the transmission rate from 40MB / s to 50MB / s. In this example, the transmission rate is increased.

[0137] As another example, the sending rate of the third device when sending the first TCP message is 40MB / s, and the first available bandwidth determined by the third device according to the modified second TCP message is 30MB / s, so the third device can adjust the sending rate from 40MB / s to 30MB / s. In this example, the sending rate is reduced.

[0138] The third device in the above steps is the sender of the TCP data message, the second device is the receiver of the TCP data message, and the first device is a relay device. The relay device can carry the available bandwidth measured by it in the confirmation message fed back by the receiver to the sender, thereby indicating the available bandwidth of the link to the sender, thereby prompting the sender to set the sending rate according to the available bandwidth of the link.

[0139] Based on the above scheme, the relay device can carry the current available bandwidth of the TCP sender measured by the relay device in the TCP data message confirmation message sent by the TCP sender, so that the TCP sender can obtain the available bandwidth through the confirmation message of its TCP data message. Further, the TCP sender can adjust the sending rate according to the current available bandwidth of the TCP sender measured by the relay device. It should be understood that the above-mentioned first TCP message can be a TCP message sent by the TCP sender at any time during the data transmission process. Through this method, the TCP sender can timely obtain the changes in the available bandwidth in the network during the transmission of the TCP data message, and then adjust the sending rate in time according to the available bandwidth. Based on this, the TCP sender can utilize the bandwidth in the network to a greater extent for TCP data transmission, which can improve the utilization rate of the network and improve the TCP data transmission performance. In addition, the method can adjust the rate at any time during the TCP data transmission process, which is very flexible.

[0140] In the embodiment of the present application, the third device and the second device can be one of the TCP client and the TCP server respectively, and the above method is used for both the process of the TCP client sending data to the TCP server and the process of the TCP server sending data to the TCP client.

[0141] Optionally, before the first device modifies the value of the ECE field of the second TCP message to the first value and modifies the value of the window size field of the second TCP message according to the first available bandwidth, the method further includes: the first device determines that the third device enables the TCP rate adjustment technology. In the embodiment of the present application, the first device will perform the above modification on the second TCP message only when the third device enables the TCP rate adjustment technology.

[0142] Optionally, the first device may be instructed to enable the TCP rate adjustment technology on the third device through preconfigured information. Based on this, the first device may determine that the third device enables the TCP rate adjustment technology according to the preconfigured information. Thus, the first device determines that the third device enables the TCP rate adjustment technology, which may specifically include: the first device determines that the third device enables the TCP rate adjustment technology according to the preconfigured information. The preconfigured information may be sent by a technician through a configuration tool, for example, the technician may send the preconfigured information to the first device through a command-line interface (CLI).

[0143] Optionally, the first device may also determine that the third device enables the TCP rate adjustment technology through information interaction with the third device.

[0144] As a possible implementation, in the case where the second device is a TCP server and the third device is a TCP client, Figure 7 As shown, the first device determines that the third device enables the TCP rate adjustment technology, which may specifically include the following steps:

[0145] Step 701: The third device sends a third TCP message to the first device, and accordingly, the first device receives the third TCP message from the third device. The destination of the third TCP message is the second device, and the third TCP message is a first handshake message for establishing a TCP connection. The third TCP message includes a first identifier, and the first identifier is used to indicate that the third device enables the TCP rate adjustment technology.

[0146] It should be understood that the TCP client and the TCP server will establish a TCP connection through a three-way handshake. In the case where the second device is a TCP server and the third device is a TCP client, the first and third handshake messages for establishing the TCP connection are sent by the third device, and the second handshake message is sent by the second device. Figure 2 Taking the TCP handshake process shown as an example, the third TCP message may be the TCP connection request message in step 201.

[0147] As a possible implementation manner, the first identifier may be carried in a PSH field of the third TCP message. Alternatively, the first identifier may also be carried in a reserved field in a TCP header of the third TCP message.

[0148] Step 702: The first device determines, based on the first identifier in the third TCP message, that the third device enables the TCP rate adjustment technology.

[0149] Based on this solution, when the second device is a TCP server and the third device is a TCP client, the third device can indicate to the first device that it has enabled the TCP rate adjustment technology by carrying a first identifier in the first handshake message.

[0150] Optionally, continue to refer to Figure 7 , the method may further comprise the following steps:

[0151] Step 703: The first device sends a third TCP message to the second device.

[0152] After the second device receives the third TCP message, the first handshake between the third device and the second device can be implemented.

[0153] Step 704: The first device receives a fourth TCP message from the second device, where the fourth TCP message is a second handshake message for establishing a TCP connection.

[0154] For example, Figure 2 Taking the TCP handshake process shown as an example, the fourth TCP message may be the TCP connection request confirmation message in step 202.

[0155] Step 705: The first device modifies the value of the ECE field of the fourth TCP message to the first value, and modifies the value of the window size field of the fourth TCP message according to the second available bandwidth. The second available bandwidth is the available bandwidth for the third device to send data to the second device, measured when the first device receives the fourth TCP message. The value of the modified window size field of the fourth TCP message has a first operational relationship with the second available bandwidth, and the modified ECE field of the fourth TCP message is used to indicate that the value of the modified window size field of the fourth TCP message is converted according to the second available bandwidth.

[0156] This step is similar to step 603 , and the relevant description of step 603 may be referred to.

[0157] Step 706: The first device sends a modified fourth TCP message to the third device, where the modified fourth TCP message instructs the first device to enable TCP rate adjustment technology.

[0158] In the embodiment of the present application, the fourth TCP message is a second handshake message for establishing a TCP connection, but the first device modifies its ECE field to the first value, so that the modified fourth TCP message is a special second handshake message. Based on this, the modified fourth message can be used to instruct the first device to enable the TCP rate adjustment technology.

[0159] Step 707: The third device determines, according to the modified fourth TCP message, that the first device has enabled the TCP rate adjustment technology.

[0160] First, the third device can identify the modified fourth TCP message it receives as a second handshake message. Second, the third device can determine that the modified fourth TCP message it receives is a special second handshake message based on the ECE field being the first value. Based on this, the third device can determine that the first device has enabled the TCP rate adjustment technology.

[0161] Based on this solution, when the second device is a TCP server and the third device is a TCP client, the first device can modify the value of the ECE field of the second handshake message so that the second handshake message can indicate to the third device that it has enabled the TCP rate regulation technology.

[0162] Optionally, the third device may determine the second available bandwidth according to the value of the window size field of the modified fourth TCP message and the first operation relationship, and then set an initial sending rate for sending data according to the second available bandwidth.

[0163] Optionally, the third device may not set the initial sending rate according to the second available bandwidth, and the initial sending rate of the third device may be preconfigured.

[0164] It should be understood that after step 707, the third device may also send a third handshake message to the first device, and the first device forwards the third handshake message to the second device, thereby completing the three-way TCP handshake process between the third device and the second device to establish a TCP connection.

[0165] As another possible implementation, when the third device is a TCP server and the second device is a TCP client, as shown in FIG. Figure 8 As shown, the first device determines that the third device enables the TCP rate adjustment technology, which may specifically include:

[0166] Step 801: The third device sends a fifth TCP message to the first device, and accordingly, the first device receives the fifth TCP message from the third device. The destination of the fifth TCP message is the second device, and the fifth TCP message is a second handshake message for establishing a TCP connection. The fifth TCP message includes a first identifier, and the first identifier is used to instruct the third device to enable the TCP rate adjustment technology.

[0167] It should be understood that the TCP client and the TCP server will establish a TCP connection through a three-way handshake. In the case where the second device is a TCP client and the third device is a TCP server, the first and third handshake messages for establishing the TCP connection are sent by the second device, and the second handshake message is sent by the third device. Figure 2 Taking the TCP handshake process shown as an example, the fifth TCP message may be the TCP connection request confirmation message in step 202 .

[0168] As a possible implementation manner, the first identifier may be carried in a PSH field of the fifth TCP message. Alternatively, the first identifier may also be carried in a reserved field in a TCP header of the fifth TCP message.

[0169] It should be understood that before step 801, the second device also sends a first handshake message to the first device, and the first device forwards the first handshake message to the third device, thereby performing a first handshake between the second device and the third device.

[0170] Step 802: The first device determines that the third device enables the TCP rate adjustment technology according to the first identifier in the fifth TCP message.

[0171] Based on this solution, when the second device is a TCP client and the third device is a TCP server, the third device can indicate to the first device that it has enabled the TCP rate adjustment technology by carrying the first identifier in the second handshake message.

[0172] Optionally, continue to refer to Figure 8 , the method may further comprise the following steps:

[0173] Step 803: The first device sends a fifth TCP message to the second device.

[0174] After the second device receives the fifth TCP message, a second handshake between the second device and the third device can be implemented.

[0175] Step 804: The first device receives a sixth TCP message from the second device, where the sixth TCP message is a third handshake message for establishing a TCP connection.

[0176] Step 805: The first device modifies the value of the ECE field of the sixth TCP message to the first value, and modifies the value of the window size field of the sixth TCP message according to the third available bandwidth. The third available bandwidth is the available bandwidth for the third device to send data to the second device, measured when the first device receives the sixth TCP message. The value of the modified window size field of the sixth TCP message has a first operational relationship with the third available bandwidth, and the modified ECE field of the sixth TCP message is used to indicate that the value of the modified window size field of the sixth TCP message is converted according to the third available bandwidth.

[0177] This step is similar to step 603 , and the relevant description of step 603 may be referred to.

[0178] Step 806: The first device sends a modified sixth TCP message to the third device, where the modified sixth TCP message instructs the first device to enable TCP rate adjustment technology.

[0179] In the embodiment of the present application, the sixth TCP message is the second handshake message for establishing a TCP connection, but the first device sets its ECE field to the first value, so that the modified sixth TCP message is a special second handshake message. Based on this, the modified sixth message can be used to instruct the first device to enable the TCP rate adjustment technology.

[0180] Step 807: The third device determines, based on the modified sixth TCP message, that the first device has enabled the TCP rate adjustment technology.

[0181] First, the third device can identify the modified sixth TCP message it receives as the second handshake message. Secondly, the third device can determine that the modified sixth TCP message it receives is a special second handshake message based on the ECE field being the first value. Based on this, the third device can determine that the first device has enabled the TCP rate adjustment technology.

[0182] Based on this solution, when the second device is a TCP client and the third device is a TCP server, the first device can modify the value of the ECE field of the third handshake message so that the third handshake message can indicate to the third device that it has enabled the TCP rate regulation technology.

[0183] Optionally, the third device may determine a third available bandwidth according to the value of the window size field of the modified sixth TCP message and the first operation relationship, and then set an initial sending rate for sending data according to the third available bandwidth.

[0184] Optionally, the third device may not set the initial sending rate according to the third available bandwidth, and the initial sending rate of the third device may be preconfigured.

[0185] In the embodiment of the present application, the initial sending rate of the third device refers to the sending rate used by the third device to send data initially after establishing a TCP connection with the second device. The third device can continue to send data at the initial sending rate until the sending rate of the third device is modified.

[0186] Optionally, the first sending rate may be an initial sending rate, or the first sending rate may be a sending rate after the initial sending rate is modified, which is not limited in the present application.

[0187] Optionally, the TCP client and the TCP server can be each other's sender and receiver. When the TCP client and the TCP server are connected through a relay device, the TCP client can use the first handshake message to indicate to the relay device that the TCP rate adjustment technology is enabled, and the TCP server can use the second handshake message to indicate to the relay device that the TCP adjustment technology is enabled. The relay device can use the second handshake message to indicate to the TCP client that the TCP rate adjustment technology is enabled, and indicate the measured available bandwidth. The relay device can use the third handshake message to indicate to the TCP server that the TCP rate adjustment technology is enabled, and indicate the measured available bandwidth. Based on the above handshake process, the TCP client, the TCP server and the relay device confirm that each party enables the TCP rate adjustment technology through the interaction of handshake messages.

[0188] Fig. 9 A schematic diagram of a TCP handshake process provided in an embodiment of the present application, such as Fig. 9 As shown, the process includes the following steps:

[0189] Step 901: The TCP client sends a first handshake message to the relay device, wherein the first handshake message includes a first identifier, which is used to instruct the TCP client to enable the TCP rate adjustment technology.

[0190] After receiving the first handshake message, the relay device can determine that the TCP client enables the TCP rate adjustment technology.

[0191] Step 902: The relay device sends a first handshake message to the TCP server, wherein the first handshake message includes a first identifier for instructing the TCP client to enable the TCP rate adjustment technology.

[0192] After receiving the first handshake message, the TCP server can determine that the TCP client enables the TCP rate adjustment technology.

[0193] Step 903: The TCP server sends a second handshake message to the relay device, wherein the second handshake message includes a first identifier, which is used to instruct the TCP server to enable the TCP rate adjustment technology.

[0194] After receiving the second handshake message, the relay device can determine that the TCP server has enabled the TCP rate adjustment technology.

[0195] Step 904: The relay device modifies the ECE field of the second handshake message to the first value, and modifies the value of the window size field of the second handshake message, wherein the value of the window size field of the second handshake message after modification is calculated based on the available bandwidth for the TCP client to send data to the TCP server, measured by the relay device.

[0196] Optionally, the conversion relationship between the value of the window size field of the modified second handshake message and the available bandwidth for the TCP client to send data to the TCP server may be the above-mentioned first operation relationship, which will not be described in detail here.

[0197] Step 905: The relay device sends the modified second handshake message to the TCP client.

[0198] First, the TCP client can determine that the relay device enables the TCP rate adjustment technology according to the first value of the ECE field of the second handshake message. In addition, the modified second handshake message also includes a first identifier, which is encapsulated by the TCP server, and the TCP client can determine that the TCP server enables the TCP rate adjustment technology according to the first identifier.

[0199] Optionally, the TCP client may also set an initial sending rate for sending data according to an available bandwidth for sending data from the TCP client to the TCP server measured by the relay device.

[0200] Step 906: The TCP client sends a third handshake message to the relay device.

[0201] Step 907: The relay device modifies the ECE field of the third handshake message to the first value, and modifies the value of the window size field of the third handshake message. The modified value of the window size field of the third handshake message is calculated based on the available bandwidth for the TCP server to send data to the TCP client measured by the relay device.

[0202] Optionally, the conversion relationship between the value of the window size field of the modified third handshake message and the available bandwidth for the TCP server to send data to the TCP client may be the above-mentioned first operation relationship, which will not be described in detail here.

[0203] Step 908: The relay device sends the modified third handshake message to the TCP server.

[0204] The TCP server can determine that the relay device enables the TCP rate adjustment technology according to the ECE field of the third handshake message being the first value.

[0205] Optionally, the TCP server may also set an initial sending rate for sending data according to an available bandwidth for sending data from the TCP server to the TCP client measured by the relay device.

[0206] Based on the above steps 901 to 908, the TCP client, the TCP server, and the relay device confirm that each party enables the TCP rate adjustment technology through the interaction of handshake messages. Based on this, the TCP client and the TCP server can use the method of the above steps 601 to 607 to adjust the TCP sending rate in the subsequent data sending process.

[0207] Optionally, the TCP sending rate adjustment method of the present application may further include: the third device sends a seventh TCP message at a third sending rate. Afterwards, the third device continues to send TCP data messages at the third sending rate until a confirmation message for the seventh TCP message is received. The cumulative amount of data sent by the third device before receiving the confirmation message for the seventh TCP message is allowed to exceed the size of the TCP receive window. Among them, the seventh TCP message can be a TCP data message sent by the third device at any time after the TCP connection is established, and this application does not impose any restrictions. In other words, after the third device sets the sending rate according to the method of the embodiment of the present application, the third device can send data completely according to the set sending rate, without being restricted by the size of the TCP receive window.

[0208] Optionally, the above-mentioned TCP sending rate adjustment method in the embodiment of the present application can be performed by a communication device, which can be the first node in the above-mentioned method embodiment, or a device including the above-mentioned first node, or a component that can be used for the first node. It can be understood that in order to realize the above-mentioned functions, the communication device includes a hardware structure and / or software module corresponding to each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiment disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0209] The embodiment of the present application can divide the functional modules of the communication device according to the above method embodiment. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0210] Fig.10 The structure diagram of a communication device is shown, the communication device 100 comprises a transceiver module 1001 and a processing module 1002. The transceiver module 1001, also called a transceiver unit, is used to implement the transceiver function, for example, it can be a transceiver circuit, a transceiver, a transceiver or a communication interface.

[0211] Take the communication device 100 as the first device as an example:

[0212] The transceiver module 1001 is used to send a first TCP message from a third device to a second device, where the first TCP message is a TCP data message. The transceiver module 1001 is also used to receive a second TCP message from the second device, where the second TCP message is a confirmation message of the first TCP message. The processing module 1002 is used to modify the value of the ECE field of the second TCP message to a first value, and to modify the value of the window size field of the second TCP message according to the first available bandwidth. The first available bandwidth is the available bandwidth for the third device to send data to the second device, measured when the first device receives the second TCP message. The value of the window size field of the modified second TCP message has a first operational relationship with the first available bandwidth, and the first operational relationship is preconfigured in the first device. The ECE field of the modified second TCP message is used to indicate that the value of the window size field of the modified second TCP message is obtained by conversion based on the first available bandwidth. The transceiver module 1001 is also used to send the modified second TCP message to the third device. Among them, the second device and the third device have established a TCP connection, and the first device is a relay device between the second device and the third device.

[0213] Optionally, the processing module 1002 is further configured to determine whether the third device enables TCP rate adjustment technology.

[0214] Optionally, the processing module 1002 is used to determine that the third device enables the TCP rate adjustment technology, which may specifically include: the processing module 1002 is also used to determine that the third device enables the TCP rate adjustment technology according to preconfigured information.

[0215] Optionally, when the second device is a TCP server and the third device is a TCP client, the transceiver module 1001 is further used to receive a third TCP message from the third device, where the third TCP message is a first handshake message for establishing a TCP connection, and the third TCP message includes a first identifier. The processing module 1002 is used to determine whether the third device enables the TCP rate adjustment technology, which may include: the processing module 1002 is used to determine whether the third device enables the TCP rate adjustment technology according to the first identifier in the third TCP message.

[0216] Optionally, the transceiver module 1001 is also used to send a third TCP message to the second device. The transceiver module 1001 is also used to receive a fourth TCP message from the second device, and the fourth TCP message is a second handshake message for establishing a TCP connection. The processing module 1002 is also used to set the value of the ECE field of the fourth TCP message to the first value, and to modify the value of the window size field of the fourth TCP message according to the second available bandwidth. Among them, the second available bandwidth is the available bandwidth for the third device to send data to the second device when the first device receives the fourth TCP message. The value of the window size field of the modified fourth TCP message has a first operational relationship with the second available bandwidth, and the ECE field of the modified fourth TCP message is used to indicate that the value of the window size field of the modified fourth TCP message is converted according to the second available bandwidth. The transceiver module 1001 is also used to send a modified fourth TCP message to the third device, and the modified fourth TCP message indicates that the first device enables the TCP rate adjustment technology.

[0217] Optionally, when the second device is a TC client and the third device is a TCP server, the transceiver module 1001 is further used to receive a fifth TCP message from the third device, the fifth TCP message is a second handshake message for establishing a TCP connection, and the fifth TCP message includes a first identifier. The processing module 1002 is used to determine that the third device enables the TCP rate adjustment technology, which may include: the first device determines that the third device enables the TCP rate adjustment technology according to the first identifier in the fifth TCP message.

[0218] Optionally, the transceiver module 1001 is also used to send a fifth TCP message to the second device. The first device receives a sixth TCP message from the second device, and the sixth TCP message is a third handshake message for establishing a TCP connection. The processing module 1002 is also used to set the value of the ECE field of the sixth TCP message to the first value, and to modify the value of the window size field of the sixth TCP message according to the third available bandwidth. Among them, the third available bandwidth is the available bandwidth for the third device to send data to the second device when the first device receives the sixth TCP message. The value of the window size field of the modified sixth TCP message has a first operational relationship with the third available bandwidth, and the ECE field of the modified sixth TCP message is used to indicate that the value of the window size field of the modified sixth TCP message is obtained by converting according to the third available bandwidth. The transceiver module 1001 is also used to send a modified sixth TCP message to the third device, and the modified sixth TCP message indicates that the first device enables the TCP rate adjustment technology.

[0219] Take the communication device 100 as the third device as an example:

[0220] The transceiver module 1001 is used to send a first TCP message to the first device at a first sending rate, the destination of the first TCP message is the second device, and the first TCP message is a TCP data message. The transceiver module 1001 is also used to receive a modified second TCP message from the first device, the second TCP message is a confirmation message of the first TCP message sent by the second device. The value of the ECE field of the modified congestion notification echo of the second TCP message is a first value, and the value of the window size field of the modified second TCP message is obtained by conversion based on the first available bandwidth. The first available bandwidth is the available bandwidth for the third device to send data to the second device when the first device receives the second TCP message. The processing module 1002 is used to determine the first available bandwidth according to the value of the window size field of the modified second TCP message and the first operation relationship. The first operation relationship is preconfigured in the third device. The processing module 1002 is also used to adjust the first sending rate to the second sending rate according to the first available bandwidth. Among them, the second device and the third device have established a TCP connection, and the first device is a relay device between the second device and the third device.

[0221] Optionally, the third device is a TCP client and the second device is a server. The transceiver module 1001 is also used to send a third TCP message to the first device, the destination of the third TCP message is the second device, and the third TCP message is a first handshake message for establishing a TCP connection. The third TCP message includes a first identifier, and the first identifier is used to indicate that the third device enables the TCP rate adjustment technology. The transceiver module 1001 is also used to receive a modified fourth TCP message from the first device, and the fourth TCP message is a second handshake message sent by the second device to establish a TCP connection. The value of the ECE field of the modified fourth TCP message is the first value, and the value of the window size field of the modified fourth TCP message is obtained by converting the second available bandwidth. The second available bandwidth is the available bandwidth for the third device to send data to the second device when the first device receives the fourth TCP message. The processing module 1002 is also used to determine that the first device enables the TCP rate adjustment technology based on the modified fourth TCP message.

[0222] Optionally, the processing module 1002 is further configured to set an initial sending rate according to the second available bandwidth.

[0223] Optionally, the second device is a TCP client and the third device is a server. The transceiver module 1001 is also used to send a fifth TCP message to the first device, the destination of the fifth TCP message is the second device, and the fifth TCP message is a second handshake message for establishing a TCP connection. The fifth TCP message includes a first identifier, and the first identifier is used to indicate that the third device enables the TCP rate adjustment technology. The transceiver module 1001 is also used to receive a modified sixth TCP message from the first device, and the sixth TCP message is a third handshake message sent by the second device to establish a TCP connection. The value of the ECE field of the modified sixth TCP message is the first value, and the value of the window size field of the modified sixth TCP message is obtained by converting the third available bandwidth. The third available bandwidth is the available bandwidth for the third device to send data to the second device when the first device receives the sixth TCP message. The processing module 1002 is also used to determine that the first device enables the TCP rate adjustment technology based on the modified sixth TCP message.

[0224] Optionally, the processing module 1002 is further configured to set an initial sending rate according to a third available bandwidth.

[0225] Optionally, the transceiver module 1001 is further configured to send a seventh TCP message at a third sending rate. The third device continues to send TCP data messages at the third sending rate until a confirmation message for the seventh TCP message is received. The transceiver module 1001 is further configured to allow the cumulative amount of data sent before receiving the confirmation message for the seventh TCP message to exceed the size of the TCP receive window.

[0226] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here. Since the communication device 100 provided in this embodiment can execute the above TCP sending rate adjustment method, the technical effect that can be obtained can refer to the above method embodiment, which will not be repeated here.

[0227] In this embodiment, the communication device 100 is presented in the form of dividing various functional modules in an integrated manner. The "module" here may refer to a specific ASIC, a circuit, a processor and a memory that executes one or more software or firmware programs, an integrated logic circuit, and / or other devices that can provide the above functions. In a simple embodiment, those skilled in the art can imagine that the communication device 100 can be used Fig.11 The form of the communication device 110 is shown.

[0228] Fig.11 A schematic diagram of the structure of another communication device provided in an embodiment of the present application, such as Fig.11 As shown, the communication device 110 includes one or more processors 1101, a communication line 1102, and at least one communication interface ( Fig.11 The communication interface 1103 and a processor 1101 are used as examples for illustration only. Optionally, a memory 1104 may also be included.

[0229] The processor 1101 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.

[0230] The communication line 1102 may include a pathway for communication between different components.

[0231] The communication interface 1103 may be a transceiver module for communicating with other devices or communication networks, such as Ethernet, RAN, wireless local area networks (WLAN), etc. For example, the transceiver module may be a device such as a transceiver or a transceiver. Optionally, the communication interface 1103 may also be a transceiver circuit located in the processor 1101 to implement signal input and signal output of the processor.

[0232] The memory 1104 may be a device with a storage function. For example, it may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a communication line 1102. The memory may also be integrated with the processor.

[0233] The memory 1104 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 1101. The processor 1101 is used to execute the computer-executable instructions stored in the memory 1104, thereby implementing the TCP sending rate adjustment method provided in the embodiment of the present application.

[0234] Alternatively, optionally, in an embodiment of the present application, the processor 1101 may also perform processing-related functions in the TCP sending rate adjustment method provided in the following embodiment of the present application, and the communication interface 1103 is responsible for communicating with other devices or communication networks, which is not specifically limited in the embodiment of the present application.

[0235] Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.

[0236] In a specific implementation, as an embodiment, the processor 1101 may include one or more CPUs, such as Fig.11 CPU0 and CPU1 in.

[0237] In a specific implementation, as an embodiment, the communication device 110 may include multiple processors, such as Fig.11The processor 1101 and the processor 1107 in the embodiment of the present invention are shown in FIG. 1 . Each of these processors may be a single-core processor or a multi-core processor. The processors here may include but are not limited to at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller unit (MCU), or an artificial intelligence processor, etc., and each computing device may include one or more cores for executing software instructions to perform calculations or processing.

[0238] In a specific implementation, as an embodiment, the communication device 110 may further include an output device 1105 and an input device 1106. The output device 1105 communicates with the processor 1101 and may display information in a variety of ways. For example, the output device 1105 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 1106 communicates with the processor 1101 and may receive user input in a variety of ways. For example, the input device 1106 may be a mouse, a keyboard, a touch screen device, or a sensor device.

[0239] The communication device 110 may also be referred to as a communication device, which may be a general device or a dedicated device. For example, the communication device 110 may be a network device such as a router, a switch, a gateway, or a terminal device, or a controller in a network, or a device having Fig.11 The embodiment of the present application does not limit the type of the communication device 110.

[0240] Fig.11 The processor 1101 in the communication device 110 shown can call the computer-executable instructions stored in the memory 1104 to enable the communication device 110 to execute the TCP sending rate adjustment method in the above method embodiment.

[0241] Since the communication device 110 provided in this embodiment can execute the above-mentioned TCP sending rate adjustment method, the technical effects that can be obtained can refer to the above-mentioned method embodiment and will not be repeated here.

[0242] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0243] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0244] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0245] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0246] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0247] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0248] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or may contain one or more servers, data centers and other data storage devices that can be integrated with the medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0249] As used in this application, the terms "component", "module", "system", etc. are intended to refer to a computer-related entity, which can be hardware, firmware, a combination of hardware and software, software, or software in operation. For example, a component can be, but is not limited to: a process running on a processor, a processor, an object, an executable file, a thread in execution, a program, and / or a computer. As an example, an application running on a computing device and the computing device can both be components. One or more components can exist in a process and / or thread in execution, and a component can be located in a computer and / or distributed between two or more computers. In addition, these components can be executed from various computer-readable media with various data structures thereon. These components can communicate in a local and / or remote process manner, such as according to a signal with one or more data packets (for example, data from a component that interacts with another component in a local system, a distributed system, and / or interacts with other systems in a signal manner through a network such as the Internet).

[0250] The present application presents various aspects, embodiments, or features around a system that may include multiple devices, components, modules, etc. It should be understood and appreciated that each system may include additional devices, components, modules, etc., and / or may not include all of the devices, components, modules, etc. discussed in conjunction with the figures. In addition, combinations of these schemes may also be used.

[0251] In addition, in the embodiments of the present application, the word "exemplary" is used to indicate an example, illustration or description. Any embodiment or design described as "exemplary" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present concepts in a concrete way.

[0252] In the embodiments of the present application, information, signal, message, and channel can sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings they intend to express are consistent. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings they intend to express are consistent. "System" and "network" can sometimes be used interchangeably. When the distinction between them is not emphasized, the meanings they intend to express are consistent. For example, "communication network" also refers to "communication system".

[0253] The network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0254] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A transmission control protocol TCP sending rate adjustment method, characterized in that: The method comprises: The first device sends a first TCP message from a third device to the second device, where the first TCP message is a TCP data message; wherein the second device establishes a TCP connection with the third device, and the first device is a relay device between the second device and the third device; The first device receives a second TCP message from the second device, where the second TCP message is a confirmation message of the first TCP message; The first device modifies the value of the display congestion notification echo ECE field of the second TCP message to a first value, and modifies the value of the window size field of the second TCP message according to the first available bandwidth; wherein the first available bandwidth is the available bandwidth for the third device to send data to the second device, measured when the first device receives the second TCP message; the value of the modified window size field of the second TCP message has a first operational relationship with the first available bandwidth, and the first operational relationship is preconfigured in the first device; the ECE field of the modified second TCP message is used to indicate that the value of the modified window size field of the second TCP message is converted according to the first available bandwidth; The first device sends the modified second TCP message to the third device.

2. The method according to claim 1, characterized in that The first operation relationship is: the value of the window size field of the modified second TCP message=the first available bandwidth×a first parameter, and the first parameter is preconfigured in the first device.

3. The method according to claim 1 or 2, characterized in that: The second device is a TCP client, and the third device is a TCP server; Alternatively, the second device is a TCP server, and the third device is a TCP client.

4. The method according to any one of claims 1 to 3, characterized in that: Before the first device modifies the value of the ECE field of the second TCP message to a first value and modifies the value of the window size field of the second TCP message according to the first available bandwidth, the method further includes: The first device determines that the third device enables TCP rate adjustment technology.

5. The method according to claim 4, characterized in that The first device determines that the third device enables the TCP rate adjustment technology, including: The first device determines, based on preconfigured information, that the third device enables TCP rate adjustment technology.

6. The method according to claim 4, characterized in that In the case where the second device is a TCP server and the third device is a TCP client, the first device determines that the third device enables a TCP rate adjustment technology, including: The first device receives a third TCP message from the third device, where the third TCP message is a first handshake message for establishing the TCP connection, and the third TCP message includes a first identifier; The first device determines, according to the first identifier, that the third device enables the TCP rate adjustment technology.

7. The method according to claim 6, characterized in that The method further comprises: The first device sends the third TCP message to the second device; The first device receives a fourth TCP message from the second device, where the fourth TCP message is a second handshake message for establishing the TCP connection; The first device sets the value of the ECE field of the fourth TCP message to the first value, and modifies the value of the window size field of the fourth TCP message according to the second available bandwidth; wherein the second available bandwidth is the available bandwidth for the third device to send data to the second device, measured by the first device when receiving the fourth TCP message; the value of the modified window size field of the fourth TCP message has the first operation relationship with the second available bandwidth, and the ECE field of the modified fourth TCP message is used to indicate that the value of the modified window size field of the fourth TCP message is converted according to the second available bandwidth; The first device sends the modified fourth TCP message to the third device, and the modified fourth TCP message instructs the first device to enable TCP rate adjustment technology.

8. The method according to claim 4, characterized in that In the case where the second device is a TC client and the third device is a TCP server, the first device determines that the third device enables a TCP rate adjustment technology, including: The first device receives a fifth TCP message from the third device, where the fifth TCP message is a second handshake message for establishing a TCP connection, and the fifth TCP message includes a first identifier; The first device determines, according to the first identifier, that the third device enables the TCP rate adjustment technology.

9. The method according to claim 8, characterized in that The method further comprises: The first device sends the fifth TCP message to the second device; The first device receives a sixth TCP message from the second device, where the sixth TCP message is a third handshake message for establishing the TCP connection; The first device sets the value of the ECE field of the sixth TCP message to the first value, and modifies the value of the window size field of the sixth TCP message according to the third available bandwidth; wherein the third available bandwidth is the available bandwidth for the third device to send data to the second device, measured when the first device receives the sixth TCP message; the value of the modified window size field of the sixth TCP message has the first operation relationship with the third available bandwidth, and the modified ECE field of the sixth TCP message is used to indicate that the value of the modified window size field of the sixth TCP message is converted according to the third available bandwidth; The first device sends a modified sixth TCP message to the third device, where the modified sixth TCP message instructs the first device to enable TCP rate adjustment technology.

10. A method for adjusting the transmission control protocol TCP sending rate, characterized in that: include: The third device sends a first TCP message to the first device at a first sending rate, the destination of the first TCP message is the second device, and the first TCP message is a TCP data message; the second device establishes a TCP connection with the third device, and the first device is a relay device between the second device and the third device; The third device receives a modified second TCP message from the first device, where the second TCP message is a confirmation message of the first TCP message sent by the second device; the value of the Explicit Congestion Notification Echo ECE field of the modified second TCP message is a first value, and the value of the Window Size field of the modified second TCP message is obtained by conversion based on the first available bandwidth; the first available bandwidth is the available bandwidth for the third device to send data to the second device, measured when the first device receives the second TCP message; The third device determines the first available bandwidth according to the value of the window size field of the modified second TCP message and a first operation relationship; wherein the first operation relationship is preconfigured in the third device; The third device adjusts the first sending rate to a second sending rate according to the first available bandwidth.

11. The method according to claim 10, characterized in that The third device is a TCP client, and the second device is a server; Before the third device sends the first TCP message, the method further includes: The third device sends a third TCP message to the first device, the destination of the third TCP message is the second device, and the third TCP message is a first handshake message used to establish the TCP connection; the third TCP message includes a first identifier, and the first identifier is used to instruct the third device to enable the TCP rate adjustment technology; The third device receives a modified fourth TCP message from the first device, where the fourth TCP message is a second handshake message sent by the second device for establishing the TCP connection; the value of the ECE field of the modified fourth TCP message is a first value, and the value of the window size field of the modified fourth TCP message is obtained by conversion according to the second available bandwidth; the second available bandwidth is an available bandwidth for the third device to send data to the second device, measured when the first device receives the fourth TCP message; The third device determines, according to the modified fourth TCP message, that the first device enables the TCP rate adjustment technology.

12. The method according to claim 11, characterized in that The method further comprises: The third device sets an initial sending rate according to the second available bandwidth.

13. The method according to claim 10, characterized in that The second device is a TCP client, and the third device is a server; Before the third device sends the first TCP message, the method further includes: The third device sends a fifth TCP message to the first device, the destination of the fifth TCP message is the second device, and the fifth TCP message is a second handshake message used to establish the TCP connection; the fifth TCP message includes a first identifier, and the first identifier is used to instruct the third device to enable the TCP rate adjustment technology; The third device receives a modified sixth TCP message from the first device, where the sixth TCP message is a third handshake message sent by the second device for establishing the TCP connection; the value of the ECE field of the modified sixth TCP message is a first value, and the value of the window size field of the modified sixth TCP message is obtained by conversion according to the third available bandwidth; the third available bandwidth is an available bandwidth for the third device to send data to the second device, measured when the first device receives the sixth TCP message; The third device determines, based on the modified sixth TCP message, that the first device enables the TCP rate adjustment technology.

14. The method according to claim 13, characterized in that The method further comprises: The third device sets an initial sending rate according to the third available bandwidth.

15. The method according to any one of claims 10, 11 or 13, characterized in that: The initial sending rate of the third device is preconfigured.

16. The method according to any one of claims 10 to 15, characterized in that: The method further comprises: The third device sends a seventh TCP message at a third sending rate; The third device continues to send TCP data packets at the third sending rate until receiving an acknowledgment packet of the seventh TCP packet; The cumulative amount of data sent by the third device before receiving the confirmation message of the seventh TCP message is allowed to exceed the size of the TCP receiving window.

17. The method according to any one of claims 10 to 16, characterized in that: The first operation relationship is: the value of the window size field of the modified second TCP message=the first available bandwidth×a first parameter, and the first parameter is preconfigured in the third device.

18. The method according to any one of claims 10 to 17, characterized in that: The second device is a TCP client, and the third device is a TCP server; Alternatively, the second device is a TCP server, and the third device is a TCP client.

19. A communication device, characterized in that: The communication device comprises: a processor and a memory; The memory is used to store computer instructions. When the communication device is running, the processor is used to execute the computer instructions in the memory so that the communication device executes the TCP sending rate adjustment method as described in any one of claims 1-9 or 10-18.

20. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the TCP sending rate adjustment method as described in any one of claims 1-9 or 10-18.

Citation Information

Cited By

  • Communication method and device

    CN120151036A