Disclosure of Invention
The disclosure provides a data transmission method and device, so as to at least solve the problem that the transmission throughput cannot be guaranteed to be optimal in the related art.
According to a first aspect of the embodiment of the present disclosure, a data transmission method is provided, which includes determining a plurality of transmission intervals before a current time, wherein an end time of each transmission interval is a time when a first predetermined determination message arrives in the transmission interval, the predetermined determination message is a determination message indicating that a data packet beginning to be transmitted in the transmission interval is successfully received, a start time of each transmission interval is an end time of a corresponding last transmission interval, determining a short window and a long window corresponding to the current time based on the plurality of transmission intervals, wherein the short window includes a first predetermined number of transmission intervals before the current time, the long window includes a second predetermined number of transmission intervals before the current time, the first predetermined number is smaller than the second predetermined number, a target minimum round trip delay of the current time is selected from the first minimum round trip delay of the short window and the second minimum round trip delay of the long window, and the data packet is transmitted based on the target minimum round trip delay at the current time.
Optionally, selecting the target minimum round trip delay at the current time from the first minimum round trip delay of the short window and the second minimum round trip delay of the long window comprises acquiring related information of a data packet transmitted before the current time, and selecting the target minimum round trip delay at the current time from the first minimum round trip delay of the short window and the second minimum round trip delay of the long window based on the related information.
Optionally, selecting the target minimum round trip delay at the current time from the first minimum round trip delay of the short window and the second minimum round trip delay of the long window based on the related information includes selecting the first minimum round trip delay as the target minimum round trip delay if the related information meets a first preset condition, wherein the first preset condition indicates that the amount of data transmitted in a first preset time period before the current time is smaller than a first preset value, and selecting the second minimum round trip delay as the target minimum round trip delay if the related information meets a second preset condition, wherein the second preset condition indicates that the amount of data transmitted in a second preset time before the current time is larger than a second preset value.
Optionally, the related information comprises round trip delay corresponding to a determined message closest to the current time, and/or the number of transmission intervals between the transmission interval where the second minimum round trip delay is located and the transmission interval where the current time is spaced, and/or whether the whole interval exists in the Mth transmission interval before the current time, wherein M is a positive integer, the first preset condition indicates that the data volume transmitted in the first preset time period before the current time is smaller than a first preset value through any one of the following conditions, the first sub-condition indicates that the transmission data packet exists in a part of the Mth transmission interval before the current time, or the number of transmission intervals between the transmission interval where the second minimum round trip delay is located and the transmission interval where the current time is spaced is smaller than M, the second sub-condition indicates that the data volume transmitted in the second preset time before the current time is larger than a second preset value through any one of the following conditions, the first sub-condition indicates that the data volume transmitted in the second preset time before the current time is larger than the second preset value, the first round trip delay is not met, the number of the related information is larger than a first preset threshold is not met, and the number of the round trip delay is smaller than the first preset threshold is smaller than the first threshold.
Optionally, in the case that any one of the third predetermined number of transmission intervals before the current time has an out-of-order phenomenon, the end time of the transmission interval in which the current time is located is a time at which an nth determination message arrives after the start time of the transmission interval in which the current time is located, where N is an integer greater than 2.
Optionally, when the time difference between the current time and the corresponding end time of the last transmission interval exceeds a third preset threshold, the current time is taken as the end time of the transmission interval where the current time is located.
Optionally, before selecting the target minimum round trip delay at the current time from the first minimum round trip delay of the short window and the second minimum round trip delay of the long window, acquiring the minimum round trip delay of each transmission interval in a first preset number of transmission intervals before the current time, acquiring the first minimum round trip delay of the short window based on the first preset number of minimum round trip delays, acquiring the minimum round trip delay of each transmission interval in a second preset number of transmission intervals before the current time, and acquiring the second minimum round trip delay of the long window based on the second preset number of minimum round trip delays.
Optionally, at the current time, sending the data packet based on the target minimum round trip delay comprises multiplying the target minimum round trip delay by the estimated bandwidth to obtain a congestion window, and at the current time, sending the data packet based on the congestion window.
According to a second aspect of the embodiments of the present disclosure, there is provided a data transmission apparatus including a transmission section acquisition unit configured to determine a plurality of transmission sections before a current time, wherein an end time of each transmission section is a time at which a first predetermined determination message arrives within the present transmission section, the predetermined determination message is a determination message indicating that a data packet beginning to be transmitted within the present transmission section is successfully received, a start time of each transmission section is an end time of a corresponding last transmission section, a window determination unit configured to determine a short window and a long window corresponding to the current time based on the plurality of transmission sections, wherein the short window includes a first predetermined number of transmission sections before the current time, the long window includes a second predetermined number of transmission sections before the current time, the first predetermined number is smaller than the second predetermined number, a selection unit configured to select a target minimum round trip delay of the current time from among the first minimum round trip delay of the short window and the second minimum round trip delay of the long window, and a transmission unit configured to transmit the data packet based on the target minimum delay at the current time.
Optionally, the selecting unit is further configured to obtain related information of the data packet transmitted before the current time, and select a target minimum round trip delay of the current time from the first minimum round trip delay of the short window and the second minimum round trip delay of the long window based on the related information.
Optionally, the selecting unit is further configured to select the first minimum round trip delay as the target minimum round trip delay when the related information meets a first preset condition, where the first preset condition indicates that the amount of data transmitted in a first preset time period before the current time is smaller than a first preset value, and select the second minimum round trip delay as the target minimum round trip delay when the related information meets a second preset condition, where the second preset condition indicates that the amount of data transmitted in a second preset time before the current time is greater than a second preset value.
Optionally, the related information comprises round trip delay corresponding to a determined message closest to the current time, and/or the number of transmission intervals between the transmission interval where the second minimum round trip delay is located and the transmission interval where the current time is spaced, and/or whether the whole interval exists in the Mth transmission interval before the current time, wherein M is a positive integer, the first preset condition indicates that the data volume transmitted in the first preset time period before the current time is smaller than a first preset value through any one of the following conditions, the first sub-condition indicates that the transmission data packet exists in a part of the Mth transmission interval before the current time, or the number of transmission intervals between the transmission interval where the second minimum round trip delay is located and the transmission interval where the current time is spaced is smaller than M, the second sub-condition indicates that the data volume transmitted in the second preset time before the current time is larger than a second preset value through any one of the following conditions, the first sub-condition indicates that the data volume transmitted in the second preset time before the current time is larger than the second preset value, the first round trip delay is not met, the number of the related information is larger than a first preset threshold is not met, and the number of the round trip delay is smaller than the first preset threshold is smaller than the first threshold.
Optionally, in the case that any one of the third predetermined number of transmission intervals before the current time has an out-of-order phenomenon, the end time of the transmission interval in which the current time is located is a time at which an nth determination message arrives after the start time of the transmission interval in which the current time is located, where N is an integer greater than 2.
Optionally, when the time difference between the current time and the corresponding end time of the last transmission interval exceeds a third preset threshold, the current time is taken as the end time of the transmission interval where the current time is located.
Optionally, the selecting unit is further configured to obtain a minimum round trip delay of each transmission interval in a first predetermined number of transmission intervals before the current time before the target minimum round trip delay at the current time is selected from the first minimum round trip delay of the short window and the second minimum round trip delay of the long window, obtain the first minimum round trip delay of the short window based on the first predetermined number of minimum round trip delays, obtain the minimum round trip delay of each transmission interval in the second predetermined number of transmission intervals before the current time, and obtain the second minimum round trip delay of the long window based on the second predetermined number of minimum round trip delays.
Optionally, the transmission unit is further configured to multiply the target minimum round trip delay with the estimated bandwidth to obtain a congestion window, and send the data packet based on the congestion window at the current time.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device comprising a processor, a memory for storing processor-executable instructions, wherein the processor is configured to execute the instructions to implement a data transmission method according to the present disclosure.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium, which when executed by at least one processor, causes the at least one processor to perform a data transmission method as described above according to the present disclosure.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising computer instructions which, when executed by a processor, implement a data transmission method according to the present disclosure.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
According to the data transmission method and device, the minimum round trip delay of different time spans can be counted through the long window and the short window corresponding to the current time, then the target minimum round trip delay to be used at the current time is selected from the minimum round trip delay of different time spans, namely the first minimum round trip delay of the long window and the second minimum round trip delay of the short window, so that the corresponding target minimum round trip delay can be selected as required, the problem that the transmission throughput cannot be optimal due to the fact that the minimum round trip delay in the fixed time is adopted when the network shakes can be avoided, and the problem of weak occupied capacity of link resources can be avoided. Therefore, the present disclosure solves the problem that the related art cannot guarantee that the transmission throughput reaches the optimum.
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.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The embodiments described in the examples below are not representative of all embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
It should be noted that, in this disclosure, "at least one of the items" refers to a case where three types of juxtaposition including "any one of the items", "a combination of any of the items", "an entirety of the items" are included. For example, "comprising at least one of A and B" includes the case of juxtaposition of three of (1) comprising A, (2) comprising B, and (3) comprising A and B. For example, "at least one of the first and second steps is executed", that is, three cases are shown in parallel, namely (1) execute the first step, (2) execute the second step, and (3) execute the first and second steps.
The reason for network congestion is described simply below, in which the sender sends data to the network, and the receiver feeds back acknowledgement information of the acknowledgement every time when receiving one data packet in the data, so as to inform the sender that the corresponding data packet has been received, in theory, the data volume sent by the sender at the same time must be less than or equal to the network capacity, but the sender cannot objectively sense the network, that is, cannot accurately know the network capacity, so when the data volume sent by the sender at the same time is far greater than the bandwidth bottleneck formed by the link bandwidth in the network, the data packet will wait in a queue in the network, and the buffer space on the intermediate node of the network provides a certain protection for the data packet waiting for service, however, if this condition continues for a period of time, when the buffer space is exhausted, the router only discards the queued data packet which cannot be stored in the buffer, at this time, and the network performance will drop sharply. The method is ideal in that the number of data packets which can be accommodated on the links of the current network can be estimated, and when the data is available, an Ack message is received to send out a data packet, namely, the data packet with fixed number is always kept to flow in the network, so that the maximum throughput is achieved, the bottleneck bandwidth of the links of the network is occupied, the minimum round trip delay is achieved, and no buffer queue in the links of the network is ensured.
The statistics and the use of the minimum round trip Delay are an important link in a network congestion algorithm, on one hand, the network congestion algorithm compares the counted minimum round trip Delay with the current latest round trip Delay to judge whether the network congestion phenomenon is generated in the self-transmission process, if the latest round trip Delay is larger than the minimum round trip Delay, the network congestion appears, and further a subsequent transmission strategy is controlled, on the other hand, the network congestion algorithm designed in the academia and the industry in recent years calculates BDP (Bandwidth-Delay Product) by using the minimum round trip Delay, and uses the congestion window size used by the BDP to guide the algorithm, and the starting and stopping state of the current transmission progress is controlled through the congestion window. It should be noted that, in the present BBR algorithm and its derivative algorithm, the congestion window is 2 times of BDP, where the congestion window is the total data amount that the link of the network can transmit in the sending window.
Since congestion algorithms cannot accurately acquire the state of the current network link, there is often an error in the minimum round trip delay that is statistically acquired and the actual minimum round trip delay in the physical network. When the minimum round-trip delay obtained by statistics is smaller than the actual minimum round-trip delay, the end-to-end transmission delay is smaller, but the congestion window is also smaller, so that the total data quantity which can be transmitted by the links of the network at the same time is smaller, and the throughput cannot normally reach full-load work. Therefore, the statistical method and the use mode of the congestion algorithm on the minimum round trip delay directly affect the performance of the network congestion algorithm.
For example, the current method of counting the minimum round trip delay in the BBR algorithm is the most preferred method of counting the minimum round trip delay in the industry, i.e. observing the round trip delay (RTT) of each data packet, and recording the minimum RTT of the last x seconds (for example, the value of x in BBR v1 is 10 seconds, and the value of x in BBR v2 is 2.5 seconds). If the recorded minimum RTT does not change in the time of the subsequent duration x, the recorded minimum RTT is considered to be invalid, and the minimum RTT needs to be updated. The recorded minimum RTT cannot follow up with time change in time when the network shakes, which often results in a lower statistical minimum RTT, for example, when the round trip delay jitter amplitude is greater than 2 times, the congestion window obtained by the BBR algorithm based on 2 times BDP (product of minimum RTT and estimated bandwidth) is often too small, so that the transmission throughput cannot reach the optimum, for example, when the round trip delay jitter is from 100ms to 300ms, the minimum RTT at this time is 100ms, when the 2 times BDP is adopted, that is, only the minimum delay of 100ms-200ms is considered, the round trip delay of 200ms-300ms may not be considered, so that part of bandwidth is idle, and the transmission throughput cannot reach the optimum.
In view of the foregoing, the present disclosure provides a data transmission method capable of ensuring a better transmission throughput, for example, a scenario of transmitting N data packets is described below as an example.
Fig. 1 is a schematic diagram illustrating an implementation scenario of a data transmission method according to an exemplary embodiment of the present disclosure, as shown in fig. 1, where the implementation scenario includes a server 100, a user terminal 110, and a user terminal 120, where the user terminals are not limited to 2, including but not limited to a mobile phone, a personal computer, and other devices, and the user terminal may install an application program for sending and receiving a data packet, and the server may be one server, or a server cluster formed by a plurality of servers, or may be a cloud computing platform or a virtualization center.
In order to facilitate understanding of the disclosure, the embodiment illustrates a data transmission method of the disclosure by taking a time after a part of data packets in the N data packets are transmitted as a current time, where the user terminal 110 determines a plurality of transmission intervals before the current time, where an end time of each transmission interval is a time at which a first predetermined determination message arrives in the transmission interval, the predetermined determination message is a determination message indicating that the data packet beginning to be transmitted in the transmission interval is successfully received, a start time of each transmission interval is an end time of a corresponding last transmission interval, and determines a short window and a long window corresponding to the current time based on the plurality of transmission intervals, where the short window includes a first predetermined number of transmission intervals before the current time, and the long window includes a second predetermined number of transmission intervals before the current time, where the first predetermined number is smaller than the second predetermined number, and where a round trip time is selected from a first minimum delay of the short window and a second minimum delay of the long window, where the minimum delay is the first predetermined number of the short window, and the round trip time is a minimum delay of the round trip window, and the round trip time is determined based on the first minimum delay of the short window, and the round trip time is determined to be a congestion value of the data packet at the current window 100, and a congestion value is determined to be a congestion value at a congestion value of the end of the user.
It should be noted that, each time in the transmission process of the N data packets needs to determine the minimum round trip delay, and then each time sends the data packet according to the corresponding minimum round trip delay. And the data transmission method of the present disclosure generally calculates a minimum round trip delay at each time in a next transmission interval starting at an end time of each transmission interval so that a data packet can be accurately transmitted.
Hereinafter, a data transmission method and apparatus according to exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
Fig. 2 is a flow chart illustrating a data transmission method according to an exemplary embodiment, and as shown in fig. 2, the data transmission method includes the steps of:
In step S201, a plurality of transmission intervals before the current time are determined, where the end time of each transmission interval is the time when the first predetermined determination message arrives in the present transmission interval, the predetermined determination message is a determination message indicating that the data packet that starts to be transmitted in the present transmission interval is successfully received, and the start time of each transmission interval is the end time of the corresponding last transmission interval. The start time of each transmission section is the end time of the previous section, and is independent of whether or not a packet is transmitted in the transmission section. The determination message may be ACK (Acknowledgement) messages, NACK (Negative Acknowledgement), FACK (forward acknowledgement), TACK (Tame Acknowledgement), as long as the sender can tell which packets have arrived at the receiver, which is not limited in this disclosure.
For example, taking a transmission interval (i.e., the present transmission interval) as an example, fig. 3 is a schematic diagram of a transmission interval shown in an exemplary embodiment, and as shown in fig. 3, the end time of the previous transmission interval is the start time of the present transmission interval, and a part of data packets start to be transmitted at and after the start time of the present transmission interval, where the part of data packets have corresponding determination messages returned to the transmitting end, that is, a message indicating that the data packet is successfully received, and the first determination message in the determination messages corresponding to the part of data packets returned to the transmitting end is the above-mentioned predetermined determination message, and the time at which the predetermined determination message is returned to the transmitting end time of the present transmission interval. It should be noted that, other determining messages in the determining messages corresponding to the data packets may be returned to the transmitting end in a certain subsequent transmitting interval, where the transmitting interval does not include other determining messages. The start time of the first transmission section is the time when the first packet starts to be transmitted, and each transmission section is sequentially determined to start backward.
In the partial weak network scenario, the transmitted data packet may not receive the corresponding determination message as expected, so some adjustment needs to be made on the end time of the transmission interval, and the following description is made separately from the scenario where the transmission interval is disordered and the scenario where the corresponding determination message is not returned for a long time:
According to an exemplary embodiment of the present disclosure, in a case where there is an out-of-order phenomenon in any one of a third predetermined number of transmission intervals before the current time, an end time of the transmission interval in which the current time is located is a time at which an nth determination message arrives after a start time of the transmission interval in which the current time is located, where N is an integer greater than 2. According to the embodiment, the transmission interval in which the current moment is located can be ensured to contain enough determination messages, so that the relatively accurate minimum round trip delay can be determined based on the determination messages. Because in the case of disorder, there is a high probability that when the first predetermined determination message in the transmission interval in which the current time exists arrives, no other determination message arrives between the start time of the transmission interval in which the current time exists and the arrival time of the first predetermined determination message, if the arrival time of the first predetermined determination message is taken as the end time of the transmission interval in which the current time exists, only the first predetermined determination message is included in the transmission interval in which the current time exists, and the number of the included determination messages is too small, so that the minimum round trip delay of the transmission interval in which the current time exists cannot be accurately determined.
Specifically, the above out-of-order refers to that the return sequence of the determined message is inconsistent with the transmission sequence of the corresponding data packet, that is, the determined message of the data packet transmitted first is returned after the determined message of the data packet transmitted later is returned first. Since the end time of the transmission interval at the current time is not determined yet, it is difficult to determine whether there is an out-of-order phenomenon, so whether the transmission interval at the current time is out-of-order is determined by whether there is an out-of-order phenomenon in any transmission interval of the third predetermined number of transmission intervals before the current time, that is, whether there is an out-of-order phenomenon in any transmission interval of the third predetermined number of transmission intervals before the current time, and then it is determined that there is an out-of-order phenomenon in the transmission interval at the current time. The above N may be set as needed, and the present disclosure is not limited thereto.
For example, when there is an out-of-order phenomenon in any one of the third predetermined number of transmission intervals before the current time, it is determined that there is also an out-of-order phenomenon in the transmission interval in which the current time is located, at this time, in order to avoid that when the first predetermined determination message arrives in the transmission interval in which the current time is located, no other determination message arrives between the start time of the transmission interval in which the current time is located and the arrival time of the first predetermined determination message, that is, in order to avoid that the number of determination messages contained in the transmission interval in which the current time is located is too small, the end time of the transmission interval in which the current time is located may be not the time when the first predetermined determination message arrives, but the time when the nth determination message arrives in the transmission interval in which the current time is located is regarded as the end time, and the determination message corresponding to the data packet transmitted in the transmission interval in which the current time is located may be the determination message corresponding to the data packet transmitted in the preceding transmission interval, so that the number of determination messages contained in the transmission interval in which the current time is located may be ensured not to be too small.
According to an exemplary embodiment of the present disclosure, when a time difference between a current time and a corresponding end time of a last transmission interval exceeds a third preset threshold, the current time is taken as the end time of the transmission interval where the current time is located. According to this embodiment, if the predetermined determination message in the transmission interval in which the current time is located cannot be received for a long time, waiting for the predetermined determination message always results in a longer duration of the transmission interval in which the current time is located, in this case, the obtained minimum round trip delay is often not the latest minimum round trip delay, and when the arrival time is taken as the end time, the minimum round trip delay of the first time near the end time may be the minimum round trip delay of the last transmission interval, but the duration of the transmission interval in which the current time is located is longer, resulting in a longer time distance corresponding to the used minimum round trip delay from the first time, thereby resulting in inaccuracy of the used minimum round trip delay.
It should be noted that, the round trip delay of the first predetermined determination message in the transmission interval at the current time may be relatively large, but the round trip delay of the data packet transmitted in the next transmission interval or the next data packet is not necessarily large, so if the first predetermined determination message in the transmission interval at the current time is not received for a long time in the transmission interval at the current time, the third preset threshold value is set according toDetermining the end time of the transmission interval where the current time is located, that is, the distance between the start time and the end time of the transmission interval where the current time is located does not exceed a third preset threshold, if the distance exceeds the third preset threshold, continuing to determine the next transmission interval, and the next transmission interval does not continue to receive the first preset determination message in the next transmission interval, so that when the time difference between the current time and the corresponding end time of the last transmission interval exceeds the third preset threshold, taking the current time as the end time of the transmission interval where the current time is located, and the total length of the transmission interval isThereby, the duration of the transmission interval where the current moment is located can be prevented from being excessively long. The third preset threshold may be set as needed, and the disclosure is not limited thereto.
Returning to fig. 2, in step S202, based on the multiple transmission intervals, a short window and a long window corresponding to the current time are determined, where the short window includes a first predetermined number of transmission intervals before the current time, and the long window includes a second predetermined number of transmission intervals before the current time, and the first predetermined number is smaller than the second predetermined number. For example, the first predetermined number and the second predetermined number may be set as needed, and the present disclosure is not limited thereto. For example, assume that the first predetermined number is T short, and the second predetermined numbers are T long,Tshort and T long represent time spans of windows in units of the number of transmission intervals.
Returning to fig. 2, in step S203, a target minimum round trip delay at the current time is selected from the first minimum round trip delay of the short window and the second minimum round trip delay of the long window. The method and the device can count the minimum round trip delay under different windows through different window spans, for example, the minimum round trip delay under two windows are counted in the step, and the minimum round trip delay under the two windows are respectively the first minimum round trip delay of a short windowAnd a second minimum round trip delay for the long windowAnd then selects one of the two minimum round trip delays as the target minimum round trip delay.
According to an exemplary embodiment of the present disclosure, selecting the target minimum round trip delay at the current time from the first minimum round trip delay of the short window and the second minimum round trip delay of the long window may include acquiring related information of a data packet transmitted before the current time, and selecting the target minimum round trip delay at the current time from the first minimum round trip delay of the short window and the second minimum round trip delay of the long window based on the related information. According to the embodiment, through the related information of the data packet transmitted at the current moment, a proper minimum round trip delay can be conveniently selected from the first minimum round trip delay and the second minimum round trip delay as the target minimum round trip delay.
Specifically, the above-mentioned information related to the transmitted data packet is not limited in this disclosure, and may represent the amount of data transmitted within a certain period of time, or may represent other information related to the amount of data, as long as it can help to determine which minimum round trip delay is selected as the target minimum round trip delay.
According to an exemplary embodiment of the present disclosure, selecting a target minimum round trip delay at a current time from a first minimum round trip delay of a short window and a second minimum round trip delay of a long window based on related information may include selecting the first minimum round trip delay as the target minimum round trip delay if the related information satisfies a first preset condition, wherein the first preset condition indicates that an amount of data transmitted within a first predetermined period of time before the current time is less than a first preset value, and selecting the second minimum round trip delay as the target minimum round trip delay if the related information satisfies a second preset condition, wherein the second preset condition indicates that an amount of data transmitted within a second predetermined period of time before the current time is greater than the second preset value. According to the embodiment, the situation of the data amount transmitted before the current time can be conveniently known through the related information, the first preset condition and the second preset condition, so that the situation that a relatively large minimum round trip time delay (first minimum round trip time delay) is adopted or a relatively small minimum round trip time delay (second minimum round trip time delay) is selected can be known, and the problem that the transmission throughput cannot reach the optimum or the link resource occupation capability is weak can be avoided.
For example, a packet may be transmitted in a predetermined transmission interval before the current time to indicate that the amount of data transmitted in the first predetermined time period before the current time is smaller than a first preset value, a round trip delay corresponding to a determination message closest to the current time may be larger than a first preset threshold to indicate that the amount of data transmitted in a second predetermined time before the current time is larger than a second preset value, or a round trip delay corresponding to a determination message closest to the current time may be larger than a second preset threshold and smaller than or equal to the first preset threshold, and the number of transmission intervals between the transmission interval where the second minimum round trip delay is located and the current time is larger than a first preset number to indicate that the amount of data transmitted in the second predetermined time before the current time is larger than a second preset value.
According to the exemplary embodiment of the disclosure, the related information may include a round trip delay corresponding to a determined message closest to a current time, and/or a number of transmission intervals between a transmission interval in which a second minimum round trip delay is located and a transmission interval of the current time, and/or whether an entire interval of an mth transmission interval in front of the current time has a transmission data packet, where M is a positive integer, the first preset condition may indicate that a data amount of transmission within a first preset time period in front of the current time is smaller than a first preset value by any one of a first sub-condition that a part of intervals of the mth transmission interval in front of the current time have a transmission data packet, or a number of transmission intervals between which a second minimum round trip delay is located and the transmission interval of the current time is smaller than M, and/or a second sub-condition that a number of transmission intervals other than the current time interval is a second preset condition and the first sub-condition, and the second preset condition may indicate that a data amount of transmission within the second preset time is larger than the second preset value by any one of the following conditions, the first sub-condition may indicate that the data amount of transmission within the second preset time before the current time is not satisfied is larger than the second preset value, the first round trip delay is smaller than the first preset condition, the number of the round trip delay information is smaller than the first preset condition, and the number of the round trip delay information is smaller than the first preset threshold is smaller than the first preset condition, and the number of the round trip delay is smaller than the first threshold is smaller than the first condition, and the first preset condition is smaller than a threshold value is determined time and the transmission interval is a threshold value.
According to the embodiment, the condition of the data amount transmitted before the current time can be known relatively accurately by determining the round trip delay corresponding to the message closest to the current time, the number of the transmission intervals of the second minimum round trip delay and the current time interval, whether the whole M-th transmission interval before the current time has the transmission data packet or not, and the like, so that the target minimum round trip delay of relatively accurate and matched conditions can be selected.
For example, suppose RTT t is the round trip delay corresponding to the most recent determined message from the current time,For the second smallest round trip delay of the long window, in ms,The first minimum round trip time delay unit for the short window is ms, t is the transmission interval where the current time is located, the unit may be the sequence number of the transmission interval, t app_limited is the transmission interval where the transmission data packet exists in the interval before the current time, that is, the transmission interval where the latest data quantity is insufficient, the unit may be the sequence number of the transmission interval,For the transmission interval in which the second minimum round trip delay of the long window is located, the unit may be a sequence number of the transmission interval, RTT Th1 is a first preset threshold, the unit is ms, RTT Th2 is a second preset threshold, the unit is ms, M is equal to 2, it should be noted that the value of M may be set as required, and not necessarily be 2, this embodiment only uses M equal to 2 as an example for illustration, where the target minimum round trip delay at the current moment may be selected from the first minimum round trip delay of the short window and the second minimum round trip delay of the long window by:
1. If t app_limited +2 is not less than t, or alternatively Then the first minimum round trip delay for the short window is selected
2. If RTT t>RTTTh1, the second smallest round trip delay of the long window is selected
3. If RTT Th1≥RTTt>RTTTh2, andThen select the second smallest round trip delay for the long window
4. In addition to the above, a second minimum round trip delay for the long window is selected
According to the exemplary embodiment of the disclosure, before the target minimum round trip delay at the current time is selected from the first minimum round trip delay of the short window and the second minimum round trip delay of the long window, the minimum round trip delay of each transmission interval in a first preset number of transmission intervals before the current time can be obtained, the first minimum round trip delay of the short window is obtained based on the first preset number of minimum round trip delays, the minimum round trip delay of each transmission interval in the second preset number of transmission intervals before the current time is obtained, and the second minimum round trip delay of the long window is obtained based on the second preset number of minimum round trip delays. According to the embodiment, the minimum round trip delay of each transmission interval is determined first, and then the minimum round trip delay of the corresponding window is determined according to the minimum round trip delay in the minimum round trip delays of the transmission intervals contained in each window, so that the accuracy of the minimum round trip delay of each window can be improved.
Specifically, each window includes a plurality of transmission intervals, for each transmission interval, the round trip delay corresponding to the determined message received in the transmission interval can be counted, so as to determine the minimum round trip delay of the transmission interval, after determining the minimum round trip delay of each transmission interval, the minimum round trip delay of different time spans can be counted according to the window, for example, for a short window, the minimum round trip delay of the minimum round trip delays of the transmission intervals included in the short window can be counted as the minimum round trip delay of the short window.
In step S204, at the current time, a packet is transmitted based on the target minimum round trip delay. Generally, a congestion window is determined through a target minimum round trip delay, and then a data packet is sent according to the determined congestion window, such as a congestion window obtained by 2 times BDP (product of the target minimum round trip delay and the estimated bandwidth) is commonly used, but in a non-jitter scene, a certain excessive congestion is often caused, and a larger queuing delay problem is caused.
According to an exemplary embodiment of the present disclosure, transmitting a data packet based on a target minimum round trip delay at a current time may include multiplying the target minimum round trip delay by an estimated bandwidth to obtain a congestion window, and transmitting the data packet based on the congestion window at the current time. According to the embodiment, the problem that in a non-jitter scene, a congestion window is obtained based on 2 times BDP, so that certain excessive congestion is caused, and larger queuing delay is caused can be avoided.
Specifically, during the execution of the congestion algorithm, the algorithm uses the first preset condition and the second preset condition, selects a target minimum round trip delay to be used, and multiplies the target minimum round trip delay by the estimated bandwidth to obtain a congestion window (Congestion Window, abbreviated as CWND). The congestion algorithm may cause the amount of data in transit to approach the congestion window CWND by any operation, such as an operation to start and stop sending packets. It should be noted that the above-mentioned in-transit data amount refers to the data amount flowing in the network, and the congestion algorithm does not need to limit the in-transit data amount to a value that is absolutely equal to the congestion window CWND in actual operation, but may be controlled within a range, for example, cwnd±α or CWND (1±β), which is not a limitation of the present disclosure.
In summary, the disclosure is equivalent to disclosing a statistics and usage method of minimum round trip delay for a congestion algorithm, specifically, dividing total duration of network transmission into a plurality of independent transmission intervals, generating a minimum round trip delay in each transmission interval, and counting the minimum round trip delay of a plurality of transmission intervals by means of windowing, so as to obtain minimum round trip delay corresponding to a short window and a long window, thereby selecting the minimum round trip delay finally used by the congestion algorithm from the minimum round trip delay corresponding to the two windows.
The sampling means of the long and short-term windows of the present disclosure counts the minimum round trip delay of different time spans and switches between the minimum round trip delay of the two windows according to different conditions, so that different delay results can be adopted in different scenes, therefore, the minimum round trip delay of the present disclosure is not fixed, and is flexibly selected, so that in the network transmission process, not only can the powerful link resource occupation capability be maintained (the minimum round trip delay of the short window is used), but also the lower queuing degree (the minimum round trip delay of the long window is used) can be maintained, and the possibility of network congestion is reduced. Therefore, under complex and changeable network environment, the method and the device can simultaneously meet the requirements under the delayed jitter/non-jitter scene, and improve the network transmission performance.
Fig. 4 is a block diagram illustrating a data transmission apparatus according to an exemplary embodiment. Referring to fig. 4, the apparatus includes a transmission section acquisition unit 40, a window determination unit 42, a selection unit 44, and a transmission unit 46.
A transmission section acquisition unit 40 configured to determine a plurality of transmission sections before a current time, wherein an end time of each transmission section is a time at which a first predetermined determination message arrives in the present transmission section, the predetermined determination message is a determination message indicating that a data packet beginning to be transmitted in the present transmission section was successfully received, a start time of each transmission section is an end time of a corresponding last transmission section, a window determination unit 42 configured to determine a short window and a long window corresponding to the current time based on the plurality of transmission sections, wherein the short window includes a first predetermined number of transmission sections before the current time, the long window includes a second predetermined number of transmission sections before the current time, the first predetermined number is smaller than the second predetermined number, a selection unit 44 configured to select a target minimum round trip delay of the current time from the first minimum round trip delay of the short window and the second minimum round trip delay of the long window, and a transmission unit 46 configured to transmit the data packet based on the target minimum round trip delay at the current time.
The selection unit 44 is further configured to obtain related information of the data packet transmitted before the current time, and to select the target minimum round trip delay at the current time from the first minimum round trip delay of the short window and the second minimum round trip delay of the long window based on the related information, according to an exemplary embodiment of the present disclosure.
According to an exemplary embodiment of the present disclosure, the selecting unit 44 is further configured to select the first minimum round trip delay as the target minimum round trip delay if the related information satisfies a first preset condition, wherein the first preset condition indicates that an amount of data transmitted within a first predetermined period of time before the current time is smaller than a first preset value, and select the second minimum round trip delay as the target minimum round trip delay if the related information satisfies a second preset condition, wherein the second preset condition indicates that an amount of data transmitted within a second predetermined period of time before the current time is larger than a second preset value.
According to the exemplary embodiment of the disclosure, the related information comprises round trip delay corresponding to a determined message closest to a current time, and/or the number of transmission intervals between a transmission interval where a second minimum round trip delay is located and the current time interval, and/or whether an entire interval exists in an Mth transmission interval before the current time, wherein M is a positive integer, the first preset condition indicates that the amount of data transmitted within a first preset time period before the current time is smaller than a first preset value through any one of the following conditions, the first sub-condition indicates that the number of data transmitted within a part of intervals between the Mth transmission interval before the current time is smaller than M, or the number of transmission intervals between the transmission interval where the second minimum round trip delay is located and the transmission interval at the current time is smaller than M, the second sub-condition indicates that the amount of data transmitted within a second preset time before the current time is larger than a second preset value through any one of the following conditions, the number of the round trip delay information is smaller than a first preset value when the related information does not meet the first sub-condition, the number of the round trip delay information is smaller than the first preset threshold, and the number of the round trip delay information is smaller than the first preset threshold is smaller than the first threshold, and the number of round trip delay information is smaller than the first threshold and the number of the round trip delay information is smaller than the first preset condition.
According to an exemplary embodiment of the present disclosure, in a case where there is an out-of-order phenomenon in any one of a third predetermined number of transmission intervals before the current time, an end time of the transmission interval in which the current time is located is a time at which an nth determination message arrives after a start time of the transmission interval in which the current time is located, where N is an integer greater than 2.
According to an exemplary embodiment of the present disclosure, when a time difference between a current time and a corresponding end time of a last transmission interval exceeds a third preset threshold, the current time is taken as the end time of the transmission interval where the current time is located.
According to an exemplary embodiment of the present disclosure, the selecting unit 44 is further configured to obtain a minimum round trip delay of each transmission interval in a first predetermined number of transmission intervals before the current time, and obtain a first minimum round trip delay of the short window based on the first predetermined number of minimum round trip delays, and obtain a minimum round trip delay of each transmission interval in a second predetermined number of transmission intervals before the current time, and obtain a second minimum round trip delay of the long window based on the second predetermined number of minimum round trip delays, before selecting the target minimum round trip delay of the current time from the first minimum round trip delay of the short window and the second minimum round trip delay of the long window.
According to an exemplary embodiment of the present disclosure, the transmission unit 46 is further configured to multiply the target minimum round trip delay with the estimated bandwidth to obtain a congestion window, and to send the data packet based on the congestion window at the current time.
According to embodiments of the present disclosure, an electronic device may be provided. Fig. 5 is a block diagram of an electronic device 500 comprising at least one memory 501 having stored therein a set of computer-executable instructions that, when executed by the at least one processor, perform a data transmission method according to an embodiment of the present disclosure, and at least one processor 502, according to an embodiment of the present disclosure.
By way of example, electronic device 500 may be a PC computer, tablet device, personal digital assistant, smart phone, or other device capable of executing the above-described set of instructions. Here, the electronic device 1000 is not necessarily a single electronic device, but may be any apparatus or a collection of circuits capable of executing the above-described instructions (or instruction sets) individually or in combination. The electronic device 500 may also be part of an integrated control system or system manager, or may be configured as a portable electronic device that interfaces with either locally or remotely (e.g., via wireless transmission).
In electronic device 500, processor 502 may include a Central Processing Unit (CPU), a Graphics Processor (GPU), a programmable logic device, a special purpose processor system, a microcontroller, or a microprocessor. By way of example, and not limitation, processor 502 may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, and the like.
The processor 502 may execute instructions or code stored in a memory, wherein the memory 501 may also store data. The instructions and data may also be transmitted and received over a network via a network interface device, which may employ any known transmission protocol.
The memory 501 may be integrated with the processor 502, for example, RAM or flash memory disposed within an integrated circuit microprocessor or the like. In addition, memory 501 may include a stand-alone device, such as an external disk drive, a storage array, or other storage device usable by any database system. The memory 501 and the processor 502 may be operatively coupled or may communicate with each other, for example, through an I/O port, network connection, etc., such that the processor 502 is able to read files stored in the memory 501.
In addition, the electronic device 500 may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, mouse, touch input device, etc.). All components of the electronic device may be connected to each other via a bus and/or a network.
According to an embodiment of the present disclosure, there may also be provided a computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by at least one processor, cause the at least one processor to perform the data transmission method of the embodiment of the present disclosure. Examples of computer readable storage media herein include read-only memory (ROM), random-access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random-access memory (RAM), dynamic random-access memory (DRAM), static random-access memory (SRAM), flash memory, nonvolatile memory, CD-ROM, CD-R, CD + R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD + R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, blu-ray or optical disk memory, hard Disk Drive (HDD), solid State Disk (SSD), card memory (such as a multimedia card, secure Digital (SD) card or ultra-fast digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, hard disk, solid state disk, and any other device configured to non-temporarily store a computer program and any associated data, data files and data structures and to cause the computer program and any associated data, data file and data structures to be provided to a processor or processor to execute the computer program. The computer programs in the computer readable storage media described above can be run in an environment deployed in a computer device, such as a client, host, proxy device, server, etc., and further, in one example, the computer programs and any associated data, data files, and data structures are distributed across networked computer systems such that the computer programs and any associated data, data files, and data structures are stored, accessed, and executed in a distributed fashion by one or more processors or computers.
According to an embodiment of the present disclosure, there is provided a computer program product comprising computer instructions which, when executed by a processor, implement a data transmission method of an embodiment of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general 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 is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.