Audio processing method and device and electronic equipment

By judging the target parameters of the audio signal in the audio processing and deciding whether to perform sound effects processing, the problem of excessive resource occupation caused by sound effects processing during the audio processing is solved, and the optimization of audio output and user experience is achieved.

CN119071690APending Publication Date: 2024-12-03LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411196362.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

During the audio processing process, frequent sound effect processing will cause excessive processor resource utilization, resulting in delayed or stuttered audio playback, affecting the operating performance of electronic devices.

Method used

By obtaining the target parameters of the audio signal, it is determined whether the sound effect processing is performed in a short time. If the target parameters meet specific conditions, the sound effect processing is not performed to avoid resource occupation, or the audio signal is processed through the sound effect processing system to optimize the output effect.

Benefits of technology

It effectively avoids the problems of excessive processor load and audio output lag caused by sound effects processing, improves the user experience, and ensures the operating performance of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071690A_ABST
    Figure CN119071690A_ABST
Patent Text Reader

Abstract

The invention discloses an audio processing method and device and electronic equipment, and the method comprises the steps: obtaining a first audio signal, the first audio signal is provided for a sound effect processing system to obtain a second audio signal, and the output effect of the second audio signal is better than the output effect of the first audio signal; obtaining a target parameter based on the first audio signal; if the target parameter meets the first condition, processing the first audio signal based on a first processing flow to obtain a third audio signal; if the target parameter meets a second condition, processing the first audio signal based on a second processing flow to obtain a second audio signal; wherein the second processing flow comprises a sound effect processing system, and the first processing flow does not comprise the sound effect processing system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and more specifically to an audio processing method, device and electronic device. Background Art

[0002] During the audio processing process, sound effects can be added to the audio data to improve the audio output effect. However, there are still certain problems in the sound effect adding process, which affects the performance of the electronic device. Summary of the invention

[0003] In view of this, this application provides the following technical solutions:

[0004] An audio processing method, comprising:

[0005] Obtaining a first audio signal, wherein the first audio signal is provided to an audio effect processing system to obtain a second audio signal, wherein an output effect of the second audio signal is better than an output effect of the first audio signal;

[0006] obtaining a target parameter based on the first audio signal;

[0007] If the target parameter satisfies a first condition, processing the first audio signal based on a first processing flow to obtain a third audio signal;

[0008] If the target parameter satisfies a second condition, processing the first audio signal based on a second processing flow to obtain a second audio signal;

[0009] The second processing flow includes the sound effect processing system, and the first processing flow does not include the sound effect processing system.

[0010] Optionally, the target parameter satisfying the first condition indicates that if the processor responds based on the sound effect processing system processing the first audio signal within a unit time length, the processor will be affected.

[0011] Optionally, obtaining a target parameter based on the first audio signal includes:

[0012] Obtaining the Nth time of the Nth first audio signal;

[0013] Obtaining the N-1th time of the N-1th first audio signal;

[0014] Determine a time difference between the Nth time and the N-1th time, and determine the time difference as a target parameter;

[0015] Among them, if the time difference between the Nth time and the N-1th time is greater than the unit duration, the second condition is met.

[0016] Optionally, obtaining a target parameter based on the first audio signal further includes:

[0017] If the time difference between the Nth time and the N-1th time is not greater than the unit time length, or a first number of first audio signals processed based on the second processing flow within the unit time length before the Nth time, determine the first number as the target parameter;

[0018] Among them, if the target parameter satisfies a first condition, it includes that the first quantity is not less than a target quantity threshold; if the target parameter satisfies a second condition, it includes that the first quantity is less than the target quantity threshold.

[0019] Optionally, obtaining a first number of first audio signals processed based on the second processing flow within a unit time length before the Nth time includes:

[0020] Obtaining timestamp information of a first audio signal processed based on the second processing flow within a unit time length before the Nth time;

[0021] Based on the record value corresponding to each of the timestamp information, a first quantity of the first audio signals processed based on the second processing flow within a unit time length before the Nth time is determined.

[0022] Optionally, it also includes:

[0023] Based on the first recorded value corresponding to the first timestamp information of the first audio signal of the first sequence position processed by the second processing flow within the unit time length before the Nth time, the recorded values ​​corresponding to the timestamp information of each first audio signal processed by the second processing flow within the unit time length before the Nth time are updated.

[0024] Optionally, the method further comprises:

[0025] If the time difference between the Nth time and the N-1th time is greater than the unit time length, the first audio signal at the Nth time is processed based on the second processing flow, and the record value corresponding to the timestamp information of the first audio signal at the Nth time is updated to the target record value.

[0026] Optionally, it also includes:

[0027] detecting an operating state of the processor;

[0028] Based on the operating state of the processor, the first condition and / or the second condition is updated.

[0029] An audio processing device, comprising:

[0030] A first acquisition unit, configured to obtain a first audio signal, wherein the first audio signal is provided to an audio effect processing system to obtain a second audio signal, wherein an output effect of the second audio signal is better than an output effect of the first audio signal;

[0031] A second acquisition unit, configured to obtain a target parameter based on the first audio signal;

[0032] a first processing unit, configured to process the first audio signal based on a first processing flow to obtain a third audio signal if the target parameter satisfies a first condition;

[0033] a second processing unit, configured to process the first audio signal based on a second processing flow to obtain a second audio signal if the target parameter satisfies a second condition;

[0034] The second processing flow includes the sound effect processing system, and the first processing flow does not include the sound effect processing system.

[0035] An electronic device, comprising:

[0036] Audio output components and processors;

[0037] The processor is used to obtain a first audio signal, the first audio signal is used to provide to a sound effect processing system to obtain a second audio signal, and the output effect of the second audio signal is better than the output effect of the first audio signal; obtain a target parameter based on the first audio signal; if the target parameter meets a first condition, process the first audio signal based on a first processing flow to obtain a third audio signal; if the target parameter meets a second condition, process the first audio signal based on a second processing flow to obtain a second audio signal; wherein the second processing flow includes the sound effect processing system, and the first processing flow does not include the sound effect processing system;

[0038] The audio output element is used to output the second audio signal or the third audio signal. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0040] Figure 1 A flowchart of an audio processing method provided in an embodiment of the present application;

[0041] Figure 2A schematic diagram of a receiving time axis of a first audio signal provided in an embodiment of the present application;

[0042] Figure 3 A schematic diagram of a timeline of audio processing provided in an embodiment of the present application;

[0043] Figure 4 A schematic diagram of another timeline provided in an embodiment of the present application;

[0044] Figure 5 A schematic diagram of the structure of an audio processing device provided in an embodiment of the present application;

[0045] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0047] The terms "first", "second", etc. in this application are used to distinguish different objects, rather than to describe a specific order. For example, the first audio signal and the second audio signal in the embodiment of the present application are only audio signals that characterize different audio signals. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. Mentioning "embodiment" in this application 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 appearance of this phrase at various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.

[0048] In order to better understand the audio processing method, device and electronic device disclosed in the embodiments of the present application, the embodiments of the present application are described in detail below.

[0049] See also Figure 1 , Figure 1 A flowchart of an audio processing method provided in an embodiment of the present application, the method may include the following steps:

[0050] S101: Obtain a first audio signal.

[0051] The first audio signal may be an audio signal to be output by an audio application currently running in the electronic device. The first audio signal may be an original audio signal, i.e., an audio signal that has not been processed in any way, or may be a preprocessed audio signal, such as an audio signal after decoding encoded compressed audio data. The electronic device may be any one of a mobile phone, a computer, a speaker, a smart wearable device, or a vehicle-mounted audio device. Usually, the audio output process is to output the corresponding audio data stream, and the first audio signal is an audio signal corresponding to the audio data to be output currently, such as the first audio signal is an audio signal of the current frame of audio data, i.e., the audio output is a continuous output process of the audio signal. Therefore, in the embodiment of the present application, for the convenience of description, the audio signal corresponding to each frame of audio data to be output is referred to as the first audio signal.

[0052] Usually, in order to improve the effect of audio signal output, the audio signal is processed with sound effects so that a clear, immersive and shocking audio output effect can be provided to the user. Generally, a sound effect processing system is used to process the corresponding audio signal with sound effects, such as adding sound effects that meet the current application scenario and needs. The first audio signal is provided to the sound effect system to obtain a second audio signal. The output effect of the first audio signal is better than the output effect of the first audio signal. Among them, the sound effect processing system is a functional module that can process the first sound effect signal with sound effects, which can be a functional module in the current electronic device processor, or a functional module connected to the processor. Specifically, the sound effect processing system can determine the sound effect processing mode based on the current audio scene, such as the sound effect processing mode can include an immersive sound effect mode, a stereo sound effect mode, a panoramic sound effect mode, a surround theater sound effect mode, and the like. The specific sound effect processing system can be a system that executes a Dolby sound effect processing mode, or a system that executes a home theater sound effect mode.

[0053] However, if the audio signal is frequently processed based on the sound effect processing system, audio playback delays or freezes may occur because the configured sound effects occupy the processing resources of the current device. At the same time, if the processor that adds sound effects runs other processing tasks at the same time, it will also cause poor output effects of other processing tasks. For example, if the current processor executes a task of outputting a video screen, if audio signal sound effect processing is frequently performed based on the processor, it will also cause problems such as video freezes.

[0054] To solve the above problem, in the embodiment of the present application, the target parameter corresponding to the first audio signal is used to determine whether to perform the corresponding sound effect processing on the first audio signal. The specific execution is as follows: Steps S102 to S104.

[0055] S102: Obtain a target parameter based on the first audio signal.

[0056] S103: If the target parameter satisfies the first condition, process the first audio signal based on the first processing flow to obtain a third audio signal.

[0057] S104: If the target parameter satisfies the second condition, process the first audio signal based on the second processing flow to obtain a second audio signal.

[0058] The target parameter refers to a parameter that can characterize whether the first audio signal is processed with sound effects through the sound effect system. For example, it can be a processing performance parameter of the processing system of the current device, that is, whether the processing performance parameter will be affected if the first audio signal is processed with sound effects. It can also be a sound effect characteristic parameter, etc. The sound effect characteristic parameter is used to determine the amount of system resources occupied when performing sound effect processing to determine whether it will affect the operating state of the current electronic device. The target parameter can also be information such as the interval duration of sound effect processing, so that it can be determined based on the target parameter whether sound effects are added frequently.

[0059] Then, the target parameter is used to determine whether to process the first audio signal through the sound effect processing system. If the target parameter meets the first condition, the first audio signal is processed based on the first processing flow to obtain a third audio signal. Among them, the first processing flow does not include the sound effect processing system, that is, when the target parameter meets the first condition, the first audio signal is not subjected to sound effect processing. When the target parameter meets the first condition, it indicates that if the sound effect processing is performed on the first audio signal in a short time (such as a unit duration), it will affect the operating performance of the current device, such as the jamming and delay of audio playback, or it will occupy other processing resources, such as causing the jamming of the video screen. Specifically, in one embodiment, the target parameter meets the first condition to indicate that if the processor responds to the processing of the first audio signal within the unit duration based on the sound effect processing system, the processor will be affected. Among them, the processor can be a processor running the sound effect processing system. The unit duration can be a duration determined by a time measurement unit, such as 1 second, 1 minute, etc., or it can be a time period corresponding to the current duration pre-set according to the operating state of the current electronic device, such as the unit duration can be 0.5 seconds. In actual application scenarios, the unit duration represents a relatively short period of time, that is, if the sound effect processing of the first audio signal is frequently performed within the unit duration, it will affect the processing performance or output performance of the processor, that is, it will cause the processor to be overloaded, such as the output screen of the processor may freeze and other problems. Specifically, it can be ensured that the number of sound effect processing of the audio signal performed within the unit duration is less than the corresponding number threshold. For the convenience of description, in the embodiment of the present application, the sound effect processing of the audio signal by the sound effect processing system is referred to as adding sound effects to the audio signal. The number threshold refers to the number of sound effect additions that will not affect the operation of the processor. Therefore, if it is detected that the target parameter meets the first condition, the current first audio signal may not be subjected to sound effect processing, so as to avoid the sound effect processing occupying the processing resources of the process and ensure that the operation of the processor is not affected. When the first audio signal is processed based on the first processing flow to obtain the third audio signal, the third audio signal may be the same as the first audio signal, that is, the first audio signal to be output is directly output without any processing after receiving the first audio signal to be output; correspondingly, the third audio signal may also be different from the first audio signal. For example, the first audio signal is encoded information, and the third audio signal may be a decoded audio signal. In this scenario, the processing resources occupied by the audio decoding process will be less than the resources occupied by the sound effect processing, and therefore, will not affect the processor.

[0060] Correspondingly, if the target parameter satisfies the second condition, the first audio signal is processed based on the second processing flow to obtain the second audio signal. The target parameter satisfies the second condition, indicating that if the processor responds to the processing of the first audio signal within a unit time length based on the sound effect processing system, the processor is not affected. Therefore, the current first audio signal can be processed for sound effects based on the sound effect system to obtain a second audio signal, and then the second audio signal is output through the audio output module of the electronic device. The output effect of the second audio signal will be better than the first audio signal. For example, the first audio signal can be an ordinary audio signal, and the second audio signal after adding special effects to the first audio signal can be a surround sound audio signal. When playing the second audio signal, the user experience effect will be better than directly playing the first audio signal.

[0061] In an embodiment of the present application, after obtaining the first audio signal, a target parameter is obtained according to the first audio signal, and then the processing flow of the first audio signal is determined according to the conditions satisfied by the target parameter, that is, whether to perform sound effect processing on the current first audio signal through the sound effect system. If the processor response is determined based on the target parameter and the sound effect system processes the first audio signal within a unit time, the processor is affected, and the sound effect system will not be used to process the first audio signal, that is, no sound effect will be added to the current first audio signal. On the contrary, if the processor response is obtained based on the target parameter and the sound effect processing system processes the first audio signal within a unit time, and the processor is not affected, the sound effect processing will be performed on the current first audio signal through the sound effect processing system. In this way, it can be ensured that within a unit time (i.e., a short time), too many processor resources will not be occupied due to the execution of sound effect processing, causing problems such as processor processing or output jamming, thereby improving the user experience.

[0062] In one implementation of the embodiments of the present application, obtaining the target parameter based on the first audio signal includes: obtaining the Nth time of the Nth first audio signal; obtaining the N-1th time of the N-1th first audio signal; determining the time difference between the Nth time and the N-1th time, and determining the time difference as the target parameter.

[0063] Further, if the time difference between the Nth time and the N-1th time is greater than the unit time length, the second condition is met.

[0064] Usually, the transmission of each audio signal in an audio data stream is time-sequential, that is, it is transmitted in the order of the video signal in the audio data stream, such as first transmitting the first frame of audio signal, then transmitting the second frame of audio signal, transmitting the third frame of audio signal... until the transmission of the audio data stream is completed. Therefore, the processing of each audio signal is also carried out according to the transmission timing, that is, when the first audio signal to be output is received, it will be determined whether to process the first audio signal through the first processing flow or the second processing flow based on the target parameters of the first audio signal. The Nth time is the time when the Nth first audio signal is currently obtained, and the N-1th time is the time when the first audio signal was obtained the Nth time before. Figure 2 Taking the time axis of receiving the first audio signal as an example, the time of each reception of the first audio signal is recorded on the time axis, such as the first time of receiving the first audio signal for the first time is t1, the second time of receiving the first audio signal for the second time is t2, the third time of receiving the first audio signal for the third time is t3, and so on, the N-1th time of receiving the first audio signal for the N-1th time is t(n-1), the Nth time of receiving the first audio signal for the Nth time is tn, and then the time difference between tn and t(n-1) is determined as the target parameter. If the set unit time length is 1 second, if the time difference between tn and t(n-1) is 3 seconds, it means that the time interval between the current reception of the first audio signal and the last reception of the first audio signal is 3 seconds, and the unit time length is 1 second, then the second condition is met, and at this time, the sound effect processing can be performed on the first audio signal currently received for the Nth time based on the second processing flow to obtain the second audio signal. This is because if there are too many audio signals processed based on sound effects within a unit time length, the current processor of the electronic device will be affected, and the time interval between the currently received first audio signal and the last received first audio signal is greater than the unit time length, that is, the time interval between the two is long, which will not cause a large number of sound effects to be added within a short time (such as the unit time length), and thus will not affect the operation of the current processor.

[0065] If the time difference between the Nth time and the N-1th time is not greater than the unit duration, the problem of adding multiple sound effects in a short time may occur. In order to solve this problem, in one implementation of the embodiment of the present application, obtaining the target parameter based on the first audio signal also includes: if the time difference between the Nth time and the N-1th time is not greater than the unit duration, obtaining the first number of first audio signals processed based on the second processing flow within the unit duration before the Nth time, and determining the first number as the target parameter. Wherein, if the target parameter satisfies the first condition, including that the first number is not less than the target number threshold; if the target parameter satisfies the second condition, including that the first number is less than the target number threshold.

[0066] Adding a large number of sound effects in a short period of time (e.g., within a unit time) will occupy the resources of the electronic device processor, thereby affecting the operation of the electronic device processor, causing problems such as processor output screen freezes and slow data transmission efficiency. In order to solve this problem, in the audio processing method of the embodiment of the present application, it is necessary to ensure that the number of sound effects added in a short period of time is small, that is, the number of sound effects added within a unit time will not exceed the target number threshold that affects the operation of the processor. Figure 3 , which shows a schematic diagram of the time axis of an audio processing provided by an embodiment of the present application. Figure 3 In FIG. 1 , the triangle marks the first audio signal processed by the second processing flow, the circle marks the first audio signal processed by the first processing flow, and the time information of receiving the first audio signal is also marked on the time axis. Figure 3 The time axis shown assumes that the reception of the audio signal and the processing of the audio signal are completed synchronously, that is, the time occupation information when processing the audio signal is not considered. Figure 3 As shown, assuming that the unit duration is 5 seconds, the time difference between the Nth time and the N-1th time is 2 seconds, that is, not greater than the unit duration. Then the first number of the first audio signals processed based on the second processing flow within 5 seconds before the Nth time will be determined. If the first number is 3 and the target number threshold is 5, it means that no sound effects have been added to the 5 first audio signals within the unit duration, which will not affect the operation of the processor. The first audio signal corresponding to the current Nth time can be processed based on the second processing flow, that is, sound effects are added to it to obtain the second audio signal. If the target number threshold is 3, it means that the sound effect has been added 3 times within the unit duration. If the sound effect is continued to be added within the unit duration, it will affect the operation of the corresponding processor. At this time, the first audio signal corresponding to the current Nth time will be processed based on the first processing flow to obtain the third audio signal, that is, the first audio signal will not be processed by the sound effect processing system. In this way, it can be ensured that the number of sound effect processing times within the unit duration is less than the target number threshold, so as not to affect the operating state of the processor.

[0067] In order to facilitate statistics on the number of first audio signals processed based on the second processing flow within the relevant unit time length, statistics can be performed based on the corresponding recorded values ​​to improve the accuracy of the number determination. In one implementation of the embodiment of the present application, obtaining the first number of first audio signals processed based on the second processing flow within the unit time length before the Nth time includes: obtaining the timestamp information of the first audio signals processed based on the second processing flow within the unit time length before the Nth time; based on the recorded values ​​corresponding to each timestamp information, determining the first number of first audio signals based on the second processing flow within the unit time length before the Nth time.

[0068] See also Figure 4 , with t i The timestamp of the first received audio signal is represented by T i Indicates the timestamp of the first audio signal processed based on the second processing flow. For the convenience of description, the process of processing the first audio signal based on the second processing flow is called adding sound effects. Figure 4 In part (1), if the first audio signal is received for the first time and needs to be output, since the sound effect has not been added before, the sound effect can be added directly, and the corresponding timestamp is T1. The record value corresponding to the timestamp is 1, which means that the sound effect has been added once at the current moment. If the unit duration is A, when the first audio signal to be output is received for the second time, and the time difference with the first reception of the first audio signal is not greater than the unit duration A, the sound effect will be added to the first audio signal received for the second time, and the corresponding timestamp is T2. The record value corresponding to the timestamp is 2, which means that the sound effect has been added twice by the time the first audio signal is output for the second time. By analogy, if the first audio signal has a sound effect added, its corresponding timestamp and the corresponding record value will be set.

[0069] Furthermore, in the embodiment of the present application, it also includes:

[0070] Based on the first recorded value corresponding to the first timestamp information of the first audio signal of the first sequence position processed by the second processing flow within the unit time length before the Nth time, the recorded values ​​corresponding to the timestamp information of each first audio signal processed by the second processing flow within the unit time length before the Nth time are updated.

[0071] See also Figure 4 In part (2), if N=6, if the first timestamp information of the first audio signal of the first sequence position processed based on the second processing flow in the unit time length of the sixth time is T3, T4, T5, the first sequence position refers to the order of timestamps from small to large. At this time, the timestamp information corresponding to the audio signal with sound effects added outside the unit time length A will be cleared, that is, no longer recorded, and the recorded values ​​of the first timestamp information T3, T4, T5 in the current unit time length A will be updated, that is, 3 will be updated to 1, indicating the first audio signal with sound effects added in the current unit time length, 4 will be updated to 2, and 5 will be updated to 3 in turn, then the updated first timestamp information will be T1, T2, T3, so that it is easy to determine the number of audio signals with sound effects added in the current unit time length.

[0072] Furthermore, the audio processing method in the embodiment of the present application also includes:

[0073] If the time difference between the Nth time and the N-1th time is greater than the unit time length, the first audio signal at the Nth time is processed based on the second processing flow, and the record value corresponding to the timestamp information of the first audio signal at the Nth time is updated to the target record value.

[0074] When the time difference between the Nth time and the N-1th time is greater than the unit time length, it means that a relatively long time has passed since the last time a sound effect was added. At this time, adding a sound effect will not affect the operation of the processor. Therefore, the sound effect can be added to the first audio signal obtained at the Nth time. The sound effect added before will not affect the processing mode of adding sound effects later. Therefore, the record data of adding sound effects before the current Nth time can be cleared, and the record value corresponding to the timestamp of the first audio signal at the current Nth time is changed to the target record value. The target record value is characterized by the record value of the first sound effect added. For example, if T n Update to T1. This makes it easier to process the subsequent received audio signals and to count the number of times the sound effects have been added within the relevant unit time.

[0075] Based on the audio processing method provided in the embodiment of the present application, the number of sound effects created and added in a unit time by the current audio processing application can be controlled, thereby achieving the purpose of adding a limited number of sound effects in a short period of time, thereby ensuring that the operation of the processor of the current electronic device is not affected, and solving the problem of data output jamming caused by the processor processing data or outputting data due to the sound effects added by the sound effect processing system.

[0076] Furthermore, in the embodiment of the present application, the relevant data can be adjusted according to the operating state of the processor of the current electronic device, so as to ensure that the audio output effect can meet the actual sound effect requirements and the operating state of the processor is not affected. Specifically, the operating state of the processor can be monitored; based on the operating state of the processor, the first condition and / or the second condition can be updated.

[0077] Monitoring the running state of the processor may be to monitor the running state of the key processing threads of the processor, such as monitoring the data processing load state of the processor, the state of the processing model running on the processor, etc.; the running state of the processor may also be determined by monitoring the data transmission efficiency of the processor. For example, if the current load of the processor is large, the corresponding target number threshold of the number of audios added per unit time will be set to a relatively small value, such as allowing 2 sound effects to be added through the sound effect processing system within 1 second. Correspondingly, if it is detected that the load of the processor is small, 4 sound effects may be added through the sound effect processing system within 1 second. Specifically, it may be to update the unit time value of the corresponding sound effect added in the first condition and / or the second condition according to the running state of the processor, or it may be the threshold value of the number of sound effects allowed to be added per unit time, etc. The first condition and / or the second condition may be updated according to the actual application scenario to ensure that the audio output effect and the running state of the processor are not affected.

[0078] See also Figure 5 In an embodiment of the present application, an audio processing device is also provided, the device comprising:

[0079] A first acquisition unit 501 is used to obtain a first audio signal, where the first audio signal is provided to a sound effect processing system to obtain a second audio signal, where the output effect of the second audio signal is better than the output effect of the first audio signal;

[0080] A second acquisition unit 502, configured to obtain a target parameter based on the first audio signal;

[0081] A first processing unit 503 is configured to process the first audio signal based on a first processing flow to obtain a third audio signal if the target parameter satisfies a first condition;

[0082] A second processing unit 504 is configured to process the first audio signal based on a second processing flow to obtain a second audio signal if the target parameter satisfies a second condition;

[0083] The second processing flow includes the sound effect processing system, and the first processing flow does not include the sound effect processing system.

[0084] Optionally, the target parameter satisfying the first condition indicates that if the processor responds based on the sound effect processing system processing the first audio signal within a unit time length, the processor will be affected.

[0085] Optionally, the second acquiring unit includes:

[0086] A first acquisition subunit, used to obtain the Nth time of the Nth first audio signal;

[0087] A second acquisition subunit, used to obtain the N-1th time of the N-1th first audio signal;

[0088] A first determining subunit is used to determine a time difference between the Nth time and the N-1th time, and determine the time difference as the target parameter;

[0089] Among them, if the time difference between the Nth time and the N-1th time is greater than the unit duration, the second condition is met.

[0090] Optionally, the second acquiring unit further includes:

[0091] a third acquisition subunit, configured to obtain, if the time difference between the Nth time and the N-1th time is not greater than the unit time length, a first number of first audio signals processed based on the second processing flow within the unit time length before the Nth time, and determine the first number as the target parameter;

[0092] Among them, if the target parameter satisfies a first condition, it includes that the first quantity is not less than a target quantity threshold; if the target parameter satisfies a second condition, it includes that the first quantity is less than the target quantity threshold.

[0093] Optionally, obtaining a first number of first audio signals processed based on the second processing flow within a unit time length before the Nth time includes:

[0094] Obtaining timestamp information of a first audio signal processed based on a second processing flow within a unit time length before the Nth time;

[0095] Based on the record value corresponding to each of the timestamp information, a first quantity of the first audio signals processed based on the second processing flow within a unit time length before the Nth time is determined.

[0096] Optionally, it also includes:

[0097] The first updating sub-unit is used to update the record values ​​corresponding to the timestamp information of the first audio signal of the first sequence position processed by the second processing flow within the unit time length before the Nth time, based on the first record value corresponding to the first timestamp information of the first audio signal processed by the second processing flow within the unit time length before the Nth time.

[0098] Optionally, it also includes:

[0099] A second updating subunit is configured to process the first audio signal at the Nth time based on the second processing flow if the time difference between the Nth time and the N-1th time is greater than the unit time length, and update the record value corresponding to the timestamp information of the first audio signal at the Nth time to the target record value.

[0100] Optionally, it also includes:

[0101] A monitoring unit is used to monitor the operating state of the processor; based on the operating state of the processor, update the first condition and / or the second condition.

[0102] It should be noted that the specific implementation of each unit and sub-unit in this embodiment can refer to the corresponding content in the previous text and will not be described in detail here.

[0103] In another embodiment of the present application, a readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the audio processing method as described in any one of the above items is implemented.

[0104] In another embodiment of the present application, an electronic device is also provided. Figure 6 , the electronic device may include: an audio output element 601 and a processor 602;

[0105] Processor 601 is used to obtain a first audio signal, the first audio signal is used to provide to a sound effect processing system to obtain a second audio signal, and the output effect of the second audio signal is better than the output effect of the first audio signal; obtain a target parameter based on the first audio signal; if the target parameter meets a first condition, process the first audio signal based on a first processing flow to obtain a third audio signal; if the target parameter meets a second condition, process the first audio signal based on a second processing flow to obtain a second audio signal; wherein the second processing flow includes the sound effect processing system, and the first processing flow does not include the sound effect processing system;

[0106] The audio output element 601 is used to output the second audio signal or the third audio signal. It should be noted that the specific implementation of the processor in this embodiment can refer to the corresponding content in the above text, which will not be described in detail here.

[0107] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0108] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0109] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0110] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An audio processing method, comprising: Obtaining a first audio signal, wherein the first audio signal is provided to an audio effect processing system to obtain a second audio signal, wherein an output effect of the second audio signal is better than an output effect of the first audio signal; obtaining a target parameter based on the first audio signal; If the target parameter satisfies a first condition, processing the first audio signal based on a first processing flow to obtain a third audio signal; If the target parameter satisfies a second condition, processing the first audio signal based on a second processing flow to obtain a second audio signal; The second processing flow includes the sound effect processing system, and the first processing flow does not include the sound effect processing system.

2. The method according to claim 1, wherein the target parameter satisfies the first condition, indicating that if a processor response is based on the sound effect processing system processing the first audio signal within a unit time length, the processor will be affected.

3. The method according to claim 1, wherein obtaining a target parameter based on the first audio signal comprises: Obtaining the Nth time of the Nth first audio signal; Obtaining the N-1th time of the N-1th first audio signal; Determine a time difference between the Nth time and the N-1th time, and determine the time difference as the target parameter; Among them, if the time difference between the Nth time and the N-1th time is greater than the unit duration, the second condition is met.

4. The method according to claim 3, wherein obtaining a target parameter based on the first audio signal further comprises: If the time difference between the Nth time and the N-1th time is not greater than the unit time length, obtaining a first number of first audio signals processed based on the second processing flow within the unit time length before the Nth time, and determining the first number as the target parameter; Among them, if the target parameter satisfies a first condition, it includes that the first quantity is not less than a target quantity threshold; if the target parameter satisfies a second condition, it includes that the first quantity is less than the target quantity threshold.

5. The method according to claim 4, wherein obtaining the first number of first audio signals processed based on the second processing flow within a unit time length before the Nth time comprises: Obtaining timestamp information of a first audio signal processed based on a second processing flow within a unit time length before the Nth time; Based on the record value corresponding to each of the timestamp information, a first quantity of the first audio signals processed based on the second processing flow within a unit time length before the Nth time is determined.

6. The method according to claim 5, further comprising: Based on the first recorded value corresponding to the first timestamp information of the first audio signal of the first sequence position processed by the second processing flow within the unit time length before the Nth time, the recorded values ​​corresponding to the timestamp information of each first audio signal processed by the second processing flow within the unit time length before the Nth time are updated.

7. The method according to claim 6, further comprising: If the time difference between the Nth time and the N-1th time is greater than the unit time length, the first audio signal at the Nth time is processed based on the second processing flow, and the record value corresponding to the timestamp information of the first audio signal at the Nth time is updated to the target record value.

8. The method according to claim 2, further comprising: monitoring the operating status of the processor; Based on the operating state of the processor, the first condition and / or the second condition is updated.

9. An audio processing device, comprising: A first acquisition unit, configured to obtain a first audio signal, wherein the first audio signal is provided to an audio effect processing system to obtain a second audio signal, wherein an output effect of the second audio signal is better than an output effect of the first audio signal; A second acquisition unit, configured to obtain a target parameter based on the first audio signal; a first processing unit, configured to process the first audio signal based on a first processing flow to obtain a third audio signal if the target parameter satisfies a first condition; a second processing unit, configured to process the first audio signal based on a second processing flow to obtain a second audio signal if the target parameter satisfies a second condition; The second processing flow includes the sound effect processing system, and the first processing flow does not include the sound effect processing system.

10. An electronic device, comprising: Audio output components and processors; The processor is used to obtain a first audio signal, the first audio signal is used to provide to the sound effect processing system to obtain a second audio signal, the output effect of the second audio signal is better than the output effect of the first audio signal; obtain the target parameter based on the first audio signal; If the target parameter satisfies a first condition, the first audio signal is processed based on a first processing flow to obtain a third audio signal; if the target parameter satisfies a second condition, the first audio signal is processed based on a second processing flow to obtain a second audio signal; wherein the second processing flow includes the sound effect processing system, and the first processing flow does not include the sound effect processing system; The audio output element is used to output the second audio signal or the third audio signal.