A method, device, equipment and medium for controlling data transmission speed
By monitoring the round trip delay in real time and calculating the packet loss rate to adjust the transmission speed, the problem of slow response of the SCTP protocol congestion control algorithm is solved, and faster congestion response and lower data transmission delay are achieved.
Patent Information
- Application Number
- CN202211334590.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-28
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2042-10-28
AI Technical Summary
The existing SCTP protocol's congestion control algorithm responds slowly and is difficult to adapt to a network environment with random packet loss, resulting in an increase in network congestion time and data transmission delay.
By monitoring the round-trip delay of data transmission in real time, calculating the packet loss rate within the preset time, setting a rate adjustment factor based on the packet loss rate and its changes, and determining the target transmission speed to achieve control of the data transmission speed.
The SCTP protocol congestion control algorithm is implemented to respond to network congestion faster, reduce network congestion time and data transmission delay, and improve the adaptability to random packet loss network environments.
Smart Images

Figure CN115665058B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data communication technology, and in particular to a data transmission speed control method, device, equipment and medium. Background Art
[0002] SCTP (Stream Control Transmission Protocol) is a reliable transmission protocol. The flow control algorithm design of SCTP is almost the same as that of TCP protocol. Therefore, in network data transmission, the optimization of TCP congestion control algorithm is also applicable to SCTP protocol.
[0003] Congestion control algorithms can be divided into those based on packet loss feedback control, such as BIC and CUBIC, and those based on bottleneck bandwidth (BtlBw), i.e., the maximum forwarding rate that a physical device can achieve, such as BBR. Congestion control algorithms based on packet loss feedback adjust the sending rate according to the packet loss situation, which means that the algorithm's deceleration feedback will only be triggered when there is severe congestion in the network and the buffer on the forwarding path loses packets due to high occupancy, thus increasing transmission delays and causing periodic severe congestion. The bbr algorithm does not perform congestion control based on packet loss feedback. Instead, it tries different sending rates while detecting RTT (Round-Trip Time), and uses the maximum receiving rate when the RTT is minimum as the bottleneck bandwidth (BtlBw). After sending data at the bottleneck bandwidth for a certain period of time, it tries different sending rates again to measure the new bottleneck bandwidth. Although the bbr algorithm can detect network congestion earlier, due to its relatively fixed and long rate adjustment cycle, the speed reduction feedback is relatively slow. When new connections are added to the network and congestion occurs, the feedback is also relatively slow. It is not suitable for more complex network environments.
[0004] In addition to congestion packet loss, there may also be some random packet loss in the network, such as bit error packet loss and temporary burst packet loss. When random packet loss occurs, the congestion control algorithm based on packet loss feedback control will determine it as packet loss caused by network congestion, and therefore reduce the sending rate. However, in the actual network context, when random packet loss occurs, the speed should not be reduced immediately, because random packet loss does not mean that the overall network environment is congested, and occasional congestion or bit error packet loss in the network can be quickly and automatically recovered. Therefore, when the congestion control algorithm based on packet loss feedback control determines random packet loss as congestion packet loss, it will affect the overall bandwidth utilization.
[0005] Therefore, how to make the congestion control algorithm of the SCTP protocol respond to network congestion more quickly so as to reduce network congestion time and data transmission delay, and how to make the congestion control algorithm based on packet loss feedback control better adapt to network environments with random packet loss are problems that need to be urgently solved in this field. Summary of the invention
[0006] In view of this, the object of the present invention is to provide a data transmission speed control method, device, equipment and medium, so that the congestion control algorithm of the SCTP protocol can respond to network congestion more quickly, so as to reduce network congestion time and data transmission delay, and make the congestion control algorithm based on packet loss feedback control better adapt to the network environment with random packet loss. The specific scheme is as follows:
[0007] In a first aspect, the present application discloses a data transmission speed control method, which is applied to the SCTP protocol, comprising:
[0008] Real-time monitoring of the round-trip delay of data transmission;
[0009] When it is monitored that the rising amplitude of the round-trip delay is less than the first amplitude threshold, the packet loss rate within the preset time is calculated, and the rate adjustment factor is set according to the packet loss rate and the change of the packet loss rate; when it is monitored that the rising amplitude of the round-trip delay is between the first amplitude threshold and the second amplitude threshold, the rate adjustment factor is set to the first deceleration threshold; when it is monitored that the rising amplitude of the round-trip delay is greater than the second amplitude threshold, the rate adjustment factor is set to the second deceleration threshold; wherein the absolute value of the second deceleration threshold is greater than the absolute value of the first deceleration threshold;
[0010] Acquire a current sending speed and a sending speed threshold of the data, and determine a rate adjustment mode according to the current sending speed and the sending speed threshold;
[0011] A target sending speed is determined based on the rate adjustment factor and the rate adjustment mode to achieve control of the data sending speed during the data transmission.
[0012] Optionally, calculating the packet loss rate within a preset time includes:
[0013] The retransmission packet rate within the preset time is determined as the packet loss rate within the preset time, wherein the preset time includes a filling time and a statistical time; the retransmission packet rate is the ratio of the number of retransmission packets to the total number of packets sent within the statistical time; the filling time is the time that does not participate in the statistics of the number of retransmission packets and the total number of packets sent, and the statistical time is the remaining time within the preset time excluding the filling time.
[0014] Optionally, calculating the packet loss rate within a preset time, and setting the rate adjustment factor according to the packet loss rate and a change in the packet loss rate, includes:
[0015] Calculate the packet loss rate within the preset time this time and the packet loss rate within the preset time last time;
[0016] If the packet loss rate within the preset time is less than the first tolerance value, the rate adjustment factor is set to the first acceleration threshold;
[0017] If the packet loss rate within the preset time is greater than the second tolerance value, setting the rate adjustment factor to the second deceleration threshold;
[0018] If the packet loss rate within the last preset time is less than the first tolerance value and the packet loss rate within the current preset time is greater than the first packet loss rate, setting the rate adjustment factor to the second deceleration threshold;
[0019] If the packet loss rate within the preset time last time is less than the first tolerance value, and the packet loss rate within the preset time this time is greater than the first tolerance value and less than the first packet loss rate, setting the rate adjustment factor to the first deceleration threshold;
[0020] If the percentage increase of the packet loss rate within the preset time this time compared with the packet loss rate within the preset time last time is not greater than the first percentage, the rate adjustment factor is set to the first acceleration threshold; if the percentage increase of the packet loss rate within the preset time this time compared with the packet loss rate within the preset time last time is greater than the first percentage and not greater than the second percentage, the rate adjustment factor is set to the first deceleration threshold; if the percentage increase of the packet loss rate within the preset time this time compared with the packet loss rate within the preset time last time is greater than the second percentage, the rate adjustment factor is set to the second deceleration threshold.
[0021] Optionally, determining the rate adjustment mode according to the current sending speed and the sending speed threshold value includes:
[0022] If the current sending speed is less than half of the sending speed threshold, determining the rate adjustment mode as the first mode;
[0023] If the current sending speed is greater than half of the sending speed threshold and less than the sending speed threshold, determining the rate adjustment mode as the second mode;
[0024] If the current sending speed is not less than the sending speed threshold, the rate adjustment mode is determined to be the third mode.
[0025] Optionally, determining a target sending speed based on the rate adjustment factor and the rate adjustment mode includes:
[0026] If the rate adjustment factor is the first acceleration threshold, the current sending speed is increased by a third percentage when the rate adjustment mode is the first mode, the current sending speed is increased by a fourth percentage when the rate adjustment mode is the second mode, and the current sending speed is increased by a fifth percentage when the rate adjustment mode is the third mode, so as to obtain the target sending speed, wherein the relationship between the third percentage, the fourth percentage and the fifth percentage is that the third percentage is greater than the fourth percentage and the fourth percentage is greater than the fifth percentage.
[0027] Optionally, determining a target sending speed based on the rate adjustment factor and the rate adjustment mode includes:
[0028] If the rate adjustment factor is the first deceleration threshold, then when the rate adjustment mode is the first mode, the sending speed is reduced to the sixth percentage of the current sending speed, and the sending speed threshold value is determined as the current sending speed; when the rate adjustment mode is the second mode, the sending speed is reduced to the seventh percentage of the current sending speed, and the sending speed threshold value is determined as the current sending speed; when the rate adjustment mode is the third mode, the sending speed is reduced to the eighth percentage of the current sending speed, and the sending speed threshold value is determined as the current sending speed, so as to obtain the target sending speed, wherein the relationship between the sixth percentage, the seventh percentage and the eighth percentage is that the sixth percentage is less than the seventh percentage and the seventh percentage is less than the eighth percentage.
[0029] Optionally, determining a target sending speed based on the rate adjustment factor and the rate adjustment mode includes:
[0030] If the rate adjustment factor is the second deceleration threshold, then when the rate adjustment mode is the first mode, the sending speed is reduced to the ninth percentage of the current sending speed, and the sending speed threshold is reduced to the tenth percentage of the current sending speed; when the rate adjustment mode is the second mode, the sending speed is reduced to the eleventh percentage of the current sending speed, and the sending speed threshold is reduced to the twelfth percentage of the current sending speed; when the rate adjustment mode is the third mode, the sending speed is reduced to the thirteenth percentage of the current sending speed, and the sending speed threshold is reduced to the fourteenth percentage of the current sending speed, wherein the relationship between the ninth percentage, the eleventh percentage and the thirteenth percentage is that the ninth percentage is less than the eleventh percentage and the eleventh percentage is less than the thirteenth percentage; the relationship between the tenth percentage, the twelfth percentage and the fourteenth percentage is that the tenth percentage is less than the twelfth percentage and the twelfth percentage is less than the fourteenth percentage.
[0031] Optionally, the data transmission speed control method further includes:
[0032] If the rising amplitude of the round-trip delay is less than the first amplitude threshold, the packet loss type in the data transmission process is determined according to the calculated packet loss rate and the change in the packet loss rate; when the packet loss type is random packet loss, the current sending speed is accelerated and adjusted accordingly, and the lost data packets are retransmitted; when the packet loss type is congestion packet loss, the current sending speed is decelerated and adjusted accordingly, and the lost data packets are retransmitted.
[0033] If the increase amplitude of the round-trip delay is between the first amplitude threshold and the second amplitude threshold or is greater than the second amplitude threshold, it is determined that congestion occurs during the data transmission process, and the current sending speed is decelerated and adjusted accordingly.
[0034] In a second aspect, the present application discloses a data transmission speed control method and device, which is applied to the SCTP protocol, including:
[0035] Monitoring module, used to monitor the round-trip delay of data transmission in real time;
[0036] A rate adjustment factor determination module, configured to calculate the packet loss rate within a preset time when the rising amplitude of the round-trip delay is monitored to be less than a first amplitude threshold, and set the rate adjustment factor according to the packet loss rate and the change of the packet loss rate; when the rising amplitude of the round-trip delay is monitored to be between the first amplitude threshold and the second amplitude threshold, set the rate adjustment factor to the first deceleration threshold; when the rising amplitude of the round-trip delay is monitored to be greater than the second amplitude threshold, set the rate adjustment factor to the second deceleration threshold; wherein the absolute value of the second deceleration threshold is greater than the absolute value of the first deceleration threshold;
[0037] A rate adjustment mode determination module, used to obtain the current sending speed and the sending speed threshold of the data, and determine the rate adjustment mode according to the current sending speed and the sending speed threshold;
[0038] The target transmission speed determination module is used to determine the target transmission speed based on the rate adjustment factor and the rate adjustment mode, so as to control the data transmission speed in the data transmission.
[0039] In a third aspect, the present application discloses an electronic device, comprising:
[0040] Memory, used to store computer programs;
[0041] The processor is used to execute the computer program to implement the data transmission speed control method disclosed above.
[0042] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned disclosed data transmission speed control method is implemented.
[0043] It can be seen that the present application proposes a data transmission speed control method, including: real-time monitoring of the round-trip delay of data transmission; when it is monitored that the rising amplitude of the round-trip delay is less than the first amplitude threshold, the packet loss rate within the preset time is calculated, and the rate adjustment factor is set according to the packet loss rate and the change of the packet loss rate, when it is monitored that the rising amplitude of the round-trip delay is between the first amplitude threshold and the second amplitude threshold, the rate adjustment factor is set to the first deceleration threshold, when it is monitored that the rising amplitude of the round-trip delay is greater than the second amplitude threshold, the rate adjustment factor is set to the second deceleration threshold; wherein the absolute value of the second deceleration threshold is greater than the absolute value of the first deceleration threshold; the current transmission speed of the data is obtained. degree and a sending speed threshold, and determine a rate adjustment mode according to the current sending speed and the sending speed threshold; determine a target sending speed based on the rate adjustment factor and the rate adjustment mode to achieve control of the data sending speed during the data transmission. In this way, the present application achieves early control of congestion by monitoring the increase in the round-trip delay, so that the congestion control algorithm of the SCTP protocol responds to network congestion more quickly, reduces network congestion time and reduces data transmission delay, and the present application distinguishes the packet loss type by detecting the packet loss rate and the change in the packet loss rate, so that the congestion control algorithm based on packet loss feedback control can better adapt to the network environment with random packet loss. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0045] Figure 1 A flow chart of a data transmission speed control method disclosed in this application;
[0046] Figure 2 A flow chart of a specific data transmission speed control method disclosed in this application;
[0047] Figure 3 A schematic diagram of a specific data transmission speed control method disclosed in this application;
[0048] Figure 4 This is a schematic diagram of the structure of a data transmission speed control device disclosed in this application;
[0049] Figure 5 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] The congestion control algorithm based on packet loss feedback responds too slowly to network congestion, resulting in increased transmission delay and periodic severe congestion. In addition, the congestion control algorithm based on packet loss feedback cannot adapt well to network environments with random packet loss. Although the BBR algorithm can detect network congestion earlier, its speed reduction feedback is relatively slow and is not suitable for more complex network environments.
[0052] To this end, an embodiment of the present application proposes a data sending speed control scheme, which can enable the congestion control algorithm of the SCTP protocol to respond to network congestion more quickly, reduce network congestion time and data transmission delay, and enable the congestion control algorithm based on packet loss feedback control to better adapt to network environments with random packet loss.
[0053] The present application discloses a method for controlling data transmission speed. Figure 1 As shown, the method includes:
[0054] Step S11: monitor the round trip delay of data transmission in real time.
[0055] In this embodiment, when network congestion occurs, the round-trip delay often increases before packet loss. Therefore, this embodiment monitors the round-trip delay of data transmission in real time and makes corresponding adjustments based on the monitoring results to achieve early control of congestion.
[0056] Step S12: When it is monitored that the rising amplitude of the round-trip delay is less than the first amplitude threshold, the packet loss rate within the preset time is calculated, and the rate adjustment factor is set according to the packet loss rate and the change of the packet loss rate; when it is monitored that the rising amplitude of the round-trip delay is between the first amplitude threshold and the second amplitude threshold, the rate adjustment factor is set to the first deceleration threshold; when it is monitored that the rising amplitude of the round-trip delay is greater than the second amplitude threshold, the rate adjustment factor is set to the second deceleration threshold; wherein the absolute value of the second deceleration threshold is greater than the absolute value of the first deceleration threshold.
[0057] In this embodiment, when there is no congestion, the change range of the round-trip delay is relatively small. At this time, the rate should be further adjusted according to the packet loss rate and the change of the packet loss rate. When congestion begins to occur, data will start to queue and the round-trip delay will increase. At this time, the speed should be reduced, rather than waiting until packet loss occurs to reduce the speed. Specifically, when the increase range of the round-trip delay is monitored to be less than the first amplitude threshold, the packet loss rate within the preset time is calculated, and the rate adjustment factor is set according to the packet loss rate and the change of the packet loss rate. When the increase range of the round-trip delay is monitored to be between the first amplitude threshold and the second amplitude threshold, the rate adjustment factor is set to the first deceleration threshold. When the increase range of the round-trip delay is monitored to be greater than the second amplitude threshold, the rate adjustment factor is set to the second deceleration threshold. In this way, the congestion control algorithm of the SCTP protocol can respond to network congestion more quickly, reduce network congestion time and reduce data transmission delay. It should be noted that the absolute value of the second deceleration threshold is greater than the absolute value of the first deceleration threshold.
[0058] In this embodiment, the retransmission packet rate within the preset time is determined as the packet loss rate within the preset time, wherein the preset time includes the gap filling time and the statistical time; the retransmission packet rate is the ratio of the number of retransmission packets to the total number of packets sent within the statistical time; the gap filling time is the time that does not participate in the statistics of the number of retransmission packets and the total number of packets sent, and the statistical time is the remaining time within the preset time excluding the gap filling time. It should be pointed out that the preset time in this embodiment is used to control the interval time for recalculating the rate, and the sending rate remains unchanged before the next preset time arrives.
[0059] Step S13: Acquire the current sending speed and the sending speed threshold of the data, and determine a rate adjustment mode according to the current sending speed and the sending speed threshold.
[0060] In this embodiment, the current data transmission speed and the transmission speed threshold are firstly acquired, and the rate adjustment mode is determined according to the current transmission speed and the transmission speed threshold. In this way, the rate adjustment can be smoother and gentler.
[0061] Step S14: determining a target sending speed based on the rate adjustment factor and the rate adjustment mode, so as to control the data sending speed during the data transmission.
[0062] In this embodiment, after the rate adjustment factor and the rate adjustment mode are obtained, it is necessary to determine the target transmission speed based on the rate adjustment factor and the rate adjustment mode to achieve control of the data transmission speed during data transmission.
[0063] It should be pointed out that according to the aforementioned disclosed content, the round-trip delay of data transmission can be monitored in real time. If the increase in the round-trip delay is less than the first amplitude threshold, the type of packet loss in the process of data transmission is determined according to the calculated packet loss rate and the change in the packet loss rate. When the packet loss type is random packet loss, the current sending speed is adjusted to accelerate accordingly and the lost data packets are retransmitted. When the packet loss type is congestion packet loss, the current sending speed is adjusted to decelerate accordingly and the lost data packets are retransmitted. If the increase in the round-trip delay is between the first amplitude threshold and the second amplitude threshold or is greater than the second amplitude threshold, it is determined that congestion occurs in the process of data transmission, and the current sending speed is adjusted to decelerate accordingly and the lost data packets are retransmitted. In this way, the present application determines how to adjust the sending speed by the increase in the round-trip delay and the packet loss rate and the change in the packet loss rate, so that the congestion control algorithm based on packet loss feedback control can better adapt to the network environment with random packet loss.
[0064] It can be seen that the present application proposes a data transmission speed control method, including: real-time monitoring of the round-trip delay of data transmission; when it is monitored that the rising amplitude of the round-trip delay is less than the first amplitude threshold, the packet loss rate within the preset time is calculated, and the rate adjustment factor is set according to the packet loss rate and the change of the packet loss rate, when it is monitored that the rising amplitude of the round-trip delay is between the first amplitude threshold and the second amplitude threshold, the rate adjustment factor is set to the first deceleration threshold, when it is monitored that the rising amplitude of the round-trip delay is greater than the second amplitude threshold, the rate adjustment factor is set to the second deceleration threshold; wherein the absolute value of the second deceleration threshold is greater than the absolute value of the first deceleration threshold; the current transmission speed of the data is obtained. degree and a sending speed threshold, and determine a rate adjustment mode according to the current sending speed and the sending speed threshold; determine a target sending speed based on the rate adjustment factor and the rate adjustment mode to achieve control of the data sending speed during the data transmission. In this way, the present application achieves early control of congestion by monitoring the increase in the round-trip delay, so that the congestion control algorithm of the SCTP protocol responds to network congestion more quickly, reduces network congestion time and reduces data transmission delay, and the present application distinguishes the packet loss type by detecting the packet loss rate and the change in the packet loss rate, so that the congestion control algorithm based on packet loss feedback control can better adapt to the network environment with random packet loss.
[0065] The present application discloses a specific method for controlling the data transmission speed. Figure 2 As shown, the method includes:
[0066] Step S21: monitor the round trip delay of data transmission in real time.
[0067] Among them, for more specific working processes of the above steps, please refer to the aforementioned disclosed embodiments, which will not be repeated here.
[0068] Step S22: when it is monitored that the rising amplitude of the round-trip delay is less than the first amplitude threshold, the packet loss rate within the preset time is calculated, and the rate adjustment factor is set according to the packet loss rate and the change of the packet loss rate; when it is monitored that the rising amplitude of the round-trip delay is between the first amplitude threshold and the second amplitude threshold, the rate adjustment factor is set to the first deceleration threshold; when it is monitored that the rising amplitude of the round-trip delay is greater than the second amplitude threshold, the rate adjustment factor is set to the second deceleration threshold; wherein the absolute value of the second deceleration threshold is greater than the absolute value of the first deceleration threshold.
[0069] In this embodiment, when it is monitored that the rising amplitude of the round-trip delay is less than the first amplitude threshold, the packet loss rate within the preset time this time and the packet loss rate within the preset time last time are calculated; if the packet loss rate within the preset time this time is less than the first tolerance value, the rate adjustment factor is set to the first acceleration threshold; if the packet loss rate within the preset time this time is greater than the second tolerance value, the rate adjustment factor is set to the second deceleration threshold; if the packet loss rate within the preset time last time is less than the first tolerance value and the packet loss rate within the preset time this time is greater than the first packet loss rate, the rate adjustment factor is set to the second deceleration threshold; if the packet loss rate within the preset time last time is less than the first tolerance value and the packet loss rate within the preset time this time is greater than the first packet loss rate If the packet rate is greater than the first tolerance value and less than the first packet loss rate, the rate adjustment factor is set to the first deceleration threshold; if the percentage increase of the packet loss rate within the preset time this time compared with the packet loss rate within the preset time last time is not greater than the first percentage, the rate adjustment factor is set to the first acceleration threshold; if the percentage increase of the packet loss rate within the preset time this time compared with the packet loss rate within the preset time last time is greater than the first percentage and not greater than the second percentage, the rate adjustment factor is set to the first deceleration threshold; if the percentage increase of the packet loss rate within the preset time this time compared with the packet loss rate within the preset time last time is greater than the second percentage, the rate adjustment factor is set to the second deceleration threshold.
[0070] Step S23: Obtain the current sending speed and the sending speed threshold value of the data. If the current sending speed is less than half of the sending speed threshold value, determine the rate adjustment mode as the first mode; if the current sending speed is greater than half of the sending speed threshold value and less than the sending speed threshold value, determine the rate adjustment mode as the second mode; if the current sending speed is not less than the sending speed threshold value, determine the rate adjustment mode as the third mode.
[0071] It should be pointed out that the first mode in this embodiment is slow start; the second mode is the congestion front stage; the third mode is congestion avoidance. In this way, the present application adds a congestion front stage to the rate adjustment mode to make the rate adjustment smoother, and the proportional control of the adjustment range of the rate adjustment factor is more flexible.
[0072] Step S24: If the rate adjustment factor is the first acceleration threshold, then when the rate adjustment mode is the first mode, the current sending speed is increased by a third percentage; when the rate adjustment mode is the second mode, the current sending speed is increased by a fourth percentage; when the rate adjustment mode is the third mode, the current sending speed is increased by a fifth percentage to obtain the target sending speed, so as to achieve control of the data sending speed during the data transmission.
[0073] It should be noted that, in this embodiment, the relationship among the third percentage, the fourth percentage and the fifth percentage is that the third percentage is greater than the fourth percentage and the fourth percentage is greater than the fifth percentage.
[0074] Step S25: If the rate adjustment factor is the first deceleration threshold, then when the rate adjustment mode is the first mode, the sending speed is reduced to the sixth percentage of the current sending speed, and the sending speed threshold value is determined as the current sending speed; when the rate adjustment mode is the second mode, the sending speed is reduced to the seventh percentage of the current sending speed, and the sending speed threshold value is determined as the current sending speed; when the rate adjustment mode is the third mode, the sending speed is reduced to the eighth percentage of the current sending speed, and the sending speed threshold value is determined as the current sending speed, so as to obtain the target sending speed, so as to realize the control of the data sending speed during the data transmission.
[0075] It should be noted that, in this embodiment, the relationship among the sixth percentage, the seventh percentage and the eighth percentage is that the sixth percentage is less than the seventh percentage and the seventh percentage is less than the eighth percentage.
[0076] Step S26: If the rate adjustment factor is the second deceleration threshold, then when the rate adjustment mode is the first mode, the sending speed is reduced to the ninth percentage of the current sending speed, and the sending speed threshold is reduced to the tenth percentage of the current sending speed; when the rate adjustment mode is the second mode, the sending speed is reduced to the eleventh percentage of the current sending speed, and the sending speed threshold is reduced to the twelfth percentage of the current sending speed; when the rate adjustment mode is the third mode, the sending speed is reduced to the thirteenth percentage of the current sending speed, and the sending speed threshold is reduced to the fourteenth percentage of the current sending speed, so as to realize the control of the data sending speed during data transmission.
[0077] It should be pointed out that, in the present embodiment, the relationship between the ninth percentage, the eleventh percentage and the thirteenth percentage is that the ninth percentage is less than the eleventh percentage and the eleventh percentage is less than the thirteenth percentage; the relationship between the tenth percentage, the twelfth percentage and the fourteenth percentage is that the tenth percentage is less than the twelfth percentage and the twelfth percentage is less than the fourteenth percentage.
[0078] In this embodiment, according to the aforementioned disclosed content, the round-trip delay of data transmission can be monitored in real time. If the increase in the round-trip delay is less than the first amplitude threshold, the type of packet loss in the data transmission process is determined according to the calculated packet loss rate and the change in the packet loss rate. When the packet loss type is random packet loss, the current sending speed is adjusted to accelerate accordingly and the lost data packets are retransmitted. When the packet loss type is congestion packet loss, the current sending speed is adjusted to decelerate accordingly and the lost data packets are retransmitted. If the increase in the round-trip delay is between the first amplitude threshold and the second amplitude threshold or is greater than the second amplitude threshold, it is determined that congestion occurs in the data transmission process, and the current sending speed is adjusted to decelerate accordingly and the lost data packets are retransmitted. In this way, the present application determines how to adjust the sending speed by the increase in the round-trip delay, the packet loss rate and the change in the packet loss rate, so that the congestion control algorithm based on packet loss feedback control can better adapt to the network environment with random packet loss.
[0079] It can be seen that the present application proposes a data transmission speed control method, including: real-time monitoring of the round-trip delay of data transmission; when the rising amplitude of the round-trip delay is monitored to be less than the first amplitude threshold, the packet loss rate within the preset time is calculated, and the rate adjustment factor is set according to the packet loss rate and the change of the packet loss rate; when the rising amplitude of the round-trip delay is monitored to be between the first amplitude threshold and the second amplitude threshold, the rate adjustment factor is set to the first deceleration threshold; when the rising amplitude of the round-trip delay is monitored to be greater than the second amplitude threshold, the rate adjustment factor is set to the second deceleration threshold; wherein the absolute value of the second deceleration threshold is greater than the absolute value of the first deceleration threshold; obtaining the current sending speed and the sending speed threshold value of the data, if the current sending speed is less than half of the sending speed threshold value, the rate adjustment mode is determined to be the first mode; if the current sending speed is greater than half of the sending speed threshold value and less than the sending speed threshold value, the rate adjustment mode is determined to be the second mode; if the current sending speed is not less than the sending speed threshold value, the rate adjustment mode is set to the second mode. the adjustment mode is determined to be the third mode; if the rate adjustment factor is the first acceleration threshold, then when the rate adjustment mode is the first mode, the current sending speed is increased by a third percentage, when the rate adjustment mode is the second mode, the current sending speed is increased by a fourth percentage, and when the rate adjustment mode is the third mode, the current sending speed is increased by a fifth percentage, so as to obtain a target sending speed, so as to achieve control of the data sending speed during data transmission; if the rate adjustment factor is the first deceleration threshold, then when the rate adjustment mode is the first mode, the sending speed is reduced to a sixth percentage of the current sending speed, and the sending speed threshold value is determined as the current sending speed, when the rate adjustment mode is the second mode, the sending speed is reduced to a seventh percentage of the current sending speed, and the sending speed threshold value is determined as the current sending speed, when the rate adjustment mode is the third mode, the sending speed is reduced to an eighth percentage of the current sending speed, and the sending speed threshold value is determined as the current sending speed, so as to obtain the target sending speed, so as to achieve control of the data sending speed during data transmission;If the rate adjustment factor is the second deceleration threshold, when the rate adjustment mode is the first mode, the sending speed is reduced to the ninth percent of the current sending speed, and the sending speed threshold is reduced to the tenth percent of the current sending speed; when the rate adjustment mode is the second mode, the sending speed is reduced to the eleventh percent of the current sending speed, and the sending speed threshold is reduced to the twelfth percent of the current sending speed; when the rate adjustment mode is the third mode, the sending speed is reduced to the thirteenth percent of the current sending speed, and the sending speed threshold is reduced to the fourteenth percent of the current sending speed, so as to achieve control of the data sending speed during data transmission. In this way, the present application realizes early control of congestion by monitoring the increase in the round-trip delay, so that the congestion control algorithm of the SCTP protocol responds to network congestion faster, reduces the network congestion time and reduces the data transmission delay, and the present application distinguishes the packet loss type by detecting the packet loss rate and the change in the packet loss rate, so that the congestion control algorithm based on packet loss feedback control is better adapted to the network environment with random packet loss. ;
[0080] Figure 3 This is a schematic diagram of the structure of a specific data transmission speed control method disclosed in this application.
[0081] It should be pointed out that the goal of the congestion control algorithm is to allow the connection to send data at the highest possible rate without causing continuous network congestion. The commonly used strategy of the algorithm is to gradually increase the sending rate from a lower rate until it detects that the rate is too high and congestion occurs, then reduce the rate, and then gradually increase the rate until congestion is detected, and then reduce the rate again, and repeat this process. Depending on the detection method and control node, it can be divided into congestion control algorithms based on packet loss feedback control, such as bic, cubic and other algorithms, and algorithms based on bottleneck bandwidth (BtlBw) (the maximum forwarding rate that a physical device can achieve) for congestion control, such as the bbr algorithm.
[0082] The difference between congestion control algorithms based on packet loss feedback such as BIC and CUBIC is that when congestion occurs, that is, when packet loss occurs, the methods of adjusting the congestion window are different. The BIC algorithm uses the binary search method to calculate the window value, while the CUBIC algorithm uses the cubic curve method to calculate the window value.
[0083] The bbr algorithm does not perform congestion control based on packet loss feedback, but tries different sending rates while detecting RTT, calculates the maximum receiving rate when the RTT is the minimum as the bottleneck bandwidth (BtlBw), and then sends data at the bottleneck bandwidth for a certain period of time, and then tries different sending rates again to measure the new bottleneck bandwidth. The main design ideas of the bbr algorithm are:
[0084] (1) Make the sending rate close to the maximum network bandwidth and the in-flight data close to the BDP (maximum bandwidth multiplied by minimum latency), meeting the three goals of maximizing the sending rate while minimizing the buffer occupancy on the forwarding path and ensuring fair bandwidth utilization.
[0085] (2) Instant bandwidth calculation: The system keeps track of the maximum bw among 10 RTTs as the instant bandwidth bw. The instant bandwidth is calculated every time an ACK (Acknowledgement) is received: bw = (the amount of data in the current ACK response - the amount of data in the last ACK response) / the time interval between two ACKs. The maximum bandwidth is obtained by intentionally increasing the sending speed until the receiving speed no longer increases.
[0086] (3) RTT tracking: The system keeps tracking the minimum RTT within at least 10 seconds. The minimum RTT is measured by intentionally reducing the amount of data sent to an extremely low level.
[0087] (4) The BBR algorithm outputs pacing_rate and cwnd. Pacing_rate is the actual sending rate obtained by multiplying bw by the gain coefficient pacing_gain, and cwnd is the sending window size obtained by multiplying the bandwidth-delay product BDP by the gain coefficient cwnd_gain.
[0088] (5)Pipe status: STARTUP, DRAIN, RPOBE_BW, PROBE_RTT.
[0089] STARTUP: Startup state, increase the sending rate exponentially according to the gain coefficient pacing_gain of 2 to 3. After three times, it is found that the delivery rate does not increase anymore, and the estimated value of the maximum bw is tested;
[0090] DRAIN: Draining state. According to the pacing rate, pacing_gain is 1000 / 2885, cwnd_gain is 1000 / 2005+1, the sending rate is reduced, and the buffer on the forwarding path that was occupied in the previous state is drained;
[0091] PROBE_BW: bandwidth detection state, lasting 8 RTTs, cwnd_gain is 2, pacing_gain of each RTT is 5 / 4, 3 / 4, 1, 1, 1, 1, 1, 1, if the RTT does not increase after the rate increases, increase the estimated value of bw after this round; if the RTT increases rapidly within 2 seconds, reduce the sending rate, if the RTT does not fall back to the minimum RTT after deceleration, continue to decelerate after this round of state ends;
[0092] PROBE_RTT: Every 10 seconds, if the RTT does not reach the minimum RTT, it enters the RTT detection state. pacing_gain is 1, but cwnd is forced to the minimum value of 4 MSS to prevent packet loss. It lasts for one RTT or at least 200ms.
[0093] Although the BBR algorithm can detect network congestion earlier, due to its relatively fixed and long rate adjustment cycle, the speed reduction feedback is relatively slow. When new connections are added to the network and congestion occurs, the feedback is also relatively slow. It is not suitable for more complex network environments.
[0094] In addition, it should be pointed out that in addition to congestion packet loss, there may also be some random packet loss in the network, such as bit error packet loss and temporary burst packet loss. In network data transmission, the bit error rate refers to the ratio of transmitted error bits to the total number of transmitted bits, which may be caused by temporary signal interference or conflict. The communication link in the actual network is not ideal, especially in satellite links, mobile communication links, and WIFI links. There will be a certain proportion of data frames that will have errors during transmission. The link layer usually discards the error message, resulting in packet loss.
[0095] TCP and SCTP algorithms treat all network packet loss as network congestion, which will lead to a reduction in the window size in the packet loss-based congestion control algorithm, causing the network transmission speed to drop. In the actual network background, when random packet loss occurs, the speed should not be reduced immediately, because random packet loss does not mean that the overall network environment is congested, and occasional congestion or error packet loss in the network can be quickly and automatically recovered.
[0096] This application is proposed to solve the problem that the congestion judgment of the algorithm based on packet loss feedback is purely based on packet loss and is not fast enough and cannot adapt well to the network environment with more random packet loss, and the BBR algorithm is too slow to feedback the changes in the network environment.
[0097] In the case of network congestion and packet loss, the congestion control algorithm based on packet loss feedback performs rate control when packet loss occurs. No matter how the algorithm is optimized, it cannot cover up its natural disadvantage that the timing of control is too late, because the occurrence of congestion and packet loss means that the device buffer on the forwarding path is already full of data, and congestion has occurred at this time. On the one hand, the delay of data transmission is significantly increased, and on the other hand, the algorithm requires a large deceleration range and time to recover from congestion, affecting the transmission rate and the overall bandwidth utilization. In response to random network packet loss, the existing congestion control algorithms based on packet loss feedback will respond by significantly reducing the sending rate. The Tahoe algorithm is the earliest version of TCP. If packet loss occurs, retransmission is performed and the slow start phase is entered; if packet loss occurs in the Reno algorithm, the congestion window is halved; if packet loss occurs in the Bic algorithm and the Cubic algorithm, the congestion window size will also be adjusted accordingly. In the actual network environment, if random packet loss occurs, these algorithms will perform algorithm control for each packet loss, resulting in an unnecessary and significant reduction in the packet sending rate. The congestion control algorithm based on bottleneck bandwidth (BtlBw), the bbr algorithm, is not sensitive to random network background packet loss, but its disadvantages are long RTT detection cycle and slow response to bandwidth changes. It is suitable for relatively simple and stable network environments (such as long-term high-speed data transmission between data centers connected by dedicated lines), but is not suitable for busy network environments where many connections of different speeds and durations coexist (deployment scenarios of network security equipment). On the one hand, the detection cycle is long and the response to bandwidth increases is slow. On the other hand, the conservative deceleration will cause long-term congestion when the actual bandwidth decreases.
[0098] Therefore, the problems to be solved in this application mainly include:
[0099] (1) Enable the SCTP protocol's congestion control algorithm to respond to network congestion more quickly, reducing network congestion time and data transmission delay;
[0100] (2) Solve the problem that the SCTP protocol needs to slow down in response to random network packet loss.
[0101] By solving the above two problems, the SCTP sending rate and the network bandwidth utilization can be improved.
[0102] See also Figure 3A specific data transmission speed control method disclosed is a structural schematic diagram, firstly, the rate adjustment factor is calculated according to the change of the packet loss rate and the change amplitude of the RTT between two preset time periods, and then the speed is adjusted according to the stage of the rate adjustment determined based on the current speed and the speed threshold value and the rate adjustment factor. It should be pointed out that the design idea of the present application is: occasional congestion or error packet loss in the network is inevitable and can be automatically recovered quickly. As long as the packet loss rate calculated by time period does not increase significantly, it only needs simple retransmission without overreacting; in addition, when network congestion occurs, the RTT often increases first before the packet loss. In order to reduce the occurrence of congestion, when the RTT is detected to increase significantly, the packet transmission rate should be reduced, rather than using packet loss as the only criterion for congestion.
[0103] Specifically, the main design points of this application are:
[0104] (1) Preset time, fill-in time and statistical time
[0105] The preset time in this solution is used to control the interval time of rate recalculation. Before the next preset time arrives, the sending rate remains unchanged. The specific calculation formula of the preset time is:
[0106] (srtt+MAX(10,4*rttvar)*2)*dtfactor;
[0107] Among them, srtt is the smoothed round trip time of the sender, rttvar is the change value of the round trip time of the sender, and dtfactor is the time factor, which is related to the rate adjustment stage and the change rate of the packet loss rate counted last time. The value range of dtfactor is an integer varying between [1, 6]. It should be pointed out that the fill-in time is a part of the time factor dtfactor, and the value range of the fill-in time varies between [0, 5]. Generally, it is not zero only when the packet loss rate increases sharply and needs to be decelerated sharply. In this way, it can prevent the rapid deceleration of the sending rate after the rapid deceleration due to the abnormal increase of the packet loss ratio caused by the superposition of the delay effect of the packet loss statistics and the sharp decrease in the number of packets sent.
[0108] In this embodiment, timing starts from the moment of the last rate adjustment. If the fill time (which may be 0) has passed, a new round of packet loss rate statistics begins. When the statistical time has passed, that is, a complete preset time has passed from the moment of the start of timing, the current round of packet loss rate statistics ends and the rate is adjusted according to the change between the current round of statistical results and the previous round of statistical results. Then, a new round of timing starts from the moment of adjustment, and the cycle continues.
[0109] (2) Statistical delay changes to facilitate early control of congestion
[0110] In the process of network data transmission, when there is no congestion, the change of RTT is relatively small. When congestion begins to occur, data will start to queue and RTT will increase. At this time, the speed should be reduced instead of waiting until packet loss occurs.
[0111] In this application, each time a response message is received, the current RTT of the network is calculated based on the sending timestamp of the data packet it responds to, and then the minimum RTT is used as the RTT of the network in the absence of congestion. If the latest measured RTT is greater than the minimum RTT, the rate adjustment factor is calculated based on the increase in RTT:
[0112] When the RTT increase is less than 16ms, it is considered normal delay jitter, and the rate adjustment factor is obtained based on the subsequent changes in the packet loss rate;
[0113] When the RTT increases by 16 to 50 ms, the network is considered to be congested and needs to be slightly decelerated. The rate adjustment factor is set to -1, and the following calculation of adjusting the rate adjustment factor based on packet loss rate statistics is skipped.
[0114] When the RTT increases by 50ms or more, it is considered that the network is severely congested and needs to be significantly slowed down. The adjustment factor is set to -2, and the calculation of the rate adjustment factor based on the packet loss rate statistics is skipped.
[0115] (3) Calculation method of packet loss rate
[0116] The formula for calculating the packet loss rate within a preset time period of this application is as follows:
[0117] Lose_rate=resend / sendtotal*10000;
[0118] Among them, resend is the count of retransmitted packets sent due to packet loss during the statistical period, sendtotal is the total number of packets sent during the statistical period, and lose_rate is the packet loss rate (in ten thousandths).
[0119] (4) Calculate the rate adjustment factor based on the change in packet loss rate
[0120] There are two constant values in the calculation process of packet loss rate in this application: the minimum tolerance value of packet loss rate, the default value is 5 / 10000, and the maximum tolerance value of packet loss rate, the default value is 6000 / 10000. The specific algorithm design is as follows:
[0121] a) If the current statistical packet loss rate is lower than the minimum tolerance value, the rate will be accelerated and the rate adjustment factor value will be 1; otherwise, execute b);
[0122] b) If the current statistical packet loss rate is higher than the maximum tolerance value, a significant speed reduction is performed and the rate adjustment factor is -2; otherwise, execute c);
[0123] c) If the packet loss rate last counted is less than the minimum tolerance and the packet loss rate this time is higher than 2%, a significant speed reduction is performed and the rate adjustment factor is -2; otherwise, execute d);
[0124] d) If the packet loss rate counted last time is less than the minimum tolerance and the packet loss rate counted this time is less than 2% and higher than the minimum tolerance, a small speed reduction is performed and the rate adjustment factor value is -1; otherwise, execute e);
[0125] e) Calculate the percentage a of the packet loss rate increased this time compared to the last time. If a <= 20%, it is considered that the packet loss rate did not increase much this time and the speed is accelerated first, and the rate adjustment factor is 1; if a <= 40%, the packet loss rate increased a lot and the speed is slightly decelerated, and the rate adjustment factor is -1; if a > 40%, the speed is greatly decelerated, and the rate adjustment factor is -2.
[0126] (5) Rate adjustment increases congestion avoidance in front-end mode
[0127] In order to make the rate adjustment more gentle, this application divides the rate adjustment mode into three modes: slow start, congestion front stage and congestion avoidance. The slow start stage refers to the sending speed being less than half of the sending speed threshold, the congestion front stage refers to the sending speed being between half of the sending speed threshold and the sending speed threshold, and the congestion avoidance stage refers to the sending speed being greater than or equal to the sending speed threshold.
[0128] This application performs rate adjustment based on the rate adjustment factor calculated by the previous statistics of RTT change amplitude and packet loss rate change and the stage of the current rate adjustment. The algorithm design is:
[0129] a) If the value of the rate adjustment factor is 1 and it is in the slow start phase, increase the sending speed by 70%; otherwise, execute b);
[0130] b) If the rate adjustment factor is 1 and the traffic is at the front end of congestion, increase the sending speed by 25%; otherwise, execute c);
[0131] c) If the rate adjustment factor is 1 and it is in the congestion avoidance phase, increase the sending speed by 2%; otherwise, execute d)
[0132] d) If the value of the rate adjustment factor is -1 and it is in the slow start phase, the sending speed is reduced to 58% of the original speed, and the sending speed threshold value becomes the original speed size; if the value of the rate adjustment factor is -2 and it is in the slow start phase, the sending speed is reduced to 29% of the original speed, and the sending threshold value becomes 60% of the original speed size; otherwise, execute e);
[0133] e) If the rate adjustment factor is -1 and the traffic is in the front end of congestion, the sending speed is reduced to 80% of the original speed, and the sending speed threshold becomes the original speed; if the rate adjustment factor is -2 and the traffic is in the front end of congestion, the sending speed is reduced to 43% of the original speed, and the sending threshold becomes 90% of the original speed; otherwise, execute f);
[0134] f) If the value of the rate adjustment factor is -1 and it is in the congestion avoidance phase, the sending speed will be reduced to 82% of the original speed, and the sending speed threshold will become the original speed size; if the value of the rate adjustment factor is -2 and it is in the congestion avoidance phase, the sending speed will be reduced to 45% of the original speed, and the sending threshold will become 92% of the original speed size.
[0135] Different from the existing methods of SCTP protocol, this application obtains the adjustment range through statistical data (rather than directly from each packet loss); at the same time, a new congestion front section is added to the rate adjustment mode to make the rate adjustment softer, and the proportional control of the adjustment range of the rate adjustment factor is more flexible, which can be laboratory experience data or data calculated according to different actual network conditions. A positive value of the rate adjustment factor accelerates, and a negative value decelerates. The larger the absolute value, the greater the ratio of acceleration and deceleration.
[0136] Therefore, the technical points of this application are:
[0137] (1) It can control congestion early based on the changes in measured delays;
[0138] (2) The rate can be adjusted based on the packet loss rate statistics in different time periods and according to the change of packet loss rate;
[0139] (3) The design based on the filling time can prevent the calculated packet loss rate from increasing abnormally during the rapid deceleration process, which would cause a chain reaction of deceleration;
[0140] (4) Compared with SCTP, it adds a congestion front end, making the rate adjustment smoother and gentler;
[0141] (5) The packet loss rate is calculated using the ratio of the count of retransmitted segments that are judged to be lost and the total number of segments sent during the statistical period.
[0142] Compared with the congestion control algorithm based on packet loss, the advantages of this application are:
[0143] a) During the speed adjustment process, the RTT will be compared. If the RTT time fluctuates before the sending state reaches serious congestion, the speed can be reduced to avoid large fluctuations in network traffic, increase bandwidth utilization, and reduce data transmission delay;
[0144] b) Congestion control algorithm based on packet loss: When random packet loss occurs, it is impossible to determine whether the packet loss is caused by congestion or by bit errors in the network environment. This will cause changes in the congestion window to affect the sending rate. This application is based on the method of statistical packet loss rate to adjust the sending rate. Random network packet loss fluctuations will not cause changes in the overall packet loss rate, which can better utilize the network bandwidth to increase the transmission speed.
[0145] c) A congestion front section is added between the slow start and congestion avoidance phases, which can make the rate adjustment smoother and avoid unnecessary large rate fluctuations.
[0146] The advantages of this application compared with the BBR algorithm are:
[0147] a) The minimum RTT value in this application is the minimum value in the entire transmission process, which avoids the special RTT detection phase in the BBR algorithm where the sending rate is very low, and increases bandwidth utilization and transmission rate;
[0148] b) This solution controls the rate by counting the packet loss rate, and the rate adjustment time is basically a little longer than the RTT. The rate adjustment time of the BBR algorithm is relatively long, so this application is more sensitive to changes in bandwidth in the network and is suitable for complex and changeable network environments.
[0149] In addition, some relevant assumptions are made for the present technical solution, for example: the method of sensing congestion in advance based on statistical changes in RTT time in the present application is reflected in the BBR algorithm, but the statistical method is different. The BBR algorithm uses a special RTT detection mode and a smaller sending rate to detect the RTT time, while the present application uses the minimum value during the entire data transmission period as the RTT measurement value, so different detection modes can also form alternative solutions; in addition, the RTT measurement method can also have different designs. The present application measures the response time of non-retransmission packets, and other methods for measuring RTT can also be designed, such as adding a sending timestamp to each message, and carrying the timestamp of the responded data in the response message, so that even if the response is a retransmission packet, the RTT time can be measured, but the protocol overhead is larger; the present application calculates the rate adjustment factor based on the statistical packet loss rate change to perform rate control, specifically by statistically analyzing the proportion of retransmission packets at the sending end as an approximate value of the packet loss rate. A solution can also be designed to count the number of received packets at the receiving end and notify the sending end as an alternative, but this solution requires certain extensions to the SCTP protocol; in addition, there can be different designs for adjusting the rate based on changes in the packet loss rate, such as using different detection time lengths, using different rate adjustment strategies and parameters, etc., which may form alternative solutions; a core point of the present application is how to distinguish between random network packet loss and congestion packet loss. The present application uses an increase in the packet loss rate to identify network congestion, and any other method that can identify these two types of packet loss can form an alternative solution. For example, if the in-transit data is less than the network delay-bandwidth product, if packet loss occurs at this time, it can be considered as random packet loss, and only retransmission is required without slowing down.
[0150] Correspondingly, the embodiment of the present application also discloses a data transmission speed control device, see Figure 4 As shown, the device comprises:
[0151] Monitoring module 11, used for real-time monitoring of the round-trip delay of data transmission;
[0152] The rate adjustment factor determination module 12 is used to calculate the packet loss rate within a preset time when the rising amplitude of the round-trip delay is monitored to be less than the first amplitude threshold, and set the rate adjustment factor according to the packet loss rate and the change of the packet loss rate; when the rising amplitude of the round-trip delay is monitored to be between the first amplitude threshold and the second amplitude threshold, the rate adjustment factor is set to the first deceleration threshold; when the rising amplitude of the round-trip delay is monitored to be greater than the second amplitude threshold, the rate adjustment factor is set to the second deceleration threshold; wherein the absolute value of the second deceleration threshold is greater than the absolute value of the first deceleration threshold;
[0153] The rate adjustment mode determination module 13 is used to obtain the current transmission speed of the data and the transmission speed threshold value, and determine the rate adjustment mode according to the current transmission speed and the transmission speed threshold value;
[0154] The target transmission speed determination module 14 is used to determine the target transmission speed based on the rate adjustment factor and the rate adjustment mode, so as to control the data transmission speed during the data transmission.
[0155] Among them, for more specific working processes of the above-mentioned modules, please refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.
[0156] It can be seen that the present application proposes a data transmission speed control method, including: real-time monitoring of the round-trip delay of data transmission; when it is monitored that the rising amplitude of the round-trip delay is less than the first amplitude threshold, the packet loss rate within the preset time is calculated, and the rate adjustment factor is set according to the packet loss rate and the change of the packet loss rate, when it is monitored that the rising amplitude of the round-trip delay is between the first amplitude threshold and the second amplitude threshold, the rate adjustment factor is set to the first deceleration threshold, when it is monitored that the rising amplitude of the round-trip delay is greater than the second amplitude threshold, the rate adjustment factor is set to the second deceleration threshold; wherein the absolute value of the second deceleration threshold is greater than the absolute value of the first deceleration threshold; the current transmission speed of the data is obtained. degree and a sending speed threshold, and determine a rate adjustment mode according to the current sending speed and the sending speed threshold; determine a target sending speed based on the rate adjustment factor and the rate adjustment mode to achieve control of the data sending speed during the data transmission. In this way, the present application achieves early control of congestion by monitoring the increase in the round-trip delay, so that the congestion control algorithm of the SCTP protocol responds to network congestion more quickly, reduces network congestion time and reduces data transmission delay, and the present application distinguishes the packet loss type by detecting the packet loss rate and the change in the packet loss rate, so that the congestion control algorithm based on packet loss feedback control can better adapt to the network environment with random packet loss.
[0157] Furthermore, an embodiment of the present application also provides an electronic device. Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0158] Figure 5The present invention provides a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a display screen 23, an input / output interface 24, a communication interface 25, a power supply 26, and a communication bus 27. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the data transmission speed control method disclosed in any of the above embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0159] In this embodiment, the power supply 26 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 24 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0160] In addition, the memory 22, as a carrier for storing resources, may be a read-only memory, a random access memory, a disk or an optical disk, etc., and the resources stored thereon may include a computer program 221, and the storage method may be temporary storage or permanent storage. In addition to including a computer program that can be used to complete the data transmission speed control method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 221 may further include a computer program that can be used to complete other specific tasks.
[0161] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned disclosed data transmission speed control method is implemented.
[0162] For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, which will not be described in detail here.
[0163] The various embodiments in this application are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0164] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may 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.
[0165] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0166] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0167] The above is a detailed introduction to a data transmission speed control method, device, equipment, and storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data transmission speed control method, characterized in that: Applicable to SCTP protocol, including: Real-time monitoring of the round-trip delay of data transmission; When it is monitored that the rising amplitude of the round-trip delay is less than the first amplitude threshold, the packet loss rate within the preset time is calculated, and the rate adjustment factor is set according to the packet loss rate and the change of the packet loss rate; when it is monitored that the rising amplitude of the round-trip delay is between the first amplitude threshold and the second amplitude threshold, the rate adjustment factor is set to the first deceleration threshold; when it is monitored that the rising amplitude of the round-trip delay is greater than the second amplitude threshold, the rate adjustment factor is set to the second deceleration threshold; wherein the absolute value of the second deceleration threshold is greater than the absolute value of the first deceleration threshold; Acquire a current sending speed and a sending speed threshold of the data, and determine a rate adjustment mode according to the current sending speed and the sending speed threshold; Determining a target transmission speed based on the rate adjustment factor and the rate adjustment mode to achieve control of the data transmission speed during the data transmission; If the rate adjustment factor is a positive value, acceleration is performed, and if the rate adjustment factor is a negative value, deceleration is performed. The larger the absolute value of the rate adjustment factor is, the greater the ratio of acceleration and deceleration is.
2. The data transmission speed control method according to claim 1, characterized in that: The calculating the packet loss rate within the preset time includes: The retransmission packet rate within the preset time is determined as the packet loss rate within the preset time, wherein the preset time includes a filling time and a statistical time; the retransmission packet rate is the ratio of the number of retransmission packets to the total number of packets sent within the statistical time; the filling time is the time that does not participate in the statistics of the number of retransmission packets and the total number of packets sent, and the statistical time is the remaining time within the preset time excluding the filling time.
3. The data transmission speed control method according to claim 1, characterized in that: The calculating the packet loss rate within a preset time, and setting the rate adjustment factor according to the packet loss rate and a change in the packet loss rate, includes: Calculate the packet loss rate within the preset time this time and the packet loss rate within the preset time last time; Step a: If the packet loss rate within the preset time is less than the first tolerance value, the rate adjustment factor is set to the first acceleration threshold, otherwise, step b is executed; Step b: if the packet loss rate within the preset time is greater than the second tolerance value, the rate adjustment factor is set to the second deceleration threshold, otherwise, step c is executed; Step c: if the packet loss rate within the last preset time is less than the first tolerance value and the packet loss rate within the current preset time is greater than the first packet loss rate, then the rate adjustment factor is set to the second deceleration threshold, otherwise, step d is executed; Step d: if the packet loss rate within the preset time last time is less than the first tolerance value, and the packet loss rate within the preset time this time is greater than the first tolerance value and less than the first packet loss rate, then the rate adjustment factor is set to the first deceleration threshold, otherwise, executing step e; Step e: if the percentage increase of the packet loss rate within the preset time this time compared with the packet loss rate within the preset time last time is not greater than the first percentage, the rate adjustment factor is set to the first acceleration threshold; if the percentage increase of the packet loss rate within the preset time this time compared with the packet loss rate within the preset time last time is greater than the first percentage and not greater than the second percentage, the rate adjustment factor is set to the first deceleration threshold; if the percentage increase of the packet loss rate within the preset time this time compared with the packet loss rate within the preset time last time is greater than the second percentage, the rate adjustment factor is set to the second deceleration threshold.
4. The data transmission speed control method according to claim 3, characterized in that: The determining the rate adjustment mode according to the current sending speed and the sending speed threshold value includes: If the current sending speed is less than half of the sending speed threshold, determining the rate adjustment mode as the first mode; If the current sending speed is greater than half of the sending speed threshold and less than the sending speed threshold, determining the rate adjustment mode as the second mode; If the current sending speed is not less than the sending speed threshold, the rate adjustment mode is determined to be the third mode.
5. The data transmission speed control method according to claim 4, characterized in that: The determining a target sending speed based on the rate adjustment factor and the rate adjustment mode includes: If the rate adjustment factor is the first acceleration threshold, the current sending speed is increased by a third percentage when the rate adjustment mode is the first mode, the current sending speed is increased by a fourth percentage when the rate adjustment mode is the second mode, and the current sending speed is increased by a fifth percentage when the rate adjustment mode is the third mode, so as to obtain the target sending speed, wherein the relationship between the third percentage, the fourth percentage and the fifth percentage is that the third percentage is greater than the fourth percentage and the fourth percentage is greater than the fifth percentage.
6. The data transmission speed control method according to claim 4, characterized in that: The determining a target sending speed based on the rate adjustment factor and the rate adjustment mode includes: If the rate adjustment factor is the first deceleration threshold, then when the rate adjustment mode is the first mode, the sending speed is reduced to the sixth percentage of the current sending speed, and the sending speed threshold value is determined as the current sending speed; when the rate adjustment mode is the second mode, the sending speed is reduced to the seventh percentage of the current sending speed, and the sending speed threshold value is determined as the current sending speed; when the rate adjustment mode is the third mode, the sending speed is reduced to the eighth percentage of the current sending speed, and the sending speed threshold value is determined as the current sending speed, so as to obtain the target sending speed, wherein the relationship between the sixth percentage, the seventh percentage and the eighth percentage is that the sixth percentage is less than the seventh percentage and the seventh percentage is less than the eighth percentage.
7. The data transmission speed control method according to claim 4, characterized in that: The determining a target sending speed based on the rate adjustment factor and the rate adjustment mode includes: If the rate adjustment factor is the second deceleration threshold, then when the rate adjustment mode is the first mode, the sending speed is reduced to the ninth percentage of the current sending speed, and the sending speed threshold is reduced to the tenth percentage of the current sending speed; when the rate adjustment mode is the second mode, the sending speed is reduced to the eleventh percentage of the current sending speed, and the sending speed threshold is reduced to the twelfth percentage of the current sending speed; when the rate adjustment mode is the third mode, the sending speed is reduced to the thirteenth percentage of the current sending speed, and the sending speed threshold is reduced to the fourteenth percentage of the current sending speed, wherein the relationship between the ninth percentage, the eleventh percentage and the thirteenth percentage is that the ninth percentage is less than the eleventh percentage and the eleventh percentage is less than the thirteenth percentage; the relationship between the tenth percentage, the twelfth percentage and the fourteenth percentage is that the tenth percentage is less than the twelfth percentage and the twelfth percentage is less than the fourteenth percentage.
8. The data transmission rate control method according to any one of claims 1 to 7, characterized in that: Also includes: If the increase amplitude of the round-trip delay is less than the first amplitude threshold, determining the packet loss type in the data transmission process according to the calculated packet loss rate and the change of the packet loss rate, and when the packet loss type is random packet loss, performing a corresponding acceleration adjustment on the current sending speed and retransmitting the lost data packets, and when the packet loss type is congestion packet loss, performing a corresponding deceleration adjustment on the current sending speed and retransmitting the lost data packets; If the increase amplitude of the round-trip delay is between the first amplitude threshold and the second amplitude threshold or is greater than the second amplitude threshold, it is determined that congestion occurs during the data transmission process, and the current sending speed is decelerated and adjusted accordingly.
9. A data transmission speed control device, characterized in that: Applicable to SCTP protocol, including: Monitoring module, used to monitor the round-trip delay of data transmission in real time; A rate adjustment factor determination module, configured to calculate the packet loss rate within a preset time when the rising amplitude of the round-trip delay is monitored to be less than a first amplitude threshold, and set the rate adjustment factor according to the packet loss rate and the change of the packet loss rate; when the rising amplitude of the round-trip delay is monitored to be between the first amplitude threshold and the second amplitude threshold, set the rate adjustment factor to the first deceleration threshold; when the rising amplitude of the round-trip delay is monitored to be greater than the second amplitude threshold, set the rate adjustment factor to the second deceleration threshold; wherein the absolute value of the second deceleration threshold is greater than the absolute value of the first deceleration threshold; A rate adjustment mode determination module, used to obtain the current sending speed and the sending speed threshold of the data, and determine the rate adjustment mode according to the current sending speed and the sending speed threshold; a target transmission speed determination module, configured to determine a target transmission speed based on the rate adjustment factor and the rate adjustment mode, so as to control the data transmission speed during the data transmission; If the rate adjustment factor is a positive value, acceleration is performed, and if the rate adjustment factor is a negative value, deceleration is performed. The larger the absolute value of the rate adjustment factor is, the greater the ratio of acceleration and deceleration is.
10. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the data transmission speed control method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: Used to store a computer program; wherein, when the computer program is executed by a processor, the data transmission speed control method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Method, system and apparatus for adjusting data package transmission velocity
CN101282173A
Media data transmission method and device
CN106301684A