Packet Retransmission Method, Apparatus, Device, and Storage Medium
By establishing a sequence number cache queue at the data receiving end and estimating the reception time threshold based on the standard deviation of the one-way transmission delay, the packet retransmission mechanism is optimized, and the invalid retransmission problem is solved, which significantly saves bandwidth and power.
Patent Information
- Application Number
- CN202211001027.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-19
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-08-19
AI Technical Summary
In an unstable network environment, packets may be invalid retransmission due to unidirectional transmission delay jitter, resulting in additional bandwidth and power consumption.
By adding the received packet number to the sequence number cache queue, the queue is traversed at a preset time. If the packet reception time is less than or equal to the reception time threshold (estimated based on the standard deviation of one-way transmission delay), the traversal will continue to determine the packet number to be retransmitted; if the reception time exceeds the threshold, the traversal will be stopped and the packet number to be retransmitted will be sent for retransmission.
It significantly reduces the invalid retransmission rate of the transmission link, saves bandwidth and power overhead, and improves the efficiency of data transmission.
Smart Images

Figure CN115396066B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of data transmission, and in particular, to a method, apparatus, device, and storage medium for retransmitting data packets. Background Art
[0002] In an unstable network environment, the sending end needs to determine whether the data packets sent by itself have successfully reached the receiving end based on the response information returned by the receiving end. If the sending end believes that the data packets have not been normally received, a retransmission operation will be performed, that is, the corresponding data packets will be sent again to ensure that the data packets can be completely delivered to the receiving end.
[0003] In the related art, the receiving end regularly sorts the received data packets based on the packet sequence numbers and checks the continuity of the sequence numbers. If it is found that the sequence numbers are not continuous, it is considered that the corresponding data packets are lost. The receiving end will pack all the lost packet sequence numbers found in the check into a feedback packet and return it to the sending end. After receiving the feedback packet, the sending end will retransmit the data packets corresponding to the packet sequence numbers therein. In an actual scenario, there may be jitter in the one-way transmission delay from the sending end to the receiving end, resulting in the actual order of the data packets reaching the receiving end being different from the order sent by the sending end. At the same time, when the receiving end regularly checks the continuity of the data packets, it may judge the data packets that have not yet arrived as lost packets, resulting in the feedback packet carrying the sequence numbers of the packets that will be received soon. After receiving the feedback packet, the sending end will retransmit the packet again, resulting in an ineffective retransmission. Excessive ineffective retransmissions will cause additional bandwidth and power consumption, which needs to be improved. Summary of the Invention
[0004] The embodiments of the present application provide a method, apparatus, device, and storage medium for retransmitting data packets, which optimize the data packet retransmission mechanism, have strong applicability, and significantly reduce the ineffective retransmission rate of the transmission link and save bandwidth and power consumption without introducing too much computational complexity.
[0005] In a first aspect, the embodiments of the present application provide a method for retransmitting data packets, the method comprising:
[0006] Adding the sequence number corresponding to the received data packet to a sequence number cache queue;
[0007] Traversing the sequence number cache queue every preset time. If the reception time of the data packet corresponding to the traversed sequence number is less than or equal to a reception time threshold, continue traversing to determine the sequence number of the packet to be retransmitted, where the reception time threshold is estimated based on the standard deviation of the one-way transmission delay of the data packet;
[0008] If the reception time of the data packet corresponding to the traversed sequence number is greater than the reception time threshold, stop traversing and send the determined sequence number of the packet to be retransmitted to the peer device for retransmission of the corresponding data packet.
[0009] In a second aspect, an embodiment of the present application further provides a data packet retransmission device, including:
[0010] A feature information acquisition module configured to acquire feature information of a video to be encoded, where the feature information includes preprocessing information of the video to be encoded and video inherent feature information;
[0011] An encoding parameter determination module configured to extract video features recorded in the feature information, and input the video features and a set target score value into a pre-trained machine learning model to output video encoding parameters;
[0012] A video encoding module configured to encode the video to be encoded based on the video encoding parameters. A data addition module configured to add the sequence number corresponding to the received data packet to the sequence number cache queue;
[0013] A queue traversal module configured to traverse the sequence number cache queue at a preset time interval. If the reception time of the data packet corresponding to the traversed sequence number is less than or equal to the reception time threshold, continue traversing to determine the sequence number of the packet to be retransmitted. The reception time threshold is estimated based on the standard deviation of the one-way transmission delay of the data packet. If the reception time of the data packet corresponding to the traversed sequence number is greater than the reception time threshold, stop traversing;
[0014] A data sending module configured to send the determined sequence number of the packet to be retransmitted to the peer device for retransmission of the corresponding data packet.
[0015] In a third aspect, an embodiment of the present application further provides a data packet retransmission device, which includes:
[0016] One or more processors;
[0017] A storage device for storing one or more programs,
[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the data packet retransmission method described in the embodiments of the present application.
[0019] In a fourth aspect, an embodiment of the present application further provides a storage medium storing computer-executable instructions, and the computer-executable instructions are used to execute the data packet retransmission method described in the embodiments of the present application when executed by a computer processor.
[0020] In a fifth aspect, an embodiment of the present application further provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor of the device reads and executes the computer program from the computer-readable storage medium, so that the device executes the data packet retransmission method described in the embodiments of the present application.
[0021] In the embodiments of the present application, by adding the sequence number corresponding to the received data packet to the sequence number cache queue, the sequence number cache queue is traversed every preset time. If the reception time of the data packet corresponding to the traversed sequence number is less than or equal to the reception time threshold, continue to traverse to determine the sequence number of the packet to be retransmitted. The reception time threshold is estimated based on the standard deviation of the one-way transmission delay of the data packet. If the reception time of the data packet corresponding to the traversed sequence number is greater than the time threshold, stop traversing, and send the determined sequence number of the packet to be retransmitted to the peer device for retransmission of the corresponding data packet. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a flowchart of a data packet retransmission method provided by an embodiment of the present application;
[0023] Figure 2 It is a schematic diagram of the sequence numbers stored in the sequence number cache queue provided by an embodiment of the present application;
[0024] Figure 3 It is a flowchart of a method for determining a reception time threshold provided by an embodiment of the present application;
[0025] Figure 4 It is a schematic diagram of the probability density distribution of the data packet arrival time provided by an embodiment of the present invention;
[0026] Figure 5 It is a flowchart of another method for determining a reception time threshold provided by an embodiment of the present application;
[0027] Figure 6 It is a flowchart of another method for determining a reception time threshold provided by an embodiment of the present application;
[0028] Figure 7 It is a structural block diagram of a data packet retransmission device provided by an embodiment of the present application;
[0029] Figure 8 It is a schematic structural diagram of a data packet retransmission device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0030] The following further elaborates on the embodiments of the present application in conjunction with the accompanying drawings and examples. It can be understood that the specific embodiments described herein are merely for explaining the embodiments of the present application, rather than limiting the embodiments of the present application. Additionally, it should be noted that for ease of description, only parts related to the embodiments of the present application are shown in the accompanying drawings, rather than all structures.
[0031] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein. Moreover, the objects distinguished by "first", "second", etc. are generally of the same type, and do not limit the number of objects. For example, the first object can be one or multiple. In addition, "and / or" in the specification and claims indicates at least one of the connected objects. The character " / ", generally represents an "or" relationship between the associated objects before and after.
[0032] Figure 1 The figure is a flowchart of a data packet retransmission method provided for the embodiments of the present application, which can run on the data receiving end to confirm the data packets that need to be retransmitted and notify the data sending end to perform retransmission accordingly. This method can be executed by computing devices such as servers, smart terminals, laptops, tablets, etc., and specifically includes the following steps:
[0033] Step S101: Add the sequence number corresponding to the received data packet to the sequence number cache queue.
[0034] Among them, the received data packet is a data packet sent by a peer device such as a data sending device. Each data packet corresponds to a different sequence number. Optionally, the sequence number can be the sequence number carried by the data packet itself, that is, the sequence number numbered in order when the data packet is sent. Or, after the receiving end receives the data packet, the sequence number is assigned according to the data packet identifier, and the data packet identifier can reflect the sequence relationship of the data packets. Exemplarily, if the data sending end sends 100 data packets, the corresponding data packet sequence numbers can be represented as sequence number 1, sequence number 2,..., sequence number 100.
[0035] Among them, the sequence number cache queue is a created queue for caching the sequence numbers of data packets. After receiving a data packet, the corresponding sequence number is added to the sequence number cache queue for determining the data packets that need to be retransmitted during subsequent traversals.
[0036] In one embodiment, to avoid adding the sequence number of the received retransmitted data packet to the sequence number cache queue twice, when adding the sequence number corresponding to the received data packet to the sequence number cache queue, it is further determined whether the data packet is a duplicate data packet. If it is not a duplicate data packet, the sequence number corresponding to the data packet is added to the sequence number cache queue.
[0037] Step S102: Traverse the sequence number cache queue every preset time. If the reception time of the data packet corresponding to the traversed sequence number is less than or equal to the reception time threshold, continue traversing to determine the sequence number of the packet to be retransmitted. The reception time threshold is estimated based on the standard deviation of the one-way transmission delay of the data packet.
[0038] Wherein, the preset time is the trigger time interval set for traversing the sequence number cache queue, and can be, for example, 10 milliseconds. During the traversal process, start traversing from the first data in the sequence number cache queue. When traversing each element, that is, the stored sequence number, compare the reception time of the data packet corresponding to the sequence number with the reception time threshold. If the reception time of the data packet corresponding to the traversed sequence number is less than or equal to the reception time threshold, continue traversing to determine the sequence number of the packet to be retransmitted. Among them, the reception 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 the time interval from when the data packet is sent by the data sending end to when the data receiving end receives the data packet. Optionally, it can be recorded as the difference between the time stamp when the data sending end sends the data packet and the time stamp when the data receiving end receives the data packet. Among them, the standard deviation is used as a measurement basis for the degree of statistical distribution in probability statistics and reflects the dispersion degree of the data set.
[0039] In one embodiment, during the traversal, if the reception time of the data packet corresponding to the traversed sequence number is less than or equal to the reception time threshold, continue traversing to determine the sequence number of the packet to be retransmitted. Optionally, when determining the sequence number of the packet to be retransmitted, in the case where the sent data packets are numbered in sequence, the discontinuous sequence numbers in the sequence number cache queue are determined as the sequence numbers of the packets to be retransmitted. Exemplarily, as Figure 2 shown, Figure 2 is a schematic diagram of the sequence numbers stored in the sequence number cache queue provided by the embodiment of the present application. When traversing the sequence number cache queue, it is found that the discontinuous sequence numbers, that is, the data packet sequence number n + 1 and the data packet sequence number n + 3 do not exist, that is, the corresponding data packets are missing. Then, the data packet sequence number n + 1 and the data packet sequence number n + 3 are determined as the sequence numbers of the packets to be retransmitted.
[0040] Step S103: If the reception time of the data packet corresponding to the traversed sequence number is greater than the reception time threshold, stop traversing, and send the determined sequence number of the packet to be retransmitted to the peer device for retransmission of the corresponding data packet.
[0041] In one embodiment, if the packet reception time corresponding to the traversed sequence number is greater than the reception time threshold, the traversal is stopped, and the sequence numbers of the packets to be retransmitted determined during the traversal are sent to the peer device for retransmission of the corresponding packets. During data transmission, due to jitter in the transmission link, the packets sent by the data sender may not be received by the data receiver due to delay, but may be received after a certain period of time. At this time, if the data receiver feedbacks that the packet needs to be retransmitted, it will cause an invalid retransmission of the transmission link, wasting bandwidth and requiring additional processing overhead.
[0042] As can be seen from the above solution, by adding the sequence numbers corresponding to the received packets to the sequence number cache queue, and traversing the sequence number cache queue every preset time. If the packet reception time corresponding to the traversed sequence number is less than or equal to the reception time threshold, continue traversing to determine the sequence numbers of the packets to be retransmitted. The reception time threshold is estimated based on the standard deviation of the one-way transmission delay of the packets. If the packet reception time corresponding to the traversed sequence number is greater than the time threshold, stop traversing, and send the determined sequence numbers of the packets to be retransmitted to the peer device for retransmission of the corresponding packets. In the calculation process of the reception time threshold, it is estimated based on the standard deviation of the one-way transmission delay of the packets, so that the time threshold can accurately reflect the link transmission situation and facilitate a reasonable judgment on whether to continue traversing.
[0043] Figure 3 The following is a flowchart of a method for determining a reception time threshold provided by an embodiment of the present application, as Figure 3 shown, which specifically includes:
[0044] Step S201: Add the sequence numbers corresponding to the received packets to the sequence number cache queue.
[0045] Step S202: Determine the one-way transmission delays of multiple received packets every preset sampling time, model a Gaussian distribution based on the magnitudes of the one-way transmission delays, and determine the reception time threshold according to the standard deviation of the Gaussian distribution.
[0046] In one embodiment, the magnitudes of the one-way transmission delays (exemplarily denoted as t s2r ) from the data sender to the data receiver within a short period of time are modeled as a Gaussian distribution T s2r ~N(μ s2r ,σ 2 ), and the instability degree of the transmission time is measured by the standard deviation σ of the Gaussian distribution. Among them, this short period of time, that is, the preset sampling time, can be 200 milliseconds exemplarily, and other values can be set according to actual needs.
[0047] Specifically, for each data packet with sequence number n received by the receiving end, the one-way transmission reference sampling time of the data packet is obtained by subtracting the transmission timestamp of the sending end in the data packet from the current timestamp of the receiving end. Since the timestamps of the sending end and the receiving end are not aligned in most scenarios, the sampling values The expectation of the corresponding distribution often does not equal the expected value μ of the actual distribution. s2r , but the clock misalignment only affects the expectation. The variance of the corresponding distribution is equal to the variance σ of the actual distribution. 2 Therefore, by performing the above sampling on the N data packets recently received by the receiving end, the reference standard deviation can be calculated as follows:
[0048]
[0049]
[0050] where m is the sequence number of the most recently arrived data packet. On the premise that μ s2r does not change during the sampling period, the mean value of the N sampling points The variance of the corresponding distribution is Then obeys a normal distribution with a variance of , and then the estimated where, from this formula, it can be seen that the larger N is in a short period of time, the closer the calculated standard deviation is to the true value. However, if N is too large, the situation where the t s2r distribution has changed significantly will occur. In the actual deployment scenario, it is considered that the transmission link is relatively stable within nearly 200 ms. Therefore, the preset sampling time is 200 milliseconds, and the actual value of N can be calculated by combining the actual packet sending frequency with this preset sampling value.
[0051] where, since t s2r obeys a Gaussian distribution, P(t s2r ) represents the probability density function corresponding to t s2r . At the current moment t, the probability that the data packet n that should have arrived at the receiving end at the moment t has arrived is 50%, that is Then for the data packet with sequence number n that should have arrived at the moment t n (t n <), the probability that this packet arrives at the receiving end is:
[0052]
[0053] Exemplarily, as Figure 4 shown, Figure 4 is the schematic diagram of the probability density distribution of the data packet arrival time provided by the embodiment of the present invention. When tn +σ<, the probability that data packet n has arrived is greater than 84.13%; when t n +2σ<, the probability that data packet n has arrived is greater than 97.72%; according to the probability density of the normal distribution, corresponding to t n +3σ< the arrival probability is 99.86%; corresponding to t n +4σ< the arrival probability is 99.99%. Therefore, based on the reliable standard deviation σ estimation, the probability of whether the packet should arrive can be effectively evaluated.
[0054] Therefore, when subsequently traversing the sequence number cache queue, if the reception time corresponding to the traversed data packet is less than or equal to (reception time threshold), continue traversing to determine the sequence number of the packet to be retransmitted; if the reception time of the data packet corresponding to the traversed sequence number is greater than then stop traversing, and send the determined sequence number of the packet to be retransmitted to the peer device. Wherein, α is a tolerance coefficient, a coefficient that can be reasonably adjusted according to the service scenario. For scenarios with high real-time requirements or good network conditions, α can 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, α can be set to a larger value, such as 2, 3, etc.
[0055] Step S203, traverse the sequence number cache queue. If the reception time of the data packet corresponding to the traversed sequence number is less than or equal to the reception time threshold, continue traversing to determine the sequence number of the packet to be retransmitted, and the reception time threshold is obtained based on the standard deviation estimation of the one-way transmission delay of the data packet.
[0056] Step S204, if the reception time of the data packet corresponding to the traversed sequence number is greater than the reception time threshold, stop traversing, and send the determined sequence number of the packet to be retransmitted to the peer device for retransmission of the corresponding data packet.
[0057] As can be seen from the above, a Gaussian distribution is modeled based on the magnitude of the one-way transmission delay, and the reception time threshold is determined according to the standard deviation of the Gaussian distribution, which can accurately avoid the problem of invalid retransmission of the transmission link caused by network jitter and save network bandwidth resources. In the existing design scheme, it directly calculates based on the actual arrival time of adjacent packets, without actually calculating the probability of the corresponding data packet arrival sequence disorder from the perspective of probability, and the specific values are more empirical rather than theoretical.
[0058] Figure 5 For another method for determining the reception time threshold provided by the embodiments of the present application, as shown in Figure 5 shown, specifically includes:
[0059] Step S301: Add the sequence number corresponding to the received data packet to the sequence number cache queue.
[0060] Step S302: At every preset sampling time, determine the one-way transmission delay of multiple received data packets, and estimate the standard deviation of the one-way transmission delay through adaptive weighted filtering to obtain a reception time threshold.
[0061] In order to further reduce the computational amount, in one embodiment, the standard deviation of the one-way transmission delay is estimated through adaptive weighted filtering to obtain a reception time threshold.
[0062] When performing the standard deviation estimation, determine the first probability that the sample of the one-way transmission delay is within a preset interval range according to the normal distribution function, determine the second probability that the sample of the one-way transmission delay with the largest deviation value is within the preset interval range, and the third probability that is outside the preset interval range, and estimate the standard deviation of the one-way transmission delay with the second probability and the third probability as the filtering weights to obtain a reception time threshold.
[0063] Specifically, from the normal distribution, the first probability that the one-way transmission delay sample is within the preset interval range [μ s2r -bσ, μ s2r +bσ] is P b , where P1 = 68.27%, P2 = 95.45%, P3 = 99.73%, P4 = 99.99%. For the N samples sampled each time, the second probability that the sample with the largest deviation value is within the preset interval range [μ s2r -bσ, μ s2r +bσ] is (P b ) N , and conversely, the third probability that is outside the preset interval range is 1 - (P b ) N . Optionally, use the probability of the sample in the interval as a reference for the filtering weight to perform filtering estimation on the value of bσ. Use to represent the filtering result, is the sampling value. When sampling for the first time at t = 0,
[0064]
[0065] When t > 0
[0066]
[0067] where the value of b is selected with reference to the size of N. If N is large and the samples are reliable, a larger value of b can be taken and the filtering result is relatively accurate; if N is small and the sample error is large, a smaller value of b can be taken and the filtering result has a relatively large error. An exemplary value is N = 50 and b = 3. At this time, P b= 99.73%, and the corresponding filtering weights are 0.8736 and 0.1264 respectively.
[0068] Step S303: Traverse the sequence number cache queue. If the reception time of the data packet corresponding to the traversed sequence number is less than or equal to the reception time threshold, continue traversing to determine the sequence number of the packet to be retransmitted. The reception time threshold is estimated based on the standard deviation of the one-way transmission delay of the data packet.
[0069] Step S304: If the reception time of the data packet corresponding to the traversed sequence number is greater than the reception time threshold, stop traversing, and send the determined sequence number of the packet to be retransmitted to the peer device for retransmission of the corresponding data packet.
[0070] As can be seen from the above, by using the method of estimating the reception time threshold through adaptive weight filtering for the standard deviation of the one-way transmission delay, compared with the traditional standard deviation calculation, there is no need for redundant power and square root calculations, and the estimation of bσ and σ can be achieved with relatively low complexity. The actual values of N and b can be further selected according to the actual service scenario. This solution has more deployment advantages compared with the standard deviation calculation method.
[0071] In one embodiment, when adding the sequence number corresponding to the received data packet to the sequence number cache queue, it includes: in the case that the received data packet is not a duplicate data packet, adding the sequence number corresponding to the data packet to the sequence number cache queue in sequence. The sequence number is the sequence number of the data packet at the network application layer. Thus, through the queue addition of the data packet sequence numbers at the application layer, retransmission adaptation at the application layer is achieved.
[0072] Figure 6 This is a flowchart of another method for determining the reception time threshold provided by the embodiments of the present application, which gives a specific method for traversing the sequence numbers to determine the sequence number of the packet to be retransmitted, as Figure 6 shown, specifically including:
[0073] Step S401: In the case that the received data packet is not a duplicate data packet, add the sequence number corresponding to the data packet to the sequence number cache queue in sequence.
[0074] Step S402: Determine the sequence number traversal range at every preset time, and traverse the sequence numbers in the sequence number cache queue in sequence within the sequence number traversal range. If all the sequence numbers within the sequence number traversal range are consecutive, delete the sequence numbers within the traversed sequence number traversal range, and perform the next round of traversal until all the sequence numbers in the sequence number cache queue are traversed.
[0075] In one embodiment, when traversing, the traversal range of the sequence numbers is further determined. For example, if the set range is to traverse 100 sequence numbers, starting from the first sequence number i, it traverses to i + 100. If the results of this traversal are all consecutive sequence numbers, then the sequence numbers within the traversed range of the sequence numbers in the sequence number cache queue are deleted, and the next round of traversal is performed until all the sequence numbers in the sequence number cache queue are traversed.
[0076] Step S403: During the traversal, if the packet reception time corresponding to the traversed sequence number is less than or equal to the reception time threshold, continue the traversal. If there are discontinuous packet sequence numbers during the traversal, add the discontinuous packet sequence numbers to the feedback packet cache.
[0077] In one embodiment, taking the example that the packet sequence numbers are added to the sequence number cache queue in sequence according to the reception situation, if there are discontinuous packet sequence numbers during the traversal, add the discontinuous packet sequence numbers to the feedback packet cache for subsequent unified transmission to the peer for retransmission.
[0078] In one embodiment, when adding to the feedback packet cache, it further includes judging the retransmission times of the packets corresponding to the discontinuous packet sequence numbers. If the retransmission times are greater than the maximum retransmission times, do not add to the feedback packet cache. Correspondingly, if the addition conditions are met, increment the recorded retransmission times by 1. Optionally, the addition conditions may be that the retransmission times are less than or equal to the maximum retransmission times and the time since the last retransmission is greater than the preset retransmission time. If it is the first retransmission, directly add it to the feedback packet cache. For example, after adding the sequence number to the feedback packet cache and sending it to the data sender, the data sender retransmits the corresponding packet based on this sequence number.
[0079] Step S404: During the traversal, if the packet reception time corresponding to the traversed sequence number is greater than the reception time threshold, stop the traversal, and send the discontinuous packet sequence numbers recorded in the feedback packet cache to the peer device for retransmission of the corresponding packets.
[0080] As can be seen from the above, through the above method of determining the retransmitted data, in the case where the packet sequence numbers are disordered due to the delay at the sender or receiver, the packet numbers to be retransmitted can be accurately determined, avoiding the waste of bandwidth and the increase in power consumption caused by invalid retransmissions.
[0081] Figure 7 The block diagram of a packet retransmission device provided by an embodiment of the present application. This device is used to execute the packet retransmission method provided by the above embodiment, and has the corresponding functional modules and beneficial effects for executing the method. Such as Figure 7As shown in the figure, the device specifically includes: a data addition module 101, a queue traversal module 102, and a data sending module 103, where
[0082] The data addition module 101 is configured to add the sequence number corresponding to the received data packet to the sequence number buffer queue;
[0083] The queue traversal module 102 is configured to traverse the sequence number buffer queue at preset intervals. If the reception time of the data packet corresponding to the traversed sequence number is less than or equal to the reception time threshold, continue traversing to determine the sequence number of the packet to be retransmitted. The reception time threshold is estimated based on the standard deviation of the one-way transmission delay of the data packet. If the reception time of the data packet corresponding to the traversed sequence number is greater than the reception time threshold, stop traversing;
[0084] The data sending module 103 is configured to send the determined sequence number of the packet to be retransmitted to the peer device for retransmission of the corresponding data packet.
[0085] As can be seen from the above solution, by adding the sequence number corresponding to the received data packet to the sequence number buffer queue; traversing the sequence number buffer queue at preset intervals. If the reception time of the data packet corresponding to the traversed sequence number is less than or equal to the reception time threshold, continue traversing to determine the sequence number of the packet to be retransmitted. The reception time threshold is estimated based on the standard deviation of the one-way transmission delay of the data packet. If the reception time of the data packet corresponding to the traversed sequence number is greater than the reception time threshold, stop traversing, and send the determined sequence number of the packet to be retransmitted to the peer device for retransmission of the corresponding data packet. This solution significantly reduces the invalid retransmission rate of the transmission link and saves bandwidth and power overhead without introducing excessive computational complexity.
[0086] In a possible embodiment, the device further includes a threshold determination module, configured to:
[0087] Determine the one-way transmission delay of multiple received data packets at preset sampling intervals;
[0088] Build a Gaussian distribution model based on the magnitude of the one-way transmission delay, and determine the reception time threshold according to the standard deviation of the Gaussian distribution.
[0089] In a possible embodiment, the device further includes a threshold determination module, configured to:
[0090] Determine the one-way transmission delay of multiple received data packets at preset sampling intervals;
[0091] Estimate the standard deviation of the one-way transmission delay through adaptive weighted filtering to obtain the reception time threshold.
[0092] In a possible embodiment, the threshold determination module is configured to:
[0093] Determine a first probability that a sample of the one-way transmission delay falls within a preset interval range according to the normal distribution function;
[0094] Determine a second probability that a sample of the one-way transmission delay with the largest deviation value falls within the preset interval range and a third probability that it falls outside the preset interval range according to the first probability;
[0095] Estimate the standard deviation of the one-way transmission delay with the second probability and the third probability as filtering weights to obtain a reception time threshold.
[0096] In a possible embodiment, the data addition module 102 is configured to:
[0097] When the received data packet is not a duplicate data packet, add the sequence numbers corresponding to the data packets to the sequence number cache queue in sequence, where the sequence numbers include the sequence numbers of the data packets at the network application layer.
[0098] In a possible embodiment, the queue traversal module 102 is configured to:
[0099] Determine a sequence number traversal range and traverse the sequence numbers in the sequence number cache queue in sequence within the sequence number traversal range;
[0100] If all the sequence numbers within the sequence number traversal range are consecutive, delete the sequence numbers within the traversed sequence number traversal range and perform the next round of traversal until all the sequence numbers in the sequence number cache queue are traversed.
[0101] In a possible embodiment, the queue traversal module 102 is configured to:
[0102] If there are discontinuous data packet sequence numbers during the traversal process, add the discontinuous data packet sequence numbers to the feedback packet cache;
[0103] The data sending module 103 is configured to:
[0104] Send the discontinuous data packet sequence numbers recorded in the feedback packet cache to the peer device.
[0105] Figure 8 The figure is a schematic structural diagram of a data packet retransmission device provided by an embodiment of the present application. As Figure 8 shown, the device includes a processor 201, a memory 202, an input device 203, and an output device 204; the number of processors 201 in the device can be one or more. Figure 8Taking a processor 201 as an example; the processor 201, memory 202, input device 203, and output device 204 in the device can be connected through a bus or other means. Figure 8 Taking the connection through a bus as an example. The memory 202, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the data packet retransmission method in the embodiments of the present application. The processor 201 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 202, that is, implementing the above-mentioned data packet retransmission method. The input device 203 can be used to receive input digital or character information, and generate key signal inputs related to the user settings and function controls of the device. The output device 204 can include display devices such as a display screen.
[0106] The embodiments of the present application also provide a storage medium containing computer-executable instructions, and the computer-executable instructions are used to execute a data packet retransmission method described in the above embodiments when executed by a computer processor, where, including:
[0107] Adding the sequence number corresponding to the received data packet to the sequence number cache queue;
[0108] Traversing the sequence number cache queue at preset time intervals. If the reception time of the data packet corresponding to the traversed sequence number is less than or equal to the reception time threshold, continue traversing to determine the sequence number of the packet to be retransmitted, and the reception time threshold is estimated based on the standard deviation of the one-way transmission delay of the data packet;
[0109] If the reception time of the data packet corresponding to the traversed sequence number is greater than the reception time threshold, stop traversing, and send the determined sequence number of the packet to be retransmitted to the peer device for retransmission of the corresponding data packet.
[0110] It should be noted that in the embodiments of the above data packet retransmission device, the included units and modules are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for easy distinction from each other, and are not used to limit the protection scope of the embodiments of the present application.
[0111] In some possible implementation manners, each aspect of the method provided by the present application can also be implemented in the form of a program product, which includes program code. When the program product runs on a computer device, the program code is used to cause the computer device to execute the steps in the method according to various exemplary implementation manners of the present application described in the above description of the present specification. For example, the computer device can execute the data packet retransmission method recorded in the embodiments of the present application. The program product can be implemented by any combination of one or more readable media.
Claims
1. A method for retransmitting data packets, characterized in that Including: Adding the sequence number corresponding to the received data packet to the sequence number cache queue; Traversing the sequence number cache queue every preset time. If the reception time of the data packet corresponding to the traversed sequence number is less than or equal to the reception time threshold, continue traversing to determine the sequence number of the packet to be retransmitted, and the reception time threshold is estimated based on the standard deviation of the one-way transmission delay of the data packet; If the reception time of the data packet corresponding to the traversed sequence number is greater than the reception time threshold, stop traversing, and send the determined sequence number of the packet to be retransmitted to the peer device for retransmission of the corresponding data packet.
2. The data packet retransmission method according to claim 1, wherein The data packet retransmission method further includes: Determining the one-way transmission delay of multiple received data packets every preset sampling time; Modeling based on the magnitude of the one-way transmission delay to obtain a Gaussian distribution, and determining the reception time threshold according to the standard deviation of the Gaussian distribution.
3. The data packet retransmission method according to claim 1, wherein The data packet retransmission method further includes: Determining the one-way transmission delay of multiple received data packets every preset sampling time; Estimating the standard deviation of the one-way transmission delay through adaptive weighted filtering to obtain the reception time threshold.
4. The data packet retransmission method according to claim 3, wherein The estimating the standard deviation of the one-way transmission delay through adaptive weighted filtering to obtain the reception time threshold includes: Determining the first probability that the sample of the one-way transmission delay is within the preset interval range according to the normal distribution function; Determining the second probability that the sample of the one-way transmission delay with the largest deviation value is within the preset interval range and the third probability that it is outside the preset interval range according to the first probability; Estimating the standard deviation of the one-way transmission delay with the second probability and the third probability as the filtering weights to obtain the reception time threshold.
5. The data packet retransmission method according to any one of claims 1-4, characterized in that, The adding the sequence number corresponding to the received data packet to the sequence number cache queue includes: In the case that the received data packet is not a duplicate data packet, adding the sequence number corresponding to the data packet to the sequence number cache queue in sequence, and the sequence number includes the sequence number of the data packet at the network application layer.
6. The data packet retransmission method according to claim 5, wherein The traversing the sequence number cache queue includes: Determining the sequence number traversal range, and traversing the sequence numbers in the sequence number cache queue in sequence within the sequence number traversal range; If all the sequence numbers within the sequence number traversal range are consecutive, deleting the sequence numbers within the traversed sequence number traversal range and performing the next round of traversal until all the sequence numbers in the sequence number cache queue are traversed.
7. The data packet retransmission method according to claim 6, wherein The determining the sequence number of the packet to be retransmitted includes: If there are discontinuous data packet sequence numbers during the traversal, adding the discontinuous data packet sequence numbers to the feedback packet cache; Correspondingly, the sending the determined sequence number of the packet to be retransmitted to the peer device includes: Sending the discontinuous data packet sequence numbers recorded in the feedback packet cache to the peer device.
8. Packet retransmission device, characterized in that Including: A data adding module configured to add the sequence number corresponding to the received data packet to the sequence number cache queue; A queue traversal module, configured to traverse the sequence number cache queue at preset intervals. If the reception time of the data packet corresponding to the traversed sequence number is less than or equal to the reception time threshold, continue traversing to determine the sequence number of the packet to be retransmitted. The reception time threshold is estimated based on the standard deviation of the one-way transmission delay of the data packet. If the reception time of the data packet corresponding to the traversed sequence number is greater than the reception time threshold, stop traversing; A data sending module, configured to send the determined sequence number of the packet to be retransmitted to the peer device for retransmission of the corresponding data packet.
9. A data packet retransmission device, the device comprising: One or more processors; A storage device for storing one or more programs, which when executed by the one or more processors cause the one or more processors to implement the data packet retransmission method according to any one of claims 1-7.
10. A storage medium storing computer-executable instructions, the computer-executable instructions being used to execute the data packet retransmission method according to any one of claims 1-7 when executed by a computer processor.
11. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the data packet retransmission method according to any one of claims 1-7.
Citation Information
Patent Citations
Method, device and electronic equipment for retransmission of lost packet
CN107147481A
Data retransmission method and device, electronic equipment and storage medium
CN114531210A