CN112087349B - Method, device and system for acquiring retransmission timeout value - Google Patents

Method, device and system for acquiring retransmission timeout value Download PDF

Info

Publication number
CN112087349B
CN112087349B CN202010950382.XA CN202010950382A CN112087349B CN 112087349 B CN112087349 B CN 112087349B CN 202010950382 A CN202010950382 A CN 202010950382A CN 112087349 B CN112087349 B CN 112087349B
Authority
CN
China
Prior art keywords
communication terminal
retransmission timeout
data packet
communication
timeout value
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
CN202010950382.XA
Other languages
Chinese (zh)
Other versions
CN112087349A (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.)
Neolithic Huicheng Beijing Technology Co ltd
Original Assignee
Neolithic Huicheng Beijing 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 Neolithic Huicheng Beijing Technology Co ltd filed Critical Neolithic Huicheng Beijing Technology Co ltd
Priority to CN202010950382.XA priority Critical patent/CN112087349B/en
Publication of CN112087349A publication Critical patent/CN112087349A/en
Application granted granted Critical
Publication of CN112087349B publication Critical patent/CN112087349B/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
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1829Arrangements specially adapted for the receiver end
    • H04L1/1848Time-out mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)
  • Communication Control (AREA)

Abstract

The embodiment of the application provides a method, a device and a system for acquiring a retransmission timeout value, which relate to the technical field of communication, and the method for acquiring the retransmission timeout value comprises the following steps: when the first communication terminal and the second communication terminal communicate, calculating a transmission delay value of a current data packet sent to the second communication terminal by the first communication terminal; calculating an initial retransmission timeout value when the first communication terminal sends the next data packet to the second communication terminal according to the transmission delay value; the method is applied to the automatic driving process of unmanned vehicles (such as automatic driving vehicles, unmanned vehicles and the like), can quickly determine the retransmission timeout value in the normal communication process of two ends (such as automatic driving control devices of the unmanned vehicles and vehicle body equipment of the unmanned vehicles) which are not subjected to time synchronization, effectively avoids the problem of network blockage, and is good in real-time performance and high in accuracy, and further is beneficial to ensuring the communication stability of the two ends which are not subjected to time synchronization.

Description

Method, device and system for acquiring retransmission timeout value
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, and a system for acquiring a retransmission timeout value.
Background
When the two ends are not in communication, the time delay exists when the data arrives at the second communication end from the first communication end, and the validity of the transmitted data is usually determined by the network delay time. In a scenario where frequent data interaction exists at both ends of an unpaired time, for example, during an automatic driving process of an unmanned vehicle, a large amount of frequent data interaction is required for a vehicle body device of the unmanned vehicle and an automatic driving controller of the unmanned vehicle, and it is particularly important to accurately determine a retransmission timeout value in order to ensure normal and stable communication. The existing method for determining the retransmission timeout value is generally to calculate delay by a ping-like command operation, where a first end sends a data packet carrying local time to a second end at intervals (e.g., 2 seconds), and the second end returns an original data packet including a reception time difference immediately after receiving the data packet. After receiving the original data packet returned by the second end, the first end calculates RTT (loop delay value) according to the local time and the receiving time difference, and then calculates corresponding RTO (retransmission timeout value) according to the RTT. However, in practice, it is found that in the existing method for determining the retransmission timeout value, under the condition that data interaction is frequent at two ends, a large number of ping command packets need to be sent for delayed detection, which easily causes network congestion, and the calculation error of the retransmission timeout value is large, thereby affecting the communication stability. It can be seen that the existing method for determining the retransmission timeout value easily causes network congestion, and the determined retransmission timeout value has a large error, thereby affecting the communication stability.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method, an apparatus, and a system for acquiring a retransmission timeout value, which can quickly determine the retransmission timeout value in a normal communication process at two ends when time is not timed, effectively avoid the problem of network congestion, have good real-time performance and high accuracy, and further are beneficial to ensuring communication stability at two ends when time is not timed.
A first aspect of an embodiment of the present application provides a method for acquiring a retransmission timeout value, where the method is applied to a first communication end, and includes:
when the first communication terminal and the second communication terminal communicate, calculating a transmission delay value of a current data packet sent to the second communication terminal by the first communication terminal;
calculating an initial retransmission timeout value when the first communication terminal sends the next data packet to the second communication terminal according to the transmission delay value;
and optimizing the initial retransmission timeout value to obtain the retransmission timeout value of the first communication terminal.
In the implementation process, when the first communication end and the second communication end communicate, the transmission delay value of the current data packet sent to the second communication end by the first communication end is calculated, so that the real-time performance is good, the accuracy is high, and a data packet for detecting the transmission delay value is not required to be specially sent; then, calculating an initial retransmission timeout value when the first communication terminal sends the next data packet to the second communication terminal according to the transmission delay value; and finally, optimizing the initial retransmission timeout value to obtain the retransmission timeout value of the first communication end, thus the method can quickly determine the retransmission timeout value in the normal communication process of the two ends which are not time-tick, effectively avoids the problem of network blockage, has good real-time performance and high accuracy, and is further beneficial to ensuring the communication stability of the two ends which are not time-tick.
Further, when the first communication end and the second communication end communicate with each other, calculating a transmission delay value of a current data packet sent by the first communication end to the second communication end includes:
sending a current data packet including a first sending time to a second communication terminal at the first sending time;
receiving a feedback data packet sent by the second communication terminal aiming at the current data packet at a first receiving moment; the feedback data packet comprises a feedback time difference and the first sending time, wherein the feedback time difference is a time difference between a second receiving time when the second communication terminal receives the current data packet and a second sending time when the second communication terminal sends the feedback data packet;
and calculating the transmission delay value of the current data packet sent by the first communication end to the second communication end according to the first sending time, the feedback time difference and the first receiving time.
In the implementation process, in the normal communication process of the first communication end and the second communication end, each data packet sent by the first communication end is a current data packet, then the first communication end can calculate the current transmission delay value according to the received feedback data packet sent by the second communication end, and the data packet for detecting the transmission delay value does not need to be sent specially, so that the problem of network congestion is effectively avoided, the real-time performance is good, and the accuracy is high.
Further, the calculating an initial retransmission timeout value when the first communication end sends the next data packet to the second communication end according to the transmission delay value includes:
calculating a smooth delay value according to the transmission delay value;
calculating a transmission delay variance according to the smoothing delay value and the transmission delay value;
calculating a smooth delay variance according to the transmission delay variance;
and calculating an initial retransmission timeout value when the first communication terminal sends the next data packet to the second communication terminal according to the smooth delay value and the smooth delay variance.
In the implementation process, the initial retransmission timeout value when the first communication terminal sends the next data packet to the second communication terminal can be estimated through the transmission delay value, so that the initial retransmission timeout value changes according to the change of the transmission delay value, and the communication stability is favorably improved.
Further, the optimizing the initial retransmission timeout value to obtain the retransmission timeout value of the first communication end includes:
determining a target optimization coefficient for optimizing the initial retransmission timeout value;
and optimizing the initial retransmission timeout value according to a preset optimization rule and the target optimization coefficient to obtain the retransmission timeout value of the first communication terminal.
In the implementation process, the initially calculated initial retransmission timeout value is optimized through the target optimization coefficient, so that the initial retransmission timeout value can be more suitable for the current communication scene, and the accuracy of the retransmission timeout value is further improved.
Further, the determining a target optimization coefficient for optimizing the initial retransmission timeout value includes:
determining communication scenes of the first communication terminal and the second communication terminal;
and determining an optimization coefficient matched with the communication scene from a preset optimization coefficient library as a target optimization coefficient.
In the implementation process, the optimization coefficient is determined through the communication scene, so that the optimization coefficient can be more suitable for the current communication scene, and the accuracy of the retransmission timeout value is further improved.
Further, the optimizing the initial retransmission timeout value according to a preset optimization rule and the target optimization coefficient to obtain the retransmission timeout value of the first communication end includes:
carrying out tuning treatment on the target optimization coefficient through a communication filtering technology to obtain an optimal coefficient;
and optimizing the initial retransmission timeout value according to a preset optimization rule and the optimal coefficient to obtain the retransmission timeout value of the first communication terminal.
In the implementation process, after the target optimization coefficient is determined, the target optimization coefficient can be further optimized through a filtering technology, so that the target optimization coefficient can be more suitable for network jitter, and the accuracy of acquiring a retransmission timeout value is improved.
A second aspect of the embodiments of the present application provides an apparatus for obtaining a retransmission timeout value, which is applied to a first communication end, and the apparatus for obtaining a retransmission timeout value includes:
the first calculation unit is used for calculating a transmission delay value of a current data packet sent to the second communication terminal by the first communication terminal when the first communication terminal and the second communication terminal are communicated;
a second calculating unit, configured to calculate an initial retransmission timeout value when the first communication end sends a next data packet to the second communication end according to the transmission delay value;
and the optimization unit is used for optimizing the initial retransmission timeout value to obtain the retransmission timeout value of the first communication terminal.
In the implementation process, when the first communication end and the second communication end communicate, the first calculation unit calculates the transmission delay value of the current data packet sent by the first communication end to the second communication end, so that the real-time performance is good, the accuracy is high, and the data packet for detecting the transmission delay value is not required to be specially sent; then the second calculating unit calculates an initial retransmission timeout value when the first communication terminal sends the next data packet to the second communication terminal according to the transmission delay value; and finally, the optimization unit optimizes the initial retransmission timeout value to obtain the retransmission timeout value of the first communication end, so that the method can quickly determine the retransmission timeout value in the normal communication process of the two ends which are not timed, effectively avoids the problem of network blockage, has good real-time performance and high accuracy, and is further favorable for ensuring the communication stability of the two ends which are not timed.
A third aspect of the embodiments of the present application provides a system for acquiring a retransmission timeout value, where the system for acquiring a retransmission timeout value includes a first communication peer and a second communication peer, where,
the first communication terminal is configured to send a current data packet including a first sending time to the second communication terminal at the first sending time;
the second communication terminal is configured to receive the current data packet at a second receiving time, and send a feedback data packet including a feedback time difference and the first sending time at a second sending time, where the feedback time difference is a time difference between the second receiving time and the second sending time;
the first communication terminal is configured to receive the feedback data packet at a first receiving time; calculating a transmission delay value of a current data packet sent by the first communication terminal to the second communication terminal according to the first sending time, the feedback time difference and the first receiving time; calculating an initial retransmission timeout value when the first communication terminal sends the next data packet to the second communication terminal according to the transmission delay value; and optimizing the initial retransmission timeout value to obtain the retransmission timeout value of the first communication terminal.
In the implementation process, when a first communication end and a second communication end communicate, the first communication end first sends a current data packet to the second communication end at a first sending time, then the second communication end receives the current data packet at a second receiving time, and sends a feedback data packet including a feedback time difference at the second sending time, and then the first communication end receives the feedback data packet at the first receiving time, further, the first communication end can calculate an initial retransmission timeout value when the first communication end sends a next data packet to the second communication end according to the first sending time, the feedback time difference and a transmission delay value of the current data packet at the first receiving time, and the transmission delay value; and finally, optimizing the initial retransmission timeout value to obtain the retransmission timeout value of the first communication end, thus the method can quickly determine the retransmission timeout value in the normal communication process of the two ends which are not time-tick, effectively avoids the problem of network blockage, has good real-time performance and high accuracy, and is further beneficial to ensuring the communication stability of the two ends which are not time-tick.
A fourth aspect of the present embodiment provides an electronic device, including a memory and a processor, where the memory is used to store a computer program, and the processor runs the computer program to make the electronic device execute the method for acquiring a retransmission timeout value according to any one of the first aspect of the present embodiment.
A fifth aspect of the embodiments of the present application provides a computer-readable storage medium, which stores computer program instructions, and when the computer program instructions are read and executed by a processor, the method for obtaining a retransmission timeout value according to any one of the first aspect of the embodiments of the present application is performed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a flowchart illustrating a method for acquiring a retransmission timeout value according to an embodiment of the present disclosure;
fig. 2 is a flowchart illustrating a method for acquiring a retransmission timeout value according to a second embodiment of the present application;
fig. 3 is a schematic structural diagram of an apparatus for acquiring a retransmission timeout value according to a third embodiment of the present application;
fig. 4 is a schematic structural diagram of an apparatus for obtaining a retransmission timeout value according to a fourth embodiment of the present application;
fig. 5 is a schematic diagram of an information interaction flow of a system for acquiring a retransmission timeout value according to a fifth embodiment of the present application;
fig. 6 is a timing diagram of transmitting a data packet when calculating a propagation delay value according to the second embodiment of the present application.
Icon: 600-a first communication terminal, 700-a second communication terminal.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Example 1
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for obtaining a retransmission timeout value according to an embodiment of the present application. The method is applied to a scene that frequent data interaction exists at two ends when time is not timed, and is particularly applied to a scene that a large amount of frequent data interaction is needed by a vehicle body device of an unmanned vehicle and an automatic driving controller of the unmanned vehicle in the automatic driving process of the unmanned vehicle. The method for acquiring the retransmission timeout value comprises the following steps:
s101, when the first communication end and the second communication end communicate, calculating a transmission delay value of a current data packet sent to the second communication end by the first communication end.
In this embodiment, an execution main body of the method is a first communication end, and the first communication end and the second communication end are both communication devices, and when the method is applied to an automatic driving scene of an unmanned vehicle, the first communication end may be an automatic driving control device of the unmanned vehicle (e.g., a cockpit of the unmanned vehicle, etc.), and the second communication end may be a body device of the unmanned vehicle (e.g., a braking device, a braking system, etc. that moves according to the automatic driving control device).
In this embodiment of the present application, the method is mainly applied to a first communication end and a second communication end that are not time-synchronized, and may also be applied to a first communication end and a second communication end that are time-synchronized, which is not limited in this embodiment of the present application.
In this embodiment, the transmission delay value may be represented by RTT, and the transmission delay value RTT described in this embodiment refers to round trip transmission time of data when a data packet is sent from the first communication terminal to the second communication terminal and then immediately returns from the second communication terminal to the first communication terminal. For example, let the first communication end send the destination data packet to the second communication end, after the transmission time of D1, the second communication end receives the destination data packet and sends the feedback data packet for the destination data packet to the first communication end, and after the transmission time of D2, the first communication end receives the feedback data packet, where the transmission delay value RTT in this embodiment is the sum of the times of D1 and D2, that is, the transmission delay value RTT is D1+ D2.
And S102, calculating an initial retransmission timeout value when the first communication terminal sends the next data packet to the second communication terminal according to the transmission delay value.
In the embodiment of the present application, the initial Retransmission Timeout value, i.e., the initial RTO, RTO (Retransmission Timeout), i.e., the Retransmission Timeout time, means that the Retransmission is performed after the time is exceeded from the data transmission time.
In the embodiment of the present application, the relationship between the transmission delay value RTT and the initial RTO is: because each RTT is dynamically changing due to uncertainty in network fluctuations, the initial RTO should also dynamically change with RTT. Therefore, when the first communication end and the second communication end communicate, the RTT value corresponding to the current data packet can be determined, then the initial RTO for sending the next data packet to the second communication end is calculated according to the RTT value, the data packet for delaying detection does not need to be specially sent, the real-time performance is good, the accuracy is high, and the stability of communication at two ends when the time is not timed can be guaranteed.
S103, optimizing the initial retransmission timeout value to obtain the retransmission timeout value of the first communication terminal.
In the embodiment of the present application, after the initial RTO is obtained through calculation, since a general network still has a large repetition rate problem under a severe jitter condition, the initial RTO needs to be optimized, so as to obtain an accurate RTO.
As an alternative implementation, the formula for performing optimization processing on the initial RTO is as follows:
RTO ═ β × initial RTO;
wherein, RTO is a retransmission timeout value, initial RTO is an initial retransmission timeout value, β is an optimization coefficient, and β is a preset coefficient.
In the above embodiment, β < 1.2 > is less than 2.0, a value of β can be preset according to different transmission scenes, and the initial RTO is optimized through β corresponding to different transmission scenes, so that the optimized RTO can better conform to the corresponding transmission scenes, and the flexibility is high, thereby being beneficial to ensuring the communication stability at two ends when time is not timed.
As an optional implementation manner, after obtaining the retransmission timeout value of the first communication end, the following steps may be further included:
the first communication terminal sends the next data packet to the second communication terminal;
judging whether a feedback data packet sent by the second communication end aiming at the next data packet is received or not in the time period of retransmitting the timeout value;
if not, the next data packet is retransmitted to the second communication terminal;
and if so, continuing to send the next new data packet to the second communication terminal.
In the foregoing embodiment, in actual use, in a process that the first communication end sends a next data packet to the second communication end and receives a feedback data packet sent by the second communication end for the next data packet, the first communication end can calculate a new retransmission timeout value through the method for obtaining a retransmission timeout value described in this embodiment, and after sending the next new data packet to the second communication end, determine whether the feedback data packet of the second communication end is received according to the new retransmission timeout value, thereby effectively achieving an effect of quickly determining the retransmission timeout value in a normal communication process of the two ends, and being good in real-time performance and high in accuracy, and further being beneficial to ensuring communication stability between the first communication end and the second communication end.
It can be seen that, by implementing the method for acquiring the retransmission timeout value described in this embodiment, the retransmission timeout value can be quickly determined in the normal communication process of the two ends that are not time-synchronized, the problem of network congestion is effectively avoided, the real-time performance is good, the accuracy is high, and further, the stability of communication at the two ends that are not time-synchronized is favorably ensured.
Example 2
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for obtaining a retransmission timeout value according to an embodiment of the present application. As shown in fig. 2, the method for obtaining the retransmission timeout value includes:
s201, sending the current data packet including the first sending time to the second communication terminal at the first sending time.
S202, receiving a feedback data packet sent by a second communication end aiming at the current data packet at a first receiving moment; the feedback data packet comprises a feedback time difference and a first sending time, and the feedback time difference is a time difference between a second receiving time when the second communication terminal receives the current data packet and a second sending time when the second communication terminal sends the feedback data packet.
Referring to fig. 6, fig. 6 is a timing diagram illustrating a data packet transmission process when calculating a propagation delay value according to an embodiment of the present disclosure. As shown in fig. 6, a is a time reference of the first communication terminal, B is a time reference of the second communication terminal, M1 is that after a time period of M1 elapses on the time reference of a, the first communication terminal sends a current data packet to the second communication terminal, D1 is a transmission delay of the current data packet, specifically, after the time period of D1 elapses after the first communication terminal sends the current data packet at the first sending time, the second communication terminal receives the current data packet at the second receiving time, D2 is a transmission delay of a feedback data packet, specifically, after the second communication terminal sends the feedback data packet at the second sending time and after a time period of D2 elapses, the first communication terminal receives the feedback data packet at the first receiving time.
As shown in fig. 6, if the first sending time of the first communication end sending the current data packet is a + M1, the current data packet includes a + M1, the second receiving time of the second communication end receiving the current data packet is B + M1+ D1, and the second sending time of the second communication end immediately sending the feedback data packet to the first communication end is B + M1+ D1+ M2, it may be calculated:
the feedback time difference is the second transmission time-the second receiving time, B + M1+ D1+ M2- (B + M1+ D1) ═ M2;
the feedback packet includes a + M1 and M2 or the feedback packet includes a + M1+ M2.
S203, calculating a transmission delay value of the current data packet sent by the first communication terminal to the second communication terminal according to the first sending time, the feedback time difference and the first receiving time.
In the embodiment of the present application, a calculation formula for calculating the transmission delay value is as follows:
the transmission delay value RTT is equal to the first receiving time, the first transmitting time, and the feedback time difference.
As shown in fig. 6, assuming that the first sending time is a + M1, the second receiving time is B + M1+ D1, the second sending time is B + M1+ D1+ M2, and the first receiving time is a + M1+ D1+ M2+ D2, the feedback time difference can be calculated to be M2, and the RTT is calculated as follows:
the transmission delay value RTT is equal to the first receiving time, the first transmitting time, and the feedback time difference is equal to a + M1+ D1+ M2+ D2- (a + M1) -M2 is equal to D1+ D2.
In the embodiment of the present application, by implementing the steps S201 to S203, when the first communication terminal and the second communication terminal perform communication, the transmission delay value of the current packet transmitted from the first communication terminal to the second communication terminal can be calculated.
After step S203, the following steps are also included:
and S204, calculating a smooth delay value according to the transmission delay value.
In the embodiment of the present application, the smoothing delay value may be represented by SRTT (smoothed Round Trip time), which refers to "smoothed RTT, and a new RTT needs to be calculated every time transmission is performed, and SRTT is adjustment for smoothing RTT.
In the embodiment of the present application, the calculation formula of the smooth delay value SRTT is as follows:
SRTT=(α*SRTT’)+(1-α)RTT;
wherein, RTT is a transmission delay value corresponding to the current data packet, SRTT is a smooth delay value, SRTT' is a smooth delay value of the previous data packet, and α is a coefficient.
In the embodiment of the present application, the coefficient α may be preset to 0.8, and the embodiment of the present application is not limited thereto.
And S205, calculating the transmission delay variance according to the smooth delay value and the transmission delay value.
In the embodiment of the present application, a calculation formula of the transmission delay variance RTT _ VAR is as follows:
RTT_VAR=|SRTT–RTT|;
wherein, SRTT is a smooth delay value, and RTT is a transmission delay value.
After step S205, the following steps are also included:
s206, calculating the smooth delay variance according to the transmission delay variance.
In the embodiment of the present application, the calculation formula of the smooth delay variance SRTT _ VAR is as follows:
SRTT_VAR=(α*SRTT_VAR’)+(1-α)RTT_VAR;
SRTT_VAR’=|SRTT’–RTT|;
the SRTT _ VAR is a smooth delay variance, the RTT _ VAR is a transmission delay variance, α is a coefficient, the RTT is a transmission delay value corresponding to a current data packet, and SRTT' is a smooth delay value of a previous data packet.
In the embodiment of the present application, the coefficient α may be preset to 0.8, and the embodiment of the present application is not limited thereto.
And S207, calculating an initial retransmission timeout value when the first communication terminal sends the next data packet to the second communication terminal according to the smooth delay value and the smooth delay variance.
In the embodiment of the present application, the calculation formula of the initial RTO is as follows:
initial RTO ═ SRTT + SRTT _ VAR;
wherein SRTT is the smoothed delay value and SRTT _ VAR is the smoothed delay variance.
In the embodiment of the present application, by implementing the steps S204 to S207, an initial retransmission timeout value when the first communication end transmits the next packet to the second communication end can be calculated according to the transmission delay value.
After step S207, the following steps are also included:
and S208, determining the communication scenes of the first communication end and the second communication end.
In the embodiment of the present application, the communication scenario may be preset, or a corresponding communication scenario may be determined according to a communication location, a communication environment, and the like, which is not limited in the embodiment of the present application.
S209, determining an optimization coefficient matched with the communication scene from a preset optimization coefficient library as a target optimization coefficient.
In this embodiment of the present application, the preset optimization coefficient library includes a plurality of communication scenarios, an optimization coefficient corresponding to each communication scenario, and the like, which is not limited in this embodiment of the present application.
In the embodiment of the present application, the target optimization coefficient for optimizing the initial retransmission timeout value can be determined by performing the above steps S208 to S209.
And S210, carrying out tuning treatment on the target optimization coefficient through a communication filtering technology to obtain an optimal coefficient.
In the embodiment of the application, before the target optimization coefficient is subjected to tuning processing, the determined target optimization coefficient is a fixed value, and actually, when the network shakes violently, the convergence capacity is poor, so that the target optimization coefficient is tuned in a filtering mode to be rapidly converged, and then the most suitable coefficient, namely the optimal coefficient, can be obtained, and the calculation accuracy of the retransmission timeout value can be improved.
In the embodiment of the present application, the communication filtering technology may specifically adopt a standard kalman filtering technology, and the embodiment of the present application is not limited thereto.
And S211, optimizing the initial retransmission timeout value according to a preset optimization rule and an optimal coefficient to obtain a retransmission timeout value of the first communication terminal.
In the embodiment of the present application, by implementing the steps S210 to S211, the initial retransmission timeout value can be optimized according to a preset optimization rule and a target optimization coefficient, so as to obtain the retransmission timeout value of the first communication end.
In the embodiment of the present application, by performing the above steps S208 to S211, the initial retransmission timeout value can be optimized to obtain the retransmission timeout value of the first communication terminal.
It can be seen that, by implementing the method for acquiring the retransmission timeout value described in this embodiment, the retransmission timeout value can be quickly determined in the normal communication process of the two ends that are not time-synchronized, the problem of network congestion is effectively avoided, the real-time performance is good, the accuracy is high, and further, the stability of communication at the two ends that are not time-synchronized is favorably ensured.
Example 3
Referring to fig. 3, fig. 3 is a schematic structural diagram of an apparatus for obtaining a retransmission timeout value according to an embodiment of the present application. As shown in fig. 3, the apparatus for obtaining the retransmission timeout value includes:
the first calculating unit 300 is configured to calculate a transmission delay value of a current data packet sent by the first communication end to the second communication end when the first communication end and the second communication end perform communication.
The second calculating unit 400 is configured to calculate an initial retransmission timeout value when the first communication end sends the next data packet to the second communication end according to the transmission delay value.
The optimizing unit 500 is configured to perform optimization processing on the initial retransmission timeout value to obtain a retransmission timeout value of the first communication end.
In the embodiment of the present application, for explanation of an apparatus for acquiring a retransmission timeout value, reference may be made to the description in embodiment 1 or embodiment 2, and details of this embodiment are not repeated.
It can be seen that, implement the acquisition device of retransmission timeout value that this embodiment described, can confirm retransmission timeout value fast at the time tick both ends normal communication in-process not, effectively avoided the problem of network congestion, the real-time is good, and the degree of accuracy is high, and then is favorable to guaranteeing time tick both ends communication stability.
Example 4
Referring to fig. 4, fig. 4 is a schematic structural diagram of an apparatus for acquiring a retransmission timeout value according to an embodiment of the present disclosure. The apparatus for acquiring the retransmission timeout value shown in fig. 4 is optimized by the apparatus for acquiring the retransmission timeout value shown in fig. 3. As shown in fig. 4, the first calculation unit 300 includes:
a sending subunit 310, configured to send, to the second communication end at the first sending time, a current data packet including the first sending time.
A receiving subunit 320, configured to receive, at a first receiving time, a feedback data packet sent by the second communication end for the current data packet; the feedback data packet comprises a feedback time difference and a first sending time, and the feedback time difference is a time difference between a second receiving time when the second communication terminal receives the current data packet and a second sending time when the second communication terminal sends the feedback data packet.
The first calculating subunit 330 is configured to calculate, according to the first sending time, the feedback time difference, and the first receiving time, a transmission delay value of the current data packet sent by the first communication end to the second communication end.
As an alternative embodiment, the second computing unit 400 includes:
a second calculating subunit 410, configured to calculate a smoothing delay value according to the transmission delay value.
A third calculating subunit 420, configured to calculate a transmission delay variance according to the smoothing delay value and the transmission delay value; and calculating a smoothed delay variance from the transmission delay variance.
A fourth calculating subunit 430, configured to calculate an initial retransmission timeout value when the first communication end sends the next data packet to the second communication end according to the smooth delay value and the smooth delay variance.
As an alternative embodiment, the optimization unit 500 includes:
a coefficient determining subunit 510 is configured to determine a target optimization coefficient for performing optimization processing on the initial retransmission timeout value.
The optimizing subunit 520 is configured to perform optimization processing on the initial retransmission timeout value according to a preset optimization rule and a target optimization coefficient, so as to obtain a retransmission timeout value of the first communication end.
As a further optional embodiment, the coefficient determining subunit 510 includes:
the scene determining module 511 is configured to determine a communication scene of the first communication end and the second communication end.
And a coefficient determining module 512, configured to determine an optimization coefficient matched with the communication scene from a preset optimization coefficient library, as a target optimization coefficient.
As a further alternative embodiment, the optimization subunit 520 includes:
and the tuning module 521 is configured to perform tuning processing on the target optimization coefficient through a communication filtering technology to obtain an optimal coefficient.
The optimizing module 522 is configured to perform optimization processing on the initial retransmission timeout value according to a preset optimization rule and an optimal coefficient, so as to obtain a retransmission timeout value of the first communication end.
In the embodiment of the present application, for explanation of an apparatus for acquiring a retransmission timeout value, reference may be made to the description in embodiment 1 or embodiment 2, and details of this embodiment are not repeated.
It can be seen that, implement the acquisition device of retransmission timeout value that this embodiment described, can confirm retransmission timeout value fast at the time tick both ends normal communication in-process not, effectively avoided the problem of network congestion, the real-time is good, and the degree of accuracy is high, and then is favorable to guaranteeing time tick both ends communication stability.
Example 5
Referring to fig. 5, fig. 5 is a schematic diagram illustrating an information interaction flow of a system for acquiring a retransmission timeout value according to an embodiment of the present application. As shown in fig. 5, the system for acquiring the retransmission timeout value includes a first communication end 600 and a second communication end 700.
S801, the first communication terminal 600 sends the current data packet including the first sending time to the second communication terminal 700 at the first sending time.
S802, the second communication terminal 700 receives the current data packet at the second receiving time.
S803, the second communication terminal 700 sends a feedback data packet including a feedback time difference and the first sending time at the second sending time, where the feedback time difference is a time difference between the second receiving time and the second sending time.
S804, the first communication terminal 600 receives the feedback data packet at the first receiving time.
S805, the first communication terminal 600 calculates a transmission delay value of the current data packet sent by the first communication terminal 600 to the second communication terminal 700 according to the first sending time, the feedback time difference, and the first receiving time.
S806, the first communication terminal 600 calculates an initial retransmission timeout value when the first communication terminal 600 sends the next data packet to the second communication terminal 700 according to the transmission delay value.
S807, the first communication end 600 performs optimization processing on the initial retransmission timeout value to obtain the retransmission timeout value of the first communication end 600.
In the embodiment of the present application, for explanation of a system for acquiring a retransmission timeout value, reference may be made to the description in embodiment 1 or embodiment 2, and details of this embodiment are not repeated.
It can be seen that, implementing the system for acquiring the retransmission timeout value described in this embodiment can quickly determine the retransmission timeout value in the normal communication process of the two ends when time is not timed, effectively avoids the problem of network congestion, and is good in real-time performance and high in accuracy, thereby being beneficial to ensuring the stability of communication of the two ends when time is not timed.
An embodiment of the present application provides an electronic device, including a memory and a processor, where the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute a method for acquiring a retransmission timeout value in any one of embodiment 1 or embodiment 2 of the present application.
An embodiment of the present application provides a computer-readable storage medium, which stores computer program instructions, and when the computer program instructions are read and executed by a processor, the computer program instructions execute a method for acquiring a retransmission timeout value according to any one of embodiment 1 or embodiment 2 of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (9)

1. A method for acquiring a retransmission timeout value, the method being applied to a first communication terminal, the method comprising:
when the first communication terminal and the second communication terminal communicate, calculating a transmission delay value of a current data packet sent to the second communication terminal by the first communication terminal;
calculating an initial retransmission timeout value when the first communication terminal sends the next data packet to the second communication terminal according to the transmission delay value;
optimizing the initial retransmission timeout value to obtain a retransmission timeout value of the first communication terminal;
wherein, the calculating an initial retransmission timeout value when the first communication terminal sends the next data packet to the second communication terminal according to the transmission delay value includes:
calculating a smooth delay value according to the transmission delay value;
calculating a transmission delay variance according to the smoothing delay value and the transmission delay value;
calculating a smooth delay variance according to the transmission delay variance;
and calculating an initial retransmission timeout value when the first communication terminal sends the next data packet to the second communication terminal according to the smooth delay value and the smooth delay variance.
2. The method according to claim 1, wherein the calculating a transmission delay value of a current packet sent by the first communication peer to the second communication peer when the first communication peer communicates with the second communication peer includes:
sending a current data packet including a first sending time to a second communication terminal at the first sending time;
receiving a feedback data packet sent by the second communication terminal aiming at the current data packet at a first receiving moment; the feedback data packet comprises a feedback time difference and the first sending time, wherein the feedback time difference is a time difference between a second receiving time when the second communication terminal receives the current data packet and a second sending time when the second communication terminal sends the feedback data packet;
and calculating the transmission delay value of the current data packet sent by the first communication end to the second communication end according to the first sending time, the feedback time difference and the first receiving time.
3. The method according to any one of claims 1 to 2, wherein the optimizing the initial retransmission timeout value to obtain the retransmission timeout value of the first communication end includes:
determining a target optimization coefficient for optimizing the initial retransmission timeout value;
and optimizing the initial retransmission timeout value according to a preset optimization rule and the target optimization coefficient to obtain the retransmission timeout value of the first communication terminal.
4. The method according to claim 3, wherein the determining a target optimization coefficient for optimizing the initial retransmission timeout value comprises:
determining communication scenes of the first communication terminal and the second communication terminal;
and determining an optimization coefficient matched with the communication scene from a preset optimization coefficient library as a target optimization coefficient.
5. The method according to claim 3, wherein the optimizing the initial retransmission timeout value according to a preset optimization rule and the target optimization coefficient to obtain the retransmission timeout value of the first communication end comprises:
carrying out tuning treatment on the target optimization coefficient through a communication filtering technology to obtain an optimal coefficient;
and optimizing the initial retransmission timeout value according to a preset optimization rule and the optimal coefficient to obtain the retransmission timeout value of the first communication terminal.
6. An apparatus for obtaining a retransmission timeout value, applied to a first communication terminal, the apparatus comprising:
the first calculation unit is used for calculating a transmission delay value of a current data packet sent to the second communication terminal by the first communication terminal when the first communication terminal and the second communication terminal are communicated;
a second calculating unit, configured to calculate an initial retransmission timeout value when the first communication end sends a next data packet to the second communication end according to the transmission delay value;
the optimization unit is used for optimizing the initial retransmission timeout value to obtain a retransmission timeout value of the first communication terminal;
wherein the second calculation unit includes:
a second calculating subunit, configured to calculate a smooth delay value according to the transmission delay value;
a third calculating subunit, configured to calculate a transmission delay variance according to the smoothed delay value and the transmission delay value; and calculating a smooth delay variance from the transmission delay variance;
and the fourth calculating subunit is configured to calculate an initial retransmission timeout value when the first communication end sends the next data packet to the second communication end according to the smooth delay value and the smooth delay variance.
7. A system for acquiring a retransmission timeout value, the system comprising a first communication terminal and a second communication terminal, wherein,
the first communication terminal is configured to send a current data packet including a first sending time to the second communication terminal at the first sending time;
the second communication terminal is configured to receive the current data packet at a second receiving time, and send a feedback data packet including a feedback time difference and the first sending time at a second sending time, where the feedback time difference is a time difference between the second receiving time and the second sending time;
the first communication terminal is configured to receive the feedback data packet at a first receiving time; calculating a transmission delay value of a current data packet sent by the first communication terminal to the second communication terminal according to the first sending time, the feedback time difference and the first receiving time; calculating an initial retransmission timeout value when the first communication terminal sends the next data packet to the second communication terminal according to the transmission delay value; optimizing the initial retransmission timeout value to obtain a retransmission timeout value of the first communication terminal;
wherein, the first communication end is configured to calculate an initial retransmission timeout value when the first communication end sends a next data packet to the second communication end according to the transmission delay value, and includes:
the first communication terminal is used for calculating a smooth delay value according to the transmission delay value;
the first communication terminal is configured to calculate a transmission delay variance according to the smoothing delay value and the transmission delay value;
the first communication terminal is used for calculating a smooth delay variance according to the transmission delay variance;
the first communication terminal is configured to calculate an initial retransmission timeout value when the first communication terminal sends a next data packet to the second communication terminal according to the smooth delay value and the smooth delay variance.
8. An electronic device, comprising a memory for storing a computer program and a processor for executing the computer program to make the electronic device execute the method for acquiring the retransmission timeout value according to any one of claims 1 to 5.
9. A readable storage medium, wherein computer program instructions are stored in the readable storage medium, and when the computer program instructions are read and executed by a processor, the computer program instructions execute the method for obtaining retransmission timeout values according to any one of claims 1 to 5.
CN202010950382.XA 2020-09-10 2020-09-10 Method, device and system for acquiring retransmission timeout value Active CN112087349B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010950382.XA CN112087349B (en) 2020-09-10 2020-09-10 Method, device and system for acquiring retransmission timeout value

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010950382.XA CN112087349B (en) 2020-09-10 2020-09-10 Method, device and system for acquiring retransmission timeout value

Publications (2)

Publication Number Publication Date
CN112087349A CN112087349A (en) 2020-12-15
CN112087349B true CN112087349B (en) 2022-01-18

Family

ID=73737424

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010950382.XA Active CN112087349B (en) 2020-09-10 2020-09-10 Method, device and system for acquiring retransmission timeout value

Country Status (1)

Country Link
CN (1) CN112087349B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112887063B (en) * 2021-01-19 2023-04-07 网易(杭州)网络有限公司 Data packet transmission method and device, storage medium and electronic equipment
CN113612589B (en) * 2021-08-18 2023-09-26 百果园技术(新加坡)有限公司 Method, device, equipment and storage medium for retransmitting data

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7180871B1 (en) * 2001-07-18 2007-02-20 Nortel Networks Limited Round trip timeout adjustment in a cellular wireless communication system
CN101159522A (en) * 2007-11-26 2008-04-09 北京北方烽火科技有限公司 Method of dynamically regulating retransmission time delay of MAC layer in WIMAX system
CN103095434B (en) * 2011-10-27 2018-02-02 山东金佳园科技股份有限公司 A kind of data retransmission control method and device, terminal device
CN103200621A (en) * 2013-03-14 2013-07-10 南京理工大学 Self-adaptation flow control method suitable for wireless projection system real-time data transmission
CN103401665B (en) * 2013-06-28 2016-12-28 国家超级计算深圳中心(深圳云计算中心) The optimization method and device of retransmission timeout timer in cluster storage system
CN110752912A (en) * 2019-11-05 2020-02-04 上海汉邦京泰数码技术有限公司 Data transmission method based on low-delay encryption

Also Published As

Publication number Publication date
CN112087349A (en) 2020-12-15

Similar Documents

Publication Publication Date Title
US9872198B2 (en) Systems and methods for data transmission
CN112087349B (en) Method, device and system for acquiring retransmission timeout value
US10129123B2 (en) Measurement apparatus, communications apparatus, and relay apparatus
US10594568B2 (en) Method and apparatus for measuring a data transmission speed, device and computer readable medium
KR20070085208A (en) Method and apparatus for network congestion control using queue control and one-way delay measurements
CN113014505B (en) Transmission control method for time delay differentiation in high dynamic topology satellite network
JP2006254383A (en) Communication control system and method
CN102469028B (en) Apparatus and method for ensuring fairness of UDP data transmission in Ethernet environment
US20190007427A1 (en) Device and method for detecting attack in network
US10263760B2 (en) Method for time synchronization
US9544211B2 (en) Measuring apparatus and method
CN114531210B (en) Data retransmission method, device, electronic equipment and storage medium
CN107634817B (en) Method and device for data transmission
JP5387058B2 (en) Transmission device, transmission rate calculation method, and transmission rate calculation program
CN104780117A (en) Network congestion information obtaining method and device
US10003470B2 (en) Method and terminal for transmitting and receiving data
CN115002005B (en) Packet loss rate calculation method, device, equipment and storage medium
KR100859908B1 (en) Method for tcp congestion control using constant congestion state sensing
JP5169441B2 (en) Network quality measurement system, network quality measurement method, and network quality measurement program
CN113612589A (en) Data retransmission method, device, equipment and storage medium
CN113691882B (en) Method, device, equipment and storage medium for judging network condition
US9882751B2 (en) Communication system, communication controller, communication control method, and medium
CN111416802B (en) TCP-based data processing method and device, electronic equipment and readable medium
CN117914750B (en) Data processing method, apparatus, computer, storage medium, and program product
CN114221896B (en) BGP route oscillation suppression method and device

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