CN109474538B - Data transmission method and device, terminal equipment and storage medium - Google Patents

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

Info

Publication number
CN109474538B
CN109474538B CN201811637178.1A CN201811637178A CN109474538B CN 109474538 B CN109474538 B CN 109474538B CN 201811637178 A CN201811637178 A CN 201811637178A CN 109474538 B CN109474538 B CN 109474538B
Authority
CN
China
Prior art keywords
data packet
packet
mth
way delay
data
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
CN201811637178.1A
Other languages
Chinese (zh)
Other versions
CN109474538A (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 CN201811637178.1A priority Critical patent/CN109474538B/en
Publication of CN109474538A publication Critical patent/CN109474538A/en
Priority to PCT/CN2019/114887 priority patent/WO2020134559A1/en
Application granted granted Critical
Publication of CN109474538B publication Critical patent/CN109474538B/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/25Flow control; Congestion control with rate being modified by the source upon detecting a change of network conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • H04L43/0835One way packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • H04L43/0858One way delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • 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/26Flow control; Congestion control using explicit feedback to the source, e.g. choke packets
    • H04L47/263Rate modification at the source after receiving feedback

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application provides a data transmission method, which is applied to a server and comprises the following steps: acquiring the one-way delay of the Mth data packet and the one-way delay of the M-1 th data packet; the Mth data packet is the Mth received data packet sent by the client, the M-1 th data packet is the M-1 th received data packet sent by the client, and M is a positive integer greater than 1; determining the packet loss quantity between the Mth data packet and the M-1 th data packet; calculating a congestion packet loss threshold according to the one-way delay of the Mth data packet and the one-way delay of the M-1 th data packet; judging whether the packet loss quantity is greater than a congestion packet loss threshold value or not; if so, reducing the data sending speed of the client; if not, the data sending speed of the client is kept unchanged. Therefore, the data sending speeds of different clients can be determined according to the one-way delay of the Mth data packet and the M-1 th data packet and the packet loss number between the M-th data packet and the M-1 th data packet, so that the network bandwidth can be fully utilized.

Description

Data transmission method and device, terminal equipment and storage medium
Technical Field
The present disclosure relates to the field of network transmission, and in particular, to a data transmission method, apparatus, terminal device, and storage medium.
Background
Generally, data is transmitted between a server and a client through data packets, but during the data transmission process, the data packets may be lost, that is, lost.
The types of packet loss can be classified into congestion packet loss and random packet loss. The congestion packet loss refers to packet loss caused by accumulation of a cache queue of a router and exceeding of a certain threshold due to insufficient network bandwidth, and the packet loss in this case means that a network is congested, that is, the network bandwidth is insufficient to meet the data sending speed of a sending end; the random packet loss refers to random packet loss caused by problems such as WiFi signal interference and link layer transmission errors, and the packet loss in this case does not mean that the network bandwidth is insufficient.
However, in the related art, when packet loss is monitored, the data transmission speed of the transmitting end is usually directly adjusted, so that the network bandwidth cannot be fully utilized under the condition that the packet loss type is random packet loss. Therefore, a data transmission method capable of adopting different data transmission adjustment strategies for different types of packet losses is needed.
Disclosure of Invention
An object of the embodiments of the present application is to provide a data transmission method, an apparatus, a terminal device, and a storage medium, so as to adopt different data transmission strategies for different types of packet losses, thereby improving bandwidth utilization.
The specific technical scheme is as follows:
the embodiment of the invention provides a data transmission method, which is applied to a server and comprises the following steps:
acquiring the one-way delay of the Mth data packet and the one-way delay of the M-1 th data packet; the Mth data packet is an Mth received data packet sent by the client, the Mth-1 data packet is an Mth received data packet sent by the client, and M is a positive integer greater than 1;
determining the packet loss quantity between the Mth data packet and the M-1 th data packet;
calculating a congestion packet loss threshold according to the one-way delay of the Mth data packet and the one-way delay of the M-1 th data packet;
judging whether the packet loss quantity is greater than the congestion packet loss threshold value or not;
if so, reducing the data sending speed of the client; if not, keeping the data sending speed of the client unchanged.
Optionally, the obtaining the one-way delay of the mth data packet and the one-way delay of the M-1 th data packet includes:
receiving an Mth data packet and an Mth-1 data packet, wherein each data packet carries the sending time of the data packet;
recording the receiving time of the Mth data packet and the receiving time of the M-1 data packet;
calculating the difference between the sending time and the receiving time of the Mth data packet as the one-way delay of the Mth data packet; and calculating the difference between the sending time and the receiving time of the M-1 data packet as the one-way delay of the M-1 data packet.
Optionally, the determining the number of packet losses between the mth data packet and the M-1 th data packet includes:
acquiring the packet sequence number of the Mth data packet and the packet sequence number of the M-1 th data packet;
and calculating the difference value between the packet sequence number of the Mth data packet and the packet sequence number of the M-1 th data packet as the packet loss number.
Optionally, the determining the number of packet losses between the mth data packet and the M-1 th data packet includes:
analyzing the Mth data packet and the M-1 th data packet;
and determining the packet loss number between the determined Mth data packet and the M-1 th data packet according to an analysis result.
Optionally, before the calculating a congestion packet loss threshold according to the one-way delay of the mth data packet and the one-way delay of the M-1 data packet, the method further includes:
judging whether the packet loss number is larger than a preset threshold value or not;
and if so, executing the step of calculating the congestion packet loss threshold according to the one-way delay of the Mth data packet and the one-way delay of the M-1 th data packet.
Optionally, the calculating a congestion packet loss threshold according to the one-way delay of the mth data packet and the one-way delay of the M-1 th data packet includes:
determining the maximum one-way delay and the minimum one-way delay according to the one-way delay of each data packet;
calculating the relative delay of the Mth data packet according to the one-way delay of the Mth data packet, the one-way delay of the M-1 th data packet, the maximum one-way delay and the minimum one-way delay;
and calculating a congestion packet loss threshold according to the relative delay of the Mth data packet.
Optionally, the specific method for calculating the relative delay of the mth data packet according to the one-way delay of the mth data packet, the one-way delay of the M-1 data packet, the maximum one-way delay, and the minimum one-way delay includes:
ORTTavg=(ORTT(M-1)+ORTT(M))/2
alpha=(ORTTavg-ORTTmin)/max(ORTTmax–ORTTmin,a)
wherein ORTT (M-1) represents the one-way delay of the M-1 data packet, ORTT (M) represents the one-way delay of the M data packet, ORTTavg represents a middle value, ORTTmin represents the minimum one-way delay, ORTTmax represents the maximum one-way delay, max represents a maximum function, a represents a lower-bound empirical value, and alpha represents the relative delay of the M data packet.
Optionally, the specific method for calculating the congestion packet loss threshold according to the relative delay of the mth data packet is as follows:
threshold=max(1,ceil(b-b*alpha))
wherein alpha represents the relative delay of the Mth data packet, max represents a maximum function, ceil (b-b alpha) represents the minimum integer not less than b-b alpha, b represents the empirical value of the packet loss length, and threshold represents the congestion packet loss threshold.
An embodiment of the present invention further provides a data transmission device, including:
the acquisition unit is configured to acquire the one-way delay of the Mth data packet and the one-way delay of the M-1 th data packet; the Mth data packet is an Mth received data packet sent by the client, the Mth-1 data packet is an Mth received data packet sent by the client, and M is a positive integer greater than 1;
a packet loss number determination unit configured to determine a packet loss number between the mth data packet and the M-1 th data packet;
the calculating unit is configured to calculate a congestion packet loss threshold according to the unidirectional delay of the Mth data packet and the unidirectional delay of the M-1 th data packet;
a judging unit configured to judge whether the packet loss number is greater than the congestion packet loss threshold;
a transmission speed determination unit configured to reduce a data transmission speed of the client when the number of packet losses is greater than the congestion packet loss threshold; and keeping the data sending speed of the client unchanged under the condition that the packet loss number is not greater than the congestion packet loss threshold.
An embodiment of the present invention further provides a data transmission terminal device, including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to implement any of the above-described data transmission methods when executing the program stored in the memory.
An embodiment of the present invention further provides a non-transitory computer-readable storage medium, where instructions in the storage medium, when executed by a processor of a mobile terminal device, enable the mobile terminal device to execute a data transmission method, where the method includes:
acquiring the one-way delay of the Mth data packet and the one-way delay of the M-1 th data packet; the Mth data packet is an Mth received data packet sent by the client, the Mth-1 data packet is an Mth received data packet sent by the client, and M is a positive integer greater than 1;
determining the packet loss quantity between the Mth data packet and the M-1 th data packet;
calculating a congestion packet loss threshold according to the one-way delay of the Mth data packet and the one-way delay of the M-1 th data packet;
judging whether the packet loss quantity is greater than the congestion packet loss threshold value or not;
if so, reducing the data sending speed of the client; if not, keeping the data sending speed of the client unchanged.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: determining the packet loss quantity between the Mth data packet and the Mth-1 th data packet by acquiring the one-way delay of the Mth received data packet sent by the client and the one-way delay of the Mth received data packet sent by the client, then calculating a congestion packet loss threshold according to the one-way delay of the Mth data packet and the one-way delay of the Mth-1 th data packet, and further judging whether the packet loss quantity is greater than the congestion packet loss threshold; if so, reducing the data sending speed of the client; if not, the data sending speed of the client is kept unchanged. Therefore, the data sending speeds of different clients can be determined according to the one-way delay of the Mth data packet, the one-way delay of the M-1 th data packet and the packet loss number between the Mth data packet and the M-1 th data packet, in other words, the data sending speeds of the clients can be determined according to different types of packet losses, and different data sending strategies are adopted, so that the network bandwidth can be fully utilized.
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 invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a flow chart illustrating a method of data transmission according to an example embodiment.
Fig. 2 is a graph illustrating an accumulation distribution of packet loss lengths according to an exemplary embodiment.
Fig. 3 is a diagram illustrating that a congestion packet loss threshold monotonically decreases as a relative delay of an mth data packet increases according to an exemplary embodiment.
Fig. 4 is a block diagram illustrating a data transmission apparatus according to an example embodiment.
Fig. 5 is a block diagram illustrating a terminal device according to an example 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 embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
Generally, data is transmitted between a server and a client through data packets, but during the data transmission process, the data packets may be lost, that is, lost.
The types of packet loss can be classified into congestion packet loss and random packet loss. The congestion packet loss refers to packet loss caused by accumulation of a cache queue of a router and exceeding of a certain threshold due to insufficient network bandwidth, and the packet loss in this case means that a network is congested, that is, the network bandwidth is insufficient to meet the data sending speed of a sending end; the random packet loss is a random packet loss caused by problems such as WiFi signal interference and link layer transmission errors, and the packet loss in this case does not mean that the network bandwidth is insufficient.
However, in the related art, when packet loss is monitored, the data transmission speed of the transmitting end is usually directly adjusted, so that the network bandwidth cannot be fully utilized under the condition that the packet loss type is random packet loss. Therefore, a data transmission method capable of adopting different data transmission adjustment strategies for different types of packet losses is needed.
In order to solve the foregoing technical problem, embodiments of the present application provide a data transmission method and apparatus, where the method and apparatus may be applied to a server, and the server may be a server, a computer, a base station, a router, and other devices.
First, a data transmission method provided in an embodiment of the present application is described in detail below.
Fig. 1 is a flowchart illustrating a data transmission method according to an exemplary embodiment, where the data transmission method is applied to a server side, as shown in fig. 1, and includes the following steps.
In S101, the one-way delay of the Mth data packet and the one-way delay of the M-1 th data packet are obtained.
The Mth data packet is the Mth received data packet sent by the client, the M-1 th data packet is the M-1 th received data packet sent by the client, and M is a positive integer greater than 1.
In this step, the one-way delay of each data packet may be stored in the device at the server, and then, in each longer period, the one-way delay of each data packet is obtained, and based on this, the subsequent steps are executed to adjust the data transmission speed of the client.
Alternatively, the one-way delay of the mth data packet may be directly calculated after the mth data packet is received. For example, the mth data packet and the M-1 th data packet may be received first, where each data packet carries the sending time of the data packet, then the receiving times of the mth data packet and the M-1 th data packet are recorded, and further, the difference between the sending time and the receiving time of the mth data packet is calculated as the one-way delay of the mth data packet, and the difference between the sending time and the receiving time of the M-1 th data packet is calculated as the one-way delay of the M-1 th data packet.
The precision of the one-way delay can be set to be millisecond, or can be set to be more precise, and the precision can be determined according to the network state or the actual application condition, and is not limited specifically.
In S102, the number of packet losses between the mth data packet and the M-1 th data packet is determined.
The packet loss number between the mth data packet and the M-1 th data packet may be determined according to the identification information of the data packet, for example, the packet sequence number of the data packet.
For example, the packet sequence number of the mth data packet and the packet sequence number of the M-1 th data packet may be obtained first, and then the difference between the packet sequence number of the mth data packet and the packet sequence number of the M-1 th data packet may be calculated as the packet loss number. The packet sequence number may be information carried on the data packet.
Or after parsing the data packet, determining the packet loss number between the mth data packet and the M-1 th data packet according to the data content in the data packet, for example, if the data content in the data packet is video data, determining the packet loss number between the mth data packet and the M-1 th data packet according to a video frame missing condition in a video playing process.
In S103, a congestion packet loss threshold is calculated according to the one-way delay of the Mth data packet and the one-way delay of the M-1 th data packet.
Before calculating the congestion packet loss threshold, it may be determined whether the number of packet losses is greater than a preset threshold, and if the number of packet losses is greater than the preset threshold, the step of calculating the congestion packet loss threshold according to the one-way delay of the mth data packet and the one-way delay of the M-1 th data packet is performed. Therefore, when no packet loss occurs or the number of packet losses is small, subsequent calculation and adjustment steps can be omitted, and the resource occupancy rate is saved.
For example, the method for calculating the congestion packet loss threshold according to the one-way delay of the mth data packet and the one-way delay of the M-1 data packet may be:
the first step is to obtain the maximum one-way delay and the minimum one-way delay.
The maximum one-way delay and the minimum one-way delay can be experience values preset according to different network bandwidths; or the maximum one-way delay and the minimum one-way delay are determined according to the one-way delay of each data packet, and the maximum one-way delay and the minimum one-way delay can be updated when a new data packet is received, so that the maximum one-way delay and the minimum one-way delay are more consistent with the current state of the network.
And secondly, calculating the relative delay of the Mth data packet according to the one-way delay of the Mth data packet, the one-way delay of the M-1 th data packet, the maximum one-way delay and the minimum one-way delay.
For example, the following formula can be used to calculate the relative delay of the mth packet:
ORTTavg=(ORTT(M-1)+ORTT(M))/2
alpha=(ORTTavg-ORTTmin)/max(ORTTmax–ORTTmin,a)
wherein ORTT (M-1) represents the one-way delay of the M-1 data packet, ORTT (M) represents the one-way delay of the M data packet, ORTTavg represents a middle value, ORTTmin represents the minimum one-way delay, ORTTmax represents the maximum one-way delay, max represents a maximum function, a represents a lower-bound empirical value, and alpha represents the relative delay of the M data packet.
According to the formula, the alpha is a variable with a value range of [0,1], the smaller the alpha is, the closer the one-way delay of the Mth data packet is to the minimum one-way delay, which indicates that the network is unblocked, and the larger the alpha is, the closer the one-way delay of the Mth data packet is to the maximum one-way delay, which indicates that the network is congested.
The lower-bound empirical value is to prevent the maximum one-way delay and the minimum one-way delay from being too close, and the value thereof may be 50, or may be adjusted according to the situation, and is not particularly limited.
And thirdly, calculating a congestion packet loss threshold according to the relative delay of the Mth data packet.
For example, the following formula may be used to calculate the congestion packet loss threshold:
threshold=max(1,ceil(b-b*alpha))
wherein alpha represents the relative delay of the Mth data packet, max represents a maximum function, ceil (b-b alpha) represents the minimum integer not less than b-b alpha, b represents the empirical value of the packet loss length, and threshold represents the congestion packet loss threshold.
The empirical value of the packet loss length may be obtained by performing statistical analysis on the data, for example, as shown in fig. 2, the cumulative distribution graph of the lengths of the consecutive packet losses shows that 98.95% of the lengths of the consecutive packet losses are less than or equal to 5, and based on this, the empirical value of the packet loss length may be set to 5.
Thus, as shown in fig. 3, when the relative delay time is gradually increased from 0 to 1, the congestion gradually changes from unobstructed in the network, that is, the continuous packet loss is more likely to be a congestion packet loss, and therefore, the congestion packet loss threshold value monotonically decreases as the relative delay time of the mth data packet increases.
Alternatively, other formulas may be adopted to calculate the congestion packet loss threshold, as long as the congestion packet loss threshold is monotonically decreased along with the relative delay increase of the mth data packet, which is not limited specifically.
In S104, judging whether the packet loss quantity is greater than a congestion packet loss threshold value; if so, reducing the data sending speed of the client; if not, the data sending speed of the client is kept unchanged.
It can be understood that when the number of packet losses is greater than the congestion packet loss threshold, the packet losses may be determined as congestion packet losses, that is, the network bandwidth is not sufficient to meet the data sending speed of the sending end, so that the data sending speed of the client may be reduced by sending an adjustment instruction to the client; when the packet loss number is not greater than the congestion packet loss threshold, the packet losses can be determined as random packet losses, which may be caused by problems such as WiFi signal interference, link layer transmission errors, and the like, and does not mean that the network bandwidth is insufficient, so that the data transmission speed of the client is kept unchanged, and bandwidth waste is reduced.
As can be seen from the above, by applying the data transmission method provided in the embodiment of the present application, the data transmission speeds of different clients can be determined according to the one-way delay of the mth data packet, the one-way delay of the M-1 data packet, and the packet loss number between the mth data packet and the M-1 data packet, in other words, the data transmission speeds of the clients can be determined according to different types of packet losses, and different data transmission strategies are adopted, so that the network bandwidth can be fully utilized.
As shown in fig. 4, a schematic structural diagram of a data transmission apparatus provided in an embodiment of the present application includes an obtaining unit 401, a packet loss number determining unit 402, a calculating unit 403, a determining unit 404, and a sending speed determining unit 405. Wherein:
an obtaining unit 401 configured to obtain a one-way delay of an mth data packet and a one-way delay of an M-1 th data packet; the Mth data packet is an Mth received data packet sent by the client, the Mth-1 data packet is an Mth received data packet sent by the client, and M is a positive integer greater than 1;
a packet loss number determining unit 402 configured to determine a packet loss number between the mth data packet and the M-1 st data packet;
a calculating unit 403, configured to calculate a congestion packet loss threshold according to the unidirectional delay of the mth data packet and the unidirectional delay of the M-1 data packet;
a determining unit 404 configured to determine whether the packet loss number is greater than the congestion packet loss threshold;
a transmission speed determination unit 405 configured to reduce the data transmission speed of the client if the packet loss number is greater than the congestion packet loss threshold; and keeping the data sending speed of the client unchanged under the condition that the packet loss number is not greater than the congestion packet loss threshold.
In an implementation manner, the obtaining unit 401 is specifically configured to:
receiving an Mth data packet and an Mth-1 data packet, wherein each data packet carries the sending time of the data packet;
recording the receiving time of the Mth data packet and the receiving time of the M-1 data packet;
calculating the difference between the sending time and the receiving time of the Mth data packet as the one-way delay of the Mth data packet; and calculating the difference between the sending time and the receiving time of the M-1 data packet as the one-way delay of the M-1 data packet.
In an implementation manner, the packet loss number determining unit 402 is specifically configured to:
acquiring the packet sequence number of the Mth data packet and the packet sequence number of the M-1 th data packet;
and calculating the difference value between the packet sequence number of the Mth data packet and the packet sequence number of the M-1 th data packet as the packet loss number.
In an implementation manner, the packet loss number determining unit 402 is specifically configured to:
analyzing the Mth data packet and the M-1 th data packet;
and determining the packet loss number between the determined Mth data packet and the M-1 th data packet according to an analysis result.
In one implementation, the computing unit 403 is further configured to:
judging whether the packet loss number is larger than a preset threshold value or not;
and if so, executing the step of calculating the congestion packet loss threshold according to the one-way delay of the Mth data packet and the one-way delay of the M-1 th data packet.
In one implementation, the computing unit 403 is specifically configured to:
determining the maximum one-way delay and the minimum one-way delay according to the one-way delay of each data packet;
calculating the relative delay of the Mth data packet according to the one-way delay of the Mth data packet, the one-way delay of the M-1 th data packet, the maximum one-way delay and the minimum one-way delay;
and calculating a congestion packet loss threshold according to the relative delay of the Mth data packet.
In an implementation manner, the specific method for calculating, by the calculating unit 403, the relative delay of the mth data packet according to the one-way delay of the mth data packet, the one-way delay of the M-1 data packet, the maximum one-way delay, and the minimum one-way delay includes:
ORTTavg=(ORTT(M-1)+ORTT(M))/2
alpha=(ORTTavg-ORTTmin)/max(ORTTmax–ORTTmin,a)
wherein ORTT (M-1) represents the one-way delay of the M-1 data packet, ORTT (M) represents the one-way delay of the M data packet, ORTTavg represents a middle value, ORTTmin represents the minimum one-way delay, ORTTmax represents the maximum one-way delay, max represents a maximum function, a represents a lower-bound empirical value, and alpha represents the relative delay of the M data packet.
In an implementation manner, the specific method for calculating the congestion packet loss threshold by the calculating unit 403 according to the relative delay of the mth data packet is as follows:
threshold=max(1,ceil(b-b*alpha))
wherein alpha represents the relative delay of the Mth data packet, max represents a maximum function, ceil (b-b alpha) represents the minimum integer not less than b-b alpha, b represents the empirical value of the packet loss length, and threshold represents the congestion packet loss threshold.
As can be seen from the above, with the data transmission device provided in this embodiment of the present application, the data transmission speeds of different clients can be determined according to the one-way delay of the mth data packet, the one-way delay of the M-1 th data packet, and the packet loss number between the mth data packet and the M-1 th data packet, in other words, the data transmission speeds of the clients can be determined according to different types of packet losses, and different data transmission strategies are adopted, so that the network bandwidth can be fully utilized.
Fig. 5 is a block diagram illustrating a terminal device 500 for data transmission according to an example embodiment. For example, the terminal device 500 may be a mobile phone, a computer, a digital broadcast terminal device, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
Referring to fig. 5, terminal device 500 may include one or more of the following components: a processing component 502, a memory 504, a power component 506, a multimedia component 508, an audio component 510, an input/output (I/O) interface 512, a sensor component 514, and a communication component 516.
The processing component 502 generally controls overall operations of the terminal device 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 502 may include one or more processors 520 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 502 can include one or more modules that facilitate interaction between the processing component 502 and other components. For example, the processing component 502 can include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502.
The memory 504 is configured to store various types of data to support operations at the terminal device 500. Examples of such data include instructions for any application or method operating on terminal device 500, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 504 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 506 provides power to the various components of the terminal device 500. The power components 506 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the terminal device 500.
The multimedia component 508 includes a screen providing an output interface between the terminal device 500 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the terminal device 500 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 510 is configured to output and/or input audio signals. For example, the audio component 510 includes a Microphone (MIC) configured to receive an external audio signal when the terminal apparatus 500 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 504 or transmitted via the communication component 516. In some embodiments, audio component 510 further includes a speaker for outputting audio signals.
The I/O interface 512 provides an interface between the processing component 502 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 514 includes one or more sensors for providing various aspects of status assessment for the terminal device 500. For example, sensor assembly 514 may detect an open/closed status of terminal device 500, the relative positioning of components, such as a display and keypad of terminal device 500, sensor assembly 514 may detect a change in the position of terminal device 500 or a component of terminal device 500, the presence or absence of user contact with terminal device 500, orientation or acceleration/deceleration of terminal device 500, and a change in the temperature of terminal device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 516 is configured to facilitate communication between the terminal device 500 and other devices in a wired or wireless manner. The terminal device 500 may access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the terminal device 500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 504 comprising instructions, executable by the processor 520 of the terminal device 500 to perform the above-described method is also provided. For example, the non-transitory 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.
As can be seen from the above, with the data transmission device provided in this embodiment of the present application, the data transmission speeds of different clients can be determined according to the one-way delay of the mth data packet, the one-way delay of the M-1 th data packet, and the packet loss number between the mth data packet and the M-1 th data packet, in other words, the data transmission speeds of the clients can be determined according to different types of packet losses, and different data transmission strategies are adopted, so that the network bandwidth can be fully utilized.
Other embodiments of the invention 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 invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements 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 invention is limited only by the appended claims.

Claims (9)

1. A data transmission method is applied to a server side and is characterized by comprising the following steps:
acquiring the one-way delay of the Mth data packet and the one-way delay of the M-1 th data packet; the Mth data packet is an Mth received data packet sent by the client, the Mth-1 data packet is an Mth received data packet sent by the client, and M is a positive integer greater than 1;
determining the packet loss quantity between the Mth data packet and the M-1 th data packet;
calculating a congestion packet loss threshold according to the one-way delay of the Mth data packet and the one-way delay of the M-1 th data packet;
judging whether the packet loss quantity is greater than the congestion packet loss threshold value or not;
if so, reducing the data sending speed of the client; if not, keeping the data sending speed of the client unchanged;
wherein, the calculating the congestion packet loss threshold according to the one-way delay of the mth data packet and the one-way delay of the M-1 data packet includes: determining the maximum one-way delay and the minimum one-way delay according to the one-way delay of each data packet; calculating the relative delay of the Mth data packet according to the one-way delay of the Mth data packet, the one-way delay of the M-1 th data packet, the maximum one-way delay and the minimum one-way delay; calculating a congestion packet loss threshold according to the relative delay of the Mth data packet;
the relative delay of the mth data packet is: a ratio of the target difference to the target maximum; the target difference is obtained by subtracting a minimum one-way delay from a target average value, the target average value is an average value of the one-way delay of the mth data packet and the one-way delay of the M-1 th data packet, and the target maximum value is a maximum value of a maximum difference between the one-way delays of the data packets and a lower-bound empirical value.
2. The data transmission method according to claim 1, wherein the obtaining the one-way delay of the mth packet and the one-way delay of the M-1 th packet comprises:
receiving an Mth data packet and an Mth-1 data packet, wherein each data packet carries the sending time of the data packet;
recording the receiving time of the Mth data packet and the receiving time of the M-1 data packet;
calculating the difference between the sending time and the receiving time of the Mth data packet as the one-way delay of the Mth data packet; and calculating the difference between the sending time and the receiving time of the M-1 data packet as the one-way delay of the M-1 data packet.
3. The data transmission method according to claim 1, wherein the determining the number of lost packets between the mth data packet and the M-1 th data packet includes:
acquiring the packet sequence number of the Mth data packet and the packet sequence number of the M-1 th data packet;
and calculating the difference value between the packet sequence number of the Mth data packet and the packet sequence number of the M-1 th data packet as the packet loss number.
4. The data transmission method according to claim 1, wherein the determining the number of lost packets between the mth data packet and the M-1 th data packet includes:
analyzing the Mth data packet and the M-1 th data packet;
and determining the packet loss quantity between the Mth data packet and the M-1 th data packet according to the analysis result.
5. The data transmission method according to claim 1, wherein before the calculating a congestion packet loss threshold according to the one-way delay of the mth data packet and the one-way delay of the M-1 data packet, the method further comprises:
judging whether the packet loss number is larger than a preset threshold value or not;
and if so, executing the step of calculating the congestion packet loss threshold according to the one-way delay of the Mth data packet and the one-way delay of the M-1 th data packet.
6. The data transmission method according to claim 1, wherein the specific method for calculating the congestion packet loss threshold according to the relative delay of the mth data packet is as follows:
threshold = max(1, ceil(b -b * alpha))
wherein alpha represents the relative delay of the Mth data packet, max represents a maximum function, ceil (b-b alpha) represents the minimum integer not less than b-b alpha, b represents the empirical value of the packet loss length, and threshold represents the congestion packet loss threshold.
7. A data transmission apparatus, comprising:
the acquisition unit is configured to acquire the one-way delay of the Mth data packet and the one-way delay of the M-1 th data packet; the Mth data packet is an Mth received data packet sent by the client, the Mth-1 data packet is an Mth received data packet sent by the client, and M is a positive integer greater than 1;
a packet loss number determination unit configured to determine a packet loss number between the mth data packet and the M-1 th data packet;
the calculating unit is configured to calculate a congestion packet loss threshold according to the unidirectional delay of the Mth data packet and the unidirectional delay of the M-1 th data packet;
a judging unit configured to judge whether the packet loss number is greater than the congestion packet loss threshold;
a transmission speed determination unit configured to reduce a data transmission speed of the client when the number of packet losses is greater than the congestion packet loss threshold; keeping the data sending speed of the client unchanged under the condition that the packet loss number is not greater than the congestion packet loss threshold;
wherein the computing unit is specifically configured to: determining the maximum one-way delay and the minimum one-way delay according to the one-way delay of each data packet; calculating the relative delay of the Mth data packet according to the one-way delay of the Mth data packet, the one-way delay of the M-1 th data packet, the maximum one-way delay and the minimum one-way delay; calculating a congestion packet loss threshold according to the relative delay of the Mth data packet;
the relative delay of the mth data packet is: a ratio of the target difference to the target maximum; the target difference is obtained by subtracting a minimum one-way delay from a target average value, the target average value is an average value of the one-way delay of the mth data packet and the one-way delay of the M-1 th data packet, and the target maximum value is a maximum value of a maximum difference between the one-way delays of the data packets and a lower-bound empirical value.
8. A data transmission terminal device, characterized by comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to implement the data transmission method of any one of claims 1-6 when executing the program stored on the memory.
9. A non-transitory computer-readable storage medium, instructions in which, when executed by a processor of a mobile terminal device, enable the mobile terminal device to perform the data transmission method of any one of claims 1-6.
CN201811637178.1A 2018-12-29 2018-12-29 Data transmission method and device, terminal equipment and storage medium Active CN109474538B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201811637178.1A CN109474538B (en) 2018-12-29 2018-12-29 Data transmission method and device, terminal equipment and storage medium
PCT/CN2019/114887 WO2020134559A1 (en) 2018-12-29 2019-10-31 Data transmission method and apparatus, terminal device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811637178.1A CN109474538B (en) 2018-12-29 2018-12-29 Data transmission method and device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109474538A CN109474538A (en) 2019-03-15
CN109474538B true CN109474538B (en) 2021-07-30

Family

ID=65677427

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811637178.1A Active CN109474538B (en) 2018-12-29 2018-12-29 Data transmission method and device, terminal equipment and storage medium

Country Status (2)

Country Link
CN (1) CN109474538B (en)
WO (1) WO2020134559A1 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109474538B (en) * 2018-12-29 2021-07-30 北京达佳互联信息技术有限公司 Data transmission method and device, terminal equipment and storage medium
CN110120896B (en) 2019-04-15 2020-12-25 北京达佳互联信息技术有限公司 Network delay control method and device, electronic equipment and storage medium
CN116601932A (en) * 2020-12-16 2023-08-15 华为技术有限公司 Network congestion management method and related device
CN112822117B (en) * 2021-01-07 2022-11-22 厦门亿联网络技术股份有限公司 Congestion detection method and device for real-time streaming media transmission
CN113315918B (en) * 2021-07-28 2021-10-08 湖南涉外经济学院 Computer network data processing method and system
CN113595830B (en) * 2021-07-30 2024-02-20 百果园技术(新加坡)有限公司 Method, device, equipment and storage medium for detecting network packet loss state
CN113691882B (en) * 2021-09-02 2024-04-26 广州市奥威亚电子科技有限公司 Method, device, equipment and storage medium for judging network condition
CN114221909B (en) * 2021-12-13 2024-02-02 杭州逗酷软件科技有限公司 Data transmission method, device, terminal and storage medium
CN114650260B (en) * 2022-03-14 2024-03-12 清华大学 Network packet loss type identification method and device and electronic equipment
CN116155827A (en) * 2023-01-17 2023-05-23 中国联合网络通信集团有限公司 Data transmission method, device, router, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6958998B2 (en) * 2001-07-09 2005-10-25 International Business Machines Corporation Traffic management in packet-based networks
CN104159166A (en) * 2014-08-07 2014-11-19 西安交通大学 Live video data transmission error control method based on mobile network packet loss status
CN105262643A (en) * 2015-10-29 2016-01-20 西安交通大学 Method for differentiating packet loss based on TD-LTE mobile network transmission characteristics
CN105306888A (en) * 2015-10-03 2016-02-03 上海大学 Mobile video monitoring bandwidth adaption method based on packet loss differentiation
CN105634875A (en) * 2016-02-05 2016-06-01 中国科学院计算技术研究所 Method and system for identifying packet loss type in data transmission of reliable transmission protocol
CN106255149A (en) * 2016-08-10 2016-12-21 广州市百果园网络科技有限公司 A kind of media data transmission method and device
CN108075988A (en) * 2017-11-16 2018-05-25 华为技术有限公司 Data transmission method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201019649A (en) * 2008-11-06 2010-05-16 Inst Information Industry Network system, adjusting method of data transmission rate and computer program procut thereof
CN101854268B (en) * 2009-04-04 2013-06-05 华为技术有限公司 Method, device and system of IP (Internet Protocol) network performance measurement as well as method, device and system of IP network service quality control
CN103997434B (en) * 2014-05-21 2017-12-05 华为技术有限公司 The detection method and relevant device of network transmission situation
CN105721333B (en) * 2016-01-21 2019-02-15 全时云商务服务股份有限公司 A kind of data transmission device and method
US20170331744A1 (en) * 2016-05-11 2017-11-16 Microsoft Technology Licensing, Llc Combined delay and loss based congestion control algorithms
CN108234224B (en) * 2016-12-13 2020-04-24 腾讯科技(深圳)有限公司 Available bandwidth detection method and device
CN109474538B (en) * 2018-12-29 2021-07-30 北京达佳互联信息技术有限公司 Data transmission method and device, terminal equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6958998B2 (en) * 2001-07-09 2005-10-25 International Business Machines Corporation Traffic management in packet-based networks
CN104159166A (en) * 2014-08-07 2014-11-19 西安交通大学 Live video data transmission error control method based on mobile network packet loss status
CN105306888A (en) * 2015-10-03 2016-02-03 上海大学 Mobile video monitoring bandwidth adaption method based on packet loss differentiation
CN105262643A (en) * 2015-10-29 2016-01-20 西安交通大学 Method for differentiating packet loss based on TD-LTE mobile network transmission characteristics
CN105634875A (en) * 2016-02-05 2016-06-01 中国科学院计算技术研究所 Method and system for identifying packet loss type in data transmission of reliable transmission protocol
CN106255149A (en) * 2016-08-10 2016-12-21 广州市百果园网络科技有限公司 A kind of media data transmission method and device
CN108075988A (en) * 2017-11-16 2018-05-25 华为技术有限公司 Data transmission method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种面向卫星网络的TCP改进算法研究;沈丽娜 等;《海南大学学报自然科学版》;20151231;第33卷(第4期);第327-332页 *

Also Published As

Publication number Publication date
WO2020134559A1 (en) 2020-07-02
CN109474538A (en) 2019-03-15

Similar Documents

Publication Publication Date Title
CN109474538B (en) Data transmission method and device, terminal equipment and storage medium
CN110611829B (en) Video preloading method and device, electronic equipment and storage medium
CN110120896B (en) Network delay control method and device, electronic equipment and storage medium
CN110166371B (en) Flow control method and device, electronic equipment and storage medium
CN109698794B (en) Congestion control method and device, electronic equipment and storage medium
CN107743096B (en) Network optimization method, device, terminal and storage medium
EP3185480B1 (en) Method and apparatus for processing network jitter, and terminal device
CN109561356B (en) Data transmission method, data transmission device, electronic apparatus, and computer-readable storage medium
US10009283B2 (en) Method and device for processing information
CN107480785B (en) Convolutional neural network training method and device
CN107820684B (en) Channel detection method, information sending method, device and communication equipment
CN106658587B (en) Network condition prompting method and device
CN109417730B (en) Direct link communication method and device
CN111724803A (en) Audio processing method and device, electronic equipment and storage medium
CN105227426B (en) Application interface switching method and device and terminal equipment
CN110933773B (en) Link monitoring method and device
CN111405319B (en) Bandwidth determination method and device, electronic equipment and storage medium
CN111654354A (en) Detection method, device and storage medium of Maximum Transmission Unit (MTU)
CN112492654A (en) Network control method, device and storage medium
CN110719598B (en) Data transmission method and device, electronic equipment and storage medium
CN110268779B (en) Direct connection link data sending and direct connection link resource configuration method and device
CN114650571A (en) Communication control method, communication control device, and storage medium
CN111314232A (en) Application acceleration method, device and storage medium
CN110771250A (en) Method and device for determining length of contention window
CN111722919A (en) Method and device for running background application program, storage medium and electronic equipment

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