Audio network adaptive method and storage device
By dynamically adjusting the size of the jitter buffer and the number of expected deviations, the problem of jitter and disorder in audio calls is solved, achieving both audio data transmission delay and quality in weak network environments, and avoiding audio freezes and delays.
Patent Information
- Application Number
- CN202210127255.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-11
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2042-02-11
AI Technical Summary
Existing technologies cannot effectively solve the problems of jitter and disorder in audio calls, resulting in audio stuttering and delay. Especially when network conditions are poor, audio quality and delay cannot be taken into consideration.
Through an audio network adaptive method, the jitter buffer size and expected deviation number are dynamically adjusted, and it is judged according to the preset conditions whether the message arrives at the expected time point. If it does not arrive, the buffer size and deviation number are increased. If it arrives, the buffer size and deviation number are kept. unchanged, and reads audio packets within a preset time interval, discarding non-critical content to reduce the buffer size and the number of deviations.
It realizes the reduction of audio data delay under poor network conditions, takes into account audio quality and delay, and avoids the negative impact of jitter and disorder on audio interaction.
Smart Images

Figure CN114501114B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of audio processing, and in particular to an audio network adaptation method and storage device. Background Art
[0002] At present, audio calls or video calls are a common and indispensable part of life, and they are all carried on the Internet. However, the quality of the actual network is not so ideal. Jitter and disorder are common phenomena, which bring poor subjective experience.
[0003] Almost all existing technologies use JitterBuffer for protection. JitterBuffer, also known as jitter buffer, is an important module in real-time audio. It handles packet loss, disorder, delayed arrival, etc., smoothly outputs packets to the decoding module, resists the impact of various weak network conditions on audio, reduces jamming, and improves the user's audio interaction experience.
[0004] However, this method cannot effectively solve jitter and disorder, because when the network suddenly experiences disorder or large jitter, the buffer-based JitterBuffer will discard some packets after filling the buffer, which will cause audio stuttering. Increasing the buffer size blindly will increase the audio delay and cause the speaker to steal the conversation. Summary of the invention
[0005] In view of the above problems, the present application provides an audio network adaptation method to solve the technical problems that the existing technology cannot effectively solve audio jitter and disorder. The specific technical solution is as follows:
[0006] An audio network adaptive method comprises the steps of:
[0007] Determine whether the expected message arrives at the corresponding expected time point, if the expected message does not arrive at the corresponding expected time point, increase the jitter buffer size and the expected deviation number;
[0008] If the expected message arrives at the corresponding expected time point, the jitter buffer size and the expected deviation number remain unchanged.
[0009] Furthermore, the method further comprises the steps of:
[0010] Reading an audio message from the jitter buffer at a preset time interval, determining whether a first preset condition is met, and if the first preset condition is met, reading the audio message and inputting it into an audio encoder;
[0011] If the first preset condition is not met, discard the audio message, and reduce the jitter buffer size and the expected deviation number;
[0012] The first preset condition includes: the audio message is audio key content, or meets the preset deviation requirement.
[0013] Furthermore, satisfying the preset deviation requirement includes: the expected deviation number is zero, or the expected deviation number does not exceed a preset threshold.
[0014] Furthermore, the method further comprises the steps of:
[0015] In response to the audio receiving instruction, the received audio is preprocessed, the volume of the preprocessed audio is absolutely quantified, and the audio with a volume within a preset range is taken as the audio key content.
[0016] Furthermore, the preprocessing includes but is not limited to: echo cancellation and noise suppression.
[0017] Furthermore, the “determining whether the expected message arrives at the corresponding expected time point” specifically includes the following steps:
[0018] After a message arrives at a specified time point, the message is set as a reference message, the sequence number of the reference message is n, and it is determined whether a message with a sequence number of n+1 arrives after an audio packetization time interval;
[0019] The “reading audio messages from the jitter buffer at preset time intervals” specifically includes the following steps:
[0020] The audio message is read from the jitter buffer at every other audio packetization time.
[0021] Furthermore, the “increasing the jitter buffer size and the expected deviation number” specifically includes the following steps:
[0022] The expected deviation number is increased by one;
[0023] The “and reducing the jitter buffer size and the expected deviation number” specifically further includes the steps of:
[0024] The expected number of deviations minus one.
[0025] Furthermore, the “if the first preset condition is met, reading the audio message and inputting it into the audio encoder” specifically includes the following steps:
[0026] If the audio message is audio key content or the expected deviation number is zero, reading the audio message and inputting it into an audio encoder;
[0027] Or if the audio message is audio key content or the expected deviation number does not exceed a preset threshold, the audio message is read and input into an audio encoder.
[0028] In order to solve the above technical problems, a storage device is also provided, and the specific technical solution is as follows:
[0029] A storage device stores an instruction set, wherein the instruction set is used to execute: any step in the above-mentioned audio network adaptation method.
[0030] Furthermore, the storage device includes: a chip.
[0031] The beneficial effect of the present invention is: an audio network adaptive method, comprising the steps of: judging whether an expected message arrives at a corresponding expected time point, if the expected message does not arrive at the corresponding expected time point, increasing the jitter buffer size and the expected deviation number; if the expected message arrives at the corresponding expected time point, the jitter buffer size and the expected deviation number remain unchanged. By adaptively adjusting the jitter buffer size according to the network delay, the effect of being compatible with poor network conditions and effectively reducing audio data delay can be achieved.
[0032] The above-mentioned records related to the invention content are only an overview of the technical solution of the present application. In order to enable ordinary technicians in the field to more clearly understand the technical solution of the present application, and then implement it according to the text of the specification and the contents recorded in the drawings, and to make the above-mentioned purpose and other purposes, features and advantages of the present application easier to understand, the following is an explanation in combination with the specific implementation mode and drawings of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The drawings are only used to illustrate the principles, implementation methods, applications, characteristics and effects of the specific embodiments of the present application and other related contents, and shall not be considered as limitations of the present application.
[0034] In the drawings of the specification:
[0035] Figure 1 A process of an audio network adaptive method described in a specific implementation method Figure 1 ;
[0036] Figure 2 A process of an audio network adaptive method described in a specific implementation method Figure 2 ;
[0037] Figure 3 A process of an audio network adaptive method described in a specific implementation method Figure 3 ;
[0038] Figure 4 A process of an audio network adaptive method described in a specific implementation method Figure 4 ;
[0039] Figure 5 A module schematic diagram of a storage device described in a specific implementation manner.
[0040] The reference numerals in the above drawings are described as follows:
[0041] 500. Storage device. DETAILED DESCRIPTION
[0042] In order to explain in detail the possible application scenarios, technical principles, specific schemes that can be implemented, and the purposes and effects that can be achieved, the following is a detailed description of the specific embodiments listed in conjunction with the accompanying drawings. The embodiments described herein are only used to more clearly illustrate the technical solutions of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.
[0043] Reference to "embodiment" herein means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. The term "embodiment" appearing in various places in the specification does not necessarily refer to the same embodiment, nor does it particularly limit its independence or association with other embodiments. In principle, in the present application, as long as there is no technical contradiction or conflict, the various technical features mentioned in the embodiments can be combined in any way to form a corresponding implementable technical solution.
[0044] Unless otherwise defined, the technical terms used in this document have the same meanings as those generally understood by those skilled in the art to which this application belongs; the use of relevant terms in this document is only for describing specific embodiments and is not intended to limit this application.
[0045] In the description of this application, the term "and / or" is an expression used to describe the logical relationship between objects, indicating that three relationships may exist, for example, A and / or B, which means: A exists, B exists, and A and B exist at the same time. In addition, the character " / " in this article generally indicates that the objects before and after are in an "or" logical relationship.
[0046] In the present application, terms such as “first” and “second” are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship of quantity, priority or sequence between these entities or operations.
[0047] Without further limitations, in this application, the words "include", "comprises", "has" or other similar expressions used in the sentences are intended to cover non-exclusive inclusion. These expressions do not exclude the presence of additional elements in the process, method or product including the elements, so that the process, method or product including a series of elements may include not only those limited elements, but also other elements not explicitly listed, or also include elements inherent to such process, method or product.
[0048] Similar to the understanding in the Examination Guidelines, in this application, expressions such as "greater than", "less than", "exceed" and the like are understood to exclude the number itself; expressions such as "above", "below", "within" and the like are understood to include the number itself. In addition, in the description of the embodiments of this application, "multiple" means more than two (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups", "multiple times", etc., unless otherwise clearly and specifically limited.
[0049] First, some of the terms involved in this application are explained as follows:
[0050] Audio content: Content collected by the device during a call, including key audio content (what the user wants to say) and non-key voice content (noise, background sound, howling, etc.).
[0051] Audio real-time: The key voice content collected by the device is quickly presented to the other end.
[0052] The core technical idea of this application is: in a weak network environment, according to the network conditions in real time, through the policy control of JitterBuffer, adapt to the network conditions, and perform dynamic adaptive control on key voice content and voice sequences, to ensure that the content the user wants to hear can be decoded and presented, retain the core data, and remove unnecessary and non-critical information. In the case of poor network, it can ensure the integrity of the call and reduce the call delay.
[0053] In this embodiment, an audio network adaptation method can be applied to a storage device, and the storage device includes but is not limited to: a personal computer, a server, a general-purpose computer, a special-purpose computer, a network device, an embedded device, a programmable device, an intelligent mobile terminal, etc. Figures 1 to 4 An audio network adaptation method is described below:
[0054] like Figure 1 As shown, an audio network adaptation method comprises the steps of:
[0055] Step S101: determine whether the expected message arrives at the corresponding expected time point. If the expected message does not arrive at the corresponding expected time point, increase the jitter buffer size and the expected deviation number.
[0056] Step S102: If the expected message arrives at the corresponding expected time point, the jitter buffer size and the expected deviation number remain unchanged.
[0057] The core attributes of audio data in network transmission are packet sequence number and packet interval, where the packet interval is the audio packet time.
[0058] The step of “determining whether the expected message arrives at the corresponding expected time point” specifically includes the following steps:
[0059] After a message arrives at a specified time point, the message is set as a reference message, the sequence number of the reference message is n, and it is determined whether a message with a sequence number of n+1 arrives after an audio packetization time interval.
[0060] In this embodiment, taking an audio packetization time of 20ms as an example, in a weak network environment, a sequence number of n is received. If a message with sequence number n+1 is received within the standard time of 20ms, it remains unchanged. If a message with sequence number n+1 is not received every 20ms, the JitterBuffer and the expected deviation number are dynamically increased to prepare for buffering subsequent messages.
[0061] An audio network adaptive method includes the steps of: determining whether an expected message arrives at a corresponding expected time point, and if the expected message does not arrive at the corresponding expected time point, increasing the jitter buffer size and the expected deviation number; if the expected message arrives at the corresponding expected time point, the jitter buffer size and the expected deviation number remain unchanged. By adaptively adjusting the jitter buffer size according to the network delay, the effect of being compatible with poor network conditions and effectively reducing audio data delay can be achieved.
[0062] Further, such as Figure 2 As shown, the steps include:
[0063] Step S201: reading audio messages from the jitter buffer at preset time intervals, determining whether a first preset condition is met, and if the first preset condition is met, reading the audio messages and inputting them into an audio encoder.
[0064] Step S202: If the first preset condition is not met, the audio message is discarded, and the jitter buffer size and the expected deviation number are reduced; the first preset condition includes: the audio message is audio key content, or meets the preset deviation requirement.
[0065] The step of “reading audio messages from the jitter buffer at preset time intervals” specifically includes the following steps:
[0066] The audio message is read from the jitter buffer at every other audio packetization time.
[0067] Specifically, the audio message is read from the JitterBuffer at a fixed interval of 20ms. If it is critical content or meets the preset deviation requirement, it is sent to the audio encoder normally. If it is non-critical content and there is a deviation, the message is discarded to dynamically reduce the JitterBuffer and the expected deviation number.
[0068] Wherein, satisfying the preset deviation requirement includes: the expected deviation number is zero, or the expected deviation number does not exceed a preset threshold.
[0069] In practical applications, there are two reasons why the preset deviation requirements can be met:
[0070] The method of this application is mainly aimed at audio processing, first of all, audio interaction. An audio message is 20ms. Assuming that the audio deviation is 100ms or even 200ms, the human ear cannot hear it subjectively. In addition, network transmission jitter is common, so setting a preset threshold can reduce the frequency of adjustment, thereby reducing the processing time consumption of the service in which this method is located. Therefore, in general practical application scenarios, a preset threshold is configured, assuming it is 10, and the converted time deviation is 200ms. In this case:
[0071] Real network jitter that is frequently within 200ms is not processed, and does not introduce latency, nor does it increase CPU scheduling and consumption. In addition, the audio deviation of 200ms is subjectively inaudible to the human ear. If you are sensitive to the deviation, you can configure a smaller threshold.
[0072] If the real network jitter occasionally exceeds 200ms, correction will be performed to speed up the reading and encoding sending based on whether it is critical content and deviation value.
[0073] If in some application scenarios, there is zero tolerance for delay, then the expected deviation can be set to zero.
[0074] like Figure 3 As shown, in step S301, the audio coder can be normally input:
[0075] Step S301: read an audio message from the jitter buffer at a preset time interval, and if the audio message is audio key content or the expected deviation number is zero, read the audio message and input it into the audio encoder; or if the audio message is audio key content or the expected deviation number does not exceed a preset threshold, read the audio message and input it into the audio encoder.
[0076] Step S302 is the same as step S102 and will not be described again herein.
[0077] In this embodiment, preferably, when an expected message does not arrive at the corresponding expected time point, the expected deviation number is increased by one. Similarly, when an audio message is discarded, the expected deviation number is decreased by one.
[0078] In this embodiment, preferably, the received audio data is processed. Figure 4 As shown, the steps include:
[0079] Step S401: responding to the audio receiving instruction, preprocessing the received audio, absolutely quantizing the volume of the preprocessed audio, and taking the audio with a volume within a preset range as the audio key content.
[0080] Step S402: determine whether the expected message arrives at the corresponding expected time point. If the expected message does not arrive at the corresponding expected time point, increase the jitter buffer size and the expected deviation number.
[0081] Step S403: If the expected message arrives at the corresponding expected time point, the jitter buffer size and the expected deviation number remain unchanged.
[0082] The preprocessing includes but is not limited to: echo cancellation and noise suppression. In this embodiment, an upper limit and a lower limit are set, and the audio data in this range is defined as the key content of the audio.
[0083] See below Figure 5 , a specific implementation of a storage device 500 is described:
[0084] A storage device 500 stores an instruction set, wherein the instruction set is used to execute:
[0085] Determine whether the expected message arrives at the corresponding expected time point, if the expected message does not arrive at the corresponding expected time point, increase the jitter buffer size and the expected deviation number;
[0086] If the expected message arrives at the corresponding expected time point, the jitter buffer size and the expected deviation number remain unchanged.
[0087] The core attributes of audio data in network transmission are packet sequence number and packet interval, where the packet interval is the audio packet time.
[0088] Furthermore, the “determining whether the expected message arrives at the corresponding expected time point” specifically includes the steps of:
[0089] After a message arrives at a specified time point, the message is set as a reference message, the sequence number of the reference message is n, and it is determined whether a message with a sequence number of n+1 arrives after an audio packetization time interval.
[0090] In this embodiment, taking an audio packetization time of 20ms as an example, in a weak network environment, a message with a sequence number of n is received. If a message with a sequence number of n+1 is received within the standard time of 20ms, it remains unchanged. If a message with a sequence number of n+1 is not received every 20ms, the JitterBuffer and the expected deviation number are dynamically increased to prepare for buffering subsequent messages.
[0091] A storage device 500 stores an instruction set, wherein the instruction set is used to execute: determining whether an expected message arrives at a corresponding expected time point, if the expected message does not arrive at the corresponding expected time point, increasing the jitter buffer size and the expected deviation number; if the expected message arrives at the corresponding expected time point, the jitter buffer size and the expected deviation number remain unchanged. By adaptively adjusting the jitter buffer size according to the network delay, the effect of being compatible with poor network conditions and effectively reducing audio data delay can be achieved.
[0092] Further, the instruction set is further used to execute: reading an audio message from the jitter buffer at a preset time interval, determining whether a first preset condition is met, and if the first preset condition is met, reading the audio message and inputting it into an audio encoder;
[0093] If the first preset condition is not met, discard the audio message, and reduce the jitter buffer size and the expected deviation number;
[0094] The first preset condition includes: the audio message is audio key content, or meets the preset deviation requirement.
[0095] The step of “reading audio messages from the jitter buffer at preset time intervals” specifically includes the following steps:
[0096] The audio message is read from the jitter buffer at every other audio packetization time.
[0097] Specifically, the audio message is read from the JitterBuffer at a fixed interval of 20ms. If it is critical content or meets the preset deviation requirement, it is sent to the audio encoder normally. If it is non-critical content and there is a deviation, the message is discarded to dynamically reduce the JitterBuffer and the expected deviation number.
[0098] Wherein, satisfying the preset deviation requirement includes: the expected deviation number is zero, or the expected deviation number does not exceed a preset threshold.
[0099] In practical applications, there are two reasons why the preset deviation requirements can be met:
[0100] The method of this application is mainly aimed at audio processing, first of all, audio interaction. An audio message is 20ms. Assuming that the audio deviation is 100ms or even 200ms, the human ear cannot hear it subjectively. In addition, network transmission jitter is common, so setting a preset threshold can reduce the frequency of adjustment, thereby reducing the processing time consumption of the service in which this method is located. Therefore, in general practical application scenarios, a preset threshold is configured, assuming it is 10, and the converted time deviation is 200ms. In this case:
[0101] Real network jitter that is frequently within 200ms is not processed, and does not introduce latency, nor does it increase CPU scheduling and consumption. In addition, the audio deviation of 200ms is subjectively inaudible to the human ear. If you are sensitive to the deviation, you can configure a smaller threshold.
[0102] If the real network jitter occasionally exceeds 200ms, correction will be performed to speed up the reading and encoding sending based on whether it is critical content and deviation value.
[0103] If in some application scenarios, there is zero tolerance for delay, then the expected deviation can be set to zero.
[0104] Among them, the following situations can be sent to the audio encoder normally:
[0105] An audio message is read from the jitter buffer at a preset time interval, and if the audio message is audio key content or the expected deviation number is zero, the audio message is read and input into the audio encoder; or if the audio message is audio key content or the expected deviation number does not exceed a preset threshold, the audio message is read and input into the audio encoder.
[0106] In this embodiment, preferably, when an expected message does not arrive at the corresponding expected time point, the expected deviation number is increased by one. Similarly, when an audio message is discarded, the expected deviation number is decreased by one.
[0107] In this embodiment, preferably, the received audio data is processed. Therefore, the instruction set is also used to execute:
[0108] In response to the audio receiving instruction, the received audio is preprocessed, the volume of the preprocessed audio is absolutely quantified, and the audio with a volume within a preset range is taken as the audio key content.
[0109] The preprocessing includes but is not limited to: echo cancellation and noise suppression. In this embodiment, an upper limit and a lower limit are set, and the audio data in this range is defined as the key content of the audio.
[0110] Finally, it should be noted that although the above embodiments have been described in the specification and drawings of this application, this does not limit the scope of patent protection of this application. All technical solutions generated by replacing or modifying equivalent structures or equivalent processes based on the essential concept of this application using the contents recorded in the specification and drawings of this application, as well as directly or indirectly implementing the technical solutions of the above embodiments in other related technical fields, are included in the scope of patent protection of this application.
Claims
1. An audio network adaptation method, characterized in that: Includes steps: Determine whether the expected message arrives at the corresponding expected time point, if the expected message does not arrive at the corresponding expected time point, increase the jitter buffer size and the expected deviation number; If the expected message arrives at the corresponding expected time point, the jitter buffer size and the expected deviation number remain unchanged; Reading an audio message from the jitter buffer at a preset time interval, determining whether a first preset condition is met, and if the first preset condition is met, reading the audio message and inputting it into an audio encoder; If the first preset condition is not met, discard the audio message, and reduce the jitter buffer size and the expected deviation number; The first preset condition includes: the audio message is audio key content, or meets the preset deviation requirement.
2. The audio network adaptation method according to claim 1, characterized in that: The satisfying the preset deviation requirement includes: the expected deviation number is zero, or the expected deviation number does not exceed a preset threshold.
3. The audio network adaptation method according to claim 1, characterized in that: Also includes the steps: In response to the audio receiving instruction, the received audio is preprocessed, the volume of the preprocessed audio is absolutely quantified, and the audio with a volume within a preset range is taken as the audio key content.
4. The audio network adaptation method according to claim 3, characterized in that: The preprocessing includes but is not limited to: echo cancellation and noise suppression.
5. The audio network adaptation method according to claim 1, characterized in that: The step of determining whether the expected message arrives at the corresponding expected time point specifically includes the following steps: After a message arrives at a specified time point, the message is set as a reference message, the sequence number of the reference message is n, and it is determined whether a message with a sequence number of n+1 arrives after an audio packetization time interval; The step of reading the audio message from the jitter buffer at a preset time interval specifically includes the steps of: The audio message is read from the jitter buffer at every other audio packetization time.
6. The audio network adaptation method according to claim 1, characterized in that: The method of increasing the jitter buffer size and the expected deviation number specifically includes the steps of: The expected deviation number is increased by one; The method further comprises the steps of reducing the jitter buffer size and the expected deviation number. The expected number of deviations minus one.
7. The audio network adaptation method according to claim 2, characterized in that: If the first preset condition is met, the audio message is read and input into the audio encoder, which specifically also includes the steps of: If the audio message is audio key content or the expected deviation number is zero, reading the audio message and inputting it into an audio encoder; Or if the audio message is audio key content or the expected deviation number does not exceed a preset threshold, the audio message is read and input into an audio encoder.
8. A storage device having an instruction set stored therein, characterized in that: The instruction set is used to execute: an audio network adaptation method as described in any one of claims 1 to 7.
9. A storage device according to claim 8, characterized in that: The storage device includes: a chip.
