CN109639532B - Method and device for rapidly reducing jitter buffer - Google Patents

Method and device for rapidly reducing jitter buffer Download PDF

Info

Publication number
CN109639532B
CN109639532B CN201811634108.0A CN201811634108A CN109639532B CN 109639532 B CN109639532 B CN 109639532B CN 201811634108 A CN201811634108 A CN 201811634108A CN 109639532 B CN109639532 B CN 109639532B
Authority
CN
China
Prior art keywords
data packet
jitter buffer
monitoring
monitoring point
point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811634108.0A
Other languages
Chinese (zh)
Other versions
CN109639532A (en
Inventor
周平
胡海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guiyang Longmaster Information and Technology Co ltd
Original Assignee
Guiyang Longmaster Information and 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 Guiyang Longmaster Information and Technology Co ltd filed Critical Guiyang Longmaster Information and Technology Co ltd
Priority to CN201811634108.0A priority Critical patent/CN109639532B/en
Publication of CN109639532A publication Critical patent/CN109639532A/en
Application granted granted Critical
Publication of CN109639532B publication Critical patent/CN109639532B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • H04L43/087Jitter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9005Buffering arrangements using dynamic buffer space allocation

Landscapes

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

Abstract

The application discloses a method and a device for rapidly reducing a jitter buffer area, which are characterized in that whether a monitoring point is arranged in the jitter buffer area or not is detected, the monitoring point is a data packet which is adjacent to the back of a first lost data packet and is searched from a reference point forward, and the reference point is used as a starting data packet for searching; if the monitoring point is set, detecting whether a data packet in front of the monitoring point is updated or not; if the data packet before the monitoring point is not updated, starting to monitor the receiving of the data packet in the jitter buffer, and adding 1 to the actual monitoring times every time of monitoring; and when the actual monitoring times reach the preset monitoring times, clearing all data packets in front of the monitoring point. Through the execution steps, after the huge jitter occurs and the network recovers stably, the length of the jitter buffer area is reduced as fast as possible, so that the low delay is recovered more quickly, and the purpose of real-time communication is achieved.

Description

Method and device for rapidly reducing jitter buffer
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for quickly reducing a jitter buffer.
Background
With the rapid development of communication technology, real-time communication using, for example, voice and video has become an indispensable communication method. Such as using voice chat, using video software to hold a telemedicine video conference, etc. For example, when real-time call voice data is transmitted through a network, a transmitting end encapsulates a detected voice signal into a plurality of voice data packets and transmits the plurality of voice data packets to a receiving end through the network, and the receiving end decapsulates the plurality of voice data packets into a voice signal and provides the voice signal to a user when receiving the plurality of voice data packets, thereby implementing voice communication. Due to the sensitivity of real-time voice communication to delay, which is basically a DUP transmission, i.e., "best effort", it is difficult to have good control over voice packet transmission. In a time-varying channel, such services will cause packet loss and unpredictable delay, etc., so that voice quality is not guaranteed. The current parameters for measuring the voice quality mainly include: and bandwidth indexes such as time delay and time delay jitter of voice data packet transmission, packet loss rate of the voice data packet and the like.
Jitter is the degree of variation in packet delay. If the network is congested, queuing delay will affect the delay from the sender to the receiver and cause packets transmitted over the same communication link to be delayed differently, while jitter is used to describe the degree of such delay variation. To resolve this jitter, a jitter buffer may be provided at the receiving end of the packet, the size of the jitter buffer being determined by the jitter level.
The length of the jitter buffer area is controlled by the packet sequence, when a large number of data packets are received at one time, all the data packets are buffered, and the phenomenon of packet loss can not occur. Under the condition that a large number of data packets arrive within a certain output packet taking interval due to network jitter, the length of a jitter buffer area is set according to the number of the arriving data packets, so that packet loss is reduced. And after the network tends to be stable, the length of the jitter buffer is correspondingly reduced because the number of the data packets arriving in the packet taking interval is reduced, thereby reducing the delay caused by the jitter buffer.
In the method for controlling the length of the jitter buffer by the packet sequence, when the length target _ level of the jitter buffer is found to be larger than the total length current _ level of the currently received data packet, the jitter buffer needs to be actively contracted. Since continuous contraction will cause speech discontinuities, it is necessary to gradually contract at intervals, and the contraction is slow in view of the sound continuity requirements.
Under the influence of jitter, if the network recovers after serious congestion, a large number of voice data packets flow into a jitter buffer area, the situation that current _ level is large will occur, and as the current _ level will influence a target _ level value, the delay of the jitter buffer area will be large. At this time, the network has recovered, and therefore, target _ level needs to be decreased quickly, but is restricted by the jitter buffer contraction operation, and even if target _ level is decreased, a large amount of time is still required for the contraction of the jitter buffer. Therefore, it is necessary to reduce the length of the jitter buffer as fast as possible when the network recovers steadily after the occurrence of huge jitter, so as to recover the low delay more quickly and achieve the purpose of real-time communication.
Disclosure of Invention
The application provides a method and a device for rapidly reducing a jitter buffer area, which are used for solving the problem that the jitter buffer area shrinks slowly when a network recovers stably after huge jitter occurs in the conventional method.
In a first aspect, to achieve the above object, the present application provides a method for fast reducing a jitter buffer, the method comprising:
detecting whether a monitoring point is set in a jitter buffer area, wherein the monitoring point is a data packet which is immediately adjacent to the rear of a first lost data packet searched forward from a reference point, and the reference point is used as a starting data packet for searching;
if the monitoring point is set, detecting whether a data packet in front of the monitoring point is updated or not;
if the data packet before the monitoring point is not updated, starting to monitor the receiving of the data packet in the jitter buffer, and adding 1 to the actual monitoring times every time of monitoring;
and when the actual monitoring times reach the preset monitoring times, clearing all data packets in front of the monitoring point.
Preferably, the method for rapidly reducing the jitter buffer further comprises:
detecting whether the reference point is set;
if the reference point is set, searching a first lost data packet before the reference point;
judging whether the ratio of the total number of the lost data packets before the first lost data packet to the total number of the data packets which should be received by the jitter buffer is larger than a first preset ratio or not;
if the data packet is larger than the first preset ratio, setting the data packet which is immediately behind the first lost data packet as the monitoring point;
and if the reference point is smaller than the first preset ratio, resetting the reference point, the monitoring point and the preset monitoring times.
Preferably, after detecting whether the reference point is set, the method further includes:
if the reference point is not set, judging whether a preset condition for using a fast reduction jitter buffer is reached, wherein the preset condition comprises the following steps: whether data packets with the time length exceeding 1000ms exist in the jitter buffer or not and/or the ratio of the total number of the lost data packets in the jitter buffer to the total number of the data packets which should be received by the jitter buffer is larger than a second preset ratio;
and if the preset condition is met, setting a data packet at the tail of the jitter buffer queue as the reference point, and resetting the monitoring point and the preset monitoring times.
Preferably, if the monitoring point is set, after detecting whether the data packet before the monitoring point is updated, the method further includes:
and if the data packet before the monitoring point is updated, setting the updated data packet as the reference point, and resetting the monitoring point and the preset monitoring times.
Preferably, if the monitoring point is set, detecting whether the data packet before the monitoring point is updated includes:
if the position of the newly received data packet inserted into the jitter buffer area is at the tail of the queue or behind the monitoring point, the data packet before the monitoring point is not updated;
and if the position of the newly received data packet inserted into the jitter buffer area is in front of the monitoring point, updating the data packet in front of the monitoring point.
In a second aspect, an apparatus for fast reducing a jitter buffer is provided, the apparatus comprising:
the monitoring point detection module is used for detecting whether a monitoring point is set in the jitter buffer area, the monitoring point is a data packet which is immediately behind a first lost data packet searched from a reference point forward, and the reference point is used as an initial data packet for searching;
the data packet detection module is used for detecting whether the data packet before the monitoring point is updated or not if the monitoring point is arranged;
the data packet monitoring module is used for starting to monitor the receiving of the data packet in the jitter buffer area if the data packet before the monitoring point is not updated, and adding 1 to the actual monitoring times every time the data packet is monitored;
and the data packet clearing module is used for clearing all data packets in front of the monitoring point when the actual monitoring times reach the preset monitoring times.
Preferably, the apparatus for rapidly reducing a jitter buffer further comprises:
a reference point detection module for detecting whether the reference point is set;
the data packet searching module is used for searching a first lost data packet before the reference point if the reference point is set;
a first judging module, configured to judge whether a ratio of a total number of lost packets before the first lost packet to a total number of packets that should be received by the jitter buffer is greater than a first preset ratio;
a monitoring point setting module, configured to set, as the monitoring point, a data packet immediately following the first lost data packet if the monitoring point is greater than a first preset ratio;
and the resetting module is used for resetting the reference point, the monitoring point and the preset monitoring times if the reference point, the monitoring point and the preset monitoring times are smaller than a first preset ratio.
Preferably, the apparatus for rapidly reducing a jitter buffer further comprises:
a second determining module, configured to determine whether a preset condition for using a fast-reducing jitter buffer is met if the reference point is not set, where the preset condition includes: whether data packets with the time length exceeding 1000ms exist in the jitter buffer area and/or the ratio of the total number of the lost data packets in the jitter buffer area to the total number of the data packets which should be received by the jitter buffer area is larger than a second preset ratio;
and the reference point setting module is used for setting a data packet at the tail of the jitter buffer queue as the reference point and resetting the monitoring point and the preset monitoring times if the preset condition is met.
Preferably, the reset module is further configured to:
and if the data packet before the monitoring point is updated, setting the updated data packet as the reference point, and resetting the monitoring point and the preset monitoring times.
Preferably, the packet detection module is specifically configured to:
if the position of the newly received data packet inserted into the jitter buffer area is at the tail of the queue or behind the monitoring point, the data packet before the monitoring point is not updated;
and if the position of the newly received data packet inserted into the jitter buffer area is in front of the monitoring point, updating the data packet in front of the monitoring point.
In a third aspect, to achieve the above object, the present application provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of the method for fast reducing a jitter buffer according to any of the first aspect.
In a fourth aspect, to achieve the above object, the present application provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method for fast jitter buffer reduction according to any one of the first aspect.
According to the technical scheme, the method and the device for quickly reducing the jitter buffer area provided by the embodiment of the application detect whether the monitoring point is arranged in the jitter buffer area, the monitoring point is a data packet which is immediately behind a first lost data packet and is searched from a reference point forward, and the reference point is used as a starting data packet for searching; if the monitoring point is set, detecting whether a data packet in front of the monitoring point is updated or not; if the data packet before the monitoring point is not updated, starting to monitor the receiving of the data packet in the jitter buffer, and adding 1 to the actual monitoring times every time of monitoring; and when the actual monitoring times reach the preset monitoring times, clearing all data packets in front of the monitoring point. Through the execution steps, after the huge jitter occurs and the network recovers stably, the length of the jitter buffer area is reduced as fast as possible, so that the low delay is recovered more quickly, and the purpose of real-time communication is achieved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
In order to more clearly describe the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a flowchart illustrating a first embodiment of a method for fast reducing a jitter buffer according to an embodiment of the present application;
FIGS. 2-3 are schematic diagrams illustrating an embodiment of a method for fast reducing a jitter buffer according to an embodiment of the present disclosure;
FIG. 4 is a flowchart illustrating a second embodiment of a method for fast reducing a jitter buffer according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating an overall process of a method for fast reducing jitter buffer according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an apparatus for rapidly reducing a jitter buffer according to an embodiment of the present disclosure.
Detailed Description
The features and advantages of the present application will become more apparent and appreciated from the following detailed description of the application.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
In the description of the present application, it should be noted that the terms "upper", "lower", "inner", "outer", "front", "rear", "left" and "right", etc. indicate orientations or positional relationships based on operational states of the present application, and are only used for convenience of description and simplification of description, but do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present application. Furthermore, the terms "first," "second," "third," and "fourth" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
First, several terms related to the embodiments of the present invention are explained:
and (3) packaging sequence: the sequential numbering of the voice packets, which is generally a naturally growing integer, is defined by the sender, starting with 0 and then adding 1 one by one. After the overflow threshold is reached, the previously smaller packet sequence values are meaningless to have expired early and can be reused. Thus, after the overflow threshold is reached, the reset to 0 is typically reset and the count is restarted.
Jitter buffer: in order to buffer the jitter of the voice data packets, the receiving end stores the voice data packets in an area, called a jitter buffer, without playing the voice data packets.
The applicant has found that when voice data packets are transmitted over a network, it is difficult to control the transmission of the voice data packets because the sensitivity of the call to delay is essentially a DUP transmission, i.e. "best effort". In a time-varying channel, such services will result in packet loss and unpredictable time delay (i.e., delay time), etc., and the quality of service of voice is not guaranteed. Due to the real-time characteristic of voice communication, the voice communication has strict requirements on voice quality. The current parameters for measuring the voice quality mainly include: and bandwidth indexes such as time delay and time delay jitter of voice data packet transmission, packet loss rate of the voice data packet and the like. Therefore, the voice service quality can be improved by ensuring the transmission bandwidth, reducing the transmission delay, reducing the packet loss rate of data, reducing the delay jitter and other measures in the network.
Jitter is the degree of variation in packet delay. If the network is congested, queuing delays affect end-to-end delays and cause packets transmitted over the same communication link to be delayed differently, while jitter describes the degree to which such a delay varies. To resolve this jitter, a jitter buffer may be provided at the receiving end of the packet, the size of the jitter buffer being determined by the jitter level.
A jitter buffer is a shared data area in which voice data packets are collected, stored, and delivered to the voice processor at regular intervals. The jitter buffer is placed at the receiving end of the voice communication link and intentionally delays and evenly outputs the arriving voice data packets so that the end user experiences a clear and undistorted sound. And the delay will affect the user experience. In a strict audio-video call, a delay of up to 400 milliseconds is easily perceived by a user. If the functions of the audio and video calls are combined, the audio and video calls should be synchronized, and the respective delay difference between the audio and video is guaranteed to be less than 150 ms, so as to guarantee good user experience. However, in general, it is important to keep the communication delay as low as possible. The international telecommunications union ITU recommends that network latency should be kept below 100 milliseconds.
Jitter buffers are divided into static jitter buffers and adaptive jitter buffers. The static jitter buffer has a jitter buffer area with a fixed length, the length is set during initialization, automatic updating cannot be carried out in the working process, and as a result, the voice delay time is fixed for different network conditions, the time of voice data packets passing through the jitter buffer area is fixed, when the network jitter is serious, the situation that the data in the jitter buffer area overflows to cause packet loss exists, and when the network is excellent, the unsatisfactory audio delay time exists because of fixed voice processing time.
The self-adaptive jitter buffer has ideal performance, when the network jitter is large, the length of the buffer area is automatically increased according to the algorithm mechanism of the self-adaptive jitter buffer so as to reduce the overflow and packet loss of the buffer area, and when the network tends to be stable, the length of the buffer area is reduced so as to reduce the delay time of the voice data packet.
The adaptive buffer can automatically increase or decrease the size of the buffer area according to the current network delay variation condition, and the direct embodiment of the delay variation amplitude is the change of network transmission delay, namely the change of the difference value of the receiving time stamp and the sending time stamp of different voice data packets. Therefore, most adaptive buffers in the market use a timestamp calculation method to count the delay difference to control the size of the jitter buffer.
Currently, a common adaptive jitter buffer generally has a method for controlling the adaptive jitter buffer by an algorithm of varying the amplitude of the data packet transmission delay. When the delay variation is larger, it indicates that the network jitter is obvious, and at this time, the adaptive jitter buffer will automatically expand the size of the jitter buffer to accommodate more data packets to be queued and wait for stable and uniform output (uniform time interval). When the time delay variation amplitude is reduced from large to small, the network jitter tends to be stable, at the moment, the self-adaptive jitter buffer can gradually shrink the size of the jitter buffer area, and simultaneously, the length of the jitter buffer area is changed into the minimum value evaluated by the self-adaptive jitter buffer along with the process of regularly and actively losing packets. Theoretically, if the amplitude of the time delay variation is small and the amplitude curve tends to be straight, the operation of the data transmission processing unit is quite stable, and the jitter buffer can only reserve one unit to meet the requirement of asynchronous working time difference of the input/output interface of the jitter buffer, so that the transparent forwarding effect of data packet exchange is realized.
In the method for controlling jitter according to the amplitude of the delay variation, the adjustment of the jitter buffer in the jitter buffer is always detected and increased or decreased gradually and sequentially according to a certain step rule, because the jitter buffer estimates the network jitter phenomenon according to the transmission delay variation of the data packet calculated at the time when the first data packet is received after the start of the jitter buffer.
For example: the sending end produces 5 voice fragment data packets with the time length of S at a constant speed, namely the sending interval time of each data packet is S, the 5 data packets are respectively defined as P1-P5, the time when the receiving end receives P1 is T1, the time when the receiving end receives P2 is T2, and the network transmission time evaluation reference value R1 of P1 is T2-T1-S. By repeating the above steps, T3-T5 when P3-P5 arrives can be obtained, and the time delay average jitter time evaluation value of the voice data packet on the line in unit time can be summarized. This evaluation value is obviously greatly influenced by the sampling time and the length of the sampling time interval, and lags behind by at least one packet duration, and the evaluation value in a too short sampling time is often not relatively accurate. Since it is possible that the time of the sampling calculation is exactly the moment when the network jitter is large, and it is very common that the jitter on the network is very severe within a few seconds and then quickly recovers to be steady. Therefore, the above jitter buffer size evaluation method requires more sampling point data collection to obtain a relatively accurate result. Since increasing the jitter buffer length represents a factor of greater voice delay time, the buffer increase process is periodically calculated to gradually increase or decrease based on an empirical value due to the prudent attitude of experience degradation caused by voice call delay.
However, in our daily practical production system, due to the factors such as network speed limit and congestion, the arrival time of the delayed data packets is not completely consistent with poisson distribution, and a large number of data packets are usually received at one instant. In the adaptive processing process of the jitter buffer, if the speed of the increase of the length of the jitter buffer cannot catch up with the speed and frequency of the dense arrival of the data packets in unit time caused by network congestion, jitter and the like, part of the data packets are discarded due to the overflow of the jitter buffer, and the voice-stuck product experience effect is also caused in an extreme network congestion scene.
Unlike a method of controlling the size of the jitter buffer simply by a time stamp, there is also an apparatus and method of controlling the size of the jitter buffer by the number of times of accessing packets.
If all the data packets are cached when a large number of data packets are received at one time, the packet loss phenomenon cannot occur. When network jitter causes a large number of data packets to arrive within a certain output packet-taking interval (taking a voice data packet as an example, generally one data packet stores voice data with a time length of 40ms, and a mixer or a player can regularly arrive at a jitter buffer to obtain the voice data which is stably output after being processed by jitter buffer control), the length of the jitter buffer is set according to the number of the arriving data packets, so that packet loss is reduced. And after the network tends to be stable, the length of the buffer area is correspondingly reduced because the number of the data packets arriving in the packet taking interval is reduced, thereby reducing the delay caused by the buffer area.
Unlike the jitter buffer for statistical delay differences, the packet order controlled jitter buffer uses the difference in packet order that arrives at the jitter buffer at the same time as the jitter buffer length. For example, five voice packets P1-P5 arrive at the jitter buffer at the receiving end from the transmitting end, and when the jitter is small and can be ignored basically, the packets P1-P5 arrive in sequence, and at this time, the jitter buffer can be reduced to the shortest, i.e. 1 packet is reserved. If the network has jitter, it is likely that the jitter will arrive at P1-P5 close to the same time, and the length of the jitter buffer can be set to (5-1) +1 to 5 packets, so as to ensure that no packet loss occurs.
Stretching a jitter buffer: when the length target _ level of the buffer area is smaller than the total length current _ level of the currently received data packet, the jitter buffer area needs to be expanded, and the expanding method of the jitter buffer area comprises the following steps: the total length current _ level of the currently received data packet is set as the new buffer length target _ level, and by the method, the stretching of the jitter buffer can be realized quickly.
Jitter buffer contraction: when the jitter buffer length target _ level is found to be larger than the total length current _ level of the currently received data packet, the buffer needs to be contracted. Since continuous contraction will cause a speech discontinuity, it is necessary to gradually contract at intervals. The shrinking method comprises the following steps:
1. calculating jitter buffer length: after a certain time interval, generally 500ms to 1000ms, if the jitter buffer length target _ level is continuously larger during this period, the target _ level is reduced to a certain value, for example, the target _ level is reduced to target _ level (target _ level-current _ level) divided by 3, that is, the jitter buffer size is adjusted to reduce one third of the difference of the recent length.
2. Actual shrinking operation: after a certain time interval (generally 500ms-1000 ms), when the number of packets in the jitter buffer exceeds the length target _ level of the jitter buffer, the jitter buffer needs to be contracted, a voice data packet which can be discarded is obtained through calculation, and the voice data packet is discarded. But actually shrinks slower considering the sound continuity requirements.
Under the influence of jitter, if the network recovers after serious congestion, a large number of voice data packets flow into a jitter buffer area, the situation that current _ level is large will occur, and as the current _ level will influence a target _ level value, the delay of the jitter buffer area will be large. At this time, the network has recovered, and therefore, target _ level needs to be decreased quickly, but is restricted by the jitter buffer contraction operation, and even if target _ level is decreased, a large amount of time is still required for the contraction of the jitter buffer.
Therefore, the purpose of the present application is to shorten the length of the jitter buffer as fast as possible when the network recovers to be stable after the occurrence of huge jitter, so as to recover low delay more quickly and achieve the purpose of real-time communication.
Specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating a method for rapidly reducing a jitter buffer according to a first embodiment of the present invention, as shown in fig. 1, the method includes steps S101 to S104.
S101: and detecting whether a monitoring point is set in the jitter buffer area.
The monitoring point is a data packet immediately behind a first lost data packet searched forward from a reference point, and the reference point is used as a starting data packet of the search.
The jitter buffer is a queue similar to a queue using a first-in-first-out algorithm, and arranges packets in the packet order of the received packets. After receiving the data packet, the receiving end reads the packet sequence of the data packet, and then finds out the position where the data packet should be stored in the jitter buffer area through a sequence searching method. In most cases, the packet is inserted at the end of the queue of the jitter buffer, i.e. the last packet is the most recently received packet and only needs to be added at the end of the queue. In some cases, if the data packets are received out of order, the appropriate position insertion queue needs to be found forward. And traversing the jitter buffer queue once when receiving the data packet and executing the jitter buffer queue inserting action each time to determine whether the reference point and the monitoring point need to be set or modified currently.
The reference point and the monitoring point are integer pointer type values, and whether the reference point and the monitoring point are set or not can be determined by judging whether the preset values are 0 or not and whether the reference point and the monitoring point are already in the processing logic in the rapid jitter reduction buffer area or not.
In addition, the pointer surface points to the packet order of the data packet, substantially points to the memory address of the data packet, and represents the corresponding data packet in the packet order in the following embodiment.
The lost data packet is a data packet temporarily marked as lost, and if the data packet is subsequently sent, the data packet is a valid data packet, and the marking is cancelled.
For example, 10 data packets should be received in the jitter buffer, data packets with actual packet orders of 2, 3, 4, and 8 are not sent to the jitter buffer, the data packet with the packet order of 10 is initially set as the reference point, a forward search is started from the data packet with the packet order of 10, the first missing data packet to be searched is the data packet with the packet order of 8, then the data packet with the packet order of 9 immediately following the data packet with the packet order of 8 can be set as the monitoring point, and the data packet with the packet order of 9 is a valid data packet.
S102: and if the monitoring point is arranged, detecting whether the data packet in front of the monitoring point is updated or not.
When receiving a data packet and executing an insertion action each time, the jitter buffer queue needs to be traversed once, and in the process, whether the data packet before the monitoring point is updated can be determined, specifically:
if the position of the newly received data packet inserted into the jitter buffer area is at the tail of the queue or behind the monitoring point, the data packet before the monitoring point is not updated;
and if the position of the newly received data packet inserted into the jitter buffer area is in front of the monitoring point, updating the data packet in front of the monitoring point.
S103: and if the data packet before the monitoring point is not updated, starting to monitor the receiving of the data packet in the jitter buffer, and adding 1 to the actual monitoring times every time of monitoring.
S104: and when the actual monitoring times reach the preset monitoring times, clearing all data packets in front of the monitoring point.
In the above steps, before monitoring the reception of the data packets in the jitter buffer, a preset monitoring number, that is, a count of the reception condition of the monitoring data packets, needs to be set. After the preset monitoring times are set, the actual monitoring times are gradually increased from 0 along with the action of inserting a newly received data packet into a buffer queue, and the actual monitoring times are increased by 1 every time the newly received data packet is queued, until the actual monitoring times reach the preset monitoring times, all data packets before the monitoring point are discarded, and the purpose of quickly reducing the length of a jitter buffer is achieved.
In this embodiment, if the data packet before the monitoring point is updated, that is, the data packet marked as lost is delivered and inserted into the position before the monitoring point, the updated data packet is set as the reference point, and the monitoring point and the preset monitoring times are reset. For example, 10 data packets should be received in the jitter buffer, data packets with actual packet orders of 2, 3, 4 and 8 are not delivered, a data packet with a packet order of 10 is initially set as the reference point, if a data packet with a packet order of 8 is delivered and inserted into the jitter buffer queue, a data packet with a packet order of 8 is set as a new reference point, and the monitoring point and the preset monitoring times are reset according to a set rule.
Fig. 2 and 3 are schematic flow charts illustrating specific jitter buffer packet reception. After the data packets after the pack20 arrive at the jitter buffer after the sudden change of the length of the jitter buffer caused by receiving the pack20 packet, the part of the jitter buffer below the pack20 in the packet sequence can be discarded, and the effective data length of the jitter buffer can be reduced.
As shown in fig. 4, in a second embodiment, the method for rapidly reducing the jitter buffer further includes:
s201: detecting whether the reference point is set.
And detecting whether a monitoring point is set in the jitter buffer area or not, and detecting whether the reference point is set in the jitter buffer area or not after the monitoring point is not set. As can be seen from step S101, the setting of the monitoring point is based on the setting of the reference point, so if the monitoring point is not set, the setting of the reference point needs to be further determined. The criterion for determining whether the reference point is set is as described in step S101, and is not described herein again.
S202: and if the reference point is set, searching the first lost data packet before the reference point.
S203: and judging whether the ratio of the total number of the lost data packets before the first lost data packet to the total number of the data packets which should be received by the jitter buffer is larger than a first preset ratio or not. The total number of lost packets before the first lost packet is counted to include the first lost packet itself.
S204: and if the data packet is larger than the first preset ratio, setting the data packet which is immediately behind the first lost data packet as the monitoring point.
For example, 10 packets should be received in the jitter buffer, packets with actual packet orders of 2, 3, 4, and 8 are not sent, a packet with packet order 10 is initially set as the reference point, a forward search is started from a packet with packet order 10, the first missing packet to be searched is a packet with packet order 8, 4 missing packets are found, the ratio of the total number of missing packets before the first missing packet to the total number of packets to be received in the jitter buffer is 4/10, and if the ratio is greater than a first preset ratio 1/3, a packet with packet order 9 is set as the monitoring point. The first predetermined ratio is an empirical value, preferably 1/3.
S205: and if the reference point is smaller than the first preset ratio, resetting the reference point, the monitoring point and the preset monitoring times.
Fig. 5 is a flowchart illustrating a complete fast jitter buffer reduction according to an embodiment of the present invention. In another embodiment, after detecting whether the reference point is set, the method for rapidly reducing the jitter buffer further includes:
s301: if the reference point is not set, judging whether a preset condition for using a fast reduction jitter buffer is reached, wherein the preset condition comprises the following steps: whether there are packets in the jitter buffer for a time length exceeding 1000ms and/or the ratio of the total number of packets lost in the jitter buffer to the total number of packets that the jitter buffer should receive is larger than a second predetermined ratio, which is an empirical value, preferably 1/3.
S302: and if the preset condition is met, setting a data packet at the tail of the jitter buffer queue as the reference point, and resetting the monitoring point and the preset monitoring times.
The determination of whether the preset condition for using the fast reducing jitter buffer is reached in step S301 is a dynamic determination process, if the monitoring point or the reference point is set, it indicates that the monitoring point or the reference point is already in the fast shrinking processing logic, and if neither the monitoring point nor the reference point is set, or the network is abnormal, it needs to determine whether the preset condition for using the fast reducing jitter buffer is reached. Under the condition of normal network transmission, data packets are basically sent in sequence on time, namely the transmission delay variation is very small but generally not 0, and the condition is not satisfied at this moment and excessive processing is not needed.
In step S302, the reference point is first set as the current queue tail, and the monitoring point is set according to the setting rule. With the insertion of a new data packet into the jitter buffer queue, if the data packet newly inserted into the jitter buffer queue is at the tail of the queue, the reference point moves forward along with the jitter buffer queue and is no longer a queue tail element; and if the data packet newly inserted into the jitter buffer area queue is in front of the monitoring point, the reference point is updated to be the data packet newly inserted into the jitter buffer area queue.
After the network shakes greatly, the length of a shaking buffer area is too large due to the fact that a large number of data packets flow in, audio and video delay is caused, the existing shrinking method is limited, shrinking time is long, and fast recovery cannot be achieved. By adopting the method for rapidly reducing the jitter buffer area, a large amount of contraction time can be saved, low delay can be recovered more quickly, and the purpose of real-time communication is achieved.
For example, the jitter buffer may be flooded with 50 packets due to severe jitter, each packet has a duration of 40ms, and after the network recovers, the length of the jitter buffer needs to be reduced to 4, so that according to the conventional puncturing method, it is assumed that one packet is punctured after every 20 packets, and it is necessary to pass through the puncturing _ time (50-4) × 20 × 40 (36800 ms).
By using the method described in the present application, 50 packets are added, 20-45 are all lost packets, and after a packet with a packet order of 50 is received, no update is made to the packet before the packet with a packet order of 45, then after the update of the preset monitoring number of times, the fast puncturing is started, the total puncturing time is (50-45 +5) × 20 × 40 is 8000ms, and the rest is performed by using a normal puncturing method.
Corresponding to the embodiment of the method for rapidly reducing the jitter buffer provided by the present application, the present application also provides an embodiment of an apparatus for rapidly reducing the jitter buffer. Referring to fig. 6, a schematic structural diagram of an apparatus for fast reducing a jitter buffer according to an embodiment of the present application is provided, the apparatus including:
a monitoring point detection module 101, configured to detect whether a monitoring point is set in the jitter buffer, where the monitoring point is a data packet immediately behind a first lost data packet searched forward from a reference point, and the reference point is an initial data packet used for searching;
a data packet detection module 102, configured to detect whether a data packet before the monitoring point is updated if the monitoring point is set;
a data packet monitoring module 103, configured to start monitoring reception of a data packet in the jitter buffer if the data packet before the monitoring point is not updated, where 1 is added to the actual monitoring frequency each time monitoring is performed;
the data packet clearing module 104 is configured to clear all data packets before the monitoring point when the actual monitoring times reach a preset monitoring time;
a resetting module 105, configured to set the updated data packet as the reference point if the data packet before the monitoring point is updated, and reset the monitoring point and the preset monitoring times.
The apparatus for fast reducing jitter buffer further comprises:
a reference point detecting module 201, configured to detect whether the reference point is set;
a data packet searching module 202, configured to search, if the reference point is set, a first lost data packet before the reference point;
a first determining module 203, configured to determine whether a ratio of a total number of lost data packets before the first lost data packet to a total number of data packets that should be received by the jitter buffer is greater than a first preset ratio.
A monitoring point setting module 204, configured to set, if the monitoring point is greater than a first preset ratio, a data packet immediately following the first lost data packet as the monitoring point;
the resetting module 105 is further configured to reset the reference point, the monitoring point, and the preset monitoring times if the reference point, the monitoring point, and the preset monitoring times are smaller than a first preset ratio.
The apparatus for rapidly reducing jitter buffer further comprises:
a second determining module 301, configured to determine whether a preset condition for using a fast downshifting buffer is reached if the reference point is not set, where the preset condition includes: whether data packets with the time length exceeding 1000ms exist in the jitter buffer area and/or the ratio of the total number of the lost data packets in the jitter buffer area to the total number of the data packets which should be received by the jitter buffer area is larger than a second preset ratio;
a reference point setting module 302, configured to set a data packet at the tail of the jitter buffer queue as the reference point if the preset condition is met, and reset the monitoring point and the preset monitoring times.
The packet detection module 102 is specifically configured to:
if the position of the newly received data packet inserted into the jitter buffer area is at the tail of the queue or behind the monitoring point, the data packet before the monitoring point is not updated;
and if the position of the newly received data packet inserted into the jitter buffer area is in front of the monitoring point, updating the data packet in front of the monitoring point.
According to the method and the device for rapidly reducing the jitter buffer area, whether a monitoring point is set in the jitter buffer area or not is detected, the monitoring point is a data packet which is immediately behind a first lost data packet and is searched from a reference point forward, and the reference point is used as a starting data packet for searching; if the monitoring point is set, detecting whether a data packet in front of the monitoring point is updated or not; if the data packet before the monitoring point is not updated, starting to monitor the receiving of the data packet in the jitter buffer, and adding 1 to the actual monitoring times every time of monitoring; and when the actual monitoring times reach the preset monitoring times, clearing all data packets in front of the monitoring point. Through the execution steps, after the huge jitter occurs and the network recovers stably, the length of the jitter buffer area is reduced as fast as possible, so that the low delay is recovered more quickly, and the purpose of real-time communication is achieved.
According to the method for rapidly reducing the jitter buffer, the embodiment of the application also provides a readable storage medium and a computer device. The readable storage medium has stored thereon an executable program, which when executed by the processor implements the steps of the above-described method of rapidly reducing a jitter buffer; the computer device comprises a memory, a processor and an executable program stored on the memory and running on the processor, wherein the processor executes the program to realize the steps of the method for rapidly reducing the jitter buffer.
The present application has been described in detail with reference to specific embodiments and illustrative examples, but the description is not intended to limit the application. Those skilled in the art will appreciate that various equivalent substitutions, modifications or improvements may be made to the presently disclosed embodiments and implementations thereof without departing from the spirit and scope of the present disclosure, and these fall within the scope of the present disclosure. The protection scope of this application is subject to the appended claims.

Claims (10)

1. A method of fast jitter buffer reduction, the method comprising:
detecting whether a monitoring point is set in a jitter buffer area, wherein the monitoring point is a data packet which is immediately adjacent to the rear of a first lost data packet searched forward from a reference point, and the reference point is used as a starting data packet for searching;
if the monitoring point is set, detecting whether a data packet in front of the monitoring point is updated or not;
if the data packet before the monitoring point is not updated, starting to monitor the receiving of the data packet in the jitter buffer, and adding 1 to the actual monitoring times every time of monitoring;
and when the actual monitoring times reach the preset monitoring times, clearing all data packets in front of the monitoring point.
2. A method for fast reducing jitter buffer as defined in claim 1, further comprising:
detecting whether the reference point is set;
if the reference point is set, searching a first lost data packet before the reference point;
judging whether the ratio of the total number of the lost data packets before the first lost data packet to the total number of the data packets which should be received by the jitter buffer is larger than a first preset ratio or not;
if the data packet is larger than the first preset ratio, setting the data packet which is next to the first lost data packet as the monitoring point;
and if the reference point is smaller than the first preset ratio, resetting the reference point, the monitoring point and the preset monitoring times.
3. A method for fast reducing jitter buffer as claimed in claim 2, wherein said detecting whether to set the reference point further comprises:
if the reference point is not set, judging whether a preset condition for using a fast reduction jitter buffer is reached, wherein the preset condition comprises the following steps: whether data packets with the time length exceeding 1000ms exist in the jitter buffer area and/or the ratio of the total number of the lost data packets in the jitter buffer area to the total number of the data packets which should be received by the jitter buffer area is larger than a second preset ratio;
and if the preset condition is met, setting a data packet at the tail of the jitter buffer queue as the reference point, and resetting the monitoring point and the preset monitoring times.
4. A method for fast reducing jitter buffer in accordance with claim 1, wherein said detecting whether there is an update to the packet before said watchpoint, if said watchpoint is set, further comprises:
and if the data packet before the monitoring point is updated, setting the updated data packet as the reference point, and resetting the monitoring point and the preset monitoring times.
5. A method for fast reducing jitter buffer in accordance with claim 4, wherein if the watchpoint is set, detecting whether the data packet before the watchpoint has been updated comprises:
if the position of the newly received data packet inserted into the jitter buffer area is at the tail of the queue or behind the monitoring point, the data packet before the monitoring point is not updated;
and if the position of the newly received data packet inserted into the jitter buffer area is in front of the monitoring point, updating the data packet in front of the monitoring point.
6. An apparatus for fast reducing jitter buffer, the apparatus comprising:
the monitoring point detection module is used for detecting whether a monitoring point is set in the jitter buffer area, the monitoring point is a data packet which is immediately behind a first lost data packet searched from a reference point forward, and the reference point is used as an initial data packet for searching;
the data packet detection module is used for detecting whether the data packet before the monitoring point is updated or not if the monitoring point is arranged;
the data packet monitoring module is used for starting to monitor the receiving of the data packet in the jitter buffer area if the data packet before the monitoring point is not updated, and adding 1 to the actual monitoring times every time the data packet is monitored;
and the data packet clearing module is used for clearing all data packets in front of the monitoring point when the actual monitoring times reach the preset monitoring times.
7. An apparatus for fast reducing jitter buffer as defined in claim 6, further comprising:
a reference point detection module for detecting whether the reference point is set;
the data packet searching module is used for searching a first lost data packet before the reference point if the reference point is set;
a first judging module, configured to judge whether a ratio of a total number of lost packets before the first lost packet to a total number of packets that should be received by the jitter buffer is greater than a first preset ratio;
a monitoring point setting module, configured to set, as the monitoring point, a data packet immediately following the first lost data packet if the monitoring point is greater than a first preset ratio;
and the resetting module is used for resetting the reference point, the monitoring point and the preset monitoring times if the reference point, the monitoring point and the preset monitoring times are smaller than a first preset ratio.
8. An apparatus for fast reducing jitter buffer as defined in claim 7, further comprising:
a second determining module, configured to determine whether a preset condition for using a fast-reducing jitter buffer is met if the reference point is not set, where the preset condition includes: whether data packets with the time length exceeding 1000ms exist in the jitter buffer area and/or the ratio of the total number of the lost data packets in the jitter buffer area to the total number of the data packets which should be received by the jitter buffer area is larger than a second preset ratio;
and the reference point setting module is used for setting a data packet at the tail of the jitter buffer queue as the reference point and resetting the monitoring point and the preset monitoring times if the preset condition is met.
9. An apparatus for fast reducing jitter buffer as defined in claim 6, wherein the reset module is further configured to:
and if the data packet before the monitoring point is updated, setting the updated data packet as the reference point, and resetting the monitoring point and the preset monitoring times.
10. The apparatus of claim 9, wherein the packet detection module is specifically configured to:
if the position of the newly received data packet inserted into the jitter buffer area is at the tail of the queue or behind the monitoring point, the data packet before the monitoring point is not updated;
and if the position of the newly received data packet inserted into the jitter buffer area is in front of the monitoring point, updating the data packet in front of the monitoring point.
CN201811634108.0A 2018-12-29 2018-12-29 Method and device for rapidly reducing jitter buffer Active CN109639532B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811634108.0A CN109639532B (en) 2018-12-29 2018-12-29 Method and device for rapidly reducing jitter buffer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811634108.0A CN109639532B (en) 2018-12-29 2018-12-29 Method and device for rapidly reducing jitter buffer

Publications (2)

Publication Number Publication Date
CN109639532A CN109639532A (en) 2019-04-16
CN109639532B true CN109639532B (en) 2022-05-20

Family

ID=66054549

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811634108.0A Active CN109639532B (en) 2018-12-29 2018-12-29 Method and device for rapidly reducing jitter buffer

Country Status (1)

Country Link
CN (1) CN109639532B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113241086B (en) * 2021-05-14 2023-05-30 北京达佳互联信息技术有限公司 Audio processing method, device, electronic equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002077233A (en) * 2000-08-25 2002-03-15 Matsushita Electric Ind Co Ltd Real-time information receiving apparatus
US7359324B1 (en) * 2004-03-09 2008-04-15 Nortel Networks Limited Adaptive jitter buffer control
CN101582842A (en) * 2008-05-16 2009-11-18 华为技术有限公司 Congestion control method and congestion control device
CN107770124A (en) * 2016-08-15 2018-03-06 北京信威通信技术股份有限公司 A kind of dynamic control method and device of ip voice buffering area
CN109104263A (en) * 2017-06-20 2018-12-28 阿里巴巴集团控股有限公司 Method of adjustment, the device and system of memory capacity

Also Published As

Publication number Publication date
CN109639532A (en) 2019-04-16

Similar Documents

Publication Publication Date Title
US11546399B2 (en) Method and apparatus for providing a low latency transmission system using adjustable buffers
JP5335061B2 (en) How to estimate the buffer occupancy level
Laoutaris et al. Intrastream synchronization for continuous media streams: A survey of playout schedulers
EP3329641B1 (en) Monitoring network conditions
JP4504270B2 (en) Packet relay apparatus and packet relay method
EP3466001B1 (en) Media buffering
US9985887B2 (en) Method and apparatus for providing a low latency transmission system using adaptive buffering estimation
EP2140590B1 (en) Method of transmitting data in a communication system
CN112104562B (en) Congestion control method and device, communication network and computer storage medium
EP2936770A1 (en) Apparatus and methods for controlling jitter buffer
CN104394421A (en) Video frame processing method and device
EP1931068A1 (en) Method of adaptively dejittering packetized signals buffered at the receiver of a communication network node
CN109639532B (en) Method and device for rapidly reducing jitter buffer
CN113364698B (en) Bandwidth estimation method, system, electronic device and storage medium
JP6512282B2 (en) Communication apparatus, available band calculation system, available band calculation method and program
WO2017031928A1 (en) Data packet transmission method, device and communication system
JP2013131903A (en) Network node and packet control method
JPS59190757A (en) Packet communication system
US20110305151A1 (en) Apparatus for transmitting packet
EP2262171A1 (en) Method of routing a packet
CN107707928B (en) Data stream delay control method and device and receiving equipment
CN114124755A (en) Network data cut-off detection method and device, terminal equipment and storage medium
JP4983054B2 (en) Server apparatus and buffer control method in the same apparatus
CN114866196B (en) Data packet retransmission method, device, electronic equipment and storage medium
JP2004056328A (en) Router, dynamic quality control method for router, program, and recording medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20190416

Assignee: Guiyang Longma Video Technology Co.,Ltd.

Assignor: GUIYANG LONGMASTER INFORMATION & TECHNOLOGY Co.,Ltd.

Contract record no.: X2023980033354

Denomination of invention: A method and device for quickly reducing jitter buffer

Granted publication date: 20220520

License type: Common License

Record date: 20230308

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20190416

Assignee: Guiyang Langma Communication Technology Co.,Ltd.

Assignor: GUIYANG LONGMASTER INFORMATION & TECHNOLOGY Co.,Ltd.

Contract record no.: X2023980033647

Denomination of invention: A method and device for quickly reducing jitter buffer

Granted publication date: 20220520

License type: Common License

Record date: 20230316

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20190416

Assignee: GUIYANG SANJIU INTERNET MEDICAL Co.,Ltd.

Assignor: GUIYANG LONGMASTER INFORMATION & TECHNOLOGY Co.,Ltd.

Contract record no.: X2023980033909

Denomination of invention: A method and device for quickly reducing jitter buffer

Granted publication date: 20220520

License type: Common License

Record date: 20230324

EE01 Entry into force of recordation of patent licensing contract