CN111246312A - Packet loss processing method and device - Google Patents

Packet loss processing method and device Download PDF

Info

Publication number
CN111246312A
CN111246312A CN202010044145.7A CN202010044145A CN111246312A CN 111246312 A CN111246312 A CN 111246312A CN 202010044145 A CN202010044145 A CN 202010044145A CN 111246312 A CN111246312 A CN 111246312A
Authority
CN
China
Prior art keywords
data
packet loss
packet
retransmission
network bandwidth
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.)
Withdrawn
Application number
CN202010044145.7A
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.)
Anhui Wenxiang Information Technology Co Ltd
Original Assignee
Anhui Wenxiang 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 Anhui Wenxiang Information Technology Co Ltd filed Critical Anhui Wenxiang Information Technology Co Ltd
Priority to CN202010044145.7A priority Critical patent/CN111246312A/en
Publication of CN111246312A publication Critical patent/CN111246312A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • H04N21/64784Data processing by the network
    • H04N21/64792Controlling the complexity of the content stream, e.g. by dropping packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols

Abstract

The application discloses a packet loss processing method and a device, wherein the method comprises the following steps: performing packet loss detection on a UDP protocol data packet to be processed, determining whether the reason of packet loss is insufficient network bandwidth or non-network bandwidth, and when the reason of packet loss is determined to be insufficient network bandwidth, retransmitting data according to a first preset data retransmission mechanism by adjusting the network bandwidth; when the reason that the packet loss is caused by the fact that the non-network bandwidth is insufficient is determined, whether data retransmission needs to be carried out or not can be judged according to the importance degree of the lost data packet, if the important degree of the lost data packet is determined, data retransmission can be carried out according to a second preset data retransmission mechanism, and therefore different data retransmission modes are adopted according to different types of packet loss reasons after different reasons of the packet loss are detected, the processing time is more accurate, the packet loss processing effect can be enhanced, and the accuracy and the integrity of data transmission are guaranteed.

Description

Packet loss processing method and device
Technical Field
The present application relates to the field of data transmission technologies, and in particular, to a packet loss processing method and apparatus.
Background
In network communication, since a User Datagram Protocol (UDP) has the characteristics of low resource consumption and high processing speed when processing a data packet, the method is widely applied to data transmission with high real-time requirements for audio, video and the like and ordinary data transmission.
However, the UDP does not provide a guarantee mechanism for data transmission, a logical link does not need to be established before data transmission, and an automatic retransmission mechanism is not provided to guarantee the correctness of data transmission, so that a phenomenon of data packet loss is easily generated, that is, UDP data packets may be discarded due to data damage or congestion during transmission, thereby affecting data analysis.
In the conventional packet loss processing method, when receiving the RTP packet, the RTP packet is queued and buffered. And searching whether an RTP packet with the sequence number of 1 added to the RTP sequence number sent last time exists in the buffer queue. If such an RTP packet is found, it is moved to the send buffer. However, in this processing method, for the packet loss generated during data transmission based on the UDP protocol, the processing time is not accurate enough, and it is not accurately detected whether the network has available bandwidth, so the packet loss processing effect is not ideal.
Disclosure of Invention
The embodiments of the present application mainly aim to provide a packet loss processing method and apparatus, which can enhance the packet loss processing effect and ensure the accuracy and integrity of data transmission.
In a first aspect, an embodiment of the present application provides a packet loss processing method, including:
performing packet loss detection on a UDP protocol data packet to be processed, and determining packet loss reasons, wherein the packet loss reasons comprise network bandwidth deficiency and non-network bandwidth deficiency;
when the reason for the packet loss is that the network bandwidth is insufficient, data retransmission is carried out according to a first preset data retransmission mechanism by adjusting the network bandwidth;
when the packet loss reason is that the non-network bandwidth is insufficient, judging whether data retransmission is needed or not according to the importance degree of the lost data packet;
if so, retransmitting the data according to a second preset data retransmission mechanism.
Optionally, the packet loss detection on the UDP protocol data packet to be processed to determine a reason for packet loss includes:
calculating the real-time bandwidth of the UDP protocol data packet to be processed;
and determining the reason for packet loss according to the real-time bandwidth.
Optionally, the first preset data retransmission mechanism is a third data retransmission mechanism;
when the reason for the packet loss is that the network bandwidth is insufficient, retransmitting data according to a first preset data retransmission mechanism by adjusting the network bandwidth, including:
when the packet loss reason is that the network bandwidth is insufficient, determining that the first data retransmission time is the 2 nd overtime timing position after the last data packet sending time, and retransmitting the first data at the 2 nd overtime timing position;
determining the second data retransmission time as the 4 th overtime timing position after the last data packet sending time, and retransmitting the data for the second time at the 4 th overtime timing position;
and determining the third data retransmission time as the 8 th overtime timing position after the last data packet sending time, and retransmitting the data for the third time at the 8 th overtime timing position.
Optionally, when the reason for the packet loss is that the non-network bandwidth is insufficient, determining whether data retransmission needs to be performed according to the importance degree of the lost data packet, including:
when the packet loss reason is that the non-network bandwidth is insufficient, judging whether the importance degree of the lost data packet exceeds a preset threshold value;
if yes, carrying out data retransmission;
if not, no data retransmission is carried out.
Optionally, the retransmitting data according to a second preset data retransmission mechanism includes:
and retransmitting the lost data packet when a preset number of acknowledgement characters ACK are received after the lost data packet is received.
An embodiment of the present application further provides a packet loss processing apparatus, including:
the detection unit is used for detecting packet loss of the UDP protocol data packet to be processed and determining the reason of the packet loss, wherein the reason of the packet loss comprises network bandwidth deficiency and non-network bandwidth deficiency;
the first retransmission unit is used for retransmitting data according to a first preset data retransmission mechanism by adjusting the network bandwidth when the reason of the packet loss is that the network bandwidth is insufficient;
the judging unit is used for judging whether data retransmission is needed or not according to the importance degree of the lost data packet when the reason of the packet loss is that the non-network bandwidth is insufficient;
and the second retransmission unit is used for retransmitting the data according to a second preset data retransmission mechanism if the data retransmission is judged to be needed.
Optionally, the detecting unit includes:
the dividing subunit is used for dividing the input frequency spectrum into six preset sub-bands according to the frequency spectrum range of the human voice;
the calculating subunit is used for calculating the real-time bandwidth of the UDP protocol data packet to be processed;
and the determining subunit is configured to determine a reason for packet loss according to the real-time bandwidth.
Optionally, the first preset data retransmission mechanism is a third data retransmission mechanism;
the first retransmission unit includes:
a first retransmission subunit, configured to, when the packet loss reason is that network bandwidth is insufficient, determine that a first data retransmission time is a2 nd timeout timing position from a last data packet transmission time, and perform a first data retransmission at the 2 nd timeout timing position;
the second retransmission subunit is configured to determine that the second data retransmission time is a 4 th timeout position after the last data packet transmission time, and perform second data retransmission at the 4 th timeout position;
and the third retransmission subunit is configured to determine that the third data retransmission time is an 8 th timeout position after the last data packet transmission time, and perform third data retransmission at the 8 th timeout position.
Optionally, the determining unit is specifically configured to:
when the packet loss reason is that the non-network bandwidth is insufficient, judging whether the importance degree of the lost data packet exceeds a preset threshold value; if yes, carrying out data retransmission; if not, no data retransmission is carried out.
Optionally, the second retransmission unit is specifically configured to:
and retransmitting the lost data packet when a preset number of acknowledgement characters ACK are received after the lost data packet is received.
An embodiment of the present application further provides a packet loss processing apparatus, including: a processor, a memory, a system bus;
the processor and the memory are connected through the system bus;
the memory is configured to store one or more programs, where the one or more programs include instructions that, when executed by the processor, cause the processor to perform any one implementation of the packet loss processing method described above.
An embodiment of the present application further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a terminal device, the terminal device is enabled to execute any implementation manner of the packet loss processing method.
According to the packet loss processing method and device provided by the embodiment of the application, packet loss detection is carried out on a UDP protocol data packet to be processed, whether the reason of packet loss is insufficient network bandwidth or non-network bandwidth is determined, and when the reason of packet loss is determined to be insufficient network bandwidth, data retransmission can be carried out according to a first preset data retransmission mechanism by adjusting the network bandwidth; when the reason that the packet loss is caused by the fact that the non-network bandwidth is insufficient is determined, whether data retransmission needs to be carried out or not can be judged according to the importance degree of the lost data packet, and if the data retransmission needs to be carried out, data retransmission can be carried out according to a second preset data retransmission mechanism. Therefore, according to the embodiment of the application, after different reasons for packet loss are detected, different packet loss processing modes are adopted for different types of packet loss reasons, namely, different data retransmission modes are adopted, so that the processing time is more accurate, the packet loss processing effect can be enhanced, and the accuracy and the integrity of data transmission are ensured.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a packet loss processing method according to an embodiment of the present application;
fig. 2 is a schematic diagram illustrating a packet loss processing apparatus according to an embodiment of the present application;
fig. 3 is a hardware structure diagram of a packet loss processing device according to an embodiment of the present application.
Detailed Description
In some packet loss processing methods, generally, when receiving the current RTP packet, the current RTP packet is enqueued and buffered. And searching whether an RTP packet with the sequence number of 1 added to the RTP sequence number sent last time exists in the buffer queue. If such an RTP packet is found, it is moved to the send buffer. Specifically, two bidirectional circular queues are used, one is a receive queue for reordering and the other is a number send queue for the next module to fetch the reordered data. Firstly, storing the data into a receiving queue, starting comparison from the tail of the queue, and inserting the data into the back of a member with a sequence number smaller than that of the member; secondly, from the receiving queue, starting from the head to head, one packet with the previous outgoing serial number +1 is output, and the output packet is stored in an output queue; thirdly, if the serial number which is not wanted to be found in the receiving queue does not exist, the serial number cannot be found out firstly, and waiting is carried out; step four, if the length of the receiving queue exceeds the upper limit, the serial number to be found is plus 1, and the step three is repeated; and fifthly, reading the packets as long as the packets exist in the output queue, wherein the packets from the output queue are continuous. Therefore, the packet loss processing method has the advantages of high complexity, long processing time, inaccurate processing time, easy time delay and unsatisfactory packet loss processing effect.
In order to solve the above-mentioned defects, an embodiment of the present application provides a packet loss processing method, where packet loss detection is performed on a UDP protocol data packet to be processed, and it is determined whether a reason for packet loss is insufficient network bandwidth or insufficient non-network bandwidth, and when it is determined that the reason for packet loss is insufficient network bandwidth, data retransmission can be performed according to a first preset data retransmission mechanism by adjusting network bandwidth; when the reason that the packet loss is caused by the fact that the non-network bandwidth is insufficient is determined, whether data retransmission needs to be carried out or not can be judged according to the importance degree of the lost data packet, and if the data retransmission needs to be carried out, data retransmission can be carried out according to a second preset data retransmission mechanism. Therefore, according to the embodiment of the application, after different reasons for packet loss are detected, different packet loss processing modes are adopted for different types of packet loss reasons, namely, different data retransmission modes are adopted, so that the processing time is more accurate, the packet loss processing effect can be enhanced, and the accuracy and the integrity of data transmission are ensured.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
First embodiment
Referring to fig. 1, a schematic flow chart of a packet loss processing method provided in this embodiment is shown, where the method includes the following steps:
s101: and performing packet loss detection on the UDP protocol data packet to be processed, and determining the reason of the packet loss.
In this embodiment, any UDP protocol data packet subjected to packet loss processing by using this embodiment is defined as a UDP protocol data packet to be processed. In addition, in order to enhance the packet loss processing effect, first, packet loss detection needs to be performed on a UDP protocol data packet to be processed, and a packet loss reason is determined, where the packet loss reason includes insufficient network bandwidth and insufficient non-network bandwidth, that is, in the embodiment of the present application, a reason for generating packet loss is divided into two types, one is a packet loss phenomenon caused by insufficient network bandwidth, and the other is a packet loss phenomenon caused by other reasons under the condition that the network bandwidth is sufficient. Therefore, the reason for generating packet loss can be accurately determined by detecting the network bandwidth in real time.
Specifically, in a possible implementation manner of the embodiment of the present application, the specific implementation process of this step S101 may include the following steps a1-a 2:
step A1: and calculating the real-time bandwidth of the UDP protocol data packet to be processed.
In this implementation manner, in order to accurately detect the network bandwidth in real time, the congestion algorithm-BBR algorithm may be used to calculate the real-time bandwidth of the UDP protocol data packet to be processed, and the specific calculation formula is as follows:
bw=delivered/interval_us
wherein bw represents the real-time bandwidth of the UDP protocol data packet to be processed; delivered represents the number of successfully received packets; interval _ us represents the time it takes to successfully receive a number of delivered packets.
It should be noted that the amount of data that is caused by congestion (i.e., the cause of packet loss) exceeds the bandwidth limit of the router, and based on this, the amount of data to be transmitted needs to be controlled, and the order of transmitting packets does not need to be considered.
Step A2: and determining the reason for packet loss according to the real-time bandwidth.
After the real-time bandwidth of the UDP protocol data packet to be processed is calculated in step a1, it may be further determined whether normal data transmission may be performed based on the fact bandwidth, and if the current bandwidth is full and complete and accurate data transmission cannot be guaranteed, it may be determined that packet loss is caused by insufficient network bandwidth, but if the current bandwidth is sufficient and a packet loss phenomenon still occurs, it may be determined that packet loss is caused by non-insufficient network bandwidth.
S102: and when the reason of the packet loss is that the network bandwidth is insufficient, retransmitting the data according to a first preset data retransmission mechanism by adjusting the network bandwidth.
In this embodiment, after the packet loss reason is determined in step S101, if the packet loss reason is that the network bandwidth is insufficient, it indicates that the network bandwidth needs to be adjusted to ensure the integrity of data transmission, and specifically, data retransmission may be performed according to a first preset data retransmission mechanism.
In a possible implementation manner of the embodiment of the present application, the first preset data retransmission mechanism is a triple data retransmission mechanism, and the specific implementation process of the step S102 may include the following steps B1-B3:
step B1: and when the reason of packet loss is that the network bandwidth is insufficient, determining that the first data retransmission time is the 2 nd overtime timing position after the last data packet transmission time, and retransmitting the first data at the 2 nd overtime timing position.
Step B2: and determining the second data retransmission time as the 4 th overtime timing position after the last data packet sending time, and retransmitting the second data at the 4 th overtime timing position.
Step B3: and determining the third data retransmission time as the 8 th overtime timing position after the last data packet sending time, and retransmitting the third data at the 8 th overtime timing position.
Specifically, in this implementation, when it is determined that the reason for packet loss is that the network bandwidth is insufficient, the packet-lost data may be retransmitted three times, where the first data Retransmission time is the 2 nd Timeout position from the last data packet Transmission time, for example, a Transmission Control Protocol (TCP) Timeout Retransmission mechanism (RTO) may be used to retransmit the first data at a position RTOx2 from the last data packet Transmission time. The second data retransmission time is the 4 th time-out position after the last data packet transmission time, for example, the second data retransmission can be performed at the RTOx4 position after the last data packet transmission time. The third data retransmission time is the 8 th time-out position after the last data packet transmission time, for example, the third data retransmission can be performed at the RTOx8 position after the last data packet transmission time.
It should be noted that when it is determined that the reason for packet loss is insufficient network bandwidth, data retransmission can be basically achieved according to the processing procedure of the data retransmission mechanism described above three times.
S103: and when the packet loss reason is that the non-network bandwidth is insufficient, judging whether data retransmission is needed or not according to the importance degree of the lost data packet.
In this embodiment, after the packet loss reason is determined through step S101, if the packet loss reason is that the non-network bandwidth is insufficient, it indicates that the packet is lost due to other reasons, and at this time, whether data retransmission needs to be performed is determined according to the importance degree of the lost data packet.
Specifically, an optional implementation manner is that when the reason for packet loss is that the non-network bandwidth is insufficient, it may be first determined whether the importance degree of the lost data packet exceeds a preset threshold, and if so, data retransmission is required, that is, the subsequent step S104 needs to be continuously performed; if not, the data retransmission is not needed, that is, the subsequent step S105 may be continuously performed.
The preset threshold refers to a critical value for distinguishing whether to retransmit the lost data packet, if the importance degree of the lost data is higher than the critical value, it indicates that the content included in the lost data packet is very important, and is indispensable for subsequent data analysis, at this time, the lost data packet needs to be retransmitted, otherwise, if the importance degree of the lost data is not higher than the critical value, it indicates that the importance degree of the content included in the lost data packet is low, and is negligible for subsequent data analysis, at this time, the lost data packet does not need to be retransmitted.
S104: and retransmitting the data according to a second preset data retransmission mechanism.
In this embodiment, if it is determined in step S103 that data retransmission is required, data retransmission may be performed according to a second preset data retransmission mechanism, specifically, a time point for retransmitting a lost data packet may be selected according to the importance of the lost data packet, and data retransmission may be performed quickly at the selected time point. An optional implementation manner is that, when a preset number of acknowledgement characters ACK are received after a lost data packet is received, the lost data packet is retransmitted, and the lost data packet is quickly supplemented. The value of the preset number can be set according to actual conditions, and the embodiment of the application does not limit the value, for example, the preset number can be set to be 2.
For example, the following steps are carried out: assuming that a sending end sends 5 data packets 1, 2, 3, 4, and 5 and receives 4 ACKs returned by a receiving end, which correspond to the data packets 1, 3, 4, and 5, respectively, when receiving ACK3, it indicates that the data packet 2 is skipped 1 time, and when receiving ACK4, it indicates that the data wave 2 is skipped 2 times, and at this time, it may be considered that the data packet No. 2 is a lost data packet, and at this time, the data packet No. 2 may be retransmitted, so as to improve the transmission speed when the packet is lost, and ensure the integrity and accuracy of data transmission.
S105: no data retransmission is performed.
In this embodiment, if it is determined that data retransmission is not required through step S103, that is, when the reason for packet loss is that the non-network bandwidth is insufficient, if it is determined that the importance degree of the lost data packet does not exceed the preset threshold, it indicates that the importance of the content included in the lost data packet is low, and the importance degree of the content included in the lost data packet is negligible for subsequent data analysis, and at this time, the lost data packet does not need to be retransmitted, that is, data retransmission is not required.
In summary, in the packet loss processing method provided in this embodiment, packet loss detection is performed on a UDP protocol data packet to be processed, it is determined whether a reason for packet loss is insufficient network bandwidth or non-network bandwidth, and when it is determined that the reason for packet loss is insufficient network bandwidth, data retransmission can be performed according to a first preset data retransmission mechanism by adjusting network bandwidth; when the reason that the packet loss is caused by the fact that the non-network bandwidth is insufficient is determined, whether data retransmission needs to be carried out or not can be judged according to the importance degree of the lost data packet, and if the data retransmission needs to be carried out, data retransmission can be carried out according to a second preset data retransmission mechanism. Therefore, according to the embodiment of the application, after different reasons for packet loss are detected, different packet loss processing modes are adopted for different types of packet loss reasons, namely, different data retransmission modes are adopted, so that the processing time is more accurate, the packet loss processing effect can be enhanced, and the accuracy and the integrity of data transmission are ensured.
Second embodiment
In this embodiment, a packet loss processing apparatus will be described, and please refer to the above method embodiment for related content.
Referring to fig. 2, a schematic composition diagram of a packet loss processing apparatus provided in this embodiment is shown, where the apparatus includes:
a detecting unit 201, configured to perform packet loss detection on a UDP protocol data packet to be processed, and determine a packet loss reason, where the packet loss reason includes network bandwidth deficiency and non-network bandwidth deficiency;
a first retransmission unit 202, configured to, when the packet loss reason is that the network bandwidth is insufficient, perform data retransmission according to a first preset data retransmission mechanism by adjusting the network bandwidth;
a determining unit 203, configured to determine whether data retransmission is needed according to the importance degree of the lost data packet when the packet loss reason is that the non-network bandwidth is insufficient;
the second retransmission unit 204 is configured to perform data retransmission according to a second predetermined data retransmission mechanism if it is determined that data retransmission is required.
In an implementation manner of this embodiment, the detecting unit 201 includes:
the dividing subunit is used for dividing the input frequency spectrum into six preset sub-bands according to the frequency spectrum range of the human voice;
the calculating subunit is used for calculating the real-time bandwidth of the UDP protocol data packet to be processed;
and the determining subunit is configured to determine a reason for packet loss according to the real-time bandwidth.
In an implementation manner of this embodiment, the first predetermined data retransmission mechanism is a third data retransmission mechanism;
the first retransmission unit 202 includes:
a first retransmission subunit, configured to, when the packet loss reason is that network bandwidth is insufficient, determine that a first data retransmission time is a2 nd timeout timing position from a last data packet transmission time, and perform a first data retransmission at the 2 nd timeout timing position;
the second retransmission subunit is configured to determine that the second data retransmission time is a 4 th timeout position after the last data packet transmission time, and perform second data retransmission at the 4 th timeout position;
and the third retransmission subunit is configured to determine that the third data retransmission time is an 8 th timeout position after the last data packet transmission time, and perform third data retransmission at the 8 th timeout position.
In an implementation manner of this embodiment, the determining unit 203 is specifically configured to:
when the packet loss reason is that the non-network bandwidth is insufficient, judging whether the importance degree of the lost data packet exceeds a preset threshold value; if yes, carrying out data retransmission; if not, no data retransmission is carried out.
In an implementation manner of this embodiment, the second retransmission unit 204 is specifically configured to:
and retransmitting the lost data packet when a preset number of acknowledgement characters ACK are received after the lost data packet is received.
In summary, in the packet loss processing apparatus provided in this embodiment, packet loss detection is performed on a UDP protocol data packet to be processed, it is determined whether a reason for packet loss is insufficient network bandwidth or non-network bandwidth, and when it is determined that the reason for packet loss is insufficient network bandwidth, data retransmission can be performed according to a first preset data retransmission mechanism by adjusting network bandwidth; when the reason that the packet loss is caused by the fact that the non-network bandwidth is insufficient is determined, whether data retransmission needs to be carried out or not can be judged according to the importance degree of the lost data packet, and if the data retransmission needs to be carried out, data retransmission can be carried out according to a second preset data retransmission mechanism. Therefore, according to the embodiment of the application, after different reasons for packet loss are detected, different packet loss processing modes are adopted for different types of packet loss reasons, namely, different data retransmission modes are adopted, so that the processing time is more accurate, the packet loss processing effect can be enhanced, and the accuracy and the integrity of data transmission are ensured.
Further, an embodiment of the present application further provides a packet loss processing device, see fig. 3, which is a hardware structure diagram of the packet loss processing device provided in this embodiment.
As shown in fig. 3, the packet loss processing apparatus includes: memory 301, processor 302, communication bus 303, and communication interface 304.
The memory 301 stores a program that can be executed on the processor, and when the program is executed, part or all of the steps in the packet loss processing method provided in the foregoing method embodiments of the present application are implemented. The memory 301 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
In this device, the processor 302 and the memory 301 transmit signaling, logic instructions, and the like through a communication bus. The device is capable of communicative interaction with other devices via the communication interface 304.
Further, an embodiment of the present application further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are run on a terminal device, the terminal device is caused to execute any implementation method of the packet loss processing method.
As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the above embodiment methods can be implemented by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the method according to the embodiments or some parts of the embodiments of the present application.
It should be noted that, in the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (12)

1. A packet loss processing method, comprising:
performing packet loss detection on a UDP protocol data packet to be processed, and determining packet loss reasons, wherein the packet loss reasons comprise network bandwidth deficiency and non-network bandwidth deficiency;
when the reason for the packet loss is that the network bandwidth is insufficient, data retransmission is carried out according to a first preset data retransmission mechanism by adjusting the network bandwidth;
when the packet loss reason is that the non-network bandwidth is insufficient, judging whether data retransmission is needed or not according to the importance degree of the lost data packet;
if so, retransmitting the data according to a second preset data retransmission mechanism.
2. The method according to claim 1, wherein the detecting packet loss of the UDP protocol data packet to be processed and determining a reason for packet loss comprises:
calculating the real-time bandwidth of the UDP protocol data packet to be processed;
and determining the reason for packet loss according to the real-time bandwidth.
3. The method of claim 1, wherein the first predetermined data retransmission scheme is a triple data retransmission scheme;
when the reason for the packet loss is that the network bandwidth is insufficient, retransmitting data according to a first preset data retransmission mechanism by adjusting the network bandwidth, including:
when the packet loss reason is that the network bandwidth is insufficient, determining that the first data retransmission time is the 2 nd overtime timing position after the last data packet sending time, and retransmitting the first data at the 2 nd overtime timing position;
determining the second data retransmission time as the 4 th overtime timing position after the last data packet sending time, and retransmitting the data for the second time at the 4 th overtime timing position;
and determining the third data retransmission time as the 8 th overtime timing position after the last data packet sending time, and retransmitting the data for the third time at the 8 th overtime timing position.
4. The method of claim 1, wherein when the packet loss reason is that non-network bandwidth is insufficient, determining whether data retransmission is required according to the importance of a lost data packet comprises:
when the packet loss reason is that the non-network bandwidth is insufficient, judging whether the importance degree of the lost data packet exceeds a preset threshold value;
if yes, carrying out data retransmission;
if not, no data retransmission is carried out.
5. The method according to claim 1, wherein the retransmitting data according to a second predetermined data retransmission scheme comprises:
and retransmitting the lost data packet when a preset number of acknowledgement characters ACK are received after the lost data packet is received.
6. A packet loss processing apparatus, comprising:
the detection unit is used for detecting packet loss of the UDP protocol data packet to be processed and determining the reason of the packet loss, wherein the reason of the packet loss comprises network bandwidth deficiency and non-network bandwidth deficiency;
the first retransmission unit is used for retransmitting data according to a first preset data retransmission mechanism by adjusting the network bandwidth when the reason of the packet loss is that the network bandwidth is insufficient;
the judging unit is used for judging whether data retransmission is needed or not according to the importance degree of the lost data packet when the reason of the packet loss is that the non-network bandwidth is insufficient;
and the second retransmission unit is used for retransmitting the data according to a second preset data retransmission mechanism if the data retransmission is judged to be needed.
7. The apparatus of claim 6, wherein the detection unit comprises:
the dividing subunit is used for dividing the input frequency spectrum into six preset sub-bands according to the frequency spectrum range of the human voice;
the calculating subunit is used for calculating the real-time bandwidth of the UDP protocol data packet to be processed;
and the determining subunit is configured to determine a reason for packet loss according to the real-time bandwidth.
8. The apparatus of claim 6, wherein the first predetermined data retransmission scheme is a triple data retransmission scheme;
the first retransmission unit includes:
a first retransmission subunit, configured to, when the packet loss reason is that network bandwidth is insufficient, determine that a first data retransmission time is a2 nd timeout timing position from a last data packet transmission time, and perform a first data retransmission at the 2 nd timeout timing position;
the second retransmission subunit is configured to determine that the second data retransmission time is a 4 th timeout position after the last data packet transmission time, and perform second data retransmission at the 4 th timeout position;
and the third retransmission subunit is configured to determine that the third data retransmission time is an 8 th timeout position after the last data packet transmission time, and perform third data retransmission at the 8 th timeout position.
9. The apparatus according to claim 6, wherein the determining unit is specifically configured to:
when the packet loss reason is that the non-network bandwidth is insufficient, judging whether the importance degree of the lost data packet exceeds a preset threshold value; if yes, carrying out data retransmission; if not, no data retransmission is carried out.
10. The apparatus according to any of claims 6-9, wherein the second retransmission unit is specifically configured to:
and retransmitting the lost data packet when a preset number of acknowledgement characters ACK are received after the lost data packet is received.
11. A packet loss processing apparatus, comprising: a processor, a memory, a system bus;
the processor and the memory are connected through the system bus;
the memory is to store one or more programs, the one or more programs comprising instructions, which when executed by the processor, cause the processor to perform the method of any of claims 1-5.
12. A computer-readable storage medium having stored therein instructions that, when executed on a terminal device, cause the terminal device to perform the method of any one of claims 1-5.
CN202010044145.7A 2020-01-15 2020-01-15 Packet loss processing method and device Withdrawn CN111246312A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010044145.7A CN111246312A (en) 2020-01-15 2020-01-15 Packet loss processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010044145.7A CN111246312A (en) 2020-01-15 2020-01-15 Packet loss processing method and device

Publications (1)

Publication Number Publication Date
CN111246312A true CN111246312A (en) 2020-06-05

Family

ID=70869001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010044145.7A Withdrawn CN111246312A (en) 2020-01-15 2020-01-15 Packet loss processing method and device

Country Status (1)

Country Link
CN (1) CN111246312A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111780878A (en) * 2020-07-07 2020-10-16 章微微 Infrared temperature measurement scene identification system and corresponding terminal
WO2022001494A1 (en) * 2020-06-28 2022-01-06 腾讯科技(深圳)有限公司 Lost packet retransmission method, system, and apparatus, computer readable storage medium, and device
CN115086200A (en) * 2022-05-06 2022-09-20 北京达佳互联信息技术有限公司 Packet loss type determination method and device, electronic equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1487698A (en) * 2003-09-01 2004-04-07 中国科学院计算技术研究所 Adaptive jamming control method suitable of mixed wired/radio network
JP2009089352A (en) * 2007-09-11 2009-04-23 Yokogawa Electric Corp Communication control apparatus
CN101645765A (en) * 2009-08-03 2010-02-10 四川大学 Reliable transmission acceleration method facing networks with high error rate and long delay characteristics
CN103763073A (en) * 2014-01-09 2014-04-30 深圳市迪威视讯股份有限公司 Method for retransmission of lost data packet and terminal
CN103873479A (en) * 2014-03-28 2014-06-18 北京邮电大学 Parallel data transmission algorithm based on cross-layer estimation
US20160366058A1 (en) * 2009-12-08 2016-12-15 At&T Intellectual Property I, L.P. Bulk Data Transport In A Network
CN107277423A (en) * 2017-07-28 2017-10-20 北京小米移动软件有限公司 The method and device that packet loss is retransmitted
CN107645409A (en) * 2017-08-18 2018-01-30 上海华为技术有限公司 A kind of transmission fault reason method and device for determining data
CN109104742A (en) * 2017-06-20 2018-12-28 华为技术有限公司 Congestion window method of adjustment and sending device
CN109257138A (en) * 2017-07-13 2019-01-22 华为技术有限公司 A kind of data transfer control method and relevant device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1487698A (en) * 2003-09-01 2004-04-07 中国科学院计算技术研究所 Adaptive jamming control method suitable of mixed wired/radio network
JP2009089352A (en) * 2007-09-11 2009-04-23 Yokogawa Electric Corp Communication control apparatus
CN101645765A (en) * 2009-08-03 2010-02-10 四川大学 Reliable transmission acceleration method facing networks with high error rate and long delay characteristics
US20160366058A1 (en) * 2009-12-08 2016-12-15 At&T Intellectual Property I, L.P. Bulk Data Transport In A Network
CN103763073A (en) * 2014-01-09 2014-04-30 深圳市迪威视讯股份有限公司 Method for retransmission of lost data packet and terminal
CN103873479A (en) * 2014-03-28 2014-06-18 北京邮电大学 Parallel data transmission algorithm based on cross-layer estimation
CN109104742A (en) * 2017-06-20 2018-12-28 华为技术有限公司 Congestion window method of adjustment and sending device
CN109257138A (en) * 2017-07-13 2019-01-22 华为技术有限公司 A kind of data transfer control method and relevant device
CN107277423A (en) * 2017-07-28 2017-10-20 北京小米移动软件有限公司 The method and device that packet loss is retransmitted
CN107645409A (en) * 2017-08-18 2018-01-30 上海华为技术有限公司 A kind of transmission fault reason method and device for determining data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
高毅,张曦煌,王广翔: "基于UDP的多媒体通信的研究与实现", 《计算机工程与应用》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022001494A1 (en) * 2020-06-28 2022-01-06 腾讯科技(深圳)有限公司 Lost packet retransmission method, system, and apparatus, computer readable storage medium, and device
US11908482B2 (en) 2020-06-28 2024-02-20 Tencent Technology (Shenzhen) Company Limited Packet loss retransmission method, system, and apparatus, computer-readable storage medium, and device
CN111780878A (en) * 2020-07-07 2020-10-16 章微微 Infrared temperature measurement scene identification system and corresponding terminal
WO2022007115A1 (en) * 2020-07-07 2022-01-13 章微微 Infrared temperature measurement scene identification system and corresponding terminal
CN115086200A (en) * 2022-05-06 2022-09-20 北京达佳互联信息技术有限公司 Packet loss type determination method and device, electronic equipment and storage medium
CN115086200B (en) * 2022-05-06 2023-09-01 北京达佳互联信息技术有限公司 Packet loss type determining method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US11934340B2 (en) Multi-path RDMA transmission
CN111246312A (en) Packet loss processing method and device
US7477675B2 (en) Data communication apparatus
US11012367B2 (en) Technologies for managing TCP/IP packet delivery
US9467390B2 (en) Method and device for data transmission
US8004985B2 (en) Communication terminal which perform low-delay communication by using a broadband line
US20060209837A1 (en) Method and apparatus for dynamically managing a retransmission persistence
US7782794B2 (en) Methods and systems for bandwidth measurement techniques
US20110096662A1 (en) Inferring TCP Initial Congestion Window
US20170346601A1 (en) Data transmission method and computing apparatus having data transmission function
CN107800638B (en) Congestion control method and device
WO2012129922A1 (en) Packet handling method, forwarding device and system
CN110677355A (en) Packet loss coping method and device, electronic equipment and storage medium
WO2022121469A1 (en) Flow control method, apparatus, and device, and readable storage medium
CN110247736B (en) Data transmission method and device
KR20150066335A (en) Method And Apparatus For Reducing The Discarded Packets In Wireless Communication
CN104703288A (en) Transmission method based on quasi-random back-off strategy in wireless distributed network
EP1211856A1 (en) Data transmitter, data receiver, and data transmitting/receiving method
WO2019100475A1 (en) Data transmission method, apparatus and device, and storage medium
CN112769526B (en) Data packet retransmission method, system and storage medium
CN112929455A (en) UDP-based data transmission method, device, equipment and readable storage medium
JP4429982B2 (en) Congestion control method and communication terminal thereof
CN117676695A (en) TCP transmission method, device and system
US8532111B2 (en) Transmission apparatus, transmission method, and program
CN111404872A (en) Message processing method, device and system

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20200605

WW01 Invention patent application withdrawn after publication