WO2020124541A1 - Audio processing method and apparatus, computer readable storage medium, and electronic device - Google Patents

Audio processing method and apparatus, computer readable storage medium, and electronic device Download PDF

Info

Publication number
WO2020124541A1
WO2020124541A1 PCT/CN2018/122613 CN2018122613W WO2020124541A1 WO 2020124541 A1 WO2020124541 A1 WO 2020124541A1 CN 2018122613 W CN2018122613 W CN 2018122613W WO 2020124541 A1 WO2020124541 A1 WO 2020124541A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio
abnormal
behavior information
channel
information
Prior art date
Application number
PCT/CN2018/122613
Other languages
French (fr)
Chinese (zh)
Inventor
李亚军
彭德良
冷文华
胡小朋
Original Assignee
深圳市欢太科技有限公司
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市欢太科技有限公司, Oppo广东移动通信有限公司 filed Critical 深圳市欢太科技有限公司
Priority to CN201880099587.2A priority Critical patent/CN113168303A/en
Priority to PCT/CN2018/122613 priority patent/WO2020124541A1/en
Publication of WO2020124541A1 publication Critical patent/WO2020124541A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output

Definitions

  • the present application relates to the technical field of electronic equipment, in particular to audio processing methods and apparatuses, electronic equipment, and computer-readable storage media.
  • the electronic device cannot systematically monitor the audio behavior information of the audio data, and an abnormal call of the audio behavior information may occur, which makes the playback of the audio data abnormal.
  • Embodiments of the present application provide an audio processing method and apparatus, a computer-readable storage medium, and an electronic device, which can monitor abnormalities of audio data playback, and enable normal playback of audio data, enhance the stability of audio data output, and improve user experience.
  • An audio processing method applied to electronic equipment includes:
  • the target application When the target application is running, obtain first audio behavior information set in an audio service, where the first audio behavior information is parameter information for playing the audio data;
  • the second audio behavior information is corrected to repair the abnormal playback.
  • An audio processing device is applied to electronic equipment.
  • the device includes:
  • the information collection module is used to obtain first audio behavior information set in the audio service when the target application is running, wherein the first audio behavior information is parameter information for playing the audio data;
  • An information obtaining module configured to obtain second audio behavior information of the electronic device playing the audio data when the target application plays the audio data
  • An abnormality interpretation module configured to identify whether the playback of the audio data is abnormal according to the first audio behavior information and the second audio behavior information
  • the abnormality correction module is configured to correct the second audio behavior information to repair abnormal playback when the playback of the audio data is abnormal.
  • An electronic device includes a memory and a processor.
  • the memory stores computer-readable instructions, and when the instructions are executed by the processor, the processor is caused to perform the audio processing method according to the claims.
  • the above audio processing method and apparatus, computer-readable storage medium, and electronic device can obtain the first audio behavior information set in the audio service when the target application is running; when the target application plays audio data, the electronic device plays audio The second audio behavior information of the data; identify whether the playback of the audio data is abnormal according to the first audio behavior information and the second audio behavior information; when the playback of the audio data is abnormal, correct the second audio behavior information to repair the abnormal playback, you can monitor the audio The abnormal situation of data playback, and make the audio data play normally, enhance the stability of the audio data output, and improve the user experience.
  • FIG. 1 is a schematic diagram of the internal structure of an electronic device in an embodiment
  • FIG. 2 is a schematic diagram of a part of the architecture of an Android audio system in an embodiment
  • FIG. 3 is a schematic flowchart of an audio processing method in an embodiment
  • FIG. 4 is a schematic flowchart of a process for controlling a monitoring module to collect first audio behavior information used for setting audio data playback in an audio service when a target application is running in an embodiment
  • FIG. 5 is a schematic flowchart of identifying whether the playback of audio data is abnormal according to the first audio behavior information and the second audio behavior information in an embodiment
  • FIG. 6 is a schematic flow chart of correcting second audio behavior information to repair abnormal playback when audio data playback is abnormal in an embodiment
  • FIG. 7 is a schematic flowchart of an audio processing method in another embodiment
  • FIG. 8 is a schematic flowchart of an audio processing method in yet another embodiment
  • FIG. 9 is a schematic diagram of an audio processing device in an embodiment
  • FIG. 10 is a block diagram of a partial structure of a mobile phone related to an electronic device provided by an embodiment of the present application.
  • FIG. 1 a schematic diagram of an internal structure of an electronic device is provided.
  • the electronic device includes a processor, memory, and display screen connected by a system bus.
  • the processor is used to provide computing and control capabilities to support the operation of the entire electronic device.
  • the memory is used to store data, programs, and/or instruction codes, etc. At least one computer program is stored on the memory, and the computer program can be executed by the processor to implement the audio processing method for electronic devices provided in the embodiments of the present application.
  • the memory may include a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random-access memory (Random-Access-Memory, RAM).
  • the memory includes a non-volatile storage medium and internal memory.
  • the non-volatile storage medium stores an operating system, a database, and a computer program.
  • the database stores data related to an audio processing method provided by the above embodiments, for example, information such as the name of each process or application may be stored.
  • the computer program may be executed by the processor to implement an audio processing method provided by various embodiments of the present application.
  • the internal memory provides a cached operating environment for operating systems, databases, and computer programs in non-volatile storage media.
  • the display screen can be a touch screen, such as a capacitive screen or an electronic screen, which is used to display interface information of applications corresponding to the foreground process, and can also be used to detect a touch operation acting on the display screen and generate corresponding instructions, such as performing front and background Application switching instructions, etc.
  • the structure shown in FIG. 1 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied.
  • the specific electronic device may It includes more or fewer components than shown in the figure, or some components are combined, or have a different component arrangement.
  • the electronic device further includes a network interface connected through a system bus.
  • the network interface may be an Ethernet card or a wireless network card, etc., and is used for communication with external electronic devices, for example, for communication with a server.
  • an Atlas partial architecture diagram of an Android audio system is provided.
  • the Atlas architecture system of the Android audio system includes a kernel space layer 210, a local layer 220, a framework layer 230, and a client layer 240.
  • the Atlas architecture can integrate multiple existing APKs of multimedia into Atlas, making it an APK, saving some resources; that is, the Atlas architecture system can integrate Dirac sound effects APK, smart volume APK, smart headset APK, GiFT process, Guardian system services and other features are integrated into Atlas APK.
  • the Kernel space layer 210 may include an Audio driver module 211, where the Audio driver module interacts with the hardware and implements the local layer interface for the upper layer to call normally.
  • ALSA, OSS, and a custom audio driver can be selected.
  • the local layer 220 includes an AtlasService_Jni module 221, an AtlasService Interface module 223, and an AtlasService module 225.
  • the framework layer 230 includes an AtlasManager module 231 and an AtlasService module 233. Among them, the AtlasManager module 231 is provided with a conventional interface and a registration callback interface.
  • the AtlasService module 225 in the local layer 220 and the AtlasService module 233 in the framework layer 230 are used for event reception and processing, information collection, abnormal feedback, and log collection, where the information collection may include the collection of display information and the collection of audio information.
  • the audio information includes playback information (audio output channels, volume, sound effects, etc.), recording information, audio mode setting information, and so on. Because the AtlasService module is set up in the system-level framework layer, it can facilitate interaction with other system services without worrying about permissions during system calls. Through the above-mentioned architecture, the audio processing methods in various embodiments of the present application can be implemented.
  • an audio processing method is provided, which is applied to an electronic device having multiple audio output channels.
  • the electronic device may include a mobile phone, a tablet computer, a laptop computer, a palmtop computer, a mobile Internet device (Mobile Internet Device (MID), a wearable device (such as a smart watch, smart bracelet, pedometer, etc.) Or other electronic devices with voice call function and speakers.
  • a mobile phone a tablet computer, a laptop computer, a palmtop computer
  • a mobile Internet device Mobile Internet Device (MID)
  • a wearable device such as a smart watch, smart bracelet, pedometer, etc.
  • the audio processing method includes steps 302-308.
  • Step 302 When the target application is running, obtain the first audio behavior information set in the audio service.
  • a monitoring module is created based on the operating system of the electronic device, and the first audio behavior information set in the audio service when the target application program is running can be collected through the monitoring module.
  • the first audio behavior information is parameter information of playing the audio data.
  • a system-level monitoring module (AtlasService module) can be created in the system framework layer (native/framework layer), and the playback audio data can be set in the audio service when the target application is running through the monitoring module.
  • First audio behavior information For example, you can set up a listener module at the framework layer and run it in the system service program (system_server). Since the listener module is set up at the system-level service framework layer, you can easily interact with other audio services, display services, system services, etc. At the same time, there is no need to worry about the permissions during system calls.
  • the audio service may collect the first audio behavior information for setting the audio data to be played in the audio service when the target application is running.
  • the first audio behavior information may include at least an audio output channel, audio mode, volume, recording, and information related to audio data input and/or output.
  • the audio output channel includes an earpiece channel, a speaker channel, and a headset channel, where the headset channel may include a wired headset channel and a wireless headset (Bluetooth headset) channel.
  • the audio output channel is the earpiece channel, the audio data is sent by the earpiece; when the audio output channel is the speaker channel, the audio data is sent by the external speaker; when the audio output channel is the earphone channel, the audio data can be through wired headphones or Bluetooth headphones issue.
  • Audio modes can include multimedia mode, ringtone mode, alarm mode, call mode, call mode (including audio/video, VoIP call) and system mode.
  • the target application program may be understood as an application program capable of outputting and/or outputting audio signals, and the number of target application programs may be 1, 2, 3 or more.
  • the target application may include applications such as call, instant messaging, audio playback, video playback, sound control, and voice input.
  • the target application When the target application is running, it can be understood as running in the foreground or running in the background.
  • Audio data includes voice data, ringtone data, alarm data, multimedia data (video streaming, audio streaming data, etc.) and so on.
  • Step 304 When the target application plays audio data, obtain second audio behavior information of the electronic device playing audio data.
  • the second audio behavior information of the electronic device currently actually playing the audio data may be acquired.
  • the second audio behavior information may also include at least an audio output channel, audio mode, volume, recording, and information related to audio data input and/or output.
  • the second audio behavior information of the currently playing audio data (call voice data) acquired by the electronic device includes: the call mode, the speaker transmission channel, and the volume is A and other information.
  • Step 306 Identify whether the playback of audio data is abnormal according to the first audio behavior information and the second audio behavior information.
  • Both the first audio behavior information and the second audio behavior information may include at least audio output channel, audio mode, volume and other information.
  • the first audio behavior information may be understood as standard audio behavior information set in the audio service when the target application plays audio data.
  • the second audio behavior information can be understood as actual audio behavior information currently played by the target application. Under normal circumstances, the first audio behavior information and the second audio behavior information should be exactly the same. At this time, it can be considered that the playback action of the target application to play audio data is normal, if the first audio behavior information and the second audio When the behavior information should be inconsistent, the playback action of the target application to play audio data may be considered abnormal.
  • the first audio behavior information it sets includes the call mode, the earpiece output channel, and the volume is A; however, during the actual call, the second audio behavior information includes the call mode and the speaker The output channel and the volume are A. At this time, the audio output channel in the first audio behavior information and the second audio behavior information are different, it can be considered that the playback of audio data in the current call state is abnormal.
  • Step 308 when the playback of the audio data is abnormal, correct the second audio behavior information to repair the abnormal playback.
  • the electronic device determines that the audio data is playing abnormally, it can correct the second audio behavior information according to the first audio behavior information, so that the second audio behavior information that the electronic device currently actually plays the audio data and the first set in the audio service The audio behavior is consistent, and then the abnormal playback is repaired, so that the audio data can be played normally, and the user experience is improved.
  • the electronic device can call the preset interface function to correct the abnormal audio output channel, so that the audio of the call is output from the normal audio output channel; when the audio mode of the electronic device is abnormal At this time, the electronic device can perform mode conversion on the abnormal audio mode through the preset mode conversion interface to correct and repair the abnormal playback.
  • the above audio processing method can control the monitoring module to collect the first audio behavior information used to set the playback audio data in the audio service when the target application is running; when the target application plays the audio data, obtain the second audio data played by the electronic device Audio behavior information; identify whether the playback of audio data is abnormal according to the first audio behavior information and the second audio behavior information; when the playback of audio data is abnormal, correct the second audio behavior information to repair the abnormal playback, you can monitor the abnormal playback of audio data Situation, and make the audio data play normally, enhance the stability of the audio data output, and improve the user experience.
  • control listening module collects first audio behavior information used to set playing audio data in the audio service when the target application is running, including steps 402-404. among them:
  • Step 402 when the target application is running, the control listening module sends an audio acquisition request to the audio service.
  • the audio acquisition request is used to instruct the audio service to collect the first audio behavior information.
  • Step 404 Receive first audio behavior information fed back by an audio service.
  • Binder and socket communication mechanisms can be used for communication between the monitoring module of the electronic device and the audio service. That is, the listening module can use binder and socket communication mechanisms to communicate with the audio service.
  • the electronic device can control the listening module to send an audio acquisition request to the audio service using the binder and socket communication mechanisms.
  • the audio service may collect the first audio behavior information used to set the target application to play audio data according to the received acquisition request. After the audio service collects the first audio behavior information, the binder and socket communication mechanisms may be used to feed back the collected first audio behavior information to the monitoring module, so that the monitoring module obtains the first audio behavior set when the target application plays audio data information.
  • the same interface is also provided at the same time, and the monitoring module can communicate with the monitoring module through the binder and socket communication mechanism.
  • identifying whether audio data is abnormally played according to the first audio behavior information and the second audio behavior information includes steps 502-506. among them,
  • Step 502 Obtain application information of the target application.
  • the electronic device may obtain the application information of the target application based on the identification information of the target application.
  • the application information may include information such as usage information and application type of the target application program.
  • the usage information can refer to the cumulative usage time, usage frequency, etc. within a preset time, and the application type can be divided according to the function of the target application, for example, call, instant messaging interaction, video, audio, entertainment Class, system custom class, etc.
  • the system custom category may include ringtones, alarm clocks and so on.
  • the electronic device may identify each target application in advance to form identification information, and the identification information may be represented by any one or combination of letters, numbers, and special symbols. Different types of target application programs can be represented by different identification information, and the identification information can distinguish the application types of the target application programs.
  • the electronic device may make statistics on the usage information of the target application, or may inject the usage information into the identification information, so that the identification information carries the usage information of the target application.
  • Step 504 Determine whether the second audio behavior information is abnormal according to the application information and the first audio behavior information.
  • Step 506 If the second audio behavior information is abnormal, the playback of the audio data is abnormal.
  • the electronic device may determine the determination order of the audio output channel, audio mode, and volume in the first audio behavior information and the second audio behavior information according to the application information of the target application program. Specifically, if any information in the first audio behavior information is inconsistent with the second audio behavior information, the second audio behavior information may be considered abnormal. Both the first audio behavior information and the second audio behavior information include information such as the audio output channel, audio mode, and volume. When determining whether the second audio behavior information is abnormal, it is necessary to determine the first audio behavior information and the second audio behavior information The order in which the information is compared. The electronic device may determine the determination order according to the application information.
  • the judgment order can be audio output channel, volume, audio mode, or audio output channel, audio mode, volume, where priority is given to determine whether the audio output channel is abnormal, if the current target When the application program is a system application program, the judgment order may be audio mode, volume, audio output channel, or audio mode, audio output channel, volume, wherein priority is given to whether the audio mode is abnormal.
  • the electronic device may determine whether the second audio behavior information is abnormal according to the application information, and according to the judgment sequence, sequentially compare whether the audio output channel, audio mode, and volume in the first audio behavior information and the second audio behavior information are consistent. When any one of the output channel, the audio mode and the volume is inconsistent, the second audio behavior information may be considered abnormal.
  • the second audio behavior information When the second audio behavior information is abnormal, it may be considered that the current playback behavior of the audio data is abnormal, that is, the audio data is abnormally played, and the abnormal playback needs to be corrected.
  • the electronic device may determine the determination order of the audio output channel, the audio mode, and the volume in the first audio behavior information and the second audio behavior information according to the application information of the target application, which improves whether the second audio behavior information is abnormal The efficiency of judgment.
  • correcting the second audio behavior information to repair the abnormal playback includes steps 602-604. among them,
  • Step 602 When the audio data plays abnormally, the abnormal type is obtained according to the second audio behavior information; the abnormal type includes a mode abnormality, a channel abnormality, and a volume abnormality.
  • abnormal types include abnormal patterns, abnormal channels and abnormal volume.
  • the abnormal type is a mode abnormality
  • the first audio behavior information is inconsistent with the audio output channel in the second audio behavior information
  • the exception The type is channel abnormality
  • the abnormal type is volume abnormality.
  • the preset volume range can be set according to the volume of the first audio behavior information.
  • the preset volume range ⁇ can be understood as the absolute value of the difference between a and b, and the absolute value of the difference between a and b If the value is greater than the preset volume range ⁇ , the volume can be considered abnormal. Further, if the audio output channel, audio mode, and volume in the first audio behavior information and the second audio behavior information are inconsistent, the abnormal type includes channel abnormality, mode abnormality, and volume abnormality.
  • Step 604 A preset correction strategy is adopted according to the abnormal type to correct the second audio behavior information to repair the abnormal playback.
  • the abnormal types include mode abnormality, channel abnormality and volume abnormality, and different abnormal types correspond to different preset correction strategies.
  • the preset interface function is called to correct the abnormal audio output channel in the second audio behavior information to repair the abnormal playback.
  • the mode conversion interface is set when the mode is abnormal, and the mode conversion is performed on the audio mode through the mode conversion interface to correct the second audio behavior information to repair the abnormal playback.
  • the correction order may be determined according to the above-mentioned determination order, and all abnormality types may be sequentially corrected according to the correction order.
  • the electronic device can determine the abnormal type of playback abnormality according to the second audio behavior information, and can adaptively correct it according to different abnormal types, so as to improve the correction efficiency and enable the audio data Normal playback improves user experience.
  • the abnormal type is obtained according to the second audio behavior information.
  • the abnormal type is a channel abnormality, it may include an earphone channel abnormality, an earpiece channel abnormality, and a speaker channel abnormality.
  • the second audio behavior information is inconsistent with the audio output channel in the first audio behavior information. If the audio output channel in the second audio behavior information is a headphone channel, it can be considered as an abnormality in the headphone channel; if the audio in the second audio behavior information When the output channel is an earpiece channel, it can be considered as an abnormality of the earphone channel; if the audio output channel in the second audio behavior information is a speaker channel, it can be considered as an abnormality of the speaker channel.
  • the electronic device can call a preset interface function to set the audio output channel.
  • the preset interface functions include at least the setSpeakerphoneOn() interface function, setMode(AudioManager.MODE_IN_CALL) interface function, isWiredHeadsetOn() interface function or other interface functions for setting the earphone channel and headphone channel.
  • the electronic device can set the speaker channel by calling the interface function setSpeakerphoneOn() in the AudioManager, that is, the speaker channel can be turned on or off.
  • the electronic device can set the earpiece channel by calling the function setMode(AudioManager.MODE_IN_CALL) in AudioManager or the construction parameter streamType(STREAM_VOICE_CALL); the electronic device can set and detect the earpiece channel by calling the function isWiredHeadsetOn() in AudioManager.
  • the earphone channel of the audio output channel is abnormal, it is detected whether the electronic device is connected to the earphone; when the electronic device is connected to the earphone, the earphone channel of the audio data is changed so that the earphone channel plays audio data; when the electronic device is not connected to the earphone, Change the receiver channel of audio data so that the speaker channel plays audio data.
  • an electronic device can set and detect whether a wired headset is connected by calling the function isWiredHeadsetOn() in AudioManager, or detect whether a wired headset is connected by detecting the high and low level of GPIO (General Purpose Input/Output) .
  • GPIO General Purpose Input/Output
  • the preset state of the GPIO interface is a high level
  • the current detection state is a low level, which indicates that the state of the GPIO interface has changed and the electronic device is connected to a wired headset.
  • Electronic devices can also detect whether a Bluetooth headset is connected through the BluetoothAdapter class. At the same time, the electronic device can also detect the interface state of the corresponding audio interface based on the Bluetooth protocol, and then detect whether the electronic device is connected to the Bluetooth headset.
  • the electronic device can also detect whether it is connected to the earphone based on other software or hardware, which is not limited to the above example.
  • the preset interface function for switching to the earphone channel can be called, and the audio output channel that outputs audio data is switched from the earpiece mode to the earphone channel according to the preset interface function, and the earphone channel plays the Audio data.
  • the preset interface function for switching to the speaker channel can be called, and the audio output channel that outputs audio data is switched from the earpiece mode to the speaker channel according to the preset interface function, and the speaker channel Play the audio data.
  • the electronic device when the earphone channel in the audio output channel is abnormal, the electronic device can adaptively switch its earphone channel to an audio output channel that matches the user's use scenario according to whether the headset is connected, which can improve the audio output. Stability and user experience.
  • the speaker channel of the audio output channel when the speaker channel of the audio output channel is abnormal, detect whether the electronic device is connected to the earphone; when the electronic device is connected to the earphone, change the earphone channel of the audio data so that the earphone channel plays audio data; when the electronic device is not connected to the earphone , Change the receiver channel of the audio data, so that the receiver channel plays audio data.
  • the preset interface function for switching to the earphone channel can be called, and the audio output channel for outputting audio data can be switched from the speaker mode to the earphone channel according to the preset interface function and played by the earphone channel The audio data.
  • the earphone is not connected to the electronic device, if the default audio output channel corresponding to the audio mode of the target application is a speaker channel, the preset interface function for switching to the earphone channel can be called, and the output is output according to the preset interface function The audio output channel of the audio data is switched from the speaker mode to the receiver channel, and the receiver channel plays the audio data.
  • the electronic device when the speaker channel in the audio output channel is abnormal, the electronic device can adaptively switch its speaker channel to an audio output channel that matches the user's use scenario according to whether the headset is connected, which can improve the audio output. Stability and user experience.
  • the preset interface function is called to change the headphone channel of the audio data, so that the speaker channel plays audio data.
  • the audio output channel in the first audio behavior information of the target application is the speaker channel.
  • the electronic device can call the preset calling function for switching to the speaker channel, so that the alarm is output from the speaker channel, so that the alarm can be output from the earphone channel, and the user cannot perceive the occurrence of the alarm when the alarm is from
  • the speaker is output, the user can normally hear the alarm, which will not affect the user's normal work and rest.
  • the mode conversion interface is set when the mode is abnormal, and the mode conversion is performed on the audio mode through the mode conversion interface to correct the second audio behavior information to repair the abnormal playback.
  • a mode conversion interface is provided, and a mode conversion is performed on the audio mode through the mode conversion interface.
  • a setmode function that can be used as the mode conversion interface.
  • the audio mode conversion can be achieved by calling the setmode function. For example, define setmode(0) as the media audio mode, setmode(1) as the ringtone mode, and setmode(2) as the voice call mode.
  • a mode conversion interface is provided to perform mode conversion on the audio mode through the mode conversion interface, and the abnormal audio mode in the second audio behavior information can be converted into a normal audio mode.
  • the audio mode is converted according to the mode conversion interface to correct the abnormal audio mode; the volume is adjusted in the corrected audio mode to correct the abnormal volume, so that the audio data is at a normal volume Play.
  • the abnormal mode includes abnormal media audio mode, abnormal silent mode, abnormal call mode, abnormal ring mode, etc.
  • the audio mode with abnormal audio mode may be corrected to the media audio mode, and adjusting the media audio may specifically be adjusting the sound quality and volume of the media audio mode.
  • the silent mode you can correct the audio mode of the target application to silent mode, specifically: set the audio mode to media audio mode, and adjust the media audio volume to 0, or set the audio mode to system audio mode And adjust the system audio volume to 0.
  • the call mode is abnormal, the audio mode of the target application will be corrected to the call mode.
  • the audio mode of the target application is corrected to the ringtone pattern.
  • the audio mode is corrected to ringtone audio, which may specifically be: the audio mode is corrected to adjust the ringtone, and the volume of the ringtone audio is adjusted to correct the abnormal volume.
  • the electronic device can adaptively correct the abnormal audio mode according to the monitored audio mode is abnormal, so that the corrected audio mode is consistent with the audio mode in the first audio behavior information, which improves the audio data
  • the stability of playback improves the user experience.
  • the audio processing method includes steps 702-710. among them,
  • Step 702 Control the monitoring 606 module to collect the first audio behavior information used to set the playback audio data in the audio service when the target application is running;
  • Step 704 when the target application plays audio data, obtain second audio behavior information of the electronic device playing audio data;
  • Step 706 Identify whether the playback of the audio data is abnormal according to the first audio behavior information and the second audio behavior information;
  • Step 708 when the playback of the audio data is abnormal, correct the second audio behavior information to repair the abnormal playback.
  • steps 702 to 708 correspond to steps 302 to 308 in the foregoing embodiment, and will not be repeated here.
  • Step 710 Obtain correction data correcting the second audio behavior information, and report and store the correction data.
  • the electronic device After the electronic device performs correction processing on the second audio behavior information, it can obtain corresponding correction data, which includes abnormal information of the second audio behavior information (channel abnormality, mode abnormality, volume abnormality), correction time, correction cumulative number of times, Information such as the identity of the target application and the identity of the electronic device.
  • the electronic device can report and store the obtained correction data to statistically correct the data, which can prove the processing effect and processing efficiency of the audio processing method, and reduce or avoid the occurrence of abnormal playback in the subsequent audio playback process.
  • the audio processing method further includes steps 802 to 808. among them,
  • Step 802 The monitoring module is controlled to collect the first display information used to set the display image in the display service when the target application is running.
  • the binder and socket communication mechanisms can be used for communication between the monitoring module of the electronic device and the display service.
  • the electronic device can control the monitoring module to send a display acquisition request to the display service using the binder and socket communication mechanisms.
  • the display service may collect the first display information for setting and displaying the target application display image according to the received display acquisition request.
  • the binder and socket communication mechanism may be used to feed back the collected first display information to the monitoring module, so that the monitoring module obtains the first display information set when the target application displays the image.
  • Step 804 When the target application displays the image, obtain second display information of the display image of the electronic device.
  • Step 806 Identify whether the display of the image is abnormal according to the first display information and the first display information.
  • both the first display information and the second display information may include LCD/backlight information, frame rate information, display size information, display brightness information, and the like. If at least one of the first display information and the second display information is inconsistent, it may be considered that the display of the image is abnormal.
  • the types of abnormalities that can display abnormalities may include abnormal flash screens, black screens, abnormal frame rate processing, abnormal display screens, abnormal display brightness, and the like.
  • Step 808 when the display of the image is abnormal, correct the second display information to repair the abnormal display.
  • the electronic device may adopt different strategies to correct the second display information to repair the abnormal display according to the type of abnormality displaying the abnormality.
  • the correction strategy may include the correction processing of the display layer, the correction processing of the display area, the correction processing of the distribution leak, the correction processing of the brightness adjustment, the correction processing of the frame rate adjustment, and so on.
  • the electronic device can monitor the abnormal display of the image and perform correction processing on the abnormal image display to improve the stability of the image displayed by the electronic device and improve the user experience.
  • steps in this embodiment can also be used before or after the above steps 802 to 804 to improve the playback quality of the audio data played during the switching of the audio output channel and the user experience.
  • steps in the flowcharts of FIGS. 3-8 are sequentially displayed according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless clearly stated in this article, the execution of these steps is not strictly limited in order, and these steps may be executed in other orders. Moreover, at least some of the steps in FIGS. 3-8 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. These sub-steps or stages The execution order of is not necessarily sequential, but may be executed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.
  • the present application also provides an audio processing device, which is applied to an electronic device.
  • the device includes: an information collection module 910, an information acquisition module 920, an abnormality interpretation module 930, and an abnormality correction module 940. among them,
  • the information collection module 910 is configured to obtain first audio behavior information set in an audio service when the target application is running, where the first audio behavior information is parameter information for playing the audio data;
  • the information obtaining module 920 is configured to obtain second audio behavior information of the audio data played by the electronic device when the target application plays the audio data;
  • the abnormality interpretation module 930 is configured to identify whether the playback of the audio data is abnormal according to the first audio behavior information and the second audio behavior information;
  • the abnormality correction module 940 is configured to correct the second audio behavior information to repair abnormal playback when the playback of the audio data is abnormal.
  • the above audio processing device can obtain the first audio behavior information set in the audio service when the target application is running; when the target application plays audio data, obtain the second audio behavior information of the audio data played by the electronic device; according to the first The audio behavior information and the second audio behavior information identify whether the playback of audio data is abnormal; when the playback of audio data is abnormal, correct the second audio behavior information to repair the abnormal playback, you can monitor the abnormal situation of audio data playback, and make the audio data normal Play, enhance the stability of audio data output, and improve user experience.
  • the information collection module includes:
  • a sending unit configured to control the listening module to send an audio acquisition request to the audio service when the target application is running; wherein, the audio acquisition request is used to instruct the audio service to collect the first audio behavior information;
  • the receiving unit is configured to receive the first audio behavior information fed back by the audio service.
  • the listening module uses binder and socket communication mechanisms to communicate with the audio service.
  • the information acquisition unit is used to acquire application information of the target application program
  • An abnormality determining unit configured to determine whether the second audio behavior information is abnormal according to the application information and the first audio behavior information
  • the playback abnormality unit is configured to play abnormal audio data if the second audio behavior information is abnormal.
  • the abnormality determining unit is further used to determine the order of determining the audio output channel, audio mode, and volume in the first audio behavior information and the second audio behavior information according to the application information; determining the first audio behavior information according to the determination order Whether it is consistent with the second audio behavior information; if any one of the audio output channel, audio mode and volume is inconsistent, the second audio behavior information is abnormal.
  • the electronic device may determine the determination order of the audio output channel, the audio mode, and the volume in the first audio behavior information and the second audio behavior information according to the application information of the target application, which improves whether the second audio behavior information is abnormal The efficiency of judgment.
  • the abnormality correction module includes:
  • the type obtaining unit is configured to obtain an abnormal type according to the second audio behavior information when the audio data is abnormally played;
  • the abnormal type includes a mode abnormality, a channel abnormality, and a volume abnormality;
  • the abnormality correction unit is configured to adopt a preset correction strategy according to the type of abnormality to correct the second audio behavior information to repair abnormal playback.
  • the abnormality correction unit is further used to call a preset interface function to correct the abnormal audio output channel in the second audio behavior information when the channel is abnormal to repair abnormal playback.
  • the electronic device can determine the abnormal type of playback abnormality according to the second audio behavior information, and can adaptively correct it according to different abnormal types, so as to improve the correction efficiency and enable the audio data Normal playback improves user experience.
  • the abnormality correction unit is also used to call the preset interface function to change the earphone channel of the audio data when the earphone channel of the audio output channel is abnormal, so that the speaker channel plays audio data
  • the abnormality correction unit is also used
  • detect whether the electronic device is connected to the earphone when the electronic device is connected to the earphone, change the earphone channel of the audio data to make the earphone channel play audio data; when the electronic device is not connected to the earphone, change the audio data The earphone channel of the speaker channel, so that the speaker channel plays audio data; or, the abnormality correction unit is also used to detect whether the electronic device is connected to the earphone when the speaker channel of the audio output channel is abnormal; when the electronic device is connected to the earphone, change the earphone channel of the audio data To enable the earphone channel to play audio data; when the electronic device is not connected to the earphone, change the earphone channel of the audio data so that the ear
  • the electronic device when the earphone channel in the audio output channel is abnormal, the electronic device can adaptively switch its earphone channel to an audio output channel that matches the user's use scenario according to whether the headset is connected, which can improve the audio output. Stability and user experience.
  • the electronic device can adaptively switch its speaker channel to an audio output channel that meets the user's usage scenario according to whether the headset is connected, which can improve the stability of the audio output and the user experience degree.
  • the abnormality correction unit is further configured to set a mode conversion interface when the mode is abnormal, and perform mode conversion on the audio mode through the mode conversion interface to correct the second audio behavior information to repair abnormal playback.
  • the abnormality correction unit is further used to perform mode conversion on the audio mode according to the mode conversion interface to correct the abnormal audio mode when the volume is abnormal; adjust the volume under the corrected audio mode to correct the abnormal volume.
  • the electronic device can adaptively correct the abnormal audio mode according to the monitored audio mode is abnormal, so that the corrected audio mode is consistent with the audio mode in the first audio behavior information, which improves the audio data
  • the stability of playback improves the user experience.
  • the device further includes:
  • the data acquisition module is used to acquire correction data for correcting the second audio behavior information, and report and store the correction data.
  • the electronic device can report and store the obtained correction data to statistically correct the data, which can prove the processing effect and processing efficiency of the audio processing method, and reduce or avoid the occurrence of abnormal playback in the subsequent audio playback process.
  • the information collection module is also used to control the monitoring module to collect the first display information used to set the display image in the display service when the target application is running;
  • the information acquisition module is also used to acquire the second display information of the display image of the electronic device when the target application displays the image;
  • the abnormality interpretation module is also used to identify whether the display of the image is abnormal based on the first display information and the first display information;
  • the abnormality correction module is also used to correct the second display information to repair the abnormal display when the image is displayed.
  • the electronic device can monitor the abnormal display of the image and perform correction processing on the abnormal image display to improve the stability of the image displayed by the electronic device and improve the user experience.
  • each module in the above audio processing device is for illustration only. In other embodiments, the audio processing device may be divided into different modules as needed to complete all or part of the functions of the above audio processing device.
  • Each module in the above audio processing device may be implemented in whole or in part by software, hardware, or a combination thereof.
  • the above modules may be embedded in the hardware or independent of the processor in the electronic device, or may be stored in the memory in the electronic device in the form of software so that the processor can call and execute the operations corresponding to the above modules.
  • the embodiments of the present application also provide a computer-readable storage medium.
  • One or more non-volatile computer-readable storage media containing computer-executable instructions when the computer-executable instructions are executed by one or more processors, cause the processor to perform the following steps of the audio processing method:
  • Controlling the monitoring module to collect the first audio behavior information used to set the playing audio data in the audio service when the target application is running;
  • the second audio behavior information is corrected to repair the abnormal playback.
  • one or more non-volatile computer-readable storage media containing computer-executable instructions when the computer-executable instructions are executed by one or more processors, may also cause the processor to perform any of the foregoing implementations Example audio processing method.
  • a computer program product containing instructions that, when run on a computer, causes the computer to perform the steps of the audio processing method:
  • Controlling the monitoring module to collect the first audio behavior information used to set the playing audio data in the audio service when the target application is running;
  • the second audio behavior information is corrected to repair the abnormal playback.
  • a computer program product containing instructions when run on a computer, causes the computer to perform the steps of the audio processing method in any of the above embodiments.
  • An embodiment of the present application also provides an electronic device. As shown in FIG. 10, for ease of description, only parts related to the embodiments of the present application are shown, and specific technical details are not disclosed, please refer to the method part of the embodiments of the present application.
  • the electronic device may be any terminal device with a voice call function and a speaker, including mobile phones, tablet computers, PDA (Personal Digital Assistant), POS (Point of Sales), in-vehicle computers, wearable devices, etc. , Taking an electronic device as a mobile phone as an example:
  • the mobile phone includes: a radio frequency (Radio Frequency) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, and a processor 1080 , And power supply 1090 and other components.
  • a radio frequency (Radio Frequency) circuit 1010 the radio frequency (Radio Frequency) circuit 1010
  • a memory 1020 includes: a radio frequency (Radio Frequency) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, and a processor 1080 , And power supply 1090 and other components.
  • WiFi wireless fidelity
  • the structure of the mobile phone shown in FIG. 10 does not constitute a limitation on the mobile phone, and may include more or fewer components than those shown in the figure, or a combination of certain components, or a different component arrangement.
  • the RF circuit 1010 can be used to receive and send signals during sending and receiving information or during a call. It can receive the downlink information of the base station and process it to the processor 1080; it can also send the uplink data to the base station.
  • the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, and the like.
  • the RF circuit 1010 can also communicate with other devices via a wireless communication network.
  • the above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile (GSM), General Packet Radio Service (GPRS), and Code Division Multiple Access Multiple Access (CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (LTE), e-mail, Short Message Service (SMS), etc.
  • GSM Global System of Mobile
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • SMS Short Message Service
  • the memory 1020 may be used to store software programs and modules.
  • the processor 1080 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 1020.
  • the memory 1020 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system and at least one function-required application program (such as a sound playback function application program, an image playback function application program, etc.), etc.;
  • the data storage area can store data (such as audio data, address book, etc.) created according to the use of the mobile phone.
  • the memory 1020 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the input unit 1030 may be used to receive input numeric or character information, and generate key signal input related to user settings and function control of the mobile phone 1000.
  • the input unit 1030 may include a touch panel 1031 and other input devices 1032.
  • the touch panel 1031 also known as a touch screen, can collect user's touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc. on the touch panel 1031 or near the touch panel 1031 Operation), and drive the corresponding connection device according to the preset program.
  • the touch panel 1031 may include a touch detection device and a touch controller.
  • the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into contact coordinates, and then sends To the processor 1080, and can receive the commands sent by the processor 1080 and execute them.
  • the touch panel 1031 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 1030 may also include other input devices 1032.
  • the other input devices 1032 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.).
  • the display unit 1040 can be used to display information input by the user or information provided to the user and various menus of the mobile phone.
  • the display unit 1040 may include a display panel 1041.
  • the display panel 1041 may be configured in the form of a liquid crystal display (Liquid Crystal) (LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like.
  • the touch panel 1031 may cover the display panel 1041, and when the touch panel 1031 detects a touch operation on or near it, it is transmitted to the processor 1080 to determine the type of touch event, and then the processor 1080 according to The type of touch event provides a corresponding visual output on the display panel 1041.
  • the touch panel 1031 and the display panel 1041 are implemented as two independent components to realize the input and input functions of the mobile phone, in some embodiments, the touch panel 1031 and the display panel 1041 may be integrated to Realize the input and output functions of the mobile phone.
  • the mobile phone 1000 may further include at least one sensor 1050, such as a light sensor, a motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1041 according to the brightness of the ambient light, and the proximity sensor may close the display panel 1041 and/or when the mobile phone moves to the ear Or backlight.
  • the motion sensor may include an acceleration sensor. The acceleration sensor can detect the magnitude of acceleration in various directions, and can detect the magnitude and direction of gravity when at rest.
  • the mobile phone can be used for applications that recognize mobile phone gestures (such as horizontal and vertical screen switching), and vibration recognition-related functions (such as Pedometer, percussion, etc.; in addition, the mobile phone can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc.
  • the audio circuit 1060, the speaker 1061, and the microphone 1062 may provide an audio interface between the user and the mobile phone.
  • the audio circuit 1060 can transmit the converted electrical signal of the received audio data to the speaker 1061, which converts the speaker 1061 into a sound signal output; on the other hand, the microphone 1062 converts the collected sound signal into an electrical signal, which After receiving, it is converted into audio data, and then processed by the audio data output processor 1080, and then sent to another mobile phone through the RF circuit 1010, or the audio data is output to the memory 1020 for subsequent processing.
  • WiFi is a short-distance wireless transmission technology.
  • the mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 1070. It provides users with wireless broadband Internet access.
  • FIG. 10 shows the WiFi module 1070, it can be understood that it is not a necessary component of the mobile phone 1000, and may be omitted as needed.
  • the processor 1080 is the control center of the mobile phone, and uses various interfaces and lines to connect the various parts of the entire mobile phone, by running or executing the software programs and/or modules stored in the memory 1020, and calling the data stored in the memory 1020 to execute Various functions and processing data of the mobile phone, so as to monitor the mobile phone as a whole.
  • the processor 1080 may include one or more processing units.
  • the processor 1080 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application program, and the like; the modem processor mainly processes wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 1080.
  • the mobile phone 1000 also includes a power supply 1090 (such as a battery) for powering various components.
  • a power supply 1090 (such as a battery) for powering various components.
  • the power supply can be logically connected to the processor 1080 through a power management system, so as to realize functions such as charging, discharging, and power consumption management through the power management system.
  • the mobile phone 1000 may further include a camera, a Bluetooth module, and the like.
  • the processor 1080 included in the electronic device implements the following steps when executing the computer program stored on the memory:
  • Controlling the monitoring module to collect the first audio behavior information used to set the playing audio data in the audio service when the target application is running;
  • the second audio behavior information is corrected to repair the abnormal playback.
  • an electronic device includes a memory and a processor, and the memory stores computer-readable instructions, and when the instructions are executed by the processor, the processor is caused to execute any of the foregoing embodiments Steps of the audio processing method.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM), which acts as external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDR SDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous Link (Synchlink) DRAM
  • Rambus direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Abstract

An audio processing method and apparatus, a computer readable storage medium, and an electronic device. The audio processing method is applied to the electronic device having multiple audio output channels. The audio processing method comprises: when a target application runs, obtaining first audio behavior information set in audio service, the first audio behavior information being parameter information of playing audio data (302); when the target application plays the audio data, obtaining second audio behavior information for the electronic device to play the audio data (304); identifying, according to the first audio behavior information and the second audio behavior information, whether playback of the audio data is abnormal (306); and when the playback of the audio data is abnormal, correcting the second audio behavior information to repair the abnormal playback (308).

Description

音频处理方法和装置、计算机可读存储介质、电子设备Audio processing method and device, computer readable storage medium, electronic equipment 技术领域Technical field
本申请涉及电子设备技术领域,特别是涉及音频处理方法和装置、电子设备、计算机可读存储介质。The present application relates to the technical field of electronic equipment, in particular to audio processing methods and apparatuses, electronic equipment, and computer-readable storage media.
背景技术Background technique
随着电子设备的广泛应用和其功能的日益丰富,电子设备已成为人们日常生活中不可或缺的一部分。其中,电子设备安装的应用程序更具多样化。在使用应用程序的过程中,当应用程序播放音频数据时,可设定音频数据的音频行为信息。With the wide application of electronic equipment and its increasingly rich functions, electronic equipment has become an indispensable part of people's daily life. Among them, the applications installed on electronic devices are more diverse. In the process of using the application, when the application plays audio data, the audio behavior information of the audio data can be set.
但是,在应用程序的使用过程中,电子设备不能系统的监听音频数据的音频行为信息,会出现音频行为信息的调用异常,使音频数据的播放异常。However, during the use of the application program, the electronic device cannot systematically monitor the audio behavior information of the audio data, and an abnormal call of the audio behavior information may occur, which makes the playback of the audio data abnormal.
发明内容Summary of the invention
本申请实施例提供一种音频处理方法和装置、计算机可读存储介质、电子设备,可以监听音频数据播放的异常情况,并使音频数据正常播放,增强音频数据输出的稳定性,提高用户体验。Embodiments of the present application provide an audio processing method and apparatus, a computer-readable storage medium, and an electronic device, which can monitor abnormalities of audio data playback, and enable normal playback of audio data, enhance the stability of audio data output, and improve user experience.
一种音频处理方法,应用于电子设备,所述方法包括:An audio processing method applied to electronic equipment, the method includes:
当目标应用程序运行时,获取音频服务中设置的第一音频行为信息,其中,所述第一音频行为信息为播放所述音频数据的参数信息;When the target application is running, obtain first audio behavior information set in an audio service, where the first audio behavior information is parameter information for playing the audio data;
当所述目标应用程序播放所述音频数据时,获取所述电子设备播放所述音频数据的第二音频行为信息;When the target application plays the audio data, obtain second audio behavior information of the electronic device playing the audio data;
根据所述第一音频行为信息和第二音频行为信息识别所述音频数据的播放是否异常;Identifying whether the playback of the audio data is abnormal according to the first audio behavior information and the second audio behavior information;
当所述音频数据的播放异常时,校正所述第二音频行为信息以修复异常播放。When the playback of the audio data is abnormal, the second audio behavior information is corrected to repair the abnormal playback.
一种音频处理装置,应用于电子设备,所述装置包括:An audio processing device is applied to electronic equipment. The device includes:
信息采集模块,用于当目标应用程序运行时,获取音频服务中设置的第一音频行为信息,其中,所述第一音频行为信息为播放所述音频数据的参数信息;The information collection module is used to obtain first audio behavior information set in the audio service when the target application is running, wherein the first audio behavior information is parameter information for playing the audio data;
信息获取模块,用于当所述目标应用程序播放所述音频数据时,获取所述电子设备播放所述音频数据的第二音频行为信息;An information obtaining module, configured to obtain second audio behavior information of the electronic device playing the audio data when the target application plays the audio data;
异常判读模块,用于根据所述第一音频行为信息和第二音频行为信息识别所述音频数据的播放是否异常;及An abnormality interpretation module, configured to identify whether the playback of the audio data is abnormal according to the first audio behavior information and the second audio behavior information; and
异常校正模块,用于当所述音频数据的播放异常时,校正所述第二音频行为信息以修复异常播放。The abnormality correction module is configured to correct the second audio behavior information to repair abnormal playback when the playback of the audio data is abnormal.
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述的音频处理方法的步骤。A computer-readable storage medium on which a computer program is stored, which when executed by a processor implements the steps of the audio processing method described above.
一种电子设备,包括存储器及处理器,所述存储器中储存有计算机可读指令,所 述指令被所述处理器执行时,使得所述处理器执行如权利要求上述的音频处理方法。An electronic device includes a memory and a processor. The memory stores computer-readable instructions, and when the instructions are executed by the processor, the processor is caused to perform the audio processing method according to the claims.
上述音频处理方法和装置、计算机可读存储介质、电子设备,能够当目标应用程序运行时,获取音频服务中设置的第一音频行为信息;当目标应用程序播放音频数据时,获取电子设备播放音频数据的第二音频行为信息;根据第一音频行为信息和第二音频行为信息识别音频数据的播放是否异常;当音频数据的播放异常时,校正第二音频行为信息以修复异常播放,可以监听音频数据播放的异常情况,并使音频数据正常播放,增强音频数据输出的稳定性,提高用户体验。The above audio processing method and apparatus, computer-readable storage medium, and electronic device can obtain the first audio behavior information set in the audio service when the target application is running; when the target application plays audio data, the electronic device plays audio The second audio behavior information of the data; identify whether the playback of the audio data is abnormal according to the first audio behavior information and the second audio behavior information; when the playback of the audio data is abnormal, correct the second audio behavior information to repair the abnormal playback, you can monitor the audio The abnormal situation of data playback, and make the audio data play normally, enhance the stability of the audio data output, and improve the user experience.
附图说明BRIEF DESCRIPTION
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他实施例的附图。In order to more clearly explain the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, without paying any creative work, drawings of other embodiments can be obtained based on these drawings.
图1为一实施例中的电子设备的内部结构示意图;1 is a schematic diagram of the internal structure of an electronic device in an embodiment;
图2为一实施例中的安卓音频系统的部分架构示意图;2 is a schematic diagram of a part of the architecture of an Android audio system in an embodiment;
图3为一实施例中的音频处理方法的流程示意图;3 is a schematic flowchart of an audio processing method in an embodiment;
图4为一实施例中控制监听模块采集目标应用程序运行时在音频服务中用于设置播放音频数据的第一音频行为信息的流程示意图;FIG. 4 is a schematic flowchart of a process for controlling a monitoring module to collect first audio behavior information used for setting audio data playback in an audio service when a target application is running in an embodiment;
图5为一实施例中根据第一音频行为信息和第二音频行为信息识别音频数据的播放是否异常的流程示意图;5 is a schematic flowchart of identifying whether the playback of audio data is abnormal according to the first audio behavior information and the second audio behavior information in an embodiment;
图6为一个实施例中当音频数据的播放异常时,校正第二音频行为信息以修复异常播放的流程示意图;6 is a schematic flow chart of correcting second audio behavior information to repair abnormal playback when audio data playback is abnormal in an embodiment;
图7为另一个实施例中音频处理方法的流程示意图;7 is a schematic flowchart of an audio processing method in another embodiment;
图8为又一个实施例中音频处理方法的流程示意图;8 is a schematic flowchart of an audio processing method in yet another embodiment;
图9为一个实施例中的音频处理装置的框架示意图;9 is a schematic diagram of an audio processing device in an embodiment;
图10为与本申请实施例提供的电子设备相关的手机的部分结构的框图。10 is a block diagram of a partial structure of a mobile phone related to an electronic device provided by an embodiment of the present application.
具体实施方式detailed description
为了便于理解本发明,下面将参照相关附图对本发明进行更全面的描述。附图中给出了本发明的较佳实施例。但是,本发明可以以许多不同的形式来实现,并不限于本文所描述的实施例。相反地,提供这些实施例的目的是使对本发明的公开内容的理解更加透彻全面。In order to facilitate understanding of the present invention, the present invention will be described more fully below with reference to related drawings. The drawings show preferred embodiments of the invention. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive.
在一个实施例中,如图1所示,提供了一种电子设备的内部结构示意图。该电子设备包括通过系统总线连接的处理器、存储器和显示屏。其中,该处理器用于提供计算和控制能力,支撑整个电子设备的运行。存储器用于存储数据、程序、和/或指令代码等,存储器上存储至少一个计算机程序,该计算机程序可被处理器执行,以实现本申请实施例中提供的适用于电子设备的音频处理方法。存储器可包括磁碟、光盘、只 读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random-Access-Memory,RAM)等。例如,在一个实施例中,存储器包括非易失性存储介质及内存储器。非易失性存储介质存储有操作系统、数据库和计算机程序。该数据库中存储有用于实现以上各个实施例所提供的一种音频处理方法相关的数据,比如可存储有每个进程或应用的名称等信息。该计算机程序可被处理器所执行,以用于实现本申请各个实施例所提供的一种音频处理方法。内存储器为非易失性存储介质中的操作系统、数据库和计算机程序提供高速缓存的运行环境。显示屏可以是触摸屏,比如为电容屏或电子屏,用于显示前台进程对应的应用的界面信息,还可以被用于检测作用于该显示屏的触摸操作,生成相应的指令,比如进行前后台应用的切换指令等。In one embodiment, as shown in FIG. 1, a schematic diagram of an internal structure of an electronic device is provided. The electronic device includes a processor, memory, and display screen connected by a system bus. Among them, the processor is used to provide computing and control capabilities to support the operation of the entire electronic device. The memory is used to store data, programs, and/or instruction codes, etc. At least one computer program is stored on the memory, and the computer program can be executed by the processor to implement the audio processing method for electronic devices provided in the embodiments of the present application. The memory may include a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random-access memory (Random-Access-Memory, RAM). For example, in one embodiment, the memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, a database, and a computer program. The database stores data related to an audio processing method provided by the above embodiments, for example, information such as the name of each process or application may be stored. The computer program may be executed by the processor to implement an audio processing method provided by various embodiments of the present application. The internal memory provides a cached operating environment for operating systems, databases, and computer programs in non-volatile storage media. The display screen can be a touch screen, such as a capacitive screen or an electronic screen, which is used to display interface information of applications corresponding to the foreground process, and can also be used to detect a touch operation acting on the display screen and generate corresponding instructions, such as performing front and background Application switching instructions, etc.
本领域技术人员可以理解,图1中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的电子设备的限定,具体的电子设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。如该电子设备还包括通过系统总线连接的网络接口,网络接口可以是以太网卡或无线网卡等,用于与外部的电子设备进行通信,比如可用于同服务器进行通信。Those skilled in the art may understand that the structure shown in FIG. 1 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may It includes more or fewer components than shown in the figure, or some components are combined, or have a different component arrangement. For example, the electronic device further includes a network interface connected through a system bus. The network interface may be an Ethernet card or a wireless network card, etc., and is used for communication with external electronic devices, for example, for communication with a server.
在一个实施例中,如图2所示,提供了一种Android音频系统的Atlas部分架构图。其中,该Android音频系统的Atlas架构系统中包括内核(Kernel)空间层210、本地层220、框架层230以及Client层240。In one embodiment, as shown in FIG. 2, an Atlas partial architecture diagram of an Android audio system is provided. The Atlas architecture system of the Android audio system includes a kernel space layer 210, a local layer 220, a framework layer 230, and a client layer 240.
Atlas架构可以将多媒体已有的多个APK整合进Atlas中,使其变成一个APK,节省一些资源;也即,Atlas架构系统可以将Dirac音效APK、智能音量APK、智能耳机APK、GiFT进程、守护系统服务以及其他feature均整合进Atlas APK。The Atlas architecture can integrate multiple existing APKs of multimedia into Atlas, making it an APK, saving some resources; that is, the Atlas architecture system can integrate Dirac sound effects APK, smart volume APK, smart headset APK, GiFT process, Guardian system services and other features are integrated into Atlas APK.
内核(Kernel)空间层210上可包含Audio驱动模块211,其中,Audio驱动模块是与硬件进行交互,并且实现本地层的接口供上层正常调用,这里可以选择ALSA,OSS以及自定义的音频驱动。本地层220中包含AtlasService_Jni模块221、AtlasService Interface模块223以及AtlasService模块225。框架层230中包含AtlasManager模块231和AtlasService模块233。其中,AtlasManager模块231中设有常规接口和注册回调接口。本地层220中的AtlasService模块225以及框架层230中的AtlasService模块233用于事件接收和处理、信息收集、异常反馈以及日志收集,其中,信息收集可包括显示信息的收集和音频信息的收集。其中,音频信息包括播放信息(音频输出通道、音量、音效等)、录音信息、音频模式设置信息等。由于该AtlasService模块设立在系统级的框架层中,可方便与其他系统服务进行交互,同时无需担心系统调用时的权限问题。通过上述的架构,可实现本申请各个实施例中的音频处理方法。The Kernel space layer 210 may include an Audio driver module 211, where the Audio driver module interacts with the hardware and implements the local layer interface for the upper layer to call normally. Here, ALSA, OSS, and a custom audio driver can be selected. The local layer 220 includes an AtlasService_Jni module 221, an AtlasService Interface module 223, and an AtlasService module 225. The framework layer 230 includes an AtlasManager module 231 and an AtlasService module 233. Among them, the AtlasManager module 231 is provided with a conventional interface and a registration callback interface. The AtlasService module 225 in the local layer 220 and the AtlasService module 233 in the framework layer 230 are used for event reception and processing, information collection, abnormal feedback, and log collection, where the information collection may include the collection of display information and the collection of audio information. Among them, the audio information includes playback information (audio output channels, volume, sound effects, etc.), recording information, audio mode setting information, and so on. Because the AtlasService module is set up in the system-level framework layer, it can facilitate interaction with other system services without worrying about permissions during system calls. Through the above-mentioned architecture, the audio processing methods in various embodiments of the present application can be implemented.
在一个实施例中,如图3所示,提供了一种音频处理方法,该音频处理方法应用于具有多个音频输出通道的电子设备。在一个实施例中,电子设备可以为包括手机、平板电脑、笔记本电脑、掌上电脑、移动互联网设备(Mobile Internet Device,MID)、可穿戴设备(例如智能手表、智能手环、计步器等)或其他等具有语音通话功能并具有扬声器的电子设备。In one embodiment, as shown in FIG. 3, an audio processing method is provided, which is applied to an electronic device having multiple audio output channels. In one embodiment, the electronic device may include a mobile phone, a tablet computer, a laptop computer, a palmtop computer, a mobile Internet device (Mobile Internet Device (MID), a wearable device (such as a smart watch, smart bracelet, pedometer, etc.) Or other electronic devices with voice call function and speakers.
如图3所示,在一个实施例中,音频处理方法,包括步骤302-步骤308。As shown in FIG. 3, in one embodiment, the audio processing method includes steps 302-308.
步骤302,当目标应用程序运行时,获取音频服务中设置的第一音频行为信息。Step 302: When the target application is running, obtain the first audio behavior information set in the audio service.
在一个实施例中,基于电子设备的操作系统创建监听模块,通过监听模块可采集目标应用程序运行时在音频服务中设置的第一音频行为信息。其中,第一音频行为信息为播放所述音频数据的参数信息。以具有安卓操作系统的电子设备为例,可在系统框架层(native/framework层)创建系统级的监听模块(AtlasService模块),通过监听模块采集目标应用程序运行时在音频服务中设置播放音频数据的第一音频行为信息。例如,可在框架层设立监听模块并运行在系统服务程序(system_server)中,由于该监听模块设立在系统级的服务框架层中,可方便与其他音频服务、显示服务、系统服务等进行交互,同时无需担心系统调用时的权限问题。In one embodiment, a monitoring module is created based on the operating system of the electronic device, and the first audio behavior information set in the audio service when the target application program is running can be collected through the monitoring module. Wherein, the first audio behavior information is parameter information of playing the audio data. Taking an electronic device with an Android operating system as an example, a system-level monitoring module (AtlasService module) can be created in the system framework layer (native/framework layer), and the playback audio data can be set in the audio service when the target application is running through the monitoring module. First audio behavior information. For example, you can set up a listener module at the framework layer and run it in the system service program (system_server). Since the listener module is set up at the system-level service framework layer, you can easily interact with other audio services, display services, system services, etc. At the same time, there is no need to worry about the permissions during system calls.
当监听模块与音频服务进行交互时,可以在音频服务中采集目标应用程序运行时在音频服务中设置播放音频数据的第一音频行为信息。其中,第一音频行为信息可至少包括音频输出通道、音频模式、音量、录音、与音频数据输入和/或输出相关的信息。音频输出通道包括听筒通道、扬声器通道、耳机通道,其中耳机通道可以包括有线耳机通道和无线耳机(蓝牙耳机)通道。当音频输出通道为听筒通道时,音频数据由听筒发出;当音频输出通道为扬声器通道时,音频数据由外放扬声器发出;当音频输出通道为耳机通道时,音频数据可通过有线耳机或蓝牙耳机发出。音频模式可包括多媒体模式、铃声模式、闹钟模式、呼叫模式、通话模式(包括音/视频、VoIP通话)和系统模式。When the monitoring module interacts with the audio service, the audio service may collect the first audio behavior information for setting the audio data to be played in the audio service when the target application is running. The first audio behavior information may include at least an audio output channel, audio mode, volume, recording, and information related to audio data input and/or output. The audio output channel includes an earpiece channel, a speaker channel, and a headset channel, where the headset channel may include a wired headset channel and a wireless headset (Bluetooth headset) channel. When the audio output channel is the earpiece channel, the audio data is sent by the earpiece; when the audio output channel is the speaker channel, the audio data is sent by the external speaker; when the audio output channel is the earphone channel, the audio data can be through wired headphones or Bluetooth headphones issue. Audio modes can include multimedia mode, ringtone mode, alarm mode, call mode, call mode (including audio/video, VoIP call) and system mode.
目标应用程序可以理解为能够输出和/或输出音频信号的应用程序,且目标应用程序的数量可以为1个2个、3个或更多个。例如,目标应用程序可包括通话类、即时通信类、音频播放类、视频播放类、声音控制类、语音输入类等应用程序。当目标应用程序运行时,可理解为在前台运行,也可以理解为在后台运行。The target application program may be understood as an application program capable of outputting and/or outputting audio signals, and the number of target application programs may be 1, 2, 3 or more. For example, the target application may include applications such as call, instant messaging, audio playback, video playback, sound control, and voice input. When the target application is running, it can be understood as running in the foreground or running in the background.
音频数据包括语音数据、铃声数据、闹铃数据、多媒体数据(视频流、音频流输数据等)等等。Audio data includes voice data, ringtone data, alarm data, multimedia data (video streaming, audio streaming data, etc.) and so on.
步骤304,当目标应用程序播放音频数据时,获取电子设备播放音频数据的第二音频行为信息。Step 304: When the target application plays audio data, obtain second audio behavior information of the electronic device playing audio data.
当目标应用程序播放音频数据时,可以获取电子设备当前实际播放音频数据的第二音频行为信息。其中,第二音频行为信息也可至少包括音频输出通道、音频模式、音量、录音、与音频数据输入和/或输出相关的信息。例如,若电子设备当前处于通话状态,且采用扬声器进行通话音频的传输,则电子设备获取的当前播放音频数据(通话语音数据)的第二音频行为信息包括:通话模式、扬声器传输通道、音量为A等信息。When the target application plays the audio data, the second audio behavior information of the electronic device currently actually playing the audio data may be acquired. The second audio behavior information may also include at least an audio output channel, audio mode, volume, recording, and information related to audio data input and/or output. For example, if the electronic device is currently in a call state and a speaker is used to transmit call audio, the second audio behavior information of the currently playing audio data (call voice data) acquired by the electronic device includes: the call mode, the speaker transmission channel, and the volume is A and other information.
步骤306,根据第一音频行为信息和第二音频行为信息识别音频数据的播放是否异常。Step 306: Identify whether the playback of audio data is abnormal according to the first audio behavior information and the second audio behavior information.
第一音频行为信息和第二音频行为信息均可至少包括音频输出通道、音频模式、音量等信息。第一音频行为信息可理解为目标应用程序播放音频数据时,音频服务中设定的标准音频行为信息。第二音频行为信息可以理解为目标应用程序当前播放的实 际音频行为信息。在正常情况下,其第一音频行为信息与第二音频行为信息应当完全一致,此时,则可认为目标应用程序播放音频数据的播放动作是正常的,若第一音频行为信息与第二音频行为信息应当不一致时,则可认为目标应用程序播放音频数据的播放动作是异常的。例如,当电子设备处于通话状态时,其设定的第一音频行为信息包括通话模式、听筒输出通道、音量为A;但是,在实际通话过程中,其第二音频行为信息包括通话模式、扬声器输出通道、音量为A,此时,第一音频行为信息与第二音频行为信息中的音频输出通道不同,则可认为当前通话状态的音频数据的播放为异常。Both the first audio behavior information and the second audio behavior information may include at least audio output channel, audio mode, volume and other information. The first audio behavior information may be understood as standard audio behavior information set in the audio service when the target application plays audio data. The second audio behavior information can be understood as actual audio behavior information currently played by the target application. Under normal circumstances, the first audio behavior information and the second audio behavior information should be exactly the same. At this time, it can be considered that the playback action of the target application to play audio data is normal, if the first audio behavior information and the second audio When the behavior information should be inconsistent, the playback action of the target application to play audio data may be considered abnormal. For example, when the electronic device is in a call state, the first audio behavior information it sets includes the call mode, the earpiece output channel, and the volume is A; however, during the actual call, the second audio behavior information includes the call mode and the speaker The output channel and the volume are A. At this time, the audio output channel in the first audio behavior information and the second audio behavior information are different, it can be considered that the playback of audio data in the current call state is abnormal.
步骤308,当音频数据的播放异常时,校正第二音频行为信息以修复异常播放。 Step 308, when the playback of the audio data is abnormal, correct the second audio behavior information to repair the abnormal playback.
当电子设备判断出音频数据的播放异常时,可以根据第一音频行为信息对第二音频行为信息进行校正,使得电子设备当前实际播放音频数据的第二音频行为信息与音频服务中设置的第一音频行为相一致,进而修复该异常播放,以使音频数据能够正常播放,而提高用户体验度。例如,电子设备通话时,其音频输出通道异常时,电子设备可以调用预设接口函数,可校正该异常的音频输出通道,使通话音频从正常的音频输出通道输出;当电子设备的音频模式异常时,电子设备可以通过预设的模式转换接口对异常的音频模式进行模式转换以校正并修复异常播放。When the electronic device determines that the audio data is playing abnormally, it can correct the second audio behavior information according to the first audio behavior information, so that the second audio behavior information that the electronic device currently actually plays the audio data and the first set in the audio service The audio behavior is consistent, and then the abnormal playback is repaired, so that the audio data can be played normally, and the user experience is improved. For example, when the audio output channel of the electronic device is abnormal, the electronic device can call the preset interface function to correct the abnormal audio output channel, so that the audio of the call is output from the normal audio output channel; when the audio mode of the electronic device is abnormal At this time, the electronic device can perform mode conversion on the abnormal audio mode through the preset mode conversion interface to correct and repair the abnormal playback.
上述音频处理方法,能够控制监听模块采集目标应用程序运行时在音频服务中用于设置播放音频数据的第一音频行为信息;当目标应用程序播放音频数据时,获取电子设备播放音频数据的第二音频行为信息;根据第一音频行为信息和第二音频行为信息识别音频数据的播放是否异常;当音频数据的播放异常时,校正第二音频行为信息以修复异常播放,可以监听音频数据播放的异常情况,并使音频数据正常播放,增强音频数据输出的稳定性,提高用户体验。The above audio processing method can control the monitoring module to collect the first audio behavior information used to set the playback audio data in the audio service when the target application is running; when the target application plays the audio data, obtain the second audio data played by the electronic device Audio behavior information; identify whether the playback of audio data is abnormal according to the first audio behavior information and the second audio behavior information; when the playback of audio data is abnormal, correct the second audio behavior information to repair the abnormal playback, you can monitor the abnormal playback of audio data Situation, and make the audio data play normally, enhance the stability of the audio data output, and improve the user experience.
如图4所示,在一个实施例中,控制监听模块采集目标应用程序运行时在音频服务中用于设置播放音频数据的第一音频行为信息,包括步骤402-步骤404。其中:As shown in FIG. 4, in one embodiment, the control listening module collects first audio behavior information used to set playing audio data in the audio service when the target application is running, including steps 402-404. among them:
步骤402,当目标应用程序运行时,控制监听模块向音频服务发送音频获取请求。其中,音频获取请求用于指示音频服务采集第一音频行为信息。 Step 402, when the target application is running, the control listening module sends an audio acquisition request to the audio service. The audio acquisition request is used to instruct the audio service to collect the first audio behavior information.
步骤404,接收音频服务反馈的第一音频行为信息。Step 404: Receive first audio behavior information fed back by an audio service.
电子设备的监听模块与音频服务之间可以采用binder和socket通信机制进行通信。即,监听模块可采用binder和socket通信机制与音频服务进行通信。当目标应用程序运行时,电子设备可以控制监听模块采用binder和socket通信机制向音频服务发送音频获取请求。音频服务根据接收的获取请求可以采集用于设置播放该目标应用程序播放音频数据的第一音频行为信息。当音频服务采集该第一音频行为信息后,可采用binder和socket通信机制将采集的第一音频行为信息反馈给监听模块,以使监听模块获取目标应用程序播放音频数据时设置的第一音频行为信息。Binder and socket communication mechanisms can be used for communication between the monitoring module of the electronic device and the audio service. That is, the listening module can use binder and socket communication mechanisms to communicate with the audio service. When the target application is running, the electronic device can control the listening module to send an audio acquisition request to the audio service using the binder and socket communication mechanisms. The audio service may collect the first audio behavior information used to set the target application to play audio data according to the received acquisition request. After the audio service collects the first audio behavior information, the binder and socket communication mechanisms may be used to feed back the collected first audio behavior information to the monitoring module, so that the monitoring module obtains the first audio behavior set when the target application plays audio data information.
进一步的,在音频服务中,同时还设有相同的接口,监听模块可以通过该接口可才binder和socket通信机制与监听模块进行通讯。Further, in the audio service, the same interface is also provided at the same time, and the monitoring module can communicate with the monitoring module through the binder and socket communication mechanism.
如图5所示,在一个实施例中,根据第一音频行为信息和第二音频行为信息识别 音频数据的播放是否异常,包括步骤502-步骤506。其中,As shown in FIG. 5, in one embodiment, identifying whether audio data is abnormally played according to the first audio behavior information and the second audio behavior information includes steps 502-506. among them,
步骤502,获取目标应用程序的应用信息。Step 502: Obtain application information of the target application.
在一个实施例中,电子设备可以基于目标应用程序的标识信息来获取目标应用程序的应用信息。其中,应用信息可包括目标应用程序的使用信息、应用类型等信息。其中,使用信息可指在预设时间内,累积使用时间、使用频率等,应用类型可根据该目标应用程序的功能来划分,例如,通话类、即时通讯交互类、视频类、音频类、娱乐类、系统自定义类等等。其中,系统自定义类可包括铃声、闹钟等。In one embodiment, the electronic device may obtain the application information of the target application based on the identification information of the target application. The application information may include information such as usage information and application type of the target application program. Among them, the usage information can refer to the cumulative usage time, usage frequency, etc. within a preset time, and the application type can be divided according to the function of the target application, for example, call, instant messaging interaction, video, audio, entertainment Class, system custom class, etc. Among them, the system custom category may include ringtones, alarm clocks and so on.
具体地,电子设备可预先对每个目标应用程序进行标识以形成标识信息,该标识信息可以用字母、数字、特殊符号任意一种或其组合进行表示。不同类型的目标应用程序可以用不同的标识信息来表示,该标识信息可以区别目标应用程序的应用类型。Specifically, the electronic device may identify each target application in advance to form identification information, and the identification information may be represented by any one or combination of letters, numbers, and special symbols. Different types of target application programs can be represented by different identification information, and the identification information can distinguish the application types of the target application programs.
进一步的,电子设备可以对该目标应用程序的使用信息进行统计,也可以将该使用信息注入至该标识信息中,以使该标识信息中携带了该目标应用程序的使用信息。Further, the electronic device may make statistics on the usage information of the target application, or may inject the usage information into the identification information, so that the identification information carries the usage information of the target application.
步骤504,根据应用信息和第一音频行为信息确定第二音频行为信息是否异常。Step 504: Determine whether the second audio behavior information is abnormal according to the application information and the first audio behavior information.
步骤506,若第二音频行为信息异常,则音频数据的播放异常。Step 506: If the second audio behavior information is abnormal, the playback of the audio data is abnormal.
在一个实施例中,电子设备可以根据目标应用程序的应用信息确定第一音频行为信息和第二音频行为信息中音频输出通道、音频模式和音量的判定顺序。具体地,若第一音频行为信息与第二音频行为信息中有任一信息不一致时,则可认为该第二音频行为信息异常。第一音频行为信息和第二音频行为信息中均包括音频输出通道、音频模式和音量等信息,在确定第二音频行为信息是否异常时,需要确定第一音频行为信息和第二音频行为信息中各个信息对比的顺序。电子设备可以根据应用信息确定该判定顺序。例如,若当前目标应用程序为通话类应用程序时,其判断顺序可以音频输出通道、音量、音频模式,或音频输出通道、音频模式、音量,其中,优先判定音频输出通道是否异常,若当前目标应用程序为系统应用程序时,其判断顺序可以音频模式、音量、音频输出通道,或音频模式、音频输出通道、音量,其中,优先判定音频模式是否异常。In one embodiment, the electronic device may determine the determination order of the audio output channel, audio mode, and volume in the first audio behavior information and the second audio behavior information according to the application information of the target application program. Specifically, if any information in the first audio behavior information is inconsistent with the second audio behavior information, the second audio behavior information may be considered abnormal. Both the first audio behavior information and the second audio behavior information include information such as the audio output channel, audio mode, and volume. When determining whether the second audio behavior information is abnormal, it is necessary to determine the first audio behavior information and the second audio behavior information The order in which the information is compared. The electronic device may determine the determination order according to the application information. For example, if the current target application is a call-type application, the judgment order can be audio output channel, volume, audio mode, or audio output channel, audio mode, volume, where priority is given to determine whether the audio output channel is abnormal, if the current target When the application program is a system application program, the judgment order may be audio mode, volume, audio output channel, or audio mode, audio output channel, volume, wherein priority is given to whether the audio mode is abnormal.
电子设备可以根据应用信息确定第二音频行为信息是否异常的判定顺序,根据该判断顺序依次对比第一音频行为信息和第二音频行为信息中音频输出通道、音频模式、音量是否均一致,若音频输出通道、音频模式和音量中任意一个不一致时,则可认为第二音频行为信息异常。The electronic device may determine whether the second audio behavior information is abnormal according to the application information, and according to the judgment sequence, sequentially compare whether the audio output channel, audio mode, and volume in the first audio behavior information and the second audio behavior information are consistent. When any one of the output channel, the audio mode and the volume is inconsistent, the second audio behavior information may be considered abnormal.
当第二音频行为信息异常时,则可以认为当前播放音频数据的播放行为时异常的,也即,音频数据的播放异常,需要对该异常播放进行校正。When the second audio behavior information is abnormal, it may be considered that the current playback behavior of the audio data is abnormal, that is, the audio data is abnormally played, and the abnormal playback needs to be corrected.
在本实施例中,电子设备可以根据目标应用程序的应用信息确定第一音频行为信息和第二音频行为信息中音频输出通道、音频模式、音量的判定顺序,提高了第二音频行为信息是否异常的判定效率。In this embodiment, the electronic device may determine the determination order of the audio output channel, the audio mode, and the volume in the first audio behavior information and the second audio behavior information according to the application information of the target application, which improves whether the second audio behavior information is abnormal The efficiency of judgment.
如图6所示,在一个实施例中,当音频数据的播放异常时,校正第二音频行为信息以修复异常播放包括步骤602-步骤604。其中,As shown in FIG. 6, in one embodiment, when the playback of the audio data is abnormal, correcting the second audio behavior information to repair the abnormal playback includes steps 602-604. among them,
步骤602,当音频数据播放异常时,根据第二音频行为信息获取异常类型;异常类 型包括模式异常、通道异常和音量异常。Step 602: When the audio data plays abnormally, the abnormal type is obtained according to the second audio behavior information; the abnormal type includes a mode abnormality, a channel abnormality, and a volume abnormality.
当电子设备的音频数据播放异常时,可以根据第二音频行为信息获取播放异常的异常类型。其中,异常类型包括模式异常、通道异常和音量异常。例如,若第一音频行为信息与第二音频行为信息中音频模式不一致时,则该异常类型为模式异常;若第一音频行为信息与第二音频行为信息中音频输出通道不一致时,则该异常类型为通道异常;若第一音频行为信息与第二音频行为信息中音量不一致,或第二音频行为信息中的音量超出了预设音量范围时,则该异常类型为音量异常。需要说明的是,预设音量范围可根据第一音频行为信息的音量进行设定。例如,第一音频行为信息的音量为a,第二音频行为信息的音量为b,则该预设音量范围δ可理解为a与b的差值的绝对值,a与b的差值的绝对值大于预设音量范围δ,则可认为音量异常。进一步的,若第一音频行为信息与第二音频行为信息中音频输出通道、音频模式、音量均不一致时,则该异常类型为包括通道异常、模式异常以及音量异常。When the audio data of the electronic device plays abnormally, the abnormal type of abnormal playback may be obtained according to the second audio behavior information. Among them, abnormal types include abnormal patterns, abnormal channels and abnormal volume. For example, if the first audio behavior information is inconsistent with the audio mode in the second audio behavior information, the abnormal type is a mode abnormality; if the first audio behavior information is inconsistent with the audio output channel in the second audio behavior information, the exception The type is channel abnormality; if the volume in the first audio behavior information and the second audio behavior information are inconsistent, or the volume in the second audio behavior information exceeds the preset volume range, the abnormal type is volume abnormality. It should be noted that the preset volume range can be set according to the volume of the first audio behavior information. For example, if the volume of the first audio behavior information is a and the volume of the second audio behavior information is b, then the preset volume range δ can be understood as the absolute value of the difference between a and b, and the absolute value of the difference between a and b If the value is greater than the preset volume range δ, the volume can be considered abnormal. Further, if the audio output channel, audio mode, and volume in the first audio behavior information and the second audio behavior information are inconsistent, the abnormal type includes channel abnormality, mode abnormality, and volume abnormality.
步骤604,根据异常类型采用预设校正策略以校正第二音频行为信息以修复异常播放。Step 604: A preset correction strategy is adopted according to the abnormal type to correct the second audio behavior information to repair the abnormal playback.
异常类型包括模式异常、通道异常和音量异常,不同的异常类型对应的预设校正策略不同。The abnormal types include mode abnormality, channel abnormality and volume abnormality, and different abnormal types correspond to different preset correction strategies.
在一个实施例中,当通道异常时调用预设接口函数来校正第二音频行为信息中异常的音频输出通道以修复异常播放。In one embodiment, when the channel is abnormal, the preset interface function is called to correct the abnormal audio output channel in the second audio behavior information to repair the abnormal playback.
在一个实施例中,当模式异常时设置模式转换接口,通过模式转换接口对音频模式进行模式转换以校正第二音频行为信息以修复异常播放。In one embodiment, the mode conversion interface is set when the mode is abnormal, and the mode conversion is performed on the audio mode through the mode conversion interface to correct the second audio behavior information to repair the abnormal playback.
进一步的,异常类型包括通道异常、模式异常和音量异常中至少两种时,则可以根据上述判定顺序确定校正顺序,根据该校正顺序对所有的异常类型依次进行校正。Further, when the abnormal type includes at least two of channel abnormality, mode abnormality, and volume abnormality, the correction order may be determined according to the above-mentioned determination order, and all abnormality types may be sequentially corrected according to the correction order.
本实施例中,电子设备可以根据第二音频行为信息来确定播放异常的异常类型,根据不同的异常类型可以自适应的采用相应的校正策略对其进行校正,以提高校正效率,使音频数据能够正常的播放,提高用户体验度。In this embodiment, the electronic device can determine the abnormal type of playback abnormality according to the second audio behavior information, and can adaptively correct it according to different abnormal types, so as to improve the correction efficiency and enable the audio data Normal playback improves user experience.
在一个实施例中,当音频数据播放异常时,根据第二音频行为信息获取异常类型,若该异常类型为通道异常时,其可包括耳机通道异常、听筒通道异常和扬声器通道异常。例如,第二音频行为信息与第一音频行为信息中音频输出通道不一致,若第二音频行为信息中音频输出通道为耳机通道时,则可认为为耳机通道异常;若第二音频行为信息中音频输出通道为听筒通道时,则可认为为听筒通道异常;若第二音频行为信息中音频输出通道为扬声器通道时,则可认为为扬声器通道异常。In one embodiment, when the audio data plays abnormally, the abnormal type is obtained according to the second audio behavior information. If the abnormal type is a channel abnormality, it may include an earphone channel abnormality, an earpiece channel abnormality, and a speaker channel abnormality. For example, the second audio behavior information is inconsistent with the audio output channel in the first audio behavior information. If the audio output channel in the second audio behavior information is a headphone channel, it can be considered as an abnormality in the headphone channel; if the audio in the second audio behavior information When the output channel is an earpiece channel, it can be considered as an abnormality of the earphone channel; if the audio output channel in the second audio behavior information is a speaker channel, it can be considered as an abnormality of the speaker channel.
当播放音频数据的通道异常时,电子设备可以调用预设接口函数来设置音频输出通道。预设接口函数至少包括setSpeakerphoneOn()接口函数、setMode(AudioManager.MODE_IN_CALL)接口函数、isWiredHeadsetOn()接口函数或其他用于设置听筒通道、耳机通道的接口函数等。When the channel for playing audio data is abnormal, the electronic device can call a preset interface function to set the audio output channel. The preset interface functions include at least the setSpeakerphoneOn() interface function, setMode(AudioManager.MODE_IN_CALL) interface function, isWiredHeadsetOn() interface function or other interface functions for setting the earphone channel and headphone channel.
例如,基于安卓操作系统的电子设备中,电子设备可以通过调用AudioManager中的接口函数setSpeakerphoneOn()来设置扬声器通道,也即,可以开启或关闭扬声器通 道。电子设备可以通过调用AudioManager中的函数setMode(AudioManager.MODE_IN_CALL)或构造参数streamType(STREAM_VOICE_CALL)设置听筒通道;电子设备可以通过调用AudioManager中的函数isWiredHeadsetOn()来设置并检测听筒通道。For example, in an electronic device based on the Android operating system, the electronic device can set the speaker channel by calling the interface function setSpeakerphoneOn() in the AudioManager, that is, the speaker channel can be turned on or off. The electronic device can set the earpiece channel by calling the function setMode(AudioManager.MODE_IN_CALL) in AudioManager or the construction parameter streamType(STREAM_VOICE_CALL); the electronic device can set and detect the earpiece channel by calling the function isWiredHeadsetOn() in AudioManager.
具体地,当音频输出通道的听筒通道异常时,检测电子设备是否连接耳机;当电子设备连接耳机时,改变音频数据的听筒通道,以使耳机通道播放音频数据;当电子设备未连接耳机时,改变音频数据的听筒通道,以使扬声器通道播放音频数据。Specifically, when the earphone channel of the audio output channel is abnormal, it is detected whether the electronic device is connected to the earphone; when the electronic device is connected to the earphone, the earphone channel of the audio data is changed so that the earphone channel plays audio data; when the electronic device is not connected to the earphone, Change the receiver channel of audio data so that the speaker channel plays audio data.
例如,电子设备可通过调用AudioManager中的函数isWiredHeadsetOn()来设置并检测是否有连接有线耳机,或通过检测GPIO(通用输入/输出,General Purpose Input Output)的高低电平来检测是否连接了有线耳机。具体的,GPIO接口的预设状态为高电平,当前的检测状态为低电平,则表明GPIO接口的状态发生了变化,电子设备连接了有线耳机。电子设备还可通过BluetoothAdapter类来检测是否有连接蓝牙耳机。同时,电子设备还可以基于蓝牙协议来检测相应的音频接口的接口状态,进而检测电子设备是否与连接蓝牙耳机。For example, an electronic device can set and detect whether a wired headset is connected by calling the function isWiredHeadsetOn() in AudioManager, or detect whether a wired headset is connected by detecting the high and low level of GPIO (General Purpose Input/Output) . Specifically, the preset state of the GPIO interface is a high level, and the current detection state is a low level, which indicates that the state of the GPIO interface has changed and the electronic device is connected to a wired headset. Electronic devices can also detect whether a Bluetooth headset is connected through the BluetoothAdapter class. At the same time, the electronic device can also detect the interface state of the corresponding audio interface based on the Bluetooth protocol, and then detect whether the electronic device is connected to the Bluetooth headset.
需要说明的是,电子设备还可以基于其他软件或硬件的方式检测是否与耳机连接,并不限于上述举例说明。It should be noted that the electronic device can also detect whether it is connected to the earphone based on other software or hardware, which is not limited to the above example.
当电子设备连接耳机时,可调用用于切换至耳机通道的预设接口函数,根据该预设接口函数将输出音频数据的音频输出通道由听筒模式切换为耳机通道,并由耳机通道来播放该音频数据。当电子设备未连接耳机时,则可调用用于切换至扬声器通道的预设接口函数,根据该预设接口函数将输出音频数据的音频输出通道由听筒模式切换为扬声器通道,并由扬声器通道来播放该音频数据。When the electronic device is connected to the earphone, the preset interface function for switching to the earphone channel can be called, and the audio output channel that outputs audio data is switched from the earpiece mode to the earphone channel according to the preset interface function, and the earphone channel plays the Audio data. When the electronic device is not connected to the headset, the preset interface function for switching to the speaker channel can be called, and the audio output channel that outputs audio data is switched from the earpiece mode to the speaker channel according to the preset interface function, and the speaker channel Play the audio data.
本实施例中,当音频输出通道中的听筒通道出现异常时,电子设备可以根据是否连接耳机的状态,自适应的将其听筒通道切换至符合用户使用场景的音频输出通道,可以提高音频输出的稳定性和用户体验度。In this embodiment, when the earphone channel in the audio output channel is abnormal, the electronic device can adaptively switch its earphone channel to an audio output channel that matches the user's use scenario according to whether the headset is connected, which can improve the audio output. Stability and user experience.
可选的,当音频输出通道的扬声器通道异常时,检测电子设备是否连接耳机;当电子设备连接耳机时,改变音频数据的听筒通道,以使耳机通道播放音频数据;当电子设备未连接耳机时,改变音频数据的听筒通道,以使听筒通道播放音频数据。Optionally, when the speaker channel of the audio output channel is abnormal, detect whether the electronic device is connected to the earphone; when the electronic device is connected to the earphone, change the earphone channel of the audio data so that the earphone channel plays audio data; when the electronic device is not connected to the earphone , Change the receiver channel of the audio data, so that the receiver channel plays audio data.
当电子设备连接耳机时,则可调用用于切换至耳机通道的预设接口函数,根据该预设接口函数将输出音频数据的音频输出通道由扬声器模式切换为耳机通道,并由耳机通道来播放该音频数据。当电子设备未连接耳机时,若该目标应用程序的音频模式对应的默认音频输出通道为扬声器通道时,则可调用用于切换至听筒通道的预设接口函数,根据该预设接口函数将输出音频数据的音频输出通道由扬声器模式切换为听筒通道,并由听筒通道来播放该音频数据。When the electronic device is connected to the earphone, the preset interface function for switching to the earphone channel can be called, and the audio output channel for outputting audio data can be switched from the speaker mode to the earphone channel according to the preset interface function and played by the earphone channel The audio data. When the earphone is not connected to the electronic device, if the default audio output channel corresponding to the audio mode of the target application is a speaker channel, the preset interface function for switching to the earphone channel can be called, and the output is output according to the preset interface function The audio output channel of the audio data is switched from the speaker mode to the receiver channel, and the receiver channel plays the audio data.
本实施例中,当音频输出通道中的扬声器通道出现异常时,电子设备可以根据是否连接耳机的状态,自适应的将其扬声器通道切换至符合用户使用场景的音频输出通道,可以提高音频输出的稳定性和用户体验度。In this embodiment, when the speaker channel in the audio output channel is abnormal, the electronic device can adaptively switch its speaker channel to an audio output channel that matches the user's use scenario according to whether the headset is connected, which can improve the audio output. Stability and user experience.
可选的,当音频输出通道的耳机通道异常时,调用预设接口函数改变音频数据的 耳机通道,以使扬声器通道播放音频数据。例如,目标应用程序的第一音频行为信息中音频输出通道为扬声器通道,当电子设备连接耳机时,其闹铃由耳机通道输出,而并未从扬声器输出时,则可认为当前耳机通道异常,则电子设备可调用用于切换至扬声器通道的预设调用函数,使其闹铃从扬声器通道输出,这样可以避免闹铃从耳机通道输出,用户不能感知其闹铃的情况发生,当闹铃从扬声器输出时,用户可正常听到闹铃,不会影响用户的正常作息。Optionally, when the headphone channel of the audio output channel is abnormal, the preset interface function is called to change the headphone channel of the audio data, so that the speaker channel plays audio data. For example, the audio output channel in the first audio behavior information of the target application is the speaker channel. When the electronic device is connected to the headset, the alarm is output from the headset channel, but not from the speaker, the current headset channel may be considered abnormal, Then the electronic device can call the preset calling function for switching to the speaker channel, so that the alarm is output from the speaker channel, so that the alarm can be output from the earphone channel, and the user cannot perceive the occurrence of the alarm when the alarm is from When the speaker is output, the user can normally hear the alarm, which will not affect the user's normal work and rest.
在一个实施例中,当模式异常时设置模式转换接口,通过模式转换接口对音频模式进行模式转换以校正第二音频行为信息以修复异常播放。In one embodiment, the mode conversion interface is set when the mode is abnormal, and the mode conversion is performed on the audio mode through the mode conversion interface to correct the second audio behavior information to repair the abnormal playback.
具体地,设置模式转换接口,通过模式转换接口对音频模式进行模式转换。在安卓系统中,按照现行的google SDK开发包协议下,有setmode函数可作为该模式转换接口,在安卓框架下,可通过调用该setmode函数即可实现音频模式转换。例如,定义setmode(0)为媒体音频模式,setmode(1)为铃声模式,setmode(2)为语音通话模式等。具体地,设置模式转换接口,通过模式转换接口对音频模式进行模式转换,可将第二音频行为信息中的异常音频模式转换为正常的音频模式。Specifically, a mode conversion interface is provided, and a mode conversion is performed on the audio mode through the mode conversion interface. In the Android system, according to the current google SDK development kit agreement, there is a setmode function that can be used as the mode conversion interface. In the Android framework, the audio mode conversion can be achieved by calling the setmode function. For example, define setmode(0) as the media audio mode, setmode(1) as the ringtone mode, and setmode(2) as the voice call mode. Specifically, a mode conversion interface is provided to perform mode conversion on the audio mode through the mode conversion interface, and the abnormal audio mode in the second audio behavior information can be converted into a normal audio mode.
在一个实施例中,当音量异常时,根据模式转换接口对音频模式进行模式转换以校正异常的音频模式;在校正的音频模式下调节音量以校正异常的音量,以使音频数据以正常的音量播放。In one embodiment, when the volume is abnormal, the audio mode is converted according to the mode conversion interface to correct the abnormal audio mode; the volume is adjusted in the corrected audio mode to correct the abnormal volume, so that the audio data is at a normal volume Play.
例如,模式异常包括媒体音频模式异常、静音模式异常、通话模式异常、铃声模式异常等。当媒体音频模式异常时,可以音频模式异常的音频模式校正为媒体音频模式,而调节媒体音频具体可以为调节媒体音频模式的音质、音量大小等。当静音模式异常时,可以将目标应用程序的音频模式校正为静音模式,具体可以为:将音频模式设置为媒体音频模式,并调节媒体音频音量为0,或,将音频模式设置为系统音频模式,并调节系统音频音量为0。当通话模式异常时,将将目标应用程序的音频模式校正为通话模式。此外,当通话模式为听筒模式时,调节听筒模式音量大小,以校正异常的音量,或,当通话模式为免提模式时,调节免提模式音量大小,以校正异常的音量。当铃声模式异常时,将目标应用程序的音频模式校正为铃声模式。其中,将音频模式校正为铃声音频,具体可以为:将音频模式校正为调节铃声,并调节铃声音频的音量大小,以校正异常的音量。For example, the abnormal mode includes abnormal media audio mode, abnormal silent mode, abnormal call mode, abnormal ring mode, etc. When the media audio mode is abnormal, the audio mode with abnormal audio mode may be corrected to the media audio mode, and adjusting the media audio may specifically be adjusting the sound quality and volume of the media audio mode. When the silent mode is abnormal, you can correct the audio mode of the target application to silent mode, specifically: set the audio mode to media audio mode, and adjust the media audio volume to 0, or set the audio mode to system audio mode And adjust the system audio volume to 0. When the call mode is abnormal, the audio mode of the target application will be corrected to the call mode. In addition, when the call mode is the handset mode, adjust the volume level of the handset mode to correct the abnormal volume, or, when the call mode is the hands-free mode, adjust the volume level of the hands-free mode to correct the abnormal volume. When the ringtone pattern is abnormal, the audio mode of the target application is corrected to the ringtone pattern. Wherein, the audio mode is corrected to ringtone audio, which may specifically be: the audio mode is corrected to adjust the ringtone, and the volume of the ringtone audio is adjusted to correct the abnormal volume.
本申请实施例中,电子设备可以根据监听的音频模式异常时,则可以自适应校正该异常的音频模式,使得校正后的音频模式与第一音频行为信息中的音频模式一致,提升了音频数据播放的稳定性,提高了用户体验。In the embodiment of the present application, the electronic device can adaptively correct the abnormal audio mode according to the monitored audio mode is abnormal, so that the corrected audio mode is consistent with the audio mode in the first audio behavior information, which improves the audio data The stability of playback improves the user experience.
如图7所示,在一个实施例中,音频处理方法包括步骤702-步骤710。其中,As shown in FIG. 7, in one embodiment, the audio processing method includes steps 702-710. among them,
步骤702,控制监听606模块采集目标应用程序运行时在音频服务中用于设置播放音频数据的第一音频行为信息;Step 702: Control the monitoring 606 module to collect the first audio behavior information used to set the playback audio data in the audio service when the target application is running;
步骤704,当目标应用程序播放音频数据时,获取电子设备播放音频数据的第二音频行为信息; Step 704, when the target application plays audio data, obtain second audio behavior information of the electronic device playing audio data;
步骤706,根据第一音频行为信息和第二音频行为信息识别音频数据的播放是否异 常;Step 706: Identify whether the playback of the audio data is abnormal according to the first audio behavior information and the second audio behavior information;
步骤708,当音频数据的播放异常时,校正第二音频行为信息以修复异常播放。 Step 708, when the playback of the audio data is abnormal, correct the second audio behavior information to repair the abnormal playback.
上述步骤702-步骤708与前述实施例中步骤302-步骤308一一对应,在此,不再赘述。The above steps 702 to 708 correspond to steps 302 to 308 in the foregoing embodiment, and will not be repeated here.
步骤710,获取校正第二音频行为信息的校正数据,并对校正数据进行上报存储处理。Step 710: Obtain correction data correcting the second audio behavior information, and report and store the correction data.
电子设备对第二音频行为信息进行校正处理后,可以获取相应的校正数据,该校正数据包括第二音频行为信息的异常信息(通道异常、模式异常、音量异常)、校正时间、校正累积次数、目标应用程序的标识、电子设备的身份标识等信息。电子设备可以将获取的校正数据进行上报存储,以统计校正数据,可以证明该音频处理方法的处理效果、处理效率,在后续的音频播放过程中,减小或避免播放异常的情况发生。After the electronic device performs correction processing on the second audio behavior information, it can obtain corresponding correction data, which includes abnormal information of the second audio behavior information (channel abnormality, mode abnormality, volume abnormality), correction time, correction cumulative number of times, Information such as the identity of the target application and the identity of the electronic device. The electronic device can report and store the obtained correction data to statistically correct the data, which can prove the processing effect and processing efficiency of the audio processing method, and reduce or avoid the occurrence of abnormal playback in the subsequent audio playback process.
如图8所示,在一个实施例中,音频处理方法还包括步骤802-步骤808。其中,As shown in FIG. 8, in one embodiment, the audio processing method further includes steps 802 to 808. among them,
步骤802,控制监听模块采集目标应用程序运行时在显示服务中用于设置显示图像的第一显示信息。Step 802: The monitoring module is controlled to collect the first display information used to set the display image in the display service when the target application is running.
在一个实施例中,基于电子设备的操作系统创建监听模块,通过监听模块采集目标应用程序运行时在显示服务中用于设置显示图像的第一显示信息。In one embodiment, a monitoring module is created based on the operating system of the electronic device, and the monitoring module collects the first display information used to set the display image in the display service when the target application is running.
电子设备的监听模块与显示服务之间可以采用binder和socket通信机制进行通信。当目标应用程序运行时,电子设备可以控制监听模块采用binder和socket通信机制向显示服务发送显示获取请求。显示服务根据接收的显示获取请求可以采集用于设置显示该目标应用程序显示图像的第一显示信息。当显示服务采集该第一显示信息后,可采用binder和socket通信机制将采集的第一显示信息反馈给监听模块,以使监听模块获取目标应用程序显示图像时设置的第一显示信息。The binder and socket communication mechanisms can be used for communication between the monitoring module of the electronic device and the display service. When the target application is running, the electronic device can control the monitoring module to send a display acquisition request to the display service using the binder and socket communication mechanisms. The display service may collect the first display information for setting and displaying the target application display image according to the received display acquisition request. After the display service collects the first display information, the binder and socket communication mechanism may be used to feed back the collected first display information to the monitoring module, so that the monitoring module obtains the first display information set when the target application displays the image.
步骤804,当目标应用程序显示图像时,获取电子设备显示图像的第二显示信息。Step 804: When the target application displays the image, obtain second display information of the display image of the electronic device.
步骤806,根据第一显示信息和第一显示信息识别图像的显示是否异常。Step 806: Identify whether the display of the image is abnormal according to the first display information and the first display information.
其中,第一显示信息和第二显示信息均可包括LCD/背光信息、帧率信息、显示尺寸信息、显示亮度信息等。若第一显示信息和第二显示信息中有至少一个信息不一致时,可以认为该图像的显示是异常的。Wherein, both the first display information and the second display information may include LCD/backlight information, frame rate information, display size information, display brightness information, and the like. If at least one of the first display information and the second display information is inconsistent, it may be considered that the display of the image is abnormal.
具体的,可以显示异常的异常类型可包括闪屏异常、黑屏、帧率处理异常、显示画面异常、显示亮度异常等。Specifically, the types of abnormalities that can display abnormalities may include abnormal flash screens, black screens, abnormal frame rate processing, abnormal display screens, abnormal display brightness, and the like.
步骤808,当图像的显示异常时,校正第二显示信息以修复异常显示。 Step 808, when the display of the image is abnormal, correct the second display information to repair the abnormal display.
当图像显示异常时,电子设备可以根据显示异常的异常类型采用不同的策略来校正第二显示信息以修复异常显示。其中,校正策略可包括显示图层的校正处理、显示区域的校正处理、分配泄露的校正处理、亮度调节的校正处理、帧率调节的校正处理等等。When the image display is abnormal, the electronic device may adopt different strategies to correct the second display information to repair the abnormal display according to the type of abnormality displaying the abnormality. Among them, the correction strategy may include the correction processing of the display layer, the correction processing of the display area, the correction processing of the distribution leak, the correction processing of the brightness adjustment, the correction processing of the frame rate adjustment, and so on.
本实施例中,电子设备可以监听图像的显示异常,并对异常的图像显示进行校正处理,以提高电子设备显示图像的稳定性,提高了用户的体验度。In this embodiment, the electronic device can monitor the abnormal display of the image and perform correction processing on the abnormal image display to improve the stability of the image displayed by the electronic device and improve the user experience.
需要说明的是,本实施例中的步骤也可用于上述步骤802-步骤804前或后,以提 高音频输出通道切换过程中播放音频数据的播放质量,提升用户体验。It should be noted that the steps in this embodiment can also be used before or after the above steps 802 to 804 to improve the playback quality of the audio data played during the switching of the audio output channel and the user experience.
应该理解的是,虽然图3-8的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图3-8中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flowcharts of FIGS. 3-8 are sequentially displayed according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless clearly stated in this article, the execution of these steps is not strictly limited in order, and these steps may be executed in other orders. Moreover, at least some of the steps in FIGS. 3-8 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. These sub-steps or stages The execution order of is not necessarily sequential, but may be executed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.
如图9所示,本申请还提供一种音频处理装置,应用于电子设备,装置包括:信息采集模块910、信息获取模块920、异常判读模块930和异常校正模块940。其中,As shown in FIG. 9, the present application also provides an audio processing device, which is applied to an electronic device. The device includes: an information collection module 910, an information acquisition module 920, an abnormality interpretation module 930, and an abnormality correction module 940. among them,
信息采集模块910,用于当目标应用程序运行时,获取音频服务中设置的第一音频行为信息,其中,所述第一音频行为信息为播放所述音频数据的参数信息;The information collection module 910 is configured to obtain first audio behavior information set in an audio service when the target application is running, where the first audio behavior information is parameter information for playing the audio data;
信息获取模块920,用于当目标应用程序播放音频数据时,获取电子设备播放音频数据的第二音频行为信息;The information obtaining module 920 is configured to obtain second audio behavior information of the audio data played by the electronic device when the target application plays the audio data;
异常判读模块930,用于根据第一音频行为信息和第二音频行为信息识别音频数据的播放是否异常;及The abnormality interpretation module 930 is configured to identify whether the playback of the audio data is abnormal according to the first audio behavior information and the second audio behavior information; and
异常校正模块940,用于当音频数据的播放异常时,校正第二音频行为信息以修复异常播放。The abnormality correction module 940 is configured to correct the second audio behavior information to repair abnormal playback when the playback of the audio data is abnormal.
上述音频处理装置,能够当目标应用程序运行时,获取音频服务中设置的第一音频行为信息;当目标应用程序播放音频数据时,获取电子设备播放音频数据的第二音频行为信息;根据第一音频行为信息和第二音频行为信息识别音频数据的播放是否异常;当音频数据的播放异常时,校正第二音频行为信息以修复异常播放,可以监听音频数据播放的异常情况,并使音频数据正常播放,增强音频数据输出的稳定性,提高用户体验。The above audio processing device can obtain the first audio behavior information set in the audio service when the target application is running; when the target application plays audio data, obtain the second audio behavior information of the audio data played by the electronic device; according to the first The audio behavior information and the second audio behavior information identify whether the playback of audio data is abnormal; when the playback of audio data is abnormal, correct the second audio behavior information to repair the abnormal playback, you can monitor the abnormal situation of audio data playback, and make the audio data normal Play, enhance the stability of audio data output, and improve user experience.
在一个实施例中,信息采集模块,包括:In one embodiment, the information collection module includes:
发送单元,用于当目标应用程序运行时,控制监听模块向音频服务发送音频获取请求;其中,音频获取请求用于指示音频服务采集第一音频行为信息;A sending unit, configured to control the listening module to send an audio acquisition request to the audio service when the target application is running; wherein, the audio acquisition request is used to instruct the audio service to collect the first audio behavior information;
接收单元,用于接收音频服务反馈的第一音频行为信息。The receiving unit is configured to receive the first audio behavior information fed back by the audio service.
在一个实施例中,监听模块采用binder和socket通信机制与音频服务进行通信。In one embodiment, the listening module uses binder and socket communication mechanisms to communicate with the audio service.
在一个实施例中,第一音频行为信息和第二音频行为信息均至少包括音频输出通道、音频模式和音量;异常判读模块,,包括:In one embodiment, both the first audio behavior information and the second audio behavior information include at least an audio output channel, an audio mode, and a volume; an abnormality interpretation module includes:
信息获取单元,用于获取目标应用程序的应用信息;The information acquisition unit is used to acquire application information of the target application program;
异常确定单元,用于根据应用信息和第一音频行为信息确定第二音频行为信息是否异常;An abnormality determining unit, configured to determine whether the second audio behavior information is abnormal according to the application information and the first audio behavior information;
播放异常单元,用于若第二音频行为信息异常,则音频数据的播放异常。The playback abnormality unit is configured to play abnormal audio data if the second audio behavior information is abnormal.
在一个实施例中,异常确定单元,还用于根据应用信息确定第一音频行为信息和第二音频行为信息中音频输出通道、音频模式和音量的判定顺序;根据判定顺序判断 第一音频行为信息和第二音频行为信息是否一致;若音频输出通道、音频模式和音量中任意一个不一致时,则第二音频行为信息异常。In one embodiment, the abnormality determining unit is further used to determine the order of determining the audio output channel, audio mode, and volume in the first audio behavior information and the second audio behavior information according to the application information; determining the first audio behavior information according to the determination order Whether it is consistent with the second audio behavior information; if any one of the audio output channel, audio mode and volume is inconsistent, the second audio behavior information is abnormal.
在本实施例中,电子设备可以根据目标应用程序的应用信息确定第一音频行为信息和第二音频行为信息中音频输出通道、音频模式、音量的判定顺序,提高了第二音频行为信息是否异常的判定效率。In this embodiment, the electronic device may determine the determination order of the audio output channel, the audio mode, and the volume in the first audio behavior information and the second audio behavior information according to the application information of the target application, which improves whether the second audio behavior information is abnormal The efficiency of judgment.
在一个实施例中,异常校正模块包括:In one embodiment, the abnormality correction module includes:
类型获取单元,用于当音频数据播放异常时,根据第二音频行为信息获取异常类型;异常类型包括模式异常、通道异常和音量异常;The type obtaining unit is configured to obtain an abnormal type according to the second audio behavior information when the audio data is abnormally played; the abnormal type includes a mode abnormality, a channel abnormality, and a volume abnormality;
异常校正单元,用于根据异常类型采用预设校正策略以校正第二音频行为信息以修复异常播放。The abnormality correction unit is configured to adopt a preset correction strategy according to the type of abnormality to correct the second audio behavior information to repair abnormal playback.
在一个实施例中,异常校正单元还用于当通道异常时调用预设接口函数来校正第二音频行为信息中异常的音频输出通道以修复异常播放。In one embodiment, the abnormality correction unit is further used to call a preset interface function to correct the abnormal audio output channel in the second audio behavior information when the channel is abnormal to repair abnormal playback.
本实施例中,电子设备可以根据第二音频行为信息来确定播放异常的异常类型,根据不同的异常类型可以自适应的采用相应的校正策略对其进行校正,以提高校正效率,使音频数据能够正常的播放,提高用户体验度。In this embodiment, the electronic device can determine the abnormal type of playback abnormality according to the second audio behavior information, and can adaptively correct it according to different abnormal types, so as to improve the correction efficiency and enable the audio data Normal playback improves user experience.
在一个实施例中,异常校正单元还用于当音频输出通道的耳机通道异常时,调用预设接口函数改变音频数据的耳机通道,以使扬声器通道播放音频数据,或,异常校正单元还用于当音频输出通道的听筒通道异常时,检测电子设备是否连接耳机;当电子设备连接耳机时,改变音频数据的听筒通道,以使耳机通道播放音频数据;当电子设备未连接耳机时,改变音频数据的听筒通道,以使扬声器通道播放音频数据;或,异常校正单元还用于当音频输出通道的扬声器通道异常时,检测电子设备是否连接耳机;当电子设备连接耳机时,改变音频数据的听筒通道,以使耳机通道播放音频数据;当电子设备未连接耳机时,改变音频数据的听筒通道,以使听筒通道播放音频数据。In one embodiment, the abnormality correction unit is also used to call the preset interface function to change the earphone channel of the audio data when the earphone channel of the audio output channel is abnormal, so that the speaker channel plays audio data, or the abnormality correction unit is also used When the earphone channel of the audio output channel is abnormal, detect whether the electronic device is connected to the earphone; when the electronic device is connected to the earphone, change the earphone channel of the audio data to make the earphone channel play audio data; when the electronic device is not connected to the earphone, change the audio data The earphone channel of the speaker channel, so that the speaker channel plays audio data; or, the abnormality correction unit is also used to detect whether the electronic device is connected to the earphone when the speaker channel of the audio output channel is abnormal; when the electronic device is connected to the earphone, change the earphone channel of the audio data To enable the earphone channel to play audio data; when the electronic device is not connected to the earphone, change the earphone channel of the audio data so that the earphone channel plays audio data.
本实施例中,当音频输出通道中的听筒通道出现异常时,电子设备可以根据是否连接耳机的状态,自适应的将其听筒通道切换至符合用户使用场景的音频输出通道,可以提高音频输出的稳定性和用户体验度。当音频输出通道中的扬声器通道出现异常时,电子设备可以根据是否连接耳机的状态,自适应的将其扬声器通道切换至符合用户使用场景的音频输出通道,可以提高音频输出的稳定性和用户体验度。In this embodiment, when the earphone channel in the audio output channel is abnormal, the electronic device can adaptively switch its earphone channel to an audio output channel that matches the user's use scenario according to whether the headset is connected, which can improve the audio output. Stability and user experience. When the speaker channel in the audio output channel is abnormal, the electronic device can adaptively switch its speaker channel to an audio output channel that meets the user's usage scenario according to whether the headset is connected, which can improve the stability of the audio output and the user experience degree.
在一个实施例中,异常校正单元还用于当模式异常时设置模式转换接口,通过模式转换接口对音频模式进行模式转换以校正第二音频行为信息以修复异常播放。In one embodiment, the abnormality correction unit is further configured to set a mode conversion interface when the mode is abnormal, and perform mode conversion on the audio mode through the mode conversion interface to correct the second audio behavior information to repair abnormal playback.
在一个实施例中,异常校正单元还用于当音量异常时,根据模式转换接口对音频模式进行模式转换以校正异常的音频模式;在校正的音频模式下调节音量以校正异常的音量。In one embodiment, the abnormality correction unit is further used to perform mode conversion on the audio mode according to the mode conversion interface to correct the abnormal audio mode when the volume is abnormal; adjust the volume under the corrected audio mode to correct the abnormal volume.
本申请实施例中,电子设备可以根据监听的音频模式异常时,则可以自适应校正该异常的音频模式,使得校正后的音频模式与第一音频行为信息中的音频模式一致,提升了音频数据播放的稳定性,提高了用户体验。In the embodiment of the present application, the electronic device can adaptively correct the abnormal audio mode according to the monitored audio mode is abnormal, so that the corrected audio mode is consistent with the audio mode in the first audio behavior information, which improves the audio data The stability of playback improves the user experience.
在一个实施例中,装置进一步包括:In one embodiment, the device further includes:
数据获取模块,用于获取校正第二音频行为信息的校正数据,并对校正数据进行上报存储处理。The data acquisition module is used to acquire correction data for correcting the second audio behavior information, and report and store the correction data.
电子设备可以将获取的校正数据进行上报存储,以统计校正数据,可以证明该音频处理方法的处理效果、处理效率,在后续的音频播放过程中,减小或避免播放异常的情况发生。The electronic device can report and store the obtained correction data to statistically correct the data, which can prove the processing effect and processing efficiency of the audio processing method, and reduce or avoid the occurrence of abnormal playback in the subsequent audio playback process.
在一个实施例中,其中,In one embodiment, wherein,
信息采集模块,还用于控制监听模块采集目标应用程序运行时在显示服务中用于设置显示图像的第一显示信息;The information collection module is also used to control the monitoring module to collect the first display information used to set the display image in the display service when the target application is running;
信息获取模块,还用于当目标应用程序显示图像时,获取电子设备显示图像的第二显示信息;The information acquisition module is also used to acquire the second display information of the display image of the electronic device when the target application displays the image;
异常判读模块,还用于根据第一显示信息和第一显示信息识别图像的显示是否异常;及The abnormality interpretation module is also used to identify whether the display of the image is abnormal based on the first display information and the first display information; and
异常校正模块,还用于当图像的显示时,校正第二显示信息以修复异常显示。The abnormality correction module is also used to correct the second display information to repair the abnormal display when the image is displayed.
本实施例中,电子设备可以监听图像的显示异常,并对异常的图像显示进行校正处理,以提高电子设备显示图像的稳定性,提高了用户的体验度。In this embodiment, the electronic device can monitor the abnormal display of the image and perform correction processing on the abnormal image display to improve the stability of the image displayed by the electronic device and improve the user experience.
上述音频处理装置中各个模块的划分仅用于举例说明,在其他实施例中,可将音频处理装置按照需要划分为不同的模块,以完成上述音频处理装置的全部或部分功能。The division of each module in the above audio processing device is for illustration only. In other embodiments, the audio processing device may be divided into different modules as needed to complete all or part of the functions of the above audio processing device.
上述音频处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于电子设备中的处理器中,也可以以软件形式存储于电子设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。Each module in the above audio processing device may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in the hardware or independent of the processor in the electronic device, or may be stored in the memory in the electronic device in the form of software so that the processor can call and execute the operations corresponding to the above modules.
本申请实施例还提供了一种计算机可读存储介质。一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当计算机可执行指令被一个或多个处理器执行时,使得处理器执行以下音频处理方法的步骤:The embodiments of the present application also provide a computer-readable storage medium. One or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, cause the processor to perform the following steps of the audio processing method:
控制监听模块采集目标应用程序运行时在音频服务中用于设置播放音频数据的第一音频行为信息;Controlling the monitoring module to collect the first audio behavior information used to set the playing audio data in the audio service when the target application is running;
当所述目标应用程序播放所述音频数据时,获取所述电子设备播放所述音频数据的第二音频行为信息;When the target application plays the audio data, obtain second audio behavior information of the electronic device playing the audio data;
根据所述第一音频行为信息和第二音频行为信息识别所述音频数据的播放是否异常;Identifying whether the playback of the audio data is abnormal according to the first audio behavior information and the second audio behavior information;
当所述音频数据的播放异常时,校正所述第二音频行为信息以修复异常播放。When the playback of the audio data is abnormal, the second audio behavior information is corrected to repair the abnormal playback.
需要说明的是,一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当计算机可执行指令被一个或多个处理器执行时,还可以使得处理器执行上述任一实施例中的音频处理方法。It should be noted that one or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, may also cause the processor to perform any of the foregoing implementations Example audio processing method.
一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行音频处理方法的步骤:A computer program product containing instructions that, when run on a computer, causes the computer to perform the steps of the audio processing method:
控制监听模块采集目标应用程序运行时在音频服务中用于设置播放音频数据的第一音频行为信息;Controlling the monitoring module to collect the first audio behavior information used to set the playing audio data in the audio service when the target application is running;
当所述目标应用程序播放所述音频数据时,获取所述电子设备播放所述音频数据的第二音频行为信息;When the target application plays the audio data, obtain second audio behavior information of the electronic device playing the audio data;
根据所述第一音频行为信息和第二音频行为信息识别所述音频数据的播放是否异常;Identifying whether the playback of the audio data is abnormal according to the first audio behavior information and the second audio behavior information;
当所述音频数据的播放异常时,校正所述第二音频行为信息以修复异常播放。When the playback of the audio data is abnormal, the second audio behavior information is corrected to repair the abnormal playback.
需要说明的是,一种包含指令的计算机程序产品,当其在计算机上运行时使得计算机执行上述任一实施例中的音频处理方法的步骤。It should be noted that a computer program product containing instructions, when run on a computer, causes the computer to perform the steps of the audio processing method in any of the above embodiments.
本申请实施例还提供了一种电子设备。如图10所示,为了便于说明,仅示出了与本申请实施例相关的部分,具体技术细节未揭示的,请参照本申请实施例方法部分。该电子设备可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑、穿戴式设备等具有语音通话功能并具有扬声器的任意终端设备,以电子设备为手机为例:An embodiment of the present application also provides an electronic device. As shown in FIG. 10, for ease of description, only parts related to the embodiments of the present application are shown, and specific technical details are not disclosed, please refer to the method part of the embodiments of the present application. The electronic device may be any terminal device with a voice call function and a speaker, including mobile phones, tablet computers, PDA (Personal Digital Assistant), POS (Point of Sales), in-vehicle computers, wearable devices, etc. , Taking an electronic device as a mobile phone as an example:
图10为与本申请实施例提供的电子设备相关的手机的部分结构的框图。参考图10,手机包括:射频(Radio Frequency,RF)电路1010、存储器1020、输入单元1030、显示单元1040、传感器1050、音频电路1060、无线保真(wireless fidelity,WiFi)模块1070、处理器1080、以及电源1090等部件。本领域技术人员可以理解,图10所示的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。10 is a block diagram of a partial structure of a mobile phone related to an electronic device provided by an embodiment of the present application. Referring to FIG. 10, the mobile phone includes: a radio frequency (Radio Frequency) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, and a processor 1080 , And power supply 1090 and other components. Those skilled in the art may understand that the structure of the mobile phone shown in FIG. 10 does not constitute a limitation on the mobile phone, and may include more or fewer components than those shown in the figure, or a combination of certain components, or a different component arrangement.
其中,RF电路1010可用于收发信息或通话过程中,信号的接收和发送,可将基站的下行信息接收后,给处理器1080处理;也可以将上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路1010还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE))、电子邮件、短消息服务(Short Messaging Service,SMS)等。Among them, the RF circuit 1010 can be used to receive and send signals during sending and receiving information or during a call. It can receive the downlink information of the base station and process it to the processor 1080; it can also send the uplink data to the base station. Generally, the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 1010 can also communicate with other devices via a wireless communication network. The above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile (GSM), General Packet Radio Service (GPRS), and Code Division Multiple Access Multiple Access (CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (LTE), e-mail, Short Message Service (SMS), etc.
存储器1020可用于存储软件程序以及模块,处理器1080通过运行存储在存储器1020的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器1020可主要包括程序存储区和数据存储区,其中,程序存储区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能的应用程序、图像播放功能的应用程序等)等;数据存储区可存储根据手机的使用所创建的数据(比如音频数据、通讯录等)等。此外,存储器1020可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 1020 may be used to store software programs and modules. The processor 1080 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 1020. The memory 1020 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system and at least one function-required application program (such as a sound playback function application program, an image playback function application program, etc.), etc.; The data storage area can store data (such as audio data, address book, etc.) created according to the use of the mobile phone. In addition, the memory 1020 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
输入单元1030可用于接收输入的数字或字符信息,以及产生与手机1000的用户设置以及功能控制有关的键信号输入。具体地,输入单元1030可包括触控面板1031 以及其他输入设备1032。触控面板1031,也可称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1031上或在触控面板1031附近的操作),并根据预先设定的程式驱动相应的连接装置。在一个实施例中,触控面板1031可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器1080,并能接收处理器1080发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1031。除了触控面板1031,输入单元1030还可以包括其他输入设备1032。具体地,其他输入设备1032可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)等中的一种或多种。The input unit 1030 may be used to receive input numeric or character information, and generate key signal input related to user settings and function control of the mobile phone 1000. Specifically, the input unit 1030 may include a touch panel 1031 and other input devices 1032. The touch panel 1031, also known as a touch screen, can collect user's touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc. on the touch panel 1031 or near the touch panel 1031 Operation), and drive the corresponding connection device according to the preset program. In one embodiment, the touch panel 1031 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into contact coordinates, and then sends To the processor 1080, and can receive the commands sent by the processor 1080 and execute them. In addition, the touch panel 1031 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 1031, the input unit 1030 may also include other input devices 1032. Specifically, the other input devices 1032 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.).
显示单元1040可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元1040可包括显示面板1041。在一个实施例中,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板1041。在一个实施例中,触控面板1031可覆盖显示面板1041,当触控面板1031检测到在其上或附近的触摸操作后,传送给处理器1080以确定触摸事件的类型,随后处理器1080根据触摸事件的类型在显示面板1041上提供相应的视觉输出。虽然在图10中,触控面板1031与显示面板1041是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板1031与显示面板1041集成而实现手机的输入和输出功能。The display unit 1040 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 1040 may include a display panel 1041. In one embodiment, the display panel 1041 may be configured in the form of a liquid crystal display (Liquid Crystal) (LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like. In one embodiment, the touch panel 1031 may cover the display panel 1041, and when the touch panel 1031 detects a touch operation on or near it, it is transmitted to the processor 1080 to determine the type of touch event, and then the processor 1080 according to The type of touch event provides a corresponding visual output on the display panel 1041. Although in FIG. 10, the touch panel 1031 and the display panel 1041 are implemented as two independent components to realize the input and input functions of the mobile phone, in some embodiments, the touch panel 1031 and the display panel 1041 may be integrated to Realize the input and output functions of the mobile phone.
手机1000还可包括至少一种传感器1050,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1041的亮度,接近传感器可在手机移动到耳边时,关闭显示面板1041和/或背光。运动传感器可包括加速度传感器,通过加速度传感器可检测各个方向上加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换)、振动识别相关功能(比如计步器、敲击)等;此外,手机还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器等。The mobile phone 1000 may further include at least one sensor 1050, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1041 according to the brightness of the ambient light, and the proximity sensor may close the display panel 1041 and/or when the mobile phone moves to the ear Or backlight. The motion sensor may include an acceleration sensor. The acceleration sensor can detect the magnitude of acceleration in various directions, and can detect the magnitude and direction of gravity when at rest. It can be used for applications that recognize mobile phone gestures (such as horizontal and vertical screen switching), and vibration recognition-related functions (such as Pedometer, percussion, etc.; in addition, the mobile phone can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc.
音频电路1060、扬声器1061和传声器1062可提供用户与手机之间的音频接口。音频电路1060可将接收到的音频数据转换后的电信号,传输到扬声器1061,由扬声器1061转换为声音信号输出;另一方面,传声器1062将收集的声音信号转换为电信号,由音频电路1060接收后转换为音频数据,再将音频数据输出处理器1080处理后,经RF电路1010可以发送给另一手机,或者将音频数据输出至存储器1020以便后续处理。The audio circuit 1060, the speaker 1061, and the microphone 1062 may provide an audio interface between the user and the mobile phone. The audio circuit 1060 can transmit the converted electrical signal of the received audio data to the speaker 1061, which converts the speaker 1061 into a sound signal output; on the other hand, the microphone 1062 converts the collected sound signal into an electrical signal, which After receiving, it is converted into audio data, and then processed by the audio data output processor 1080, and then sent to another mobile phone through the RF circuit 1010, or the audio data is output to the memory 1020 for subsequent processing.
WiFi属于短距离无线传输技术,手机通过WiFi模块1070可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图10示出了WiFi模块1070,但是可以理解的是,其并不属于手机1000的必须构成,可以根据需要而省略。WiFi is a short-distance wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 1070. It provides users with wireless broadband Internet access. Although FIG. 10 shows the WiFi module 1070, it can be understood that it is not a necessary component of the mobile phone 1000, and may be omitted as needed.
处理器1080是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器1020内的软件程序和/或模块,以及调用存储在存储器 1020内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。在一个实施例中,处理器1080可包括一个或多个处理单元。在一个实施例中,处理器1080可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等;调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1080中。The processor 1080 is the control center of the mobile phone, and uses various interfaces and lines to connect the various parts of the entire mobile phone, by running or executing the software programs and/or modules stored in the memory 1020, and calling the data stored in the memory 1020 to execute Various functions and processing data of the mobile phone, so as to monitor the mobile phone as a whole. In one embodiment, the processor 1080 may include one or more processing units. In one embodiment, the processor 1080 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application program, and the like; the modem processor mainly processes wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 1080.
手机1000还包括给各个部件供电的电源1090(比如电池),优选的,电源可以通过电源管理系统与处理器1080逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile phone 1000 also includes a power supply 1090 (such as a battery) for powering various components. Preferably, the power supply can be logically connected to the processor 1080 through a power management system, so as to realize functions such as charging, discharging, and power consumption management through the power management system.
在一个实施例中,手机1000还可以包括摄像头、蓝牙模块等。In one embodiment, the mobile phone 1000 may further include a camera, a Bluetooth module, and the like.
在本申请实施例中,该电子设备所包括的处理器1080执行存储在存储器上的计算机程序时实现以下步骤:In the embodiment of the present application, the processor 1080 included in the electronic device implements the following steps when executing the computer program stored on the memory:
控制监听模块采集目标应用程序运行时在音频服务中用于设置播放音频数据的第一音频行为信息;Controlling the monitoring module to collect the first audio behavior information used to set the playing audio data in the audio service when the target application is running;
当所述目标应用程序播放所述音频数据时,获取所述电子设备播放所述音频数据的第二音频行为信息;When the target application plays the audio data, obtain second audio behavior information of the electronic device playing the audio data;
根据所述第一音频行为信息和第二音频行为信息识别所述音频数据的播放是否异常;Identifying whether the playback of the audio data is abnormal according to the first audio behavior information and the second audio behavior information;
当所述音频数据的播放异常时,校正所述第二音频行为信息以修复异常播放。When the playback of the audio data is abnormal, the second audio behavior information is corrected to repair the abnormal playback.
需要说明的是,一种电子设备,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述指令被所述处理器执行时,使得所述处理器执行上述任一实施例中的音频处理方法的步骤。It should be noted that an electronic device includes a memory and a processor, and the memory stores computer-readable instructions, and when the instructions are executed by the processor, the processor is caused to execute any of the foregoing embodiments Steps of the audio processing method.
本申请所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。合适的非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM),它用作外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDR SDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)。Any references to memory, storage, databases, or other media used in this application may include non-volatile and/or volatile memory. Suitable non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-mentioned embodiments can be arbitrarily combined. To simplify the description, all possible combinations of the technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, All should be considered within the scope of this description.
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above examples only express several implementations of the present invention, and their descriptions are more specific and detailed, but they should not be construed as limiting the patent scope of the invention. It should be noted that, for a person of ordinary skill in the art, without departing from the concept of the present invention, a number of modifications and improvements can also be made, which all fall within the protection scope of the present invention. Therefore, the protection scope of the invention patent shall be subject to the appended claims.

Claims (17)

  1. 一种音频处理方法,应用于电子设备,所述方法包括:An audio processing method applied to electronic equipment, the method includes:
    当目标应用程序运行时,获取音频服务中设置的第一音频行为信息,其中,所述第一音频行为信息为播放所述音频数据的参数信息;When the target application is running, obtain first audio behavior information set in an audio service, where the first audio behavior information is parameter information for playing the audio data;
    当所述目标应用程序播放所述音频数据时,获取所述电子设备播放所述音频数据的第二音频行为信息;When the target application plays the audio data, obtain second audio behavior information of the electronic device playing the audio data;
    根据所述第一音频行为信息和第二音频行为信息识别所述音频数据的播放是否异常;Identifying whether the playback of the audio data is abnormal according to the first audio behavior information and the second audio behavior information;
    当所述音频数据的播放异常时,校正所述第二音频行为信息以修复异常播放。When the playback of the audio data is abnormal, the second audio behavior information is corrected to repair the abnormal playback.
  2. 根据权利要求1所述的方法,其中,所述当目标应用程序运行时,获取音频服务中设置的第一音频行为信息,包括:The method according to claim 1, wherein, when the target application is running, acquiring the first audio behavior information set in the audio service includes:
    当所述目标应用程序运行时,控制监听模块向音频服务发送音频获取请求;其中,所述音频获取请求用于指示所述音频服务采集所述第一音频行为信息;When the target application is running, control the monitoring module to send an audio acquisition request to an audio service; wherein the audio acquisition request is used to instruct the audio service to collect the first audio behavior information;
    接收所述音频服务反馈的所述第一音频行为信息。Receiving the first audio behavior information fed back by the audio service.
  3. 根据权利要求2所述的方法,其中,所述监听模块采用binder和socket通信机制与所述音频服务进行通信。The method according to claim 2, wherein the monitoring module uses binder and socket communication mechanisms to communicate with the audio service.
  4. 根据权利要求1所述的方法,其中,所述第一音频行为信息和所述第二音频行为信息均至少包括音频输出通道、音频模式和音量;所述根据所述第一音频行为信息和第二音频行为信息识别所述音频数据的播放是否异常,包括:The method according to claim 1, wherein the first audio behavior information and the second audio behavior information each include at least an audio output channel, an audio mode, and a volume; the first audio behavior information and the first The second audio behavior information identifies whether the audio data is abnormally played, including:
    获取所述目标应用程序的应用信息;Obtaining application information of the target application program;
    根据所述应用信息和所述第一音频行为信息确定所述第二音频行为信息是否异常;Determine whether the second audio behavior information is abnormal according to the application information and the first audio behavior information;
    若所述第二音频行为信息异常,则所述音频数据的播放异常。If the second audio behavior information is abnormal, the playback of the audio data is abnormal.
  5. 根据权利要求4所述的方法,其中,所述根据所述应用信息和所述第一音频行为信息确定所述第二音频行为信息是否异常,包括:The method according to claim 4, wherein the determining whether the second audio behavior information is abnormal according to the application information and the first audio behavior information includes:
    根据所述应用信息确定所述第一音频行为信息和所述第二音频行为信息中所述音频输出通道、音频模式和音量的判定顺序;Determine the determination order of the audio output channel, audio mode, and volume in the first audio behavior information and the second audio behavior information according to the application information;
    根据所述判定顺序判断所述第一音频行为信息和所述第二音频行为信息是否一致;Determine whether the first audio behavior information and the second audio behavior information are consistent according to the determination order;
    若所述音频输出通道、音频模式和音量中任意一个不一致时,则所述第二音频行为信息异常。If any one of the audio output channel, audio mode and volume is inconsistent, the second audio behavior information is abnormal.
  6. 根据权利要求4所述的方法,其中,所述当所述音频数据的播放异常时,校正所述第二音频行为信息以修复异常播放,包括:The method according to claim 4, wherein, when the playback of the audio data is abnormal, correcting the second audio behavior information to repair the abnormal playback includes:
    当所述音频数据播放异常时,根据所述第二音频行为信息获取所述异常类型;所述异常类型包括模式异常、通道异常和音量异常;When the playback of the audio data is abnormal, the abnormal type is obtained according to the second audio behavior information; the abnormal type includes an abnormal mode, an abnormal channel, and an abnormal volume;
    根据所述异常类型采用预设校正策略以校正所述第二音频行为信息以修复异常播放。A preset correction strategy is adopted according to the abnormal type to correct the second audio behavior information to repair abnormal playback.
  7. 根据权利要求6所述的方法,其中,所述根据所述异常类型采用相应的校正策略以校正所述第二音频行为信息以修复异常播放,包括:The method according to claim 6, wherein the adopting a corresponding correction strategy according to the abnormal type to correct the second audio behavior information to repair abnormal playback includes:
    当所述通道异常时调用预设接口函数来校正所述第二音频行为信息中异常的音频输出通道以修复异常播放。When the channel is abnormal, the preset interface function is called to correct the abnormal audio output channel in the second audio behavior information to repair the abnormal playback.
  8. 根据权利要求7所述的方法,其中,所述当所述通道异常时调用来校正所述第二音频行为信息中异常的音频输出通道以修复异常播放,包括:The method according to claim 7, wherein the call to correct the abnormal audio output channel in the second audio behavior information to repair abnormal playback when the channel is abnormal includes:
    当所述音频输出通道的耳机通道异常时,调用所述预设接口函数改变所述音频数据的耳机通道,以使所述扬声器通道播放所述音频数据。When the earphone channel of the audio output channel is abnormal, the preset interface function is called to change the earphone channel of the audio data, so that the speaker channel plays the audio data.
  9. 根据权利要求7所述的方法,其中,所述当所述通道异常时调用来校正所述第二音频行为信息中异常的音频输出通道以修复异常播放,包括:The method according to claim 7, wherein the call to correct the abnormal audio output channel in the second audio behavior information to repair abnormal playback when the channel is abnormal includes:
    当所述音频输出通道的听筒通道异常时,检测所述电子设备是否连接耳机;When the earphone channel of the audio output channel is abnormal, it is detected whether the electronic device is connected to a headset;
    当所述电子设备连接耳机时,改变所述音频数据的听筒通道,以使所述耳机通道播放所述音频数据;When the electronic device is connected with a headset, changing the earphone channel of the audio data, so that the headset channel plays the audio data;
    当所述电子设备未连接耳机时,改变所述音频数据的听筒通道,以使所述扬声器通道播放所述音频数据。When no earphone is connected to the electronic device, the earphone channel of the audio data is changed so that the speaker channel plays the audio data.
  10. 根据权利要求7所述的方法,其中,所述当所述通道异常时调用来校正所述第二音频行为信息中异常的音频输出通道以修复异常播放,包括:The method according to claim 7, wherein the call to correct the abnormal audio output channel in the second audio behavior information to repair abnormal playback when the channel is abnormal includes:
    当所述音频输出通道的扬声器通道异常时,检测所述电子设备是否连接耳机;When the speaker channel of the audio output channel is abnormal, detect whether the electronic device is connected to a headset;
    当所述电子设备连接耳机时,改变所述音频数据的听筒通道,以使所述耳机通道播放所述音频数据;When the electronic device is connected with a headset, changing the earphone channel of the audio data, so that the headset channel plays the audio data;
    当所述电子设备未连接耳机时,改变所述音频数据的听筒通道,以使所述听筒通道播放所述音频数据。When no earphone is connected to the electronic device, the earphone channel of the audio data is changed so that the earphone channel plays the audio data.
  11. 根据权利要求6所述的方法,其中,所述根据所述异常类型采用相应的校正策略以校正所述第二音频行为信息以修复异常播放,包括:The method according to claim 6, wherein the adopting a corresponding correction strategy according to the abnormal type to correct the second audio behavior information to repair abnormal playback includes:
    当所述模式异常时设置模式转换接口,通过所述模式转换接口对所述音频模式进行模式转换以校正所述第二音频行为信息以修复异常播放。When the mode is abnormal, a mode conversion interface is set, and a mode conversion is performed on the audio mode through the mode conversion interface to correct the second audio behavior information to repair abnormal playback.
  12. 根据权利要求11所述的方法,其中,所述根据所述异常类型采用相应的校正策略以校正所述第二音频行为信息以修复异常播放,包括:The method according to claim 11, wherein the adopting a corresponding correction strategy according to the abnormal type to correct the second audio behavior information to repair abnormal playback includes:
    当所述音量异常时,根据所述模式转换接口对所述音频模式进行模式转换以 校正异常的音频模式;When the volume is abnormal, perform mode conversion on the audio mode according to the mode conversion interface to correct the abnormal audio mode;
    在校正的音频模式下调节音量以校正异常的音量。Adjust the volume in the corrected audio mode to correct the abnormal volume.
  13. 根据权利要求1所述的方法,其中,所述方法进一步包括:The method of claim 1, wherein the method further comprises:
    获取校正所述第二音频行为信息的校正数据,并对所述校正数据进行上报存储处理。Obtain correction data correcting the second audio behavior information, and report and store the correction data.
  14. 根据权利要求1所述的方法,其中,所述方法进一步包括:The method of claim 1, wherein the method further comprises:
    控制所述监听模块采集目标应用程序运行时在显示服务中用于设置显示图像的第一显示信息;Controlling the monitoring module to collect the first display information used to set the display image in the display service when the target application is running;
    当所述目标应用程序显示所述图像时,获取所述电子设备显示所述图像的第二显示信息;When the target application displays the image, obtain second display information of the electronic device displaying the image;
    根据所述第一显示信息和第一显示信息识别所述图像的显示是否异常;Identifying whether the display of the image is abnormal according to the first display information and the first display information;
    当所述图像的显示异常时,校正所述第二显示信息以修复异常显示。When the display of the image is abnormal, the second display information is corrected to repair the abnormal display.
  15. 一种音频处理装置,应用于电子设备,所述装置包括:An audio processing device is applied to electronic equipment. The device includes:
    信息采集模块,用于当目标应用程序运行时,获取音频服务中设置的第一音频行为信息,其中,所述第一音频行为信息为播放所述音频数据的参数信息;The information collection module is used to obtain first audio behavior information set in the audio service when the target application is running, wherein the first audio behavior information is parameter information for playing the audio data;
    信息获取模块,用于当所述目标应用程序播放所述音频数据时,获取所述电子设备播放所述音频数据的第二音频行为信息;An information obtaining module, configured to obtain second audio behavior information of the electronic device playing the audio data when the target application plays the audio data;
    异常判读模块,用于根据所述第一音频行为信息和第二音频行为信息识别所述音频数据的播放是否异常;及An abnormality interpretation module, configured to identify whether the playback of the audio data is abnormal according to the first audio behavior information and the second audio behavior information; and
    异常校正模块,用于当所述音频数据的播放异常时,校正所述第二音频行为信息以修复异常播放。The abnormality correction module is configured to correct the second audio behavior information to repair abnormal playback when the playback of the audio data is abnormal.
  16. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至14中任一项所述的音频处理方法的步骤。A computer-readable storage medium on which a computer program is stored, which when executed by a processor implements the steps of the audio processing method according to any one of claims 1 to 14.
  17. 一种电子设备,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述指令被所述处理器执行时,使得所述处理器执行如权利要求1至14中任一项所述的音频处理方法。An electronic device includes a memory and a processor, and the memory stores computer-readable instructions, and when the instructions are executed by the processor, the processor is caused to perform as described in any one of claims 1 to 14. The audio processing method described.
PCT/CN2018/122613 2018-12-21 2018-12-21 Audio processing method and apparatus, computer readable storage medium, and electronic device WO2020124541A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880099587.2A CN113168303A (en) 2018-12-21 2018-12-21 Audio processing method and device, computer readable storage medium and electronic equipment
PCT/CN2018/122613 WO2020124541A1 (en) 2018-12-21 2018-12-21 Audio processing method and apparatus, computer readable storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/122613 WO2020124541A1 (en) 2018-12-21 2018-12-21 Audio processing method and apparatus, computer readable storage medium, and electronic device

Publications (1)

Publication Number Publication Date
WO2020124541A1 true WO2020124541A1 (en) 2020-06-25

Family

ID=71101013

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/122613 WO2020124541A1 (en) 2018-12-21 2018-12-21 Audio processing method and apparatus, computer readable storage medium, and electronic device

Country Status (2)

Country Link
CN (1) CN113168303A (en)
WO (1) WO2020124541A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114121050A (en) * 2021-11-30 2022-03-01 云知声智能科技股份有限公司 Audio playing method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677714A (en) * 2013-12-09 2014-03-26 联想(北京)有限公司 Information processing method and electronic equipment
CN104966521A (en) * 2015-06-12 2015-10-07 广东小天才科技有限公司 Method and apparatus for adjusting play mode of music
CN106126175A (en) * 2016-06-16 2016-11-16 广东欧珀移动通信有限公司 The control method of a kind of sound effect parameters and mobile terminal
CN106453946A (en) * 2016-11-15 2017-02-22 维沃移动通信有限公司 Method for regulating output volume and mobile terminal
CN106648525A (en) * 2016-10-20 2017-05-10 广州视源电子科技股份有限公司 Automatic gain control method and apparatus for audio signal
CN107562405A (en) * 2017-08-18 2018-01-09 广东欧珀移动通信有限公司 Audio play control method, device and storage medium and mobile terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2658119B1 (en) * 2012-04-26 2014-06-11 BlackBerry Limited Apparatus and method pertaining to volume control
CN106170034B (en) * 2016-06-16 2018-07-06 广东欧珀移动通信有限公司 A kind of sound effect treatment method and mobile terminal
CN106534497A (en) * 2016-10-31 2017-03-22 努比亚技术有限公司 Method of adaptively switching sound effect output channels and terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677714A (en) * 2013-12-09 2014-03-26 联想(北京)有限公司 Information processing method and electronic equipment
CN104966521A (en) * 2015-06-12 2015-10-07 广东小天才科技有限公司 Method and apparatus for adjusting play mode of music
CN106126175A (en) * 2016-06-16 2016-11-16 广东欧珀移动通信有限公司 The control method of a kind of sound effect parameters and mobile terminal
CN106648525A (en) * 2016-10-20 2017-05-10 广州视源电子科技股份有限公司 Automatic gain control method and apparatus for audio signal
CN106453946A (en) * 2016-11-15 2017-02-22 维沃移动通信有限公司 Method for regulating output volume and mobile terminal
CN107562405A (en) * 2017-08-18 2018-01-09 广东欧珀移动通信有限公司 Audio play control method, device and storage medium and mobile terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114121050A (en) * 2021-11-30 2022-03-01 云知声智能科技股份有限公司 Audio playing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113168303A (en) 2021-07-23

Similar Documents

Publication Publication Date Title
CN108430003B (en) Sound effect compensation method and device, readable storage medium and terminal
CN108391205B (en) Left and right channel switching method and device, readable storage medium and terminal
WO2020107290A1 (en) Audio output control method and apparatus, computer readable storage medium, and electronic device
WO2018103492A1 (en) Method for setting wifi roaming, and terminal device
US11625144B2 (en) Method for displaying different application shortcuts on different screens
US10805708B2 (en) Headset sound channel control method and system, and related device
WO2021204045A1 (en) Audio control method and electronic device
US20190317841A1 (en) Method for prompting message in terminal and terminal
WO2021036711A1 (en) Network control method and related product
CN108541080B (en) Method for realizing loop connection between first electronic equipment and second electronic equipment and related product
US20200174741A1 (en) Audio Playing Method and Electronic Device
US20200092476A1 (en) Mobile terminal-based dual camera power supply control method, system and mobile terminal
US10728718B2 (en) Incoming call processing method, user equipment, and storage medium
RU2748612C1 (en) Method for determining ue capabilities, method for transmitting information about ue capabilities, mobile subscriber equipment and server
WO2019184859A1 (en) Method for reporting ue capabilities, detection method, mobile terminal and server
WO2020073852A1 (en) Display control method and related product
WO2021129835A1 (en) Volume control method and device, and computer-readable storage medium
WO2020097927A1 (en) Call control method and device, computer-readable storage medium and electronic device
JP7367199B2 (en) Wireless capability identifier transmission method, terminal equipment and network node
JP2022512218A (en) Electromagnetic interference control methods and related products
WO2018049969A1 (en) Hotspot establishment method and related device
WO2020118496A1 (en) Audio path switching method and device, readable storage medium and electronic equipment
CN105786439A (en) Method and device for controlling sound in terminal
WO2020124541A1 (en) Audio processing method and apparatus, computer readable storage medium, and electronic device
CN108377298B (en) Method and device for switching answering mode, mobile terminal and computer readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18943449

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 031121)

122 Ep: pct application non-entry in european phase

Ref document number: 18943449

Country of ref document: EP

Kind code of ref document: A1