Congestion sensing method, round-trip delay calculation method and communication equipment

By carrying transmission indication information in the data packet, the sending device can easily sense the network congestion situation, solve the problems of complexity and equipment support requirements in the prior art, and realize efficient network management.

CN119697114APending Publication Date: 2025-03-25HUAWEI TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311238575.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-22
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

The prior art has complexity in network congestion management, and requires the support of all forwarding devices to effectively perceive network congestion.

Method used

By carrying transmission indication information in the data packet, the transmitting device can send multiple data packets and determine the network congestion status based on the transmission indication information in the received confirmation packet.

Benefits of technology

It realizes convenient perception of network congestion, avoids complex mechanism requirements, and improves network management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119697114A_ABST
    Figure CN119697114A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a congestion sensing method, a round-trip delay calculation method and communication equipment. The method comprises: a first device sending a plurality of data messages, each of the plurality of data messages comprising transmission indication information, the transmission indication information being used for indicating the number of times of transmission or retransmission of data carried by each data message; the first equipment receives one or more acknowledgement messages corresponding to part or all of the data messages, wherein each acknowledgement message in the one or more acknowledgement messages comprises transmission indication information of the corresponding data message; and the first device determines the network congestion condition according to the one or more acknowledgement messages. According to the congestion sensing method provided by the embodiment of the invention, the equipment can sense the network congestion condition without a complicated mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communications, and relate to a congestion perception method, a round-trip delay calculation method, and a communication device. Background Art

[0002] The congestion management mechanism can control excessive data transmission in the network, avoid excessive network load, and reduce the possibility of data loss.

[0003] Existing congestion management mechanisms either mainly involve compensation after congestion occurs, or require the support of all forwarding devices in the network to perceive the network congestion status, which is relatively complicated. Summary of the invention

[0004] The embodiments of the present application provide a congestion perception method, a round-trip delay calculation method and a communication device, and the device can conveniently perceive the network congestion status.

[0005] In a first aspect, a congestion perception method is provided, comprising: a first device sends multiple data packets, each of the multiple data packets includes transmission indication information, and the transmission indication information is used to indicate the number of transmissions or retransmissions of data carried by each data packet; the first device receives one or more confirmation messages corresponding to part or all of the multiple data packets, each of the one or more confirmation messages includes transmission indication information of the corresponding data packet; the first device determines the network congestion status based on the one or more confirmation messages.

[0006] The transmission indication information indicates the number of transmissions or retransmissions of the data carried by each data message. The transmission indication information may be positively correlated with the number of transmissions or retransmissions, or negatively correlated with the number of transmissions or retransmissions. Through the transmission indication information, the receiving device may know the number of retransmissions or transmissions of the data. By confirming the transmission indication information in the message, the first device as the sending device may also know the number of times the receiving device has received the data retransmitted or sent by the first device.

[0007] Optionally, the first device may also send a data packet, wherein the data packet includes transmission indication information, and the transmission indication information is used to indicate the number of transmissions or retransmissions of data carried by the data packet; the first device receives a confirmation message corresponding to the data packet, each confirmation message in the confirmation message includes the transmission indication information of the corresponding data packet; the first device determines the network congestion status based on the confirmation message.

[0008] In this embodiment, the first device is a data sending device, and the first device carries transmission indication information in a data packet so that after the receiving device receives the data packet, the first device can also carry corresponding transmission indication information in a confirmation message, so that the first device can determine the network congestion status based on the confirmation message.

[0009] In combination with the first aspect, in some implementations of the first aspect, the first device determines the network congestion status based on the one or more confirmation messages, including: the first device determines a first transmission indication value of data associated with the one or more confirmation messages based on the one or more confirmation messages, the first transmission indication value being determined based on the number of transmissions or retransmissions of the data associated with the one or more confirmation messages; the first device determines the network congestion status based on the first transmission indication value.

[0010] The data associated with one or more confirmation messages may be all the data confirmed by the one or more confirmation messages. The confirmation message may determine the data with continuous sequence numbers received by the receiving end. For example, the first indication value may indicate the next sequence number of the maximum value among these sequence numbers, indicating that the receiving end has received all the data with sequence numbers before the first indication value. Then the data associated with the one or more confirmation messages is all the data indicated by the first indication value.

[0011] In addition to the first indication value, the confirmation message may also include a second indication value, the second indication value indicating data with non-continuous sequence numbers received by the receiving end. Thus, the data associated with the one or more confirmation messages includes the data indicated by the first indication value and the data indicated by the second indication value.

[0012] For an introduction to the first indication value and the second indication value, please refer to the following description.

[0013] Once data associated with one or more confirmation messages are determined, a first transmission indication value may be determined based on relevant information of the data, and the network congestion status may be further determined.

[0014] In combination with the first aspect, in some implementations of the first aspect, the first transmission indication value is used to indicate an average number of transmissions or an average number of retransmissions of data associated with the one or more confirmation messages.

[0015] The first transmission indication value may indicate the average number of transmissions or retransmissions of the data, that is, it has a certain correspondence with the average number of transmissions or retransmissions. For example, it may be the average value itself, or it may be a value obtained by a certain calculation of the average value, so that the first device may determine the network congestion status according to the first transmission indication value.

[0016] Optionally, the first device may directly determine the network congestion status based on the transmission indication information carried in the one or more confirmation messages.

[0017] In combination with the first aspect, in some implementations of the first aspect, the first transmission indication value is positively correlated with an average number of transmissions or an average number of retransmissions of data associated with one or more confirmation messages, and the first device determines the network congestion status based on the first transmission indication value, including: when the first transmission indication value is greater than or equal to a first preset threshold, the first device determines that it is in a network congestion state; when the first transmission indication value is less than the first preset threshold, the first device determines that it is not in a network congestion state.

[0018] The average value of the number of transmissions or the average value of the number of retransmissions may also be referred to as the average number of transmissions or the average number of retransmissions.

[0019] When the first transmission indicator value is positively correlated with the average value of the number of transmissions or the average value of the number of retransmissions of the data, the first transmission indicator value may be the average value of the number of transmissions or the average value of the number of retransmissions of the data, or may be a value obtained by a certain calculation of the average value of the number of transmissions or the average value of the number of retransmissions. The larger the first transmission indicator value, the more retransmissions of the data or the more data is retransmitted, indicating that the network is more congested.

[0020] Optionally, instead of using the average value of the number of transmissions or the average value of the number of retransmissions or the value obtained by a certain calculation of the above average values ​​as indicators for judging the network congestion status, it is also possible to use, for example, the maximum value, minimum value, median and other indicators or the values ​​obtained by processing or certain calculation of these indicators as indicators to judge the network congestion status. This application does not impose any restrictions on this.

[0021] In combination with the first aspect, in some implementations of the first aspect, when the first transmission indication value is greater than or equal to a first preset threshold, the first device determines that it is in a network congestion state, including: when the first transmission indication value is greater than or equal to the first preset threshold and less than a second preset threshold, the first device determines that it is in a first network congestion state; when the first transmission indication value is greater than or equal to the second preset threshold, the first device determines that it is in a second network congestion state, and the congestion level of the first network congestion state is less than the congestion level of the second network congestion state.

[0022] Optionally, the first device may classify the network congestion status into more levels according to demand, for example, into a first network congestion status, a second network congestion status... an Nth network congestion status, which is not limited in this application.

[0023] In combination with the first aspect, in some implementations of the first aspect, the method also includes: the first device determines the sending time of each data message corresponding to the one or more confirmation messages based on the one or more confirmation messages; the first device determines the round-trip time RTT of each data message based on the sending time of each data message and the receiving time of the corresponding confirmation message.

[0024] In an embodiment of the present application, the first device can also obtain the sending time of the data message corresponding to the confirmation message, and calculate the RTT of the data message in combination with the receiving time of the confirmation message, so that the timeout retransmission time can be adjusted subsequently.

[0025] In combination with the first aspect, in some implementations of the first aspect, the method also includes: the first device determines the RTT of the multiple data packets corresponding to the same confirmation message based on the RTT of each data packet in the multiple data packets corresponding to the same confirmation message, and the RTT of the multiple data packets corresponding to the same confirmation message is the maximum value of the RTT value of each data packet in the multiple data packets.

[0026] For multiple data packets corresponding to the same confirmation message, the first device may use the RTT of the data packet with the largest RTT among the multiple data packets as the RTT of the multiple data packets, thereby reducing the subsequent adjustment of the timeout retransmission time and the overhead of data processing.

[0027] In combination with the first aspect, in some implementations of the first aspect, the method also includes: the first device records a first relationship, wherein the first relationship is used to indicate a relationship between at least one sending time of data and transmission indication information in a data packet carrying the data and sent corresponding to the sending time; the first device determines the sending time of each data packet corresponding to the one or more confirmation messages based on the one or more confirmation messages, including: the first device determines the sending time of each data packet corresponding to the one or more confirmation messages based on the transmission indication information in the one or more confirmation messages and the first relationship.

[0028] The first relationship can be expressed by an array, a list or other methods. Since the sending time does not need to be carried by the message in the embodiment of the present application, the message transmission overhead can be reduced, and the accuracy of RTT can be set according to needs without being limited by the length of the timestamp field set in the message.

[0029] In combination with the first aspect, in some implementations of the first aspect, the transmission of the data message and / or the confirmation message uses the transmission control protocol TCP, the smart flow control SFC protocol or the fast UDP Internet connection QUIC protocol communication.

[0030] In combination with the first aspect, in some implementations of the first aspect, the length of the transmission indication information is two bits.

[0031] In a second aspect, a congestion perception method is provided, including: a second device receives one or more data packets, each of the one or more data packets includes transmission indication information, and the transmission indication information is used to indicate the number of transmissions or retransmissions of data carried by each data packet; the second device determines the network congestion status based on the one or more data packets.

[0032] In this embodiment, the second device can directly determine the degree of network congestion based on the transmission indication information in the data message without involving complex mechanisms, and the receiving device can also perceive the network congestion status, thereby facilitating faster congestion control.

[0033] In combination with the second aspect, in some implementations of the second aspect, the second device confirms the network congestion status based on the one or more data packets, including: the second device determines the second transmission indication value of the one or more data packets based on the transmission indication information in the one or more data packets; the second device determines the network congestion status based on the second transmission indication value.

[0034] In combination with the second aspect, in some implementations of the second aspect, the second transmission indication value is an average value of the transmission indication information in the one or more data packets.

[0035] In combination with the second aspect, in some implementations of the second aspect, the value of the transmission indication information is positively correlated with the number of data transmissions or retransmissions, and the second device determines the network congestion status based on the second transmission indication value, including: when the second transmission indication value is greater than or equal to a third preset threshold, the second device determines that it is in a network congestion state; when the second transmission indication value is less than the third preset threshold, the second device determines that it is not in a network congestion state.

[0036] In combination with the second aspect, in some implementations of the second aspect, when the second transmission indication value is greater than or equal to a third preset threshold, the second device determines that it is in a network congestion state, including: when the second transmission indication value is greater than or equal to the third preset threshold and less than a fourth preset threshold, the second device determines that it is in a third network congestion state; when the second transmission indication value is greater than or equal to the fourth preset threshold, the second device determines that it is in a fourth network congestion state, and the congestion level of the third network congestion state is less than the congestion level of the fourth network congestion state.

[0037] In combination with the second aspect, in some implementations of the second aspect, the method also includes: the second device sends one or more confirmation messages, each of the one or more confirmation messages is used to confirm at least one data message among the one or more data messages, and each confirmation message includes transmission indication information of the corresponding data message.

[0038] In combination with the second aspect, in some implementations of the second aspect, the method further includes: the second device adjusting the number of data packets corresponding to each confirmation message according to the network congestion condition.

[0039] In combination with the second aspect, in some implementations of the second aspect, the transmission of the data packet and / or the confirmation packet uses the transmission control protocol TCP, the smart flow control SFC protocol or the fast UDP Internet connection QUIC protocol communication.

[0040] In combination with the second aspect, in some implementations of the second aspect, the length of the transmission indication information is two bits.

[0041] In a third aspect, a round-trip delay calculation method is provided, including: a first device sends one or more data packets, each of the one or more data packets includes transmission indication information, and the transmission indication information is used to indicate the number of transmissions or retransmissions of data carried by each data packet; the first device receives one or more confirmation messages corresponding to part or all of the one or more data packets, each of the one or more confirmation messages includes transmission indication information of the corresponding data packet; the first device determines the sending time of each data packet corresponding to the one or more confirmation messages based on the one or more confirmation messages; the first device determines the round-trip delay RTT of each data packet based on the sending time of each data packet and the receiving time of the corresponding confirmation message.

[0042] In combination with the third aspect, in some implementations of the third aspect, the method also includes: the first device determines the RTT of the multiple data packets corresponding to the same confirmation message based on the RTT of each data packet in the multiple data packets corresponding to the same confirmation message, and the RTT of the multiple data packets corresponding to the same confirmation message is the maximum value of the RTT value of each data packet in the multiple data packets.

[0043] In combination with the third aspect, in some implementations of the third aspect, the method also includes: the first device records a first relationship, wherein the first relationship is used to indicate a relationship between at least one sending time of data and transmission indication information in a data packet carrying the data and sent corresponding to the sending time; the first device determines the sending time of each data packet corresponding to the one or more confirmation messages based on the one or more confirmation messages, including: the first device confirms the sending time of each data packet corresponding to the one or more confirmation messages based on the transmission indication information in the one or more confirmation messages and the first relationship.

[0044] In combination with the third aspect, in some implementations of the third aspect, the transmission of the data message and / or the confirmation message uses the transmission control protocol TCP, the smart flow control SFC protocol, or the fast UDP Internet connection QUIC protocol communication.

[0045] In combination with the third aspect, in some implementations of the third aspect, the length of the transmission indication information is two bits.

[0046] In a fourth aspect, a communication device is provided, characterized in that it includes: a processor, wherein the processor is used to couple with a memory, read and execute instructions and / or program codes in the memory to execute the method described in the first aspect or any one of the implementations of the first aspect to the third aspect or any one of the implementations of the third aspect.

[0047] The fifth aspect includes: a logic circuit, which is used to couple with an input / output interface and transmit data through the input / output interface to execute the method described in the first aspect or any implementation of the first aspect to the third aspect or any implementation of the third aspect.

[0048] In a sixth aspect, the computer-readable medium stores a program code, and when the computer program code runs on a computer, the computer executes the method as described in executing the first aspect or any one of the implementations of the first aspect to the third aspect or any one of the implementations of the third aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 It is a schematic diagram of a system architecture applicable to an embodiment of the present application.

[0050] Figure 2 It is a schematic flowchart of a congestion perception method provided in an embodiment of the present application.

[0051] Figure 3 This is a schematic diagram of the interaction between a first device and a second device provided in an embodiment of the present application.

[0052] Figure 4This is a schematic diagram of the structure of the TCP protocol and SFC protocol message header.

[0053] Figure 5 It is a schematic block diagram of a communication device provided in an embodiment of the present application.

[0054] Figure 6 is a schematic block diagram of another communication device provided in an embodiment of the present application DETAILED DESCRIPTION

[0055] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0056] Figure 1 FIG. 1 is a schematic diagram of a system architecture applicable to an embodiment of the present invention. For ease of explanation, only the part related to the embodiment of the present invention is provided. Figure 1 As shown, see Figure 1 A system 100 is provided, which includes a first device 101, a second device 102 and a network 103; the first device 101 is interconnected with the second device 102 through the network 103, and data interaction between the first device 101 and the second device 102 is realized through the network 103; the first device 101 can send a data packet or a data message to the second device 102 through the network 103, and vice versa, the second device 102 can also send a data packet or a data message to the first device 101 through the network 103; the network 103 can be established based on the Transmission Control Protocol / Internet Protocol (TCP / IP protocol), based on the smart flow control (SFC) protocol, or based on the quick user datagram protocol Internet connection (QUIC) protocol. The network 103 can also be established through other protocols, which is not limited in the present application.

[0057] Optionally, the network 103 may include a forwarding device such as a switch or a router for forwarding data packets, and the data packets exchanged between the first device 101 and the second device 102 are forwarded through the forwarding device.

[0058] In the present application, the first device 101 and the second device 102 may be terminal devices, network devices, servers, etc., which are electronic devices with data processing functions that are composed of electronic devices; the electronic device is composed of electronic components such as integrated circuits, transistors, and electron tubes; software composed of program instructions can be run on the electronic device to realize functions such as data processing and controlling other devices.

[0059] Optionally, the first device 101 is directly connected to the second device 102 for communication, and data packets exchanged between the first device 101 and the second device 102 do not need to be forwarded through a forwarding device (such as a router) in the network 103 .

[0060] Optionally, the first device 101 may perform peer-to-peer data message interaction with the second device 102. The first device 101 may send a data message to the second device 102, and correspondingly, the second device 102 may also send a data message to the first device 101.

[0061] Optionally, Figure 1 In the provided system 100, a first device 101 performs a master-slave data message interaction with a second device 102 through a network 103; for example, the first device 101 acts as a server, and the second device 102 acts as a client corresponding to the server in the master-slave communication. The first device 101 can send a data message to the second device 102, such as when the second device 102 downloads an audio or video file from the first device 101, the first device 101 sends the data message carrying the audio or video file to the second device 102; correspondingly, the second device 102 can also send a data message to the first device 101, such as when the second device 102 uploads a text file to the first device 101, the second device 102 sends the data message carrying the text file to the first device 101.

[0062] In such Figure 1 When the devices in the system 100 shown communicate, network congestion may occur, which may increase the delay of receiving data packets by the receiving device and affect network performance.

[0063] Network congestion refers to the situation where there are too many packets transmitted in the network, but the resources of the storage and forwarding nodes in the network are limited, resulting in a decrease in network transmission performance. When network congestion occurs, data loss, increased latency, and decreased throughput generally occur. When network congestion is severe, it can lead to congestion collapse. With the rapid increase in the volume of high-throughput applications (such as online audio and video playback applications), the amount of data that needs to be transmitted through the network has also increased dramatically, requiring the network to maintain a high throughput. If the congestion control measures used to coordinate network resources are not reasonable, even if the network bandwidth is sufficient, it will seriously affect the good use of high-throughput applications.

[0064] Congestion management mechanism can control excessive data transmission in the network, avoid excessive network load, and reduce the possibility of data loss. In the Transmission Control Protocol (TCP) / Internet Protocol (IP) protocol, by default, only the sender can perceive the congestion condition. With the help of the transmission control protocol (ECN) mechanism, both the sender and the receiver can perceive the congestion.

[0065] Specifically, a switch or other device with switch function will add an ECN mark to the IP header of the message to be forwarded to notify the receiving device that the network is congested. After receiving the message containing the ECN mark, the receiving device can determine that the network is congested on the switch, and the receiving device can send a response message to the sending device. After receiving the response message, the sending device can reduce the message sending rate, which can alleviate the congestion of the switch, thereby achieving the purpose of controlling network congestion without discarding messages.

[0066] However, the above congestion mechanism relies on the IP layer and requires all forwarding node devices on the transmission path to support the mechanism. Each forwarding node device needs to configure the ECN threshold of the queue, which is relatively complicated.

[0067] The embodiment of the present application provides a congestion perception method, which does not require a complex mechanism, and the device can perceive the network congestion condition in a simple and convenient manner.

[0068] like Figure 2 As shown, the method includes:

[0069] S210, the first device sends one or more data packets to the second device.

[0070] Each of the one or more data packets includes transmission indication information, and the transmission indication information is used to indicate the number of transmissions or retransmissions of data carried by each data packet.

[0071] The first device may send data packets according to the sending window. The length of the sending window refers to the maximum number of data packets that can be sent within a round trip time (RTT) of the first device. When the first device receives a confirmation message sent by the second device, the sending window may move forward by the same amount as the number of data packets confirmed by the confirmation message.

[0072] In S210, the transmission indication information may indicate the number of transmissions or retransmissions of the data carried by each data message, that is, the number of times the data in the data message is sent or retransmitted. For example, the transmission indication information may be the number of retransmissions of the data. When the data is sent for the first time, the transmission indication information is 0, and the transmission indication information may increase as the number of retransmissions increases. For another example, the transmission indication information may be the number of transmissions of the data. When the data is sent for the first time, the transmission indication information is 1, and the transmission indication information may increase as the number of transmissions increases.

[0073] Take an acknowledgment message confirming a data message and the transmission indication information as the number of retransmissions of the data as an example. Figure 3 A schematic diagram showing interaction between a first device and a second device is shown.

[0074] In S1, the first device sends a data message with a sequence number of N to the second device. The data message includes data N and carries a transmission indication TI=0 ( Figure 3 TI is transmission indication information), when the second device receives the data message, the second device returns a confirmation message to the first device in S2 to confirm the data N, and the confirmation message may carry the value of the transmission indication information in the data message (TI=0).

[0075] In S3, the first device sends a data message with a sequence number of N+1 to the second device, and the data message includes data N+1, which carries corresponding transmission indication information (TI=0). Due to network conditions, such as packet loss or delay of the data message, when the preset conditions are met, the first device will be triggered to retransmit the data N+1, for example, when the preset time is reached from sending the data message and the first device still has not received the corresponding confirmation message, retransmission can be performed.

[0076] In S4, the first device retransmits data N+1, and increases the value of the transmission indication information by 1, and carries TI=1 in the data message. When the retransmission condition is met again and the first device still does not receive the confirmation message for confirming data N+1, retransmission is triggered again.

[0077] In S5, the first device retransmits data N+1 again, and increases the value of the transmission indication information by 1, and carries TI=2 in the data message. The second device receives the data message and can reply a corresponding confirmation message in S6, which carries the TI value in the data message, that is, carries (TI=2) in the confirmation message.

[0078] Optionally, the transmission indication information may also be mapped to the number of retransmissions or transmissions of the data, such as being positively correlated or negatively correlated or other mapping relationships, and the present application does not limit this. The following mainly takes the transmission indication information as the number of retransmissions of the data as an example to introduce the technical solution of the embodiment of the present application.

[0079] The transmission indication information may be set at a fixed position in the header of the data message. Schematically, when the first device and the second device communicate using the TCP protocol, the transmission indication information may be set at a reserved field position. Figure 4 (a) shows the structure of the TCP message header, where the source port and destination port are used to identify the application processes at the sending and receiving ends. The sequence number field carries the sequence number of the first data byte in the message payload, indicating the data in the message. The acknowledgment number field represents the value of the sequence number field of the message received by the receiving device. The window size field indicates the size of the receiving device's receive buffer. TCP also has eight control bits or flags:

[0080] CWR: When the flag is 1, it notifies the other party that the congestion window has been reduced;

[0081] ECE: When the flag is 1, the other party is notified that the network from the other end to this side is congested;

[0082] URG: When the flag is 1, the urgent pointer is valid;

[0083] ACK: When the flag is 1, the confirmation number is valid;

[0084] PSH: When the flag is 1, the data is immediately sent to the application layer for processing; when the flag is 0, the data is cached first;

[0085] RST: When the flag is 1, the abnormality is reset;

[0086] SYN: When the flag is 1, it is the synchronization flag, set to 1 to establish a connection;

[0087] FIN: When the flag is 1, it is a termination flag and requests to release the connection.

[0088] When the first device and the second device use a smart flow control (SFC) protocol, the transmission indication information may be carried in a transmission index field (TI). Figure 4 (b) shows the structure of the SFC message header.

[0089] The V field is used to represent the version number, which allows the protocol to be extended to be compatible with new and old messages.

[0090] The P field is used to indicate the priority.

[0091] The TI field is used to characterize the transmission index. The length of TI can be two bits, and two binary bits are used to indicate the number of retransmissions of the data. When the number of retransmissions is less than or equal to 3, the TI field increases as the number of retransmissions increases. When the number of retransmissions is greater than 3, overflow may occur due to the bit number limitation, and the TI field no longer changes. Exemplarily, when the data is first sent, the value of the TI field can be 0, represented by 00. When the above data is retransmitted, the value of the TI field can increase, and become 01, 10, 11 in turn, that is, the value of the TI field is 1, 2, 3. When the number of retransmissions exceeds 3, the TI field no longer changes, and remains 11, indicating 3.

[0092] The M field is a merge indication, which is used to indicate whether the current message is merged with the following message.

[0093] The Window field is used to indicate the length of the receiving window, which can be the number of messages.

[0094] The O field is used to indicate whether an optional header exists, where the number of optional headers can be 0-N, where N is a positive integer.

[0095] Of course, the communication is not limited to the above two protocols. Data packets can also be communicated through, for example, the quick UDP internet connection (QUIC) protocol or other protocols, and this application does not limit this.

[0096] In the embodiment of the present application, the length of the transmission indication information may be 2 bits. When the TCP protocol is used, two of the reserved fields may be used to carry the transmission indication information; when the SFC protocol is used, the two-byte TI field may be used to carry the transmission indication information.

[0097] When the value of the number of retransmissions does not overflow the expression range of the two bits, the value of the transmission indication information may be increased by one as the number of retransmissions increases; when the value of the number of retransmissions overflows the expression range of the two bits, the value of the transmission indication information may no longer change.

[0098] Taking binary as an example, the range that 2 bits can express is 0-3. When the number of retransmissions is less than or equal to 3, the value of the transmission indication information can change from 0 to 3 as the number of retransmissions increases, and the corresponding binary numbers are 00, 01, 10, and 11. When the number of retransmissions is greater than 3, the value of the transmission indication information no longer changes and remains 3.

[0099] When the number of retransmissions is greater than 3, the link is severely congested. Even if the value of the transmission indication information does not change any more, it has little effect on the judgment of the degree of network congestion.

[0100] When the first device and the second device use other protocols for data transmission, the transmission indication information can also be set in an idle field or multiplex other fields with retransmission indication effect, which will not be described in detail here.

[0101] It should be understood that although the above text introduces the TCP protocol or the SFC protocol, taking the transmission indication information set in the reserved field of the TCP message or the TI field of the multiplexed SFC protocol as an example to introduce the technical solution of the embodiment of the present application, those skilled in the art can know that the length of the transmission indication information is not limited to only 2 bytes, nor is it limited to being set only in the above-mentioned field. If feasible, the transmission indication information can also be set in other fields of the message, which will not be repeated here.

[0102] S220: The second device determines a network congestion status according to part or all of the one or more data packets.

[0103] Since there may be a situation where data packets are lost or delayed, the second electronic device may receive part of the one or more data packets. In S220, the data packets used by the second device to determine the network status may be part or all of the one or more data packets sent by the first device in S210. The number of the part or all of the data packets may be one or more.

[0104] In an embodiment of the present application, when the first device and the second device determine the network congestion status, the network congestion status can be determined when a preset number of messages are received or a preset time period has passed.

[0105] The first device can make a judgment on the network congestion status when receiving a confirmation message corresponding to a first preset number of data messages or when a first preset time has passed. Exemplarily, the first device can make a judgment on the network congestion status when any one of the conditions of receiving a confirmation message corresponding to a first preset number of data messages and reaching a first preset time has been met. Specifically, when the first device first receives a confirmation message corresponding to a first preset number of data messages, the first device can make a judgment on the network congestion status after receiving the confirmation message corresponding to the first preset number of data messages; when the first preset time has passed first, that is, when the number of data messages corresponding to the confirmation messages received by the first device within the first preset time is less than the first preset number, the first device can make a judgment on the network congestion status after the first preset time has passed.

[0106] Illustratively, the first preset number can be the length of m sending windows, that is, the maximum number of messages that can be sent within m RTT durations, where m is a positive integer; the first preset duration can be n RTT durations, where n is a positive integer. Of course, the first preset number and the first preset duration can also be set as required.

[0107] Taking the first preset number of confirmation messages corresponding to 100 data messages and the first preset duration as an RTT duration as an example, if the first device first receives the confirmation messages corresponding to the 100 data messages, then after receiving these confirmation messages, the first device can use the relevant information of the confirmation messages corresponding to the 100 data messages to judge the network congestion status. If the first device does not receive the confirmation messages corresponding to the 100 data messages after an RTT duration, the first device can use the relevant information of the confirmation messages received within the RTT duration to judge the network congestion status.

[0108] In some embodiments, the first device can avoid repeated confirmation messages. Since data message delay may cause data message retransmission, the confirmation message receives two or more data messages carrying the same data and replies to the corresponding confirmation message. The confirmation message used to confirm the data message carrying the same data is a repeated confirmation message. Specifically, taking a confirmation message used to confirm a data message as an example, the first device will maintain a data queue, and the data queue includes data that has not been confirmed by the second device. If the confirmation message received by the first device confirms the data (data fragment) in the data queue, the first device can remove the data confirmed by the second device from the data queue, and the relevant confirmation message information can be used to judge the network congestion status. If the first device subsequently receives a confirmation message for the data that has been confirmed (caused by retransmission), that is, the data confirmed by the confirmation message is not in the data queue, then the relevant information of the confirmation message may have been used in the previous network congestion status judgment, and the information of the confirmation message can no longer be used to judge the current network congestion status.

[0109] In some embodiments, the first device may not consider whether the received confirmation message is repeated, that is, it may not consider whether different confirmation messages are used to confirm the same data. In this way, the first device can directly count the number of data messages corresponding to the received confirmation messages, and make a judgment on the network congestion status when the number reaches the first preset number. For example, the first confirmation message is used to confirm a data message, that is, when the first device makes a judgment on the network congestion status, it can make a judgment on the network congestion status when it receives 100 confirmation messages, even if the 100 confirmation messages may be used to confirm different data with a number less than 100.

[0110] For the second device at the receiving end, similarly, the second device can make a judgment on the network congestion status when it receives a second preset number of data packets or when a second preset time has passed. Exemplarily, the second device can make a judgment on the network congestion status when any one of the conditions of receiving a second preset number of data packets and reaching a second preset time has been met. Specifically, when the second device first receives a second preset number of data packets, the second device can make a judgment on the network congestion status after receiving the second preset number of data packets; when the second preset time has passed first, that is, when the number of data packets received by the second device within the second preset time is less than the second preset number, the second device can make a judgment on the network congestion status after the second preset time has passed. For details, please refer to the introduction of the network congestion status judgment of the first device, which will not be repeated here.

[0111] When determining the network congestion status, the second device may not care whether the data packet is a duplicate, so that different data packets with the same data may be used by the second device to calculate the network congestion status.

[0112] In S220, after receiving all or part of the one or more data packets, the second device can determine the network congestion status when the number of received data packets reaches a second preset number or the elapsed time reaches a second preset duration.

[0113] Since the transmission indication information in the data message indicates the number of transmissions or retransmissions of the data, for the second device, the number of transmissions or retransmissions is related to the degree of network congestion on the second device side. Therefore, the second device can determine the degree of network congestion based on the transmission indication information in the one or more data messages received above.

[0114] In an embodiment of the present application, the average value, maximum value, minimum value, mode, median, etc. of the transmission indication information in the above one or more data messages and the values ​​obtained by certain processing of these numbers can be used as indicators to judge the network congestion status, and the embodiment of the present application is not limited. That is, the second device can determine the second transmission indication value according to the transmission indication information in the above one or more data messages, and determine the network congestion status according to the second transmission indication value. The second transmission indication information can be the above average value, maximum value, minimum value, mode, median, etc. The second transmission indication value can also be the value obtained by certain calculation of these indicators.

[0115] Optionally, the network congestion level may also be determined based on the percentage of packets with different transmission indication information values ​​in the one or more data packets. In this case, the second transmission indication value may include the percentage of packets with different transmission indication information values.

[0116] As described above, when the second device determines the network congestion status, it will not consider whether the data packets are repeated. As long as the number of data packets reaches a second preset number or a second preset time has passed, it will use the transmission indication information in the data packets to determine the network congestion status.

[0117] Exemplarily, when the average value is used as an indicator to judge the network status, the second transmission indication value is the average value of the transmission indication information of the data packets received by the second device.

[0118] In some embodiments, the second device may determine whether the network is congested according to the second transmission indication value. Specifically, taking the positive correlation between the transmission indication information and the number of data transmissions or the number of retransmissions as an example, when the second transmission indication value is greater than or equal to the third preset threshold, the second device may determine that the network is in a congested state, and when the second transmission indication value is less than the third preset threshold, the second device may determine that the network is not in a congested state.

[0119] Furthermore, the second device may also classify the network in the congested state into different congestion levels. When the second transmission indication value is greater than or equal to the third preset threshold and less than the fourth preset threshold, the second device determines that it is in the third network congestion state, and when the second transmission indication value is greater than or equal to the fourth preset threshold, the second device determines that it is in the fourth network congestion state, wherein the congestion degree of the fourth network congestion state is greater than that of the third network congestion state.

[0120] Of course, for the judgment of the congestion level, the second device can also use more thresholds to divide the congestion into more levels, and make different congestion levels correspond to light congestion, moderate congestion, severe congestion, etc., which is not limited in this application. Exemplarily, when the second transmission indication value is greater than or equal to the third preset threshold and less than the fourth preset threshold, the second device determines that it is in the third network congestion state; when the second transmission indication value is greater than or equal to the fourth preset threshold and less than the fifth preset threshold, the second device determines that it is in the fourth network congestion state; when the second transmission indication value is greater than or equal to the fifth preset threshold, the second device determines that it is in the fifth network congestion state. Among them, the third network congestion state corresponds to light congestion, the fourth network congestion state corresponds to moderate congestion, and the fifth network congestion state corresponds to severe congestion.

[0121] Of course, the judgment of the congestion level in the present application is not limited to directly using the second transmission indication value, but can also use integer multiples of the second transmission indication value or values ​​obtained by other calculation methods to compare with the corresponding threshold value to determine the congestion level, for example, using 100 times the second transmission indication value to compare with the corresponding threshold value.

[0122] Illustratively, it is assumed that the second device uses 100 received data packets to confirm the network congestion status. The 100 data packets may include retransmitted data packets and / or non-retransmitted data packets. The second device can obtain transmission indication information from the corresponding field of the data packet, and can determine that it is in the third network congestion state.

[0123] When the network congestion status is determined by the percentage of data packets with different transmission indication information. Taking the number of retransmissions of data with the transmission indication information as an example, the percentage of retransmitted data packets in the one or more data packets (data packets whose transmission indication information is not 0) can be calculated, and by comparing the percentage with multiple thresholds, it can be determined whether the network is congested and / or the degree of congestion of the network. For details, please refer to the embodiment for judging the network congestion status based on the average value as an indicator, which will not be repeated here. Through the above process, the second device can determine the network congestion status of the receiving end. Furthermore, the second device can sense the degree of congestion, which is conducive to fine-tuning and controlling the congestion.

[0124] S230: The second device sends one or more confirmation messages corresponding to part or all of the one or more data messages.

[0125] In S230, after the second device receives part or all of the above-mentioned one or more data packets (some data packets may be lost or delayed), it can send one or more confirmation messages to the first device, each of the one or more confirmation messages is used to confirm at least one data packet, and each confirmation message includes transmission indication information of the corresponding data packet.

[0126] Specifically, the second device may obtain the transmission indication information in the data message and carry the corresponding transmission indication information in the corresponding confirmation message.

[0127] In an embodiment of the present application, one confirmation message may correspond to one or more data messages.

[0128] The second device sets the serial number of the data carried in the data message and the transmission indication information in the corresponding confirmation message, so that the first device can know the data message corresponding to the confirmation message after receiving the corresponding confirmation message, that is, know which data messages have been confirmed.

[0129] In the embodiment of the present application, the second device can update the number of data packets corresponding to the confirmation message according to the network congestion status. When the network is congested, the sending frequency of the confirmation message can be increased, that is, one confirmation message corresponds to a smaller number of data packets; when the network is relatively smooth, the sending frequency of the confirmation message can be reduced, that is, one confirmation message corresponds to a larger number of data packets. Therefore, when the network is not smooth, even if some confirmation messages are lost, the first device can also know that the second device has received the previous data message based on the confirmation message of the subsequent data message; and when the network is smooth, the first device is more likely to receive the confirmation message, and reducing the frequency of sending the confirmation message can reduce the overhead of sending the confirmation message.

[0130] S240: The first device determines a network congestion status according to part or all of the one or more confirmation messages.

[0131] In S240, some confirmation messages may be lost or delayed, so the first device may determine the network congestion status according to some confirmation messages.

[0132] In an embodiment of the present application, the confirmation message can be implemented using the following mechanism: the confirmation message includes confirmation of the data with consecutive sequence numbers that have been received, which can be indicated by a first indication value. The first indication value can be the next sequence number after the largest sequence number among the sequence numbers of these data, which means that the receiving end has received all data messages before this sequence number.

[0133] Exemplarily, when the first indication value in the confirmation message received by the first device is 20, the first device can determine that the second device has received all data messages before the sequence number 20.

[0134] Optionally, the confirmation message may also include confirmation of non-continuous data, which may be represented by a second indication value, where the second indication value includes a sequence number of the corresponding data or a start and end sequence number of the corresponding data.

[0135] Exemplarily, when the second indication value in the confirmation message received by the first device includes 19, 21, 23, 24, 25 or 19, 21, 23-25, the first device can determine that the second device has received data messages with sequence numbers 19, 21, 23, 24, 25.

[0136] In S240, the first device may confirm, based on the one or more confirmation messages, a first transmission indication value of data associated with the one or more confirmation messages, where the first transmission indication value is determined based on a number of transmissions of the data associated with the one or more confirmation messages.

[0137] Specifically, the first device may maintain a data list, which includes data that has not been confirmed by the second device. The data associated with one or more confirmation messages may include data in the data list among the data indicated by the first indication value (and the second indication value, if the confirmation message includes the second indication value) in the one or more confirmation messages (the data not in the data list may be retransmitted data, which may have been used in the previous determination of the network congestion status).

[0138] After the first device obtains data associated with one or more confirmation messages, it can obtain relevant information of the data based on the serial number of the data, for example, it can obtain the number of times the data is sent or retransmitted, thereby determining the network congestion status based on the number of times the data is sent or retransmitted.

[0139] Alternatively, in S240, the first device may directly confirm the network congestion status based on the one or more confirmation messages. Since the confirmation message carries the transmission indication information of the corresponding data message, the first device may directly obtain the transmission indication information in the one or more confirmation messages, and determine the network congestion status based on these transmission indication information. In this case, the first device may not need to query the relevant information of the data. As long as the number of data messages corresponding to the one or more confirmation messages meets the condition or the elapsed time meets the condition, the transmission indication information in the confirmation message is used to judge the network congestion status. At this time, the data message corresponding to the confirmation message is the data message for which the second device obtains the transmission indication information.

[0140] In this way, after the first device receives part or all of the confirmation messages sent by the second device, it can obtain data for calculating the degree of network congestion based on these confirmation messages, thereby judging the network congestion status.

[0141] In the embodiment of the present application, the first device can also determine whether the network is in a congested state in a similar manner to the second device, or further, can determine the degree of congestion the network is in. For example, the average value, median, ratio of different values ​​in these data, etc. can be used to judge the network congestion.

[0142] Taking the average value as an example, when the first device uses data associated with one or more confirmation messages to determine the network congestion status, the first device can calculate the average value of the number of transmissions or retransmissions of these data as the first transmission indication value; when the first device uses the transmission indication information in one or more confirmation messages, the first device can calculate the average value of these transmission indication information as the first transmission indication value. Similar to the judgment of the network congestion status by the second device described above, the first device can compare the first transmission indication value with the corresponding threshold value. The first device can determine that it is in a network congestion state when the first transmission indication value is greater than or equal to the first preset threshold value, and determine that it is not in a network congestion state when the first transmission indication value is less than the first preset threshold value.

[0143] Further, when the first transmission indication value is greater than or equal to the first preset threshold and less than the second preset threshold, the first device determines that it is in a first network congestion state; when the first transmission indication value is greater than or equal to the second preset threshold, the first device determines that it is in a second network congestion state, and the congestion degree of the first network congestion state is less than that of the second network congestion state.

[0144] The first device may also use multiples of the average value or a value obtained through certain calculations to judge the network congestion status, so that the first transmission indication value is related to the average value of the number of transmissions or the number of retransmissions. If the first transmission indication value is positively correlated with the average value of the number of transmissions or the number of retransmissions, it can still be judged according to the first preset threshold, the second preset threshold, etc. introduced in the previous article. For details, please refer to the previous introduction and will not be repeated here.

[0145] Through the technical solution of the embodiment of the present application, the first device can sense the network congestion status, and further, can sense the degree of congestion, thereby facilitating fine-grained adjustment and control of the congestion.

[0146] In an embodiment of the present application, the first device may record the sending time of the data message each time the data message is sent. Exemplarily, the sending time of each data message may be recorded in an array or list form with the data transmission information as an index. In an embodiment of the present application, the sending time of each data message is unique, but due to the retransmission mechanism, different data messages may carry the same data, that is, for the data in the data message, its sending time may be one or more, which are the sending time of one or more data messages carrying the data.

[0147] In addition to calculating the RTT of a single data message, the RTT of multiple data messages corresponding to one confirmation message may be calculated as a whole. The RTT of the multiple data messages may be the maximum value of the RTTs of the multiple data messages.

[0148] Taking the sending time recorded by the array send_time as an example, if the data of a data message is retransmitted three times, the first device can record the corresponding number of retransmissions and the sending time each time it sends. For example, the first device can record the sending time of the data message with a sequence number of m as follows:

[0149] send_time_m[0]=t0, send_time_m[1]=t1, send_time_m[2]=t2, send_time_m[3]=t3, where t0, t1, t2, and t3 are the sending times of the data message when the data is retransmitted for the 0th, first, second, and third time respectively.

[0150] For different data, the first device can maintain corresponding arrays respectively. In this way, after the first device receives the confirmation message from the second device, it can first determine the corresponding array through, for example, the sequence number carried in the confirmation message, and then use the value of the data transmission information as an index to search the corresponding array, thereby obtaining the sending time of the data message corresponding to the data transmission information. At this time, the first device can determine the round trip time (RTT) corresponding to the corresponding data message based on the receiving time of the confirmation message and the corresponding sending time.

[0151] The above RTT calculation may be performed after the first device determines the network status, or may be performed separately. For example, the first device calculates the RTT separately without determining the network congestion status.

[0152] The accuracy of existing RTT calculations is mostly in the millisecond level, which cannot meet the needs of high-speed networks. For example, the clock accuracy of a data center is in the nanosecond level, and improving the accuracy requires a large overhead. In addition, when the timestamp option is not enabled, only the RTT of non-retransmitted data can be calculated. Since the sending time does not need to be carried by the message in the embodiment of the present application, regardless of whether the data is retransmitted, the first device can freely set the accuracy of the sending time and the receiving time according to the local clock accuracy, and even if a higher RTT accuracy is obtained, the message load will not increase.

[0153] In addition, through the technical solution of the embodiment of the present application, RTT can be calculated regardless of whether the network is in a congested state, without relying on the cooperation of the underlying protocol or requiring support from the forwarding node.

[0154] When the length of the transmission indication information is 2 bits and the number of retransmissions is greater than 3, the transmission indication information no longer changes. However, the link is severely congested at this time and the RTT value is meaningless, which does not affect the measurement of the ZT RTT in the embodiment of the present application.

[0155] The first device can determine the round-trip delay of each data message through the above method, or determine the round-trip delay of a group of data messages based on the data messages corresponding to the confirmation message, and further adjust the retransmission timeout (retransmission time out, RTO) according to the round-trip delay. For example, when the network condition is not smooth and the RTT value is large, the RTO time can be appropriately increased to reduce the retransmission load of the network and avoid retransmission aggravating the network congestion.

[0156] The embodiment of the present application further provides a congestion sensing method, which is performed by a first device and includes:

[0157] S11, the first device sends one or more data packets, each of the one or more data packets includes transmission indication information, and the transmission indication information is used to indicate the number of transmissions or retransmissions of data carried by each data packet.

[0158] S12, the first device receives one or more confirmation messages corresponding to part or all of the one or more data messages, each of the one or more confirmation messages includes transmission indication information of the corresponding data message.

[0159] S13: The first device determines a network congestion status according to one or more confirmation messages.

[0160] The above steps can refer to Figure 2 The introduction of the relevant steps of the illustrated embodiment will not be repeated here.

[0161] The embodiment of the present application further provides a congestion sensing method, which is performed by a second device and includes:

[0162] S21, the second device receives one or more data packets, each of the one or more data packets includes transmission indication information, and the transmission indication information is used to indicate the number of transmissions or retransmissions of data carried by each data packet;

[0163] S22: The second device determines a network congestion status according to one or more data packets.

[0164] The above steps can refer to Figure 2 The introduction of the relevant steps of the illustrated embodiment will not be repeated here.

[0165] The embodiment of the present application also provides an RTT calculation method, which is executed by a first device, and the method includes:

[0166] S31, the first device sends one or more data packets, each of the one or more data packets includes transmission indication information, and the transmission indication information is used to indicate the number of transmissions or retransmissions of data carried by each data packet.

[0167] S32, the first device receives one or more confirmation messages corresponding to part or all of the one or more data messages, each of the one or more confirmation messages includes transmission indication information of the corresponding data message.

[0168] S33: The first device determines, based on the one or more confirmation messages, a sending time of each data message corresponding to the one or more confirmation messages.

[0169] S34: The first device determines the round-trip time RTT of each data message according to the sending time of each data message and the receiving time of the corresponding confirmation message.

[0170] In an embodiment of the present application, the first device determines the RTT of multiple data packets corresponding to the same confirmation message based on the RTT of each data packet in the multiple data packets corresponding to the same confirmation message, and the RTT of multiple data packets corresponding to the same confirmation message is the RTT with the largest RTT value among the multiple data packets.

[0171] In an embodiment of the present application, a first device records a first relationship, where the first relationship is used to indicate a relationship between at least one sending time of data of each data message corresponding to a plurality of confirmation messages and corresponding transmission indication information; the first device determines the sending time of each data message corresponding to a plurality of confirmation messages based on the plurality of confirmation messages, including: the first device confirms the sending time of each data message corresponding to the plurality of confirmation messages based on the transmission indication information in the plurality of confirmation messages and the first relationship.

[0172] In an embodiment of the present application, the first relationship can be represented by an array, a list, etc. When the data transmission information is the number of data retransmissions, the value of the data transmission information can be used as the index of the array, so that the first relationship can be stored in the first device.

[0173] For details, please refer to Figure 2 The description of the embodiments will not be repeated here.

[0174] Figure 5 A communication device 400 provided in an embodiment of the present application is shown, including a transceiver unit 410 and a processing unit 420. In one embodiment, the communication device 400 is used to perform Figure 2 Function of the first device in the congestion sensing method embodiment.

[0175] Specifically, the transceiver unit 410 is used to: send multiple data packets, each of the multiple data packets includes transmission indication information, and the transmission indication information is used to indicate the number of transmissions or retransmissions of data carried by each data packet; receive one or more confirmation messages corresponding to part or all of the multiple data packets, each of the one or more confirmation messages includes transmission indication information of the corresponding data packet; the processing unit 420 is used to determine the network congestion status based on the one or more confirmation messages.

[0176] In an embodiment of the present application, the processing unit 420 is specifically used to: determine a first transmission indication value of data associated with the one or more confirmation messages based on the one or more confirmation messages, wherein the first transmission indication value is determined based on the number of transmissions or retransmissions of the data associated with the one or more confirmation messages; and determine a network congestion status based on the first transmission indication value.

[0177] In an embodiment of the present application, the first transmission indication value is used to indicate an average number of transmissions or an average number of retransmissions of data associated with the one or more confirmation messages.

[0178] In an embodiment of the present application, the first transmission indication value is positively correlated with an average value of the number of transmissions or the average value of the number of retransmissions of the data associated with the one or more confirmation messages, and the processing unit 420 is specifically used to: when the first transmission indication value is greater than or equal to a first preset threshold value, determine that the network is in a congested state; when the first transmission indication value is less than the first preset threshold value, determine that the network is not in a congested state.

[0179] In the embodiment of the present application, the processing unit 420 is specifically used to: when the first transmission indication value is greater than or equal to the first preset threshold and less than the second preset threshold, determine that it is in a first network congestion state; when the first transmission indication value is greater than or equal to the second preset threshold, determine that it is in a second network congestion state, and the congestion level of the first network congestion state is less than the congestion level of the second network congestion state.

[0180] In an embodiment of the present application, the processing unit 420 is also used to: determine the sending time of each data message corresponding to the one or more confirmation messages based on the one or more confirmation messages; determine the round-trip time RTT of each data message based on the sending time of each data message and the receiving time of the corresponding confirmation message.

[0181] In an embodiment of the present application, the processing unit 420 is further used to: determine the RTT of the multiple data packets corresponding to the same confirmation message based on the RTT of each data packet in the multiple data packets corresponding to the same confirmation message, and the RTT of the multiple data packets corresponding to the same confirmation message is the maximum value of the RTT value of each data packet in the multiple data packets.

[0182] In an embodiment of the present application, the processing unit 420 is also used to: record a first relationship, which is used to indicate the relationship between at least one sending time of data and the transmission indication information in the data packet carrying the data sent corresponding to the sending time; the processing unit 420 is specifically used to: confirm the sending time of each data packet corresponding to the one or more confirmation messages based on the transmission indication information in the one or more confirmation messages and the first relationship.

[0183] In an embodiment of the present application, the transmission of the data message and / or confirmation message uses the transmission control protocol TCP, the smart flow control SFC protocol or the fast UDP Internet connection QUIC protocol communication.

[0184] In this embodiment of the present application, the length of the transmission indication information is two bits.

[0185] In another embodiment, Figure 4 The communication device 400 is shown for performing Figure 2 In an embodiment of the present invention, steps are performed by the second device.

[0186] Specifically, the transceiver unit 410 is used to receive one or more data packets, each of the one or more data packets includes transmission indication information, and the transmission indication information is used to indicate the number of transmissions or retransmissions of data carried by each data packet; the processing unit 420 is used to determine the network congestion status based on the one or more data packets.

[0187] In an embodiment of the present application, the processing unit 420 is specifically used to: determine a second transmission indication value of the one or more data packets according to the transmission indication information in the one or more data packets; and determine a network congestion status according to the second transmission indication value.

[0188] In an embodiment of the present application, the second transmission indication value is an average value of the transmission indication information in the one or more data packets.

[0189] In an embodiment of the present application, the value of the transmission indication information is positively correlated with the number of data transmissions or retransmissions, and the processing unit 420 is specifically used to: when the second transmission indication value is greater than or equal to the third preset threshold, determine that the network is in a congested state; when the second transmission indication value is less than the third preset threshold, determine that the network is not in a congested state.

[0190] In the embodiment of the present application, the processing unit 420 is specifically the same as: when the second transmission indication value is greater than or equal to the third preset threshold and less than the fourth preset threshold, it is determined to be in the third network congestion state; when the second transmission indication value is greater than or equal to the fourth preset threshold, it is determined to be in the fourth network congestion state, and the congestion degree of the third network congestion state is less than the congestion degree of the fourth network congestion state.

[0191] In an embodiment of the present application, the transceiver unit 410 is also used to: send one or more confirmation messages, each of the one or more confirmation messages is used to confirm at least one data message among the one or more data messages, and each confirmation message includes transmission indication information of the corresponding data message.

[0192] In the embodiment of the present application, the processing unit 420 is further used to: adjust the number of data packets corresponding to each confirmation packet according to the network congestion status.

[0193] In an embodiment of the present application, the transmission of the data message and / or confirmation message uses the transmission control protocol TCP, the smart flow control SFC protocol or the fast UDP Internet connection QUIC protocol communication.

[0194] In this embodiment of the present application, the length of the transmission indication information is two bits.

[0195] In another embodiment, the communication device 400 is used to execute the function of the first device in the above RTT calculation method.

[0196] Specifically, the transceiver unit 410 is used to: send one or more data packets, each of the one or more data packets includes transmission indication information, and the transmission indication information is used to indicate the number of transmissions or retransmissions of the data carried by each data packet; receive one or more confirmation messages corresponding to part or all of the one or more data packets, each of the one or more confirmation messages includes the transmission indication information of the corresponding data packet; the processing unit 420 is used to: determine the sending time of each data packet corresponding to the one or more confirmation messages based on the one or more confirmation messages; determine the round-trip delay RTT of each data packet based on the sending time of each data packet and the receiving time of the corresponding confirmation message.

[0197] In an embodiment of the present application, the processing unit 420 is further used to: determine the RTT of the multiple data packets corresponding to the same confirmation message based on the RTT of each data packet in the multiple data packets corresponding to the same confirmation message, and the RTT of the multiple data packets corresponding to the same confirmation message is the maximum value of the RTT value of each data packet in the multiple data packets.

[0198] In an embodiment of the present application, the processing unit 420 is also used to: record a first relationship, which is used to indicate the relationship between at least one sending time of data and the transmission indication information in the data packet carrying the data sent corresponding to the sending time; the processing unit 420 is specifically used to: confirm the sending time of each data packet corresponding to the one or more confirmation messages based on the transmission indication information in the one or more confirmation messages and the first relationship.

[0199] In an embodiment of the present application, the transmission of the data message and / or confirmation message uses the transmission control protocol TCP, the smart flow control SFC protocol or the fast UDP Internet connection QUIC protocol communication.

[0200] In this embodiment of the present application, the length of the transmission indication information is two bits.

[0201] Figure 6 A communication device 500 provided in an embodiment of the present application is shown. Figure 6 The communication device 500 shown may correspond to the communication device described above. Specifically, the communication device 500 may be Figure 5A specific example of a communication device in the embodiment. The communication device 500 includes: a processor 520. In an embodiment of the present application, the processor 520 is used to implement corresponding control management operations, for example, the processor 520 is used to support the communication device 500 to perform the method or operation or function of the aforementioned embodiment. Optionally, the communication device 500 may also include: a memory 510 and a communication interface 530; the processor 520, the communication interface 530 and the memory 510 may be interconnected or interconnected through a bus 540. Among them, the communication interface 530 is used to support the communication device to communicate with other devices, etc., and the memory 510 is used to store program codes and data of the communication device. The processor 520 calls the code or data stored in the memory 510 to implement the corresponding operation. The memory 510 may be coupled to the processor or not. The coupling in the embodiment of the present application is an indirect coupling or communication connection between communication devices, units or modules, which may be electrical, mechanical or other forms, and is used for information interaction between communication devices, units or modules.

[0202] Among them, the processor 520 can be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in combination with the contents disclosed in this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and so on. The communication interface 530 can be a transceiver, circuit, bus, module or other type of communication interface. The bus 540 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0203] 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.

[0204] 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.

[0205] 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.

[0206] 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.

[0207] 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.

[0208] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.

[0209] 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 congestion sensing method, characterized in that: include: The first device sends multiple data packets, each of the multiple data packets includes transmission indication information, and the transmission indication information is used to indicate the number of transmissions or retransmissions of data carried by each data packet; The first device receives one or more confirmation messages corresponding to part or all of the multiple data messages, each of the one or more confirmation messages including transmission indication information of the corresponding data message; The first device determines a network congestion status according to the one or more confirmation messages.

2. The method according to claim 1, characterized in that The first device determines the network congestion status according to the one or more confirmation messages, including: The first device determines, according to the one or more confirmation messages, a first transmission indication value of data associated with the one or more confirmation messages, wherein the first transmission indication value is determined according to a number of transmissions or a number of retransmissions of the data associated with the one or more confirmation messages; The first device determines a network congestion status according to the first transmission indication value.

3. The method according to claim 2, characterized in that The first transmission indication value is used to indicate an average value of transmission times or an average value of retransmission times of data associated with the one or more confirmation messages.

4. The method according to claim 2 or 3, characterized in that The first transmission indication value is positively correlated with an average value of transmission times or an average value of retransmission times of data associated with the one or more confirmation messages, and the first device determines a network congestion status according to the first transmission indication value, including: When the first transmission indication value is greater than or equal to a first preset threshold, the first device determines that it is in a network congestion state; When the first transmission indication value is less than the first preset threshold, the first device determines that it is not in a network congestion state.

5. The method according to claim 4, characterized in that When the first transmission indication value is greater than or equal to a first preset threshold, the first device determines that the network is in a congested state, including: When the first transmission indication value is greater than or equal to the first preset threshold and less than a second preset threshold, the first device determines that it is in a first network congestion state; When the first transmission indication value is greater than or equal to the second preset threshold, the first device determines that it is in a second network congestion state, and the congestion level of the first network congestion state is less than the congestion level of the second network congestion state.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: The first device determines, according to the one or more confirmation messages, a sending time of each data message corresponding to the one or more confirmation messages; The first device determines the round-trip time RTT of each data message according to the sending time of each data message and the receiving time of the corresponding confirmation message.

7. The method according to claim 6, characterized in that The method further comprises: The first device determines the RTT of the multiple data packets corresponding to the same confirmation message based on the RTT of each data packet in the multiple data packets corresponding to the same confirmation message, and the RTT of the multiple data packets corresponding to the same confirmation message is the maximum value of the RTT value of each data packet in the multiple data packets.

8. The method according to claim 6 or 7, characterized in that The method further comprises: The first device records a first relationship, where the first relationship is used to indicate a relationship between at least one sending time of data and transmission indication information in a data message carrying the data and sent corresponding to the sending time; The first device determines, according to the one or more confirmation messages, a sending time of each data message corresponding to the one or more confirmation messages, including: The first device confirms the sending time of each data message corresponding to the one or more confirmation messages according to the transmission indication information in the one or more confirmation messages and the first relationship.

9. A congestion sensing method, characterized in that: include: The second device receives one or more data packets, each of the one or more data packets includes transmission indication information, and the transmission indication information is used to indicate the number of transmissions or retransmissions of data carried by each data packet; The second device determines a network congestion status according to the one or more data packets.

10. The method according to claim 9, characterized in that The second device determines the network congestion status according to the one or more data packets, including: The second device determines, according to the transmission indication information in the one or more data packets, a second transmission indication value of the one or more data packets; The second device determines a network congestion status according to the second transmission indication value.

11. The method according to claim 10, characterized in that The second transmission indication value is an average value of the transmission indication information in the one or more data packets.

12. The method according to claim 10 or 11, characterized in that The value of the transmission indication information is positively correlated with the number of transmissions or retransmissions of the data, and the second device determines the network congestion status according to the second transmission indication value, including: When the second transmission indication value is greater than or equal to a third preset threshold, the second device determines that it is in a network congestion state; When the second transmission indication value is less than the third preset threshold, the second device determines that it is not in a network congestion state.

13. The method according to claim 12, characterized in that When the second transmission indication value is greater than or equal to a third preset threshold, the second device determines that it is in a network congestion state, including: When the second transmission indication value is greater than or equal to the third preset threshold and less than a fourth preset threshold, the second device determines that it is in a third network congestion state; When the second transmission indication value is greater than or equal to the fourth preset threshold, the second device determines that it is in a fourth network congestion state, and the congestion level of the third network congestion state is less than the congestion level of the fourth network congestion state.

14. The method according to any one of claims 9 to 13, characterized in that The method further comprises: The second device sends one or more confirmation messages, each of the one or more confirmation messages is used to confirm at least one data message among the one or more data messages, and each confirmation message includes transmission indication information of the corresponding data message.

15. The method according to claim 14, characterized in that The method further comprises: The second device adjusts the number of data packets corresponding to each confirmation packet according to the network congestion condition.

16. A round trip delay calculation method, characterized in that: include: The first device sends one or more data packets, each of the one or more data packets includes transmission indication information, and the transmission indication information is used to indicate the number of transmissions or retransmissions of data carried by each data packet; The first device receives one or more confirmation messages corresponding to part or all of the one or more data messages, each of the one or more confirmation messages including transmission indication information of the corresponding data message; The first device determines, according to the one or more confirmation messages, a sending time of each data message corresponding to the one or more confirmation messages; The first device determines the round-trip time RTT of each data message according to the sending time of each data message and the receiving time of the corresponding confirmation message.

17. The method according to claim 16, characterized in that The method further comprises: The first device determines the RTT of the multiple data packets corresponding to the same confirmation message based on the RTT of each data packet in the multiple data packets corresponding to the same confirmation message, and the RTT of the multiple data packets corresponding to the same confirmation message is the maximum value of the RTT value of each data packet in the multiple data packets.

18. The method according to claim 16 or 17, characterized in that The method further comprises: The first device records a first relationship, where the first relationship is used to indicate a relationship between at least one sending time of data and transmission indication information in a data message carrying the data and sent corresponding to the sending time; The first device determines, according to the one or more confirmation messages, a sending time of each data message corresponding to the one or more confirmation messages, including: The first device confirms the sending time of each data message corresponding to the one or more confirmation messages according to the transmission indication information in the one or more confirmation messages and the first relationship.

19. The method according to any one of claims 1 to 18, characterized in that The transmission of the data message and / or the confirmation message uses the transmission control protocol TCP, the smart flow control SFC protocol or the fast UDP Internet connection QUIC protocol communication.

20. The method according to any one of claims 1 to 19, characterized in that The length of the transmission indication information is two bits.

21. A communication device, characterized in that: include: A processor, wherein the processor is configured to be coupled to a memory, read and execute instructions and / or program codes in the memory, so as to perform the method according to any one of claims 1 to 20.

22. A chip system, characterized in that: include: A logic circuit, the logic circuit is used to be coupled to an input / output interface, and transmit data through the input / output interface to execute the method according to any one of claims 1 to 20.

23. A computer readable medium, characterized in that The computer-readable medium stores a program code, and when the computer program code is executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 20.

Citation Information

Cited By

  • Message transmission method and device for congestion scene

    CN121240132A