patents.google.com

CN103685070B - A kind of method and device adjusting dithering cache size - Google Patents

  • ️Wed Nov 02 2016

CN103685070B - A kind of method and device adjusting dithering cache size - Google Patents

A kind of method and device adjusting dithering cache size Download PDF

Info

Publication number
CN103685070B
CN103685070B CN201310698751.0A CN201310698751A CN103685070B CN 103685070 B CN103685070 B CN 103685070B CN 201310698751 A CN201310698751 A CN 201310698751A CN 103685070 B CN103685070 B CN 103685070B Authority
CN
China
Prior art keywords
vop
jitter value
time
dithering cache
unit
Prior art date
2013-12-18
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
CN201310698751.0A
Other languages
Chinese (zh)
Other versions
CN103685070A (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.)
Guangzhou Huaduo Network Technology Co Ltd
Original Assignee
Guangzhou Huaduo Network 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.)
2013-12-18
Filing date
2013-12-18
Publication date
2016-11-02
2013-12-18 Application filed by Guangzhou Huaduo Network Technology Co Ltd filed Critical Guangzhou Huaduo Network Technology Co Ltd
2013-12-18 Priority to CN201310698751.0A priority Critical patent/CN103685070B/en
2014-03-26 Publication of CN103685070A publication Critical patent/CN103685070A/en
2016-11-02 Application granted granted Critical
2016-11-02 Publication of CN103685070B publication Critical patent/CN103685070B/en
Status Active legal-status Critical Current
2033-12-18 Anticipated expiration legal-status Critical

Links

  • 238000000034 method Methods 0.000 title claims abstract description 23
  • 230000005540 biological transmission Effects 0.000 claims abstract description 72
  • 230000009467 reduction Effects 0.000 claims description 16
  • 206010044565 Tremor Diseases 0.000 claims description 6
  • 230000000694 effects Effects 0.000 claims description 5
  • 238000004891 communication Methods 0.000 abstract description 3
  • 238000001514 detection method Methods 0.000 description 13
  • 238000000151 deposition Methods 0.000 description 4
  • 238000003780 insertion Methods 0.000 description 4
  • 230000037431 insertion Effects 0.000 description 4
  • 238000010586 diagram Methods 0.000 description 3
  • 238000005516 engineering process Methods 0.000 description 3
  • 230000006870 function Effects 0.000 description 2
  • 238000007689 inspection Methods 0.000 description 2
  • 230000008859 change Effects 0.000 description 1
  • 230000001934 delay Effects 0.000 description 1
  • 238000012217 deletion Methods 0.000 description 1
  • 230000037430 deletion Effects 0.000 description 1
  • 238000013461 design Methods 0.000 description 1
  • 230000006872 improvement Effects 0.000 description 1
  • 230000004048 modification Effects 0.000 description 1
  • 238000012986 modification Methods 0.000 description 1
  • 230000008569 process Effects 0.000 description 1
  • 238000006467 substitution reaction Methods 0.000 description 1

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a kind of method and device adjusting dithering cache size, belong to field of Internet communication.Described method includes: obtain the VoP received before current time unit and in continuous predetermined number the time quantum that current time unit is nearest;Transmission time according to the VoP obtained and the time of reception, calculate the jitter value of described VoP;According to the jitter value of described VoP, the first jitter value of network in acquisition current time unit;According to described first jitter value, the second jitter value of described network in calculating future time unit;According to described second jitter value, adjust the size of dithering cache.Described device includes: the first acquisition module, the first computing module, the second acquisition module, the second computing module and adjusting module.The present invention avoids the occurrence of the problem playing card, makes receiving terminal can play VoP glibly.

Description

A kind of method and device adjusting dithering cache size

Technical field

The present invention relates to field of Internet communication, particularly to a kind of method adjusting dithering cache size and dress Put.

Background technology

Growing along with Internet communication technology, voice transmission technology based on the Internet is increasingly subject to The concern of people.Owing to the Internet itself exists shake, this shake can cause the voice number of transmission in the Internet Certain time delay is there is according to bag, and then it cannot be guaranteed that receiving terminal plays this VoP in time, thus lead Cause to occur when playing VoP playing the problem of card, and dithering cache can be avoided producing as far as possible and play card Problem.Receiving terminal can arrange a dithering cache, the VoP of reception is stored in this shake and delays In depositing, when the memory space in dithering cache is full, receiving terminal plays the voice in this dithering cache continuously Packet, reduces shaking the impact playing VoP of the Internet.

Wherein, when the memory space of dithering cache is less, some VoP that receiving terminal receives can not It is immediately stored in this dithering cache, causes the loss of VoP;When dithering cache memory space relatively Time big, the broadcast time-delay of oldest stored VoP in this dithering cache can be increased, thus need right The size of dithering cache is adjusted.At present, it is provided that a kind of method adjusting dithering cache size, specifically For: the initial size of dithering cache, the speech data that receiving terminal receiving end/sending end is sent by the Internet are set Bag, is stored in the VoP of reception in the dithering cache self included;Storage when this dithering cache When space is full, receiving terminal plays the VoP of storage in this dithering cache continuously.Playing voice number According to the problem blocked if there is broadcasting during bag, it is determined that the memory space of this dithering cache is less, vertical I.e. increase the size of dithering cache;The time of recording played VoP, if record time more than or Equal to predetermined threshold value and record time in do not occur play card problem, it is determined that depositing of this dithering cache Storage space is relatively big, progressively reduces the size of this dithering cache.

During realizing the present invention, inventor finds that prior art at least there is problems in that

Owing to prior art is the size adjusting dithering cache after the problem of card occurs playing in current time, The problem avoiding with expectation again occurring playing card, so prior art cannot avoid current time to occur playing The problem of card.

Summary of the invention

In order to solve problem of the prior art, embodiments provide a kind of dithering cache size of adjusting Method and device.Described technical scheme is as follows:

On the one hand, it is provided that a kind of method adjusting dithering cache size, described method includes:

Obtained before current time unit and from current time unit nearest continuous predetermined number time singly The VoP received in unit;

Transmission time according to the VoP obtained and the time of reception, calculate trembling of described VoP Dynamic value;

According to the jitter value of described VoP, the first jitter value of network in acquisition current time unit;

According to described first jitter value, the second jitter value of described network in calculating future time unit;

According to described second jitter value, adjust the size of dithering cache.

Wherein, the described transmission time according to the VoP obtained and the time of reception, described voice is calculated The jitter value of packet, including:

Transmission time according to the VoP obtained and the time of reception, calculate the biography of described VoP The defeated time;

Obtain before described VoP and the transmission of the VoP adjacent with described VoP Time;

Calculate between the transmission time of described VoP and the transmission time of described adjacent VoP The first difference, described first difference is defined as the jitter value of described VoP.

Wherein, the described jitter value according to described VoP, obtain the of network in current time unit One jitter value, including:

From the jitter value of described VoP, select maximum jitter value;

The maximum jitter value selected is defined as the first jitter value of network in current time unit.

Wherein, described according to described second jitter value, adjust the size of dithering cache, including:

Obtain the reproduction time of the VoP play in described dithering cache when dithering cache is filled with;

If described second jitter value is more than described reproduction time, then according to described second jitter value with described broadcast Put the time, increase the size of described dithering cache, and in described dithering cache, insert invalid voice packet;

If described second jitter value is less than described reproduction time, then according to described second jitter value with described broadcast Put the time, delete the invalid voice packet in described dithering cache, and reduce the size of described dithering cache.

Further, described according to described second jitter value and described reproduction time, increase described dithering cache Size, and in described dithering cache insert invalid voice packet, including:

Calculate the second difference between described second jitter value and described reproduction time;

According to described second difference and default VoP reproduction time, calculate the invalid language needing to insert First number of sound packet;

According to described first number and default VoP size, determine the increments of described dithering cache;

The size of described dithering cache is increased the described increments determined;

Invalid voice packet is obtained from described dithering cache, and at the invalid voice packet of described acquisition Insert described first several default invalid voice packet afterwards.

Further, described according to described second jitter value and described reproduction time, delete described dithering cache In invalid voice packet, and reduce the size of described dithering cache, including:

Calculate the 3rd difference between described reproduction time and described second jitter value;

According to described 3rd difference and default VoP reproduction time, calculate the invalid language needing to reduce Second number of sound packet;

Invalid voice packet is obtained from described dithering cache, if the invalid voice packet of described acquisition Number more than or equal to described second number, then from described dithering cache, delete described second several nothing Effect VoP;

According to described second number and default VoP size, determine the reduction amount of described dithering cache;

The size of described dithering cache is reduced the described reduction amount determined.

On the other hand, it is provided that a kind of device adjusting dithering cache size, described device includes:

First acquisition module, for obtaining before current time unit and from the nearest company of current time unit The VoP received in continuous predetermined number time quantum;

First computing module, for the transmission time according to the VoP obtained and the time of reception, calculates The jitter value of described VoP;

Second acquisition module, for the jitter value according to described VoP, obtains in current time unit First jitter value of network;

Second computing module, for according to described first jitter value, calculates described network in future time unit The second jitter value;

Adjusting module, for according to described second jitter value, adjusting the size of dithering cache.

Wherein, described first computing module includes:

Computing unit, for the transmission time according to the VoP obtained and the time of reception, calculates described The transmission time of VoP;

First acquiring unit, for obtaining before described VoP and adjacent with described VoP Transmission time of VoP;

First determines unit, for calculating the transmission time of described VoP and described adjacent voice number According to the first difference between the transmission time of bag, described first difference is defined as trembling of described VoP Dynamic value.

Wherein, described second acquisition module includes:

Select unit, for from the jitter value of described VoP, select maximum jitter value;

Second determines unit, network in the maximum jitter value selected is defined as current time unit First jitter value.

Wherein, described adjusting module includes:

Second acquisition unit, plays the voice number in described dithering cache for obtaining when dithering cache is filled with Reproduction time according to bag;

Increase unit, if for described second jitter value more than described reproduction time, then according to described second Jitter value and described reproduction time, increase the size of described dithering cache, and insert in described dithering cache Invalid voice packet;

Reduce unit, if for described second jitter value less than described reproduction time, then according to described second Jitter value and described reproduction time, delete the invalid voice packet in described dithering cache, and reduce described The size of dithering cache.

Further, described increase unit, specifically for:

Calculate the second difference between described second jitter value and described reproduction time;

According to described second difference and default VoP reproduction time, calculate the invalid language needing to insert First number of sound packet;

According to described first number and default VoP size, determine the increments of described dithering cache;

The size of described dithering cache is increased the described increments determined;

Invalid voice packet is obtained from described dithering cache, and at the invalid voice packet of described acquisition Insert described first several default invalid voice packet afterwards.

Further, described reduction unit, specifically for:

Calculate the 3rd difference between described reproduction time and described second jitter value;

According to described 3rd difference and default VoP reproduction time, calculate the invalid language needing to reduce Second number of sound packet;

Invalid voice packet is obtained from described dithering cache, if the invalid voice packet of described acquisition Number more than or equal to described second number, then from described dithering cache, delete described second several nothing Effect VoP;

According to described second number and default VoP size, determine the reduction amount of described dithering cache;

The size of described dithering cache is reduced the described reduction amount determined.

In embodiments of the present invention, according to before current time unit and from nearest continuous of current time unit The jitter value of the VoP received in predetermined number time quantum, calculates network in current time unit The first jitter value, improve the accuracy of the first jitter value of network in current time unit.According to currently Second jitter value of network, Jin Ergen in time quantum, the first jitter value of network predicts future time unit According to the second jitter value of network in future time unit, adjust the size of dithering cache, so open from receiving terminal Begin to receive VoP to start, can be according to the future time unit Intranet of prediction in each time quantum Second jitter value of network adjusts the size of dithering cache in advance, thus avoids the occurrence of the problem playing card, makes to connect Receiving end can play VoP glibly.

Accompanying drawing explanation

For the technical scheme being illustrated more clearly that in the embodiment of the present invention, institute in embodiment being described below The accompanying drawing used is needed to be briefly described, it should be apparent that, the accompanying drawing in describing below is only the present invention Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, Other accompanying drawing can also be obtained according to these accompanying drawings.

Fig. 1 is a kind of method flow diagram adjusting dithering cache size that the embodiment of the present invention one provides;

Fig. 2 is a kind of method flow diagram adjusting dithering cache size that the embodiment of the present invention two provides;

Fig. 3 is a kind of apparatus structure schematic diagram adjusting dithering cache size that the embodiment of the present invention three provides.

Detailed description of the invention

For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to the present invention Embodiment is described in further detail.

Embodiment one

Embodiments providing a kind of method adjusting dithering cache size, see Fig. 1, the method includes:

Step 101: obtain before current time unit and from the nearest continuous predetermined number of current time unit The VoP received in individual time quantum;

Step 102: according to transmission time and the time of reception of the VoP obtained, calculate the voice obtained The jitter value of packet;

Step 103: according to the jitter value of VoP obtained, obtains the of network in current time unit One jitter value;

Step 104: according to the first jitter value, calculate the second jitter value of future time unit this network interior;

Step 105: according to the second jitter value, adjust the size of dithering cache.

Wherein, according to transmission time and the time of reception of the VoP obtained, the voice number obtained is calculated According to bag jitter value, including:

Transmission time according to the VoP obtained and the time of reception, calculate the transmission of this VoP Time;

Obtain before this VoP and during the transmission of the VoP adjacent with this VoP Between;

Calculate first between the transmission time of this VoP and the transmission time of adjacent VoP Difference, is defined as the jitter value of this VoP by the first difference.

Wherein, according to the jitter value of VoP obtained, obtain in current time unit the first of network Jitter value, including:

From the jitter value of the VoP obtained, select maximum jitter value;

The maximum jitter value selected is defined as the first jitter value of network in current time unit.

Wherein, according to described second jitter value, adjust the size of dithering cache, including:

Obtain the reproduction time of the VoP play in this dithering cache when dithering cache is filled with;

If the second jitter value is more than this reproduction time, then according to the second jitter value and this reproduction time, increase The size of this dithering cache, and in this dithering cache, insert invalid voice packet;

If the second jitter value is less than this reproduction time, then according to the second jitter value and this reproduction time, delete Invalid voice packet in this dithering cache, and reduce the size of this dithering cache.

Further, according to the second jitter value and this reproduction time, increase the size of dithering cache, and trembling Dynamic caching inserts invalid voice packet, including:

Calculate the second difference between the second jitter value and this reproduction time;

According to the second difference and default VoP reproduction time, calculate the invalid voice number needing to insert The first number according to bag;

According to the first number and default VoP size, determine the increments of this dithering cache;

The increments that the size increase of this dithering cache is determined;

From this dithering cache, obtain invalid voice packet, and insert after the invalid voice packet obtained Enter first several default invalid voice packet.

Further, according to the second jitter value and this reproduction time, the invalid voice number in dithering cache is deleted According to bag, and reduce the size of this dithering cache, including:

Calculate the 3rd difference between reproduction time and the second jitter value;

According to the 3rd difference and default VoP reproduction time, calculate the invalid voice number needing to reduce The second number according to bag;

Invalid voice packet is obtained from this dithering cache, if the number of the invalid voice packet obtained More than or equal to the second number, then from this dithering cache, delete second several invalid voice packet;

According to the second number and default VoP size, determine the reduction amount of this dithering cache;

The size of this dithering cache is reduced the reduction amount determined.

In embodiments of the present invention, according to before current time unit and from nearest continuous of current time unit The jitter value of the VoP received in predetermined number time quantum, calculates network in current time unit The first jitter value, improve the accuracy of the first jitter value of network in current time unit.According to currently Second jitter value of network, Jin Ergen in time quantum, the first jitter value of network predicts future time unit According to the second jitter value of network in future time unit, adjust the size of dithering cache, so open from receiving terminal Begin to receive VoP to start, can be according to the future time unit Intranet of prediction in each time quantum Second jitter value of network adjusts the size of dithering cache in advance, thus avoids the occurrence of the problem playing card, makes to connect Receiving end can play VoP glibly.

Embodiment two

Embodiments providing a kind of method adjusting dithering cache size, see Fig. 2, the method includes:

Step 201: receiving terminal obtained before current time unit and from nearest continuously pre-of current time unit If the VoP received in individual several time quantum;

Wherein, all can record when receiving VoP due to receiving terminal every time and receive connecing of this VoP Between the time receiving, so when receiving terminal obtains before current time unit and from nearest continuous of current time unit During the VoP received in predetermined number time quantum, receiving terminal only need to according to current time unit and Predetermined number time quantum determines a time range, obtains the speech data received in this time range Bag, is defined as the VoP received in this time range before current time unit and when current Between the VoP that receives in nearest continuous predetermined number the time quantum of unit.

Owing to the change of network state gradually changes, so by before current time unit and from working as In continuous predetermined number the time quantum that front time quantum is nearest VoP, it was predicted that future time The situation of network in unit, the problem that can prevent in advance to play card.

Wherein, a time quantum can be 1s, it is also possible to for 0.1s, the present invention size to time quantum It is not specifically limited.

Step 202: receiving terminal according to obtain VoP the transmission time and receive the time, calculate this language The jitter value of sound packet;

Specifically, this step can be realized by the step of following (1)-(3), including:

(1), receiving terminal according to obtain VoP the transmission time and receive the time, calculate this voice The transmission time of packet;

Specifically, receiving terminal obtains transmission time and the reception time of this VoP, by this speech data The reception time of bag deducts the transmission time of this VoP, obtains the transmission time of this VoP.

Owing to carrying a timestamp, this timestamp in this VoP when transmitting terminal sends speech data It is the transmission time of this VoP.When receiving terminal receives this VoP, obtain this voice The timestamp carried in packet, is defined as the transmission time of this VoP by this timestamp;Receiving terminal Obtain the time receiving this VoP simultaneously, the time of acquisition is defined as the reception of this VoP Time.

(2), receiving terminal obtains before this VoP and the speech data adjacent with this VoP The transmission time of bag;

Wherein, for before current time unit and from the nearest continuous predetermined number of current time unit First VoP in the VoP received in time quantum, calculates first VoP Jitter value before, before needing to obtain this first VoP and adjacent with first VoP The transmission time of VoP.

(3), receiving terminal calculate the transmission time of this VoP with the transmission of adjacent VoP time The first difference between, is defined as the jitter value of this VoP by the first difference.

Wherein, if the VoP obtained is multiple, the jitter value of each VoP can be by Step according to above-mentioned (1)-(3) calculates the jitter value of each VoP.

Owing to the time of transmitting terminal and receiving terminal there may be nonsynchronous problem, so according to VoP The transmission time and receive transmission time of going out of Time Calculation and be not likely to be the most accurate.Send due to transmitting terminal again The time interval of packet is identical, so according to transmission time and adjacent voice of this VoP The transmission time of packet, the jitter value calculating this VoP is accurately, so the embodiment of the present invention According to the jitter value of VoP, in acquisition current time unit, the accuracy of the first jitter value of network is relatively Height, and then improve the accuracy of the second jitter value of network in future time unit.

Such as, getting 5 VoPs, the transmission time of first VoP is 10ms, the The transmission time of two VoPs is 20ms, and the transmission time of the 3rd VoP is 25ms, the The transmission time of four VoPs is 28ms, and the transmission time of the 5th VoP is 20ms.When Calculate first VoP jitter value time, before receiving terminal needs to obtain first VoP and The transmission time of the VoP adjacent with first VoP is 9ms, then first VoP The transmission time 10ms that jitter value is first VoP and first VoP before and with Difference 1ms between the transmission time 9ms of the VoP that one VoP is adjacent;Second language The jitter value of sound packet is the transmission time 20ms of second VoP and first VoP Difference 10ms between transmission time 10ms;The jitter value of the 3rd VoP is the 3rd voice number According to difference 5ms between transmission time 25ms and the transmission time 20ms of second VoP of bag; The jitter value of the 4th VoP is the transmission time 28ms of the 4th VoP and the 3rd voice Difference 3ms between the transmission time 25ms of packet;The jitter value of the 5th VoP is the 5th Difference between the transmission time 20ms and the transmission time 28ms of the 4th VoP of VoP 8ms。

Step 203: according to the jitter value of VoP obtained, obtains the of network in current time unit One jitter value;

Specifically, from the jitter value of the VoP obtained, select maximum jitter value;By select Maximum jitter value is defined as the first jitter value of network in current time unit.

Such as, from jitter value 1ms, 10ms, 5ms, 3ms and 8ms of 5 VoPs obtained The middle jitter value selecting maximum is 10ms, and the maximum jitter value 10ms selected is defined as current time list First jitter value of network in unit.

Step 204: according to the first jitter value, calculate the second jitter value of future time unit this network interior;

Specifically, according to the first jitter value, future time unit this network interior is calculated according to equation below (1) The second jitter value;

V (i+1)=a*v (i) (1)

Wherein, in above-mentioned formula (1), v (i+1) is the second jitter value of future time unit this network interior, A be weight and 0 < a < 2, v (i) be the first jitter value.

Preferably, weight is more than or equal to 1 and less than or equal to 2 in embodiments of the present invention, so, In future time unit, the jitter value of this network all can be more than or equal to the shake of this network in current time unit Value, and then make the size of dithering cache in future time unit can be more than or equal to shake in current time unit The size of caching, reduces the packet loss of VoP.

Wherein, after future time unit can be current time unit and time adjacent with current time unit Between unit, certainly, after future time unit can also be current time unit and and current time unit between Every a time quantum or the time quantum of two time quantums.Preferably, when future time unit is current Between after unit and the time quantum adjacent with current time unit.

Such as, weight is 1.5, so the second jitter value of this network is in future time unit 10ms*1.5=15ms。

Step 205: when obtaining the broadcasting of the VoP play in this dithering cache when dithering cache is filled with Between;

Wherein, the reproduction time of the most each VoP is equal, so obtaining when shake is slow The concrete operations of the reproduction time playing the VoP in this dithering cache when being filled with can be: obtains The number of the VoP of storage in this dithering cache when dithering cache is filled with, by this VoP Number is multiplied with the reproduction time of VoP, obtains playing when dithering cache is filled with in this dithering cache The reproduction time of VoP.

Such as, the reproduction time of each VoP is 20ms, this dithering cache when this dithering cache is filled with In the number of VoP be 5, then play the voice number in this dithering cache when this dithering cache is filled with Reproduction time according to bag is 20ms*5=100ms.

Step 206: if the second jitter value is more than this reproduction time, then time according to the second jitter value and this broadcasting Between, increase the size of dithering cache, and in dithering cache, insert invalid voice packet;

Specifically, this step can be realized by the step of following (1)-(5), including:

(1) the second difference between the second jitter value and this reproduction time, is calculated;

(2), according to the second difference and default VoP reproduction time, calculate and need the invalid of insertion First number of VoP;

Specifically, by the second difference divided by default VoP reproduction time, obtain the first numerical value, as Really the first numerical value is integer, then the first numerical value is defined as needing first of the invalid voice packet of insertion Number, if the first numerical value is not integer, then rounds up the first numerical value, obtains second value, by second Numerical value is defined as needing the first number of the invalid voice packet of insertion.

Wherein, in transmitting terminal is sent to the VoP of receiving terminal, not only include the language that there is voice messaging Sound packet, also includes quiet VoP, does not i.e. have the packet of voice messaging.Due to quiet VoP does not has voice messaging, inserts quiet VoP in position or delete quiet The VoP of sound does not interferes with the quality of the speech play of the VoP that there is voice messaging, so In embodiments of the present invention quiet VoP is referred to as invalid voice packet.

Such as, the second difference is 100ms-15ms=85ms, by the second difference 85ms divided by default voice number According to bag reproduction time 20ms, obtaining 4.25, rounding up 4.25 obtains 5, it is determined that need the nothing inserted First number of effect VoP is 5.

(3), according to the first number and default VoP size, the increments of dithering cache is determined;

Specifically, the first number is multiplied with the VoP size preset, obtains the increase of dithering cache Amount.

Owing to the reproduction time of each VoP is equal, so the size of each VoP is the most equal.

(4), the increments that the size increase of this dithering cache is determined;

(5), from this dithering cache, invalid voice packet is obtained, and at the invalid voice packet obtained Insert first several default invalid voice packet afterwards.

Specifically, include that first VoP starts detection from current dither caching;Obtain the language of detection The quantity of information of sound packet, if the quantity of information of the VoP of detection is more than or equal to predetermined threshold value, then The next VoP of detection;If the quantity of information of the VoP of detection is less than predetermined threshold value, the most really The VoP that regular inspection is surveyed is invalid voice packet, and inserts first after the VoP of detection Individual several default invalid voice packet.

Preferably, if the quantity of information of the VoP of detection is less than predetermined threshold value, then adds up this shake and delay The number of the invalid voice packet in depositing, and detect next VoP, if next voice number It is more than or equal to predetermined threshold value according to the quantity of information of bag, then before next VoP, inserts the first number Individual default invalid voice packet, if the quantity of information of next VoP is less than predetermined threshold value, then Increase the number of invalid voice packet of statistics, if add after invalid voice packet number more than or Equal to predetermined number, it is determined that this dithering cache exists continuous print multiple invalid voice packet, at this even First several default invalid voice packet of insertion in the middle of continuous multiple invalid voice packets, so, First several default invalid voice packet is inserted in the middle of multiple continuous print invalid voice packets, thus Do not affect the voice quality playing voice.

Step 207: if the second jitter value is less than this reproduction time, then time according to the second jitter value and this broadcasting Between, delete the invalid voice packet in this dithering cache, and reduce the size of this dithering cache.

Specifically, this step can be realized by the step of following (1)-(5), including:

(1) the 3rd difference between this reproduction time and the second jitter value, is calculated;

(2), according to the 3rd difference and default VoP reproduction time, calculate and need the invalid of minimizing Second number of VoP;

Specifically, by the 3rd difference divided by default VoP reproduction time, obtain third value, as Really third value is integer, then third value is defined as needing second of the invalid voice packet of minimizing Number, if third value is not integer, then rounds up third value, obtains the 4th numerical value, by the 4th Numerical value is defined as needing the second number of the invalid voice packet of minimizing.

(3), from this dithering cache, invalid voice packet is obtained, if the invalid voice packet obtained Number more than or equal to the second number, then from this dithering cache, delete second several invalid voice data Bag;

Specifically, include that first VoP starts detection from current dither caching;Obtain the language of detection The quantity of information of sound packet, if the quantity of information of the VoP of detection is more than or equal to predetermined threshold value, then The next VoP of detection;If the quantity of information of the VoP of detection is less than predetermined threshold value, the most really The VoP that regular inspection is surveyed is invalid voice packet, increases the number of invalid voice packet, works as detection During the VoP that this dithering cache complete includes, it is judged that the number of invalid voice packet whether more than or etc. In the second number, if it is, delete second several invalid voice packet from this dithering cache.

Wherein, when deleting second several invalid voice packet from this dithering cache, preferential deletion is continuously Invalid voice packet, so, do not interfere with play VoP time voice quality.

Wherein, if the number of the invalid voice packet obtained is less than the second number, then directly by acquisition Invalid voice packet is all deleted, to reduce oldest stored invalid voice packet in this dithering cache Broadcast time-delay.

(4), according to the second number and default VoP size, the reduction amount of this dithering cache is determined;

Specifically, the second number is multiplied with the VoP size preset, obtains subtracting of this dithering cache In a small amount.

(5), the size of this dithering cache is reduced the reduction amount determined.

In embodiments of the present invention, according to before current time unit and from nearest continuous of current time unit The jitter value of the VoP received in predetermined number time quantum, calculates network in current time unit The first jitter value, improve the accuracy of the first jitter value of network in current time unit.According to currently Second jitter value of network, Jin Ergen in time quantum, the first jitter value of network predicts future time unit According to the second jitter value of network in future time unit, adjust the size of dithering cache, so open from receiving terminal Begin to receive VoP to start, can be according to the future time unit Intranet of prediction in each time quantum Second jitter value of network adjusts the size of dithering cache in advance, thus avoids the occurrence of the problem playing card, makes to connect Receiving end can play VoP glibly.

Embodiment three

Seeing Fig. 3, embodiments provide a kind of device adjusting dithering cache size, this device includes:

First acquisition module 301, for obtaining before current time unit and nearest from current time unit The VoP received in predetermined number time quantum continuously;

First computing module 302, for the transmission time according to the VoP obtained and the time of reception, meter Calculate the jitter value of the VoP obtained;

Second acquisition module 303, for the jitter value according to the VoP obtained, obtains current time list First jitter value of network in unit;

Second computing module 304, for according to the first jitter value, calculates the of this network in future time unit Two jitter values;

Adjusting module 305, for according to the second jitter value, adjusting the size of dithering cache.

Wherein, the first computing module 302 includes:

Computing unit, for the transmission time according to the VoP obtained and the time of reception, calculates this language The transmission time of sound packet;

First acquiring unit, for obtaining before this VoP and the language adjacent with this VoP The transmission time of sound packet;

First determines unit, for calculating the transmission time of this VoP and adjacent VoP The first difference between the transmission time, is defined as the jitter value of this VoP by the first difference.

Wherein, the second acquisition module 303 includes:

Select unit, for the jitter value from the VoP obtained, select maximum jitter value;

Second determines unit, network in the maximum jitter value selected is defined as current time unit First jitter value.

Wherein, adjusting module 305 includes:

Second acquisition unit, plays the voice number in described dithering cache for obtaining when dithering cache is filled with Reproduction time according to bag;

Increase unit, if for the second jitter value more than this reproduction time, then according to the second jitter value and should Reproduction time, increases the size of this dithering cache, and inserts invalid voice packet in this dithering cache;

Reduce unit, if for the second jitter value less than this reproduction time, then according to the second jitter value and should Reproduction time, deletes the invalid voice packet in this dithering cache, and reduces the size of this dithering cache.

Further, increase unit, specifically for:

Calculate the second difference between the second jitter value and this reproduction time;

According to the second difference and default VoP reproduction time, calculate the invalid voice number needing to insert The first number according to bag;

According to the first number and default VoP size, determine the increments of this dithering cache;

The increments that the size increase of this dithering cache is determined;

From this dithering cache, obtain invalid voice packet, and insert after the invalid voice packet obtained Enter first several default invalid voice packet.

Further, reduce unit, specifically for:

Calculate the 3rd difference between reproduction time and the second jitter value;

According to the 3rd difference and default VoP reproduction time, calculate the invalid voice number needing to reduce The second number according to bag;

Invalid voice packet is obtained from this dithering cache, if the number of the invalid voice packet obtained More than or equal to the second number, then from this dithering cache, delete second several invalid voice packet;

According to the second number and default VoP size, determine the reduction amount of this dithering cache;

The size of this dithering cache is reduced the reduction amount determined.

In embodiments of the present invention, according to before current time unit and from nearest continuous of current time unit The jitter value of the VoP received in predetermined number time quantum, calculates network in current time unit The first jitter value, improve the accuracy of the first jitter value of network in current time unit.According to currently Second jitter value of network, Jin Ergen in time quantum, the first jitter value of network predicts future time unit According to the second jitter value of network in future time unit, adjust the size of dithering cache, so open from receiving terminal Begin to receive VoP to start, can be according to the future time unit Intranet of prediction in each time quantum Second jitter value of network adjusts the size of dithering cache in advance, thus avoids the occurrence of the problem playing card, makes to connect Receiving end can play VoP glibly.

It should be understood that the device adjusting dithering cache size that above-described embodiment provides is slow in adjustment shake When depositing size, only it is illustrated with the division of above-mentioned each functional module, in actual application, can basis Need and above-mentioned functions distribution is completed by different functional modules, will the internal structure of device be divided into not Same functional module, to complete all or part of function described above.It addition, above-described embodiment provides Adjust dithering cache size be installed on adjust dithering cache size embodiment of the method belong to same design, It implements process and refers to embodiment of the method, repeats no more here.

The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.

One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can be passed through Hardware completes, it is also possible to instructing relevant hardware by program and complete, described program can be stored in In a kind of computer-readable recording medium, storage medium mentioned above can be read only memory, disk or CD etc..

The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all the present invention's Within spirit and principle, any modification, equivalent substitution and improvement etc. made, should be included in the present invention's Within protection domain.

Claims (8)

1. the method adjusting dithering cache size, it is characterised in that described method includes:

Obtained before current time unit and from current time unit nearest continuous predetermined number time singly The VoP received in unit;

Transmission time according to the VoP obtained and the time of reception, calculate trembling of described VoP Dynamic value;

According to the jitter value of described VoP, the first jitter value of network in acquisition current time unit;

According to described first jitter value, the second jitter value of described network in calculating future time unit;

Obtain the reproduction time of the VoP play in described dithering cache when dithering cache is filled with;

If described second jitter value is more than described reproduction time, then according to described second jitter value with described broadcast Put the time, increase the size of described dithering cache, and in described dithering cache, insert invalid voice packet;

If described second jitter value is less than described reproduction time, then according to described second jitter value with described broadcast Put the time, delete the invalid voice packet in described dithering cache, and reduce the size of described dithering cache;

Wherein, described according to described second jitter value and described reproduction time, increase the big of described dithering cache Little, and in described dithering cache, insert invalid voice packet, including:

Calculate the second difference between described second jitter value and described reproduction time;

According to described second difference and default VoP reproduction time, calculate the invalid language needing to insert First number of sound packet;

According to described first number and default VoP size, determine the increments of described dithering cache;

The size of described dithering cache is increased the described increments determined;

Invalid voice packet is obtained from described dithering cache, and at the invalid voice packet of described acquisition Insert described first several default invalid voice packet afterwards.

2. the method for claim 1, it is characterised in that the described VoP according to acquisition Transmission time and the time of reception, calculate the jitter value of described VoP, including:

Transmission time according to the VoP obtained and the time of reception, calculate the biography of described VoP The defeated time;

Obtain before described VoP and the transmission of the VoP adjacent with described VoP Time;

Calculate between the transmission time of described VoP and the transmission time of described adjacent VoP The first difference, described first difference is defined as the jitter value of described VoP.

3. the method for claim 1, it is characterised in that described trembling according to described VoP Dynamic value, the first jitter value of network in acquisition current time unit, including:

From the jitter value of described VoP, select maximum jitter value;

The maximum jitter value selected is defined as the first jitter value of network in current time unit.

4. the method for claim 1, it is characterised in that described according to described second jitter value and institute State reproduction time, delete the invalid voice packet in described dithering cache, and reduce described dithering cache Size, including:

Calculate the 3rd difference between described reproduction time and described second jitter value;

According to described 3rd difference and default VoP reproduction time, calculate the invalid language needing to reduce Second number of sound packet;

Invalid voice packet is obtained from described dithering cache, if the invalid voice packet of described acquisition Number more than or equal to described second number, then from described dithering cache, delete described second several nothing Effect VoP;

According to described second number and default VoP size, determine the reduction amount of described dithering cache;

The size of described dithering cache is reduced the described reduction amount determined.

5. the device adjusting dithering cache size, it is characterised in that described device includes:

First acquisition module, for obtaining before current time unit and from the nearest company of current time unit The VoP received in continuous predetermined number time quantum;

First computing module, for the transmission time according to the VoP obtained and the time of reception, calculates The jitter value of described VoP;

Second acquisition module, for the jitter value according to described VoP, obtains in current time unit First jitter value of network;

Second computing module, for according to described first jitter value, calculates described network in future time unit The second jitter value;

Adjusting module, including:

Second acquisition unit, plays the voice number in described dithering cache for obtaining when dithering cache is filled with Reproduction time according to bag;

Increase unit, if for described second jitter value more than described reproduction time, then according to described second Jitter value and described reproduction time, increase the size of described dithering cache, and insert in described dithering cache Invalid voice packet;

Reduce unit, if for described second jitter value less than described reproduction time, then according to described second Jitter value and described reproduction time, delete the invalid voice packet in described dithering cache, and reduce described The size of dithering cache;

Wherein, described increase unit, specifically for:

Calculate the second difference between described second jitter value and described reproduction time;

According to described second difference and default VoP reproduction time, calculate the invalid language needing to insert First number of sound packet;

According to described first number and default VoP size, determine the increments of described dithering cache;

The size of described dithering cache is increased the described increments determined;

Invalid voice packet is obtained from described dithering cache, and at the invalid voice packet of described acquisition Insert described first several default invalid voice packet afterwards.

6. device as claimed in claim 5, it is characterised in that described first computing module includes:

Computing unit, for the transmission time according to the VoP obtained and the time of reception, calculates described The transmission time of VoP;

First acquiring unit, for obtaining before described VoP and adjacent with described VoP Transmission time of VoP;

First determines unit, for calculating the transmission time of described VoP and described adjacent voice number According to the first difference between the transmission time of bag, described first difference is defined as trembling of described VoP Dynamic value.

7. device as claimed in claim 5, it is characterised in that described second acquisition module includes:

Select unit, for from the jitter value of described VoP, select maximum jitter value;

Second determines unit, network in the maximum jitter value selected is defined as current time unit First jitter value.

8. device as claimed in claim 5, it is characterised in that

Described reduction unit, specifically for:

Calculate the 3rd difference between described reproduction time and described second jitter value;

According to described 3rd difference and default VoP reproduction time, calculate the invalid language needing to reduce Second number of sound packet;

Invalid voice packet is obtained from described dithering cache, if the invalid voice packet of described acquisition Number more than or equal to described second number, then from described dithering cache, delete described second several nothing Effect VoP;

According to described second number and default VoP size, determine the reduction amount of described dithering cache;

The size of described dithering cache is reduced the described reduction amount determined.

CN201310698751.0A 2013-12-18 2013-12-18 A kind of method and device adjusting dithering cache size Active CN103685070B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310698751.0A CN103685070B (en) 2013-12-18 2013-12-18 A kind of method and device adjusting dithering cache size

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310698751.0A CN103685070B (en) 2013-12-18 2013-12-18 A kind of method and device adjusting dithering cache size

Publications (2)

Publication Number Publication Date
CN103685070A CN103685070A (en) 2014-03-26
CN103685070B true CN103685070B (en) 2016-11-02

Family

ID=50321424

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310698751.0A Active CN103685070B (en) 2013-12-18 2013-12-18 A kind of method and device adjusting dithering cache size

Country Status (1)

Country Link
CN (1) CN103685070B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105939289B (en) 2015-12-21 2019-03-12 小米科技有限责任公司 Network jitter processing method, device and terminal device
CN109104263A (en) * 2017-06-20 2018-12-28 阿里巴巴集团控股有限公司 Method of adjustment, the device and system of memory capacity
CN110300429A (en) * 2018-03-23 2019-10-01 中国移动通信集团广东有限公司 Adjust method, apparatus, electronic equipment and the storage medium of buffer storage length
CN111295864B (en) * 2018-08-31 2022-04-05 华为技术有限公司 Method, terminal and system for improving voice call quality
CN109981482B (en) * 2019-03-05 2022-04-05 北京世纪好未来教育科技有限公司 Audio processing method and device
CN113900619A (en) * 2019-09-27 2022-01-07 北京西山居互动娱乐科技有限公司 A kind of audio data processing method and device
CN110620793B (en) * 2019-10-31 2022-03-15 苏州浪潮智能科技有限公司 Method, device and medium for improving audio quality
CN115604514A (en) * 2021-07-07 2023-01-13 腾讯科技(深圳)有限公司(Cn) Audio transmission synchronization method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1346198A (en) * 2000-09-30 2002-04-24 华为技术有限公司 Anti-loss treating method for IP speech sound data package
CN1671124A (en) * 2004-03-19 2005-09-21 清华大学 Communication terminal device, communication terminal receiving method, communication system, gateway
CN101969403A (en) * 2010-10-25 2011-02-09 武汉烽火网络有限责任公司 E-Model-based dejittering buffer management method
CN102238294A (en) * 2010-04-23 2011-11-09 鸿富锦精密工业(深圳)有限公司 User terminal device and method for dynamically regulating size of shake buffer area

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1346198A (en) * 2000-09-30 2002-04-24 华为技术有限公司 Anti-loss treating method for IP speech sound data package
CN1671124A (en) * 2004-03-19 2005-09-21 清华大学 Communication terminal device, communication terminal receiving method, communication system, gateway
CN102238294A (en) * 2010-04-23 2011-11-09 鸿富锦精密工业(深圳)有限公司 User terminal device and method for dynamically regulating size of shake buffer area
CN101969403A (en) * 2010-10-25 2011-02-09 武汉烽火网络有限责任公司 E-Model-based dejittering buffer management method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
胡斌;黎忠文.一种自适应调整抖动缓冲区大小的算法.《计算机技术与发展》.2009,第3页倒数第3-4段. *

Also Published As

Publication number Publication date
CN103685070A (en) 2014-03-26

Similar Documents

Publication Publication Date Title
CN103685070B (en) 2016-11-02 A kind of method and device adjusting dithering cache size
CN103533451A (en) 2014-01-22 Method and system for regulating jitter buffer
CN105376607A (en) 2016-03-02 Live video method and device in network jittering environment
CN1667997B (en) 2011-12-14 Method and system for the clock synchronization of network terminals
EP2936770B1 (en) 2019-02-06 Apparatus and methods for controlling jitter buffer
CN112054965B (en) 2024-06-14 Congestion control method, device and computer readable medium
CN103916367B (en) 2017-04-26 Method and apparatus for transmission of multimedia data
CN107529097A (en) 2017-12-29 A kind of method and device of adaptive regulating video buffer size
CN105119755B (en) 2018-06-19 A kind of jitter-buffer method of adjustment and device
CN112929741A (en) 2021-06-08 Video frame rendering method and device, electronic equipment and storage medium
FR2964235A1 (en) 2012-03-02 SYNCHRONIZATION METHOD, SYSTEM AND DEVICE THEREOF
CN104168218B (en) 2018-03-06 Jitter buffer method and device
TW200849842A (en) 2008-12-16 Method of regulating the transmission jitter within a reception terminal
CN105162555B (en) 2019-06-25 A kind of code rate adjustment method and its terminal
US10382155B2 (en) 2019-08-13 Data processing
CN102571561B (en) 2014-08-06 PWE3 device and method for reading and writing data in jitter buffer of device
CN115347994B (en) 2024-02-20 Method, device, medium, wireless access equipment and system for feeding back state in network
CN102843344B (en) 2015-02-04 Signal transmission method of minitype base station
CN103354588A (en) 2013-10-16 Determination method, apparatus and system for recording and playing sampling rate
EP2083526A1 (en) 2009-07-29 Method for synchronizing applicative clock signals in a synchronous communications network, corresponding emitter and receiver devices, computer program product and computer-readable storage means.
CN101854309A (en) 2010-10-06 Method and apparatus for managing message output
US8976758B2 (en) 2015-03-10 Wireless communication system and method for adjusting used depth of buffer unit in wireless communication system
Bui et al. 2009 Packet delay variation management for a better IEEE1588V2 performance
Fukui et al. 2022 Delay-based shaper with dynamic token bucket algorithm for deterministic networks
CN102185732B (en) 2013-07-17 Method and system for testing active queue management parameters of communication equipment

Legal Events

Date Code Title Description
2014-03-26 PB01 Publication
2014-03-26 PB01 Publication
2014-04-23 C10 Entry into substantive examination
2014-04-23 SE01 Entry into force of request for substantive examination
2015-07-01 EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20140326

Assignee: All kinds of fruits garden, Guangzhou network technology company limited

Assignor: Guangzhou Huaduo Network Technology Co., Ltd.

Contract record no.: 2015990000265

Denomination of invention: Method and device for adjusting jitter buffer

License type: Exclusive License

Record date: 20150504

2015-07-01 LICC Enforcement, change and cancellation of record of contracts on the licence for exploitation of a patent or utility model
2016-10-12 CB02 Change of applicant information

Address after: 511446 Guangzhou City, Guangdong Province, Panyu District, South Village, Huambo Business District Wanda Plaza, block B1, floor 28

Applicant after: Guangzhou Huaduo Network Technology Co., Ltd.

Address before: 510655, Guangzhou, Whampoa Avenue, No. 2, creative industrial park, building 3-08,

Applicant before: Guangzhou Huaduo Network Technology Co., Ltd.

2016-10-12 COR Change of bibliographic data
2016-11-02 C14 Grant of patent or utility model
2016-11-02 GR01 Patent grant