CN109688064B - Data transmission method and device, electronic equipment and storage medium - Google Patents

Data transmission method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109688064B
CN109688064B CN201811556127.6A CN201811556127A CN109688064B CN 109688064 B CN109688064 B CN 109688064B CN 201811556127 A CN201811556127 A CN 201811556127A CN 109688064 B CN109688064 B CN 109688064B
Authority
CN
China
Prior art keywords
rate
packet loss
congestion
data
loss rate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811556127.6A
Other languages
Chinese (zh)
Other versions
CN109688064A (en
Inventor
周超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201811556127.6A priority Critical patent/CN109688064B/en
Publication of CN109688064A publication Critical patent/CN109688064A/en
Application granted granted Critical
Publication of CN109688064B publication Critical patent/CN109688064B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/22Traffic shaping
    • H04L47/225Determination of shaping rate, e.g. using a moving window
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/29Flow control; Congestion control using a combination of thresholds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/32Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames

Abstract

The disclosure relates to a data transmission method, a data transmission device, electronic equipment and a storage medium, and belongs to the technical field of networks. In the present disclosure, in transmitting data at a first rate by a transmitting device, when a first packet loss rate at the time of transmitting the data at the first rate is greater than a first threshold, transmitting the data at a second rate greater than the first rate; when network congestion is determined based on the first packet loss rate and a second packet loss rate, determining a congestion rate interval based on the first rate, the second rate and a congestion packet loss rate when the network is congested, wherein the second packet loss rate is a packet loss rate when data is transmitted at the second rate; and transmitting data at a third rate according to the congestion rate interval. The congestion can be judged in real time based on the packet loss rate, so that whether the network is congested or not can be accurately known, and data transmission is carried out at a third rate suitable for the network congestion condition during congestion, so that the accuracy of rate adjustment in the data transmission process is ensured, and the transmission efficiency is improved.

Description

Data transmission method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of network technologies, and in particular, to a data transmission method and apparatus, an electronic device, and a storage medium.
Background
With the development of network technology, data transmitted in a network is increasing. Data is transmitted in units of data packets, and during the transmission process, packet loss often occurs due to channel fading or network congestion. The packet loss refers to that a data packet sent by a sending end is lost in a network transmission process, so that a receiving end cannot receive the data packet. In the art, during data transmission, a certain transmission strategy is usually adopted to reduce loss caused by packet loss.
In the related art, the data transmission process is as follows: the sending end sends a plurality of data packets to the receiving end in real time, and when the packet loss rate is larger than a threshold value, the congestion of a network for transmitting data is determined. At this time, the data packet is continuously transmitted at a speed less than the current transmission speed, so that the network congestion is not congested any more, and the packet loss rate is reduced.
In the above process, the purpose of reducing packet loss is actually achieved by reducing the sending rate, however, packet loss occurs when the channel is degraded, and the packet loss is performed randomly, and even if the sending rate is reduced, the packet loss rate is not reduced, so that the transmission efficiency of data transmission is low. Moreover, reducing the transmission rate not only fails to achieve the purpose of reducing the packet loss rate, but also reduces the effective data packets actually transmitted, resulting in a lower channel utilization rate.
Disclosure of Invention
The disclosure provides a data transmission method, a data transmission device, an electronic device and a storage medium. The problem of low transmission efficiency of data transmission in the related art can be overcome.
According to a first aspect of the embodiments of the present disclosure, there is provided a data transmission method, where the method is applied to a sending device, and the method includes:
in the process that the sending equipment transmits data at a first rate, when a first packet loss rate when the sending equipment transmits the data at the first rate is larger than a first threshold value, transmitting the data at a second rate larger than the first rate;
when network congestion is determined based on the first packet loss rate and the second packet loss rate, determining a congestion rate interval based on the first rate, the second rate and a congestion packet loss rate when the network is congested, wherein the congestion rate interval refers to an interval where an actual rate of data transmission is located when the network is congested, and the second packet loss rate is a packet loss rate when data is transmitted at the second rate;
and transmitting data at a third rate according to the congestion rate interval, wherein the third rate is less than the actual rate of data transmission when the network is congested.
Optionally, when determining that the network is congested based on the first packet loss rate and the second packet loss rate, determining the congestion rate interval based on the first rate, the second rate, and a congestion packet loss rate when the network is congested includes:
when the second packet loss rate is greater than the first packet loss rate, determining the network congestion;
determining the congestion packet loss rate according to the first packet loss rate and a rate change rate, wherein the rate change rate is used for indicating the magnitude relation between the first rate and the second rate;
and determining the congestion rate interval according to the first rate, the second rate and the congestion packet loss rate.
Optionally, the determining the congestion packet loss rate according to the first packet loss rate and the rate change rate includes:
and determining the congestion packet loss rate according to the first packet loss rate and the rate change rate and through a congestion packet loss rate expression, wherein the congestion packet loss rate expression is used for expressing the packet loss rate if the network is congested when data is transmitted at the second rate.
Optionally, the determining the congestion rate interval according to the first rate, the second rate, and the congestion packet loss rate includes:
when the second packet loss rate is greater than the first packet loss rate and less than the congestion packet loss rate, determining that the congestion rate interval is greater than the first rate and less than the second rate;
and when the second packet loss rate is greater than the congestion packet loss rate, determining that the congestion rate interval is smaller than the first rate.
Optionally, the transmitting data at a third rate according to the congestion rate interval includes:
when the congestion rate interval is larger than the first rate and smaller than the second rate, determining the average value of the first rate and the second rate as the third rate, and transmitting data at the third rate;
and when the congestion rate interval is smaller than the first rate, reducing the first rate according to a preset reduction coefficient, determining the reduced first rate as the third rate, and transmitting data at the third rate.
Optionally, the method further includes:
when the network is determined not to be congested based on the first packet loss rate and the second packet loss rate, the second rate is gradually increased according to a first preset amplification factor, data is transmitted at the increased second rate every time until the network is determined to be congested based on the first packet loss rate and the second packet loss rate, and the step of determining a congestion rate interval based on the first rate, the second rate and the congestion packet loss rate when the network is congested is executed.
Optionally, the method further includes:
and when the first packet loss rate is not greater than the first threshold, gradually increasing the first rate according to a second preset amplification factor, transmitting data at the increased rate each time until the first packet loss rate when the data are transmitted at the increased first rate is greater than the first threshold, and executing a step of transmitting data at a second rate greater than the first rate.
According to a second aspect of the embodiments of the present disclosure, there is provided a data transmission apparatus, which is applied to a sending device, the apparatus including:
a first transmission module configured to transmit data at a second rate greater than a first rate when a first packet loss rate when transmitting data at the first rate is greater than a first threshold in transmitting data at the first rate by the transmitting device;
a determining module, configured to determine a congestion rate interval based on the first rate, the second rate and a congestion packet loss rate when the network is congested when determining that the network is congested based on the first packet loss rate and the second packet loss rate, where the congestion rate interval is an interval where an actual rate of data transmission is located when the network is congested, and the second packet loss rate is a packet loss rate when data is transmitted at the second rate;
and the second transmission module is configured to transmit data at a third rate according to the congestion rate interval, wherein the third rate is less than the actual rate of data transmission when the network is congested.
Optionally, the determining module is further configured to determine the network congestion when the second packet loss rate is greater than the first packet loss rate; determining the congestion packet loss rate according to the first packet loss rate and a rate change rate, wherein the rate change rate is used for indicating the magnitude relation between the first rate and the second rate; and determining the congestion rate interval according to the first rate, the second rate and the congestion packet loss rate.
Optionally, the determining module is further configured to determine the congestion packet loss rate according to the first packet loss rate and the rate change rate and through a congestion packet loss rate expression, where the congestion packet loss rate expression is used to represent a packet loss rate if the network is congested when data is transmitted at the second rate.
Optionally, the determining module is further configured to determine that the congestion rate interval is greater than the first rate and less than the second rate when the second packet loss rate is greater than the first packet loss rate and less than the congestion packet loss rate; and when the second packet loss rate is greater than the congestion packet loss rate, determining that the congestion rate interval is smaller than the first rate.
Optionally, the second transmission module is further configured to determine, when the congestion rate interval is greater than the first rate and less than the second rate, an average value of the first rate and the second rate as the third rate, and transmit data at the third rate; and when the congestion rate interval is smaller than the first rate, reducing the first rate according to a preset reduction coefficient, determining the reduced first rate as the third rate, and transmitting data at the third rate.
Optionally, the apparatus further comprises:
the second rate increasing module is configured to, when it is determined that the network is not congested based on the first packet loss rate and the second packet loss rate, successively increase the second rate according to a first preset amplification factor, transmit data at the increased second rate each time until the network congestion is determined based on the first packet loss rate and the second packet loss rate, and determine a congestion rate interval based on the first rate, the second rate and a congestion packet loss rate when the network is congested.
Optionally, the apparatus further comprises:
and the first rate increasing module is configured to gradually increase the first rate according to a second preset amplification factor when the first packet loss rate is not greater than the first threshold, transmit data at the increased rate each time until a first packet loss rate when the data are transmitted at the increased first rate is greater than the first threshold, and transmit data at a second rate greater than the first rate.
According to a third aspect of embodiments of the present disclosure, an electronic device for data transmission is provided, the electronic device including one or more processors and one or more memories, where at least one instruction is stored in the one or more memories, and the at least one instruction is loaded and executed by the one or more processors to implement the operations performed by the data transmission method according to any one of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium having stored therein at least one instruction, which is loaded and executed by a processor to implement the operations performed by the data transmission method according to any one of the first aspects.
According to a fifth aspect of embodiments of the present disclosure, there is provided an application program, which includes one or more instructions that when executed by a processor of an electronic device, enable the electronic device to perform and execute operations to implement the data transmission method according to any one of the first aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: when the first packet loss rate is greater than a first threshold, the sending device may perform a congestion determination process to transmit data at a second rate that is greater than the first rate; when the network congestion is determined based on the first packet loss rate and the second packet loss rate, the congestion rate can be determined according to the first rate, the second rate and the congestion packet loss rate when the network is congested, so that the data can be transmitted at a third rate which is lower than the congestion rate.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow chart illustrating a method of data transmission according to an exemplary embodiment;
FIG. 2 is a flow chart illustrating a method of data transmission according to an exemplary embodiment;
FIG. 3 is a block diagram illustrating a data transmission apparatus according to an example embodiment;
fig. 4 is a block diagram of a terminal provided in accordance with an exemplary embodiment;
fig. 5 is a schematic diagram of a server according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flow chart illustrating a data transmission method, as shown in fig. 1, for use in a transmitting device, according to an exemplary embodiment, including the following steps.
101. In the process that the sending equipment transmits data at a first rate, when a first packet loss rate when the sending equipment transmits the data at the first rate is larger than a first threshold value, transmitting the data at a second rate larger than the first rate;
102. when network congestion is determined based on the first packet loss rate and the second packet loss rate, determining a congestion rate interval based on the first rate, the second rate and a congestion packet loss rate when the network is congested, wherein the congestion rate interval refers to an interval where an actual rate of data transmission when the network is congested is located, and the second packet loss rate is a packet loss rate when data is transmitted at the second rate;
103. and transmitting data at a third rate according to the congestion rate interval, wherein the third rate is less than the actual rate of data transmission when the network is congested.
Optionally, when determining that the network is congested based on the first packet loss rate and the second packet loss rate, determining the congestion rate interval based on the first rate, the second rate, and a congestion packet loss rate when the network is congested includes:
when the second packet loss rate is greater than the first packet loss rate, determining the network congestion;
determining the congestion packet loss rate according to the first packet loss rate and a rate change rate, wherein the rate change rate is used for indicating the magnitude relation between the first rate and the second rate;
and determining the congestion rate interval according to the first rate, the second rate and the congestion packet loss rate.
Optionally, the determining the congestion packet loss rate according to the first packet loss rate and the rate change rate includes:
and determining the congestion packet loss rate according to the first packet loss rate and the rate change rate and through a congestion packet loss rate expression, wherein the congestion packet loss rate expression is used for expressing the packet loss rate if the network is congested when data is transmitted at the second rate.
Optionally, the determining the congestion rate interval according to the first rate, the second rate and the congestion packet loss rate includes:
when the second packet loss rate is greater than the first packet loss rate and less than the congestion packet loss rate, determining that the congestion rate interval is greater than the first rate and less than the second rate;
and when the second packet loss rate is greater than the congestion packet loss rate, determining that the congestion rate interval is smaller than the first rate.
Optionally, the transmitting data at a third rate according to the congestion rate interval includes:
when the congestion rate interval is larger than the first rate and smaller than the second rate, determining the average value of the first rate and the second rate as the third rate, and transmitting data at the third rate;
when the congestion rate interval is smaller than the first rate, the first rate is reduced according to a preset reduction coefficient, the reduced first rate is determined as the third rate, and data is transmitted at the third rate.
Optionally, the method further includes:
when the network is determined not to be congested based on the first packet loss rate and the second packet loss rate, the second rate is gradually increased according to a first preset amplification factor, data is transmitted at the increased second rate every time until the network congestion is determined based on the first packet loss rate and the second packet loss rate, and the step of determining a congestion rate interval based on the first rate, the second rate and the congestion packet loss rate when the network is congested is executed.
Optionally, the method further includes:
and when the first packet loss rate is not greater than the first threshold, gradually increasing the first rate according to a second preset amplification factor, transmitting data at the increased rate each time until the first packet loss rate when the data are transmitted at the increased first rate is greater than the first threshold, and executing a step of transmitting data at a second rate greater than the first rate.
In this embodiment of the present disclosure, when the first packet loss rate is greater than a first threshold, the sending device may perform a congestion determination process, and transmit data at a second rate greater than the first rate; when the network congestion is determined based on the first packet loss rate and the second packet loss rate, the congestion rate can be determined according to the first rate, the second rate and the congestion packet loss rate when the network is congested, so that data can be transmitted at a third rate which is lower than the congestion rate.
Fig. 2 is a flowchart illustrating a data transmission method according to an exemplary embodiment, where as shown in fig. 2, the method is used in a sending device, and the sending device may be a terminal or a server, which is not specifically limited in this disclosure, and includes the following steps.
201. In the process of transmitting data at a first rate by the sending device, when a first packet loss rate when the data is transmitted at the first rate is greater than a first threshold value, the sending device transmits the data at a second rate greater than the first rate.
In the disclosed embodiment, the sending device transmits data to the receiving device in the network at a first rate, and the receiving device receives the data transmitted by the sending device. In the process of transmitting data, the sending device may determine a first packet loss rate in the data transmission process according to the first rate, determine whether the first packet loss rate is greater than a first threshold, and when the first packet loss rate is greater than the first threshold, the sending device obtains a second rate greater than the first rate, and switches from the first rate to the second rate to transmit data.
In the embodiment of the present disclosure, the sending device may determine whether to determine the congestion condition of the network based on a packet loss rate of data transmission, where the first threshold may be a congestion determination threshold, and the first threshold is used to indicate a packet loss rate when the congestion condition of the network needs to be determined. When the current packet loss rate of the network terminal is not greater than the first threshold, the sending equipment does not judge the congestion condition of the network; when the current packet loss rate in the network is greater than the first threshold, the sending device determines to judge the congestion condition of the network, and enters a congestion judging process. The sending device switches from a first rate to a second, greater rate for transmission. Wherein the transmitting device may use a product of the first rate and a first preset magnification as the second rate, the first preset magnification being greater than 1. The first preset magnification may be continuously set, which is not particularly limited in the embodiments of the present disclosure, for example, the first preset magnification may be 1.1, 1.2, or 2.3.
In addition, for the process of determining the packet loss rate, in a possible implementation, the receiving device may count a receiving rate of the received data according to a process of receiving data, and return the receiving rate to the sending device, and the sending device may determine the packet loss rate according to the sending rate and the receiving rate. Therefore, the first packet loss rate determination process may be: the sending equipment counts a first rate of transmission data, receives a receiving rate periodically sent by the receiving equipment, and calculates a first packet loss rate when the data is transmitted at the first rate according to the first rate and the receiving rate. The sending device may calculate the first packet loss rate according to a sending rate and a receiving rate by using the following formula one;
the formula I is as follows:
Figure GDA0002064075190000071
where P is used to indicate the packet loss rate, r send For indicating the transmission rate of the transmitting device, r recv Which is used to indicate the receiving rate at which the receiving device receives data.
In this step, the sending device may use the first rate as a sending rate, and substitute the sending rate and a receiving rate into the formula one to obtain a first packet loss rate. Of course, the first packet loss rate may also be calculated by the receiving device and periodically sent to the sending device, which is not specifically limited in this embodiment of the present disclosure.
In a possible implementation manner, when the first packet loss rate does not reach the first threshold, the sending device may further increase the sending rate in real time to improve the data transmission efficiency, and the process may be: when the first packet loss rate is not greater than the first threshold, the sending device successively increases the first rate according to a second preset amplification factor, transmits data at the increased first rate each time until the first packet loss rate when transmitting data at the increased first rate is greater than the first threshold, and executes a step of transmitting data at a second rate greater than the first rate.
The two preset magnifications may be set based on needs, and this is not specifically limited in the embodiments of the present disclosure. For example, the second preset magnification may be 1.1 or 2, etc. In addition, the process of increasing the first rate by the sending device is a process similar to the process of acquiring the second rate greater than the first rate by the sending device in the above process, and is not described in detail here.
It should be noted that the sending device and the receiving device may be devices at both ends of any data transmission process, and the sending device and the receiving device may be terminals or servers, for example, the sending device is a server, the receiving device is a terminal, or both the sending device and the receiving device are servers, and the like, which is not specifically limited in this embodiment of the disclosure.
202. When determining that the network is congested based on the first packet loss rate and the second packet loss rate, the sending device determines a congestion rate interval based on the first rate, the second rate and a congestion packet loss rate when the network is congested.
The congestion rate interval refers to an interval where an actual rate of data transmission is located when the network is congested, and the second packet loss rate is a packet loss rate when data is transmitted at the second rate. And the sending equipment judges whether the network for transmitting the data is congested or not according to the first packet loss rate and the second packet loss rate. In this step, when the second packet loss rate is greater than the first packet loss rate, the sending device determines that the network is congested, and the sending device determines a congestion packet loss rate according to the first packet loss rate and a speed change rate, where the speed change rate is used to indicate a size relationship between the first speed and the second speed. And the sending equipment determines the congestion rate interval according to the congestion packet loss rate, the first rate and the second rate. When the second packet loss rate is not greater than the first packet loss rate, the sending device determines that the network is not congested, when the network is determined not to be congested based on the first packet loss rate and the second packet loss rate, the sending device gradually increases the second rate according to a first preset amplification factor, transmits data at the increased second rate each time until the network is determined to be congested based on the first packet loss rate and the second packet loss rate, and executes a step of determining a congestion rate interval based on the first rate, the second rate and the congestion packet loss rate.
When the second packet loss rate is greater than the first packet loss rate and less than the congestion packet loss rate, it is indicated that the network is not congested when the sending device transmits data at the first rate, and the network is congested when the sending device transmits data at the second rate, and the sending device determines that the congestion rate interval is greater than the first rate and less than the second rate. When the second packet loss rate is greater than the congestion packet loss rate, which indicates that the network is congested when data is transmitted at the first rate, the sending device determines that the congestion rate interval is smaller than the first rate.
When the network is congested, the sending device may determine the congestion packet loss rate according to a congestion packet loss rate expression, where the congestion packet loss rate expression is used to represent a packet loss rate if the network is congested when data is transmitted at the second rate. In a possible implementation manner, the sending device determines the congestion packet loss rate according to the first packet loss rate and the rate change rate and through a congestion packet loss rate expression.
Wherein, the first packet loss rate may be represented as P, and the second packet loss rate may be represented as P prob The rate of change can be expressed as b, r prob =r send X b, wherein the r prob For indicating a second rate, r send For indicating the first rate, the congestion packet loss rate may be
Figure GDA0002064075190000091
In addition, considering that there may be jitter in the network, the sending device may further subtract the packet loss rate from the congestion packet loss rate by a packet loss rate fluctuation threshold, and the congestion packet loss rate expression is as follows:
the expression of congestion packet loss rate:
Figure GDA0002064075190000092
wherein, P 1 And the server is used for representing the congestion packet loss rate, and substituting the first packet loss rate and the rate change rate into the congestion packet loss rate expression to obtain the congestion packet loss rate. Wherein, P 0 For indicating a fluctuation threshold of packet loss rate, P 0 Can be set on an as-needed basis, e.g., the P 0 May be 1%.
It should be noted that the determining process of the congestion packet loss rate may be: assuming that the network is congested when transmitting data at the second rate, when the first rate is transmitting data, the first receiving rate of the receiving device is the same as the second receiving rate of the receiving device when transmitting data at the second rate, that is, when the network is congested, because the channel is already in a saturated state, the receiving rate of the receiving device does not change regardless of whether the sending device increases the sending rate or not. The transmitting device may express the second packet loss rate as the following formula two:
the formula II is as follows: p prob =(r prob –r recv )/r prob
Wherein r is prob =r send B, is substituted into the formula two to obtain P prob =(b×r send –r recv )/(b×r send ) Further, P prob =1–r recv /(b×r send ) Due to r send /r recv 1-P, then
Figure GDA0002064075190000093
In addition, the packet loss rate fluctuation threshold is considered, that is, when P prob Reach the congestion packet loss rate
Figure GDA0002064075190000094
The amount of the oxygen in the air, that is,
Figure GDA0002064075190000095
Figure GDA0002064075190000096
the sending device determines that the network is congested when transmitting data at the first rate. When P is present prob Reach the congestion packet loss rate
Figure GDA0002064075190000097
When due to P prob Already greater than the first packet loss rate, the packet loss rate fluctuation threshold is considered, that is,
Figure GDA0002064075190000098
the sending device determines that the network is not congested when transmitting data at the first rate, but the network is congested when transmitting data at the second rate, and the sending device determines that the congested rate interval is greater than the first rate and less than the second rate.
The first preset amplification factor may be set based on a requirement, and the first preset amplification factor may be the same as or different from the second preset amplification factor in step 201, for example, the first preset amplification factor may be 1.1 or 1.2, and the embodiment of the present disclosure is not limited to this specifically. It should be noted that the rate change rate is used to indicate a magnitude relationship between the first rate and the second rate, and in a possible embodiment, the second rate may be a product of the first rate and the first amplification factor, and then the relationship between the first rate and the second rate may be: r is prob =r send Xb, the rate change rate can be expressed as b, i.e., the second rate is increased or decreased by a factor of b relative to the first rate, in this case, the rate change rate is the first predetermined magnification factor. Alternatively, the second rate may be the rate of change of the rate or may be expressed as
Figure GDA0002064075190000101
At this time, the rate of change is the inverse of the first predetermined magnification. Of course, the sending device may also adopt an accumulation manner, for example, the second rate may also be a sum of the first rate and a second preset threshold, which is not specifically limited in the embodiment of the present disclosure.
203. The transmitting device transmits data at a third rate according to the congestion rate interval.
The sending device may determine a third rate that is less than an actual rate when the network is congested according to the reduction coefficient and the congestion rate interval, and switch the second rate to the third rate to transmit data. And the third rate is less than the actual rate of data transmission when the network is congested. Based on the above two situations in the case of congestion in step 202, in this step, the sending device can realize data transmission at a third rate that is less than the congestion rate in the following two ways.
First, when the congestion rate interval is greater than the first rate and less than the second rate, the sending device determines an average value of the first rate and the second rate as the third rate, and transmits data at the third rate.
In this step, when data is transmitted at the second rate, the network is congested, but when the network is not congested when the data is transmitted at the first rate, the congested rate interval is greater than the first rate and less than the second rate, the sending device may successively obtain an average value of a maximum rate and a minimum rate in the value range by bisection, transmit the data at a fourth rate greater than the third rate when a third packet loss rate when the data is transmitted at the third rate is greater than a first threshold through a process similar to the above step 201 each time the data is transmitted, and determine whether the network is congested through a process similar to the above step 202, when the network is not congested, continue to successively increase the third rate to perform data transmission until the network is congested; when the network is congested, determining the latest congestion rate interval again based on the third rate and the fourth rate, and performing data transmission at a rate smaller than the congestion rate according to the earliest congestion rate interval, that is, performing the process similar to steps 202 to 203, and repeating the steps. The congestion rate refers to an actual rate when the network is congested.
The sending device may use a product of the first preset amplification factor and the third rate as the fourth rate, and since the third rate is greater than the first rate and less than the second rate, the fourth rate is also greater than the second rate, so that the numerical range of the actual congestion rate can be gradually approached, and the maximum rate less than the congestion rate is determined for data transmission, so that the transmission efficiency can be maximized on the premise of no congestion in the data transmission process.
In a second mode, when the congestion rate interval is smaller than the first rate, the first rate is reduced according to a preset reduction coefficient, the reduced first rate is determined as the third rate, and data is transmitted at the third rate.
In this step, when the congestion rate interval is smaller than the first rate, the sending device may gradually reduce the first rate by presetting a reduction coefficient, perform data transmission at the reduced first rate each time, and determine, based on a process similar to that in step 201, whether a first packet loss rate when the reduced first rate transmits data is greater than a first threshold, for convenience of distinguishing, the reduced first rate is referred to as a fifth rate, and when the first packet loss rate is greater than the first threshold, transmit data at a sixth rate that is greater than the fifth rate. Then, the sending device performs network congestion judgment according to the fifth rate and the sixth rate, when the network is not congested, the fifth rate is continuously increased until the network is congested, and based on the process similar to the above steps 202-203, the latest congestion rate is determined, and the process is circulated.
Wherein the transmitting device may take a product of the fifth rate and the first preset amplification factor as the sixth rate. Because the fifth rate is smaller than the first rate and the sixth rate is correspondingly smaller than the second rate, the determined numerical range of the latest congestion rate is smaller, and the congestion rate interval can be gradually reduced to determine the maximum rate smaller than the congestion rate for data transmission.
It should be noted that the first rate, the second rate, the third rate, the fourth rate, and the fifth rate involved in the above process all refer to actual transmission rates of the transmitting device. The sending equipment determines the packet loss rate according to the actual sending rate and the actual receiving rate fed back by the receiving end, so that more accurate packet loss rate is obtained, and the accuracy of data transmission is improved.
It should be noted that, in the data transmission process, the method of the foregoing steps 201 to 203 may be dynamically adopted in real time to perform control of network congestion, so as to improve transmission efficiency in the data transmission process, and in order to describe the data transmission process more clearly, the following steps 1 to 9 are taken as an example to describe the data transmission flow.
1. Initialization r send =r init Wherein r is init For markingInitializing a rate;
2. the transmitting device is at rate r send Transmitting data to a receiving device;
3. the receiving equipment receives the data and counts the actual receiving rate r recv And periodically applying r recv Feeding back to the sending device;
4. the transmitting device calculates the packet loss rate
Figure GDA0002064075190000111
5. If P is less than or equal to P congestion Then the network is not congested, P congestion The threshold value is used for representing the judgment threshold value of the congestion packet loss, namely a first threshold value;
6. increasing the sending rate: r is send =r send X a, where a is a constant parameter and a > 1, e.g. a =1.1. Returning to the step 2;
7. if P > P congestion Then the network may have congestion, and then the congestion determination phase is entered:
i) Updating the probing rate: r is prob =r send X b, where b is a constant parameter and b > 1, e.g. b =1.1;
ii) the transmitting device is at rate r prob Transmitting data to a receiving device;
iii) Return to step 3
iiii) the transmitting device calculates the packet loss rate
Figure GDA0002064075190000121
v) if packet loss ratio satisfies P prob ≤P+P 0 If yes, judging that no congestion occurs, and returning to the step 6;
it should be noted that if congestion packet loss does not occur, increasing the transmission speed does not increase the packet loss rate, so when Prob occurs<And P, the network is not congested. Considering network jitter, if P prob ≤P+P 0 Then it is determined that the network is not congested.
vi) if the packet loss ratio satisfies
Figure GDA0002064075190000122
Then it is determined as r send The network is already congested when sending data; skipping to the step 8;
vii) if the packet loss ratio is satisfied
Figure GDA0002064075190000123
Then it is determined as r send No congestion occurs during transmission, but at r prob When sending, congestion occurs; jumping to a step 9;
8. and (3) reducing the sending rate: r is send =r send * c, where c is a constant parameter and c < 1, e.g. c =0.9. Returning to the step 2;
9. updating transmission rate
Figure GDA0002064075190000124
And returning to the step 2.
It should be noted that, in the data transmission process, the sending device may, based on the flows shown in steps 1 to 9, determine the congestion condition of the network in real time in the data transmission process, dynamically adjust the sending rate in real time, and control the data to adapt to the sending rate for transmission, so that the data transmission can be accurately performed according to the congestion of the network, and the data transmission efficiency can be ensured.
In this embodiment of the present disclosure, when the first packet loss rate is greater than a first threshold, the sending device may perform a congestion determination process, and transmit data at a second rate greater than the first rate; when the network congestion is determined based on the first packet loss rate and the second packet loss rate, the congestion rate interval can be determined according to the first rate, the second rate and the congestion packet loss rate, so that data can be transmitted at a third rate which is lower than the actual rate when the network is congested.
Fig. 3 is a block diagram illustrating a data transmission apparatus according to an example embodiment. The apparatus is applied to a sending device, and referring to fig. 3, the apparatus includes a first transmission module 301, a determination module 302 and a second transmission module 303.
A first transmission module 301 configured to, in a process that the sending device transmits data at a first rate, transmit data at a second rate that is greater than the first rate when a first packet loss rate when the data is transmitted at the first rate is greater than a first threshold;
a determining module 302, configured to determine, when determining that a network is congested based on the first packet loss rate and a second packet loss rate, a congestion rate interval based on the first rate, the second rate, and a congestion packet loss rate when the network is congested, where the congestion rate interval is an interval where an actual rate of data transmission is located when the network is congested, and the second packet loss rate is a packet loss rate when data is transmitted at the second rate;
a second transmission module 303, configured to transmit data at a third rate according to the congestion rate interval, where the third rate is less than an actual rate of data transmission when the network is congested.
Optionally, the determining module 302 is further configured to determine the network congestion when the second packet loss rate is greater than the first packet loss rate; determining the congestion packet loss rate according to the first packet loss rate and a rate change rate, wherein the rate change rate is used for indicating the magnitude relation between the first rate and the second rate; and determining the congestion rate interval according to the first rate, the second rate and the congestion packet loss rate.
Optionally, the determining module 302 is further configured to determine the congestion packet loss rate according to the first packet loss rate and the rate change rate through a congestion packet loss rate expression, where the congestion packet loss rate expression is used to express a packet loss rate if the network is congested when data is transmitted at the second rate.
Optionally, the determining module 302 is further configured to determine that the congestion rate interval is greater than the first rate and less than the second rate when the second packet loss rate is greater than the first packet loss rate and less than the congestion packet loss rate; and when the second packet loss rate is greater than the congestion packet loss rate, determining that the congestion rate interval is smaller than the first rate.
Optionally, the second transmission module 303 is further configured to determine an average value of the first rate and the second rate as the third rate when the congestion rate interval is greater than the first rate and less than the second rate, and transmit data at the third rate; when the congestion rate interval is smaller than the first rate, the first rate is reduced according to a preset reduction coefficient, the reduced first rate is determined as the third rate, and data is transmitted at the third rate.
Optionally, the apparatus further comprises:
and the second rate increasing module is configured to successively increase the second rate according to a first preset amplification factor when the network is determined not to be congested based on the first packet loss rate and the second packet loss rate, transmit data at the increased second rate each time until the network congestion is determined based on the first packet loss rate and the second packet loss rate, and determine the congestion rate interval based on the first rate, the second rate and the congestion packet loss rate when the network is congested.
Optionally, the apparatus further comprises:
and the first rate increasing module is configured to gradually increase the first rate according to a second preset amplification factor when the first packet loss rate is not greater than the first threshold, transmit data at the increased rate each time until a first packet loss rate when the data are transmitted at the increased first rate is greater than the first threshold, and transmit data at a second rate greater than the first rate.
In this embodiment of the present disclosure, when the first packet loss rate is greater than the first threshold, the sending device may perform a congestion determination process, and transmit data at a second rate that is greater than the first rate; when the network congestion is determined based on the first packet loss rate and the second packet loss rate, the congestion rate interval can be determined according to the first rate, the second rate and the congestion packet loss rate, so that data can be transmitted at a third rate which is lower than the actual rate when the network is congested.
With regard to the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
It should be noted that: in the data transmission device provided in the above embodiment, only the division of the functional modules is illustrated in the data transmission, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the data transmission device and the data transmission method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments and are not described herein again.
Fig. 4 is a block diagram of a terminal provided in accordance with an exemplary embodiment. The terminal 400 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. The terminal 400 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, etc.
Generally, the terminal 400 includes: a processor 401 and a memory 402.
Processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 401 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 401 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing content required to be displayed on the display screen. In some embodiments, the processor 401 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 402 may include one or more computer-readable storage media, which may be non-transitory. Memory 402 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 402 is used to store at least one instruction for execution by processor 401 to implement the data transmission methods provided by the method embodiments herein.
In some embodiments, the terminal 400 may further optionally include: a peripheral interface 403 and at least one peripheral. The processor 401, memory 402 and peripheral interface 403 may be connected by buses or signal lines. Various peripheral devices may be connected to the peripheral interface 403 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 404, touch screen display 405, camera 406, audio circuitry 407, positioning components 408, and power supply 409.
The peripheral interface 403 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 401 and the memory 402. In some embodiments, processor 401, memory 402, and peripheral interface 403 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 401, the memory 402 and the peripheral interface 403 may be implemented on a separate chip or circuit board, which is not limited by this embodiment.
The Radio Frequency circuit 404 is used to receive and transmit RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 404 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 404 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 404 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 404 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 404 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 405 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 405 is a touch display screen, the display screen 405 also has the ability to capture touch signals on or above the surface of the display screen 405. The touch signal may be input to the processor 401 as a control signal for processing. At this point, the display screen 405 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 405 may be one, providing the front panel of the terminal 400; in other embodiments, the display screen 405 may be at least two, respectively disposed on different surfaces of the terminal 400 or in a foldable design; in still other embodiments, the display 405 may be a flexible display disposed on a curved surface or a folded surface of the terminal 400. Even more, the display screen 405 may be arranged in a non-rectangular irregular figure, i.e. a shaped screen. The Display screen 405 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and other materials.
The camera assembly 406 is used to capture images or video. Optionally, camera assembly 406 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 406 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuit 407 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 401 for processing, or inputting the electric signals to the radio frequency circuit 404 for realizing voice communication. The microphones may be provided in plural numbers, respectively, at different portions of the terminal 400 for the purpose of stereo sound collection or noise reduction. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 401 or the radio frequency circuit 404 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuitry 407 may also include a headphone jack.
The positioning component 408 is used to locate the current geographic position of the terminal 400 for navigation or LBS (Location Based Service). The Positioning component 408 may be a Positioning component based on the GPS (Global Positioning System) of the united states, the beidou System of china, the graves System of russia, or the galileo System of the european union.
The power supply 409 is used to supply power to the various components in the terminal 400. The power source 409 may be alternating current, direct current, disposable or rechargeable. When power source 409 comprises a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery can also be used to support fast charge technology.
In some embodiments, the terminal 400 also includes one or more sensors 410. The one or more sensors 410 include, but are not limited to: acceleration sensor 411, gyro sensor 412, pressure sensor 413, fingerprint sensor 414, optical sensor 415, and proximity sensor 416.
The acceleration sensor 411 may detect the magnitude of acceleration in three coordinate axes of the coordinate system established with the terminal 400. For example, the acceleration sensor 411 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 401 may control the touch display screen 405 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 411. The acceleration sensor 411 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 412 may detect a body direction and a rotation angle of the terminal 400, and the gyro sensor 412 may collect a 3D motion of the user on the terminal 400 in cooperation with the acceleration sensor 411. From the data collected by the gyro sensor 412, the processor 401 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization while shooting, game control, and inertial navigation.
The pressure sensor 413 may be disposed on a side bezel of the terminal 400 and/or a lower layer of the touch display screen 405. When the pressure sensor 413 is disposed at a side frame of the terminal 400, a user's holding signal of the terminal 400 may be detected, and left-right hand recognition or shortcut operation may be performed by the processor 401 according to the holding signal collected by the pressure sensor 413. When the pressure sensor 413 is disposed at the lower layer of the touch display screen 405, the processor 401 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 405. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 414 is used to collect a fingerprint of the user, and the processor 401 identifies the user according to the fingerprint collected by the fingerprint sensor 414, or the fingerprint sensor 414 identifies the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, processor 401 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 414 may be disposed on the front, back, or side of the terminal 400. When a physical key or vendor Logo is provided on the terminal 400, the fingerprint sensor 414 may be integrated with the physical key or vendor Logo.
The optical sensor 415 is used to collect the ambient light intensity. In one embodiment, the processor 401 may control the display brightness of the touch screen display 405 according to the ambient light intensity collected by the optical sensor 415. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 405 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 405 is turned down. In another embodiment, the processor 401 may also dynamically adjust the shooting parameters of the camera head assembly 406 according to the ambient light intensity collected by the optical sensor 415.
A proximity sensor 416, also known as a distance sensor, is typically disposed on the front panel of the terminal 400. The proximity sensor 416 is used to collect the distance between the user and the front surface of the terminal 400. In one embodiment, when the proximity sensor 416 detects that the distance between the user and the front surface of the terminal 400 is gradually decreased, the touch display screen 405 is controlled by the processor 401 to switch from the bright screen state to the dark screen state; when the proximity sensor 416 detects that the distance between the user and the front surface of the terminal 400 becomes gradually larger, the touch display screen 405 is controlled by the processor 401 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 4 is not intended to be limiting of terminal 400, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
Fig. 5 is a schematic structural diagram of a server according to an exemplary embodiment, where the server 500 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 501 and one or more memories 502, where the memory 502 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 501 to implement the data transmission method provided by the above method embodiments. Certainly, the server may further have a wired or wireless network interface, a keyboard, an input/output interface, and other components to facilitate input and output, and the server may further include other components for implementing functions of the device, which are not described herein again.
In an exemplary embodiment, there is also provided a computer-readable storage medium, such as a memory, comprising instructions executable by a processor in an electronic device to perform a data transmission method in an embodiment, the method applied on a sending device, the method comprising:
in the process that the sending equipment transmits data at a first rate, when a first packet loss rate when the sending equipment transmits the data at the first rate is larger than a first threshold value, transmitting the data at a second rate larger than the first rate;
when network congestion is determined based on the first packet loss rate and the second packet loss rate, determining a congestion rate interval based on the first rate, the second rate and a congestion packet loss rate when the network is congested, wherein the congestion rate interval refers to an interval where an actual rate of data transmission is located when the network is congested, and the second packet loss rate is a packet loss rate when data transmission is performed at the second rate;
and transmitting data at a third rate according to the congestion rate interval, wherein the third rate is less than the actual rate of data transmission when the network is congested.
For example, the computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, there is also provided an application program comprising one or more instructions which, when executed by a processor of an electronic device, enable the electronic device to perform a data transmission method, the method being applied on a transmitting device, the method comprising:
in the process that the sending equipment transmits data at a first speed, when a first packet loss rate when the data are transmitted at the first speed is larger than a first threshold value, the data are transmitted at a second speed which is larger than the first speed;
when network congestion is determined based on the first packet loss rate and the second packet loss rate, determining a congestion rate interval based on the first rate, the second rate and a congestion packet loss rate when the network is congested, wherein the congestion rate interval refers to an interval where an actual rate of data transmission is located when the network is congested, and the second packet loss rate is a packet loss rate when data transmission is performed at the second rate;
and transmitting data at a third rate according to the congestion rate interval, wherein the third rate is less than the actual rate of data transmission when the network is congested.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the disclosure is limited only by the appended claims.

Claims (12)

1. A data transmission method, wherein the method is applied to a sending device, and the method comprises:
in the process that the sending equipment transmits data at a first speed, when a first packet loss rate when the data are transmitted at the first speed is larger than a first threshold value, transmitting the data at a second speed which is larger than the first speed;
when a second packet loss rate is greater than the first packet loss rate, determining network congestion, wherein the second packet loss rate is the packet loss rate when data are transmitted at the second rate;
determining a congestion packet loss rate according to the first packet loss rate and a rate change rate and through a congestion packet loss rate expression, wherein the rate change rate is used for indicating the magnitude relation between the first rate and the second rate, and the congestion packet loss rate expression is used for expressing the packet loss rate of the network congestion if the network is congested when data is transmitted at the second rate;
determining a congestion rate interval according to the first rate, the second rate and the congestion packet loss rate, wherein the congestion rate interval refers to an interval where an actual rate of data transmission is located when the network is congested;
and transmitting data at a third rate according to the congestion rate interval, wherein the third rate is less than the actual rate of data transmission when the network is congested.
2. The data transmission method according to claim 1, wherein the determining the congestion rate interval according to the first rate, the second rate and the congestion packet loss rate comprises:
when the second packet loss rate is greater than the first packet loss rate and less than the congestion packet loss rate, determining that the congestion rate interval is greater than the first rate and less than the second rate;
and when the second packet loss rate is greater than the congestion packet loss rate, determining that the congestion rate interval is smaller than the first rate.
3. The data transmission method according to claim 2, wherein the transmitting data at a third rate according to the congestion rate interval comprises:
when the congestion rate interval is larger than the first rate and smaller than the second rate, determining the average value of the first rate and the second rate as the third rate, and transmitting data at the third rate;
and when the congestion rate interval is smaller than the first rate, reducing the first rate according to a preset reduction coefficient, determining the reduced first rate as the third rate, and transmitting data at the third rate.
4. The method of claim 1, further comprising:
when the network is determined not to be congested based on the first packet loss rate and the second packet loss rate, the second rate is gradually increased according to a first preset amplification factor, data is transmitted at the increased second rate each time until the network congestion is determined based on the first packet loss rate and the second packet loss rate, and the step of determining a congestion rate interval based on the first rate, the second rate and the congestion packet loss rate when the network is congested is executed.
5. The method of claim 1, further comprising:
and when the first packet loss rate is not greater than the first threshold, gradually increasing the first rate according to a second preset amplification factor, transmitting data at the increased rate each time until the first packet loss rate when the data are transmitted at the increased first rate is greater than the first threshold, and executing a step of transmitting data at a second rate greater than the first rate.
6. A data transmission apparatus, wherein the apparatus is applied to a sending device, the apparatus comprising:
a first transmission module configured to transmit data at a second rate greater than a first rate when a first packet loss rate when transmitting data at the first rate is greater than a first threshold in transmitting data at the first rate by the transmitting device;
the determining module is configured to determine network congestion when a second packet loss rate is greater than the first packet loss rate, where the second packet loss rate is a packet loss rate when data is transmitted at the second rate; determining a congestion packet loss rate according to the first packet loss rate and a rate change rate and through a congestion packet loss rate expression, wherein the congestion packet loss rate expression is used for expressing the packet loss rate of the network congestion when data are transmitted at the second rate, and the rate change rate is used for indicating the size relationship between the first rate and the second rate; determining a congestion rate interval according to the first rate, the second rate and the congestion packet loss rate, wherein the congestion rate interval refers to an interval where an actual rate of data transmission is located when the network is congested;
and the second transmission module is configured to transmit data at a third rate according to the congestion rate interval, wherein the third rate is less than the actual rate of data transmission when the network is congested.
7. The data transmission apparatus of claim 6,
the determining module is further configured to determine that the congestion rate interval is greater than the first rate and less than the second rate when the second packet loss rate is greater than the first packet loss rate and less than the congestion packet loss rate; and when the second packet loss rate is greater than the congestion packet loss rate, determining that the congestion rate interval is smaller than the first rate.
8. The data transmission apparatus of claim 7,
the second transmission module is further configured to determine an average value of the first rate and the second rate as the third rate and transmit data at the third rate when the congestion rate interval is greater than the first rate and less than the second rate; and when the congestion rate interval is smaller than the first rate, reducing the first rate according to a preset reduction coefficient, determining the reduced first rate as the third rate, and transmitting data at the third rate.
9. The data transmission apparatus of claim 6, wherein the apparatus further comprises:
and the second rate increasing module is configured to gradually increase the second rate according to a first preset amplification factor when the network is determined not to be congested based on the first packet loss rate and the second packet loss rate, transmit data at the increased second rate each time until the network is determined to be congested based on the first packet loss rate and the second packet loss rate, and determine a congestion rate interval based on the first rate, the second rate and a congestion packet loss rate when the network is congested.
10. The data transmission apparatus of claim 6, wherein the apparatus further comprises:
and the first rate increasing module is configured to gradually increase the first rate according to a second preset amplification factor when the first packet loss rate is not greater than the first threshold, transmit data at the increased rate each time until a first packet loss rate when the data are transmitted at the increased first rate is greater than the first threshold, and transmit data at a second rate greater than the first rate.
11. An electronic device for data transmission, the electronic device comprising one or more processors and one or more memories having stored therein at least one instruction, the at least one instruction being loaded and executed by the one or more processors to implement operations performed by the data transmission method of any one of claims 1 to 5.
12. A non-transitory computer-readable storage medium having stored therein at least one instruction, which is loaded and executed by a processor to perform operations performed by a data transmission method as claimed in any one of claims 1 to 5.
CN201811556127.6A 2018-12-19 2018-12-19 Data transmission method and device, electronic equipment and storage medium Active CN109688064B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811556127.6A CN109688064B (en) 2018-12-19 2018-12-19 Data transmission method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811556127.6A CN109688064B (en) 2018-12-19 2018-12-19 Data transmission method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109688064A CN109688064A (en) 2019-04-26
CN109688064B true CN109688064B (en) 2022-11-11

Family

ID=66186381

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811556127.6A Active CN109688064B (en) 2018-12-19 2018-12-19 Data transmission method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109688064B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112350954B (en) * 2019-08-07 2022-11-22 深信服科技股份有限公司 Overload protection method, system, computer readable storage medium and electronic device
CN115378832B (en) * 2022-07-29 2024-03-26 北京奇艺世纪科技有限公司 Congestion detection method and device, stream media transmission system, electronic equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101938400A (en) * 2009-06-30 2011-01-05 华为技术有限公司 Network congestion control method and device
CN102204182A (en) * 2010-12-29 2011-09-28 华为技术有限公司 Method and apparatus for controlling congestion of data transmission
CN105340318A (en) * 2014-06-30 2016-02-17 华为技术有限公司 Method and device for determining transmission congestion
CN105450441A (en) * 2015-11-05 2016-03-30 深圳市网心科技有限公司 TCP-protocol-based weak network acceleration method and apparatus
CN106170955A (en) * 2014-09-29 2016-11-30 华为技术有限公司 A kind of flow control methods and system
CN106255149A (en) * 2016-08-10 2016-12-21 广州市百果园网络科技有限公司 A kind of media data transmission method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101938400A (en) * 2009-06-30 2011-01-05 华为技术有限公司 Network congestion control method and device
CN102204182A (en) * 2010-12-29 2011-09-28 华为技术有限公司 Method and apparatus for controlling congestion of data transmission
CN105340318A (en) * 2014-06-30 2016-02-17 华为技术有限公司 Method and device for determining transmission congestion
CN106170955A (en) * 2014-09-29 2016-11-30 华为技术有限公司 A kind of flow control methods and system
CN105450441A (en) * 2015-11-05 2016-03-30 深圳市网心科技有限公司 TCP-protocol-based weak network acceleration method and apparatus
CN106255149A (en) * 2016-08-10 2016-12-21 广州市百果园网络科技有限公司 A kind of media data transmission method and device

Also Published As

Publication number Publication date
CN109688064A (en) 2019-04-26

Similar Documents

Publication Publication Date Title
CN110795236B (en) Method, device, electronic equipment and medium for adjusting capacity of server
CN111372126B (en) Video playing method, device and storage medium
CN110944374B (en) Communication mode selection method and device, electronic equipment and medium
CN110278464B (en) Method and device for displaying list
CN110333834B (en) Frame frequency adjusting method and device, display device and computer readable storage medium
CN109951398B (en) Data sending method and device and computer equipment
CN109558837B (en) Face key point detection method, device and storage medium
CN108897659B (en) Method, device and storage medium for modifying log level
CN110659127A (en) Method, device and system for processing task
CN111031170A (en) Method, apparatus, electronic device and medium for selecting communication mode
CN108401194B (en) Time stamp determination method, apparatus and computer-readable storage medium
CN109089137B (en) Stuck detection method and device
CN111385525B (en) Video monitoring method, device, terminal and system
CN109688064B (en) Data transmission method and device, electronic equipment and storage medium
CN108664300B (en) Application interface display method and device in picture-in-picture mode
CN110971840B (en) Video mapping method and device, computer equipment and storage medium
CN111008083A (en) Page communication method and device, electronic equipment and storage medium
CN110912830A (en) Method and device for transmitting data
CN111708669B (en) Analysis method, device, equipment and storage medium for system operation
CN112260845B (en) Method and device for accelerating data transmission
CN113099378A (en) Positioning method, device, equipment and storage medium
WO2019128430A1 (en) Method, apparatus and device for determining bandwidth, and storage medium
CN110971692A (en) Method and device for opening service and computer storage medium
CN111860030A (en) Behavior detection method, behavior detection device, behavior detection equipment and storage medium
CN115086235B (en) Network congestion detection method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant