CN115396066A - Data packet retransmission method, device, equipment and storage medium - Google Patents

Data packet retransmission method, device, equipment and storage medium Download PDF

Info

Publication number
CN115396066A
CN115396066A CN202211001027.3A CN202211001027A CN115396066A CN 115396066 A CN115396066 A CN 115396066A CN 202211001027 A CN202211001027 A CN 202211001027A CN 115396066 A CN115396066 A CN 115396066A
Authority
CN
China
Prior art keywords
sequence number
data packet
packet
receiving time
time threshold
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.)
Pending
Application number
CN202211001027.3A
Other languages
Chinese (zh)
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.)
You Peninsula Beijing Information Technology Co ltd
Original Assignee
You Peninsula Beijing Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by You Peninsula Beijing Information Technology Co ltd filed Critical You Peninsula Beijing Information Technology Co ltd
Priority to CN202211001027.3A priority Critical patent/CN115396066A/en
Publication of CN115396066A publication Critical patent/CN115396066A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/1607Details of the supervisory signal
    • H04L1/1671Details of the supervisory signal the supervisory signal being transmitted together with control information
    • H04L1/1678Details of the supervisory signal the supervisory signal being transmitted together with control information where the control information is for timing, e.g. time stamps

Landscapes

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

Abstract

The embodiment of the application discloses a data packet retransmission method, a device, equipment and a storage medium, wherein the method comprises the following steps: adding a sequence number corresponding to the received data packet to a sequence number cache queue; traversing the sequence number cache queue at intervals of preset time, if the receiving time of the data packet corresponding to the traversed sequence number is less than or equal to a receiving time threshold, continuing traversing to determine the sequence number of the packet to be retransmitted, wherein the receiving time threshold is obtained based on standard deviation estimation of one-way transmission delay of the data packet; and if the receiving time of the data packet corresponding to the traversed sequence number is greater than the receiving time threshold, stopping traversing, and sending the determined sequence number of the packet to be retransmitted to opposite-end equipment so as to retransmit the corresponding data packet. According to the scheme, on the premise of not introducing excessive calculation amount, the invalid retransmission rate of the transmission link is obviously reduced, and the bandwidth and power expenses are saved.

Description

Data packet retransmission method, device, equipment and storage medium
Technical Field
The present application relates to the field of data transmission technologies, and in particular, to a method, an apparatus, a device, and a storage medium for retransmitting a data packet.
Background
In an unstable network environment, a sending end needs to judge whether a data packet sent by the sending end successfully reaches a receiving end or not based on response information returned by the receiving end, and if the sending end determines that the data packet is not normally received, retransmission operation is performed, that is, the corresponding data packet is sent again, so that the data packet can be completely sent to the receiving end.
In the related technology, a receiving end regularly sequences received data packets based on packet sequence numbers and checks the continuity of the sequence numbers, if the sequence numbers are found to be discontinuous, the corresponding data packets are considered to be lost, the receiving end packs all the lost packet sequence numbers found by checking into a feedback packet and returns the feedback packet to the sending end, and the sending end retransmits the data packets corresponding to the packet sequence numbers after receiving the feedback packet. In an actual scenario, there may be jitter in the one-way transmission delay from the sending end to the receiving end, which causes the sequence of the actual data packets arriving at the receiving end to be different from the sequence sent by the sending end. Meanwhile, when the receiving end periodically checks the continuity of the data packets, the data packets which have not arrived yet may be judged to be lost packets, so that the feedback packets carry the packet sequence numbers of the packets to be received, and the transmitting end retransmits the packets after receiving the feedback packets, so that invalid retransmission occurs. Excessive inefficient retransmissions can result in additional bandwidth and power consumption being occupied, requiring improvement.
Disclosure of Invention
The embodiment of the application provides a data packet retransmission method, a data packet retransmission device, data packet retransmission equipment and a storage medium, the data packet retransmission mechanism is optimized, the applicability is strong, the invalid retransmission rate of a transmission link is obviously reduced on the premise of not introducing excessive calculation amount, and the bandwidth and power expenditure is saved.
In a first aspect, an embodiment of the present application provides a data packet retransmission method, where the method includes:
adding a sequence number corresponding to the received data packet to a sequence number cache queue;
traversing the sequence number cache queue at intervals of preset time, if the receiving time of the data packet corresponding to the traversed sequence number is less than or equal to a receiving time threshold, continuing traversing to determine the sequence number of the packet to be retransmitted, wherein the receiving time threshold is obtained based on standard deviation estimation of one-way transmission delay of the data packet;
and if the receiving time of the data packet corresponding to the traversed sequence number is greater than the receiving time threshold, stopping traversing, and sending the determined sequence number of the packet to be retransmitted to opposite-end equipment so as to retransmit the corresponding data packet.
In a second aspect, an embodiment of the present application further provides a data packet retransmission apparatus, including:
the characteristic information acquisition module is configured to acquire characteristic information of a video to be coded, wherein the characteristic information comprises preprocessing information and inherent characteristic information of the video to be coded;
the coding parameter determining module is configured to extract video features recorded in the feature information, input the video features and a set target score value into a pre-trained machine learning model and output video coding parameters;
the video coding module is configured to perform a coding data adding module on the video to be coded based on the video coding parameters, and is configured to add the sequence number corresponding to the received data packet to a sequence number cache queue;
the queue traversing module is configured to traverse the sequence number cache queue at preset time intervals, if the receiving time of the data packet corresponding to the traversed sequence number is less than or equal to a receiving time threshold, the traversing is continued to determine the sequence number of the packet to be retransmitted, the receiving time threshold is estimated based on the standard deviation of the one-way transmission delay of the data packet, and if the receiving time of the data packet corresponding to the traversed sequence number is greater than the receiving time threshold, the traversing is stopped;
and the data sending module is configured to send the determined sequence number of the packet to be retransmitted to the opposite terminal equipment so as to retransmit the corresponding data packet.
In a third aspect, an embodiment of the present application further provides a data packet retransmission device, where the device includes:
one or more processors;
a storage device to store one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the method for retransmitting the data packet according to the embodiment of the present application.
In a fourth aspect, embodiments of the present application further provide a storage medium storing computer-executable instructions, which are used to execute the data packet retransmission method according to the embodiments of the present application when executed by a computer processor.
In a fifth aspect, the present application further provides a computer program product, where the computer program product includes a computer program, where the computer program is stored in a computer-readable storage medium, and at least one processor of the device reads from the computer-readable storage medium and executes the computer program, so that the device executes the data packet retransmission method described in the present application.
In the embodiment of the application, sequence numbers corresponding to received data packets are added to a sequence number cache queue, the sequence number cache queue is traversed at preset intervals, if the receiving time of the data packets corresponding to the traversed sequence numbers is smaller than or equal to a receiving time threshold value, the traversal is continued to determine the sequence numbers of the packets to be retransmitted, the receiving time threshold value is obtained based on standard deviation estimation of one-way transmission delay of the data packets, if the receiving time of the data packets corresponding to the traversed sequence numbers is larger than the time threshold value, the traversal is stopped, and the determined sequence numbers of the packets to be retransmitted are sent to opposite-end equipment so as to retransmit the corresponding data packets.
Drawings
Fig. 1 is a flowchart of a data packet retransmission method according to an embodiment of the present application;
fig. 2 is a schematic diagram of sequence numbers stored in a sequence number cache queue according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a method for determining a receiving time threshold according to an embodiment of the present application;
fig. 4 is a schematic diagram of a probability density distribution of arrival times of data packets according to an embodiment of the present invention;
fig. 5 is a flowchart of another method for determining a receive time threshold according to an embodiment of the present application;
fig. 6 is a flowchart of another method for determining a receive time threshold according to an embodiment of the present application;
fig. 7 is a block diagram of a data packet retransmission apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a data packet retransmission apparatus according to an embodiment of the present application.
Detailed Description
The embodiments of the present application will be described in further detail with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad embodiments of the present application. It should be further noted that, for convenience of description, only some structures related to the embodiments of the present application are shown in the drawings, not all of the structures are shown.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application are capable of operation in sequences other than those illustrated or described herein, and that the terms "first," "second," etc. are generally used in a generic sense and do not limit the number of terms, e.g., a first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
Fig. 1 is a flowchart of a data packet retransmission method provided in an embodiment of the present application, which can be implemented at a data receiving end, and is used to confirm a data packet to be retransmitted and correspondingly notify a data sending end to perform retransmission sending, where the method can be executed by a computing device such as a server, an intelligent terminal, a notebook, a tablet computer, and specifically includes the following steps:
and step S101, adding the sequence number corresponding to the received data packet to a sequence number cache queue.
The received data packet is a data packet sent by an opposite device, such as a data sending device. Wherein, each data packet has a different sequence number. Optionally, the sequence number may be a sequence number of the data packet itself, that is, a sequence number of a sequential number of the data packet when the data packet is transmitted. Or, after receiving the data packet, the receiving end may reflect the sequential relationship of the data packet according to the sequence number allocated by the data packet identifier. For example, if a data sending end sends 100 data packets, the corresponding sequence number of the data packet may be represented as sequence number 1, sequence number 2.
The sequence number buffer queue is a created queue for buffering the sequence number of the data packet, and after the data packet is received, the corresponding sequence number is added to the sequence number buffer queue so as to be used for determining the data packet to be retransmitted in the subsequent pass.
In one embodiment, to avoid adding the sequence number of the received retransmitted data packet to the sequence number cache queue twice, when the sequence number corresponding to the received data packet is added to the sequence number cache queue, it is further determined whether the data packet is a duplicate data packet, and if the data packet is not a duplicate data packet, the sequence number corresponding to the data packet is added to the sequence number cache queue.
And step S102, traversing the sequence number buffer queue at preset time intervals, and if the receiving time of the data packet corresponding to the traversed sequence number is less than or equal to a receiving time threshold, continuing traversing to determine the sequence number of the packet to be retransmitted, wherein the receiving time threshold is obtained based on standard deviation estimation of one-way transmission delay of the data packet.
The preset time is a set triggering time interval for traversing the sequence number buffer queue, and may be 10 milliseconds as an example. In the process of traversing, traversing is started from the first data of the sequence number buffer queue. And when each element, namely the stored sequence number, is traversed, comparing the receiving time of the data packet corresponding to the sequence number with a receiving time threshold, and if the receiving time of the data packet corresponding to the traversed sequence number is less than or equal to the receiving time threshold, continuing traversing to determine the sequence number of the packet to be retransmitted, wherein the receiving time threshold is estimated based on the standard deviation of the one-way transmission delay of the data packet. The one-way transmission delay of the data packet is a time interval from the data sending end to the data receiving end in the transmission process of the data packet, and optionally, the one-way transmission delay of the data packet can be recorded as a difference value between a timestamp of the data packet sent by the data sending end and a timestamp of the data packet received by the data receiving end. The standard deviation is used as a measuring basis on the statistical distribution degree in probability statistics and reflects the discrete degree of the data set.
In one embodiment, the traversal is performed, and if the receiving time of the data packet corresponding to the traversed sequence number is less than or equal to the receiving time threshold, the traversal is continued to determine the sequence of the packet to be retransmitted. Optionally, when determining the sequence number of the packet to be retransmitted, under the condition that the sent data packet is a sequential number, the discontinuous sequence numbers in the sequence number buffer queue are determined as the sequence numbers of the packet to be retransmitted. For example, as shown in fig. 2, fig. 2 is a schematic diagram of sequence numbers stored in a sequence number buffer queue according to an embodiment of the present application, and when the sequence number buffer queue is traversed, it is found that discontinuous sequence numbers, that is, a data packet sequence number n +1 and a data packet sequence number n +3, do not exist, that is, corresponding data packets are missing, and the data packet sequence number n +1 and the data packet sequence number n +3 are determined as sequence numbers of packets to be retransmitted.
Step S103, if the receiving time of the data packet corresponding to the traversed sequence number is greater than the receiving time threshold, stopping traversing, and sending the determined sequence number of the packet to be retransmitted to opposite-end equipment so as to retransmit the corresponding data packet.
In one embodiment, if the receiving time of the data packet corresponding to the traversed sequence number is greater than the receiving time threshold, the traversal is stopped, and the sequence number of the packet to be retransmitted determined in the traversal process is sent to the opposite terminal device, so as to retransmit the corresponding data packet. In the data transmission process, a data packet sent by a data sending end may not be received by a data receiving end due to delay due to jitter of a transmission link, but may be received after a certain time, and at this time, if the data receiving end feeds back that the data packet needs to be retransmitted, invalid retransmission of the transmission link is caused, which wastes bandwidth and requires additional processing overhead.
According to the scheme, sequence numbers corresponding to received data packets are added to a sequence number cache queue, the sequence number cache queue is traversed at intervals of preset time, if the receiving time of the data packets corresponding to the traversed sequence numbers is smaller than or equal to a receiving time threshold value, the traversal is continued to determine the sequence numbers of the packets to be retransmitted, the receiving time threshold value is obtained based on standard deviation estimation of one-way transmission delay of the data packets, if the receiving time of the data packets corresponding to the traversed sequence numbers is larger than the time threshold value, the traversal is stopped, and the determined sequence numbers of the packets to be retransmitted are sent to opposite-end equipment to retransmit the corresponding data packets. In the calculation process of the receiving time threshold, the time threshold is estimated according to the standard deviation of the one-way transmission delay of the data packet, so that the time threshold can accurately reflect the link transmission condition, and the judgment of whether to continue traversing is conveniently and reasonably made.
Fig. 3 is a flowchart of a method for determining a receiving time threshold according to an embodiment of the present application, and as shown in fig. 3, the method specifically includes:
step S201, adding a sequence number corresponding to the received data packet to a sequence number buffer queue.
Step S202, determining the one-way transmission delay of a plurality of received data packets at intervals of preset sampling time, modeling based on the size of the one-way transmission delay to obtain Gaussian distribution, and determining a receiving time threshold according to the standard deviation of the Gaussian distribution.
In one embodiment, the one-way transmission delay (exemplarily denoted as t) for transmitting data from the transmitting end to the receiving end in a short time s2r ) Is modeled as a Gaussian distribution T s2r ~N(μ s2r2 ) The degree of instability of the transmission time is measured by the standard deviation σ of the gaussian distribution. The short time, i.e. the preset sampling time, may be 200ms, which may be set to other values according to actual needs.
Specifically, for the data packet with the serial number n received by each receiving end, the current timestamp of the receiving end is used to subtract the sending timestamp of the sending end in the data packet to obtain the unidirectional transmission reference sampling time of the data packet
Figure BDA0003807370910000061
Since the sender and receiver timestamps are not aligned in most scenarios, the sample values
Figure BDA0003807370910000062
Corresponding to the expectation of distributionOften not equal to the expected value mu of the actual distribution s2r But clock misalignment has only an effect on the expectations,
Figure BDA0003807370910000063
variance of corresponding distribution and variance σ of actual distribution 2 Are equal. Therefore, the above sampling is performed on the N packets that are received by the receiving end most recently, and the reference standard deviation can be calculated as follows:
Figure BDA0003807370910000064
Figure BDA0003807370910000065
where m is the latest arriving packet sequence number. During hypothetical sampling period mu s2r Mean value of N sampling points on the premise of no change
Figure BDA0003807370910000066
Variance of the corresponding distribution is
Figure BDA0003807370910000067
Then
Figure BDA0003807370910000068
Obey variance of
Figure BDA0003807370910000069
Is normally distributed, and then is estimated
Figure BDA00038073709100000610
It can be known from the formula that the larger N in a short time is, the closer the standard deviation obtained by calculation is to the true value. However, if N is too large, t will occur s2r Under the condition that the distribution has changed greatly, in the actual deployment scene, the transmission link in nearly 200ms is considered to be stable, so the preset sampling time is 200ms, and the actual value of N can be combined with the actual valueAnd calculating the frequency of the hair packet and the preset sampling value.
Wherein, due to t s2r Obeying Gaussian distribution, with P (t) s2r ) Represents t s2r The corresponding probability density function. At the current time t, the probability that the data packet n which should originally reach the receiving end at the time t has arrived is 50%, that is to say, the probability is
Figure BDA0003807370910000071
Then for this time at t n Data packet with sequence number n (t) arriving at time n <) The probability of the packet arriving at the receiving end is:
Figure BDA0003807370910000072
for example, as shown in fig. 4, fig. 4 is a schematic diagram of probability density distribution of arrival time of a data packet according to an embodiment of the present invention. When t is n +σ<The probability that packet n has arrived is greater than 84.13%; when t is n +2σ<The probability that packet n has arrived is greater than 97.72%; according to the probability density of normal distribution, corresponding to t n +3σ<Has an arrival probability of 99.86%; corresponds to t n +4σ<The arrival probability of (a) is 99.99%. Therefore, based on a reliable standard deviation σ estimation, the probability of whether the packet should arrive can be efficiently evaluated.
Therefore, during the subsequent traverse of the sequence number buffer queue, if the corresponding receiving time of the traversed data packet is less than or equal to
Figure BDA0003807370910000073
(receiving time threshold), continuously traversing to determine the sequence number of the packet to be retransmitted; if the receiving time of the data packet corresponding to the traversed sequence number is more than
Figure BDA0003807370910000074
Stopping traversing and sending the determined sequence number of the packet to be retransmitted to opposite terminal equipment. Wherein, alpha is a tolerance coefficient, can be reasonably adjusted according to a service scene, has higher real-time requirement or is a networkIn a scenario with better conditions, α may be set to a smaller value, such as 0.2, 0.5, etc.; for scenarios with low real-time requirements, high delay tolerance, or poor network conditions, α may be set to a large value, such as 2, 3, etc.
Step S203, traversing the sequence number buffer queue, if the receiving time of the data packet corresponding to the traversed sequence number is less than or equal to the receiving time threshold, continuing traversing to determine the sequence number of the packet to be retransmitted, wherein the receiving time threshold is estimated based on the standard deviation of the one-way transmission delay of the data packet.
And step S204, if the receiving time of the data packet corresponding to the traversed sequence number is greater than the receiving time threshold, stopping traversing, and sending the determined sequence number of the packet to be retransmitted to opposite-end equipment so as to retransmit the corresponding data packet.
Therefore, the problem of invalid retransmission of the transmission link caused by network jitter can be accurately avoided, and the network bandwidth resource is saved. In the existing design scheme, calculation is directly carried out based on the arrival time of actual adjacent packets, the probability that the order of the corresponding data packets is disordered is not actually calculated from the angle of the probability, and the specific values are biased to be empirical rather than theoretical.
Fig. 5 is a flowchart of another method for determining a receiving time threshold according to an embodiment of the present application, and as shown in fig. 5, the method specifically includes:
step S301, adding the sequence number corresponding to the received data packet to a sequence number buffer queue.
Step S302, determining the one-way transmission delay of a plurality of received data packets at intervals of preset sampling time, and estimating the standard deviation of the one-way transmission delay through adaptive weight filtering to obtain a receiving time threshold.
To further reduce the amount of computation, in one embodiment, the receive time threshold is estimated by adaptive weight filtering on the standard deviation of the one-way transmission delay.
When standard deviation estimation is carried out, a first probability that a sample of the unidirectional transmission delay is in a preset interval range is determined according to a positive-too distribution function, a second probability that the sample of the unidirectional transmission delay with the largest deviation value is in the preset interval range and a third probability outside the preset interval range are determined according to the first probability, and the standard deviation of the unidirectional transmission delay is estimated by taking the second probability and the third probability as filtering weights to obtain a receiving time threshold.
Specifically, from the positive distribution, the one-way transmission delay sample is within the range of the preset interval [ mu ] s2r -bσ,μ s2r +bσ]Has a first probability of P b In which P is 1 =68.27%,P 2 =95.45%,P 3 =99.73%,P 4 =99.99%. For N samples sampled each time, the sample with the largest deviation value is within the range [ mu ] of the preset interval s2r -bσ,μ s2r +bσ]The second probability of being (P) b ) N On the contrary, the third probability outside the predetermined interval range is 1- (P) b ) N . Optionally, the probability of the sample in the interval is used as a reference of the filter weight, and the value of b σ is subjected to filter estimation. By using
Figure BDA0003807370910000081
It is indicated that the result of the filtering,
Figure BDA0003807370910000082
for the sampled value, when t =0 is sampled for the first time,
Figure BDA0003807370910000083
when t >0
Figure BDA0003807370910000084
The value of b is selected according to the size of N, if N is larger, the sample is reliable, a larger value of b can be taken, and the filtering result is relatively accurate; if N is small, the sample error is large, a small value of b may be taken,the filtering result has a relatively large error. Exemplary values are N =50,b =3, when P is present b =99.73%, corresponding to filtering weights of 0.8736 and 0.1264, respectively.
Step S303, traversing the sequence number buffer queue, if the receiving time of the data packet corresponding to the traversed sequence number is less than or equal to the receiving time threshold, continuing traversing to determine the sequence number of the packet to be retransmitted, wherein the receiving time threshold is estimated based on the standard deviation of the one-way transmission delay of the data packet.
Step S304, if the receiving time of the data packet corresponding to the traversed sequence number is larger than the receiving time threshold, stopping traversing, and sending the determined sequence number of the packet to be retransmitted to opposite terminal equipment for retransmitting the corresponding data packet.
Therefore, compared with the traditional standard deviation calculation, the method for obtaining the receiving time threshold by estimating the standard deviation of the one-way transmission delay through the adaptive weight filtering does not need redundant power and evolution calculation, and can realize the estimation of b sigma and sigma with smaller complexity. The values of the actual N and b can be further selected according to the actual service scene. Compared with a standard deviation calculation method, the scheme has deployment advantages.
In one embodiment, when adding a sequence number corresponding to a received data packet to a sequence number buffer queue, the method includes: and under the condition that the received data packet is not a repeated data packet, sequentially adding the sequence numbers corresponding to the data packet to a sequence number cache queue in sequence, wherein the sequence number is the sequence number of the data packet in a network application layer, so that retransmission adaptation of the application layer is realized through queue addition of the sequence numbers of the data packet in the application layer.
Fig. 6 is a flowchart of another method for determining a receiving time threshold according to an embodiment of the present application, and a specific method for performing sequence number traversal to determine a sequence number of a packet to be retransmitted is provided, as shown in fig. 6, the method specifically includes:
step S401, sequentially adding the sequence numbers corresponding to the data packets to the sequence number cache queue in sequence when the received data packet is not a duplicate data packet.
Step S402, determining a sequence number traversal range every preset time, sequentially traversing the sequence numbers in the sequence number cache queue in the sequence number traversal range, if the sequence numbers are continuous in the sequence number traversal range, deleting the sequence numbers in the traversed sequence number traversal range, and performing next round of traversal until the sequence numbers in the sequence number cache queue are completely traversed.
In one embodiment, a further determined sequence number traversal range is performed during traversal, if the set range is 100 sequence numbers traversed, traversal is performed from the first sequence number i to i +100, if the traversal result of this time is a continuous sequence number, sequence numbers in the traversed sequence number traversal range are deleted in the sequence number buffer queue, and the next round of traversal is performed until the sequence numbers in the sequence number buffer queue are completely traversed.
Step S403, in the traversal process, if the receiving time of the data packet corresponding to the traversed sequence number is less than or equal to the receiving time threshold, continuing the traversal, and if there is a discontinuous data packet sequence number in the traversal process, adding the discontinuous data packet sequence number to the feedback packet buffer.
In an embodiment, taking the example that the packet sequence numbers are sequentially added to the sequence number buffer queue according to the receiving condition, if a discontinuous packet sequence number exists in the traversal process, the discontinuous packet sequence number is added to the feedback packet buffer for being uniformly sent to the opposite end for retransmission later.
In an embodiment, when adding the feedback packet buffer, the method further includes determining the retransmission times of the data packets corresponding to the discontinuous data packet sequence number, if the retransmission times is greater than the maximum retransmission times, adding no feedback packet buffer, and if the addition condition is met, adding 1 to the recorded retransmission times. Optionally, the adding condition may be that the retransmission time is less than or equal to the maximum retransmission time, and the retransmission time from the last time is greater than the preset retransmission time, if the retransmission is the first retransmission, the retransmission is directly added to the feedback packet cache, and if the sequence number is added to the feedback packet cache, after the data is sent to the data sending end, another data sending end performs retransmission of the corresponding data packet based on the sequence number.
Step S404, in the traversing process, if the receiving time of the data packet corresponding to the traversed sequence number is larger than the receiving time threshold, the traversing is stopped, and the discontinuous data packet sequence number recorded in the feedback packet buffer is sent to the opposite terminal equipment so as to retransmit the corresponding data packet.
Therefore, by the above method for determining retransmission data, the number of the data packet to be retransmitted can be accurately determined under the condition that the data packet sequence number is out of order due to the delay of the sending end or the receiving end, and the situations of bandwidth waste and power consumption increase caused by invalid retransmission are avoided.
Fig. 7 is a block diagram of a structure of a data packet retransmission apparatus according to an embodiment of the present application, where the apparatus is configured to execute the data packet retransmission method according to the foregoing embodiment, and has corresponding functional modules and beneficial effects of the execution method. As shown in fig. 7, the apparatus specifically includes: a data adding module 101, a queue traversing module 102, and a data sending module 103, wherein,
the data adding module 101 is configured to add a sequence number corresponding to the received data packet to a sequence number cache queue;
the queue traversing module 102 is configured to traverse the sequence number buffer queue at preset time intervals, and if the receiving time of a data packet corresponding to a traversed sequence number is less than or equal to a receiving time threshold, continue traversing to determine a sequence number of a packet to be retransmitted, where the receiving time threshold is estimated based on a standard deviation of one-way transmission delay of the data packet, and if the receiving time of the data packet corresponding to the traversed sequence number is greater than the receiving time threshold, stop traversing;
the data sending module 103 is configured to send the determined sequence number of the packet to be retransmitted to the peer device, so as to retransmit the corresponding data packet.
According to the scheme, the sequence number corresponding to the received data packet is added to the sequence number cache queue; traversing the sequence number cache queue at preset time intervals, if the receiving time of the data packet corresponding to the traversed sequence number is less than or equal to a receiving time threshold, continuing traversing to determine the sequence number of the packet to be retransmitted, wherein the receiving time threshold is obtained based on standard deviation estimation of one-way transmission delay of the data packet; and if the receiving time of the data packet corresponding to the traversed sequence number is greater than the receiving time threshold, stopping traversing, and sending the determined sequence number of the packet to be retransmitted to opposite-end equipment so as to retransmit the corresponding data packet. According to the scheme, on the premise of not introducing excessive calculation amount, the invalid retransmission rate of the transmission link is obviously reduced, and the bandwidth and power expenses are saved.
In one possible embodiment, the apparatus further comprises a threshold determination module configured to:
determining the one-way transmission delay of a plurality of received data packets at intervals of preset sampling time;
and modeling based on the size of the one-way transmission delay to obtain Gaussian distribution, and determining a receiving time threshold according to the standard deviation of the Gaussian distribution.
In one possible embodiment, the apparatus further comprises a threshold determination module configured to:
determining the one-way transmission delay of a plurality of received data packets at intervals of preset sampling time;
and estimating the standard deviation of the one-way transmission delay through self-adaptive weight filtering to obtain a receiving time threshold.
In one possible embodiment, the threshold determination module is configured to:
determining a first probability that the sample of the one-way transmission delay is in a preset interval range according to the positive-Taiwan distribution function;
determining a second probability that the sample with the maximum deviation value of the unidirectional transmission delay is within the preset interval range and a third probability that the sample is outside the preset interval range according to the first probability;
and estimating the standard deviation of the one-way transmission delay by taking the second probability and the third probability as filtering weights to obtain a receiving time threshold.
In a possible embodiment, the data adding module 102 is configured to:
and under the condition that the received data packets are not repeated data packets, sequentially adding the sequence numbers corresponding to the data packets to a sequence number cache queue in sequence, wherein the sequence numbers comprise the sequence numbers of the data packets in a network application layer.
In one possible embodiment, the queue traversing module 102 is configured to:
determining a sequence number traversal range, and sequentially traversing the sequence numbers in the sequence number cache queue in the sequence number traversal range;
and if the sequence numbers in the sequence number traversal range are continuous sequence numbers, deleting the sequence numbers in the traversed sequence number traversal range, and performing next round of traversal until the sequence numbers in the sequence number cache queue are completely traversed.
In one possible embodiment, the queue traversing module 102 is configured to:
if a discontinuous data packet serial number exists in the traversal process, adding the discontinuous data packet serial number to a feedback packet cache;
the data sending module 103 is configured to:
and sending the discontinuous data packet sequence number recorded in the feedback packet cache to the opposite terminal equipment.
Fig. 8 is a schematic structural diagram of a data packet retransmission apparatus according to an embodiment of the present application, and as shown in fig. 8, the apparatus includes a processor 201, a memory 202, an input device 203, and an output device 204; the number of the processors 201 in the device may be one or more, and one processor 201 is taken as an example in fig. 8; the processor 201, the memory 202, the input device 203 and the output device 204 in the apparatus may be connected by a bus or other means, and fig. 8 illustrates the connection by a bus as an example. The memory 202 is used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the packet retransmission method in the embodiments of the present application. The processor 201 executes various functional applications of the device and data processing by executing software programs, instructions and modules stored in the memory 202, that is, implements the above-described packet retransmission method. The input device 203 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function controls of the apparatus. The output device 204 may include a display device such as a display screen.
The present invention also provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for retransmitting a data packet described in the foregoing embodiment, where the method includes:
adding a sequence number corresponding to the received data packet to a sequence number cache queue;
traversing the sequence number cache queue at preset time intervals, if the receiving time of the data packet corresponding to the traversed sequence number is less than or equal to a receiving time threshold, continuing traversing to determine the sequence number of the packet to be retransmitted, wherein the receiving time threshold is obtained based on standard deviation estimation of one-way transmission delay of the data packet;
and if the receiving time of the data packet corresponding to the traversed sequence number is greater than the receiving time threshold, stopping traversing, and sending the determined sequence number of the packet to be retransmitted to opposite-end equipment so as to retransmit the corresponding data packet.
It should be noted that, in the embodiment of the data packet retransmission apparatus, each unit and each module included in the data packet retransmission apparatus are only divided according to functional logic, but are not limited to the above division, as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiments of the present application.
In some possible embodiments, various aspects of the methods provided by the present application may also be implemented in the form of a program product including program code for causing a computer device to perform the steps of the methods according to various exemplary embodiments of the present application described above in this specification when the program product is run on the computer device, for example, the computer device may perform the packet retransmission method described in the embodiments of the present application. The program product may be implemented using any combination of one or more readable media.

Claims (11)

1. A method for retransmitting a data packet, comprising:
adding a sequence number corresponding to the received data packet to a sequence number cache queue;
traversing the sequence number cache queue at intervals of preset time, if the receiving time of the data packet corresponding to the traversed sequence number is less than or equal to a receiving time threshold, continuing traversing to determine the sequence number of the packet to be retransmitted, wherein the receiving time threshold is obtained based on standard deviation estimation of one-way transmission delay of the data packet;
and if the receiving time of the data packet corresponding to the traversed sequence number is greater than the receiving time threshold, stopping traversing, and sending the determined sequence number of the packet to be retransmitted to opposite-end equipment so as to retransmit the corresponding data packet.
2. The method for retransmitting data packets according to claim 1, wherein the method for retransmitting data packets further comprises:
determining the one-way transmission delay of a plurality of received data packets at intervals of preset sampling time;
and modeling based on the size of the one-way transmission delay to obtain Gaussian distribution, and determining a receiving time threshold according to the standard deviation of the Gaussian distribution.
3. The method for retransmitting data packets according to claim 1, wherein the method for retransmitting data packets further comprises:
determining the one-way transmission delay of a plurality of received data packets at intervals of preset sampling time;
and estimating the standard deviation of the one-way transmission delay through self-adaptive weight filtering to obtain a receiving time threshold.
4. The method of claim 3, wherein the estimating the standard deviation of the one-way transmission delay through adaptive weight filtering to obtain the receiving time threshold comprises:
determining a first probability that the sample of the one-way transmission delay is in a preset interval range according to the positive-too distribution function;
determining a second probability that the sample with the maximum deviation value of the unidirectional transmission delay is within the preset interval range and a third probability outside the preset interval range according to the first probability;
and estimating the standard deviation of the one-way transmission delay by taking the second probability and the third probability as filtering weights to obtain a receiving time threshold.
5. The method according to any one of claims 1 to 4, wherein the adding the sequence number corresponding to the received packet to the sequence number buffer queue includes:
and under the condition that the received data packets are not repeated data packets, sequentially adding the sequence numbers corresponding to the data packets to a sequence number cache queue in sequence, wherein the sequence numbers comprise the sequence numbers of the data packets in a network application layer.
6. The method of claim 5, wherein traversing the sequence number buffer queue comprises:
determining a sequence number traversal range, and sequentially traversing the sequence numbers in the sequence number cache queue in the sequence number traversal range;
and if the sequence numbers are continuous sequence numbers in the sequence number traversal range, deleting the sequence numbers in the traversed sequence number traversal range, and performing next traversal until the sequence numbers in the sequence number cache queue are completely traversed.
7. The method for retransmitting the data packet according to claim 6, wherein the determining the sequence number of the packet to be retransmitted comprises:
if a discontinuous data packet sequence number exists in the traversal process, adding the discontinuous data packet sequence number into a feedback packet buffer;
correspondingly, the sending the determined sequence number of the packet to be retransmitted to the peer device includes:
and sending the discontinuous data packet serial numbers recorded in the feedback packet cache to opposite-end equipment.
8. A packet retransmission apparatus, comprising:
the data adding module is configured to add the sequence number corresponding to the received data packet to a sequence number cache queue;
the queue traversing module is configured to traverse the sequence number cache queue at preset time intervals, if the receiving time of the data packet corresponding to the traversed sequence number is less than or equal to a receiving time threshold, the traversing is continued to determine the sequence number of the packet to be retransmitted, the receiving time threshold is obtained based on standard deviation estimation of one-way transmission delay of the data packet, and if the receiving time of the data packet corresponding to the traversed sequence number is greater than the receiving time threshold, the traversing is stopped;
and the data sending module is configured to send the determined sequence number of the packet to be retransmitted to the opposite terminal equipment so as to retransmit the corresponding data packet.
9. A data packet retransmission apparatus, the apparatus comprising: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method of data packet retransmission according to any one of claims 1-7.
10. A storage medium storing computer executable instructions for performing the method of data packet retransmission of any one of claims 1-7 when executed by a computer processor.
11. A computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the method for retransmission of data packets according to any of claims 1-7.
CN202211001027.3A 2022-08-19 2022-08-19 Data packet retransmission method, device, equipment and storage medium Pending CN115396066A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211001027.3A CN115396066A (en) 2022-08-19 2022-08-19 Data packet retransmission method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211001027.3A CN115396066A (en) 2022-08-19 2022-08-19 Data packet retransmission method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115396066A true CN115396066A (en) 2022-11-25

Family

ID=84120125

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211001027.3A Pending CN115396066A (en) 2022-08-19 2022-08-19 Data packet retransmission method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115396066A (en)

Similar Documents

Publication Publication Date Title
US6622172B1 (en) Dynamically delayed acknowledgement transmission system
Garetto et al. Modeling, simulation and measurements of queuing delay under long-tail internet traffic
EP3468132A1 (en) Method and device for transmitting speech data
CN101217429A (en) A determination method of the initiation relationship within TCP messages based on TCP timestamp options
CN114039703B (en) Data transmission method, device, equipment and medium
CN109525376B (en) Fast retransmission method and device and terminal equipment
CN103607302A (en) Fault information report method, monitoring equipment and management equipment
CN113300817B (en) Data transmission method and device
CN114401224B (en) Data current limiting method and device, electronic equipment and storage medium
Casetti et al. An analytical framework for the performance evaluation of TCP Reno connections
CN114531210A (en) Data retransmission method and device, electronic equipment and storage medium
CN110855510A (en) Data transmission optimization method, device, equipment and medium
CN115396066A (en) Data packet retransmission method, device, equipment and storage medium
CN111314961A (en) TCP transmission method, device and system
CN113300971B (en) Data processing system and method
CN112230880B (en) Data transmission control method and device, FPGA and medium
US9882751B2 (en) Communication system, communication controller, communication control method, and medium
CN114650260A (en) Network packet loss type identification method and device and electronic equipment
CN114615637A (en) High-information timeliness data transmission method based on two-stage polling
CN113763660B (en) Multi-master network system and communication method
CN115001630B (en) Data transmission method, device, equipment and storage medium
US11863451B2 (en) Hardware accelerated temporal congestion signals
CN113141319B (en) Message processing method, device, electronic equipment and storage medium
CN118300757A (en) Acknowledgement message transmission method, device, apparatus, storage medium and program product
CN117135125A (en) Message processing method, system, equipment and medium in network delay state

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