Method, device, storage medium and program product for controlling audio decoding

By detecting invalid running states of the audio decoding thread and valid audio data in the jitter buffer, the audio decoding thread is paused, thus solving the problem of resource waste in the audio decoding thread in multi-person live streaming scenarios and improving resource utilization efficiency.

CN123145244APending Publication Date: 2026-11-20BEIJING ZITIAO NETWORK TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611530499.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-29
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

In scenarios involving multiple users interacting via live chat, multi-user meetings, or live streaming, the audio decoding thread suffers from a significant waste of computing resources, particularly in situations where it remains ineffective during inactive operation.

Method used

By detecting the duration of the invalid running state of the audio decoding thread and whether there is valid audio data in the jitter buffer, the audio decoding thread is paused if the duration of the invalid running state exceeds a preset duration and there is no valid audio data in the jitter buffer.

Benefits of technology

It effectively solves the problem of long-term ineffective idling of audio decoding threads, reduces the ineffective consumption of computing resources, and improves resource utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123145244A_ABST
    Figure CN123145244A_ABST
Patent Text Reader

Abstract

The present application provides a control method, device, storage medium and program product for audio decoding. The method comprises the following steps: detecting a duration of an invalid running state of an audio decoding thread and whether there is valid audio data in a jitter buffer, the duration of the invalid running state being a duration during which the audio decoding thread does not decode valid audio data, the valid audio data being audio data with a volume higher than a preset volume threshold; and in response to the duration of the invalid running state being longer than a preset duration and there being no valid audio data in the jitter buffer, suspending the audio decoding thread. By detecting the duration of the invalid running state of the audio decoding thread and the valid audio data in the jitter buffer, the suspension timing of the audio decoding thread is automatically controlled, the suspension false triggering caused by a transient abnormal scenario is avoided, the problem of long-term invalid idling of the audio decoding thread is effectively solved, and the invalid consumption of computing resource is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This article relates to the field of computer technology, and in particular to a control method, device, storage medium and program product for audio decoding. Background Technology

[0002] In multi-person live streaming, multi-person conferences, or live interactive scenarios, receiving devices typically need to process multiple downlink audio streams simultaneously. The general processing flow of a receiving device includes: receiving network audio data packets, performing packet loss recovery or retransmission processing, writing audio data packets into a jitter buffer, having the audio decoding thread pull data to be decoded from the jitter buffer at a fixed rhythm, performing packet loss concealment (PLC) on missing data or performing extended processing on silence-related data, and finally entering the playback or mixing link.

[0003] However, in some cases, the audio decoding thread can lead to a significant waste of computing resources. Summary of the Invention

[0004] This article provides a control method, device, storage medium, and program product for audio decoding to solve the above-mentioned technical problems.

[0005] Firstly, this paper provides a control method for audio decoding, including:

[0006] The system detects the duration of the invalid running state and whether there is valid audio data in the jitter buffer. The duration of the invalid running state is the duration during which the audio decoding thread does not decode valid audio data. Valid audio data is audio data with a volume higher than a preset volume threshold.

[0007] If the invalid running state lasts for more than a preset duration and there is no valid audio data in the jitter buffer, the audio decoding thread is paused.

[0008] Secondly, this article provides an audio decoding control device, including:

[0009] The detection unit is used to detect the duration of the invalid running state and whether there is valid audio data in the jitter buffer. The duration of the invalid running state is the duration during which the audio decoding thread does not decode the valid audio data. The valid audio data is audio data with a volume higher than a preset volume threshold.

[0010] The control unit is configured to pause the audio decoding thread in response to the invalid operating state lasting for a longer than a preset duration and the absence of valid audio data in the jitter buffer.

[0011] Thirdly, this article provides an electronic device, including: a processor and a memory;

[0012] The memory stores computer-executed instructions;

[0013] The processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the audio decoding control method described in the first aspect and various possible designs of the first aspect.

[0014] Fourthly, this document provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the audio decoding control method described in the first aspect and various possible designs of the first aspect.

[0015] Fifthly, this document provides a computer program product, including a computer program that, when executed by a processor, implements the audio decoding control method described in the first aspect and various possible designs of the first aspect.

[0016] The audio decoding control method, device, storage medium, and program product provided in this paper detect the duration of the invalid running state and the presence of valid audio data in the jitter buffer. The duration of the invalid running state is the duration during which the audio decoding thread does not decode valid audio data, and valid audio data is audio data with a volume higher than a preset volume threshold. In response to the invalid running state duration exceeding the preset duration and the absence of valid audio data in the jitter buffer, the audio decoding thread is paused. By detecting the duration of the invalid running state and the presence of valid audio data in the jitter buffer, the timing of the audio decoding thread's pause is automatically controlled, avoiding accidental pauses caused by transient abnormal scenarios, effectively solving the problem of long-term invalid idling of the audio decoding thread, and reducing the ineffective consumption of computing resources. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in this document or the prior art, the accompanying drawings used in the description of this document or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are some examples of this document. For those skilled in the art, other drawings can be obtained from these drawings without any creative effort.

[0018] Figure 1 A schematic diagram illustrating a control method for audio decoding provided in this paper;

[0019] Figure 2 This paper provides a schematic diagram of the control method for audio decoding.

[0020] Figure 3 This is a flowchart illustrating another audio decoding control method provided in this article;

[0021] Figure 4 This article provides a structural block diagram of an audio decoding control device;

[0022] Figure 5 This is a schematic diagram of the hardware structure of an electronic device provided in this article. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of this document clearer, the technical solutions described below, in conjunction with the accompanying drawings, will be clearly and completely described. Obviously, the described technical solutions are only a part of the technical solutions described herein, not all of them. All other technical solutions obtained by those skilled in the art based on the technical solutions described herein without inventive effort are within the scope of protection of this document.

[0024] Existing audio decoding threads typically run continuously on a periodic basis. Even if there is no valid voice data in the audio stream at the current time, the audio decoding thread will still periodically retrieve data from the audio jitter buffer. When the jitter buffer is empty, the audio decoding thread may still perform idle fetching, status checks, PLC processing, or related synchronization logic. When the remote end is muted for a long time, or when media data is significantly reduced after discontinuous transmission (DTX) is enabled for downlink, the audio decoding thread may still continue to run. In multi-user scenarios, especially in server-side routing scenarios, such as when multiple downlinks are used but only a few valid audio streams are actually transmitted, the audio decoding thread may still run idle for the unselected audio streams. All of the above situations lead to the audio decoding thread running idle, including but not limited to idle fetching, status checks, PLC processing, or related synchronization logic, resulting in a significant waste of computing resources.

[0025] To address the aforementioned technical issues, this paper presents an audio decoding control method. By detecting the duration of the audio decoding thread's inactive state and the valid audio data in the jitter buffer, the method automatically controls the timing of the audio decoding thread's pause. This avoids accidental pauses caused by transient abnormal scenarios, effectively solves the problem of long-term inactive idling of the audio decoding thread, and reduces the ineffective consumption of computing resources.

[0026] The application scenarios of the audio decoding control method in this article are as follows: Figure 1As shown, this application is used in electronic devices such as terminal devices or servers, which are audio data receiving devices. It detects the duration of the audio decoding thread being in an invalid running state and whether there is valid audio data in the jitter buffer. The duration of the invalid running state is the duration during which the audio decoding thread does not decode valid audio data, and the valid audio data is audio data with a volume higher than a preset volume threshold. In response to the duration of the invalid running state exceeding the preset duration and the absence of valid audio data in the jitter buffer, the audio decoding thread is paused.

[0027] The audio decoding control method described in this article will be explained in detail below, taking into account specific circumstances.

[0028] refer to Figure 2 , Figure 2 This document provides a flowchart illustrating an audio decoding control method. This audio decoding control method can be applied to electronic devices such as terminal devices or servers, which serve as audio data receiving devices. The audio decoding control method includes:

[0029] S201. Detect the duration of the invalid running state and whether there is valid audio data in the jitter buffer. The duration of the invalid running state is the duration during which the audio decoding thread does not decode valid audio data. Valid audio data is audio data with a volume higher than a preset volume threshold.

[0030] The receiving device can receive network audio data and write it into the receiving and processing link. The input is the audio RTP (Real-time Transport Protocol) packets or recovery packets received from the network. The receiving device first performs regular packet order processing, packet loss-related processing, and necessary recovery judgment, and then writes the audio data available for subsequent processing into the audio jitter buffer.

[0031] The audio decoding thread periodically pulls audio data from the audio jitter buffer, with the input being the timing request of the audio decoding thread and the current state of the audio jitter buffer. If the jitter buffer contains valid audio data that can be decoded, normal dequeueing and pre-decoding processing are performed; if there is no valid audio data, it may enter the PLC (Packet Loss Concealment) extension or the silence extension (Comfort Noise Generation, CNG) path. Audio compensation includes packet loss concealment extension and / or silence extension. Packet loss concealment extension occurs when there is no bitstream input due to network packet loss, and the audio decoding thread locally generates continuation voice to compensate for the lost audio frames. Silence extension, on the other hand, generates comfortable background noise in silent scenarios to avoid absolute silence and prevent users from mistakenly believing the call has been disconnected.

[0032] To prevent the audio decoding thread from running idle, the receiving device can detect the duration of the invalid running state. The invalid running state, also known as the idle state, means that the audio decoding thread has not decoded valid audio data and output the corresponding decoding result. This allows for precise identification of the invalid running state of the audio decoding thread and synchronous verification of the existence of valid audio data in the jitter buffer. The duration of the audio decoding thread in the invalid running state can correspond to the duration of continuous execution of PLC extensions, CNG mute extensions, or the duration of continuous reception of invalid audio data by the receiving device. Valid audio data is defined as audio data with a volume higher than a preset volume threshold, while invalid audio data is defined as audio data with a volume lower than the preset volume threshold. This allows for precise differentiation between valid human voices, business audio, and silence or compensation pseudo-audio.

[0033] In one possible scenario, the duration of the invalid operating state is detected, including:

[0034] The audio compensation duration is detected as the duration of the invalid running state, where the audio compensation duration includes the duration for which the audio decoding thread executes packet loss hiding extension and / or silence extension; or

[0035] The duration of invalid audio data detection is used as the duration of invalid operation state. The duration of invalid audio data detection is the duration of receiving invalid audio data, and invalid audio data is audio data with a volume not higher than a preset volume threshold.

[0036] In particular, an excessively long audio compensation duration for the audio decoding thread is equivalent to the audio decoding thread being in an ineffective running state.

[0037] The duration of receiving invalid audio data can be determined by factors such as the audio stream being muted, the audio stream not being selected in a server routing scenario where invalid audio data may continue to be transmitted, or the audio data being at a low volume for an extended period. Audio data with a volume not exceeding a preset volume threshold can be considered invalid audio data, and the duration of receiving invalid audio data can be statistically analyzed.

[0038] Optionally, during the process of receiving network audio data and writing it into the receiving processing link, the receiving device can determine whether there is valid audio data in the jitter buffer and record it. In addition, it can also record flags related to the activity status of the audio decoding thread, whether the current audio data packet is newly arrived media data, whether the current audio data packet reflects that the audio stream has re-entered an active state (judged by volume), etc.

[0039] The duration of the invalid running state can be detected by recording the duration of the audio decoding thread being in an invalid running state during the periodic process of the audio decoding thread pulling audio data from the audio jitter buffer. This includes the duration of receiving invalid audio data, the duration (or number) of audio compensation, and the current state of the audio decoding thread (whether it is in an active state).

[0040] S202. In response to the invalid running state lasting longer than the preset duration and the absence of valid audio data in the jitter buffer, the audio decoding thread is paused.

[0041] The control logic for pausing the audio decoding thread adopts a dual-condition joint judgment mechanism. When the duration of the invalid running state of the audio decoding thread exceeds the preset duration and there is no valid audio data in the jitter buffer, the audio decoding thread can be paused. This avoids the defects of a single judgment condition, prevents false pauses caused by instantaneous network jitter, brief packet loss or short-term silence, improves the accuracy of the pause strategy, effectively filters instantaneous abnormal scenarios, and solves the problem of long-term invalid idling of the audio decoding thread, reducing the ineffective consumption of computing resources.

[0042] Specifically, corresponding to the two scenarios listed above where the audio decoding thread is in an invalid running state for a certain duration, the audio decoding thread can be paused when the audio compensation duration of the audio decoding thread exceeds a preset duration and there is no valid audio data in the jitter buffer; or, the audio decoding thread can be paused when the duration of receiving invalid audio data exceeds a preset duration and there is no valid audio data in the jitter buffer.

[0043] Optionally, the pause conditions are configurable. Different scenarios can enable one condition or enable multiple conditions for joint judgment.

[0044] It should be noted that the above audio decoding control method can be applied to scenarios with multiple audio streams. Since each audio stream is decoded by an audio decoding thread, the above audio decoding control method can be executed separately for each audio stream.

[0045] The aforementioned audio decoding control method detects the duration of the invalid running state and the presence of valid audio data in the jitter buffer. The duration of the invalid running state is the duration during which the audio decoding thread fails to decode valid audio data, and valid audio data is audio data with a volume higher than a preset volume threshold. In response to the invalid running state exceeding the preset duration and the absence of valid audio data in the jitter buffer, the audio decoding thread is paused. By detecting the duration of the invalid running state and the presence of valid audio data in the jitter buffer, the pause timing of the audio decoding thread is automatically controlled, avoiding accidental pauses caused by transient abnormal scenarios. This effectively solves the problem of long-term invalid idling of the audio decoding thread and reduces the ineffective consumption of computing resources.

[0046] In one possible scenario, the jitter buffer can also be cleared after pausing the audio decoding thread.

[0047] To prevent invalid audio data from accumulating during the pause of the audio decoding thread, invalid audio data can be cleaned up during the pause state. The purpose is to prevent the audio decoding thread from facing a large amount of meaningless historical invalid audio data, cache accumulation leading to large memory overhead, or introducing audio-visual synchronization problems after it resumes, which would affect the recovery efficiency or bring additional processing burden.

[0048] In one possible scenario, after pausing the audio decoding thread, the duration of the invalid running state can be reset to avoid wasting computing resources by continuing to count down the duration of the invalid running state, and to facilitate restarting the timing after recovery.

[0049] In addition, a flag indicating that the audio decoding thread has been paused can be set in the jitter buffer or on the data management side to facilitate subsequent resumption.

[0050] In one possible case, such as Figure 3 As shown, after pausing the audio decoding thread, the following also applies:

[0051] S301. Check if valid audio data has been received;

[0052] S302. In response to detecting that valid audio data has been received, resume the audio decoding thread.

[0053] In this process, after pausing the audio decoding thread, if the receiving device receives new valid audio data (volume higher than a preset volume threshold), or if new valid audio data is inserted into the jitter buffer, it indicates that there is audio data that needs to be decoded, and the audio decoding thread needs to be resumed. This triggers a recovery operation. Additionally, the flag indicating that the audio decoding thread is paused can be cleared. This process constitutes the recovery closed loop in the main scheme: pausing is triggered by the idle state of the consumer side (receiving device), and recovery is triggered by the arrival of new active data on the production side, thus balancing energy saving and timely recovery.

[0054] In one possible scenario, in response to the detection of received valid audio data, the audio decoding thread is resumed, including:

[0055] In response to the detection that valid audio data has been received and that the amount of valid audio data in the jitter buffer exceeds a preset data amount threshold, the audio decoding thread is resumed.

[0056] To prevent the audio decoding thread from resuming when there is only a small amount of valid audio data in the jitter buffer, and to prevent the audio decoding thread from re-entering PLC / CNG compensation immediately after resuming due to insufficient valid audio data during short-term network jitter, causing frequent start-stop oscillations of the audio decoding thread, the audio decoding thread can be resumed only after the amount of buffered valid audio data in the jitter buffer exceeds a preset data amount threshold after detecting the received valid audio data. This allows the audio decoding thread to reread the valid audio data in the jitter buffer to perform decoding, ensuring stable and continuous audio service output after recovery, improving audio playback continuity, and reducing the computing power overhead caused by frequent thread switching.

[0057] In one possible scenario, in response to detecting that valid audio data has been received and that the amount of valid audio data buffered in the jitter buffer exceeds a preset data size threshold, the audio decoding thread resumes, including:

[0058] In response to the detection that valid audio data has been received, and the time interval between the audio queue head timestamp and the video queue current playback timestamp is less than a first preset time threshold, and the amount of cached valid audio data in the jitter buffer exceeds a preset data amount threshold, the audio decoding thread is resumed.

[0059] Upon detecting the arrival of valid audio data, the system not only verifies the amount of data cached in the jitter buffer but also adds audio-video timestamp synchronization constraints. This prevents audio-visual misalignment after the audio decoding thread resumes, balancing audio continuity and audio-video synchronization. Specifically, the system compares the time interval between the timestamp to be played at the head of the audio queue and the current playback timestamp in the video queue. If the time interval is less than a first preset time threshold, it indicates good audio-visual synchronization. Furthermore, if the amount of data cached in the jitter buffer exceeds the preset data threshold, the system triggers the resumption of the audio decoding thread. By triggering the audio decoding thread resumption through multiple conditions, the system suppresses thread start-stop oscillations by relying on the amount of cached data and ensures audio-video alignment at the moment of resumption through timestamp verification. This reduces audio-visual asynchrony issues during playback resumption, improves the playback experience, and reduces computational overhead caused by invalid thread switching.

[0060] In one possible scenario, upon detecting the reception of valid audio data and resuming the audio decoding thread, the process includes:

[0061] In response to continuous video playback and an audio decoding thread pause duration exceeding the second preset time threshold, the minimum audio-visual synchronization latency is reset.

[0062] If the video plays normally and continuously, but the audio decoding thread is paused, or no audio data is received for a long time, it can be determined whether the pause duration of the audio decoding thread (or the duration of no audio data reception) exceeds the second preset time threshold. If it exceeds the second preset time threshold, the minimum delay of the audio-visual synchronization setting is directly reset, and the relevant statistics are reset, thereby performing audio-video alignment, realizing audio-visual synchronization, and avoiding the old synchronization relationship from continuously imposing unnecessary constraints on the current playback link when the audio stream is missing for a long time.

[0063] Optionally, the audio decoding thread can be further extended to: detect the first active media packet, detect a non-silent audio packet, or detect several consecutive packets of valid media data and then resume operation only if the data is synchronized with or slightly slower than the video feed.

[0064] Alternatively, destroying and rebuilding the receiving link can be used instead of sleeping and resuming. This approach releases resources more thoroughly when there is no valid audio data for a long time, but it increases the complexity of state recovery, timestamp continuity, audio-visual synchronization, statistical continuity, and thread lifecycle management.

[0065] Optionally, the audio decoding thread can also determine whether to pause. The audio decoding thread can enter sleep mode based on the number of consecutive times it fails to fetch valid data, and resume upon external notification or timed probe. This approach is relatively straightforward, but the audio decoding thread has weak awareness of upstream buffer status, packet loss recovery status, and silent data types, making it prone to premature pausing or delayed resumption.

[0066] Alternatively, a solution can be adopted where the server or sender explicitly notifies the receiver of inactive states. For example, when the server stops sending a certain audio stream to the receiver, or when the sender enters a prolonged silent state, an upstream control message notifies the receiver to pause the corresponding decoding link. This solution can reduce the receiver's decision-making cost, but it relies on additional signaling or protocol extensions and requires additional handling in scenarios involving network anomalies, signaling delays, or incompatibility with different versions.

[0067] In one possible scenario, to avoid insufficient benefits or the introduction of additional state complexity in controlling the start and stop of the audio decoding thread in low-stream scenarios, a minimum downlink stream count threshold can be preset to enable automatic start and stop of the audio decoding thread. The automatic start and stop of the audio decoding thread in the above embodiment is only enabled when the current downlink stream count reaches this minimum threshold; otherwise, the original fixed fetch strategy is maintained. This process can serve as a threshold strategy in engineering implementation, prioritizing the automatic start and stop scheme of the audio decoding thread in the above embodiment for scenarios with multi-person audio, multi-person conferencing, or where server-side routing is more significant, thereby improving control benefits. For single-stream scenarios, the original logic can remain unchanged, or it can be automatically disabled through a stream count threshold.

[0068] In one possible scenario, a stream activity detection node can be configured on the receiving device or the server side. This node controls the start and stop of the audio decoding thread. The stream activity detection node can make decisions based on global pipeline information. The advantage of this approach is that it can obtain a more global stream state. The disadvantage is that each audio packet needs to go through additional detection logic, which may increase processing overhead, and it is difficult to directly perceive whether the jitter buffer has met the playback conditions. Alternatively, the start and stop of the audio decoding thread can be controlled by the audio jitter buffer and the audio-visual synchronization state.

[0069] The above alternatives can be used alone or in combination with the audio decoding control methods described above. For example, the global stream activity detection module can first filter candidate inactive streams, and then the jitter buffer module can make the final pause decision based on its own state; alternatively, during the pause, both low-frequency detection and effective data arrival triggering mechanisms can be combined to further improve robustness.

[0070] The audio decoding control methods described above can significantly reduce invalid decoding fetching in multi-channel audio reception scenarios. For audio links with prolonged periods of no valid data, continuous data duration of receiving silent data, or those not selected by the server, the corresponding audio decoding threads no longer continuously perform periodic empty polling, thereby reducing computational resource consumption, thread scheduling overhead, and lock contention overhead. The start / stop decision is placed in the jitter buffer module or a control module closely related to its state, allowing the decision to directly utilize information such as buffer data volume, playback actions, continuous data duration of receiving silent data, continuous no data, and recovery status. Compared to relying solely on the external stream activity detection module, this method offers finer granularity and can more accurately distinguish between short-term jitter and prolonged periods without valid audio data. When pausing the decoding link... Simultaneously, it retains the recovery path after the arrival of valid audio data. When valid audio data arrives and the recovered data forms a playable frame or buffer to meet the playback conditions again, the decoding link can be woken up in time, reducing the risk of playback start delay caused by pauses. Through data cleaning and statistical correction during the pause, it avoids the accumulation of silence placeholder data and misjudgment of quality statistics. For data links that only receive silence or have no valid voice, it will not be wrongly judged as decoding failure simply because valid decoding has not been completed. It can also further reduce the redundancy overhead in the receiving link by combining the fast path for packet loss recovery and the audio-visual synchronization state reset, and reduce the impact of historical synchronization state on the current playback latency. In summary, this method can improve the terminal performance and resource utilization efficiency in multi-person real-time audio communication scenarios without significantly affecting audio continuity and recovery timeliness.

[0071] Corresponding to the audio decoding control method described above, Figure 4 This is a block diagram of the control device for the audio decoding provided in this article. For ease of illustration, only the parts relevant to this article are shown. (Refer to...) Figure 4 The audio decoding control device 400 includes: a detection unit 401 and a control unit 402.

[0072] The detection unit 401 is used to detect the duration of the invalid running state and whether there is valid audio data in the jitter buffer. The duration of the invalid running state is the duration during which the audio decoding thread does not decode the valid audio data. The valid audio data is audio data with a volume higher than a preset volume threshold.

[0073] Control unit 402 is used to pause the audio decoding thread in response to an invalid running state lasting longer than a preset duration and the absence of valid audio data in the jitter buffer.

[0074] The duration of the invalid operating state is detected in one or more of the following situations:

[0075] The audio compensation duration is detected as the duration of the invalid running state, where the audio compensation duration includes the duration for which the audio decoding thread executes packet loss hiding extension and / or silence extension; or

[0076] The duration of invalid audio data detection is used as the duration of invalid operation state. The duration of invalid audio data detection is the duration of receiving invalid audio data, and invalid audio data is audio data with a volume not higher than a preset volume threshold.

[0077] In one or more situations, when the control unit 402 pauses the audio decoding thread, it is used to:

[0078] This option allows you to put the audio decoding thread into a sleep state, or to pause the audio decoding thread from fetching audio data from the jitter buffer.

[0079] In one or more situations, after pausing the audio decoding thread, the control unit 402 is also used to:

[0080] Clean up the jitter buffer; and / or

[0081] Duration of the ineffective reset operation state.

[0082] In one or more situations, after pausing the audio decoding thread, the control unit 402 is also used to:

[0083] In response to the detection unit 401 detecting that valid audio data has been received, the audio decoding thread is resumed.

[0084] In one or more situations, when the control unit 402 resumes the audio decoding thread in response to detecting that valid audio data has been received, it is configured to:

[0085] In response to the detection unit 401 detecting that valid audio data has been received and that the amount of cached valid audio data in the jitter buffer exceeds a preset data amount threshold, the audio decoding thread is resumed.

[0086] In one or more situations, the control unit 402, in response to detecting that valid audio data has been received and that the amount of valid audio data buffered in the jitter buffer exceeds a preset data amount threshold, resumes the audio decoding thread for:

[0087] In response to the detection unit 401 detecting that valid audio data has been received, and the time interval between the audio queue head timestamp and the video queue current playback timestamp is less than a first preset time threshold, and the amount of cached valid audio data in the jitter buffer exceeds a preset data amount threshold, the audio decoding thread is resumed.

[0088] In one or more situations, after resuming the audio decoding thread upon detecting valid received audio data, the control unit 402 is used to:

[0089] In response to continuous video playback and an audio decoding thread pause duration exceeding the second preset time threshold, the minimum audio-visual synchronization latency is reset.

[0090] The control device for the aforementioned audio decoding can be used to execute the technical solution described above. Its implementation principle and technical effect are similar, and will not be elaborated here.

[0091] To achieve the above technical solution, this paper also provides an electronic device.

[0092] refer to Figure 5 The diagram illustrates the structure of an electronic device 500 suitable for implementing this document, which can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, personal digital assistants (PDAs), tablet computers, portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital televisions (TVs) and desktop computers. Figure 5 The electronic device shown is merely an example and should not impose any limitations on the functionality and scope of this article.

[0093] like Figure 5 As shown, the electronic device 500 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from storage device 508 into random access memory (RAM) 503. The random access memory 503 also stores various programs and data required for the operation of the electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0094] Typically, the following devices can be connected to the input / output interface 505: input devices 506 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0095] Specifically, according to the technical solutions described herein, the processes described in the above-referenced flowchart can be implemented as computer software programs. For example, one aspect of this invention includes a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowchart. In such a case, the computer program can be downloaded and installed from a network via communication device 509, or installed from storage device 508, or installed from read-only memory 502. When the computer program is executed by processing device 501, it performs the functions defined in the methods described herein.

[0096] It should be noted that the computer-readable storage medium mentioned above can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this document, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. The transmitted data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable storage medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (Radio Frequency), etc., or any suitable combination thereof.

[0097] The aforementioned computer-readable storage medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0098] The aforementioned computer-readable storage medium carries one or more programs, and when the aforementioned one or more programs are executed by the electronic device, the electronic device performs the aforementioned method.

[0099] Computer program code for performing the operations described herein can be written in one or more programming languages ​​or a combination thereof. These programming languages ​​include object-oriented programming languages—such as Java, Smalltalk, and C++—as well as conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0100] The flowcharts and block diagrams in the accompanying figures illustrate the architecture, functionality, and operation of possible implementations of the systems, methods, and computer program products according to the various situations described herein. In this respect, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the figures. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0101] The units described herein can be implemented in software or hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".

[0102] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field-Programmable Gate Array (FPGA), Application-Specific Integrated Circuit (ASIC), Application-Specific Standard Product (ASSP), System on Chip (SOC), Complex Programmable Logic Device (CPLD), and so on.

[0103] Firstly, depending on one or more situations, an audio decoding control method is provided, including:

[0104] The system detects the duration of the invalid running state and whether there is valid audio data in the jitter buffer. The duration of the invalid running state is the duration during which the audio decoding thread does not decode valid audio data. Valid audio data is audio data with a volume higher than a preset volume threshold.

[0105] If the invalid running state lasts for more than the preset duration and there is no valid audio data in the jitter buffer, the audio decoding thread is paused.

[0106] The duration of the invalid operating state is detected in one or more of the following situations:

[0107] The audio compensation duration of the audio decoding thread is detected as the duration of the invalid running state, where audio compensation includes packet loss hiding extension and / or silence extension; or

[0108] The duration of receiving invalid audio data is used as the duration of the invalid operating state. Invalid audio data refers to audio data whose volume is not higher than a preset volume threshold.

[0109] In one or more of the following situations, the audio decoding thread is paused:

[0110] This option allows you to put the audio decoding thread into a sleep state, or to pause the audio decoding thread from fetching audio data from the jitter buffer.

[0111] In one or more cases, after pausing the audio decoding thread, the following are also included:

[0112] Clean up the jitter buffer; and / or

[0113] Duration of the ineffective reset operation state.

[0114] In one or more cases, after pausing the audio decoding thread, the following are also included:

[0115] In response to the detection of valid audio data received, the audio decoding thread is resumed.

[0116] In one or more of these cases, in response to detecting that valid audio data has been received, the audio decoding thread is resumed, including:

[0117] In response to the detection that valid audio data has been received and that the amount of valid audio data in the jitter buffer exceeds a preset data amount threshold, the audio decoding thread is resumed.

[0118] In one or more of these cases, in response to detecting that valid audio data has been received and that the amount of valid audio data buffered in the jitter buffer exceeds a preset data amount threshold, the audio decoding thread is resumed, including:

[0119] In response to the detection that valid audio data has been received, and the time interval between the audio queue head timestamp and the video queue current playback timestamp is less than a first preset time threshold, and the amount of cached valid audio data in the jitter buffer exceeds a preset data amount threshold, the audio decoding thread is resumed.

[0120] In one or more of these cases, after resuming the audio decoding thread in response to detecting that valid audio data has been received, the following steps are included:

[0121] In response to continuous video playback and an audio decoding thread pause duration exceeding the second preset time threshold, the minimum audio-visual synchronization latency is reset.

[0122] Secondly, depending on one or more circumstances, an audio decoding control device is provided, comprising:

[0123] The detection unit is used to detect the duration of the invalid running state and whether there is valid audio data in the jitter buffer. The duration of the invalid running state is the duration during which the audio decoding thread does not decode valid audio data, and the valid audio data is audio data with a volume higher than a preset volume threshold.

[0124] The control unit is used to pause the audio decoding thread in response to an invalid operating state lasting longer than a preset duration and the absence of valid audio data in the jitter buffer.

[0125] The duration of the invalid operating state is detected in one or more of the following situations:

[0126] The audio compensation duration is detected as the duration of the invalid running state, where the audio compensation duration includes the duration for which the audio decoding thread executes packet loss hiding extension and / or silence extension; or

[0127] The duration of invalid audio data detection is used as the duration of invalid operation state. The duration of invalid audio data detection is the duration of receiving invalid audio data, and invalid audio data is audio data with a volume not higher than a preset volume threshold.

[0128] In one or more situations, when the control unit pauses the audio decoding thread, it is used to:

[0129] This option allows you to put the audio decoding thread into a sleep state, or to pause the audio decoding thread from fetching audio data from the jitter buffer.

[0130] In one or more cases, after pausing the audio decoding thread, the control unit is also used to:

[0131] Clean up the jitter buffer; and / or

[0132] Duration of the ineffective reset operation state.

[0133] In one or more cases, after pausing the audio decoding thread, the control unit is also used to:

[0134] In response to the detection of valid audio data received, the audio decoding thread is resumed.

[0135] In one or more situations, when the control unit resumes the audio decoding thread in response to detecting that valid audio data has been received, it is configured to:

[0136] In response to the detection that valid audio data has been received and that the amount of valid audio data in the jitter buffer exceeds a preset data amount threshold, the audio decoding thread is resumed.

[0137] In one or more situations, the control unit, in response to detecting that valid audio data has been received and that the amount of valid audio data buffered in the jitter buffer exceeds a preset data amount threshold, resumes the audio decoding thread for:

[0138] In response to the detection that valid audio data has been received, and the time interval between the audio queue head timestamp and the video queue current playback timestamp is less than a first preset time threshold, and the amount of cached valid audio data in the jitter buffer exceeds a preset data amount threshold, the audio decoding thread is resumed.

[0139] In one or more situations, after the control unit detects that valid audio data has been received and resumes the audio decoding thread, it is used to:

[0140] In response to continuous video playback and an audio decoding thread pause duration exceeding the second preset time threshold, the minimum audio-visual synchronization latency is reset.

[0141] Thirdly, depending on one or more circumstances, an electronic device is provided, comprising: at least one processor and a memory;

[0142] The memory stores the instructions that the computer executes;

[0143] At least one processor executes computer execution instructions stored in memory, causing at least one processor to perform the audio decoding control method as described in the first aspect above and various possible designs of the first aspect.

[0144] Fourthly, depending on one or more circumstances, a computer-readable storage medium is provided, which stores computer-executable instructions that, when executed by a processor, implement the audio decoding control method described in the first aspect and various possible designs of the first aspect.

[0145] Fifthly, according to one or more circumstances, a computer program product is provided, including a computer program that, when executed by a processor, implements the control method for audio decoding as described in the first aspect above and various possible designs of the first aspect.

[0146] The above description is merely a preferred technical solution and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure herein is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed herein that have similar functions.

[0147] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be executed in the specific order shown or in a sequential order. Multitasking and parallel processing may be advantageous in certain contexts. Similarly, while some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of this paper. Certain features described in the context of a single case can also be implemented in combination within that single case. Conversely, various features described in the context of a single case can also be implemented individually or in any suitable sub-combination in multiple cases.

[0148] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A control method for audio decoding, comprising: The system detects the duration of the invalid running state and whether there is valid audio data in the jitter buffer. The duration of the invalid running state is the duration during which the audio decoding thread does not decode valid audio data. Valid audio data is audio data with a volume higher than a preset volume threshold. If the invalid running state lasts for more than a preset duration and there is no valid audio data in the jitter buffer, the audio decoding thread is paused.

2. The method according to claim 1, wherein the duration of detecting the invalid operating state includes: The audio compensation duration is detected as the duration of the invalid running state, wherein the audio compensation duration includes the duration for which the audio decoding thread executes packet loss hiding extension and / or silence extension; or The duration of invalid audio data is used as the duration of the invalid operating state, wherein the duration of invalid audio data is the duration of receiving invalid audio data, and the invalid audio data is audio data with a volume not higher than a preset volume threshold.

3. The method according to claim 1 or 2, wherein pausing the audio decoding thread includes: The audio decoding thread can be controlled to enter a sleep state, or the audio decoding thread can be controlled to pause fetching audio data from the jitter buffer.

4. The method according to claim 1 or 2, further comprising, after pausing the audio decoding thread: Clear the jitter buffer; and / or Reset the duration of the invalid operating state.

5. The method according to claim 1 or 2, further comprising, after pausing the audio decoding thread: In response to the detection of received valid audio data, the audio decoding thread is resumed.

6. The method according to claim 5, wherein resuming the audio decoding thread in response to detecting the reception of valid audio data comprises: In response to the detection that valid audio data has been received and that the amount of valid audio data cached in the jitter buffer exceeds a preset data amount threshold, the audio decoding thread is resumed.

7. The method according to claim 6, wherein the step of resuming the audio decoding thread in response to detecting that valid audio data has been received and that the amount of cached valid audio data in the jitter buffer exceeds a preset data amount threshold includes: In response to detecting that valid audio data has been received, and the time interval between the audio queue head timestamp and the video queue current playback timestamp is less than a first preset time threshold, and the amount of cached valid audio data in the jitter buffer exceeds a preset data amount threshold, the audio decoding thread is resumed.

8. The method according to claim 5, wherein after resuming the audio decoding thread in response to detecting the reception of valid audio data, the method further includes: In response to continuous video playback and the pause duration of the audio decoding thread exceeding a second preset time threshold, the minimum audio-visual synchronization latency is reset.

9. A control device for audio decoding, comprising: The detection unit is used to detect the duration of the invalid running state and whether there is valid audio data in the jitter buffer. The duration of the invalid running state is the duration during which the audio decoding thread does not decode the valid audio data. The valid audio data is audio data with a volume higher than a preset volume threshold. The control unit is configured to pause the audio decoding thread in response to the invalid operating state lasting for a longer than a preset duration and the absence of valid audio data in the jitter buffer.

10. An electronic device, comprising: Processor and memory; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-8.

11. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the method as described in any one of claims 1-8.

12. A computer program product comprising a computer program that, when executed by a processor, implements the method as described in any one of claims 1-8.