Summary of the invention
This application provides a kind of method and devices of Fast Reduction jitter-buffer, huge in appearance to solve existing method
After big shake, when network recovery is steady, jitter-buffer shrinks slow problem.
In a first aspect, to achieve the above object, it is described this application provides a kind of method of Fast Reduction jitter-buffer
Method includes:
Whether monitoring point is set in detection jitter-buffer, the monitoring point is first searched forward from reference point
The data packet of loss immediately behind data packet, the reference point be as search for initial data packet;
If being provided with the monitoring point, whether the data packet before detecting the monitoring point has update;
If the data packet before the monitoring point does not update, start the reception for monitoring data packet in jitter-buffer, often
The primary then actual monitoring number of monitoring adds 1;
All data packets when actual monitoring number reaches default monitoring number, before removing the monitoring point.
Preferably, the method for the Fast Reduction jitter-buffer further include:
It detects whether that the reference point is arranged;
If being provided with the reference point, the data packet of first before searching for the reference point loss;
It is received to judge that the data packet sum of the loss before the data packet of first loss is answered with jitter-buffer
Whether the ratio between data packet sum is greater than the first default ratio;
If it is greater than the first default ratio, be arranged the data packet of first loss immediately behind data packet be the prison
Measuring point;
If it is less than the first default ratio, the reference point, the monitoring point and the default monitoring number are reset.
It is preferably, described to detect whether to be arranged after reference point, further includes:
If being not provided with the reference point, judge whether to reach the preset condition using Fast Reduction jitter-buffer,
The preset condition includes: whether to have more than the data packet of 1000ms time span in the jitter-buffer and/or described tremble
The data packet sum and jitter-buffer lost in dynamic buffer area answer the ratio between received data packet sum to be greater than the second default ratio;
If reaching the preset condition, the data packet of setting jitter-buffer rear of queue is the reference point, resets institute
State monitoring point and the default monitoring number.
Preferably, if described be provided with the monitoring point, whether the data packet before detecting the monitoring point has update
Afterwards, further includes:
If the data before the monitoring point are surrounded by update, the reference point is set by the data packet of update, is reset
The monitoring point and the default monitoring number.
Preferably, if being provided with the monitoring point, whether the data packet before detecting the monitoring point has update, comprising:
If new received data packet is inserted into the position of the jitter-buffer in rear of queue or after the monitoring point,
Then the data packet before the monitoring point does not update;
If the position of new received data packet insertion jitter-buffer is before the monitoring point, before the monitoring point
Data are surrounded by update.
Second aspect, provides a kind of device of Fast Reduction jitter-buffer, and described device includes:
Monitoring point detection module, for detecting monitoring point whether is arranged in jitter-buffer, the monitoring point is from reference
The data packet of search forward first loss of point immediately behind data packet, the reference point is as the starting number searched for
According to packet;
Data packet detection module, if whether the data packet before detecting the monitoring point for being provided with the monitoring point
There is update;
Data packet monitoring modular starts to monitor jitter buffer if do not updated for the data packet before the monitoring point
The reception of data packet in area, every primary then actual monitoring number of monitoring add 1;
Data packet removes module, for when actual monitoring number reaches default monitoring number, before removing the monitoring point
All data packets.
Preferably, the device of the Fast Reduction jitter-buffer, further includes:
Reference point detection module, for detecting whether the reference point is arranged;
Data packet search module, if first loss for being provided with the reference point, before searching for the reference point
Data packet;
First judgment module, for judge it is described first loss data packet before loss data packet sum with tremble
Dynamic buffer area answers whether the ratio between received data packet sum is greater than the first default ratio;
Monitoring point setup module, for being arranged behind the data packet of first loss if it is greater than the first default ratio
Adjacent data packet is the monitoring point;
Module is reset, for resetting the reference point, the monitoring point and the default prison if it is less than the first default ratio
Survey number.
Preferably, the device of the Fast Reduction jitter-buffer, further includes:
Second judgment module, if judging whether to reach and be shaken using Fast Reduction for being not provided with the reference point
The preset condition of buffer area, the preset condition include: that 1000ms time span whether is had more than in the jitter-buffer
The data packet sum and jitter-buffer lost in data packet and/or the jitter-buffer answer the ratio between received data packet sum
Ratio default greater than second;
Reference point setup module, if the data packet of jitter-buffer rear of queue is arranged for reaching the preset condition
For the reference point, the monitoring point and the default monitoring number are reset.
Preferably, the resetting module is also used to:
If the data before the monitoring point are surrounded by update, the reference point is set by the data packet of update, is reset
The monitoring point and the default monitoring number.
Preferably, the data packet detection module is specifically used for:
If new received data packet is inserted into the position of the jitter-buffer in rear of queue or after the monitoring point,
Then the data packet before the monitoring point does not update;
If the position of new received data packet insertion jitter-buffer is before the monitoring point, before the monitoring point
Data are surrounded by update.
The third aspect, to achieve the above object, this application provides a kind of computer readable storage mediums, are stored thereon with
Computer program realizes the step of any one of the first aspect method of Fast Reduction jitter-buffer when the program is executed by processor
Suddenly.
Fourth aspect, to achieve the above object, this application provides a kind of computer equipments, including memory, processor
And storage is on a memory and the computer program that can run on a processor, when processor execution described program, realizes the
On the one hand the step of method of any one Fast Reduction jitter-buffer.
By above technical scheme as it can be seen that the method and dress of a kind of Fast Reduction jitter-buffer provided by the embodiments of the present application
It sets, by the way that monitoring point whether is arranged in detection jitter-buffer, the monitoring point is first searched forward from reference point
The data packet of loss immediately behind data packet, the reference point be as search for initial data packet;If be provided with described
Whether monitoring point, the data packet before detecting the monitoring point have update;If the data packet before the monitoring point does not update, open
The reception of data packet in beginning monitoring jitter-buffer, every primary then actual monitoring number of monitoring add 1;When actual monitoring number reaches
When default monitoring number, all data packets before removing the monitoring point.By above-mentioned execution step, there is huge shake
Afterwards, when network recovery is steady, reduces jitter buffer section length quickly as far as possible faster to restore low latency and reach real-time friendship
The purpose of stream.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
The application can be limited.
Specific embodiment
It is described in detail below by the application, will become more with these explanations the characteristics of the application with advantage
It is clear, clear.
Dedicated word " exemplary " means " being used as example, embodiment or illustrative " herein.Here as " exemplary "
Illustrated any embodiment should not necessarily be construed as preferred or advantageous over other embodiments.Although each of embodiment is shown in the attached drawings
In terms of kind, but unless otherwise indicated, it is not necessary to attached drawing drawn to scale.
In the description of the present application, it should be noted that term " on ", "lower", "inner", "outside", "front", "rear", " left side "
The orientation or positional relationship of instructions such as " right sides " is based on the orientation or positional relationship under the application working condition, merely to just
In description the application and simplify description, rather than the device or element of indication or suggestion meaning must have a particular orientation, with
Specific orientation construction and operation, therefore should not be understood as the limitation to the application.In addition, term " first ", " second ", "
Three " are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance with " the 4th ".
First to the present embodiments relate to several technical terms explain:
Bao Xu: the serial number of VoP, the usually integer of natural increase are defined by transmitting terminal, since 0,
Then add 1 one by one.Reach after overflowing critical value, lesser packet sequence value is long past due meaningless before, can be re-used.Therefore it reaches
To after overflowing critical value, it will usually which reset is reset to 0, restarts to count.
Jitter-buffer: receiving end is for the shake of buffers voice data packet, and when receiving VoP, elder generation is not right
It plays out but saves it in a region, this region for saving VoP is known as jitter-buffer.
Applicants have discovered that when sending VoP using network, due to the sensibility conversed to time delay, substantially
It is the transmission mode for taking DUP, i.e., " best effort ", so being difficult to transmit VoP has good control.When
In the channel of change, this service will will lead to packet loss and uncertain time delay (that is: delay time) etc., the service of voice
Quality just cannot be guaranteed.Due to voice communication real-time the characteristics of, so requirement of the voice communication to voice quality is compared
Strictly.The parameter for measuring voice quality at present specifically includes that the time delay of VoP transmission, delay variation, VoP
Packet loss equiband index.Therefore, the time delay of transmission by the bandwidth for guaranteeing to transmit, can be reduced in a network, reduce number
According to packet loss and the measures such as delay variation improve QoS of voice.
Shake is the variation degree of packetization delay.If congestion occurs for network, queueing delay will affect to postpone end to end,
And cause the packetization delay by transmitting on same communication link different, and shake, exactly it is used to describe such delay
The degree of variation.In order to solve this shake, jitter-buffer can be set in the receiving end of data packet, the size of jitter-buffer by
Degree of jitter determines.
Wobble buffer is a shared data area, in this data area, every one section of uniform interval, and language
Sound data packet can be collected, store and be delivered to speech processor.Wobble buffer is placed in the receiving end of speech communication link, it
Intentionally delay, the VoP that uniformly output reaches do not have in this way, which terminal user will experience one clearly
The sound for thering is anything to be distorted.And postpone that user experience will be will affect.In stringent voice and video telephone, delay reaches 400 milliseconds
It is just easy to be perceived by the user.If the function that two kinds of audio and video are conversed is combined together, the call of audio and video
It should keep synchronous, and guarantee the respective time delay difference of audio and video lower than 150 milliseconds, to ensure good user experience.
However, in general, it is critically important for keeping alap communication time-delay.International Telecommunication Union ITU suggests that network delay is answered
This is maintained at 100 milliseconds or less.
Wobble buffer is divided into static jitter buffer device and adaptive jitter buffer.Static jitter buffer device, which has, to be fixed
The jitter-buffer of length, length are configured in initialization, will not automatically update during the work time, as a result, for
Different network conditions, voice latency time are fixed, and VoP is fixed by the time of jitter-buffer, in network jitter
When more serious, there are jitter-buffer data to overflow and packet drop, when network is more excellent, and because the voice fixed
The time is handled, there are the undesirable audio frequency delay times.
Adaptive jitter buffer has ideal performance, when network jitter is larger, according to its algorithm mechanism, certainly
It is dynamic to increase buffer length, to reduce buffer overflow packet loss, and when network tends to be steady, reduce buffer length, to subtract
The hypologia sound packet delay time.
Adaptive buffer can automatically increase or decrease buffer size according to current network time delay change conditions, and time delay changes vibration
The direct embodiment of width is the variation of network transfer delay, namely is different the receiving time stamp and sending time of VoP
The variation of the difference of stamp.Thus in the market most of adaptive buffer use timestamp calculation method statistics time delay difference with
Control jitter-buffer size.
Adaptive jitter buffer common at present generally has a set of with data packet transmission delay variation amplitude arithmetic control
The method in self-adapted jitter buffer area.When time delay changes larger, illustrate that network jitter is obvious, at this time adaptive jitter buffer
Jitter-buffer size can be expanded automatically, to wait in line steady at the uniform velocity (uniform time interval) defeated to accommodate more data packets
Out.And time delay change amplitude from large to small when, illustrate that network jitter tends to be steady, adaptive jitter buffer again can be gradually at this time
Jitter-buffer size is shunk, while with timing active packet loss process, allowing jitter buffer section length to become adaptive jitter slow
Rush the minimum value that device evaluates.Theoretically if time delay changes amplitude very little, amplitude curve tends to illustrate that data are transmitted when straight line
Processing unit operation is quite stable, and jitter-buffer can only retain a unit, is connect with meeting wobble buffer input/output
The requirement of mouth asynchronous working time difference, to realize packet-switching transparent forwarding effect.
In the method above-mentioned for carrying out shake control for foundation with time delay variation amplitude, jitter-buffer in wobble buffer
Adjustment always detect and increase or reduce by easy stages with a fixed step size rule, reason be exactly such wobble buffer be
The time that first data packet is received after starting starts the data packet transmission delay calculated and changes to assess network jitter phenomenon.
Such as: transmitting terminal at the uniform velocity produces the sound bite data packet of a length of S at 5, i.e., each data packet sends interval
Time is S, this 5 data packets are respectively defined as P1-P5, and it is T2, P1 at the time of receiving P2 that receiving end, which is T1 at the time of receiving P1,
Network latency assessment reference value R1=T2-T1-S.And so on, T3-T5 when P3-P5 is reached can be obtained, thus
Sum up the voice data packet delay average jitter time assessed value of unit time interior lines road.This assessed value is obviously sampled
Moment and use time interval length are affected, and at least lag a data packet duration, commenting in the too short sampling time
Valuation is frequently not relatively accurate.As it is possible that the time that sampling calculates is exactly network jitter biggish moment, and net
The situation that shake acutely then and rapidly restores steady very much in several seconds on network is very common.In this way, above shake
Buffer size appraisal procedure just needs more sample point data collections that can just make relatively accurate result.It is trembled due to increasing
Dynamic buffer length just represents the factor of bigger voice latency time, causes experience to decline for voice communication delay
Careful attitude, the process that this buffer area increases all are periodically to calculate gradually to expand or shrink on the basis of an empirical value
's.
But in our daily actual production systems, due to factors such as network speed limit, congestions, postpone the number being sent to
It is not to comply fully with Poisson distribution according to packet arrival time, usually receives a large amount of data packet in a moment.It is shaking
During the self-adaptive processing of buffer area, if the speed that jitter buffer section length increases is unable to catch up with because of network congestion, shake etc.
The speed and frequency intensively reached in the data packet unit time caused by reason, then partial data packet can be because jitter-buffer overflows
It is dropped out, yet will cause the Product Experience effect of voice Caton under extreme network congestion scene.
From it is different in the timestamp control method of jitter-buffer size merely, there are also a kind of to be controlled with to access packet number and trembles
The device and method of dynamic buffer size.
If all data packets are all cached, then packet loss will not occur when disposably collecting mass data packet
Phenomenon.In network jitter, mass data packet is caused to take in inter-packet gap (by taking VoP packet as an example, generally in some output
The voice data of one data packet storage 40ms duration, mixer or player, which can be timed to wobble buffer and go to obtain, to be passed through
The voice data that steadily exports after jitter cache control processing) reach in the case where, according to the number for reaching data packet, setting is trembled
Dynamic buffer length, reduces packet loss with this.And after network tends to be steady, due to taking the data packet number reached in inter-packet gap
It reduces, thus buffer length accordingly reduces, and reduces delay caused by buffer area with this.
Different from counting the other wobble buffer of delay inequality, is used with the wobble buffer of packet sequence control while reaching shake
The packet sequence difference of buffer area is as jitter buffer section length.For example, there is five VoP packets of P1-P5 to connect from transmitting terminal arrival
The jitter-buffer of receiving end, when shaking smaller, basic negligible, P1-P5 is successively reached, at this time can be by jitter-buffer
It is contracted to most 1 data packet of short i.e. reservation.And if network is when shaking, it is possible to which P1-P5 close to reaching simultaneously, at this time
Then settable jitter buffer section length is (5-1)+1=5 data packet lengths, to guarantee that packet loss phenomenon will not be generated.
Jitter-buffer is upheld: when the total length of data packets that discovery buffer length target_level ratio is currently received
Current_level wants small, then needs to uphold jitter-buffer, jitter-buffer upholds method are as follows: is arranged and is currently received
Total length of data packets current_level is as new buffer length target_level, in this way, jitter buffer
The extension in area will soon be realized.
Jitter-buffer is shunk: when the data packet that discovery jitter buffer section length target_level ratio is currently received is total
Length current_level then will need to shrink buffer area greatly.The discontinuous situation of voice will be caused due to continuously shrinking, because
This needs separated in time to gradually taper up.Contraction method:
1. calculating jitter buffer section length: passing through certain time interval, generally 500ms-1000ms, if jitter buffer
Section length target_level is lasting bigger than normal during this period, then target_level is narrowed down to certain value, such as reduce
Target_level is target_level=target_level-(target_level-current_level) ÷ 3, that is, is trembled
The one third of recent length difference is reduced in dynamic buffer size adjustment.
2. practical shrinkage operation: passing through certain time interval (generally 500ms~1000ms), when discovery jitter-buffer
In packet number be more than jitter buffer section length target_level, then need to shrink jitter-buffer, be obtained by calculation
The VoP that can be abandoned abandons the VoP.It is contemplated that sound continuity demand, it is practical shrink compared with
Slowly.
By effect of jitter, if restoring after network heavy congestion, a large amount of VoPs pour in jitter-buffer, it will go out
Existing current_level larger situation will cause shake slow since current_level will affect target_level value
It is larger to rush area's delay.Network is recovered at this time, therefore target_level needs are reduced rapidly, but are received by jitter-buffer
The restriction of contracting operation, even if target_level reduces, the contraction of jitter-buffer still needs the plenty of time.
Therefore, the purpose of the application when network recovery is steady, is quickly shortened tremble as far as possible after there is huge shake
Dynamic buffer length achievees the purpose that exchange in real time faster to restore low latency.
With reference to the accompanying drawing, the specific embodiment of the application is discussed in detail.
Fig. 1 is a kind of flow diagram of the method for Fast Reduction jitter-buffer that the application first embodiment provides,
As shown in Figure 1, the method includes the steps S101 to S104.
S101: whether monitoring point is set in detection jitter-buffer.
The monitoring point be searched forward from reference point first loss data packet immediately behind data packet, institute
Stating reference point is the initial data packet as search.
The jitter-buffer is the queue being similar to using fifo algorithm, by the packet of the data packet received
Sequence arranges data packet.Receiving end after receiving the packet of data, can read the Bao Xu of the data packet, then be looked by sequential search method
The data packet is found in the position that the jitter-buffer should be stored.The position of most of situation data packet insertion is in institute
The rear of queue of jitter-buffer is stated, i.e., the last one data packet is nearest received data packet, only need to be additional in rear of queue.Part
In the case of data packet disorder receive, then need Look-ahead to position appropriate be inserted into queue.Data packet is received each time and is held
While row jitter buffer queue insert action, jitter buffer queue of traversal is required, to determine whether to need to set
Set or modify the reference point and the monitoring point.
The reference point, the monitoring point are integer pointer class numerical value, determine whether its default value is that 0 can determine and be
The no setting reference point and the monitoring point, if be in the processing logic in Fast Reduction jitter-buffer.
In addition, the pointer surface is directed to the Bao Xu of the data packet, essence is directed toward data packet memory address, subsequent
Specific embodiment in the data packet corresponding with packet sequence characterization.
Wherein, the data packet of the loss, which refers to, is temporarily marked the data packet for being, if the subsequent quilt of the data packet
It is sent to then as effective data packets, cancels label.
For example, should receive 10 data packets in the jitter-buffer, the data packet of practical Bao Xuwei 2,3,4 and 8 does not have
It is sent to, the data packet that Bao Xuwei 10 is arranged when initial is the reference point, is searched forward since the data packet of Bao Xuwei 10
Rope, the data packet of first of lookup loss are the data packet of Bao Xuwei 8, then the data packet of settable Bao Xuwei 8 immediately behind
The data packet of Bao Xuwei 9 be the monitoring point, the data packet of Bao Xuwei 9 is effective data packets.
S102: if being provided with the monitoring point, whether the data packet before detecting the monitoring point has update.
While receiving data packet each time and execute insert action, require to traverse the primary jitter buffer sector
Whether column, the data packet before can determining the monitoring point in the process have update, specifically:
If new received data packet is inserted into the position of the jitter-buffer in rear of queue or after the monitoring point,
Then the data packet before the monitoring point does not update;
If the position of new received data packet insertion jitter-buffer is before the monitoring point, before the monitoring point
Data are surrounded by update.
S103: if the data packet before the monitoring point does not update, start to monitor data packet in jitter-buffer and connect
It receives, every primary then actual monitoring number of monitoring adds 1.
S104: all data packets when actual monitoring number reaches default monitoring number, before removing the monitoring point.
In above-mentioned steps, start monitor jitter-buffer in data packet reception before, need to be arranged a preset prison
Number is surveyed, i.e. the one of monitoring data packet reception condition counts.It is arranged after the default monitoring number, the actual monitoring time
Number, as the insertion buffer queue movement of new received data packet gradually increases, is often joined the team primary since 0, the actual monitoring time
Number plus 1, all data after the actual monitoring number reaches the default monitoring number, before abandoning the monitoring point
Packet, achievees the purpose that Fast Reduction jitter buffer section length.
In the present embodiment, if the data before the monitoring point are surrounded by update, that is, there is the data packet for being marked as losing
It is sent to, the position before being inserted into the monitoring point then sets the reference point for the data packet of update, resets the monitoring point
With the default monitoring number.For example, 10 data packets should be received in the jitter-buffer, practical Bao Xuwei 2,3,4 and 8
Data packet be not sent to, when initial be arranged Bao Xuwei 10 data packet be the reference point, if the data packet of Bao Xuwei 8
It is sent to, is inserted into the jitter-buffer queue, then set new reference point for the data packet of Bao Xuwei 8, and according to
Setting rule resets the monitoring point and the default monitoring number.
Fig. 2, Fig. 3 are the flow diagram of a specific jitter-buffer data packet reception condition.Receiving pack20 packet causes
After the length mutation of the jitter-buffer, always be that the subsequent data packet of pack20 reaches jitter-buffer, then it can be with
Part jitter-buffer under packet sequence pack20 is abandoned, the valid data length of jitter-buffer is reduced.
As shown in figure 4, in a second embodiment, the method for the Fast Reduction jitter-buffer, further includes:
S201: it detects whether that the reference point is arranged.
Whether monitoring point is set in detection jitter-buffer, if after being not provided with the monitoring point, detection shake
Whether the reference point is set in buffer area.By step S101 it is found that the setting of the monitoring point is with the reference point
Based on setting, so the setting of the reference point also needs further to judge if being not provided with the monitoring point.Institute
Judgment criterion that whether reference point is arranged is stated as described in step S101, details are not described herein.
S202: if being provided with the reference point, the data packet of first before searching for the reference point loss.
S203: judge that the data packet sum of the loss before the data packet of first loss should connect with jitter-buffer
Whether the ratio between data packet sum of receipts is greater than the first default ratio.The data packet of loss before the data packet of first loss
It include the data packet of first loss itself when sum statistics.
S204: if it is greater than the first default ratio, be arranged the data packet of first loss immediately behind data packet be
The monitoring point.
For example, should receive 10 data packets in the jitter-buffer, the data packet of practical Bao Xuwei 2,3,4 and 8 does not have
It is sent to, the data packet that Bao Xuwei 10 is arranged when initial is the reference point, is searched forward since the data packet of Bao Xuwei 10
Rope, the data packet of first loss of lookup are the data packet of Bao Xuwei 8, and the data packet of loss is 4, described first
It is 4/10 that the data packet sum and jitter-buffer of loss before the data packet of loss, which answer the ratio between received data packet sum, greatly
In the first default ratio 1/3, then the data packet that Bao Xuwei 9 is arranged is the monitoring point.Described first is default than being empirical value, preferably
It is 1/3.
S205: if it is less than the first default ratio, the reference point, the monitoring point and the default monitoring number are reset.
Fig. 5 is the flow diagram of complete Fast Reduction jitter-buffer provided by the embodiments of the present application.In another tool
In body embodiment, the method for the Fast Reduction jitter-buffer, after detecting whether setting reference point, further includes:
S301: if being not provided with the reference point, judge whether to reach using the default of Fast Reduction jitter-buffer
Condition, the preset condition include: that the data packet that 1000ms time span whether is had more than in jitter-buffer and/or shake are delayed
It rushes the data packet sum lost in area and jitter-buffer answers the ratio between received data packet sum to be greater than the second default ratio, described the
Two is default than being empirical value, and preferably 1/3.
S302: if reaching the preset condition, the data packet of setting jitter-buffer rear of queue is the reference point, weight
Set the monitoring point and the default monitoring number.
No reach using the preset condition of Fast Reduction jitter-buffer for a dynamic is judged described in step S301
The process of judgement illustrates the processing logic for being in rapid desufflation if being set the monitoring point or the reference point
In, it needs to judge whether if when the monitoring point and the reference point be not set or Network Abnormal to reach using quickly contracting
Subtract the preset condition of jitter-buffer.In the case of network normal transmission, data packet is substantially sequence and is sent on time, that is, when transmitting
Prolong and vary less, but generally will not be 0, condition is centainly unsatisfactory at this time, excessive processing that it goes without doing.
In step s 302, the reference point is set initially to current tail of the queue, and according to setting rule setting
Monitoring point.As new data packet is inserted into the jitter-buffer queue, if being newly inserted into the number of the jitter-buffer queue
According to packet in rear of queue, then it is no longer rear of queue element that the reference point, which is moved forward with the jitter-buffer queue,;As newly
The data packet of the jitter-buffer queue is inserted into before the monitoring point, then the reference point will be updated to newly be inserted into institute
State the data packet of jitter-buffer queue.
After the larger shake of network, cause jitter buffer section length excessive since mass data packet pours in, and then cause
Audio, slowed-down video, by the restriction of existing contraction method, contraction time is longer, cannot fast quick-recovery.Using herein described
Fast Reduction jitter-buffer method, a large amount of contraction times can be saved, faster restore low latency, reach and exchange in real time
Purpose.
For example, the jitter-buffer is because violent shake pours in 50 data packets, each data packet duration 40ms, network is extensive
After multiple, jitter buffer section length needs to be reduced to 4, then according to existing contraction method, it is assumed that at interval of 20 data packets it
One data packet of after-contraction is needed by shrink_time=(50-4) × 20 × 40=36800ms.
It using herein described method, is added in 50 packets, is all the data packet lost from 20-45, and from receiving
After the data packet of Bao Xuwei 50, the data packet before the data packet of Bao Xuwei 45 does not have update, then by default monitoring
After the update of number, start rapid desufflation, total contraction time is shrink_time=(50-45+5) × 20 × 40=
8000ms, remainder then use normal contraction method.
Corresponding with a kind of embodiment of the method for Fast Reduction jitter-buffer provided by the present application, the application also provides one
The embodiment of the device of kind Fast Reduction jitter-buffer.It is that a kind of Fast Reduction provided by the embodiments of the present application is trembled with reference to Fig. 6
The structural schematic diagram of the device of dynamic buffer area, described device include:
Monitoring point detection module 101, for detecting monitoring point whether is arranged in jitter-buffer, the monitoring point is from ginseng
The data packet of search forward first loss of examination point immediately behind data packet, the reference point is as the starting searched for
Data packet;
Data packet detection module 102, if for being provided with the monitoring point, the data packet before detecting the monitoring point is
It is no to have update;
It is slow to start monitoring shake if do not updated for the data packet before the monitoring point for data packet monitoring modular 103
The reception of data packet in area is rushed, every primary then actual monitoring number of monitoring adds 1;
Data packet removes module 104, for removing the monitoring point when actual monitoring number reaches default monitoring number
Preceding all data packets;
Resetting module 105 sets the data packet of update to if being surrounded by update for the data before the monitoring point
The reference point resets the monitoring point and the default monitoring number.
The device of the Fast Reduction jitter-buffer further include:
Reference point detection module 201, for detecting whether the reference point is arranged;
Data packet search module 202, if first before searching for the reference point is lost for being provided with the reference point
The data packet of mistake;
First judgment module 203, the data packet sum of the loss before data packet for judging first loss
Answer whether the ratio between received data packet sum is greater than the first default ratio with jitter-buffer.
Monitoring point setup module 204, for presetting ratio if it is greater than first, after the data packet of first loss is set
The adjacent data packet in face is the monitoring point;
Reset module 105, be also used to if it is less than the first default ratio, reset the reference point, the monitoring point with it is described
Default monitoring number.
The device of the Fast Reduction jitter-buffer, further includes:
Second judgment module 301, if judging whether to reach and be trembled using Fast Reduction for being not provided with the reference point
The preset condition of dynamic buffer area, the preset condition includes: that 1000ms time span whether is had more than in the jitter-buffer
Data packet and/or the jitter-buffer in lose data packet sum and jitter-buffer answer received data packet sum
Than being greater than the second default ratio;
Reference point setup module 302, if the data of jitter-buffer rear of queue are arranged for reaching the preset condition
Packet is the reference point, resets the monitoring point and the default monitoring number.
The data packet detection module 102 is specifically used for:
If new received data packet is inserted into the position of the jitter-buffer in rear of queue or after the monitoring point,
Then the data packet before the monitoring point does not update;
If the position of new received data packet insertion jitter-buffer is before the monitoring point, before the monitoring point
Data are surrounded by update.
The method and device of a kind of Fast Reduction jitter-buffer provided by the embodiments of the present application, by detecting jitter buffer
Whether monitoring point be set in area, the monitoring point be first loss searched forward from reference point data packet immediately behind
Data packet, the reference point be as search for initial data packet;If being provided with the monitoring point, the monitoring point is detected
Whether preceding data packet has update;If the data packet before the monitoring point does not update, start to monitor number in jitter-buffer
According to the reception of packet, every primary then actual monitoring number of monitoring adds 1;When actual monitoring number reaches default monitoring number, remove
All data packets before the monitoring point.By above-mentioned execution step, after there is huge shake, when network recovery is steady, to the greatest extent
Jitter buffer section length may quickly be reduced, faster to restore low latency, achieve the purpose that exchange in real time.
According to the method for above-mentioned Fast Reduction jitter-buffer, the embodiment of the present application also provide a kind of readable storage medium storing program for executing and
A kind of computer equipment.Executable program is stored on readable storage medium storing program for executing, which realizes above-mentioned fast when being executed by processor
The step of method of speed reduction jitter-buffer;Computer equipment include memory, processor and storage on a memory and can
The executable program run on a processor, processor realize the method for above-mentioned Fast Reduction jitter-buffer when executing program
Step.
Combine detailed description and exemplary example that the application is described in detail above, but these explanations are simultaneously
It should not be understood as the limitation to the application.It will be appreciated by those skilled in the art that without departing from the application spirit and scope,
A variety of equivalent substitution, modification or improvements can be carried out to technical scheme and embodiments thereof, these each fall within the application
In the range of.The protection scope of the application is determined by the appended claims.