CN-122001977-A - Audio processing method, electronic equipment and storage medium
Abstract
The embodiment of the application provides an audio processing method, electronic equipment and a storage medium, and relates to the technical field of terminal equipment. According to the audio processing method provided by the embodiment of the application, under a specific media playing scene, the working state of the audio device is controlled, so that unnecessary power consumption of the audio device is avoided, and the power consumption of the electronic equipment is reduced. The method comprises the steps of detecting that a first application of an electronic device is playing first media, obtaining first information of the electronic device under the condition that the first application is playing the first media, wherein the first information comprises an audio output mode of the electronic device, a first application identifier of the first application in the electronic device and the volume of the first application for playing the first media, determining a scene of the first application for playing the first media based on the first information, and controlling the working state of at least one audio device of the electronic device based on the scene of the first application for playing the first media.
Inventors
- LI XIAODONG
- HUANG WEN
- Cong Xiangyue
Assignees
- 荣耀终端股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241108
Claims (18)
- 1. An audio processing method, comprising: Detecting that a first application of the electronic device is playing a first media; acquiring first information of the electronic equipment under the condition that the first application is playing the first media, wherein the first information comprises an audio output mode of the electronic equipment, a first application identifier of the first application in the electronic equipment and the volume of the first application playing the first media; determining, based on the first information, a scene in which the first application plays the first media; and controlling the working state of at least one audio device of the electronic equipment based on the scene of the first application playing the first media.
- 2. The audio processing method of claim 1, wherein the determining, based on the first information, a scene in which the first media is played by the first application comprises: determining a matching result of the first application identifier and the target application identifier; And determining that the first application plays the scene of the first media in a mute mode under the conditions that the audio output mode of the electronic equipment is an play mode, the first application identifier is matched with the target application identifier, and the volume of the first application playing the first media is a first volume.
- 3. The audio processing method according to claim 1 or 2, wherein the at least one audio device includes at least one power amplifier, and wherein the controlling the operation state of the at least one audio device of the electronic apparatus based on the scene in which the first application plays the first media includes: And in a scene that the first application plays the first media in a mute mode, turning off all the power amplifiers in the at least one audio device.
- 4. The audio processing method of claim 1, wherein the first information further includes a noise level of an environment in which the electronic device is located, and wherein determining, based on the first information, a scene in which the first media is played by the first application includes: determining a matching result of the first application identifier and the target application identifier; determining a first comparison result of the noise intensity of the environment where the electronic equipment is located and first noise; And determining that the first application plays a scene of the first media in a non-mute mode in a noisy environment under the conditions that the audio output mode of the electronic equipment is an outward play mode, the first application identifier is matched with the target application identifier, the volume of the first media played by the first application is larger than a first threshold value and smaller than a second threshold value, and the noise intensity is larger than first noise, wherein the noisy environment comprises the environment where the electronic equipment is located, and the noise intensity is larger than the first noise.
- 5. The method of claim 1 or 4, wherein the at least one audio device comprises at least one power amplifier, wherein the controlling the operating state of the at least one audio device of the electronic device based on the scene of the first application playing the first media comprises: And turning off all the power amplifiers in the at least one audio device in a scene where the first application plays the first media in a non-mute mode in a noisy environment.
- 6. The audio processing method of claim 1, wherein the first information further includes a noise level of an environment in which the electronic device is located, and wherein determining, based on the first information, a scene in which the first media is played by the first application includes: determining a matching result of the first application identifier and the target application identifier; determining a second comparison result of the noise intensity of the environment where the electronic equipment is located and second noise; And determining that the first application plays a scene of the first media in a silent environment in a non-silent mode under the conditions that the audio output mode of the electronic equipment is an play mode, the first application identifier is matched with the target application identifier, the volume of the first media played by the first application is larger than a first threshold value and smaller than a second threshold value and the noise intensity is smaller than a second noise, wherein the silent environment comprises the environment where the electronic equipment is located, and the noise intensity is smaller than the second noise.
- 7. The method of claim 1 or 6, wherein the at least one audio device comprises at least one power amplifier, wherein the controlling the operating state of the at least one audio device of the electronic device based on the scene of the first application playing the first media comprises: in a scenario where the first application plays the first media in a non-mute mode in a quiet environment, any of the power amplifiers of the at least one of the audio devices is turned off.
- 8. The audio processing method of any one of claims 1-7, wherein the first application playing the volume of the first media includes the volume of the first application when the first application plays the first media and/or the volume of the electronic device when the first application plays the first media.
- 9. The audio processing method according to claim 3,5 or 7, characterized by further comprising: And responding to a first operation triggered by a volume key of the electronic equipment by a user, and starting the power amplifier which is turned off in at least one audio device of the electronic equipment.
- 10. The audio processing method according to claim 3, 5 or 7, characterized by further comprising: Detecting a first distance between the electronic device and a user; And under the condition that the first distance is smaller than a preset distance, turning on the power amplifier which is turned off in at least one audio device of the electronic equipment.
- 11. The audio processing method according to claim 2, wherein the determining a matching result of the first application identifier and the target application identifier includes: The perception scheduling service of the electronic equipment perceives a second application identifier corresponding to the first application of the electronic equipment; the perceived scheduling service takes the second application identifier as a target application identifier under the condition that the second application identifier meets a preset application identifier list; the perceived and scheduled service sends the target application identifier to an audio judgment module of an application framework layer of the electronic equipment; and the audio judging module determines a matching result of the first application identifier and the target application identifier.
- 12. The method of audio processing according to claim 4, wherein determining the first comparison of the noise strength of the environment in which the electronic device is located with the first noise comprises: an audio digital signal processor in the audio device in the hardware layer of the electronic equipment acquires the noise intensity of the environment where the electronic equipment is located; The audio digital signal processor sends the noise intensity of the environment where the electronic equipment is located to the audio judging module; the audio judging module determines that the noise intensity of the environment where the electronic equipment is located is greater than the first noise.
- 13. The method of audio processing according to claim 6, wherein the determining a second comparison of the noise strength of the environment in which the electronic device is located with a second noise comprises: an audio digital signal processor in the audio device in the hardware layer of the electronic equipment acquires the noise intensity of the environment where the electronic equipment is located; The audio digital signal processor sends the noise intensity of the environment where the electronic equipment is located to the audio judging module; the audio judging module determines that the noise intensity of the environment where the electronic equipment is located is smaller than the second noise.
- 14. The audio processing method according to claim 12 or 13, wherein the audio digital signal processor in the audio device in the hardware layer of the electronic device obtains the noise intensity of the environment in which the electronic device is located, comprising: The audio digital signal processor receives an audio signal transmitted by a radio receiving device under the condition that the first application is playing the first media; And the audio digital signal processor performs encoding and decoding processing on the audio signal to obtain the noise intensity of the environment where the electronic equipment is located.
- 15. The audio processing method according to claim 1, wherein the controlling the operation state of at least one audio device of the electronic apparatus based on the scene of the first medium includes: the audio judging module acquires a scene of the first application playing the first media; the audio judging module sends control information of a scene of the first media played by the first application to a mute control module of the hardware abstraction layer of the electronic equipment; the mute control module is used for controlling the mute control instruction based on the control information of the scene of the first media played by the first application; the mute control module sends the mute control instruction to an audio digital signal processor of the hardware layer of the electronic equipment; And the audio digital signal processor responds to the mute control instruction and controls the working state of at least one audio device of the electronic equipment.
- 16. An electronic device comprising a display screen, a memory, and one or more processors, the display screen, the memory coupled to the processors, wherein the memory has stored therein computer program code comprising computer instructions that, when executed by the processors, cause the electronic device to perform the audio processing method of any of claims 1-15.
- 17. A computer readable storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the audio processing method of any of claims 1-15.
- 18. A computer program product, characterized in that the computer program product, when run on a computer, causes the computer to perform the audio processing method according to any of claims 1-15.
Description
Audio processing method, electronic equipment and storage medium Technical Field The present application relates to the field of terminal devices, and in particular, to an audio processing method, an electronic device, and a storage medium. Background With the popularity of electronic devices, audio and video playback applications have become an important tool for users to entertain and acquire information on a daily basis. These applications provide a convenient, immersive audiovisual experience for the user by playing audio and video. However, in some specific scenarios, such as those where the user chooses to mute playing media or play media out in a noisy environment, the electronic device may still process the audio signal with the audio device, which may result in unnecessary power consumption, although the audio in the media does not actually affect the user experience. Particularly in battery-powered electronic devices (e.g., smart phones, tablet computers, notebook computers, etc.), such additional power consumption can significantly affect the cruising performance of the electronic device. Disclosure of Invention In order to solve the above problems, embodiments of the present application provide an audio processing method, an electronic device, and a storage medium, which reduce power consumption of the electronic device by controlling a working state of an audio device in a specific media playing scene. In order to achieve the above object, in a first aspect, an embodiment of the present application provides an audio processing method, which includes detecting that a first application of an electronic device is playing a first medium, acquiring first information of the electronic device under a condition that the first application is playing the first medium, where the first information includes an audio output mode of the electronic device, a first application identifier of the first application in the electronic device, and a volume of the first application playing the first medium, determining a scene of the first application playing the first medium based on the first information, and controlling an operating state of at least one audio device of the electronic device based on the scene of the first application playing the first medium. The audio processing method provided by the embodiment of the application can intelligently adjust the working state of at least one audio device of the electronic equipment according to the scene of the first media. In this way, in some scenes which do not need the audio device to work, the energy of the electronic equipment can be effectively saved by adjusting the working state of the audio device, so that unnecessary power consumption is avoided. In one possible implementation, determining a scene of the first media played by the first application based on the first information includes determining a matching result of the first application identifier and the target application identifier, and determining a scene of the first media played by the first application in a mute mode when an audio output mode of the electronic device is a play mode, the first application identifier is matched with the target application identifier, and a volume of the first media played by the first application is a first volume. By adopting the mode, the playing scene of the first media can be determined to be a mute playing scene based on the fact that the audio output mode of the electronic equipment is the play mode, the first application identifier is matched with the target application identifier, and the volume of the first media played by the first application is the first volume. Therefore, the follow-up electronic equipment can conveniently adjust the working state of the audio device according to the scene of the first media played by the first application, and the energy of the electronic equipment can be effectively saved, so that unnecessary power consumption is avoided. In one possible implementation, the at least one audio device includes at least one power amplifier, and controlling an operational state of the at least one audio device of the electronic apparatus based on a scene of the first application playing the first media includes turning off all power amplifiers in the at least one audio device in a scene of the first application playing the first media in a mute mode. By adopting the mode, all power amplifiers in the audio device can be turned off under the condition that the scene of the first media is mute play. Therefore, under the mute play condition, the power consumption of the electronic equipment can be obviously reduced, and the service life of the audio device can be prolonged. In a feasible implementation manner, the first information further comprises noise intensity of the environment where the electronic equipment is located, and the scene of the first application playing the first media is determined based on the first information, and th