WO2020103070A1 - Method and apparatus for processing application program, and electronic device - Google Patents

Method and apparatus for processing application program, and electronic device

Info

Publication number
WO2020103070A1
WO2020103070A1 PCT/CN2018/116894 CN2018116894W WO2020103070A1 WO 2020103070 A1 WO2020103070 A1 WO 2020103070A1 CN 2018116894 W CN2018116894 W CN 2018116894W WO 2020103070 A1 WO2020103070 A1 WO 2020103070A1
Authority
WO
WIPO (PCT)
Prior art keywords
application program
electronic device
call
application
behavior
Prior art date
Application number
PCT/CN2018/116894
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 PCT/CN2018/116894 priority Critical patent/WO2020103070A1/en
Priority to CN201880098195.4A priority patent/CN113039516A/en
Publication of WO2020103070A1 publication Critical patent/WO2020103070A1/en

Links

Images

Classifications

    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/725Cordless telephones

Definitions

  • This application relates to the field of information technology, and in particular, to a method, device, electronic device, and computer-readable storage medium for processing application programs.
  • An embodiment of the present application provides a method for processing an application program, including:
  • the application program is processed.
  • An embodiment of the present application provides an apparatus for processing an application program, including:
  • a first monitoring module configured to monitor the call behavior of the electronic device to determine the call status of the electronic device
  • a second monitoring module configured to monitor the audio playback behavior of the application in the electronic device to determine the audio output state of the electronic device if it is determined that the electronic device is in the hung-up state;
  • the analysis module is configured to analyze the playing behavior of the application program to determine whether the application program is abnormally played if it is determined that the electronic device outputs audio when the electronic device is in the hung-up state;
  • the processing module is configured to process the application program if it is determined that the application program is abnormally played.
  • An embodiment of the present application further provides an electronic device, including a memory and a processor, and the memory stores a computer program, wherein when the computer program is executed by the processor, the processor is caused to execute:
  • the application program is processed.
  • Embodiments of the present application also provide a computer non-volatile readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of processing the application program as described above are realized.
  • the application program is processed according to the call state of the electronic device and the audio playback behavior of the application program, which solves the problem of abnormal audio playback of the application program and improves the user experience.
  • FIG. 1 is a flowchart of a method for processing an application program according to an embodiment
  • FIG. 2 is a schematic structural diagram of an apparatus for processing an application according to an embodiment
  • FIG. 3 is a schematic diagram of the internal structure of an electronic device in an embodiment
  • FIG. 4 is a block diagram of a partial structure of an electronic device related to a computer device provided by an embodiment of the present application.
  • first”, “second”, etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element.
  • the first monitoring module may be referred to as the second monitoring module, and similarly, the second monitoring module may be referred to as the first monitoring module. Both the first monitoring module and the second monitoring module are monitoring modules, but they are not the same monitoring module.
  • an embodiment of the present application provides a method for processing an application program, which is applied to an electronic device.
  • the method includes:
  • the electronic device can monitor the voice signal of the call in real time, determine whether the call hangup event is triggered according to the detected voice signal, and determine the electronic device when the call hangup event is triggered Hang up.
  • the electronic device detects in real time whether a voice signal is transmitted in the audio channel of the current electronic device, and the voice signal includes a voice signal input from a microphone of the current electronic device and a voice signal sent by the other party from the network side.
  • the voice signal includes a voice signal input from a microphone of the current electronic device and a voice signal sent by the other party from the network side.
  • the first preset time may be 30s, 1 minute, or 2 minutes.
  • the specific duration is determined according to actual conditions, and this embodiment is not limited.
  • the terminal monitors the voice signal of the call in real time. If the voice signal is not monitored within the first preset time, the terminal determines that the call hang up event is triggered, which means that both parties of the call have forgotten to hang up the phone. Hanging up the phone solves the problem of wasting resources caused by both parties forgetting to hang up.
  • the electronic device may also record the audio behavior of all applications in the electronic device to form a log record, and the log record may include: playback records and audio of all application programs in the electronic device
  • mode adjustment behavior recording or recording behavior recording for example, may only record playback recording, or only record audio mode adjustment behavior, or a combination of multiple recordings, the specific combination form is not limited.
  • a service with a monitoring and recording function is started to obtain the running information of all application programs in the electronic device in real time and record it.
  • the monitoring service that is started monitors the operation information of storm video in real time and records it to form a log record.
  • the log record can include the playback record of storm video and audio, and the audio mode adjustment behavior Recording and / or recording behavior records.
  • the playback record may include various types of time such as the time taken by Storm Storm to occupy resources in the background, the time it takes to release resources in the background, the time it takes to occupy resources at the foreground, and the time it takes to release resources at the foreground, which is not specifically limited here.
  • the playback record corresponding to each type may include multiple logs, and each log may include a time pair.
  • the time pair the time when the storm video is played once can be calculated.
  • the time for storm video to occupy resources at the front desk is 10:10; the time to release resources at the front desk is 11:00.
  • the time for occupying resources in the background is 13:20; the time for releasing resources in the background is 14:00.
  • Storm Video was played twice in the foreground, the first time was from 10:10 to 11:00, played for 50 minutes, and the second time was from 13:20 to 14:00, played 40 minute.
  • the log records corresponding to all application programs in the electronic device can be stored in the memory of the electronic device in the form of a database, and the log records can be accessed through internal instructions when needed to determine the log records corresponding to the application programs .
  • the monitoring of the playback behavior of the application program may specifically be that the electronic device monitors the creation and release of audio resources through the service at the application layer to obtain the audio playback behavior of the application program.
  • the application layer of the mobile phone monitors the creation and release of audio resources through a service, and obtains the audio output of the audio resources. If it is detected that the application creates an audio resource, the application starts playing. In addition, the corresponding time is recorded when the audio resource is created and the audio resource is released, and the time that the application occupies the audio resource is calculated according to the time difference between the creation of the audio resource and the release of the audio resource, which is the time that the application plays audio.
  • the electronic device can also monitor the audio playback behavior of the application through the built-in monitoring function.
  • a system-level monitoring can be created at the system framework layer (native / framework layer)
  • the module monitors the audio playback behavior of the application program through the monitoring module, or independently creates a monitoring process and monitors the audio playback behavior of the application program through a message transmission mechanism.
  • system_server system service program
  • the electronic device determines that the call is in the hang-up state, it further monitors whether the application in the electronic device has audio output, and if it is detected that the electronic device is in the hang-up state and outputs audio, the audio playback behavior of the application is obtained,
  • the audio playback behavior may include the running time of the application program and the audio resources occupied during the operation. According to the audio playback behavior of the application program, determine whether the application program has a playback record before the call, if not, determine that the application program is abnormal Play.
  • each application may carry identification information, and the identification information refers to information that can be used to uniquely identify the application, for example, it may be the package name or number of the application. You can find the application in the log record based on the identification information of the application.
  • the audio playback behavior may include the playback record of the application recorded in the log record. First, look up the playback record corresponding to the application program through log records, and determine whether the application program has a playback record before an incoming call according to the playback record to determine that the application program is abnormally played.
  • mapping table can be stored in the memory of the electronic device in the form of a database, and the mapping table can be accessed through internal instructions when it is called to determine the audio playback record corresponding to the application.
  • the mapping table may be in the form of one-to-one or one-to-many. As described in the above example, in the mapping table, one application corresponds to multiple log records, and the corresponding log records are searched according to the actual needs of the user.
  • the application program After finding the log record corresponding to the application program, it can be determined whether the application program is abnormally played according to the call record, that is, the time of the incoming call and the time when the call is hung up. For example, if the incoming call time for this call is 14:05 and the call hangup time is 14:20, after listening to the call hangup, find out if there is a recording record of Storm Video before 14:05. If the record is empty, it is determined that the broadcast of Baofengyingyin is abnormal. This playback is played without the user's knowledge, and the playback behavior of Baofengyingyin will be dealt with accordingly. If there is a corresponding playback record of Stormwind Video, it is determined that Stormwind Video playback is not abnormal playback. It is considered that the user played Stormwind Video before the call, interrupted normal playback after the call, and automatically played after the call was hung up. At this time, the storm video will not be processed accordingly to make it play normally.
  • the call record that is, the time of the
  • the playing record of the application program within a second preset time before the call is searched according to the mapping table, and whether the application program is abnormally played is determined according to the playing record. For example, if the incoming call time of this call is 14:05 and the call hangup time is 14:20, after listening to the call hangup, find out if there is a recording record of the storm video before 14:05. If the record is empty, it is determined that the broadcast of Baofengyingyin is abnormal. This playback is played without the user's knowledge, and the playback behavior of Baofengyingyin will be dealt with accordingly.
  • the second preset time may be 10s, 30s, 1 minute, etc. The specific duration is determined according to the actual situation, and this embodiment is not limited.
  • the application can be quickly and accurately Analysis of the playing behavior of the program, and then the application program can be processed more effectively to improve the user experience.
  • the application is processed, which may be specifically:
  • a prompt message is issued according to a preset manner, and the prompt message is used to prompt the user to process the application program.
  • the electronic device receives the user's preset operation for the prompt message, the application program is closed or played according to the preset operation.
  • the preset method may be in the form of voice output, pop-up dialog box, etc.
  • a dialog box pops up. It includes the following information: whether to play the A application and the corresponding Yes and No buttons, the user chooses to process the application according to the actual situation, if you click Yes, the A application performs playback, if you click No, the A application closes .
  • a prompt message is issued in a preset manner, and the prompt message is used to prompt the user to process the application program.
  • the electronic device receives the user's preset operation for the prompt message, the application program is closed or played according to the preset operation, so that the application program can be better managed, and the application program is prevented from being played randomly. Problems that enhance the user experience.
  • the call status of the electronic device is determined by monitoring the call behavior of the electronic device; if it is determined that the electronic device is in the hang-up state, the audio playback behavior of the application is monitored to determine the The audio output status of the electronic device; if it is determined that the electronic device has audio output, analyze the audio playback behavior of the application to determine whether the application is abnormally played; if the application is determined to be abnormally played , The application program is processed, which solves the problem of abnormal audio playback of the application program in the prior art and improves the user experience.
  • an embodiment of the present application provides an apparatus 20 for processing an application program.
  • the apparatus includes:
  • the first monitoring module 21 is configured to monitor the call behavior of the electronic device to determine the call status of the electronic device;
  • the first monitoring module 21 can monitor the voice signal of the call in real time, and determine whether the call hang-up event is triggered according to the detected voice signal. When the call hang-up event is triggered, it is determined that the electronic device is hanging up status.
  • the first monitoring module 21 monitors in real time whether a voice signal is transmitted in the audio channel of the current electronic device, the voice signal includes the voice signal input by the microphone of the current electronic device and the counterpart sent from the network side voice signal.
  • a voice signal is monitored, it means that the call is still in progress; if any voice signal is not monitored within the first preset time, or the electronic device receives the user pressing the physical or virtual call end button, this
  • the electronic device determines that the call hang up event is triggered, it is determined that the call is in the hang up state.
  • the first preset time may be 30s, 1 minute, or 2 minutes.
  • the specific duration is determined according to actual conditions, and this embodiment is not limited.
  • the terminal monitors the voice signal of the call in real time. If the voice signal is not monitored within the first preset time, the terminal determines that the call hang up event is triggered, which means that both parties of the call have forgotten to hang up the phone. Hanging up the phone solves the problem of wasting resources caused by both parties forgetting to hang up.
  • the audio behavior of all application programs in the electronic device may also be recorded to form a log record, and the log record may include: playback records and audio of all application programs in the electronic device
  • mode adjustment behavior recording or recording behavior recording for example, may only record playback recording, or only record audio mode adjustment behavior, or a combination of multiple recordings, the specific combination form is not limited.
  • a service with a monitoring and recording function is started to obtain the running information of all application programs in the electronic device in real time and record it.
  • the monitoring service that is started monitors the operation information of storm video in real time and records it to form a log record.
  • the log record can include the playback record of storm video and audio, and the audio mode adjustment behavior Recording and / or recording behavior records.
  • the playback record may include various types of time such as the time taken by storm video to occupy resources in the background, the time released by resources in the background, the time occupied by resources in the foreground, and the time released by resources in the foreground, which are not specifically limited herein.
  • the playback record corresponding to each type may include multiple logs, and each log may include a time pair.
  • the time pair the time when the storm video is played once can be calculated.
  • the time for occupying resources at the front desk is 10:10; the time for releasing resources is 11:00.
  • the time for occupying resources at the front desk is 13:20; the time for releasing resources is 14:00.
  • Storm Video was played twice in the foreground, the first time was from 10:10 to 11:00, played for 50 minutes, and the second time was from 13:20 to 14:00, played 40 minute.
  • the log records corresponding to all application programs in the electronic device can be stored in the memory of the electronic device in the form of a database, and the log records can be accessed through internal instructions when needed to determine the log records corresponding to the application programs .
  • the second monitoring module 22 is configured to, if it is determined that the electronic device is in the hung-up state, monitor the audio playback behavior of the application program in the electronic device to determine the audio output state of the electronic device;
  • the second listening module 22 monitors the playback behavior of the application program may specifically monitor the creation and release of audio resources through the service at the application layer to obtain the audio playback behavior of the application program.
  • the application layer of the mobile phone monitors the creation and release of audio resources through a service, and obtains the audio output of the audio resources. If it is detected that the application creates an audio resource, the application starts playing. In addition, record the corresponding time when creating the audio resource and releasing the audio resource, and calculate the time that the application occupies the audio resource according to the time difference between creating the audio resource and releasing the audio resource, which is also the time that the application plays audio.
  • the second monitoring module 22 can also monitor the audio playback behavior of the application through the built-in monitoring function.
  • the system can be created at the system framework layer (native / framework layer)
  • the monitoring module of the same level monitors the audio playback behavior of the application through the monitoring module, or independently creates a monitoring process and monitors the audio playback behavior of the application through a message transmission mechanism.
  • system_server system service program
  • you can also create an independent monitoring process, set up and call a separate monitoring function in the process can be set to start from boot, and real-time audio resource creation behavior, audio resource release behavior, audio playback of any other application Behavior monitoring.
  • the analysis module 23 is configured to analyze the playing behavior of the application program to determine whether the application program is abnormally played if it is determined that the electronic device outputs audio when the electronic device is in the hung-up state;
  • the second monitoring module 22 monitors whether the application in the electronic device has audio output, and if it is detected that the audio is output when the electronic device is in the hang-up state, the application ’s Audio playback behavior.
  • the audio playback behavior may include the running time of the application and the audio resources occupied during the operation. Determine whether the application has a record of playback before the call according to the audio playback behavior of the application. The application is playing abnormally.
  • each application may carry identification information, and the identification information refers to information that can be used to uniquely identify the application, for example, it may be the package name or number of the application.
  • the audio playback behavior may include the playback record of the application recorded in the log record. First, look up the playback record corresponding to the application program through log records, and determine whether the application program has a playback record before an incoming call according to the playback record to determine that the application program is abnormally played.
  • mapping table can be stored in the memory of the electronic device in the form of a database, and the mapping table can be accessed through internal instructions when it is called to determine the audio playback record corresponding to the application.
  • the mapping table may be in the form of one-to-one or one-to-many. As described in the above example, in the mapping table, one application corresponds to multiple log records, and the corresponding log records are searched according to the actual needs of the user.
  • the application program After finding the log record corresponding to the application program, it can be determined whether the application program is abnormally played according to the call record, that is, the time of the incoming call and the time when the call is hung up. For example, if the incoming call time for this call is 14:05 and the call hangup time is 14:20, after listening to the call hangup, find out if there is a recording record of Storm Video before 14:05. If the record is empty, it is determined that the storm video is played abnormally. The playback is considered to be performed without the user's knowledge, and the playback behavior of the storm video is processed accordingly. If there is a corresponding playback record of Stormwind Video, it is determined that Stormwind Video playback is not abnormal playback. It is considered that the user played Stormwind Video before the call, interrupted normal playback after the call, and automatically played after the call was hung up. At this time, the storm video will not be processed accordingly to make it play normally.
  • the call record that is, the time of the incoming call and the time when
  • the playing record of the application program within a second preset time before the call is searched according to the mapping table, and whether the application program is abnormally played is determined according to the playing record. For example, if the incoming call time for this call is 14:05 and the call hangup time is 14:20, after listening to the call hangup, find out if there is a recording record of Storm Video before 14:05. If the record is empty, it is determined that the storm video is played abnormally. The playback is considered to be performed without the user's knowledge, and the playback behavior of the storm video is processed accordingly.
  • the second preset time may be 10s, 30s, 1 minute, etc. The specific duration is determined according to the actual situation, and this embodiment is not limited.
  • the application can be quickly and accurately Analysis of the playing behavior of the program, and then the application program can be processed more effectively to improve the user experience.
  • the processing module 24 is configured to process the application program if it is determined that the application program is abnormally played.
  • the processing module 24 processes the application program, which may specifically be:
  • a prompt message is issued according to a preset manner, and the prompt message is used to prompt the user to process the application program.
  • the electronic device receives the user's preset operation for the prompt message, the application program is closed or played according to the preset operation.
  • the preset method may be in the form of voice output, pop-up dialog box, etc.
  • a dialog box pops up. It includes the following information: whether to play the A application and the corresponding Yes and No buttons, the user chooses to process the application according to the actual situation, if you click Yes, the A application performs playback, if you click No, the A application closes .
  • a prompt message is issued in a preset manner, and the prompt message is used to prompt the user to process the application program.
  • the electronic device receives the user's preset operation for the prompt message, the application program is closed or played according to the preset operation, so that the application program can be better managed, which solves the problem in the prior art
  • the problem of abnormal audio playback of the application improves the user experience.
  • the first monitoring module 21 determines the call status of the electronic device by monitoring the call behavior of the electronic device; if the second monitoring module 22 determines that the electronic device is in the hang-up state, it monitors the application The audio playback behavior of the program to determine the audio output status of the electronic device; if the analysis module 23 determines that the electronic device has audio output, it analyzes the audio playback behavior of the application program to determine whether the application program It is abnormal playback; if the processing module 24 determines that the application program is abnormal playback, it processes the application program, which solves the problem of abnormal audio playback of the application program in the prior art and improves the user experience.
  • the electronic device includes a processor connected through a system bus, a non-volatile storage medium, an internal memory and a network interface, a sound collection device, a speaker, a display screen, and an input device.
  • the non-volatile storage medium of the terminal stores an operating system and computer-readable instructions.
  • the processor is used to provide computing and control capabilities to support the operation of the entire electronic device.
  • the internal memory in the electronic device provides an environment for the execution of computer-readable instructions in the non-volatile storage medium.
  • the display screen of the electronic device may be a liquid crystal display screen or an electronic ink display screen, etc.
  • the input device may be a touch layer covered on the display screen, a button, a trackball or a touch pad provided on the housing of the electronic device, or External keyboard, touchpad or mouse, etc.
  • the electronic device may be a mobile phone, a tablet computer, a personal digital assistant or a wearable device.
  • FIG. 3 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 method for processing the application mentioned above may specifically be:
  • the application program is processed.
  • the embodiments of the present application also provide a computer non-volatile readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of processing the application program as described above are realized.
  • An embodiment of the present invention also provides a computer device. As shown in FIG. 4, for ease of description, only parts related to the embodiments of the present invention are shown, and specific technical details are not disclosed, please refer to the method part of the embodiments of the present invention.
  • the computer device may be any terminal device including an electronic device, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), an in-vehicle computer, a wearable device, etc.
  • the computer device is an electronic device For example:
  • the electronic device includes: a radio frequency (Radio Frequency) circuit 410, a memory 420, an input unit 430, a display unit 440, a sensor 450, an audio circuit 460, a wireless fidelity (WiFi) module 470, a processor 480, and power supply 490 and other components.
  • a radio frequency (Radio Frequency) circuit 410 for detecting radio frequency (Radio Frequency)
  • a memory 420 for a digital signal
  • an input unit 430 a keyboard
  • a display unit 440 a sensor 450
  • an audio circuit 460 a wireless fidelity (WiFi) module
  • WiFi wireless fidelity
  • processor 480 and power supply 490 and other components.
  • power supply 490 other components.
  • the structure of the electronic device shown in FIG. 4 does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine some components, or arrange different components.
  • the RF circuit 410 can be used to receive and send signals during the sending and receiving of information or during a call. It can receive the downlink information of the base station and process it to the processor 480; it can also send the uplink data to the base station.
  • RF circuits include but are not limited to antennas, at least one amplifier, transceiver, coupler, low noise amplifier (Low Noise Amplifier, LNA), duplexer, and so on.
  • the RF circuit 410 can also communicate with other devices through 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 (Code Division) Multiple Access (CDMA), 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
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • SMS Short Message Service
  • the memory 420 may be used to store software programs and modules.
  • the processor 480 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 420.
  • the memory 420 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 electronic devices.
  • the memory 420 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 430 may be used to receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device 400.
  • the input unit 430 may include a touch panel 431 and other input devices 432.
  • the touch panel 431 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 or stylus on or near the touch panel 431 Operation), and drive the corresponding connection device according to the preset program.
  • the touch panel 431 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 To the processor 480, and can receive the command sent by the processor 480 and execute it.
  • the touch panel 431 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 430 may also include other input devices 432.
  • the other input devices 432 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 440 may be used to display information input by the user or information provided to the user and various menus of the electronic device.
  • the display unit 440 may include a display panel 441.
  • the display panel 441 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 431 may cover the display panel 441, and when the touch panel 431 detects a touch operation on or near it, it is transmitted to the processor 480 to determine the type of touch event, and then the processor 480 according to The type of touch event provides corresponding visual output on the display panel 441.
  • the touch panel 431 and the display panel 441 are implemented as two independent components to realize the input and input functions of the electronic device, in some embodiments, the touch panel 431 and the display panel 441 may be integrated And realize the input and output functions of electronic equipment.
  • the electronic device 400 may further include at least one sensor 450, 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 441 according to the brightness of the ambient light, and the proximity sensor may close the display panel 441 and the electronic device when moving 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.
  • electronic devices can be used to identify the posture of electronic devices (such as horizontal and vertical screen switching), and vibration recognition related functions For example, pedometer, percussion, etc .; in addition, electronic devices can also be equipped with other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc.
  • the audio circuit 460, the speaker 461, and the microphone 462 may provide an audio interface between the user and the electronic device.
  • the audio circuit 460 can transmit the converted electrical signal of the received audio data to the speaker 461, which converts the speaker 461 into a sound signal for output; on the other hand, the microphone 462 converts the collected sound signal into an electrical signal, which is converted by the audio circuit 460 After receiving, it is converted into audio data, and then processed by the audio data output processor 480, and then sent to another electronic device via the RF circuit 410, or the audio data is output to the memory 420 for subsequent processing.
  • WiFi is a short-range wireless transmission technology. Electronic devices can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 470. It provides users with wireless broadband Internet access.
  • FIG. 4 shows the WiFi module 470, it can be understood that it is not a necessary component of the electronic device 400, and may be omitted as needed.
  • the processor 480 is a control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device, by running or executing software programs and / or modules stored in the memory 420, and calling data stored in the memory 420 , Perform various functions of electronic devices and process data, so as to monitor the electronic devices as a whole.
  • the processor 480 may include one or more processing units.
  • the processor 480 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, user interface, application programs, 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 480.
  • the electronic device 400 further includes a power supply 490 (such as a battery) that supplies power to various components.
  • a power supply 490 (such as a battery) that supplies power to various components.
  • the power supply can be logically connected to the processor 480 through the power management system, so as to implement functions such as charging, discharging, and power management through the power management system .
  • the electronic device 400 may further include a camera, a Bluetooth module, and the like.
  • the processor 480 included in the computer device implements the methods of the foregoing embodiments when executing the computer program stored on the memory.
  • the program may be stored in a non-volatile computer-readable storage medium
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), etc.
  • An embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the methods of the foregoing embodiments.

Abstract

The present invention relates to a method for processing an application program, comprising: monitoring a call behavior of an electronic device to determine a call state of the electronic device; if it is determined that the electronic device is in a hang-up state, monitoring an audio playback behavior of an application program in the electronic device, to determine an audio output state of the electronic device; if it is determined that the electronic device outputs an audio in the hang-up state, analyzing the audio playback behavior of the application program, to determine whether the application program is playing abnormally; and if it is determined that the application program is playing abnormally, processing the application program. Accordingly, the present invention also provides an apparatus for processing an application program, an electronic device, and a readable storage medium, solves the problem of abnormal audio playback of an application program and improves user experience.

Description

一种对应用程序进行处理的方法、装置和电子设备Method, device and electronic equipment for processing application program 技术领域Technical field
本申请涉及信息技术领域,特别是涉及一种对应用程序进行处理方法、装置、电子设备和计算机可读存储介质。This application relates to the field of information technology, and in particular, to a method, device, electronic device, and computer-readable storage medium for processing application programs.
背景技术Background technique
随着互联网的飞速发展,智能移动终端已经成为许多用户最常用的电子设备,例如智能手机、平板电板等。目前手机的屏幕越来越大,用户安装的应用程序越来越多,尤其是一些音视频播放软件,例如酷狗音乐、暴风影音、快手、土豆视频等。用户可以使用安装的应用程序进行听音乐、看视频等各种娱乐活动,给用户的生活带来了很大便利。但是,移动终端对应用程序的管理不合理,造成终端上的应用程序可以随意在后台播放,严重影响用户体验。With the rapid development of the Internet, smart mobile terminals have become the most commonly used electronic devices for many users, such as smart phones and flat-panel electric boards. At present, the screen of mobile phones is getting larger and larger, and users have installed more and more applications, especially some audio and video playback software, such as Kugou music, Storm video, Kuaishou, Tudou video, etc. Users can use the installed application to listen to music, watch videos and other entertainment activities, which brings great convenience to the user's life. However, the mobile terminal's management of application programs is unreasonable, causing the application programs on the terminal to be played in the background at will, which seriously affects the user experience.
发明内容Summary of the invention
基于此,有必要提供一种能够解决应用程序音频异常播放问题的方法和装置。Based on this, it is necessary to provide a method and device that can solve the problem of abnormal audio playback of application programs.
本申请实施例提供一种对应用程序进行处理的方法,包括:An embodiment of the present application provides a method for processing an application program, including:
监听所述电子设备的通话行为,以确定所述电子设备的通话状态;Monitor the call behavior of the electronic device to determine the call status of the electronic device;
若确定所述电子设备处于挂断状态,则监听所述电子设备中应用程序的音频播放行为,以确定所述电子设备的音频输出状态;If it is determined that the electronic device is in the hang-up state, monitor the audio playback behavior of the application program in the electronic device to determine the audio output state of the electronic device;
若确定所述电子设备处于挂断状态时输出了音频,则对所述应用程序的音频播放行为进行分析,以确定所述应用程序是否为异常播放;If it is determined that the electronic device outputs audio when the electronic device is in the hang-up state, analyze the audio playback behavior of the application program to determine whether the application program is abnormally played;
若确定所述应用程序为异常播放,则对所述应用程序进行处理。If it is determined that the application program is abnormally played, the application program is processed.
本申请实施例提供一种对应用程序进行处理的装置,包括:An embodiment of the present application provides an apparatus for processing an application program, including:
第一监听模块,用于监听所述电子设备的通话行为,以确定所述电子设备的通话状态;A first monitoring module, configured to monitor the call behavior of the electronic device to determine the call status of the electronic device;
第二监听模块,用于若确定所述电子设备处于挂断状态,则监听所述电子设备中应用程序的音频播放行为,以确定所述电子设备的音频输出状态;A second monitoring module, configured to monitor the audio playback behavior of the application in the electronic device to determine the audio output state of the electronic device if it is determined that the electronic device is in the hung-up state;
分析模块,用于若确定所述电子设备处于挂断状态时输出了音频,则对所述应用程序的播放行为进行分析,以确定所述应用程序是否为异常播放;The analysis module is configured to analyze the playing behavior of the application program to determine whether the application program is abnormally played if it is determined that the electronic device outputs audio when the electronic device is in the hung-up state;
处理模块,用于若确定所述应用程序为异常播放,则对所述应用程序进 行处理。The processing module is configured to process the application program if it is determined that the application program is abnormally played.
本申请实施例还提供一种电子设备,包括存储器及处理器,所述存储器中储存有计算机程序,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器执行:An embodiment of the present application further provides an electronic device, including a memory and a processor, and the memory stores a computer program, wherein when the computer program is executed by the processor, the processor is caused to execute:
监听所述电子设备的通话行为,以确定所述电子设备的通话状态;Monitor the call behavior of the electronic device to determine the call status of the electronic device;
若确定所述电子设备处于挂断状态,则监听所述电子设备中应用程序的音频播放行为,以确定所述电子设备的音频输出状态;If it is determined that the electronic device is in the hang-up state, monitor the audio playback behavior of the application program in the electronic device to determine the audio output state of the electronic device;
若确定所述电子设备处于挂断状态时输出了音频,则对所述应用程序的音频播放行为进行分析,以确定所述应用程序是否为异常播放;If it is determined that the electronic device outputs audio when the electronic device is in the hang-up state, analyze the audio playback behavior of the application program to determine whether the application program is abnormally played;
若确定所述应用程序为异常播放,则对所述应用程序进行处理。If it is determined that the application program is abnormally played, the application program is processed.
本申请实施例还提供一种计算机非易失性可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上述的对应用程序进行处理的步骤。Embodiments of the present application also provide a computer non-volatile readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of processing the application program as described above are realized.
电子设备和计算机可读存储介质在实现上述方法时,根据电子设备的通话状态和应用程序的音频播放行为对应用程序进行处理,解决了应用程序的音频异常播放问题,提升了用户体验。When the electronic device and the computer-readable storage medium implement the above method, the application program is processed according to the call state of the electronic device and the audio playback behavior of the application program, which solves the problem of abnormal audio playback of the application program and improves 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 labor, drawings of other embodiments can be obtained based on these drawings.
图1为一实施例的对应用程序进行处理的方法流程图;FIG. 1 is a flowchart of a method for processing an application program according to an embodiment;
图2为一实施例的对应用程序进行处理的装置结构示意图;2 is a schematic structural diagram of an apparatus for processing an application according to an embodiment;
图3为一实施例中电子设备的内部结构示意图;3 is a schematic diagram of the internal structure of an electronic device in an embodiment;
图4为与本申请实施例提供的计算机设备相关的电子设备的部分结构的框图。4 is a block diagram of a partial structure of an electronic device related to a computer 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.
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一监听模块称为第二监听模块,且类似地,可将第二监听模块称为第一监听模块。第一监听模块和第二监听模块两者都是监听模块,但其不是同一监听模块。It can be understood that the terms “first”, “second”, etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element. For example, without departing from the scope of the present application, the first monitoring module may be referred to as the second monitoring module, and similarly, the second monitoring module may be referred to as the first monitoring module. Both the first monitoring module and the second monitoring module are monitoring modules, but they are not the same monitoring module.
如图1所示,本申请实施例提供了一种对应用程序进行处理的方法,应用于电子设备,该方法包括:As shown in FIG. 1, an embodiment of the present application provides a method for processing an application program, which is applied to an electronic device. The method includes:
S110、监听电子设备的通话行为,以确定所述电子设备的通话状态。S110. Monitor the call behavior of the electronic device to determine the call status of the electronic device.
在一个实施例中,在通话过程中,电子设备可以实时监听通话的语音信号,根据监听到的语音信号判断通话挂断事件是否被触发,当通话挂断事件被触发时,确定所述电子设备处于挂断状态。In one embodiment, during the call, the electronic device can monitor the voice signal of the call in real time, determine whether the call hangup event is triggered according to the detected voice signal, and determine the electronic device when the call hangup event is triggered Hang up.
具体地,在通话过程中,电子设备实时检测当前电子设备的音频通道中是否传输有语音信号,该语音信号包括由当前电子设备的麦克风输入的语音信号和对方从网络侧发来的语音信号。在监听到至少有一种语音信号时,说明通话还在进行;若在第一预设时间内未监听到任意一种语音信号,或者电子设备接收到用户按压实体或虚拟的通话结束按键时,此时电子设备确定通话挂断事件被触发,确定通话处于挂断状态。Specifically, during a call, the electronic device detects in real time whether a voice signal is transmitted in the audio channel of the current electronic device, and the voice signal includes a voice signal input from a microphone of the current electronic device and a voice signal sent by the other party from the network side. When at least one voice signal is monitored, it means that the call is still in progress; if any voice signal is not monitored within the first preset time, or the electronic device receives the user pressing the physical or virtual call end button, this When the electronic device determines that the call hang up event is triggered, it is determined that the call is in the hang up state.
上述实施例中,第一预设时间可以为30s、1分钟、两分钟,具体时长根据实际情况确定,本实施例不做限制。在通话过程中,终端实时监听通话的语音信号,如果在第一预设时间内一直未监听到语音信号,则终端判定通话挂断事件被触发,即说明通话双方忘记挂断电话,此时自动将电话挂断,解决了双方因忘记挂断电话造成的资源浪费问题。In the above embodiment, the first preset time may be 30s, 1 minute, or 2 minutes. The specific duration is determined according to actual conditions, and this embodiment is not limited. During the call, the terminal monitors the voice signal of the call in real time. If the voice signal is not monitored within the first preset time, the terminal determines that the call hang up event is triggered, which means that both parties of the call have forgotten to hang up the phone. Hanging up the phone solves the problem of wasting resources caused by both parties forgetting to hang up.
在一个实施例中,在监听电子设备的通话行为前,电子设备还可以记录电子设备内所有应用程序的音频行为以形成日志记录,日志记录可以包括:电子设备中所有应用程序的播放记录、音频模式调节行为记录或录音行为记录的一种或多种的组合,例如可以只记录播放记录,或只记录音频模式调节行为,或多个记录的组合,具体组合形式不做限定。In one embodiment, before monitoring the call behavior of the electronic device, the electronic device may also record the audio behavior of all applications in the electronic device to form a log record, and the log record may include: playback records and audio of all application programs in the electronic device One or more combinations of mode adjustment behavior recording or recording behavior recording, for example, may only record playback recording, or only record audio mode adjustment behavior, or a combination of multiple recordings, the specific combination form is not limited.
具体地,在电子设备被开启后,启动具有监听和记录功能的服务,以实时获取电子设备内所有应用程序的运行信息,并进行记录。以应用程序暴风影音为例进行说明,在电子设备被开启后,启动的监听服务实时监听暴风影音的运行信息并进行记录以形成日志记录,日志记录可以包括暴风影音的播放记录、音频模式调节行为记录和/或录音行为记录。其中播放记录可以包括 暴风影音在后台的占用资源的时间、在后台释放资源的时间、在前台的占用资源的时间、在前台释放资源的时间等多种类型,在此不作具体限定。每一张类型对应的播放记录可以包括多条日志,每一条日志可以包括一个时间对,根据时间对可以计算出暴风影音播放一次的时间。例如,暴风影音在前台的占用资源的时间为10:10;在前台释放资源的时间为11:00。在后台的占用资源的时间为13:20;在后台释放资源的时间为14:00。根据上述日志记录可以得出暴风影音在前台播放了两次,第一次是从10:10到11:00,播放了50分钟,第二次是从13:20到14:00,播放了40分钟。Specifically, after the electronic device is turned on, a service with a monitoring and recording function is started to obtain the running information of all application programs in the electronic device in real time and record it. Taking the application storm video as an example, after the electronic device is turned on, the monitoring service that is started monitors the operation information of storm video in real time and records it to form a log record. The log record can include the playback record of storm video and audio, and the audio mode adjustment behavior Recording and / or recording behavior records. The playback record may include various types of time such as the time taken by Storm Storm to occupy resources in the background, the time it takes to release resources in the background, the time it takes to occupy resources at the foreground, and the time it takes to release resources at the foreground, which is not specifically limited here. The playback record corresponding to each type may include multiple logs, and each log may include a time pair. According to the time pair, the time when the storm video is played once can be calculated. For example, the time for storm video to occupy resources at the front desk is 10:10; the time to release resources at the front desk is 11:00. The time for occupying resources in the background is 13:20; the time for releasing resources in the background is 14:00. According to the above log records, it can be concluded that Storm Video was played twice in the foreground, the first time was from 10:10 to 11:00, played for 50 minutes, and the second time was from 13:20 to 14:00, played 40 minute.
在一个实施例中,电子设备中所有应用程序对应的日志记录可以以数据库的形式存储在电子设备存储器中,需要调用时可通过内部指令进行日志记录的访问,以确定出应用程序对应的日志记录。In one embodiment, the log records corresponding to all application programs in the electronic device can be stored in the memory of the electronic device in the form of a database, and the log records can be accessed through internal instructions when needed to determine the log records corresponding to the application programs .
S120、若确定所述电子设备处于挂断状态,则监听所述电子设备中应用程序的音频播放行为,以确定所述电子设备的音频输出状态。S120. If it is determined that the electronic device is in the hung-up state, monitor the audio playback behavior of the application program in the electronic device to determine the audio output state of the electronic device.
在一个实施例中,所述监听应用程序的播放行为具体可以是电子设备在应用层通过服务监听音频资源的创建和释放,获取所述应用程序的音频播放行为。In one embodiment, the monitoring of the playback behavior of the application program may specifically be that the electronic device monitors the creation and release of audio resources through the service at the application layer to obtain the audio playback behavior of the application program.
具体地,在手机的应用层通过一个服务(service)来监听音频资源的创建和释放,并获得音频资源的音频输出情况。若监听到应用程序创建了音频资源,则该应用程序启动了播放。另外,在创建音频资源和释放音频资源时记录对应的时间,并根据创建音频资源和释放音频资源的时间差计算出该应用程序占用音频资源的时间,即为该应用程序播放音频的时间。Specifically, the application layer of the mobile phone monitors the creation and release of audio resources through a service, and obtains the audio output of the audio resources. If it is detected that the application creates an audio resource, the application starts playing. In addition, the corresponding time is recorded when the audio resource is created and the audio resource is released, and the time that the application occupies the audio resource is calculated according to the time difference between the creation of the audio resource and the release of the audio resource, which is the time that the application plays audio.
在一个实施例中,电子设备也可以通过内置的监听函数对应用程序的音频播放行为进行监听,以安卓系统的电子设备为例,可在系统框架层(native/framework层)创建系统级的监听模块,通过所述监听模块对所述应用程序的音频播放行为进行监听,或,独立创建监听进程,通过消息传输机制监听所述应用程序的音频播放行为。例如,可在框架层设立监听模块并运行在系统服务程序(system_server)中,由于该监听模块设立在系统级的服务框架层中,可方便与其他系统服务进行交互,同时无需担心系统调用时的权限问题。此外,也可以创建独立的监听进程,在该进程中设立并调用单独的监听函数,可设置为开机自启动,并实时对其他任何一个应用程序的音频资源创建行为、音频资源释放行为、音频播放行为进行监控。In one embodiment, the electronic device can also monitor the audio playback behavior of the application through the built-in monitoring function. Taking the electronic device of the Android system as an example, a system-level monitoring can be created at the system framework layer (native / framework layer) The module monitors the audio playback behavior of the application program through the monitoring module, or independently creates a monitoring process and monitors the audio playback behavior of the application program through a message transmission mechanism. For example, you can set up a listener module in the framework layer and run it in the system service program (system_server). Since the listener module is established in the system-level service framework layer, you can easily interact with other system services without worrying about system calls. Permissions issue. In addition, you can also create an independent monitoring process, set up and call a separate monitoring function in the process, can be set to start from boot, and real-time audio resource creation behavior, audio resource release behavior, audio playback of any other application Behavior monitoring.
需要说明的是,电子设备是否有音频输出,具体如何监听本申请实施例不作唯一性限定。以上记载的监听方法,如果使用软件的服务实现,可以在 应用层启动具有监听功能的服务来对音频播放行为进行监听。It should be noted that whether the electronic device has audio output, and how to monitor the embodiment of the present application is not uniquely limited. If the monitoring method described above is implemented using software services, you can start a service with a monitoring function at the application layer to monitor the audio playback behavior.
S130、若确定所述电子设备处于挂断状态时输出了音频,则对所述应用程序的音频播放行为进行分析,以确定所述应用程序是否为异常播放。S130. If it is determined that the electronic device outputs audio when the electronic device is in the hang-up state, analyze the audio playback behavior of the application program to determine whether the application program is abnormally played.
当电子设备确定通话处于挂断状态时,进一步监听电子设备内的应用程序是否有音频输出,若监听到电子设备处于挂断状态时输出了音频时,则获取所述应用程序的音频播放行为,音频播放行为可以包括所述应用程序的运行时间、在运行期间占用的音频资源,根据应用程序的音频播放行为确定应用程序在来电前是否有播放记录,若无,则确定所述应用程序为异常播放。When the electronic device determines that the call is in the hang-up state, it further monitors whether the application in the electronic device has audio output, and if it is detected that the electronic device is in the hang-up state and outputs audio, the audio playback behavior of the application is obtained, The audio playback behavior may include the running time of the application program and the audio resources occupied during the operation. According to the audio playback behavior of the application program, determine whether the application program has a playback record before the call, if not, determine that the application program is abnormal Play.
具体地,每一个应用程序可以携带有标识信息,该标识信息指的是可用于唯一标识应用程序的信息,比如,可以是应用程序的包名,或是编号等。可以根据应用程序的标识信息查找在日志记录中的应用程序。音频播放行为可以包括日志记录中记录的该应用程序的播放记录。首先通过日志记录查找所述应用程序对应的播放记录,根据播放记录确定所述应用程序在来电前是否有播放记录,以确定所述应用程序为异常播放。Specifically, each application may carry identification information, and the identification information refers to information that can be used to uniquely identify the application, for example, it may be the package name or number of the application. You can find the application in the log record based on the identification information of the application. The audio playback behavior may include the playback record of the application recorded in the log record. First, look up the playback record corresponding to the application program through log records, and determine whether the application program has a playback record before an incoming call according to the playback record to determine that the application program is abnormally played.
具体地,根据应用程序的标识信息查找到日志记录中的记录的所述应用程序后,根据日志记录中所有应用程序的播放记录确定所述应用程序在来电前是否有播放记录,可通过设置应用程序与播放记录映射表,并根据所述映射表,查找在日志记录中所述应用程序对应的播放记录。需要说明的是,映射表可以以数据库的形式存储在电子设备存储器中,需要调用时可通过内部指令进行映射表的访问,以确定出应用程序对应的音频播放记录。映射表可以是一对一或一对多的形式,如上述示例所述,在映射表内,一个应用程序对应多条日志记录,根据用户的实际需求查找对应的日志记录。Specifically, after finding the application recorded in the log record according to the identification information of the application, according to the playback records of all applications in the log record to determine whether the application has a playback record before the call, you can set the application The program and the playback record mapping table, and according to the mapping table, search for the playback record corresponding to the application program in the log record. It should be noted that the mapping table can be stored in the memory of the electronic device in the form of a database, and the mapping table can be accessed through internal instructions when it is called to determine the audio playback record corresponding to the application. The mapping table may be in the form of one-to-one or one-to-many. As described in the above example, in the mapping table, one application corresponds to multiple log records, and the corresponding log records are searched according to the actual needs of the user.
在查找到应用程序对应的日志记录后,可以根据通话记录,即来电时间和通话挂断的时间来确定所述应用程序是否为异常播放。例如,此次通话的来电时间是14:05,通话挂断的时间是14:20,则在监听到通话挂断后查找暴风影音在14:05之前是否有播放记录,若暴风影音对应的播放记录为空,则确定暴风影音此次播放为异常播放,此次播放是在用户不知情的情况下进行播放的,则对暴风影音的此次播放行为进行相应的处理。若暴风影音有对应的播放记录,则确定暴风影音此次播放不是异常播放,认为是在来电前用户播放过暴风影音,来电后打断了正常播放,在通话挂断后自动进行播放。此时不对暴风影音进行相应的处理,使其正常播放。After finding the log record corresponding to the application program, it can be determined whether the application program is abnormally played according to the call record, that is, the time of the incoming call and the time when the call is hung up. For example, if the incoming call time for this call is 14:05 and the call hangup time is 14:20, after listening to the call hangup, find out if there is a recording record of Storm Video before 14:05. If the record is empty, it is determined that the broadcast of Baofengyingyin is abnormal. This playback is played without the user's knowledge, and the playback behavior of Baofengyingyin will be dealt with accordingly. If there is a corresponding playback record of Stormwind Video, it is determined that Stormwind Video playback is not abnormal playback. It is considered that the user played Stormwind Video before the call, interrupted normal playback after the call, and automatically played after the call was hung up. At this time, the storm video will not be processed accordingly to make it play normally.
在一个实施例中,根据映射表查找在来电前第二预设时间内所述应用程序的播放记录,根据该播放记录确定所述应用程序是否为异常播放。例如, 此次通话的来电时间是14:05,通话挂断的时间是14:20,则在监听到通话挂断后查找暴风影音在14:05之前是否有播放记录,若暴风影音对应的播放记录为空,则确定暴风影音此次播放为异常播放,此次播放是在用户不知情的情况下进行播放的,则对暴风影音的此次播放行为进行相应的处理。若暴风影音在14:05之前的第二预设时间段内有对应的播放记录为空,则确定暴风影音此次播放不是异常播放,认为是在来电前用户正在播放暴风影音,来电后打断了正常播放,在通话挂断后自动进行播放。此时不对暴风影音进行相应的处理,使其正常播放。第二预设时间可以为10s、30s、1分钟等,具体时长根据实际情况确定,本实施例不做限制。In one embodiment, the playing record of the application program within a second preset time before the call is searched according to the mapping table, and whether the application program is abnormally played is determined according to the playing record. For example, if the incoming call time of this call is 14:05 and the call hangup time is 14:20, after listening to the call hangup, find out if there is a recording record of the storm video before 14:05. If the record is empty, it is determined that the broadcast of Baofengyingyin is abnormal. This playback is played without the user's knowledge, and the playback behavior of Baofengyingyin will be dealt with accordingly. If there is a corresponding play record empty in the second preset time period before 14:05, it is determined that the playback of the storm video is not abnormal, it is considered that the user is playing the storm video before the call, and the call is interrupted after the call In order to play normally, it will automatically play after the call is hung up. At this time, the storm video will not be processed accordingly to make it play normally. The second preset time may be 10s, 30s, 1 minute, etc. The specific duration is determined according to the actual situation, and this embodiment is not limited.
通过设置应用程序与播放记录映射表,根据所述映射表查找在来电前第二预设时间内所述应用程序的播放记录,以确定所述应用程序是否为异常播放,可以快速准确地对应用程序的播放行为进行分析,进而可以进行更有效地对应用程序进行处理,提升用户体验。By setting a mapping table of application programs and playback records, searching the playback records of the application program within the second preset time before the call according to the mapping table to determine whether the application program is abnormally played, the application can be quickly and accurately Analysis of the playing behavior of the program, and then the application program can be processed more effectively to improve the user experience.
S140、若确定所述应用程序为异常播放,则对所述应用程序进行处理。S140. If it is determined that the application program is abnormally played, process the application program.
在确定应用程序为异常播放时,对应用程序进行处理,具体可以是:When the application is determined to be abnormally played, the application is processed, which may be specifically:
当确定所述应用程序异常播放时,按照预设方式发出提示消息,所述提示消息用于提示用户对所述应用程序进行处理。当电子设备接收到用户针对所述提示消息的预设操作时,根据所述预设操作对所述应用程序进行关闭或播放处理。When it is determined that the application program is abnormally played, a prompt message is issued according to a preset manner, and the prompt message is used to prompt the user to process the application program. When the electronic device receives the user's preset operation for the prompt message, the application program is closed or played according to the preset operation.
在一个实施例中,预设方式可以是语音输出、弹出对话框等形式,以弹出对话框为例,在通话挂断后,若监听到有应用程序异常播放,则弹出对话框,对话框可以包括以下信息:是否要播放A应用程序和对应的是、否按键,用户根据实际情况选择对该应用程序进行处理,若点击是,则A应用程序执行播放,若点击否,则A应用程序关闭。In one embodiment, the preset method may be in the form of voice output, pop-up dialog box, etc. Taking the pop-up dialog box as an example, after the call is hung up, if an abnormal playback of an application is monitored, a dialog box pops up. It includes the following information: whether to play the A application and the corresponding Yes and No buttons, the user chooses to process the application according to the actual situation, if you click Yes, the A application performs playback, if you click No, the A application closes .
通过当确定所述应用程序异常播放时,按照预设方式发出提示消息,所述提示消息用于提示用户对所述应用程序进行处理。当电子设备接收到用户针对所述提示消息的预设操作时,根据所述预设操作对所述应用程序进行关闭或播放处理,可以对应用程序进行更好的管理,避免了应用程序随意播放的问题,提升了用户的体验。When it is determined that the application program is abnormally played, a prompt message is issued in a preset manner, and the prompt message is used to prompt the user to process the application program. When the electronic device receives the user's preset operation for the prompt message, the application program is closed or played according to the preset operation, so that the application program can be better managed, and the application program is prevented from being played randomly. Problems that enhance the user experience.
本申请实施例中,通过监听所述电子设备的通话行为,以确定所述电子设备的通话状态;若确定所述电子设备处于挂断状态,则监听应用程序的音频播放行为,以确定所述电子设备的音频输出状态;若确定所述电子设备有音频输出,则对所述应用程序的音频播放行为进行分析,以确定所述应用程 序是否为异常播放;若确定所述应用程序为异常播放,则对所述应用程序进行处理,解决了现有技术中解决了应用程序的音频异常播放的问题,提升了用户体验。In the embodiment of the present application, the call status of the electronic device is determined by monitoring the call behavior of the electronic device; if it is determined that the electronic device is in the hang-up state, the audio playback behavior of the application is monitored to determine the The audio output status of the electronic device; if it is determined that the electronic device has audio output, analyze the audio playback behavior of the application to determine whether the application is abnormally played; if the application is determined to be abnormally played , The application program is processed, which solves the problem of abnormal audio playback of the application program in the prior art and improves the user experience.
如图2所示,本申请实施例提供了一种对应用程序进行处理的装置20,该装置包括:As shown in FIG. 2, an embodiment of the present application provides an apparatus 20 for processing an application program. The apparatus includes:
第一监听模块21,用于监听所述电子设备的通话行为,以确定所述电子设备的通话状态;The first monitoring module 21 is configured to monitor the call behavior of the electronic device to determine the call status of the electronic device;
在通话过程中,第一监听模块21可以实时监听通话的语音信号,根据监听到的语音信号判断通话挂断事件是否被触发,当通话挂断事件被触发时,确定所述电子设备处于挂断状态。During the call, the first monitoring module 21 can monitor the voice signal of the call in real time, and determine whether the call hang-up event is triggered according to the detected voice signal. When the call hang-up event is triggered, it is determined that the electronic device is hanging up status.
具体地,在通话过程中,第一监听模块21实时监听当前电子设备的音频通道中是否传输有语音信号,该语音信号包括由当前电子设备的麦克风输入的语音信号和对方从网络侧发来的语音信号。在监听到至少有一种语音信号时,说明通话还在进行;若在第一预设时间内未监听到任意一种语音信号,或者电子设备接收到用户按压实体或虚拟的通话结束按键时,此时电子设备确定通话挂断事件被触发,确定通话处于挂断状态。Specifically, during a call, the first monitoring module 21 monitors in real time whether a voice signal is transmitted in the audio channel of the current electronic device, the voice signal includes the voice signal input by the microphone of the current electronic device and the counterpart sent from the network side voice signal. When at least one voice signal is monitored, it means that the call is still in progress; if any voice signal is not monitored within the first preset time, or the electronic device receives the user pressing the physical or virtual call end button, this When the electronic device determines that the call hang up event is triggered, it is determined that the call is in the hang up state.
上述实施例中,第一预设时间可以为30s、1分钟、两分钟,具体时长根据实际情况确定,本实施例不做限制。在通话过程中,终端实时监听通话的语音信号,如果在第一预设时间内一直未监听到语音信号,则终端判定通话挂断事件被触发,即说明通话双方忘记挂断电话,此时自动将电话挂断,解决了双方因忘记挂断电话造成的资源浪费问题。In the above embodiment, the first preset time may be 30s, 1 minute, or 2 minutes. The specific duration is determined according to actual conditions, and this embodiment is not limited. During the call, the terminal monitors the voice signal of the call in real time. If the voice signal is not monitored within the first preset time, the terminal determines that the call hang up event is triggered, which means that both parties of the call have forgotten to hang up the phone. Hanging up the phone solves the problem of wasting resources caused by both parties forgetting to hang up.
在一个实施例中,在监听电子设备的通话行为前,还可以记录所述电子设备内所有应用程序的音频行为以形成日志记录,日志记录可以包括:电子设备中所有应用程序的播放记录、音频模式调节行为记录或录音行为记录的一种或多种的组合,例如可以只记录播放记录,或只记录音频模式调节行为,或多个记录的组合,具体组合形式不做限定。In one embodiment, before listening to the call behavior of the electronic device, the audio behavior of all application programs in the electronic device may also be recorded to form a log record, and the log record may include: playback records and audio of all application programs in the electronic device One or more combinations of mode adjustment behavior recording or recording behavior recording, for example, may only record playback recording, or only record audio mode adjustment behavior, or a combination of multiple recordings, the specific combination form is not limited.
具体地,在电子设备被开启后,启动具有监听和记录功能的服务,以实时获取电子设备内所有应用程序的运行信息,并进行记录。以应用程序暴风影音为例进行说明,在电子设备被开启后,启动的监听服务实时监听暴风影音的运行信息并进行记录以形成日志记录,日志记录可以包括暴风影音的播放记录、音频模式调节行为记录和/或录音行为记录。其中播放记录可以包括暴风影音在后台的占用资源的时间、在后台释放资源的时间、在前台的占用资源的时间、在前台释放资源的时间等多种类型,在此不作具体限定。每一 种类型对应的播放记录可以包括多条日志,每一条日志可以包括一个时间对,根据时间对可以计算出暴风影音播放一次的时间。例如,在前台的占用资源的时间为10:10;释放资源的时间为11:00。在前台的占用资源的时间为13:20;释放资源的时间为14:00。根据上述日志记录可以得出暴风影音在前台播放了两次,第一次是从10:10到11:00,播放了50分钟,第二次是从13:20到14:00,播放了40分钟。Specifically, after the electronic device is turned on, a service with a monitoring and recording function is started to obtain the running information of all application programs in the electronic device in real time and record it. Taking the application storm video as an example, after the electronic device is turned on, the monitoring service that is started monitors the operation information of storm video in real time and records it to form a log record. The log record can include the playback record of storm video and audio, and the audio mode adjustment behavior Recording and / or recording behavior records. The playback record may include various types of time such as the time taken by storm video to occupy resources in the background, the time released by resources in the background, the time occupied by resources in the foreground, and the time released by resources in the foreground, which are not specifically limited herein. The playback record corresponding to each type may include multiple logs, and each log may include a time pair. According to the time pair, the time when the storm video is played once can be calculated. For example, the time for occupying resources at the front desk is 10:10; the time for releasing resources is 11:00. The time for occupying resources at the front desk is 13:20; the time for releasing resources is 14:00. According to the above log records, it can be concluded that Storm Video was played twice in the foreground, the first time was from 10:10 to 11:00, played for 50 minutes, and the second time was from 13:20 to 14:00, played 40 minute.
在一个实施例中,电子设备中所有应用程序对应的日志记录可以以数据库的形式存储在电子设备存储器中,需要调用时可通过内部指令进行日志记录的访问,以确定出应用程序对应的日志记录。In one embodiment, the log records corresponding to all application programs in the electronic device can be stored in the memory of the electronic device in the form of a database, and the log records can be accessed through internal instructions when needed to determine the log records corresponding to the application programs .
第二监听模块22,用于若确定所述电子设备处于挂断状态,则监听所述电子设备中应用程序的音频播放行为,以确定所述电子设备的音频输出状态;The second monitoring module 22 is configured to, if it is determined that the electronic device is in the hung-up state, monitor the audio playback behavior of the application program in the electronic device to determine the audio output state of the electronic device;
在一个实施例中,第二监听模块22监听应用程序的播放行为具体可以是在应用层通过服务监听音频资源的创建和释放,获取所述应用程序的音频播放行为。In one embodiment, the second listening module 22 monitors the playback behavior of the application program may specifically monitor the creation and release of audio resources through the service at the application layer to obtain the audio playback behavior of the application program.
具体地,在手机的应用层通过一个服务(service)来监听音频资源的创建和释放,并获得音频资源的音频输出情况。若监听到应用程序创建了音频资源,则该应用程序启动了播放。另外,在创建音频资源和释放音频资源时记录对应的时间,并根据创建音频资源和释放音频资源的时间差计算出该应用程序占用音频资源的时间,也为该应用程序播放音频的时间。Specifically, the application layer of the mobile phone monitors the creation and release of audio resources through a service, and obtains the audio output of the audio resources. If it is detected that the application creates an audio resource, the application starts playing. In addition, record the corresponding time when creating the audio resource and releasing the audio resource, and calculate the time that the application occupies the audio resource according to the time difference between creating the audio resource and releasing the audio resource, which is also the time that the application plays audio.
在一个实施例中,第二监听模块22也可以通过内置的监听函数对应用程序的音频播放行为进行监听,以安卓系统的电子设备为例,可在系统框架层(native/framework层)创建系统级的监听模块,通过所述监听模块对所述应用程序的音频播放行为进行监听,或,独立创建监听进程,通过消息传输机制监听所述应用程序的音频播放行为。例如,可在框架层设立监听模块并运行在系统服务程序(system_server)中,由于该监听模块设立在系统级的服务框架层中,可方便与其他系统服务进行交互,同时无需担心系统调用时的权限问题。此外,也可以创建独立的监听进程,在该进程中设立并调用单独的监听函数,可设置为开机自启动,并实时对其他任何一个应用程序的音频资源创建行为、音频资源释放行为、音频播放行为进行监控。In one embodiment, the second monitoring module 22 can also monitor the audio playback behavior of the application through the built-in monitoring function. Taking the electronic device of the Android system as an example, the system can be created at the system framework layer (native / framework layer) The monitoring module of the same level monitors the audio playback behavior of the application through the monitoring module, or independently creates a monitoring process and monitors the audio playback behavior of the application through a message transmission mechanism. For example, you can set up a listener module in the framework layer and run it in the system service program (system_server). Since the listener module is established in the system-level service framework layer, you can easily interact with other system services without worrying about system calls. Permissions issue. In addition, you can also create an independent monitoring process, set up and call a separate monitoring function in the process, can be set to start from boot, and real-time audio resource creation behavior, audio resource release behavior, audio playback of any other application Behavior monitoring.
需要说明的是,电子设备是否有音频输出,具体如何监听本申请实施例不作唯一性限定。以上记载的监听方法,如果使用软件的服务实现,可以在应用层启动具有监听功能的服务来对音频播放行为进行监听。It should be noted that whether the electronic device has audio output, and how to monitor the embodiment of the present application is not uniquely limited. If the monitoring method described above is implemented using software services, you can start a service with a monitoring function at the application layer to monitor the audio playback behavior.
分析模块23,用于若确定所述电子设备处于挂断状态时输出了音频,则 对所述应用程序的播放行为进行分析,以确定所述应用程序是否为异常播放;The analysis module 23 is configured to analyze the playing behavior of the application program to determine whether the application program is abnormally played if it is determined that the electronic device outputs audio when the electronic device is in the hung-up state;
当电子设备确定通话处于挂断状态时,第二监听模块22监听电子设备内的应用程序是否有音频输出,若监听到电子设备处于挂断状态时输出了音频时,则获取所述应用程序的音频播放行为,音频播放行为可以包括所述应用程序的运行时间、在运行期间占用的音频资源,根据应用程序的音频播放行为确定应用程序在来电前是否有播放记录,若无,则确定所述应用程序为异常播放。When the electronic device determines that the call is in the hang-up state, the second monitoring module 22 monitors whether the application in the electronic device has audio output, and if it is detected that the audio is output when the electronic device is in the hang-up state, the application ’s Audio playback behavior. The audio playback behavior may include the running time of the application and the audio resources occupied during the operation. Determine whether the application has a record of playback before the call according to the audio playback behavior of the application. The application is playing abnormally.
具体地,每一个应用程序可以携带有标识信息,该标识信息指的是可用于唯一标识应用程序的信息,比如,可以是应用程序的包名,或是编号等。可以根据应用程序的标识信息查找在日志记录中对应的应用程序。音频播放行为可以包括日志记录中记录的该应用程序的播放记录。首先通过日志记录查找所述应用程序对应的播放记录,根据播放记录确定所述应用程序在来电前是否有播放记录,以确定所述应用程序为异常播放。Specifically, each application may carry identification information, and the identification information refers to information that can be used to uniquely identify the application, for example, it may be the package name or number of the application. You can search for the corresponding application in the log record according to the identification information of the application. The audio playback behavior may include the playback record of the application recorded in the log record. First, look up the playback record corresponding to the application program through log records, and determine whether the application program has a playback record before an incoming call according to the playback record to determine that the application program is abnormally played.
需要说明的是,映射表可以以数据库的形式存储在电子设备存储器中,需要调用时可通过内部指令进行映射表的访问,以确定出应用程序对应的音频播放记录。映射表可以是一对一或一对多的形式,如上述示例所述,在映射表内,一个应用程序对应多条日志记录,根据用户的实际需求查找对应的日志记录。It should be noted that the mapping table can be stored in the memory of the electronic device in the form of a database, and the mapping table can be accessed through internal instructions when it is called to determine the audio playback record corresponding to the application. The mapping table may be in the form of one-to-one or one-to-many. As described in the above example, in the mapping table, one application corresponds to multiple log records, and the corresponding log records are searched according to the actual needs of the user.
在查找到应用程序对应的日志记录后,可以根据通话记录,即来电时间和通话挂断的时间来确定所述应用程序是否为异常播放。例如,此次通话的来电时间是14:05,通话挂断的时间是14:20,则在监听到通话挂断后查找暴风影音在14:05之前是否有播放记录,若暴风影音对应的播放记录为空,则确定暴风影音此次播放为异常播放,此次播放认为是在用户不知情的情况下进行播放的,则对暴风影音的此次播放行为进行相应的处理。若暴风影音有对应的播放记录,则确定暴风影音此次播放不是异常播放,认为是在来电前用户播放过暴风影音,来电后打断了正常播放,在通话挂断后自动进行播放。此时不对暴风影音进行相应的处理,使其正常播放。After finding the log record corresponding to the application program, it can be determined whether the application program is abnormally played according to the call record, that is, the time of the incoming call and the time when the call is hung up. For example, if the incoming call time for this call is 14:05 and the call hangup time is 14:20, after listening to the call hangup, find out if there is a recording record of Storm Video before 14:05. If the record is empty, it is determined that the storm video is played abnormally. The playback is considered to be performed without the user's knowledge, and the playback behavior of the storm video is processed accordingly. If there is a corresponding playback record of Stormwind Video, it is determined that Stormwind Video playback is not abnormal playback. It is considered that the user played Stormwind Video before the call, interrupted normal playback after the call, and automatically played after the call was hung up. At this time, the storm video will not be processed accordingly to make it play normally.
在一个实施例中,根据映射表查找在来电前第二预设时间内所述应用程序的播放记录,根据该播放记录确定所述应用程序是否为异常播放。例如,此次通话的来电时间是14:05,通话挂断的时间是14:20,则在监听到通话挂断后查找暴风影音在14:05之前是否有播放记录,若暴风影音对应的播放记录为空,则确定暴风影音此次播放为异常播放,此次播放认为是在用户不知情的情况下进行播放的,则对暴风影音的此次播放行为进行相应的处理。 若暴风影音在14:05之前的第二预设时间段内有对应的播放记录为空,则确定暴风影音此次播放不是异常播放,认为是在来电前用户正在播放暴风影音,来电后打断了正常播放,在通话挂断后自动进行播放。此时不对暴风影音进行相应的处理,使其正常播放。第二预设时间可以为10s、30s、1分钟等,具体时长根据实际情况确定,本实施例不做限制。In one embodiment, the playing record of the application program within a second preset time before the call is searched according to the mapping table, and whether the application program is abnormally played is determined according to the playing record. For example, if the incoming call time for this call is 14:05 and the call hangup time is 14:20, after listening to the call hangup, find out if there is a recording record of Storm Video before 14:05. If the record is empty, it is determined that the storm video is played abnormally. The playback is considered to be performed without the user's knowledge, and the playback behavior of the storm video is processed accordingly. If there is a corresponding play record empty in the second preset time period before 14:05, it is determined that the playback of the storm video is not abnormal, it is considered that the user is playing the storm video before the call, and the call is interrupted after the call In order to play normally, it will automatically play after the call is hung up. At this time, the storm video will not be processed accordingly to make it play normally. The second preset time may be 10s, 30s, 1 minute, etc. The specific duration is determined according to the actual situation, and this embodiment is not limited.
通过设置应用程序与播放记录映射表,根据所述映射表查找在来电前第二预设时间内所述应用程序的播放记录,以确定所述应用程序是否为异常播放,可以快速准确地对应用程序的播放行为进行分析,进而可以进行更有效地对应用程序进行处理,提升用户体验。By setting a mapping table of application programs and playback records, searching the playback records of the application program within the second preset time before the call according to the mapping table to determine whether the application program is abnormally played, the application can be quickly and accurately Analysis of the playing behavior of the program, and then the application program can be processed more effectively to improve the user experience.
处理模块24,用于若确定所述应用程序为异常播放,则对所述应用程序进行处理。The processing module 24 is configured to process the application program if it is determined that the application program is abnormally played.
在确定应用程序为异常播放时,处理模块24对应用程序进行处理,具体可以是:When determining that the application program is abnormally played, the processing module 24 processes the application program, which may specifically be:
当确定所述应用程序异常播放时,按照预设方式发出提示消息,所述提示消息用于提示用户对所述应用程序进行处理。当电子设备接收到用户针对所述提示消息的预设操作时,根据所述预设操作对所述应用程序进行关闭或播放处理。When it is determined that the application program is abnormally played, a prompt message is issued according to a preset manner, and the prompt message is used to prompt the user to process the application program. When the electronic device receives the user's preset operation for the prompt message, the application program is closed or played according to the preset operation.
在一个实施例中,预设方式可以是语音输出、弹出对话框等形式,以弹出对话框为例,在通话挂断后,若监听到有应用程序异常播放,则弹出对话框,对话框可以包括以下信息:是否要播放A应用程序和对应的是、否按键,用户根据实际情况选择对该应用程序进行处理,若点击是,则A应用程序执行播放,若点击否,则A应用程序关闭。In one embodiment, the preset method may be in the form of voice output, pop-up dialog box, etc. Taking the pop-up dialog box as an example, after the call is hung up, if an abnormal playback of an application is monitored, a dialog box pops up. It includes the following information: whether to play the A application and the corresponding Yes and No buttons, the user chooses to process the application according to the actual situation, if you click Yes, the A application performs playback, if you click No, the A application closes .
通过当确定所述应用程序异常播放时,按照预设方式发出提示消息,所述提示消息用于提示用户对所述应用程序进行处理。当电子设备接收到用户针对所述提示消息的预设操作时,根据所述预设操作对所述应用程序进行关闭或播放处理,可以对应用程序进行更好的管理,解决了现有技术中应用程序的音频异常播放的问题,提升了用户体验。When it is determined that the application program is abnormally played, a prompt message is issued in a preset manner, and the prompt message is used to prompt the user to process the application program. When the electronic device receives the user's preset operation for the prompt message, the application program is closed or played according to the preset operation, so that the application program can be better managed, which solves the problem in the prior art The problem of abnormal audio playback of the application improves the user experience.
本申请实施例中,第一监听模块21通过监听所述电子设备的通话行为,以确定所述电子设备的通话状态;第二监听模块22若确定所述电子设备处于挂断状态,则监听应用程序的音频播放行为,以确定所述电子设备的音频输出状态;分析模块23若确定所述电子设备有音频输出,则对所述应用程序的音频播放行为进行分析,以确定所述应用程序是否为异常播放;处理模块24若确定所述应用程序为异常播放,则对所述应用程序进行处理,解决了现有 技术中应用程序的音频异常播放的问题,提升了用户体验。In the embodiment of the present application, the first monitoring module 21 determines the call status of the electronic device by monitoring the call behavior of the electronic device; if the second monitoring module 22 determines that the electronic device is in the hang-up state, it monitors the application The audio playback behavior of the program to determine the audio output status of the electronic device; if the analysis module 23 determines that the electronic device has audio output, it analyzes the audio playback behavior of the application program to determine whether the application program It is abnormal playback; if the processing module 24 determines that the application program is abnormal playback, it processes the application program, which solves the problem of abnormal audio playback of the application program in the prior art and improves the user experience.
图3为一实施例中电子设备的内部结构示意图。如图3所示,该电子设备包括通过系统总线连接的处理器、非易失性存储介质、内存储器和网络接口、声音采集装置、扬声器、显示屏和输入装置。其中,终端的非易失性存储介质存储有操作系统和计算机可读指令。该计算机可读指令被处理器执行时以实现一种电子设备的对应用程序进行处理的方法。该处理器用于提供计算和控制能力,支撑整个电子设备的运行。电子设备中的内存储器为非易失性存储介质中的计算机可读指令的运行提供环境。电子设备的显示屏可以是液晶显示屏或者电子墨水显示屏等,输入装置可以是显示屏上覆盖的触摸层,也可以是电子设备外壳上设置的按键、轨迹球或触控板,也可以是外接的键盘、触控板或鼠标等。该电子设备可以是手机、平板电脑或者个人数字助理或穿戴式设备等。本领域技术人员可以理解,图3中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的电子设备的限定,具体的电子设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。3 is a schematic diagram of an internal structure of an electronic device in an embodiment. As shown in FIG. 3, the electronic device includes a processor connected through a system bus, a non-volatile storage medium, an internal memory and a network interface, a sound collection device, a speaker, a display screen, and an input device. Among them, the non-volatile storage medium of the terminal stores an operating system and computer-readable instructions. When the computer-readable instructions are executed by the processor, a method for processing an application program of an electronic device is realized. The processor is used to provide computing and control capabilities to support the operation of the entire electronic device. The internal memory in the electronic device provides an environment for the execution of computer-readable instructions in the non-volatile storage medium. The display screen of the electronic device may be a liquid crystal display screen or an electronic ink display screen, etc. The input device may be a touch layer covered on the display screen, a button, a trackball or a touch pad provided on the housing of the electronic device, or External keyboard, touchpad or mouse, etc. The electronic device may be a mobile phone, a tablet computer, a personal digital assistant or a wearable device. Those skilled in the art can understand that the structure shown in FIG. 3 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.
其中,上述提及的对应用程序进行处理的方法具体可以为:Among them, the method for processing the application mentioned above may specifically be:
监听所述电子设备的通话行为,以确定所述电子设备的通话状态;Monitor the call behavior of the electronic device to determine the call status of the electronic device;
若确定所述电子设备处于挂断状态,则监听应用程序的音频播放行为,以确定所述电子设备的音频输出状态;If it is determined that the electronic device is in the hang-up state, monitor the audio playback behavior of the application to determine the audio output state of the electronic device;
若确定所述电子设备有音频输出,则对所述应用程序的音频播放行为进行分析,以确定所述应用程序是否为异常播放;If it is determined that the electronic device has audio output, analyze the audio playback behavior of the application program to determine whether the application program is abnormally played;
若确定所述应用程序为异常播放,则对所述应用程序进行处理。If it is determined that the application program is abnormally played, the application program is processed.
此外,本申请实施例还提供了一种计算机非易失性可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上述对应用程序进行处理的步骤。In addition, the embodiments of the present application also provide a computer non-volatile readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of processing the application program as described above are realized.
本发明实施例还提供了一种计算机设备。如图4所示,为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。该计算机设备可以为包括电子设备、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑、穿戴式设备等任意终端设备,以计算机设备为电子设备为例:An embodiment of the present invention also provides a computer device. As shown in FIG. 4, for ease of description, only parts related to the embodiments of the present invention are shown, and specific technical details are not disclosed, please refer to the method part of the embodiments of the present invention. The computer device may be any terminal device including an electronic device, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), an in-vehicle computer, a wearable device, etc. The computer device is an electronic device For example:
图4为与本发明实施例提供的计算机设备相关的电子设备的部分结构的框图。参考图4,电子设备包括:射频(Radio Frequency,RF)电路410、 存储器420、输入单元430、显示单元440、传感器450、音频电路460、无线保真(wireless fidelity,WiFi)模块470、处理器480、以及电源490等部件。本领域技术人员可以理解,图4所示的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。4 is a block diagram of a partial structure of an electronic device related to a computer device provided by an embodiment of the present invention. 4, the electronic device includes: a radio frequency (Radio Frequency) circuit 410, a memory 420, an input unit 430, a display unit 440, a sensor 450, an audio circuit 460, a wireless fidelity (WiFi) module 470, a processor 480, and power supply 490 and other components. Those skilled in the art may understand that the structure of the electronic device shown in FIG. 4 does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine some components, or arrange different components.
其中,RF电路410可用于收发信息或通话过程中,信号的接收和发送,可将基站的下行信息接收后,给处理器480处理;也可以将上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路410还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(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 410 can be used to receive and send signals during the sending and receiving of information or during a call. It can receive the downlink information of the base station and process it to the processor 480; it can also send the uplink data to the base station. Generally, RF circuits include but are not limited to antennas, at least one amplifier, transceiver, coupler, low noise amplifier (Low Noise Amplifier, LNA), duplexer, and so on. In addition, the RF circuit 410 can also communicate with other devices through 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 (Code Division) Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), e-mail, Short Message Service (SMS), etc.
存储器420可用于存储软件程序以及模块,处理器480通过运行存储在存储器420的软件程序以及模块,从而执行电子设备的各种功能应用以及数据处理。存储器420可主要包括程序存储区和数据存储区,其中,程序存储区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能的应用程序、图像播放功能的应用程序等)等;数据存储区可存储根据电子设备的使用所创建的数据(比如音频数据、通讯录等)等。此外,存储器420可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 420 may be used to store software programs and modules. The processor 480 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 420. The memory 420 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 electronic devices. In addition, the memory 420 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.
输入单元430可用于接收输入的数字或字符信息,以及产生与电子设备400的用户设置以及功能控制有关的键信号输入。具体地,输入单元430可包括触控面板431以及其他输入设备432。触控面板431,也可称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板431上或在触控面板431附近的操作),并根据预先设定的程式驱动相应的连接装置。在一个实施例中,触控面板431可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标, 再送给处理器480,并能接收处理器480发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板431。除了触控面板431,输入单元430还可以包括其他输入设备432。具体地,其他输入设备432可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)等中的一种或多种。The input unit 430 may be used to receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device 400. Specifically, the input unit 430 may include a touch panel 431 and other input devices 432. The touch panel 431, 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 or stylus on or near the touch panel 431 Operation), and drive the corresponding connection device according to the preset program. In one embodiment, the touch panel 431 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 To the processor 480, and can receive the command sent by the processor 480 and execute it. In addition, the touch panel 431 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 431, the input unit 430 may also include other input devices 432. Specifically, the other input devices 432 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.).
显示单元440可用于显示由用户输入的信息或提供给用户的信息以及电子设备的各种菜单。显示单元440可包括显示面板441。在一个实施例中,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板441。在一个实施例中,触控面板431可覆盖显示面板441,当触控面板431检测到在其上或附近的触摸操作后,传送给处理器480以确定触摸事件的类型,随后处理器480根据触摸事件的类型在显示面板441上提供相应的视觉输出。虽然在图4中,触控面板431与显示面板441是作为两个独立的部件来实现电子设备的输入和输入功能,但是在某些实施例中,可以将触控面板431与显示面板441集成而实现电子设备的输入和输出功能。The display unit 440 may be used to display information input by the user or information provided to the user and various menus of the electronic device. The display unit 440 may include a display panel 441. In one embodiment, the display panel 441 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 431 may cover the display panel 441, and when the touch panel 431 detects a touch operation on or near it, it is transmitted to the processor 480 to determine the type of touch event, and then the processor 480 according to The type of touch event provides corresponding visual output on the display panel 441. Although in FIG. 4, the touch panel 431 and the display panel 441 are implemented as two independent components to realize the input and input functions of the electronic device, in some embodiments, the touch panel 431 and the display panel 441 may be integrated And realize the input and output functions of electronic equipment.
电子设备400还可包括至少一种传感器450,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板441的亮度,接近传感器可在电子设备移动到耳边时,关闭显示面板441和/或背光。运动传感器可包括加速度传感器,通过加速度传感器可检测各个方向上加速度的大小,静止时可检测出重力的大小及方向,可用于识别电子设备姿态的应用(比如横竖屏切换)、振动识别相关功能(比如计步器、敲击)等;此外,电子设备还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器等。The electronic device 400 may further include at least one sensor 450, 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 441 according to the brightness of the ambient light, and the proximity sensor may close the display panel 441 and the electronic device when moving 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 to identify the posture of electronic devices (such as horizontal and vertical screen switching), and vibration recognition related functions For example, pedometer, percussion, etc .; in addition, electronic devices can also be equipped with other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc.
音频电路460、扬声器461和传声器462可提供用户与电子设备之间的音频接口。音频电路460可将接收到的音频数据转换后的电信号,传输到扬声器461,由扬声器461转换为声音信号输出;另一方面,传声器462将收集的声音信号转换为电信号,由音频电路460接收后转换为音频数据,再将音频数据输出处理器480处理后,经RF电路410可以发送给另一电子设备,或者将音频数据输出至存储器420以便后续处理。The audio circuit 460, the speaker 461, and the microphone 462 may provide an audio interface between the user and the electronic device. The audio circuit 460 can transmit the converted electrical signal of the received audio data to the speaker 461, which converts the speaker 461 into a sound signal for output; on the other hand, the microphone 462 converts the collected sound signal into an electrical signal, which is converted by the audio circuit 460 After receiving, it is converted into audio data, and then processed by the audio data output processor 480, and then sent to another electronic device via the RF circuit 410, or the audio data is output to the memory 420 for subsequent processing.
WiFi属于短距离无线传输技术,电子设备通过WiFi模块470可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图4示出了WiFi模块470,但是可以理解的是, 其并不属于电子设备400的必须构成,可以根据需要而省略。WiFi is a short-range wireless transmission technology. Electronic devices can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 470. It provides users with wireless broadband Internet access. Although FIG. 4 shows the WiFi module 470, it can be understood that it is not a necessary component of the electronic device 400, and may be omitted as needed.
处理器480是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器420内的软件程序和/或模块,以及调用存储在存储器420内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。在一个实施例中,处理器480可包括一个或多个处理单元。在一个实施例中,处理器480可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等;调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器480中。The processor 480 is a control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device, by running or executing software programs and / or modules stored in the memory 420, and calling data stored in the memory 420 , Perform various functions of electronic devices and process data, so as to monitor the electronic devices as a whole. In one embodiment, the processor 480 may include one or more processing units. In one embodiment, the processor 480 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, user interface, application programs, 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 480.
电子设备400还包括给各个部件供电的电源490(比如电池),优选的,电源可以通过电源管理系统与处理器480逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The electronic device 400 further includes a power supply 490 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 480 through the power management system, so as to implement functions such as charging, discharging, and power management through the power management system .
在一个实施例中,电子设备400还可以包括摄像头、蓝牙模块等。In one embodiment, the electronic device 400 may further include a camera, a Bluetooth module, and the like.
在本发明实施例中,该计算机设备所包括的处理器480执行存储在存储器上的计算机程序时实现上述各实施例的方法。In the embodiments of the present invention, the processor 480 included in the computer device implements the methods of the foregoing embodiments when executing the computer program stored on the memory.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等。本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时上述各实施例的方法。Those of ordinary skill in the art may understand that all or part of the processes in the method of the above embodiments may be completed by instructing relevant hardware through a computer program, and the program may be stored in a non-volatile computer-readable storage medium In this case, when the program is executed, it may include the flow of the above method embodiments. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), etc. An embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the methods of the foregoing embodiments.
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-mentioned embodiments can be combined arbitrarily. 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-mentioned embodiments only express several embodiments of the present invention, and their descriptions are more specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that, for a person of ordinary skill in the art, without departing from the concept of the present invention, several 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 (20)

  1. 一种对应用程序进行处理的方法,应用于电子设备,其特征在于,包括:A method for processing an application program, which is applied to an electronic device, is characterized by including:
    监听所述电子设备的通话行为,以确定所述电子设备的通话状态;Monitor the call behavior of the electronic device to determine the call status of the electronic device;
    若确定所述电子设备处于挂断状态,则监听所述电子设备中应用程序的音频播放行为,以确定所述电子设备的音频输出状态;If it is determined that the electronic device is in the hang-up state, monitor the audio playback behavior of the application program in the electronic device to determine the audio output state of the electronic device;
    若确定所述电子设备处于挂断状态时输出了音频,则对所述应用程序的音频播放行为进行分析,以确定所述应用程序是否为异常播放;If it is determined that the electronic device outputs audio when the electronic device is in the hang-up state, analyze the audio playback behavior of the application program to determine whether the application program is abnormally played;
    若确定所述应用程序为异常播放,则对所述应用程序进行处理。If it is determined that the application program is abnormally played, the application program is processed.
  2. 根据权利要求1所述的方法,其特征在于,在所述监听所述电子设备的通话行为前,还包括:The method according to claim 1, wherein before the monitoring of the call behavior of the electronic device, the method further comprises:
    记录所述电子设备内所有应用程序的音频行为以形成日志记录,所述日志记录包括:所有应用程序的播放记录、音频模式调节行为记录或录音行为记录的一种或多种的组合。Recording audio behaviors of all application programs in the electronic device to form a log record, the log records including: one or more combinations of playing records of all application programs, audio mode adjustment behavior records, or recording behavior records.
  3. 根据权利要求2所述的方法,其特征在于,所述对所述应用程序的音频播放行为进行分析,以确定所述应用程序是否为异常播放,包括:The method according to claim 2, wherein the analysis of the audio playback behavior of the application to determine whether the application is abnormally played includes:
    获取所述应用程序的音频播放行为,所述音频播放行为包括所述应用程序的运行时间、在运行期间占用的音频资源;Obtain the audio playback behavior of the application program, the audio playback behavior includes the running time of the application program, and audio resources occupied during the running;
    根据所述应用程序的音频播放行为确定所述应用程序在来电前是否有播放记录,若无,则确定所述应用程序为异常播放。According to the audio playback behavior of the application program, determine whether the application program has a playback record before the call, and if not, determine that the application program is abnormally played.
  4. 根据权利要求3所述的方法,其特征在于,所述应用程序携带有标识信息,所述标识信息用于唯一标识所述应用程序,则所述根据所述应用程序的音频播放行为确定所述应用程序在来电前是否有播放记录,包括:The method according to claim 3, wherein the application program carries identification information, and the identification information is used to uniquely identify the application program, and then the determination is made according to the audio playback behavior of the application program Whether the application has a playback record before the call, including:
    根据所述应用程序的标识信息查找在所述日志记录中的所述应用程序;Searching for the application program in the log record according to the identification information of the application program;
    根据所述日志记录查找所述应用程序对应的播放记录。Find the playback record corresponding to the application program according to the log record.
  5. 根据权利要求4所述的方法,其特征在于,所述根据日志记录查找所述应用程序对应的播放记录,包括:The method according to claim 4, wherein the searching for the playback record corresponding to the application according to the log record includes:
    设置所述应用程序与播放记录映射表;Setting the application program and playback record mapping table;
    根据所述映射表查找在来电前第二预设时间内所述应用程序的播放记 录。According to the mapping table, search the playing record of the application within a second preset time before the call.
  6. 根据权利要求1所述的方法,其特征在于,所述对所述应用程序进行处理,包括:The method according to claim 1, wherein the processing of the application program comprises:
    当确定所述应用程序异常播放时,按照预设方式发出提示消息,所述提示消息用于提示用户对所述应用程序进行处理;When it is determined that the application program is abnormally played, a prompt message is issued in a preset manner, and the prompt message is used to prompt the user to process the application program;
    当接收到用户针对所述提示消息的预设操作时,根据所述预设操作对所述应用程序进行关闭或播放处理。When receiving a preset operation of the user for the prompt message, the application program is closed or played according to the preset operation.
  7. 根据权利要求1所述的方法,其特征在于,所述监听所述电子设备的通话行为,以确定所述电子设备的通话状态,包括:The method according to claim 1, wherein the monitoring the call behavior of the electronic device to determine the call status of the electronic device includes:
    在通话过程中,监听通话的语音信号;During the call, monitor the voice signal of the call;
    根据所述语音信号判断通话挂断事件是否被触发;Determine whether the call hang-up event is triggered according to the voice signal;
    当所述通话挂断事件被触发时,确定所述电子设备处于挂断状态。When the call hang-up event is triggered, it is determined that the electronic device is in a hang-up state.
  8. 根据权利要求7所述的方法,其特征在于,所述根据所述语音信号判断通话挂断事件是否被触发,包括:The method according to claim 7, wherein the judging whether the call hang-up event is triggered according to the voice signal includes:
    判断在第一预设时间内是否监听到所述语音信号;Determine whether the voice signal is monitored within the first preset time;
    当在所述第一预设时间内未监听到所述语音信号时,确定所述通话挂断事件被触发。When the voice signal is not monitored within the first preset time, it is determined that the call hang-up event is triggered.
  9. 根据权利要求1所述的方法,其特征在于,所述监听应用程序的播放行为,包括:The method according to claim 1, wherein the monitoring of the playing behavior of the application program comprises:
    所述电子设备在应用层通过服务监听音频资源的创建和释放,获取应用程序的音频播放行为。The electronic device monitors the creation and release of audio resources through the service at the application layer to obtain the audio playback behavior of the application program.
  10. 一种对应用程序进行处理的装置,其特征在于,包括:An apparatus for processing application programs is characterized by comprising:
    第一监听模块,用于监听电子设备的通话行为,以确定所述电子设备的通话状态;A first monitoring module, configured to monitor the call behavior of the electronic device to determine the call status of the electronic device;
    第二监听模块,用于若确定所述电子设备处于挂断状态,则监听所述电子设备中应用程序的音频播放行为,以确定所述电子设备的音频输出状态;A second monitoring module, configured to monitor the audio playback behavior of the application in the electronic device to determine the audio output state of the electronic device if it is determined that the electronic device is in the hung-up state;
    分析模块,用于若确定所述电子设备处于挂断状态时输出了音频,则对所述应用程序的音频播放行为进行分析,以确定所述应用程序是否为异常播 放;The analysis module is configured to analyze the audio playback behavior of the application program to determine whether the application program is abnormally played if it is determined that the electronic device outputs audio when the electronic device is in the hung-up state;
    处理模块,用于若确定所述应用程序为异常播放,则对所述应用程序进行处理。The processing module is configured to process the application program if it is determined that the application program is abnormally played.
  11. 根据权利要求10所述的装置,其特征在于,在所述第一监听模块监听所述电子设备的通话状态前,还包括:The apparatus according to claim 10, wherein before the first monitoring module monitors the conversation state of the electronic device, the method further comprises:
    记录所述电子设备内所有应用程序的音频行为以形成日志记录,所述日志记录包括:所有应用程序的播放记录、音频模式调节行为记录或录音行为记录的一种或多种的组合。Recording audio behaviors of all application programs in the electronic device to form a log record, the log records including: one or more combinations of playing records of all application programs, audio mode adjustment behavior records, or recording behavior records.
  12. 根据权利要求11所述的装置,其特征在于,所述分析模块对所述应用程序的音频播放行为进行分析,以确定所述应用程序为异常播放,包括:The apparatus according to claim 11, wherein the analysis module analyzes the audio playback behavior of the application to determine that the application is abnormally played, including:
    获取所述应用程序的音频播放行为,所述音频播放行为包括所述应用程序的运行时间、在运行期间占用的音频资源;Obtain the audio playback behavior of the application program, the audio playback behavior includes the running time of the application program, and audio resources occupied during the running;
    根据所述应用程序的音频播放行为确定所述应用程序在来电前是否有播放记录,若无,则确定所述应用程序为异常播放。According to the audio playback behavior of the application program, determine whether the application program has a playback record before the call, and if not, determine that the application program is abnormally played.
  13. 根据权利要求12所述的装置,其特征在于,所述应用程序携带有标识信息,所述标识信息用于唯一标识所述应用程序,则所述根据所述应用程序的音频播放行为确定所述应用程序在来电前是否有播放记录,包括:The apparatus according to claim 12, wherein the application program carries identification information, and the identification information is used to uniquely identify the application program, and then the determination is made according to the audio playback behavior of the application program Whether the application has a playback record before the call, including:
    根据所述应用程序的标识信息查找在所述日志记录中的所述应用程序;Searching for the application program in the log record according to the identification information of the application program;
    根据所述日志记录查找所述应用程序对应的播放记录。Find the playback record corresponding to the application program according to the log record.
  14. 根据权利要求13所述的装置,其特征在于,所述分析模块根据日志记录查找所述应用程序对应的播放记录,包括:The apparatus according to claim 13, wherein the analysis module searches for the playback record corresponding to the application according to the log record, including:
    设置所述应用程序与播放记录映射表;Setting the application program and playback record mapping table;
    根据所述映射表查找在来电前第二预设时间内所述应用程序的播放记录。According to the mapping table, search for the playing record of the application within a second preset time before the call.
  15. 根据权利要求10所述的装置,其特征在于,所述处理模块对所述应用程序进行处理,包括:The apparatus according to claim 10, wherein the processing module processing the application program includes:
    当确定所述应用程序异常播放时,按照预设方式发出提示消息,所述提示消息用于提示用户对所述应用程序进行处理;When it is determined that the application program is abnormally played, a prompt message is issued in a preset manner, and the prompt message is used to prompt the user to process the application program;
    当接收到用户针对所述提示消息的预设操作时,根据所述预设操作对所述应用程序进行关闭或播放处理。When receiving a preset operation of the user for the prompt message, the application program is closed or played according to the preset operation.
  16. 根据权利要求10所述的装置,其特征在于,所述第一监听模块监听所述电子设备的通话行为,以确定所述电子设备的通话状态,包括:The apparatus according to claim 10, wherein the first monitoring module monitors the call behavior of the electronic device to determine the call status of the electronic device, including:
    在通话过程中,监听通话的语音信号;During the call, monitor the voice signal of the call;
    根据所述语音信号判断通话挂断事件是否被触发;Determine whether the call hang-up event is triggered according to the voice signal;
    当所述通话挂断事件被触发时,确定所述电子设备处于挂断状态。When the call hang-up event is triggered, it is determined that the electronic device is in a hang-up state.
  17. 根据权利要求16所述的装置,其特征在于,所述第一监听模块根据所述语音信号判断通话挂断事件是否被触发,包括:The apparatus according to claim 16, wherein the first monitoring module determines whether a call hangup event is triggered according to the voice signal, including:
    判断在第一预设时间内是否监听到所述语音信号;Determine whether the voice signal is monitored within the first preset time;
    当在所述第一预设时间内未监听到所述语音信号时,确定所述通话挂断事件被触发。When the voice signal is not monitored within the first preset time, it is determined that the call hang-up event is triggered.
  18. 根据权利要求10所述的装置,其特征在于,所述第二监听模块监听应用程序的音频播放行为,包括:The apparatus according to claim 10, wherein the second monitoring module monitoring the audio playback behavior of the application program comprises:
    所述电子设备在应用层通过服务监听音频资源的创建和释放,获取应用程序的音频播放行为。The electronic device monitors the creation and release of audio resources through the service at the application layer to obtain the audio playback behavior of the application program.
  19. 一种电子设备,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如权利要求1至9中任一项所述的对应用程序进行处理的方法的步骤。An electronic device includes a memory and a processor, and a computer program is stored in the memory, and when the computer program is executed by the processor, the processor is executed as described in any one of claims 1 to 9. Steps of a method for processing applications.
  20. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至9中任一项所述的方法的步骤。A computer-readable storage medium on which a computer program is stored, characterized in that when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are realized.
PCT/CN2018/116894 2018-11-22 2018-11-22 Method and apparatus for processing application program, and electronic device WO2020103070A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/116894 WO2020103070A1 (en) 2018-11-22 2018-11-22 Method and apparatus for processing application program, and electronic device
CN201880098195.4A CN113039516A (en) 2018-11-22 2018-11-22 Method and device for processing application program and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/116894 WO2020103070A1 (en) 2018-11-22 2018-11-22 Method and apparatus for processing application program, and electronic device

Publications (1)

Publication Number Publication Date
WO2020103070A1 true WO2020103070A1 (en) 2020-05-28

Family

ID=70773775

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/116894 WO2020103070A1 (en) 2018-11-22 2018-11-22 Method and apparatus for processing application program, and electronic device

Country Status (2)

Country Link
CN (1) CN113039516A (en)
WO (1) WO2020103070A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112489642A (en) * 2020-10-21 2021-03-12 深圳追一科技有限公司 Method, apparatus, device and storage medium for controlling voice robot response
CN113904745A (en) * 2020-06-22 2022-01-07 广州辉群智能科技有限公司 Broadcast control method, electronic device and storage medium
CN114121050A (en) * 2021-11-30 2022-03-01 云知声智能科技股份有限公司 Audio playing method and device, electronic equipment and storage medium
CN115225917A (en) * 2021-04-15 2022-10-21 北京字节跳动网络技术有限公司 Recording plug-flow method, device, equipment and medium
CN117112269A (en) * 2023-10-24 2023-11-24 湖南双鸿科技有限公司 Method for realizing data transmission across APP based on android auxiliary service function
CN112489642B (en) * 2020-10-21 2024-05-03 深圳追一科技有限公司 Method, device, equipment and storage medium for controlling voice robot response

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104703035A (en) * 2015-02-12 2015-06-10 卓易畅想(北京)科技有限公司 Method and device for playing multimedia online through user device
CN105895128A (en) * 2016-03-30 2016-08-24 广东欧珀移动通信有限公司 Playing method and associated device
CN106126179A (en) * 2016-06-24 2016-11-16 联想(北京)有限公司 A kind of information processing method and electronic equipment
CN108319442A (en) * 2018-01-23 2018-07-24 维沃移动通信有限公司 A kind of control method and mobile terminal of audio broadcasting
CN108668016A (en) * 2018-04-16 2018-10-16 Oppo广东移动通信有限公司 Information processing method, device, mobile terminal and computer readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105530381A (en) * 2015-12-24 2016-04-27 小米科技有限责任公司 Call hanging-up method and device
CN107623777A (en) * 2017-08-29 2018-01-23 努比亚技术有限公司 Terminal and its control method for playing back, computer-readable recording medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104703035A (en) * 2015-02-12 2015-06-10 卓易畅想(北京)科技有限公司 Method and device for playing multimedia online through user device
CN105895128A (en) * 2016-03-30 2016-08-24 广东欧珀移动通信有限公司 Playing method and associated device
CN106126179A (en) * 2016-06-24 2016-11-16 联想(北京)有限公司 A kind of information processing method and electronic equipment
CN108319442A (en) * 2018-01-23 2018-07-24 维沃移动通信有限公司 A kind of control method and mobile terminal of audio broadcasting
CN108668016A (en) * 2018-04-16 2018-10-16 Oppo广东移动通信有限公司 Information processing method, device, mobile terminal and computer readable storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113904745A (en) * 2020-06-22 2022-01-07 广州辉群智能科技有限公司 Broadcast control method, electronic device and storage medium
CN113904745B (en) * 2020-06-22 2024-02-27 广州辉群智能科技有限公司 Broadcast control method, electronic equipment and storage medium
CN112489642A (en) * 2020-10-21 2021-03-12 深圳追一科技有限公司 Method, apparatus, device and storage medium for controlling voice robot response
CN112489642B (en) * 2020-10-21 2024-05-03 深圳追一科技有限公司 Method, device, equipment and storage medium for controlling voice robot response
CN115225917A (en) * 2021-04-15 2022-10-21 北京字节跳动网络技术有限公司 Recording plug-flow method, device, equipment and medium
CN114121050A (en) * 2021-11-30 2022-03-01 云知声智能科技股份有限公司 Audio playing method and device, electronic equipment and storage medium
CN117112269A (en) * 2023-10-24 2023-11-24 湖南双鸿科技有限公司 Method for realizing data transmission across APP based on android auxiliary service function
CN117112269B (en) * 2023-10-24 2024-01-26 湖南双鸿科技有限公司 Method for realizing data transmission across APP based on android auxiliary service function

Also Published As

Publication number Publication date
CN113039516A (en) 2021-06-25

Similar Documents

Publication Publication Date Title
WO2017206916A1 (en) Method for determining kernel running configuration in processor and related product
WO2020103070A1 (en) Method and apparatus for processing application program, and electronic device
US20160314219A1 (en) Method and apparatus for invoking application programming interface
CN106371964B (en) Method and device for prompting message
CN107465841B (en) Fault information reporting method and terminal
US20200174741A1 (en) Audio Playing Method and Electronic Device
CN106254910B (en) Method and device for recording image
WO2017215661A1 (en) Scenario-based sound effect control method and electronic device
WO2018049934A1 (en) Data migration method and terminals
WO2020118495A1 (en) Audio resource allocation method, device, and electronic apparatus
WO2020103045A1 (en) Application processing method and apparatus and electronic device
CN105162930B (en) The way of recording and device of mobile terminal
CN109669662A (en) A kind of pronunciation inputting method, device, storage medium and mobile terminal
US10853092B2 (en) Method and device for sound effect processing
WO2015078349A1 (en) Microphone sound-reception status switching method and apparatus
KR101876394B1 (en) Method and device for playing media data on a terminal
CN110989816B (en) Application processing method and device and storage medium
WO2020107177A1 (en) Audio resource invoking method and apparatus, and electronic device
CN107770449A (en) continuous shooting method, electronic equipment and storage medium
JP2020535774A (en) Notification message processing method and terminal
CN105159655B (en) Behavior event playing method and device
US20210286588A1 (en) Method and apparatus for playing alarm and electronic device
CN110891262A (en) Bluetooth pairing method, system and terminal equipment
WO2020097787A1 (en) Method, apparatus, and electronic device for audio resource release
WO2020107169A1 (en) Audio mode correction method and apparatus, and electronic device

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: 18940767

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18940767

Country of ref document: EP

Kind code of ref document: A1

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 29.09.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18940767

Country of ref document: EP

Kind code of ref document: A1