A data transmission method, system and device in a network and a readable storage medium

By selecting an appropriate congestion control algorithm based on network conditions during network data transmission, the problem of poor transmission performance of the traditional TCP protocol under weak network conditions is solved, and efficient data transmission is achieved under both normal and weak network conditions.

CN114867060BActive Publication Date: 2026-05-29SANGFOR TECH INC

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SANGFOR TECH INC
Filing Date
2022-05-30
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Traditional TCP protocols struggle to meet data transmission requirements in complex network environments, particularly in weak network conditions, resulting in poor data transmission performance.

Method used

A network data transmission method is provided, which determines whether the network status is a normal network or a weak network, and selects the appropriate congestion control algorithm for data transmission, including the CUBIC algorithm and RENO algorithm for normal networks, and the BBR algorithm and BBR-V2 algorithm for weak networks.

Benefits of technology

It improves data transmission performance, adapts to different network environments, and ensures efficient data transmission in both normal and weak network conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114867060B_ABST
    Figure CN114867060B_ABST
Patent Text Reader

Abstract

The application discloses a data transmission method in a network, which is applied to a sending device and comprises the following steps: determining a current network state of a network between the sending device and a receiving device; if the current network state indicates that the network is currently normal, calling a first congestion control algorithm in a transmission protocol which supports the normal network to perform network data transmission; and if the current network state indicates that the network is currently a weak network, calling a second congestion control algorithm in the transmission protocol which supports the weak network to perform network data transmission. It can be seen that the application supports the congestion control under the normal network and the weak network simultaneously, and selects a proper congestion control algorithm according to the current network state to perform network data transmission, thereby improving the data transmission performance. The application further discloses a data transmission system and device in a network and a computer readable storage medium, which have the same beneficial effects as the data transmission method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data transmission, and in particular to a data transmission method, system, apparatus, and readable storage medium in a network. Background Technology

[0002] In the early days of the internet, the lack of transmission management for data transmitted over networks frequently led to data congestion. To address this issue, the TCP (Transmission Control Protocol), with its congestion control capabilities, was developed.

[0003] Networks are categorized into normal networks and weak networks. Weak networks refer to abnormal networks characterized by high latency, high packet loss rate, and high jitter rate (such as mobile networks on a subway). Currently, as network environments become increasingly complex, weak network conditions are becoming more and more common. However, the traditional TCP protocol, designed for normal networks, struggles to meet the data transmission needs under weak network conditions, resulting in poor data transmission performance.

[0004] Therefore, how to provide a solution to the above-mentioned technical problems is a problem that those skilled in the art need to solve at present. Summary of the Invention

[0005] The purpose of this invention is to provide a data transmission method, system, device, and readable storage medium in a network, which supports congestion control in both normal and weak networks, and selects an appropriate congestion control algorithm for network data transmission based on the current network state, thereby improving data transmission performance.

[0006] To address the aforementioned technical problems, this invention provides a data transmission method in a network, applied to a transmitting device, the data transmission method comprising:

[0007] Determine the current network status between yourself and the receiving device;

[0008] If the current network status indicates that the network is currently a normal network, then the first congestion control algorithm in the transmission protocol that supports the normal network is invoked for network data transmission;

[0009] If the current network state indicates that the network is currently weak, then the second congestion control algorithm in the transmission protocol that supports the weak network is invoked for network data transmission.

[0010] Preferably, the network status includes at least one of latency, packet loss rate, and jitter rate.

[0011] Preferably, before invoking the first congestion control algorithm in the transport protocol that supports the normal network for network data transmission if the current network state indicates that the network is currently a normal network, the method further includes:

[0012] Determine whether the network is currently functioning normally based on the current network status;

[0013] If so, proceed to the step of calling the first congestion control algorithm in the transmission protocol that supports the normal network to perform network data transmission if the current network state indicates that the network is currently a normal network.

[0014] If not, proceed to the step of calling the second congestion control algorithm in the transmission protocol that supports the weak network to perform network data transmission if the current network state indicates that the network is currently a weak network.

[0015] Preferably, determining whether the network is currently functioning normally based on the current network status includes:

[0016] If the current packet loss rate of the network is less than a preset packet loss rate threshold, then the network is determined to be a normal network.

[0017] If the current packet loss rate is greater than or equal to the preset packet loss rate threshold, the current latency of the network is less than the preset latency threshold, and the current jitter rate of the network is less than the preset jitter rate threshold, then the network is determined to be a normal network.

[0018] If the current packet loss rate is greater than or equal to the preset packet loss rate threshold and the current latency is greater than or equal to the preset latency threshold, or if the current packet loss rate is greater than or equal to the preset packet loss rate threshold and the current jitter rate of the network is greater than or equal to the preset jitter rate threshold, then the network is determined to be a weak network.

[0019] Preferably, before determining the current network state of the network between itself and the receiving device, the data transmission method further includes:

[0020] Send first handshake information to the receiving device; wherein, the first handshake information includes all congestion control algorithms supported by the sending device;

[0021] The receiving device receives second handshake information; wherein the second handshake information includes all congestion control algorithms supported by the receiving device.

[0022] Determine whether the second handshake information and the first handshake information contain the same congestion control algorithm;

[0023] If so, a handshake success message is sent to the receiving device, and the process proceeds to the step of determining the current network status between itself and the receiving device.

[0024] If not, the handshake is deemed to have failed, and the step of determining the current network state between itself and the receiving device is not initiated.

[0025] Preferably, the data transmission method further includes:

[0026] Upon receiving a disconnection message from the receiving device, the network data transmission operation is stopped.

[0027] Preferably, invoking the target congestion control algorithm for network data transmission includes:

[0028] A target congestion control algorithm is invoked to determine congestion control information based on the current network state; wherein, the congestion control information includes whether data transmission is currently permitted, the size of the currently permitted data transmission, and the transmission rate; the target congestion control algorithm is either the first congestion control algorithm or the second congestion control algorithm;

[0029] Data is sent to the receiving device according to the congestion control information.

[0030] Preferably, determining the current network status between itself and the receiving device includes:

[0031] Before transmitting data with the receiving device, determine whether this is the first time transmitting data with the receiving device.

[0032] If so, the preset initial network state will be used as the current network state of the network;

[0033] If not, the final network state at the time of the last data transmission with the receiving device shall be taken as the current network state.

[0034] During this data transmission with the receiving device, the current network status is periodically redefined and updated based on its own data transmission status and the data reception status reported by the receiving device, until the data transmission ends.

[0035] Preferably, there are multiple congestion control algorithms, both the first and the second.

[0036] The process of determining the target congestion control algorithm includes:

[0037] After the current network state changes, multiple congestion control algorithms that support the changed current network state are used to determine the congestion control information under the changed current network state.

[0038] The congestion control algorithm corresponding to the optimal congestion control information is taken as the target congestion control algorithm.

[0039] Preferably, the first congestion control algorithm includes the CUBIC algorithm and the RENO algorithm, and the second congestion control algorithm includes the BBR algorithm and the BBR-V2 algorithm.

[0040] Preferably, when the sending device is a terminal, the receiving device is a server; when the sending device is a server, the receiving device is a terminal.

[0041] To address the aforementioned technical problems, the present invention also provides a data transmission system in a network, applied to a transmitting device, the data transmission system comprising:

[0042] The determination module is used to determine the current network status between itself and the receiving device;

[0043] The first calling module is used to call the first congestion control algorithm in the transmission protocol that supports the normal network to perform network data transmission if the current network status indicates that the network is currently a normal network.

[0044] The second calling module is used to call the second congestion control algorithm in the transmission protocol that supports the weak network to perform network data transmission if the current network status indicates that the network is currently a weak network.

[0045] To address the aforementioned technical problems, the present invention also provides a data transmission device in a network, comprising:

[0046] Memory, used to store computer programs;

[0047] A processor configured to implement the steps of any of the above-described network data transmission methods when executing the computer program.

[0048] To address the aforementioned technical problems, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above-described data transmission methods in a network.

[0049] This invention provides a data transmission method in a network, applied to a transmitting device. The data transmission method includes: determining the current network state between itself and a receiving device; if the current network state indicates that the network is currently in a normal state, then invoking a first congestion control algorithm in the transmission protocol that supports normal networks for network data transmission; if the current network state indicates that the network is currently in a weak state, then invoking a second congestion control algorithm in the transmission protocol that supports weak networks for network data transmission. Therefore, this application simultaneously supports congestion control under both normal and weak network conditions, and selects an appropriate congestion control algorithm based on the current network state for network data transmission, thereby improving data transmission performance.

[0050] The present invention also provides a data transmission system, apparatus, and computer-readable storage medium in a network, which have the same beneficial effects as the data transmission method described above. Attached Figure Description

[0051] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the prior art and embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0052] Figure 1 A flowchart illustrating a data transmission method in a network, as provided in an embodiment of the present invention;

[0053] Figure 2 This is a schematic diagram of data transmission in a network, provided as an embodiment of the present invention.

[0054] Figure 3 This is a schematic diagram of the structure of a data transmission system in a network provided by an embodiment of the present invention;

[0055] Figure 4 This is a schematic diagram of a data transmission device in a network provided in an embodiment of the present invention. Detailed Implementation

[0056] The core of this invention is to provide a data transmission method, system, device, and readable storage medium in a network, which supports congestion control in both normal and weak networks, and selects an appropriate congestion control algorithm for network data transmission based on the current network state, thereby improving data transmission performance.

[0057] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0058] Please refer to Figure 1 , Figure 1 A flowchart illustrating a data transmission method in a network, as provided in an embodiment of the present invention.

[0059] The data transmission method in this network is applied to the transmitting device, and the data transmission method includes:

[0060] Step S1: Determine the current network status between yourself and the receiving device.

[0061] Specifically, when a transmitting device is about to transmit data to a receiving device, it first determines the current network status between itself and the receiving device in order to distinguish whether the network between the transmitting device and the receiving device is a normal network or a weak network, thereby providing a basis for selecting the congestion control algorithm in the transmission protocol.

[0062] It should be noted that the transmission protocols encapsulated within the transmitting and receiving devices include both a congestion control algorithm that supports normal networks (referred to as the first congestion control algorithm) for congestion control under normal network conditions, and a congestion control algorithm that supports weak networks (referred to as the second congestion control algorithm) for congestion control under weak network conditions.

[0063] Step S2: If the current network status indicates that the network is currently in a normal state, then the first congestion control algorithm in the transport protocol that supports normal networks is invoked for network data transmission. Step S3: If the current network status indicates that the network is currently in a weak state, then the second congestion control algorithm in the transport protocol that supports weak networks is invoked for network data transmission.

[0064] It is understandable that the network between the sending and receiving devices can include both weak and normal networks. A weak network refers to a network with limited data transmission capabilities, such as one that meets one or more of the following criteria: latency greater than or equal to a preset latency threshold (high latency), packet loss rate greater than or equal to a preset packet loss rate threshold (high packet loss), and jitter rate greater than or equal to a preset jitter rate threshold (high jitter). For example, if the network packet loss rate is greater than or equal to 1% (preset packet loss rate threshold), and the network jitter rate is greater than or equal to 10% (preset jitter rate threshold), or the network latency is greater than or equal to 40ms (preset latency threshold), the current network can be determined as a weak network. If the network packet loss rate is less than 1%, or the packet loss rate is greater than or equal to 1%, the jitter rate is less than 10%, and the latency is less than 40ms, the current network can be determined as a normal network. A normal network can be any network other than a weak network that can perform normal data transmission.

[0065] Specifically, after determining the current network state between itself and the receiving device, the transmitting device detects whether the network between the two is currently a normal network or a weak network based on the current network state. If the network between the two is currently a normal network (i.e., a normal network), the first congestion control algorithm in the transmission protocol that supports normal networks is invoked for network data transmission; if the network between the two is currently a weak network, the second congestion control algorithm in the transmission protocol that supports weak networks is invoked for network data transmission.

[0066] As can be seen, this application supports congestion control in both normal and weak networks, and selects an appropriate congestion control algorithm for network data transmission based on the current network status, thereby improving data transmission performance.

[0067] Based on the above embodiments:

[0068] As an optional embodiment, the network state includes at least one of latency, packet loss rate, and jitter rate.

[0069] Specifically, the network status between the sending and receiving devices can include network latency, which is the time elapsed between the sending device sending data and the receiving device reporting the data reception status; it can also include network packet loss rate, where some packets may not be received by the receiving device when the sending device sends multiple data packets to the receiving device, so the network packet loss rate = number of lost data packets / total number of data packets sent; it can also include network jitter rate, where the receiving device should receive the data sent by the sending device first, but due to network jitter, the receiving device may receive the data sent by the sending device later, so the network jitter rate = number of out-of-order data packets / total number of data packets sent; and it can also include network bandwidth, which is the amount of data transmitted per unit time.

[0070] As an optional embodiment, before steps S2 and S3 above, the following step is also included:

[0071] Determine whether the network is currently functioning normally based on the current network status;

[0072] If so, proceed to step S2, which calls the first congestion control algorithm in the transmission protocol that supports normal networks to perform network data transmission.

[0073] If not, proceed to step S3 and call the second congestion control algorithm in the transmission protocol that supports weak networks to perform network data transmission.

[0074] In other words, after determining the current network state between itself and the receiving device, the transmitting device determines whether the network between them is currently a normal network based on the current network state. That is, it checks whether the network represented by the current network state is currently a normal network. If the network between them is currently a normal network, the first congestion control algorithm in the transmission protocol that supports normal networks is called to perform network data transmission. If the network between them is currently a weak network, the second congestion control algorithm in the transmission protocol that supports weak networks is called to perform network data transmission.

[0075] As an optional embodiment, determining whether the network is currently functioning normally based on the current network status includes:

[0076] If the current packet loss rate of the network is less than the preset packet loss rate threshold, then the network is determined to be a normal network.

[0077] If the current packet loss rate is greater than or equal to the preset packet loss rate threshold, the current network latency is less than the preset latency threshold, and the current network jitter rate is less than the preset jitter rate threshold, then the network is determined to be a normal network.

[0078] If the current packet loss rate is greater than or equal to the preset packet loss rate threshold and the current latency is greater than or equal to the preset latency threshold, or if the current packet loss rate is greater than or equal to the preset packet loss rate threshold and the current jitter rate of the network is greater than or equal to the preset jitter rate threshold, then the network is determined to be a weak network.

[0079] Specifically, taking the latency, packet loss rate, and jitter rate of the network between the transmitting and receiving devices as the criteria for judgment (the principles are similar in other cases, and will not be elaborated here), the process by which the transmitting device determines whether the network between itself and the receiving device is a normal network or a weak network is as follows: 1) Determine whether the current packet loss rate of the network is less than a preset packet loss rate threshold; 2) Determine whether the current latency of the network is less than a preset latency threshold; 3) Determine whether the current jitter rate of the network is less than a preset jitter rate threshold. If the result of judgment 1) is yes, or the result of judgment 1) is no and the results of judgments 2) and 3) are both yes, then the network is determined to be a normal network; if the result of judgment 1) is no, and the results of judgment 2) or 3) are no, then the network is determined to be a weak network.

[0080] For example, the sending device can determine whether the current packet loss rate of the network is less than a preset packet loss rate threshold; if it is less than the preset packet loss rate threshold, the network is determined to be a normal network; if it is greater than or equal to the preset packet loss rate threshold, it can determine whether the current latency of the network is less than a preset latency threshold and the current jitter rate of the network is less than a preset jitter rate threshold; if both conditions are met, the network is determined to be a normal network; if not, the network is determined to be a weak network.

[0081] It should be noted that the lower the network latency, packet loss rate, and jitter rate, the better the network condition.

[0082] As an optional embodiment, determining whether the network is currently functioning normally based on the current network status includes:

[0083] Determine whether the current bandwidth of the network is greater than a preset bandwidth threshold, whether the current latency of the network is less than a preset latency threshold, whether the current packet loss rate of the network is less than a preset packet loss threshold, and whether the current jitter rate of the network is less than a preset jitter rate threshold.

[0084] If the judgment result does not include a negative result, then the network is determined to be a normal network.

[0085] If the judgment result includes a "no" condition, then the network is determined to be a weak network.

[0086] Specifically, taking the bandwidth, latency, packet loss rate, and jitter rate of the network between the transmitting and receiving devices as the criteria for judgment (the principles are similar in other cases, and will not be elaborated here), the process by which the transmitting device determines whether the network between itself and the receiving device is a normal network or a weak network is as follows: 1) Determine whether the current bandwidth of the network is greater than a preset bandwidth threshold; 2) Determine whether the current latency of the network is less than a preset latency threshold; 3) Determine whether the current packet loss rate of the network is less than a preset packet loss rate threshold; 4) Determine whether the current jitter rate of the network is less than a preset jitter rate threshold. If none of the four judgment results are negative, that is, all four judgment results are positive, then the network is determined to be a normal network; if none of the four judgment results are negative, that is, not all four judgment results are positive, then the network is determined to be a weak network.

[0087] Please refer to Figure 2 , Figure 2 This is a schematic diagram of data transmission in a network, provided as an embodiment of the present invention.

[0088] As an optional embodiment, the data transmission method further includes, before determining the current network state of the network between itself and the receiving device:

[0089] Send first handshake information to the receiving device; wherein, the first handshake information includes all congestion control algorithms supported by the sending device;

[0090] The receiving device returns a second handshake message; wherein the second handshake message includes all congestion control algorithms supported by the receiving device.

[0091] Determine whether the second handshake information and the first handshake information contain the same congestion control algorithm;

[0092] If so, a handshake success message is sent to the receiving device, and the process proceeds to determine the current network status between itself and the receiving device.

[0093] If not, the handshake is deemed to have failed, and the step of determining the current network state between itself and the receiving device is not initiated.

[0094] Furthermore, both the transmitting and receiving devices need to ensure they use the same congestion control scheme. Therefore, before determining the current network state between itself and the receiving device, the transmitting device sends a first handshake message (including all congestion control algorithms supported by the transmitting device) to the receiving device. After receiving the first handshake message, the receiving device returns a second handshake message (including all congestion control algorithms supported by the receiving device) to the transmitting device. Upon receiving the second handshake message, the transmitting device can determine whether the second handshake message and the first handshake message contain the same congestion control algorithm. If the second handshake message and the first handshake message contain the same congestion control algorithm, the handshake is considered successful, and a handshake success message is sent to the receiving device. Then, the transmitting device proceeds to the step of determining the current network state between itself and the receiving device, i.e., entering the data transmission phase. If the second handshake message and the first handshake message do not contain the same congestion control algorithm, the handshake is considered to have failed, and the step of determining the current network state between itself and the receiving device is not entered, i.e., the data transmission phase is not entered.

[0095] It should be noted that the handshake success information generated by the sending device may include the same congestion control algorithm contained in the second handshake information and the first handshake information. The purpose is to inform the receiving device that the congestion control algorithm invoked by the sending device and the receiving device when transmitting data is selected from the same congestion control algorithm, so as to ensure that both parties use the same congestion control scheme.

[0096] As an optional embodiment, the data transmission method further includes:

[0097] When a disconnection message is received from the receiving device, network data transmission operations are stopped.

[0098] Furthermore, if the receiving device needs to disconnect data transmission from the sending device, it sends a disconnection message to the sending device. Upon receiving the disconnection message, the sending device stops network data transmission and sends a disconnection acknowledgment message back to the receiving device to confirm the termination of data transmission. If the sending and receiving devices subsequently need to transmit data again, they can re-establish a handshake.

[0099] As an optional implementation, invoking a target congestion control algorithm for network data transmission includes:

[0100] The target congestion control algorithm is invoked to determine congestion control information based on the current network state; the congestion control information includes whether data transmission is currently permitted, the size of the currently permitted data transmission, and the transmission rate; the target congestion control algorithm is either the first congestion control algorithm or the second congestion control algorithm.

[0101] Data is sent to the receiving device according to congestion control information.

[0102] Specifically, the process by which the sending device invokes either the first or second congestion control algorithm for network data transmission is as follows (taking the invocation of the target congestion control algorithm as an example): The sending device invokes the target congestion control algorithm to determine congestion control information based on the current network state between the sending and receiving devices. Specifically, this involves determining whether data can be sent, the size of the data that can be sent, and the current data transmission rate. Then, the sending device transmits data to the receiving device according to the congestion control information. For example, if the sending device determines that data can be sent, it transmits data to the receiving device according to the determined size and transmission rate of the data that can be sent; if it determines that data cannot be sent, it does not transmit data to the receiving device.

[0103] As an optional embodiment, determining the current network state between itself and the receiving device includes:

[0104] Before transmitting data to the receiving device, determine whether this is the first time transmitting data between the device and the receiving device.

[0105] If so, the preset initial network state will be used as the current network state.

[0106] If not, the final network state at the time of the last data transmission with the receiving device will be taken as the current network state.

[0107] During this data transmission with the receiving device, the network status is periodically redefined and updated based on its own data transmission status and the data reception status reported by the receiving device, until the data transmission ends.

[0108] Specifically, if the sending device is transmitting data with the receiving device for the first time, it uses a preset initial network state as the current network state between the two devices. Then, based on the current network state, it determines whether the network between the two devices is currently in a normal or weak state, and selects an appropriate congestion control algorithm for congestion control. If the sending device is not transmitting data with the receiving device for the first time, it uses the final network state from the last data transmission with the receiving device as the current network state between the two devices. Then, based on the current network state, it determines whether the network between the two devices is currently in a normal or weak state, and selects an appropriate congestion control algorithm for congestion control.

[0109] Meanwhile, during each data transmission with the receiving device, the sending device periodically re-determines and updates the current network state based on its own data transmission status and the data reception status reported by the receiving device. Then, based on the re-determined current network state, it determines whether the network is currently in a normal or weak state, and selects a suitable congestion control algorithm for congestion control until the data transmission ends. For example, when the sending device sends data to the receiving device, the receiving device returns feedback confirmation information indicating the data reception status; this feedback confirmation information includes the data received by the receiving device and the order in which the data was received. Based on the feedback confirmation information returned by the receiving device, the sending device can determine lost data and out-of-order data, and thus calculate the network packet loss rate and jitter rate to obtain the new current network state.

[0110] Alternatively, this application also allows a third-party device to input the network status to the sending device, which then uses this input network status as the current network status between itself and the receiving device. This application does not limit the method used to determine the network status.

[0111] As an optional embodiment, there are multiple first congestion control algorithms and multiple second congestion control algorithms;

[0112] The process of determining the target congestion control algorithm includes:

[0113] After the current network state changes, multiple congestion control algorithms that support the changed current network state are used to determine the congestion control information under the changed current network state.

[0114] The congestion control algorithm corresponding to the optimal congestion control information is taken as the target congestion control algorithm.

[0115] Specifically, when there are multiple first congestion control algorithms and multiple second congestion control algorithms in this application, if the network is currently a normal network, the transmitting device needs to select one first congestion control algorithm from the multiple first congestion control algorithms to call; if the network is currently a weak network, the transmitting device needs to select one second congestion control algorithm from the multiple second congestion control algorithms to call (the selected congestion control algorithm is called the target congestion control algorithm).

[0116] More specifically, the process of determining the target congestion control algorithm is as follows: after the current network state between the transmitting device and the receiving device changes, the transmitting device uses multiple congestion control algorithms (all of which support the network state after the change) to determine the congestion control information under the changed current network state. The purpose is to select the congestion control algorithm corresponding to the optimal congestion control information as the target congestion control algorithm.

[0117] It should be noted that under congestion control with different congestion control information, the amount of data transmitted in the same time period is different; the greater the amount of data transmitted in the same time period, the better the congestion control information.

[0118] As an optional embodiment, the first congestion control algorithm includes the CUBIC algorithm and the RENO algorithm (i.e., the TCP-Reno algorithm, a classic congestion control algorithm in TCP); wherein, the CUBIC algorithm is the next generation algorithm of the BICTCP (Binary Increase Congestion control) algorithm in the TCP series of algorithms, and the second congestion control algorithm includes the BBR (Bottleneck Bandwidth and Round-trip propagation time, a congestion algorithm) algorithm and the BBR-V2 (the second generation of the BBR algorithm) algorithm.

[0119] Specifically, the first congestion control algorithm of this application may include the CUBIC algorithm and the RENO algorithm (congestion control algorithms applicable to normal networks), and the second congestion control algorithm may include the BBR algorithm and the BBR-V2 algorithm (congestion control algorithms applicable to weak networks).

[0120] It should be noted that the first congestion control algorithm and the second congestion control algorithm in this application are not limited to a specific congestion algorithm implementation, nor are they limited to the number of congestion algorithms.

[0121] As an optional embodiment, when the sending device is a terminal, the receiving device is a server; when the sending device is a server, the receiving device is a terminal.

[0122] Specifically, in this application, the two parties transmitting data are a terminal and a server. When the sending device is a terminal, the receiving device is a server; when the sending device is a server, the receiving device is a terminal.

[0123] Furthermore, considering that both the traditional TCP protocol (a connection-oriented, reliable, byte-stream-based transport layer communication protocol) and the later-developed TCP-like protocol (a connectionless transport protocol) based on UDP (User Datagram Protocol) re-encapsulation, their architectures are based on single-point congestion control. In most device operating systems, the TCP protocol is uniformly encapsulated by the kernel, and users cannot modify or adjust its congestion control. However, the congestion control of the UDP-based TCP-like protocol can be custom-encapsulated. Therefore, this application can improve the UDP-based TCP-like protocol, enabling it to include congestion control algorithms supporting both normal and weak network conditions. Given that the TCP protocol performs better under normal network conditions, the congestion control algorithms in the UDP-based TCP-like protocol can borrow from the congestion control algorithms of the TCP protocol, thus achieving the same transmission efficiency as the TCP protocol under normal network conditions while ensuring a better experience than the TCP protocol under weak network conditions. Of course, this application can also implement multi-congestion control optimization schemes based on other network reliable transmission protocols, and this application does not make any special limitations here.

[0124] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the structure of a data transmission system in a network provided by an embodiment of the present invention;

[0125] The data transmission system in this network is used by the transmitting device, and the data transmission system includes:

[0126] The determination module 100 is used to determine the current network status between itself and the receiving device;

[0127] The first calling module 200 is used to call the first congestion control algorithm in the transmission protocol that supports normal networks to perform network data transmission if the current network status indicates that the network is currently a normal network.

[0128] The second calling module 300 is used to call the second congestion control algorithm in the transmission protocol that supports weak networks to perform network data transmission if the current network status indicates that the network is currently weak.

[0129] As an optional embodiment, the network status includes at least one of bandwidth, latency, packet loss rate, and jitter rate.

[0130] As an optional embodiment, the data transmission system further includes:

[0131] The judgment module is used to determine whether the network is currently in normal condition based on the current network status; if so, it sends a start signal to the first calling module 200; if not, it sends a start signal to the second calling module 300.

[0132] As an optional embodiment, the determination module is specifically used to determine that the network is currently a normal network if the current packet loss rate of the network is less than a preset packet loss rate threshold; if the current packet loss rate is greater than or equal to the preset packet loss rate threshold, the current latency of the network is less than a preset latency threshold, and the current jitter rate of the network is less than a preset jitter rate threshold, then the network is currently a normal network; if the current packet loss rate is greater than or equal to the preset packet loss rate threshold and the current latency is greater than or equal to the preset latency threshold, or the current packet loss rate is greater than or equal to the preset packet loss rate threshold and the current jitter rate of the network is greater than or equal to the preset jitter rate threshold, then the network is currently a weak network.

[0133] As an optional embodiment, the data transmission system further includes:

[0134] The handshake sending module is used to send first handshake information to the receiving device; wherein, the first handshake information includes all congestion control algorithms supported by the sending device.

[0135] The handshake receiving module is used to receive the second handshake information returned by the receiving device; wherein, the second handshake information includes all congestion control algorithms supported by the receiving device.

[0136] The handshake judgment module is used to determine whether the second handshake information and the first handshake information contain the same congestion control algorithm; if so, it sends the handshake success information to the receiving device and sends a start signal to the determination module 100; if not, it determines that the handshake has failed and does not send a start signal to the determination module 100.

[0137] As an optional embodiment, the data transmission system further includes:

[0138] The stop module is used to stop network data transmission operations when a disconnection message is received from the receiving device.

[0139] As an optional embodiment, the first calling module 200 and the second calling module 300 include:

[0140] The calling submodule is used to invoke the target congestion control algorithm to determine congestion control information based on the current network state. The congestion control information includes whether data transmission is currently allowed, the size of the currently allowed data to be transmitted, and the transmission rate. The target congestion control algorithm is either the first congestion control algorithm or the second congestion control algorithm.

[0141] The data transmission submodule is used to send data to the receiving device according to congestion control information.

[0142] As an optional embodiment, the determining module 100 includes:

[0143] The initial detection submodule is used to determine whether this is the first time it is transmitting data with the receiving device before transmitting data with the receiving device. If it is, the preset initial network state is used as the current network state. If not, the final network state when transmitting data with the receiving device last time is used as the current network state.

[0144] The update submodule is used to periodically determine and update the current network status based on its own data transmission status and the data reception status reported by the receiving device during the current data transmission process, until the current data transmission ends.

[0145] As an optional embodiment, there are multiple first and second congestion control algorithms, and the first calling module 200 and the second calling module 300 further include:

[0146] The algorithm determination submodule is used to determine the target congestion control algorithm;

[0147] The algorithm determines the sub-modules, including:

[0148] The information determination unit is used to determine the congestion control information in the changed current network state by using multiple congestion control algorithms that support the changed current network state.

[0149] The algorithm determination unit is used to select the congestion control algorithm corresponding to the optimal congestion control information as the target congestion control algorithm.

[0150] As an optional embodiment, the first congestion control algorithm includes the CUBIC algorithm and the RENO algorithm, and the second congestion control algorithm includes the BBR algorithm and the BBR-V2 algorithm.

[0151] For a description of the data transmission system provided in this application, please refer to the embodiments of the data transmission method described above; further details will not be repeated here.

[0152] Please refer to Figure 4 , Figure 4 This is a schematic diagram of a data transmission device in a network provided in an embodiment of the present invention.

[0153] The data transmission devices in this network include:

[0154] Memory 400 is used to store computer programs;

[0155] Processor 500 is used to implement the steps of any of the above-described network data transmission methods when executing a computer program.

[0156] For a description of the data transmission device provided in this application, please refer to the embodiments of the data transmission method described above; further details will not be repeated here.

[0157] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above-described data transmission methods in a network.

[0158] For a description of the computer-readable storage medium provided in this application, please refer to the embodiments of the above data transmission method; further details will not be repeated here.

[0159] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0160] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data transmission method in a network, characterized in that, Applied to a transmitting device, the data transmission method includes: Determine the current network status between yourself and the receiving device; If the current network state indicates that the network is currently a normal network, then according to the congestion control information corresponding to the multiple first congestion control algorithms that support the normal network in the transmission protocol, the first congestion control algorithm corresponding to the optimal congestion control information is selected as the target congestion control algorithm for network data transmission. If the current network state indicates that the network is currently a weak network, then according to the congestion control information corresponding to the multiple second congestion control algorithms that support the weak network in the transmission protocol, the second congestion control algorithm corresponding to the optimal congestion control information is selected as the target congestion control algorithm for network data transmission. The first congestion control algorithm and the second congestion control algorithm are of different types, and the congestion control information includes a combination of whether data transmission is currently allowed, the size of the currently allowed data transmission, and the transmission rate.

2. The data transmission method in a network as described in claim 1, characterized in that, The network status includes at least one of latency, packet loss rate, and jitter rate.

3. The data transmission method in a network as described in claim 2, characterized in that, If the current network state indicates that the network is currently a normal network, before selecting a target congestion control algorithm for network data transmission from the multiple first congestion control algorithms that support the normal network according to the congestion control information in the transmission protocol, the method further includes: Determine whether the network is currently functioning normally based on the current network status; If so, then proceed to the step of selecting a target congestion control algorithm for network data transmission based on the congestion control information corresponding to the multiple first congestion control algorithms that support the normal network in the transmission protocol, if the current network state indicates that the network is currently a normal network. If not, then proceed to the step of selecting a target congestion control algorithm for network data transmission based on the congestion control information corresponding to the multiple second congestion control algorithms that support the weak network in the transmission protocol, if the current network state indicates that the network is currently a weak network.

4. The data transmission method in a network as described in claim 3, characterized in that, Determining whether the network is currently functioning normally based on the current network status includes: If the current packet loss rate of the network is less than a preset packet loss rate threshold, then the network is determined to be a normal network. If the current packet loss rate is greater than or equal to the preset packet loss rate threshold, the current latency of the network is less than the preset latency threshold, and the current jitter rate of the network is less than the preset jitter rate threshold, then the network is determined to be a normal network. If the current packet loss rate is greater than or equal to the preset packet loss rate threshold and the current latency is greater than or equal to the preset latency threshold, or if the current packet loss rate is greater than or equal to the preset packet loss rate threshold and the current jitter rate of the network is greater than or equal to the preset jitter rate threshold, then the network is determined to be a weak network.

5. The data transmission method in a network as described in claim 1, characterized in that, Before determining the current network state between itself and the receiving device, the data transmission method further includes: Send first handshake information to the receiving device; wherein, the first handshake information includes all congestion control algorithms supported by the sending device; The receiving device receives second handshake information; wherein the second handshake information includes all congestion control algorithms supported by the receiving device. Determine whether the second handshake information and the first handshake information contain the same congestion control algorithm; If so, a handshake success message is sent to the receiving device, and the process proceeds to the step of determining the current network status between itself and the receiving device. If not, the handshake is deemed to have failed, and the step of determining the current network state between itself and the receiving device is not initiated.

6. The data transmission method in a network as described in claim 1, characterized in that, The data transmission method further includes: Upon receiving a disconnection message from the receiving device, the network data transmission operation is stopped.

7. The data transmission method in a network as described in claim 1, characterized in that, The process of invoking the target congestion control algorithm for network data transmission includes: The target congestion control algorithm is invoked to determine congestion control information based on the current network state; wherein the target congestion control algorithm is either the first congestion control algorithm or the second congestion control algorithm. Data is sent to the receiving device according to the congestion control information.

8. The data transmission method in a network as described in claim 7, characterized in that, Determine the current network status between yourself and the receiving device, including: Before transmitting data with the receiving device, determine whether this is the first time transmitting data with the receiving device. If so, the preset initial network state will be used as the current network state of the network; If not, the final network state at the time of the last data transmission with the receiving device shall be taken as the current network state. During this data transmission with the receiving device, the current network status is periodically redefined and updated based on its own data transmission status and the data reception status reported by the receiving device, until the data transmission ends.

9. The data transmission method in a network as described in claim 7, characterized in that, The process of determining the target congestion control algorithm includes: After the current network state changes, multiple congestion control algorithms that support the changed current network state are used to determine the congestion control information under the changed current network state. The congestion control algorithm corresponding to the optimal congestion control information is taken as the target congestion control algorithm.

10. The data transmission method in a network as described in claim 9, characterized in that, The first congestion control algorithm includes the CUBIC algorithm and the RENO algorithm, and the second congestion control algorithm includes the BBR algorithm and the BBR-V2 algorithm.

11. The data transmission method in a network as described in any one of claims 1-10, characterized in that, When the sending device is a terminal, the receiving device is a server; when the sending device is a server, the receiving device is a terminal.

12. A data transmission system in a network, characterized in that, The data transmission system, applied to a transmitting device, includes: The determination module is used to determine the current network status between itself and the receiving device; The first calling module is configured to, if the current network state indicates that the network is currently a normal network, select the first congestion control algorithm corresponding to the optimal congestion control information from the multiple first congestion control algorithms that support the normal network in the transmission protocol as the target congestion control algorithm for network data transmission. The second calling module is used to select the optimal second congestion control algorithm corresponding to the congestion control information of the multiple second congestion control algorithms that support the weak network in the transmission protocol as the target congestion control algorithm for network data transmission if the current network status indicates that the network is currently a weak network. The first congestion control algorithm and the second congestion control algorithm are of different types, and the congestion control information includes a combination of whether data transmission is currently allowed, the size of the currently allowed data transmission, and the transmission rate.

13. A data transmission device in a network, characterized in that, include: Memory, used to store computer programs; A processor configured to implement the steps of the data transmission method in a network as described in any one of claims 1-11 when executing the computer program.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the data transmission method in a network as described in any one of claims 1-11.