A kind of control method of alarm clock, device, storage medium and electronic equipment
Technical field
The invention relates to field of mobile terminals more particularly to a kind of control methods of alarm clock, device, storage medium
And electronic equipment.
Background technique
With being gradually increased for scientific and technological level, intelligent terminal is popularized in the life of user and is come.User is to movement
Terminal, if smart phone is using more and more.Currently, many users avoid staying up late, form simultaneously in order to rest on time
Sleep alarm clock can be arranged in good biological clock on the mobile terminal of oneself.So-called sleep alarm clock is exactly whenever solid to evening
It fixes time, user's rest will be reminded in the form of voice or sound.But in actual use, once user sleeps
When feeling that the time is more early than the time for alarm clock of sleeping, instead alarm clock sounds on time can just wake user up, and user once operates
Accidentally, alarm clock is not closed, but delay is sounded, and be will lead to user and is waken up again.By alarm clock when just falling asleep in this way
It wakes up, the influence to the sleep quality of user is great.
Summary of the invention
The embodiment of the present application provides control method, device, storage medium and the electronic equipment of a kind of alarm clock, and root may be implemented
According to the demand of user, alarm clock is controlled, so that reach to remind user to rest on time, and will not be quasi- in user
The effect of sleep prompt is also carried out after standby rest.
In a first aspect, the embodiment of the present application provides a kind of control method of alarm clock, this method comprises:
When reaching the specified time of sleep alarm clock, voice data is obtained by microphone;
According to the voice data, determine user currently whether in sleep preparation state;
If so, cancelling the sleep prompt of sleep alarm clock, and current working status is adjusted.
Further, cancel the sleep prompt of sleep alarm clock, and current working status be adjusted, comprising:
Cancel the sleep prompt of sleep alarm clock, and gradually turns down the volume for playing music.
Further, according to the voice data, determine whether user is currently in after sleep state, the method
Further include:
If so, environment illumination intensity information locating for user is obtained, if the environment illumination intensity is more than default illumination
Intensity threshold then carries out sleep prompt according to the default prompting mode of sleep alarm clock.
Further, according to the voice data, determine whether user is currently in after sleep state, the method
Further include:
If so, obtaining the lighting apparatus work state information in room locating for user, if it exists at least one lighting apparatus
In be in illumination condition, then according to sleep alarm clock default prompting mode carry out sleep prompt.
Further, after carrying out sleep prompt according to the default prompting mode of sleep alarm clock, the method also includes:
Control is in the lighting apparatus lighting-off of illumination condition.
Second aspect, the embodiment of the present application also provides a kind of control device of alarm clock, which includes:
Voice data obtains module, for obtaining sound number by microphone when reaching the specified time of sleep alarm clock
According to;
Sleep prepares state determining module, for determining whether user is currently quasi- in sleep according to the voice data
Standby state;
It is noisy to cancel sleep if being determined as sleep preparation state determining module for alarm clock control module of sleeping
The sleep of clock prompts, and current working status is adjusted.
Further, the sleep alarm clock control module, comprising:
Sleep alarm clock control unit for cancelling the sleep prompt of sleep alarm clock, and gradually turns down the volume for playing music.
Further, described device further include:
Environment illumination intensity obtains module, is determined as if preparing state determining module for the sleep, obtains use
Environment illumination intensity information locating for family, it is noisy according to sleep if the environment illumination intensity is more than default intensity of illumination threshold value
The default prompting mode of clock carries out sleep prompt.
The third aspect, the embodiment of the present application provide a kind of computer readable storage medium, are stored thereon with computer journey
Sequence realizes the control method of the alarm clock as described in the embodiment of the present application when the program is executed by processor.
Fourth aspect, the embodiment of the present application provide a kind of electronic equipment, including memory, processor and are stored in storage
It can realize on device and when the computer program of processor operation, the processor execute the computer program as the application is real
Apply the control method of alarm clock described in example.
Technical solution provided by the embodiment of the present application is obtained when reaching the specified time of sleep alarm clock by microphone
Take voice data;According to the voice data, determine user currently whether in sleep preparation state;If so, cancelling sleep
The sleep of alarm clock prompts, and current working status is adjusted.By using technical solution provided herein, Ke Yishi
Now according to the demand of user, alarm clock is controlled, so that reach to remind user to rest on time, and will not user
The effect of sleep prompt is also carried out after preparing rest.
Detailed description of the invention
Fig. 1 is the flow chart of the control method for the alarm clock that the embodiment of the present application one provides;
Fig. 2 is the flow chart of the control method for the alarm clock that the embodiment of the present application two provides;
Fig. 3 is the structural schematic diagram of the control device for the alarm clock that the embodiment of the present application three provides;
Fig. 4 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present application five provides.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the application, rather than the restriction to the application.It also should be noted that in order to just
Part relevant to the application is illustrated only in description, attached drawing rather than entire infrastructure.
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail
The processing or method described as flow chart.Although each step is described as the processing of sequence by flow chart, many of these
Step can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of each step can be rearranged.When its operation
The processing can be terminated when completion, it is also possible to have the additional step being not included in attached drawing.The processing can be with
Corresponding to method, function, regulation, subroutine, subprogram etc..
Embodiment one
Fig. 1 is the flow chart of the control method for the alarm clock that the embodiment of the present application one provides, and the present embodiment is applicable to sleeping
The control device of the case where dormancy alarm clock is controlled, this method alarm clock as provided by the embodiment of the present application executes, the dress
Setting can be realized by the mode of software and/or hardware, and can be integrated in the electronic equipment similar to intelligent sound box.
As shown in Figure 1, the control method of the alarm clock includes:
S110, when reach sleep alarm clock specified time when, voice data is obtained by microphone.
Wherein, sleep alarm clock can be user in order to rest on time, set in mobile terminal or other terminals
That sets carries out the alarm clock of sleep prompt.In the present embodiment, sleep alarm clock can be set on intelligent sound box, also can be set
On other equipment, intelligent sound box can be by network interaction come synchronized sleep alarm clock.When reach sleep alarm clock it is specified when
Between when, voice data is obtained by the microphone of intelligent sound box.It specifically can be when having arrived the specified time of sleep alarm clock, beat
The microphone array for opening speaker carries out radio reception, to acquire voice data.In the present embodiment, voice data can be saying for user
Words sound, sound of television, or even can also be the sound of user's snoring, as long as the sound that can be collected into, can all be acquired
To form voice data.
S120, according to the voice data, determine user currently whether in sleep preparation state.
Wherein, according to the voice data, user is determined currently whether in sleep preparation state, specifically, can root
According to acoustic information included in voice data, to determine whether the current state of user is in sleep preparation state.If sound
Data include the sound televised, then can determine that active user is not in sleep preparation state, if current sound
Sound has been quite quiet, then illustrates that user is in sleep preparation state, it is worth noting that, in this especially quiet environment
In, even if user is not on sleep state, be also easy to that user is allowed slowly to fall asleep, in this case one can consider that with
Family does not need sleep alarm clock and carries out sleep prompt.If voice data includes the sound of user's talk, the volume of sound
It is lower, it is usually no more than 10 decibels, and discontinuity when the sending of sound, then illustrates that active user is in sleep preparation state.
Wherein talk mode may include talking two kinds on talk or line under line, i.e., if having only included the sound that one people of user speaks
Sound can be then determined as in talk.
S130, if so, cancellation is slept, the sleep of alarm clock is prompted, and current working status is adjusted.
Wherein, however, it is determined that user is presently at sleep preparation state, then cancels the sleep prompt of sleep alarm clock, and right
Current working status is adjusted.For example, finding in current environment that only user is talking by the voice data recorded
Sound, substantially without other can influence user rest sound, it is low to illustrate that active user is probably lying on a bed
Sound talk.So in this case, user has just been ready for sleep preparation.And the final purpose of user setting sleep alarm clock
It namely reminds user to prepare to rest, therefore just no longer needs to carry out sleep prompt, user is avoided to be bothered by sleep alarm clock to giving
User's bring adverse effect.
In the present embodiment, if current intelligent sound box is in the broadcasting for carrying out sound, in order to avoid sound pair
Influence caused by user security risk can be adjusted using predetermined manner, such as turn down sound, or directly stop broadcasting etc..This reality
Applying the benefit that example is arranged in this way is that can determine the working condition of intelligent sound box according to the current demand of user.And in this reality
It applies in example, since currently there are no rests by user, by being turned down to intelligent sound box volume, prompt can be played to user and is made
With allowing user to learn from side has been currently the time of the rest, therefore setting can also play additional prompting in this way
Effect.
In the present embodiment, cancel the sleep prompt of sleep alarm clock, and current working status is adjusted, comprising: take
Disappear sleep alarm clock sleep prompt, and gradually turn down play music volume until close.It includes 10 that wherein for example volume, which has altogether,
Grade, then can be slowly adjusted from current level to 1 grade, such as is currently 5 grades, then can be within the set time, such as 10 seconds
Clock is slowly adjusted to 1 grade, and carries out stopping the processing of broadcasting again.The benefit that the present embodiment is arranged in this way is can to mention for user
For the volume adjustment mode of opposite mitigation, be conducive to that user is allowed to receive, avoid being brought by stopping abruptly for broadcasting sound to user
The sense of hearing above it is inadaptable.
Technical solution provided by the embodiment of the present application is obtained when reaching the specified time of sleep alarm clock by microphone
Take voice data;According to the voice data, determine user currently whether in sleep preparation state;If so, cancelling sleep
The sleep of alarm clock prompts, and current working status is adjusted.By using technical solution provided herein, Ke Yishi
Now according to the demand of user, alarm clock is controlled, so that reach to remind user to rest on time, and will not user
The effect of sleep prompt is also carried out after preparing rest.
On the basis of above-mentioned each technical solution, optionally, cancel the sleep prompt of sleep alarm clock, and to work at present shape
State is adjusted, comprising: cancels the sleep prompt of sleep alarm clock, and gradually turns down the volume for playing music.And it gradually turns down and broadcasts
The volume put the music on can be adjusted according to the volume that user talks in a low voice according to fixed proportion relationship.Such as user is in a low voice
Volume is 15 decibels when talk, then the volume of music can be 12 decibels, and volume is 10 decibels when user talks in a low voice, then music
Volume can be 8 decibels.The benefit that the present embodiment is arranged in this way is can to influence to avoid intelligent sound box to the broadcasting of music
The talk in a low voice of user, while when user is talked in a low voice, user can contribute to the broadcasting of music and relieve fatigue.
On the basis of above-mentioned each technical solution, optionally, according to the voice data, determine whether user currently locates
After sleep state, the method also includes: if so, environment illumination intensity information locating for user is obtained, if the ring
Border intensity of illumination is more than default intensity of illumination threshold value, then carries out sleep prompt according to the default prompting mode of sleep alarm clock.Wherein,
Since sleep alarm clock is generally located on night, under the influence of without sunlight, the intensity of illumination of user's local environment often from
The indoor lighting apparatus of user, in this case, if user directly falls asleep after talking in a low voice, the illumination of lighting apparatus
Strong influence can be caused to the sleep of user.If present embodiments providing one kind lighting apparatus in normal illumination, pass through
The method that sleep alarm clock carries out sleep prompt to user, such user can not only determine that current needs are rested, but also can
To carry out shutoff operation to lighting apparatus.Therefore the technical program can be while reminding the rest of user's breakfast, and also auxiliary is protected
The health for having protected user improves the usage experience of user.
On the basis of above-mentioned each technical solution, optionally, when reaching the specified time of sleep alarm clock, pass through Mike
Before wind obtains voice data, the method also includes: the synchronous sleep alarm clock information that face on mobile terminals is set.In this reality
It applies in example, sleep alarm clock, which can be, to be arranged in above the mobile terminal of user, can be by way of network interaction, from user
Mobile terminal above synchronized sleep alarm clock, correspondingly, synchronization request can be issued the user in synchronizing process, if user
Face is authenticated on mobile terminals, then can carry out the synchronization of sleep alarm clock information.In addition to mobile terminals, it can also set
It sets in other terminals.The benefit that the present embodiment is arranged in this way is the work that can make full use of intelligent sound box in user family
With, due to the equipment that intelligent sound box is inherently used to play out sound, the sound of sleep alarm clock is played out, it can be with
Improve the usage experience of user.
Embodiment two
Fig. 2 is the flow chart of the control method for the alarm clock that the embodiment of the present application two provides, and the present embodiment is in above-described embodiment
Technical solution on the basis of, carried out further optimization.Specific optimization are as follows: according to the voice data, determine user
It is current whether to be in after sleep state, the method also includes: if so, obtaining the lighting apparatus work in room locating for user
Status information, if it exists at least one lighting apparatus be in illumination condition, then according to sleep alarm clock default prompting mode into
Row sleep prompt.
As shown in Fig. 2, the control method of the alarm clock includes:
S210, when reach sleep alarm clock specified time when, voice data is obtained by microphone.
S220, according to the voice data, determine user currently whether in sleep preparation state.
S230, if so, obtain user locating for room lighting apparatus work state information, if it exists at least one illuminate
It is in illumination condition in equipment, then carries out sleep prompt according to the default prompting mode of sleep alarm clock.
Wherein, the work state information of the lighting apparatus in room locating for user can be through Wireless LAN or indigo plant
The mode of tooth network obtains.For example, the work to lighting apparatus can be passed through when reaching the specified time of sleep alarm clock
Controller issues status request, determines that lighting apparatus is presently at photograph according to the information that the working controller of lighting apparatus is fed back
Bright state is in closed state.
In the present embodiment, if there is illumination condition is at least one lighting apparatus, then according to sleep alarm clock
Default prompting mode carries out sleep prompt.The reason of being arranged in this way is also illuminating if there is at least one lighting apparatus,
Even if user has currently talked in a low voice in bed, prepare to fall asleep, then finally user is still needed to close lighting apparatus.
Moreover, once user slowly sleepy would not get off the very investment talked, but the more talk the more excited under the illumination of light,
So in this case, sleep prompt is carried out to user to be also necessary.
The present embodiment on the basis of the above embodiments, provides a kind of work by determining the lighting apparatus of current indoor
Make state, it is determined whether the method that the prompt of sleep alarm clock is carried out to user, the benefit being arranged in this way are that user can be assisted to rise
The effect supervised to sleeping time is conducive to that user is helped to form good biological clock, improves the usage experience of user.
On the basis of above-mentioned each technical solution, optionally, sleep according to the default prompting mode of sleep alarm clock
After prompt, the method also includes: control is in the lighting apparatus lighting-off of illumination condition.In the technical scheme, may be used
To be closed by the lighting apparatus that network or Bluetooth control are in illumination condition, be thus not necessarily to after carrying out sleep prompt
Lighting apparatus is turned off manually in user, and user is allowed to enjoy more comfortable living environment.And before closing lighting apparatus, to
Family has carried out sleep prompt, and user can learn the reason of lighting apparatus is closed, therefore user will not be allowed to lighting apparatus
It is automatically closed and misunderstands, improve the usage experience of user.
Embodiment three
Fig. 3 is the structural schematic diagram of the control device for the alarm clock that the embodiment of the present application three provides.As shown in figure 3, described noisy
The control device of clock, comprising:
Voice data obtains module 310, for obtaining sound by microphone when reaching the specified time of sleep alarm clock
Data;
Whether sleep prepares state determining module 320, for determining user currently in sleep according to the voice data
Preparation state;
Alarm clock control module 330 of sleeping is cancelled if being determined as sleep preparation state determining module 320
The sleep prompt of sleep alarm clock, and current working status is adjusted.
Technical solution provided by the embodiment of the present application is obtained when reaching the specified time of sleep alarm clock by microphone
Take voice data;According to the voice data, determine user currently whether in sleep preparation state;If so, cancelling sleep
The sleep of alarm clock prompts, and current working status is adjusted.By using technical solution provided herein, Ke Yishi
Now according to the demand of user, alarm clock is controlled, so that reach to remind user to rest on time, and will not user
The effect of sleep prompt is also carried out after preparing rest.
On the basis of above-mentioned each technical solution, optionally, the sleep alarm clock control module, comprising:
Sleep alarm clock control unit for cancelling the sleep prompt of sleep alarm clock, and gradually turns down the volume for playing music.
On the basis of above-mentioned each technical solution, optionally, described device further include:
Environment illumination intensity obtains module, is determined as if preparing state determining module for the sleep, obtains use
Environment illumination intensity information locating for family, it is noisy according to sleep if the environment illumination intensity is more than default intensity of illumination threshold value
The default prompting mode of clock carries out sleep prompt.
Method provided by the application any embodiment can be performed in the said goods, has the corresponding functional module of execution method
And beneficial effect.
Example IV
The embodiment of the present application also provides a kind of storage medium comprising computer executable instructions, and the computer is executable
It instructs when being executed by computer processor for executing a kind of control method of alarm clock, this method comprises:
When reaching the specified time of sleep alarm clock, voice data is obtained by microphone;
According to the voice data, determine user currently whether in sleep preparation state;
If so, cancelling the sleep prompt of sleep alarm clock, and current working status is adjusted.
Storage medium --- any various types of memory devices or storage equipment.Term " storage medium " is intended to wrap
It includes: install medium, such as CD-ROM, floppy disk or magnetic tape equipment;Computer system memory or random access memory, such as
DRAM, DDR RAM, SRAM, EDO RAM, Lan Basi (Rambus) RAM etc.;Nonvolatile memory, such as flash memory, magnetic medium
(such as hard disk or optical storage);Register or the memory component of other similar types etc..Storage medium can further include other
Memory of type or combinations thereof.In addition, storage medium can be located at program in the computer system being wherein performed, or
It can be located in different second computer systems, second computer system is connected to computer by network (such as internet)
System.Second computer system can provide program instruction to computer for executing.Term " storage medium " may include can
To reside in different location two or more storage mediums of (such as in the different computer systems by network connection).
Storage medium can store the program instruction (such as being implemented as computer program) that can be performed by one or more processors.
Certainly, a kind of storage medium comprising computer executable instructions, computer provided by the embodiment of the present application
The control for the alarm clock that executable instruction is not limited to the described above operates, and can also be performed and makes a noise provided by the application any embodiment
Relevant operation in the control method of clock.
Embodiment five
The embodiment of the present application provides a kind of electronic equipment, can integrate in the electronic equipment provided by the embodiments of the present application noisy
The control device of clock.Fig. 4 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present application five provides.As shown in figure 4, this reality
It applies example and provides a kind of electronic equipment 400 comprising: one or more processors 420;Storage device 410, for storing one
Or multiple programs, when one or more of programs are executed by one or more of processors 420, so that one or more
A processor 420 realizes the control method of alarm clock provided by the embodiment of the present application, this method comprises:
When reaching the specified time of sleep alarm clock, voice data is obtained by microphone;
According to the voice data, determine user currently whether in sleep preparation state;
If so, cancelling the sleep prompt of sleep alarm clock, and current working status is adjusted.
Certainly, it will be understood by those skilled in the art that processor 420 can also realize that the application any embodiment is provided
Alarm clock control method technical solution.
The electronic equipment 400 that Fig. 4 is shown is only an example, should not function and use scope to the embodiment of the present application
Bring any restrictions.
As shown in figure 4, the electronic equipment 400 includes processor 420, storage device 410, input unit 430 and output dress
Set 440;The quantity of processor 420 can be one or more in electronic equipment, in Fig. 4 by taking a processor 420 as an example;Electronics
Processor 420, storage device 410, input unit 430 and output device 440 in equipment can pass through bus or other modes
It connects, in Fig. 4 for being connected by bus 450.
Storage device 410 is used as a kind of computer readable storage medium, and it is executable to can be used for storing software program, computer
Program and module, such as the corresponding program instruction of the control method of the alarm clock in the embodiment of the present application.
Storage device 410 can mainly include storing program area and storage data area, wherein storing program area can store operation
Application program needed for system, at least one function;Storage data area, which can be stored, uses created number according to electronic equipment
According to etc..In addition, storage device 410 may include high-speed random access memory, it can also include nonvolatile memory, such as
At least one disk memory, flush memory device or other non-volatile solid state memory parts.In some instances, storage dress
Setting 410 can further comprise the memory remotely located relative to processor 420, these remote memories can be connected by network
It connects.The example of above-mentioned network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Input unit 430 can be used for receiving number, character information or the voice messaging of input, and generation and electronic equipment
User setting and function control related key signals input.Output device 440 may include the equipment such as display screen, loudspeaker.
Electronic equipment provided by the embodiments of the present application may be implemented according to the demand of user, to control alarm clock, thus
Reach to remind user to rest on time, and the effect of sleep prompt will not be also carried out after user has been prepared for rest.
It is arbitrarily real that the application can be performed in control device, storage medium and the electronic equipment of the alarm clock provided in above-described embodiment
The control method for applying alarm clock provided by example has and executes the corresponding functional module of this method and beneficial effect.Not in above-mentioned reality
The technical detail of detailed description in example is applied, reference can be made to the control method of alarm clock provided by the application any embodiment.
Note that above are only the preferred embodiment and institute's application technology principle of the application.It will be appreciated by those skilled in the art that
The application is not limited to specific embodiment described here, be able to carry out for a person skilled in the art it is various it is apparent variation,
The protection scope readjusted and substituted without departing from the application.Therefore, although being carried out by above embodiments to the application
It is described in further detail, but the application is not limited only to above embodiments, in the case where not departing from the application design, also
It may include more other equivalent embodiments, and scope of the present application is determined by the scope of the appended claims.