CN113170014A - Alarm clock playing method and device and electronic equipment - Google Patents

Alarm clock playing method and device and electronic equipment Download PDF

Info

Publication number
CN113170014A
CN113170014A CN201880098683.5A CN201880098683A CN113170014A CN 113170014 A CN113170014 A CN 113170014A CN 201880098683 A CN201880098683 A CN 201880098683A CN 113170014 A CN113170014 A CN 113170014A
Authority
CN
China
Prior art keywords
audio
alarm clock
resource
playing
state
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201880098683.5A
Other languages
Chinese (zh)
Other versions
CN113170014B (en
Inventor
李亚军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
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 Guangdong Oppo Mobile Telecommunications Corp Ltd, Shenzhen Huantai Technology Co Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN113170014A publication Critical patent/CN113170014A/en
Application granted granted Critical
Publication of CN113170014B publication Critical patent/CN113170014B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/60Substation equipment, e.g. for use by subscribers including speech amplifiers
    • H04M1/6033Substation equipment, e.g. for use by subscribers including speech amplifiers for providing handsfree use or a loudspeaker mode in telephone sets
    • H04M1/6041Portable telephones adapted for handsfree use
    • H04M1/6058Portable telephones adapted for handsfree use involving the use of a headset accessory device connected to the portable telephone
    • H04M1/6066Portable telephones adapted for handsfree use involving the use of a headset accessory device connected to the portable telephone including a wireless connection
    • 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
    • G06F3/162Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs
    • 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
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • 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/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72451User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to schedules, e.g. using calendar applications
    • 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/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • 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/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72463User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions to restrict the functionality of the device
    • 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/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72442User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for playing music files
    • 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/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72484User interfaces specially adapted for cordless or mobile telephones wherein functions are triggered by incoming communication events

Abstract

A method for alarm clock playing comprises the following steps: receiving an alarm clock playing instruction (S110); monitoring an occupation state of an audio resource for alarm clock playing before the alarm clock playing (S120); if the occupation state of the audio resource is occupation, acquiring occupation party information (S130); if the user is a non-call application, the audio resource occupied by the user is released to play the alarm clock by using the audio resource (S140). The device for playing the alarm clock, the electronic equipment and the computer readable storage medium solve the problem of abnormal playing caused by occupied audio resources of the alarm clock playing in the prior art, realize automatic correction of the alarm clock playing, improve the stability of the system and improve the user experience.

Description

Alarm clock playing method and device and electronic equipment
Description
The invention name is as follows: alarm clock playing method and device and electronic equipment
Technical Field
The present application relates to the field of information technology, and in particular, to a method, an apparatus and an electronic device for playing an alarm clock
Background
With the progress of technology, the audio modes of electronic equipment are also richer and richer, the current audio modes can be divided into several mainstream modes such as ring, system, media, call and alarm clock, and the occupied interface resources are independent from each other in different audio modes, for example, the alarm clock is played in the ring mode, the system audio is played in the system mode, the media audio stream is played in the media mode, the call audio stream is transmitted in the call mode, and the two modes are independent from each other and do not affect each other. However, due to the complexity of the operation of the current electronic device, an alarm clock is abnormally played when some application programs call audio resources, so that great influence is caused on the use, important event omission prompting, lack of daily life events and the like are caused, and the user experience is influenced. Disclosure of Invention
Based on this, there is a need to provide a method, an apparatus, an electronic device and a computer-readable storage medium for alarm clock playing, which can automatically correct the abnormal alarm clock playing.
The embodiment of the application provides a method for playing an alarm clock, which comprises the following steps:
receiving an instruction of alarm clock playing;
monitoring the occupation state of the audio resource used for the alarm clock playing before the alarm clock playing; if the occupation state of the audio resource is occupation, acquiring occupation party information;
and if the occupier is the non-call application, releasing the audio resource occupied by the occupier so as to play the alarm clock by using the audio resource.
The embodiment of the present application further provides a device for playing an alarm clock, including:
the receiving module is used for receiving an alarm clock playing instruction;
the monitoring module is used for monitoring the occupation state of the audio resource used for the alarm clock playing before the alarm clock playing;
the acquisition module is used for acquiring the information of an occupier if the audio resource is occupied; and the correction module is used for releasing the audio resource of the occupier if the occupier is a non-call application so as to play the alarm clock by utilizing the audio resource.
An embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program, and when the computer program is executed by the processor, the processor is caused to execute the steps of the alarm clock playing method according to any one of claims 1 to 7.
An embodiment of the present application further provides a computer non-volatile readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the alarm clock playing method according to any one of claims 1 to 7.
When the method is realized by the electronic equipment and the computer readable storage medium, the audio resource is corrected in a self-adaptive manner according to different occupation states of the audio resource so as to be matched with the scene, the risk of abnormal alarm clock playing is reduced, the stability of the system is enhanced, and the user experience is improved. Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain drawings of other embodiments based on these drawings without creative efforts.
FIG. 1 is a flow chart of an alarm clock playing method in an embodiment;
fig. 2 is a schematic structural diagram of an alarm clock playing device in an embodiment;
FIG. 3 is a schematic diagram of an internal structure of an electronic device according to an embodiment;
fig. 4 is a block diagram of a partial structure of an electronic device related to a computer device provided in an embodiment of the present application. Detailed Description
To facilitate an understanding of the present application, the present application will now be described more fully with reference to the accompanying drawings. Preferred embodiments of the present application are set forth in the accompanying drawings. This application may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
As shown in fig. 1, an embodiment of the present application provides a method for playing an alarm clock, including: 5101. Receiving an instruction of alarm clock playing;
the alarm clock playing behavior instruction may be a ringtone resource identifier, a music ringtone played by the alarm clock, an alarm clock sound volume adjustment, a music media format supported by the alarm clock, such as mp3 and mp4 supported, or an alarm clock prompt box display size, such as 320 × 240, and adapt the alarm clock prompt box to information such as a music media and a picture corresponding to the alarm clock according to the capability information of the terminal.
5102. Monitoring the occupation state of the audio resource used for the alarm clock playing before the alarm clock playing; the electronic device can monitor the audio resource occupation state information played by the alarm clock of the application program through a built-in monitoring function (listen ()), for example, taking the electronic device of the android system as an example, a system-level monitoring module can be created in a system framework layer (native/frame layer), and the audio mode of the application program is monitored through the monitoring module, or a monitoring process is independently created, and the audio mode of the application program is monitored through a message transmission mechanism. For example, a monitoring module can be set up in a framework layer and run in a system service program (system _ server), and because the monitoring module is set up in a service framework layer of a system level, interaction with other system services can be facilitated without worrying about authority issues in system calling. In addition, an independent monitoring process can be created, an independent monitoring function is set and called in the process, the process can be set to be started up and started up automatically, the audio calling behavior and the audio mode adjusting behavior of any other application program can be monitored in real time, specifically, the ID information and the adjusting quantity of the currently called audio mode can be captured in real time, the audio mode corresponding to the current adjusting behavior and the specific adjusting quantity can be determined accordingly, independent development can be achieved, coupling with a system is avoided, and subsequent development and upgrading are facilitated.
The Audio resource played by the alarm clock refers to a function resource played by the terminal Audio, for example, a setmode interface set by an Audio Flinger service, and under the existing android frame, the Audio behavior playing can be realized by calling the setmode function, for example, setmode (o) is defined as a media Audio mode, setmode is an alarm clock ring mode, and setmode (2) is a voice call mode. In step S102, it is detected whether the function interface is occupied, that is, the occupied state information of the audio resource played by the alarm clock may be checked by monitoring the occupied state identifier of the function interface (i.e., setmode (l)).
5103. If the occupation state of the audio resource is occupation, acquiring occupation party information;
the audio resource played by the alarm clock is an interface of a function interface for terminal audio playing, for example, a setmode function interface is an audio resource for setting an alarm clock playing behavior, and if the setmode function interface is occupied, the corresponding audio resource state identifier played by the alarm clock displays that the current state is occupied.
The electronic equipment can acquire the occupation party information of a certain application program or a plurality of application programs in real time, wherein the occupation party information can include audio playing information, recording information and/or audio mode information, and specifically, the audio playing information, the recording information and the audio mode information can all include: the method comprises the following steps of carrying out the operation of the system, carrying out the operation of the occupation of the. That is, the occupation behavior of the occupation party is not matched with the audio resource played by the occupied alarm clock, the occupation party information needs to be recorded for later correction processing. For example, the occupied audio stream is a media stream but occupies a setmode (l) audio function interface, and the audio interface corresponding to the media stream is a setmode self-tapping audio function interface. Since setmode (l) is an alarm clock ringing mode, the occupation phenomenon that the audio stream and setmode (l) audio function interface are not matched can cause abnormal or even impossible playing of the alarm clock ringing.
It should be noted that whether the occupier is maliciously occuping the utilization of the audio resource played by the alarm clock or not can be judged by recording the relationship between the occupational behavior and the unmatched occupational frequency and the preset frequency of the audio resource played by the alarm clock through a log, the occupational behavior and the unmatched occupational frequency of the audio resource played by the alarm clock are higher than the preset frequency and are regarded as maliciously occupational, and the occupational behavior and the unmatched occupational frequency of the audio resource played by the alarm clock are lower than the preset frequency and are regarded as mistakenly occupational. The preset frequency is set according to practical situations, and the embodiment is not limited at all. Or, by detecting that the party engaged is not performing audio activity but is engaging an audio resource that does not match its audio stream, it is considered malicious engagement. And (3) implementing a blacklist for the application program of the malicious occupied party, monitoring the audio behavior of the application program in an important way, and setting prompt information to indicate that the application software has malicious occupied behaviors even when the application program in the blacklist is installed by a user in an application store. For the occupied party which is occupied by mistake, the occupied resources can be adjusted in time when the device is used.
The occupation information of the occupation party can be obtained through a listening function (listen () function) in the system, when needed, the application program can call the corresponding audio resource, and the listening function can record the audio resource called by the application program and the occupation party information of the audio resource. The method comprises the steps of obtaining information of an occupier, including obtaining a program name, audio behaviors, an occupation duration, whether the occupier is maliciously occupied or not and a corresponding research and development company of the program of the occupier, so that log management is well done, and when the audio behaviors are even implemented on the program of the occupier, key monitoring is done, and the situation that the occupier does not match and occupies audio resources, so that abnormal playing of an audio stream matched with the audio resources is caused is prevented.
And S104, if the occupied party is a non-call application, releasing the audio resource occupied by the occupied party so as to play the alarm clock by utilizing the audio resource.
The occupation information of an occupation party can be obtained through a monitoring function (listen () function) in the system, the occupation party is determined to be non-call application according to the obtained occupation party information, when the occupation of audio resources conflicts, if the occupation party is instant communication application, the occupation party occupies the audio resources played by the alarm clock and stops playing after using the audio resources once, when the occupation party occupies the audio resources, whether the playing ending moment of the audio resources reaches the playing moment of the alarm clock needs to be judged, if the playing ending moment of the audio resources once conflicts with the playing starting moment of the alarm clock, the audio resources are directly released, and the use of the audio resources by the alarm clock is recovered in time so that the alarm clock can be normally played; if the playing ending time of the audio resource and the playing starting time of the alarm clock do not conflict, namely the playing starting time of the alarm clock is not reached by the ending time of the audio resource, the alarm clock occupies the audio resource after the playing of the audio resource is ended, so that the playing of the alarm clock is normal. If the occupier is the non-instant communication application, the occupier monopolizes the audio resource to realize the continuous playing of a plurality of audio files, the audio resource is not released until the non-instant communication application quits, and when the occupier occupies the audio resource, the audio resource is directly released, and the alarm clock is recovered to recover the use of the audio resource. The abnormal alarm clock playing caused by the fact that the occupied party is corrected and audio resources are not used in a standard mode, and the experience of an audio user is improved.
The method provided in the embodiment of the present application further includes: if the occupied party is the conversation application, monitoring the conversation state of the conversation application; and if the call state is in a stop state, releasing the audio resources occupied by the occupier so as to play the alarm clock by using the audio resources.
And detecting whether a voice signal is transmitted in an audio channel of the current electronic equipment in real time to judge whether the conversation application is in a starting state or a stopping state. The voice signal comprises a voice signal input by a microphone of the current electronic equipment and a voice signal sent by a counterpart from a network side. And detecting that no voice signal is transmitted in an audio channel of the current electronic equipment in real time, namely that the call state is in a stop state, releasing the audio resource occupied by the occupied party so as to play the alarm clock through the audio resource. That is, it means that if it is determined that the occupied party is the call application according to the occupied party information, it is detected whether the call is actually performed, and there may be a case where the call application occupies the audio resource and the call state is a stop state.
In the conversation process, the electronic equipment can monitor the voice signal of the conversation in real time, judge whether the conversation hang-up event is triggered or not according to the monitored voice signal, and determine that the electronic equipment is in a hang-up state when the conversation hang-up event is triggered. Specifically, during the call, the electronic device detects in real time whether a voice signal is transmitted in an audio channel of the current electronic device, where the voice signal includes a voice signal input by a microphone of the current electronic device and a voice signal transmitted from the network side by the other party. When at least one voice signal is monitored, the communication is still carried out.
The method provided in the embodiment of the present application further includes: if the call state is in a starting state, monitoring whether the call state is switched from the starting state to a stopping state within a preset time; monitoring that the conversation state is switched from a starting state to a stopping state within preset time, and detecting whether the conversation application occupies the audio resource; if the conversation application continues to occupy the audio resources after the conversation application is switched to the stop state, releasing the audio resources occupied by the conversation application; and if the call application releases the audio resource, playing the alarm clock.
The process of detecting the call state may be: monitoring a voice signal of the call in real time, judging whether a call hang-up event is triggered or not according to the monitored voice signal, and determining that the electronic equipment is in a hang-up state when the call hang-up event is triggered. Specifically, during the call, the electronic device detects in real time whether a voice signal is transmitted in an audio channel of the current electronic device, where the voice signal includes a voice signal input by a microphone of the current electronic device and a voice signal transmitted from the network side by the other party. When at least one voice signal is monitored, the communication is still carried out.
Detecting that the call state is the start state, that is, the call application executes the call behavior, and detecting that the call state is the stop state, that is, the call application stops the call behavior, that is, a process of switching the call state from the start state to the stop state is detected, by setting a preset time, for example, setting the preset time to any value in 10min to 60min, for example, imon, 20min, 30min, 40min, 50min, 60min, or, of course, 3min and 5min, or else, the preset time may be set by itself according to a user requirement or preference, and is not limited herein. And in a preset time, monitoring that the conversation state is switched from the starting state to the stopping state, namely monitoring that the conversation is stopped, checking whether the stopped conversation application still occupies audio resources, if the conversation application still occupies the audio resources, releasing the audio resources occupied by the conversation application, and playing an alarm clock through the audio resources. And if the call state is switched from the starting state to the stopping state and the call application releases the audio resource, directly playing the alarm clock by using the audio resource.
The method provided in the embodiment of the present application further includes: and setting audio standby resources, and when the occupier releases the audio resources, switching the audio behavior of the occupier to the audio standby resources so as to enable the occupier to normally play the audio behavior, or switching the conversation state from the starting state to the stopping state without monitoring within preset time by using the audio standby resources, and playing the alarm clock by using the audio standby resources. Switching the audio behavior of the occupier to the audio standby resource, comprising: and the occupier calls the audio standby resource according to the priority of the audio behavior, and the audio standby resource provides the occupier with the authority for modifying the priority.
And setting audio standby resources in the electronic equipment, performing mode conversion on the audio mode through the audio standby resources, and in S104, after the occupier releases the alarm clock to play the audio resources, the alarm clock occupies the audio resources and the alarm clock normally plays. And setting audio standby resources to switch the occupied party releasing the alarm clock to play the audio resources to the audio standby resources so that the audio resources of the occupied party can still be played normally. Namely, the occupation party represents the non-call application, the priority of the non-call application is lower than that of the alarm clock, the occupation party of the non-call application releases the audio resource and switches to the audio standby resource, and the alarm clock plays the alarm clock by utilizing the audio resource. If the occupier is a call application, switching the call state of the call application from a starting state to a stopping state within a preset time without monitoring, namely indicating that the call duration exceeds the preset time, and playing the alarm clock by using the audio standby resource in order to prevent major events from missing reminding. The preset time may be set to any value from 10min to 60min, such as llomin, 20min, 30min, 40min, 50min, and 60min, or may be 3min, 5min, or other values, and the preset time may be set according to the user's needs or preferences, which is not limited herein. And in a preset time, monitoring that the conversation state is switched from the starting state to the stopping state, namely monitoring that the conversation is stopped, checking whether the stopped conversation application still occupies audio resources, if the conversation application still occupies the audio resources, releasing the audio resources occupied by the conversation application, and playing an alarm clock through the audio resources. And if the call state is switched from the starting state to the stopping state and the call application releases the audio resource, directly playing the alarm clock by using the audio resource.
In the android system, according to the existing google SDK development package protocol, a setmode function may be used as the audio standby resource, and in the existing android framework, audio resource conversion may be implemented by calling the setmode function, for example, setmode (o) is defined as a media audio mode, setmode (1) is a ring mode, and setmode (2) is defined as a call mode. Specifically, audio standby resources are set, audio resources of an occupied party are converted through the audio standby resources, and an audio mode of an application program is converted into the audio resources matched with the scene information through the audio standby resources by setting an audio mode and audio mode mapping table and according to the mapping table. As in the above example, in particular, within the mapping table, the audio resources match audio patterns, setmode (o) matches media audio patterns, setmode (l) matches ring patterns, setmode (2) matches talk patterns, etc. The call mode can be subdivided into a handset mode and a hands-free mode. The mapping table may be stored in the electronic device memory in the form of a database, and when it needs to be called, the mapping table may be accessed through an internal instruction to determine the audio resource corresponding to the audio mode.
It is noted that different audio types have different default priorities, e.g. from high to low priority for talk, recording, music, video and games. High priority audio is played in preference to low priority audio. The audio packets that send the voice message are at the time the audio acquisition qaudio register object is created. The audio standby resource provides the right to modify the priority to the occupying party, for example, the priority of game is modified to be higher than that of music, the priority of game is modified to be higher than that of recording, and the priority of music is modified to be higher than that of conversation, and the priorities of any audio behaviors can be adjusted up and down according to the preference and the requirement of a user, and the details are not repeated here.
The method provided in the embodiment of the present application further includes: and if the occupation state of the audio resource played by the alarm clock is idle, playing the alarm clock through the audio resource.
The electronic device can monitor the audio resource occupation state information of the application program through a built-in monitoring function, for example, an electronic device of an android system, a system-level monitoring module can be created in a system framework layer (native/frame layer), and an audio mode of the application program is monitored through the monitoring module, or a monitoring process is independently created, and the audio mode of the application program is monitored through a message transmission mechanism. For example, a monitoring module can be set up in a framework layer and run in a system service program (system _ server), and because the monitoring module is set up in a service framework layer at a system level, interaction with other system services can be facilitated without worrying about authority issues in system calling. If the audio resource played by the alarm clock is not occupied, namely the playing state of the alarm clock is in a normal condition, the alarm clock can be directly played, and the alarm clock is normally played.
As shown in fig. 2, an embodiment of the present application provides an apparatus for playing an alarm clock, including:
the receiving module 21 is configured to receive an instruction of playing an alarm clock;
the alarm clock playing behavior instruction received by the receiving module 21 may be a ringtone resource identifier, a music ringtone played by the alarm clock, an alarm clock ringtone volume adjustment, a music media format supported by the alarm clock, such as mp3 and mp4 formats, or an alarm clock prompt box display size, such as 320 × 240, and adapt the alarm clock prompt box to information such as music media and pictures corresponding to the alarm clock according to the capability information of the terminal.
A monitoring module 22, configured to monitor an occupancy state of an audio resource 221 (not shown in the figure) for the alarm clock playing before the alarm clock playing;
the monitoring module 22 may be a built-in monitoring function, and is configured to monitor the occupation state information of the audio resource 221 played by the alarm clock of the application program, for example, an electronic device of an android system may be used to create a system-level monitoring module in a system framework layer (native/frame layer), and monitor the audio mode of the application program through the monitoring module, or create a monitoring process independently, and monitor the audio mode of the application program through a message transmission mechanism. For example, the monitoring module may be set up in the framework layer and run in the system service program (system _ server), and since the monitoring module 22 is set up in the service framework layer of the system level, it can facilitate interaction with other system services without worrying about the authority problem when the system is invoked. In addition, an independent monitoring process can be created, an independent monitoring function is set and called in the process, the process can be set to be started up automatically, the audio calling behavior and the audio mode adjusting behavior of any other application program are monitored in real time, specifically, the ID information and the adjusting quantity of the currently called audio mode can be captured in real time, the audio mode and the specific adjusting quantity corresponding to the current adjusting behavior are determined, independent development can be achieved, coupling with a system is avoided, and subsequent development and upgrading are facilitated. The Audio resource 221 played by the alarm clock refers to a function resource played by the terminal Audio, and may be a setmode resource set by an Audio Flinger service, for example, and in the existing android framework, the Audio behavior playing may be implemented by calling the setmode function, for example, setmode (o) is defined as a media Audio mode, setmode is an alarm clock ring mode, and setmode (2) is a voice call mode. In step S102, it is detected whether the function resource is occupied, that is, the occupancy state information of the audio resource 221 played by the alarm clock can be checked by monitoring the occupancy state identifier of the function resource.
An obtaining module 23, configured to obtain information of an occupation party if an occupation state of the audio resource is occupation of the resource 221; the audio resource 221 played by the alarm clock is a resource of the function resource played by the terminal audio, for example, the function resource (setmode) (l) is an audio resource for setting an alarm clock playing behavior, if the function resource (setmode) (l) is occupied, the state identifier of the audio resource corresponding to the function resource will display that the current state is occupied, and the state information of the audio resource 221 played by the alarm clock is obtained through the detection module.
The obtaining module 23 may obtain the information of the occupied party of a certain application program or multiple application programs in real time, wherein the information of the occupied party obtained by the obtaining module 23 may include audio playing information, recording information and/or audio mode information, and specifically, the audio playing information, the recording information and the audio mode information may include: the method comprises the steps of acquiring the name of an occupier program, the audio behavior, the duration of occupation, whether the occupier is maliciously occupied or not, and developing a company corresponding to the occupier application. That is, the occupation behavior of the occupied party does not match with the audio resource 221 played by the occupied alarm clock, the information of the occupied party needs to be recorded for the post correction processing. For example, the occupied audio stream is a media stream, but occupies a setmode audio function resource, and the audio resource corresponding to the media stream is a setmode self-sustaining audio function resource. Since setmode (l) is an alarm clock ring mode, the occupation phenomenon that the audio stream and setmode (l) audio function resources are mismatched will cause abnormal playing of the alarm clock ring, even the alarm clock ring cannot be played.
It should be noted that whether the occupier is maliciously occupied by the audio resource 221 played by the alarm clock or not can be determined by recording the relationship between the occurrence of the occupation behavior and the mismatch occupation frequency and the preset frequency of the audio resource 221 played by the alarm clock, the mismatch occupation frequency of the occupier is higher than the preset frequency and is regarded as maliciously occupied, and the mismatch occupation frequency of the occupier is lower than the preset frequency and is regarded as being occupied by mistake. Or the occupation party does not implement the audio behavior and occupies the audio resource which is not matched with the audio stream of the occupation party by detecting, and the occupation party is regarded as malicious occupation. And implementing a blacklist for the application program of the malicious occupied party, monitoring the audio behavior of the application program in an important way, and even setting prompt information to indicate that the application software has malicious occupied behavior when the application program in the blacklist is installed by a user of an application store. For the occupied party which is occupied by mistake, the occupied resources can be adjusted in time when the device is used.
The occupation information of the occupation party can be obtained through a listening function (listen ()) in the system, when needed, the application program can call the corresponding audio resource, and the listening function can record the audio resource called by the application program and the occupation party information of the audio resource. The method comprises the steps of obtaining information of an occupier, including obtaining a program name, audio behaviors, an occupation duration, whether the occupier is maliciously occupied or not and a corresponding research and development company of the program of the occupier, so that log management is well done, and when the audio behaviors are even implemented on the program of the occupier, key monitoring is done, and the situation that the occupier does not match and occupies audio resources, so that abnormal playing of an audio stream matched with the audio resources is caused is prevented.
And the correcting module 24 is configured to release the audio resource occupied by the occupied party if the occupied party is a non-call application, so as to play the alarm clock by using the audio resource.
The occupation information of an occupation party can be obtained through a monitoring function (listen () function) in the system, the occupation party is determined to be non-call application according to the obtained occupation party information, under the condition of audio resource occupation conflict, if the occupation party is instant communication application, the occupation party occupies audio resources played by the alarm clock and stops playing after using the audio resources once, when the occupation party occupies the audio resources, whether the playing ending moment of the audio resources reaches the playing moment of the alarm clock needs to be judged, if the playing ending moment of the audio resources once conflicts with the playing starting moment of the alarm clock, the audio resources are directly released, and the use of the audio resources by the alarm clock is recovered in time so as to enable the alarm clock to play normally; if the playing ending time of the audio resource and the playing starting time of the alarm clock do not conflict, namely the playing starting time of the alarm clock is not reached by the ending time of the audio resource, the alarm clock occupies the audio resource after the playing of the audio resource is ended, so that the playing of the alarm clock is normal. If the occupier is the non-instant communication application, the occupier monopolizes the audio resource to realize the continuous playing of a plurality of audio files, the audio resource is not released until the non-instant communication application exits, and when the occupier occupies the audio resource, the audio resource is directly released, and the alarm clock is recovered to recover the use of the audio resource. The abnormal alarm clock playing caused by the fact that the occupied party is corrected and audio resources are not used in a standard mode, and the experience of an audio user is improved.
The device provided by the embodiment of the application further includes a call detection module 25 (not shown in the figure), where the call detection module 25 is configured to monitor a call state of the call application if the occupied party is the call application; and if the call state is in a stop state, releasing the audio resource occupied by the occupier so as to play the alarm clock by using the audio resource.
And detecting whether a voice signal is transmitted in an audio channel of the current electronic equipment in real time to judge whether the conversation application is in a starting state or a stopping state. The voice signal comprises a voice signal input by a microphone of the current electronic equipment and a voice signal sent by a counterpart from a network side. And detecting that no voice signal is transmitted in an audio channel of the current electronic equipment in real time, namely that the call state is in a stop state, releasing the audio resource occupied by the occupied party so as to play the alarm clock through the audio resource. That is, it means that if it is determined that the occupied party is the call application according to the occupied party information, it is detected whether the call is actually performed, and there may be a case where the call application occupies the audio resource and the call state is a stop state.
In the process of calling, the electronic device monitors a voice signal of the calling in real time by using the calling detection module 25, judges whether a calling hang-up event is triggered or not according to the monitored voice signal, and determines that the electronic device is in a hang-up state when the calling hang-up event is triggered. Specifically, during the call, the electronic device detects in real time whether a voice signal is transmitted in an audio channel of the current electronic device, where the voice signal includes a voice signal input by a microphone of the current electronic device and a voice signal transmitted from the network side by the other party. When at least one voice signal is monitored, the conversation is still carried out.
The apparatus provided in the embodiment of the present application further includes a call processing module 26 (not shown in the figure), where the call processing module 26 is configured to monitor whether the call state is switched from a start state to a stop state within a preset time if the call state is in the start state; monitoring that the conversation state is switched from a starting state to a stopping state within preset time, and detecting whether the conversation application occupies the audio resource; if the call application continues to occupy the audio resources after being switched to the stop state, releasing the audio resources occupied by the call application so as to play the alarm clock by using the audio resources; and if the call application releases the audio resource, playing the alarm clock.
The process of detecting the call state may be: monitoring a voice signal of the call in real time, judging whether a call hang-up event is triggered or not according to the monitored voice signal, and determining that the electronic equipment is in a hang-up state when the call hang-up event is triggered. Specifically, during the call, the electronic device detects in real time whether a voice signal is transmitted in an audio channel of the current electronic device, where the voice signal includes a voice signal input by a microphone of the current electronic device and a voice signal transmitted from the network side by the other party. When at least one voice signal is monitored, the communication is still carried out.
Detecting that the call state is the start state, that is, the call application executes the call behavior, and detecting that the call state is the stop state, that is, the call application stops the call behavior, that is, a process of switching the call state from the start state to the stop state is detected, by setting a preset time, for example, setting the preset time to any value in 10min to 60min, for example, imon, 20min, 30min, 40min, 50min, 60min, or, of course, 3min and 5min, or else, the preset time may be set by itself according to a user requirement or preference, and is not limited herein. And in a preset time, monitoring that the conversation state is switched from the starting state to the stopping state, namely monitoring that the conversation is stopped, checking whether the stopped conversation application still occupies audio resources, if the conversation application still occupies the audio resources, releasing the audio resources occupied by the conversation application, and playing an alarm clock through the audio resources. And if the call state is switched from the starting state to the stopping state and the call application releases the audio resource, directly playing the alarm clock by using the audio resource.
The apparatus provided in this embodiment of the present application further includes an audio standby resource module 27 (not shown in the figure), where the audio standby resource module 27 is configured to switch an audio behavior of the occupying party to the audio standby resource when the occupying party releases the audio resource, so that the occupying party normally plays the audio behavior. The audio standby resource module 27 is further configured to play the alarm clock by using the audio standby resource if the user is a call application, and the call state of the call application is not monitored to be switched from a start state to a stop state within a preset time. And the audio standby resource module 27 is also used for calling the audio standby resource module 27 by the occupier according to the priority of the audio behavior, and the audio standby resource module 27 provides the authority for modifying the priority to the third-party application.
Mode conversion is performed on the audio mode through the audio standby resource module 27, in S104, after the occupier releases the alarm clock to play the audio resource, the alarm clock occupies the audio resource, and the alarm clock is normally played. The audio standby resource module 27 is configured to switch the occupied party releasing the alarm clock to play the audio resource to the audio standby resource module 27, so that the audio resource of the occupied party can still be played normally. That is, the occupation party represents the non-call application, the priority of the non-call application is lower than that of the alarm clock, the occupation party of the non-call application releases the audio resource and switches to the audio standby resource, and the alarm clock plays the alarm clock by utilizing the audio resource. If the occupier is a call application, switching the call state of the call application from a starting state to a stopping state within a preset time without monitoring, namely indicating that the call duration exceeds the preset time, playing the alarm clock by using the audio standby resource in order to prevent major event missing reminding, calculating the alarm clock playing duration simultaneously when playing the alarm clock by using the audio standby resource, indicating that a user may not hear the speaker alarm clock playing in the call process if the alarm clock playing duration exceeds the preset playing duration, and adjusting an alarm clock audio streaming playing outlet from the speaker to a receiver; the alarm clock is played directly to make the user hear the alarm clock sound, and this mode can effectively remind the user that the alarm clock arrives constantly, avoids under the conversation state, and alarm clock broadcast sound undersize causes important event to omit the suggestion, perhaps daily life notes lack etc. and influence user experience. The preset playing time duration referred to above may be set to lmin, 2min, 3min, or 5min, or other times, and the preset playing time duration may be set according to the user requirement or preference, which is not limited herein. . The preset time may be set to any value from 10min to 60min, such as llomin, 20min, 30min, 40min, 50min, and 60min, or may be 3min, 5min, or other values, and the preset time may be set according to the user's needs or preferences, which is not limited herein. And in a preset time, monitoring that the conversation state is switched from a starting state to a stopping state, namely monitoring that the conversation is stopped, checking whether the stopped conversation application still occupies audio resources, if the conversation application still occupies the audio resources, releasing the audio resources occupied by the conversation application, and playing an alarm clock through the audio resources. And if the call state is switched from the starting state to the stopping state and the call application releases the audio resource, directly playing the alarm clock by using the audio resource.
In the android system, according to the existing google SDK development package protocol, a setmode function may be used as the audio standby resource module 27, and in the existing android framework, audio resource conversion may be implemented by calling the setmode function, for example, setmode is defined as a media audio mode, setmode (l) is a ring mode, and setmode (2) is a call mode. Specifically, the audio standby resource module 27 is configured to convert the audio resource of the user through the audio standby resource module 27, and the audio mode of the application program is converted into the audio resource matched with the scene information through the audio standby resource module 27 by setting an audio mode and audio mode mapping table and according to the mapping table. As in the above example, in the mapping table, specifically, the audio resource is matched to an audio mode, setmode (o) is matched to a media audio mode, setmode (o) is matched to a ringing mode, setmode (2) is matched to a talk mode, and the like. The call mode can be subdivided into a handset mode and a hands-free mode. The mapping table can be stored in the electronic device memory in the form of a database, and when the mapping table needs to be called, the mapping table can be accessed through an internal instruction so as to determine the audio resource corresponding to the audio mode.
It is noted that different audio types have different default priorities, e.g. from high to low priority for talk, recording, music, video and games. High priority audio is played in preference to low priority audio. The audio packets that send the voice message are at the time the audio acquisition qaudio register object is created. The audio standby resource module 27 provides the right to modify the priority to the occupying party, for example, the priority of "game" may be modified to be higher than the priority of "music", the priority of "game" may be modified to be higher than the priority of "recording", and the priority of "music" may be modified to be higher than the priority of "conversation", and the priorities of any audio behaviors above may be adjusted up and down according to the preference and the requirement of the user, and will not be described herein again.
The apparatus provided in this embodiment of the present application further includes a direct playing module 27 (not shown in the figure), configured to directly play the alarm clock through the audio resource 221 played by the alarm clock if the occupied state of the audio resource 221 played by the alarm clock is idle.
The electronic device may monitor the occupation state information of the audio resource 221 played by the alarm clock of the application program through a built-in monitoring function, for example, taking the electronic device of the android system as an example, a system-level monitoring module may be created in a system framework layer (native/frame layer), and the audio mode of the application program is monitored through the monitoring module, or a monitoring process is independently created, and the audio mode of the application program is monitored through a message transmission mechanism. For example, a monitoring module can be set up in a framework layer and run in a system service program (system _ server), and because the monitoring module is set up in a service framework layer of a system level, interaction with other system services can be facilitated without worrying about authority issues in system calling. If the audio resource played by the alarm clock is not occupied, i.e. the playing state of the alarm clock is in a normal condition, the direct playing module 27 is directly utilized to perform the alarm clock, and the alarm clock is played normally.
Fig. 3 is a schematic diagram of an internal structure of an electronic device according to an embodiment. As shown in fig. 3, the electronic device includes a processor, a nonvolatile storage medium, an internal memory, and a network interface, a sound collection device, a speaker, a display screen, and an input device, which are connected by a system bus. The non-volatile storage medium of the terminal stores, among other things, an operating system and computer readable instructions. The computer readable instructions, when executed by a processor, implement a method of an electronic device for processing an application. The processor is used for providing calculation and control capability and supporting the operation of the whole electronic equipment. 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, and the input device may be a touch layer covered on the display screen, a button, a track ball or a touch pad arranged on a housing of the electronic device, or an external keyboard, a touch pad or a mouse. The electronic device may be a mobile phone, a tablet computer, or a personal digital assistant or a wearable device, etc. Those skilled in the art will appreciate that the architecture shown in fig. 3 is a block diagram of only a portion of the architecture associated with the subject application, and does not constitute a limitation on the electronic devices to which the subject application may be applied, and that a particular electronic device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The method for processing the application program may specifically be:
receiving an instruction of alarm clock playing;
monitoring the occupation state of the audio resource used for the alarm clock playing before the alarm clock playing; if the occupation state of the audio resource is occupation, acquiring occupation party information;
and if the occupier is the non-call application, releasing the audio resource occupied by the occupier so as to play the alarm clock by using the audio resource.
In addition, the embodiment of the present application also provides a computer non-volatile readable storage medium, on which a computer program is stored, and the computer program realizes the steps of processing the application program as described above when being executed by a processor.
The embodiment of the invention also provides computer equipment. As shown in fig. 4, for convenience of illustration, only the portion related to the embodiment of the present invention is shown, and details of the technology are not disclosed, please refer to the method portion of the embodiment 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), a vehicle-mounted computer, a wearable device, and the like, taking the computer device as the electronic device as an example.
In addition, the embodiment of the application also provides a non-volatile readable storage medium of a computer, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the alarm clock playing are realized.
The embodiment of the application also provides computer equipment. As shown in fig. 4, for convenience of explanation, only the portions related to the embodiments of the present application are shown, and details of the technology are not disclosed, please refer to the method portion of the embodiments of the present application. 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), a vehicle-mounted computer, a wearable device, and the like, taking the computer device as the electronic device as an example:
fig. 4 is a block diagram of a partial structure of an electronic device related to a computer device provided in an embodiment of the present application. Referring to fig. 4, the electronic device includes: radio Frequency (RF) circuit 410, memory 420, input unit 430, display unit 440, sensor 450, audio circuit 460, wireless fidelity (WiFi) module 470, processor 480, and power supply 490. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 4 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The RF circuit 410 may be used for receiving and transmitting signals during information transmission or communication, and may receive downlink information of a base station and then process the downlink information to the processor 480; uplink data may also be transmitted to the base station. Typically, the RF circuitry includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuitry 410 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE)), email, Short Message Service (SMS), and the like.
The memory 420 may be used to store software programs and modules, and the processor 480 executes various functional applications and data processing of the electronic device by operating 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, wherein the program storage area may store an operating system, an application program required for at least one function (such as an application program for a sound playing function, an application program for an image playing function, and the like), and the like; the data storage area may store data (such as audio data, an address book, etc.) created according to the use of the electronic device, and the like. Further, the memory 420 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 430 may be used to receive input numeric or character information and generate key signal inputs 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, which may also be referred to as a touch screen, may collect touch operations of a user on or near the touch panel 431 (e.g., operations of a user on or near the touch panel 431 using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a preset program. In one embodiment, the touch panel 431 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch position of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 480, and receives and executes commands sent from the processor 480. In addition, the touch panel 431 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 430 may include other input devices 432 in addition to the touch panel 431. In particular, 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.), and the like.
The display unit 440 may be used to display information input by a 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 (LCD), an Organic Light-Emitting Diode (OLED), or the like. In one embodiment, touch panel 431 may cover display panel 441, and when touch panel 431 detects a touch operation on or near touch panel 431, it is transmitted to processor 480 to determine the type of touch event, and then processor 480 provides a corresponding visual output on display panel 441 according to the type of touch event. Although in fig. 4, the touch panel 431 and the display panel 441 are two separate components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 431 and the display panel 441 may be integrated to implement the input and output functions of the electronic device.
The electronic device 400 may also 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 that adjusts the brightness of the display panel 441 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 441 and/or the backlight when the electronic device is moved to the ear. The motion sensor can comprise an acceleration sensor, the acceleration sensor can detect the magnitude of acceleration in each direction, and the magnitude and the direction of gravity can be detected when the motion sensor is static, so that the motion sensor can be used for identifying the application (such as horizontal and vertical screen switching) of the posture of the electronic equipment, and relevant functions (such as pedometer and knocking) of vibration identification and the like; the electronic device may be provided with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor.
The audio circuit 460, speaker 461 and microphone 462 may provide an audio interface between a user and the electronic device. The audio circuit 460 can transmit the electrical signal converted from the received audio data to the speaker 461, and convert the electrical signal into a sound signal for output by the speaker 461; on the other hand, the microphone 462 converts the collected sound signal into an electrical signal, which is received by the audio circuit 460 and converted into audio data, which is then processed by the audio data output processor 480 and then transmitted to another electronic device via the RF circuit 410, or the audio data is output to the memory 420 for subsequent processing.
WiFi belongs to short-range wireless transmission technology, and the electronic device can help the user send and receive e-mail, browse web pages, access streaming media, etc. through the WiFi module 470, which provides the user with wireless broadband internet access. Although fig. 4 illustrates WiFi module 470, it is understood that it does not belong to the essential components of electronic device 400 and may be omitted as desired.
The processor 480 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 420 and calling data stored in the memory 420, thereby integrally monitoring the electronic device. In one embodiment, processor 480 may include one or more processing units. In one embodiment, processor 480 may integrate an application processor and a modem processor, wherein the application processor primarily handles operating systems, user interfaces, applications, and the like; the modem processor handles mainly wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 480.
The electronic device 400 further includes a power supply 490 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 480 via a power management system that may be configured to manage charging, discharging, and power consumption.
In one embodiment, the electronic device 400 may also include a camera, a bluetooth module, and the like.
In the embodiments of the present application, the processor 480 included in the computer device implements the methods of the above-described embodiments when executing the computer program stored on the memory.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), or the like. The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, and the program is executed by a processor to execute the method of the above embodiments.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, however, as long as there is no contradiction between the combinations of the technical features, the scope of the present description should be considered as being described in the present specification.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the claims. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (1)

  1. Claims
    1. A method for playing an alarm clock is characterized by comprising the following steps:
    receiving an instruction of alarm clock playing;
    monitoring the occupation state of the audio resource used for the alarm clock playing before the alarm clock playing; if the occupation state of the audio resource is occupation, acquiring occupation party information;
    and if the occupier is the non-call application, releasing the audio resource occupied by the occupier so as to play the alarm clock by using the audio resource.
    2. The method of claim 1, further comprising: if the occupied party is a call application, monitoring the call state of the call application;
    and if the call state is in a stop state, releasing the audio resources occupied by the occupier so as to play the alarm clock by using the audio resources.
    3. The method according to claim 2, wherein the monitoring a call state of the call application, and if the call state is in a stop state, releasing the audio resource occupied by the occupier to play the alarm clock by using the audio resource comprises:
    if the conversation state is in a starting state, monitoring whether the conversation state is switched from the starting state to a stopping state within preset time;
    monitoring that the conversation state is switched from a starting state to a stopping state within preset time, and detecting whether the conversation application continuously occupies the audio resource;
    if the call application continues to occupy the audio resource after the call application is switched to the stop state, releasing the audio resource occupied by the call application so as to play the alarm clock by using the audio resource;
    and if the communication application releases the audio resource after switching to the stop state, playing the alarm clock.
    4. The method according to any one of claims 1-3, further comprising setting an audio standby resource for switching the audio behavior of the occupant to the audio standby resource when the occupant releases the audio resource, so that the audio behavior of the occupant is played normally.
    5. The method of claim 4, wherein switching the audio behavior of the tenant to the audio standby resource comprises:
    and the occupier calls the audio standby resource according to the priority of the audio behavior, and the audio standby resource provides the occupier with the authority for modifying the priority.
    6. The method of claim 1, wherein the occupant information comprises: audio playback information, recording information, and/or audio mode information.
    7. The method of claim 1, further comprising: and if the occupation state of the audio resource is idle, playing the alarm clock by using the audio resource.
    8. An apparatus for playing an alarm clock, comprising:
    the receiving module is used for receiving an alarm clock playing instruction;
    the monitoring module is used for monitoring the occupation state of the audio resource used for the alarm clock playing before the alarm clock playing;
    the acquisition module is used for acquiring the information of an occupier if the occupancy state of the audio resource is occupancy; and the correction module is used for releasing the audio resource of the occupier if the occupier is a non-call application so as to play the alarm clock by utilizing the audio resource.
    9. An electronic device comprising a memory and a processor, characterized in that a computer program is stored in the memory, which computer program, when executed by the processor, causes the processor to carry out the steps of the alarm clock playing method according to any of claims 1-7.
    10. A computer non-transitory readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the alarm clock playing method according to any one of claims 1-7.
CN201880098683.5A 2018-12-03 2018-12-03 Alarm clock playing method and device and electronic equipment Active CN113170014B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/119009 WO2020113390A1 (en) 2018-12-03 2018-12-03 Alarm clock playback method and apparatus, and electronic device

Publications (2)

Publication Number Publication Date
CN113170014A true CN113170014A (en) 2021-07-23
CN113170014B CN113170014B (en) 2022-07-26

Family

ID=70974074

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880098683.5A Active CN113170014B (en) 2018-12-03 2018-12-03 Alarm clock playing method and device and electronic equipment

Country Status (4)

Country Link
US (1) US20210286588A1 (en)
EP (1) EP3886414A4 (en)
CN (1) CN113170014B (en)
WO (1) WO2020113390A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114222024A (en) * 2021-11-11 2022-03-22 荣耀终端有限公司 Notification message broadcasting method, electronic device and computer readable storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09312679A (en) * 1996-05-22 1997-12-02 Toshiba Corp Information processing unit with portable telephone function and alarm time notice method
CN1937637A (en) * 2005-09-23 2007-03-28 宏达国际电子股份有限公司 Message output arbitration method
CN101192203A (en) * 2006-11-30 2008-06-04 中兴通讯股份有限公司 Mobile phones audio frequency playing method
CN105045555A (en) * 2015-07-22 2015-11-11 北京元心科技有限公司 Configuration file based method and apparatus for implementing audio conflict resolution
CN105550037A (en) * 2015-12-11 2016-05-04 北京元心科技有限公司 Method and device for allocating audio resources in multiple systems
CN105955693A (en) * 2016-04-21 2016-09-21 北京元心科技有限公司 Method and device for distributing audio-video resource in multisystem
CN106060263A (en) * 2016-06-29 2016-10-26 深圳市金立通信设备有限公司 Method for processing incoming call and terminal
CN106445448A (en) * 2016-08-29 2017-02-22 北京元心科技有限公司 Audio device control method and system of terminal and mobile terminal
CN107229448A (en) * 2017-06-30 2017-10-03 联想(北京)有限公司 Audio frequency playing method and electronic equipment
WO2018210049A1 (en) * 2017-05-17 2018-11-22 中兴通讯股份有限公司 Audio occupation processing method, device, and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7231269B2 (en) * 2003-03-20 2007-06-12 Microsoft Corporation Recovery upon access violation by audio processing object
CN101778158A (en) * 2009-12-29 2010-07-14 闻泰集团有限公司 Method for processing audio conflict of mobile phone
US9317329B2 (en) * 2010-11-15 2016-04-19 Qualcomm Incorporated Arbitrating resource acquisition for applications of a multi-processor mobile communications device
KR102289474B1 (en) * 2015-02-27 2021-08-13 삼성전자주식회사 A method for outputting audio and an electronic device therefor

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09312679A (en) * 1996-05-22 1997-12-02 Toshiba Corp Information processing unit with portable telephone function and alarm time notice method
CN1937637A (en) * 2005-09-23 2007-03-28 宏达国际电子股份有限公司 Message output arbitration method
CN101192203A (en) * 2006-11-30 2008-06-04 中兴通讯股份有限公司 Mobile phones audio frequency playing method
CN105045555A (en) * 2015-07-22 2015-11-11 北京元心科技有限公司 Configuration file based method and apparatus for implementing audio conflict resolution
CN105550037A (en) * 2015-12-11 2016-05-04 北京元心科技有限公司 Method and device for allocating audio resources in multiple systems
CN105955693A (en) * 2016-04-21 2016-09-21 北京元心科技有限公司 Method and device for distributing audio-video resource in multisystem
CN106060263A (en) * 2016-06-29 2016-10-26 深圳市金立通信设备有限公司 Method for processing incoming call and terminal
CN106445448A (en) * 2016-08-29 2017-02-22 北京元心科技有限公司 Audio device control method and system of terminal and mobile terminal
WO2018210049A1 (en) * 2017-05-17 2018-11-22 中兴通讯股份有限公司 Audio occupation processing method, device, and storage medium
CN107229448A (en) * 2017-06-30 2017-10-03 联想(北京)有限公司 Audio frequency playing method and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张铭华: "《多媒体视频程序设计 使用Delphi》", 31 December 2006 *

Also Published As

Publication number Publication date
EP3886414A4 (en) 2021-12-15
CN113170014B (en) 2022-07-26
EP3886414A1 (en) 2021-09-29
US20210286588A1 (en) 2021-09-16
WO2020113390A1 (en) 2020-06-11

Similar Documents

Publication Publication Date Title
US10516640B2 (en) Group message updating and displaying method, apparatus, and terminal
CN107231159B (en) Radio frequency interference processing method, device, storage medium and terminal
WO2018049897A1 (en) Data backup method and device
CN111741058A (en) Message pushing method and device, electronic equipment and storage medium
CN106371964B (en) Method and device for prompting message
CN107465841B (en) Fault information reporting method and terminal
CN108196947B (en) Application running state control method and mobile terminal
CN104915111B (en) terminal operation control method and device
CN107846516B (en) Call scene prompting method and mobile terminal
US10728718B2 (en) Incoming call processing method, user equipment, and storage medium
WO2020103070A1 (en) Method and apparatus for processing application program, and electronic device
CN106131274B (en) Mobile terminal control device and method
WO2020118495A1 (en) Audio resource allocation method, device, and electronic apparatus
CN113039774B (en) Method and device for processing application program, electronic equipment and storage medium
CN111107223B (en) Message processing method and electronic equipment
CN112805988B (en) Call control method and device, computer readable storage medium and electronic equipment
CN107770449B (en) Continuous shooting method, electronic device and storage medium
CN113170014B (en) Alarm clock playing method and device and electronic equipment
CN106850957B (en) Application notification management method and device and mobile terminal
WO2015078349A1 (en) Microphone sound-reception status switching method and apparatus
CN114077414A (en) Audio playing control method and device, electronic equipment and storage medium
CN112997471B (en) Audio channel switching method and device, readable storage medium and electronic equipment
CN106210325B (en) Method, device and terminal for setting incoming call ringtone of social application
US11477591B2 (en) Audio data processing method, terminal device, and storage medium
WO2020097787A1 (en) Method, apparatus, and electronic device for audio resource release

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant