Disclosure of Invention
The embodiment of the application provides a control method and device of an alarm clock, a storage medium and a mobile terminal, and the alarm clock can be controlled according to the requirements of a user, so that the effect of reminding the user to have a rest on time and not waking up the user after the user has had a rest is achieved.
In a first aspect, an embodiment of the present application provides a method for controlling an alarm clock, where the method includes:
determining that the user is in a first state or a second state at present according to pressure data acquired by a pressure sensor arranged on a bed;
if the first state is the first state, identifying whether the auxiliary judgment information meets the preset condition;
and if so, canceling the prompting operation of the sleep alarm clock when the specified time of the sleep alarm clock is reached.
Further, the auxiliary judgment information includes state information of the mobile terminal;
correspondingly, whether the auxiliary identification information meets the preset condition or not is identified, and the method comprises the following steps:
identifying the state information of the mobile terminal, and if the state information of the mobile terminal is in a standby state, conforming to a preset condition; if the state information of the mobile terminal is the use state, the preset condition is not met.
Further, the auxiliary judgment information includes the intensity of ambient light;
correspondingly, whether the auxiliary identification information meets the preset condition or not is identified, and the method comprises the following steps:
identifying the intensity of ambient light, and if the intensity of the ambient light is within a preset light intensity range, conforming to a preset condition; if the ambient light intensity is not within the preset light intensity range, the preset condition is not met.
Further, the auxiliary judgment information includes the working state of the indoor lighting electrical appliance;
correspondingly, whether the auxiliary identification information meets the preset condition or not is identified, and the method comprises the following steps:
identifying the working state of the indoor lighting electrical appliance, and if the working state of the indoor lighting electrical appliance is a preset state, conforming to a preset condition; if the working state of the indoor lighting electrical appliance is not the preset state, the preset condition is not met.
Further, when the specified time of the sleep alarm clock is reached, after the sleep alarm clock prompt operation is cancelled, the method further comprises the following steps:
and sending a control signal for turning off the indoor lighting electric appliance so as to turn off the indoor lighting electric appliance.
Further, after determining that the user is currently in the first state or the second state through pressure data acquired by a pressure sensor provided on the bed, the method further includes:
determining the number of people in the bed and whether the users in the bed are target users according to the pressure data;
correspondingly, when the specified time of the sleep alarm clock is reached, the sleep alarm clock prompt operation is cancelled, which comprises the following steps:
and when the specified time of the sleep alarm clock of the target user is reached, canceling the sleep alarm clock prompt operation of the target user.
Further, determining the number of people in the bed and whether the user in the bed is the target user according to the pressure data includes:
the number of people in the bed is determined according to the dynamic matching degree and/or the total pressure value of the pressure data acquired by at least two pressure sensors arranged on the bed, and whether the user in the bed is the target user is determined according to the matching degree of the pressure data and the weight of the target user.
In a second aspect, an embodiment of the present application further provides a control device for an alarm clock, where the device includes:
the user state judging module is used for determining that the user is in a first state or a second state at present according to pressure data acquired by a pressure sensor arranged on the bed;
the auxiliary judgment information identification module is used for identifying whether the auxiliary judgment information meets the preset condition or not if the user is in the first state at present;
and the alarm clock control module is used for canceling the prompting operation of the sleep alarm clock when the specified time of the sleep alarm clock is reached if the auxiliary judgment information identification module judges that the alarm clock is positive.
In a third aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for controlling an alarm clock according to embodiments of the present application.
In a fourth aspect, an embodiment of the present application provides a mobile terminal, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the method for controlling an alarm clock according to the embodiment of the present application.
According to the technical scheme provided by the embodiment of the application, the current state of a user is determined to be a first state or a second state through pressure data acquired by a pressure sensor arranged on a bed; if the first state is the first state, identifying whether the auxiliary judgment information meets the preset condition; and if so, canceling the prompting operation of the sleep alarm clock when the specified time of the sleep alarm clock is reached. Through adopting the technical scheme that this application provided, can realize controlling the clock according to user's demand to reach and can enough just remind the user to have a rest, can not wake up the effect of user again after the user has had a rest.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example one
Fig. 1 is a flowchart of a method for controlling an alarm clock according to an embodiment of the present application, where the present embodiment is applicable to a situation of controlling a sleep alarm clock, and the method may be executed by a device for controlling an alarm clock according to the embodiment of the present application, where the device may be implemented by software and/or hardware, and may be integrated in a mobile terminal.
As shown in fig. 1, the control method of the alarm clock includes:
and S110, determining that the user is in the first state or the second state currently through pressure data acquired by a pressure sensor arranged on the bed.
The mobile terminal can be a smart phone, a tablet computer, a personal digital assistant and the like. The sleep alarm clock can be used for controlling the sleep time of a user through the mobile terminal, so that the phenomenon that the sleep time of the user is influenced by operations such as game playing, video watching and the like, the user feels sleepy on the next day and is not full of energy is avoided. However, in the prior art, the sleep time is often a ringing or vibration reminder at a fixed time, which affects the user experience when the user has already slept or sleeps strongly at the time.
In this embodiment, the pressure sensor on the bed may transmit the pressure data to the mobile terminal of the user in a wireless local area network or bluetooth connection manner, so as to be identified by the mobile terminal of the user. In this embodiment, the first state may be a state in which a person is detected in the bed, and the pressure value detected by the pressure sensor is greater than a conventional value, wherein the conventional value may be a pressure value generated by counting in 24 hours and placing an object with a lower pressure value, such as 10 kilograms or less, on the pressure sensor. If it is detected that the pressure data is greater than this conventional value, it may be determined that the current user state is a first state, wherein the first state may be understood as a state in which the user is in the bed and, in response, the second state is a state in which the user is not in the bed.
And S120, if the state is the first state, identifying whether the auxiliary judgment information meets the preset condition.
If it is determined that the current user state is the first state, the auxiliary judgment information may be judgment information for assisting in judging whether the user has entered or approached the sleep state in the bed. If the auxiliary judgment information meets the preset condition, the user can be determined to be close to the bed or enter a sleep state, and in this case, the user does not need to sound and preferably does not sound at the sleep alarm clock, so that the sleep quality of the user is prevented from being influenced.
In this embodiment, optionally, the auxiliary distinguishing information includes state information of the mobile terminal; correspondingly, whether the auxiliary identification information meets the preset condition or not is identified, and the method comprises the following steps: identifying the state information of the mobile terminal, and if the state information of the mobile terminal is in a standby state, conforming to a preset condition; if the state information of the mobile terminal is the use state, the preset condition is not met. If the current user state is the state of using the mobile terminal, it indicates that the user is lying in bed to play the mobile phone, and is watching videos, swiping information or other operations through the mobile phone, and then it can be considered that the current auxiliary judgment information does not meet the preset conditions, and the user needs to be prompted to sleep through the sleep alarm clock. If the mobile terminal of the user is in the standby state, the user is indicated to lie in bed to read a book, or is close to falling asleep, or even falls asleep, the prompting operation of the sleep alarm clock can be cancelled, so that the sleep quality of the user can be improved. The advantage that this technical scheme set up like this can be when need not the time that the sleep alarm clock promoted the user to rest, cancel the suggestion operation of sleep alarm clock to make the user can not be disturbed by the sleep alarm clock when not needing, thereby improve user's use and experience.
In this embodiment, optionally, the auxiliary judgment information includes an ambient light intensity; correspondingly, whether the auxiliary identification information meets the preset condition or not is identified, and the method comprises the following steps: identifying the intensity of ambient light, and if the intensity of the ambient light is within a preset light intensity range, conforming to a preset condition; if the ambient light intensity is not within the preset light intensity range, the preset condition is not met. The ambient light intensity can be obtained through a light intensity sensor on the mobile terminal of the user, or can be obtained through a light intensity sensor on other equipment arranged in the user room, and then the ambient light intensity is shared with the mobile terminal of the user through a network. In this embodiment, if the current user is lying in bed and the intensity of the light is low, for example, below 10 lux, it can be determined that the current environment of the user is easy to help the user enter the sleep state, and the user does not need to be prompted through the alarm clock. It should be noted that if the user has entered the sleep state under such ambient light intensity, the sleep prompt of the sleep alarm clock may also be cancelled. The advantage that this technical scheme set up like this is, when confirming the user rest in bed, judge whether the user gets into the sleep state easily under the current environment according to the light intensity of user's environment, if be favorable to the user to enter the sleep state, then can cancel the warning of sleep alarm clock to the user, avoid receiving the influence to the in-process that the user got into the sleep state to influence user's sleep quality.
In this embodiment, optionally, the auxiliary judgment information includes a working state of the indoor lighting appliance; correspondingly, whether the auxiliary identification information meets the preset condition or not is identified, and the method comprises the following steps: identifying the working state of the indoor lighting electrical appliance, and if the working state of the indoor lighting electrical appliance is a preset state, conforming to a preset condition; if the working state of the indoor lighting electrical appliance is not the preset state, the preset condition is not met. The indoor lighting appliance can be an indoor ceiling lamp or a desk lamp and the like, when the working state of the indoor lighting device is in a low-brightness state, it is determined that a user possibly enters a sleep state or is ready to fall asleep, and then the prompt for the user can be cancelled after the sleep alarm clock set by the user reaches the set time.
On the basis of the above technical solution, optionally, after the prompt operation of the sleep alarm clock is cancelled when the specified time of the sleep alarm clock is reached, the method further includes: and sending a control signal for turning off the indoor lighting electric appliance so as to turn off the indoor lighting electric appliance. The advantage that this technical scheme set up like this can be through when confirming need not to indicate the user, confirms that the user has got into the sleep state or is close the sleep state, then can assist the user to close indoor lighting electrical apparatus, so not only can improve user's use and experience, can also avoid because the influence of illumination to user's sleep quality, can let the user need not the loaded down with trivial details operation of manual closing lighting apparatus, can enjoy the environment of suitable sleep again, improves user's sleep quality.
In this embodiment, the three schemes can be implemented separately, or can be used together as auxiliary judgment information to determine whether the sleep alarm clock prompt is needed to be identified, for example, two schemes are combined to realize the identification, or three schemes are combined at the same time to realize the identification, so that the set advantage is that the accuracy of judgment on whether the sleep alarm clock prompt is needed can be improved, and the user experience is improved.
And S130, if so, canceling the prompting operation of the sleep alarm clock when the specified time of the sleep alarm clock is reached.
If the auxiliary identification information meets the preset condition, the state of the current user can cancel the sleep reminding of the user through the sleep alarm clock, and the sleep alarm clock prompting operation can be cancelled when the specified time of the sleep alarm clock is reached. The designated time of the sleep alarm clock can be the prompting time of the sleep alarm clock set by the user.
According to the technical scheme provided by the embodiment of the application, the current state of a user is determined to be a first state or a second state through pressure data acquired by a pressure sensor arranged on a bed; if the first state is the first state, identifying whether the auxiliary judgment information meets the preset condition; and if so, canceling the prompting operation of the sleep alarm clock when the specified time of the sleep alarm clock is reached. Through adopting the technical scheme that this application provided, can realize controlling the clock according to user's demand to reach and can enough just remind the user to have a rest, can not wake up the effect of user again after the user has had a rest.
Example two
Fig. 2 is a flowchart of a control method of an alarm clock according to a second embodiment of the present application, and the present embodiment is further optimized based on the technical solutions of the foregoing embodiments. The concrete optimization is as follows: after determining that the user is currently in the first state or the second state through pressure data acquired by a pressure sensor provided on the bed, the method further includes: determining the number of people in the bed and whether the users in the bed are target users according to the pressure data; correspondingly, when the specified time of the sleep alarm clock is reached, the sleep alarm clock prompt operation is cancelled, which comprises the following steps: and when the specified time of the sleep alarm clock of the target user is reached, canceling the sleep alarm clock prompt operation of the target user.
As shown in fig. 2, the method for controlling an alarm clock includes:
and S210, acquiring pressure data through a pressure sensor arranged on the bed.
S220, determining the number of people in the bed according to the pressure data, and determining whether the users in the bed comprise target users.
The number of people in the bed is determined according to the pressure data, specifically, the total pressure value of all people in the bed is determined according to the pressure data, and the number of people in the bed is determined according to the size of the total pressure value, for example, when the weight of a general user is 60-90 kg, the gravity is about 600-900 newtons, and when the measured pressure is 1600 newtons, the number of people in the bed can be determined to be two people currently. Determining whether the user in the bed includes the target user according to the pressure data, specifically, whether the pressure data matches the body weight of the target user or not, for example, the body weight of the user can be obtained from the weight information in the mobile terminal of the user, and if the body weight of a certain user is 80 kg and the pressure data measured by the sensor in the bed is 600 newtons, it can be stated that the user in the bed is not the target user with the body weight of 80 kg. In this case it is indicated that the user is not resting in bed, so the reminder of the sleep alarm clock can be made when the time specified by the sleep alarm clock is reached.
In this embodiment, optionally, determining the number of people in the bed and whether the user in the bed is the target user according to the pressure data includes: the number of people in the bed is determined according to the dynamic matching degree and/or the total pressure value of the pressure data acquired by at least two pressure sensors arranged on the bed, and whether the user in the bed is the target user is determined according to the matching degree of the pressure data and the weight of the target user.
If the dynamic matching degree of the pressure data between the pressure sensors can be determined according to the position of the pressure sensors on the bed, and if the first pressure sensor acquires the arrival pressure data and the second pressure sensor acquires the arrival pressure data, the sum of the two pressure data is 800 newtons, and the sum is just matched with the body weight of the target user, the first pressure sensor and the second pressure sensor can be determined to be dynamically matched. The total pressure value is mentioned above, the number of people in the bed and whether the target user exists in the bed can be determined according to the dynamic matching degree of the pressure data and the total pressure value of the pressure sensor, and then whether the target user is reminded at the specified time of the sleep alarm clock can be determined.
And S230, if yes, identifying whether the auxiliary judgment information meets the preset condition.
And S240, if so, canceling the prompting operation of the sleep alarm clock when the specified time of the sleep alarm clock is reached.
On the basis of the embodiment, the embodiment can realize flexible control of the sleep alarm clock, can determine the number of people in the bed and whether the people in the bed comprise the target user through the pressure sensor arranged on the bed, and has the advantages that whether the prompt is made for the target user to the sleep alarm clock can be controlled, the use experience of the user is improved, and meanwhile, the accuracy of control of the sleep alarm clock is also improved.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a control device of an alarm clock according to a third embodiment of the present application. As shown in fig. 3, the control device of the alarm clock includes:
the user state judging module 310 is configured to determine that a user is currently in a first state or a second state according to pressure data obtained by a pressure sensor arranged on a bed;
an auxiliary judgment information identification module 320, configured to identify whether the auxiliary judgment information meets a preset condition if the user is in the first state at present;
an alarm clock control module 330, configured to cancel the sleep alarm clock prompt operation when the specified time of the sleep alarm clock is reached if the auxiliary identification information identification module 320 identifies that the time is yes.
According to the technical scheme provided by the embodiment of the application, the current state of a user is determined to be a first state or a second state through pressure data acquired by a pressure sensor arranged on a bed; if the first state is the first state, identifying whether the auxiliary judgment information meets the preset condition; and if so, canceling the prompting operation of the sleep alarm clock when the specified time of the sleep alarm clock is reached. Through adopting the technical scheme that this application provided, can realize controlling the clock according to user's demand to reach and can enough just remind the user to have a rest, can not wake up the effect of user again after the user has had a rest.
The product can execute the method provided by any embodiment of the application, and has the corresponding functional module and the beneficial effect of the execution method.
Example four
Embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for controlling an alarm clock, the method including:
determining that the user is in a first state or a second state at present according to pressure data acquired by a pressure sensor arranged on a bed;
if the first state is the first state, identifying whether the auxiliary judgment information meets the preset condition;
and if so, canceling the prompting operation of the sleep alarm clock when the specified time of the sleep alarm clock is reached.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the computer system in which the program is executed, or may be located in a different second computer system connected to the computer system through a network (such as the internet). The second computer system may provide the program instructions to the computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium containing the computer-executable instructions provided in the embodiments of the present application is not limited to the control operation of the alarm clock described above, and may also perform related operations in the alarm clock control method provided in any embodiments of the present application.
EXAMPLE five
The embodiment of the application provides a mobile terminal, and the control device of the alarm clock provided by the embodiment of the application can be integrated in the mobile terminal. Fig. 4 is a schematic structural diagram of a mobile terminal according to a fifth embodiment of the present application. As shown in fig. 4, the present embodiment provides a mobile terminal 400, which includes: one or more processors 420; the storage device 410 is configured to store one or more programs, and when the one or more programs are executed by the one or more processors 420, the one or more processors 420 implement a method for controlling an alarm clock according to an embodiment of the present application, the method includes:
determining that the user is in a first state or a second state at present according to pressure data acquired by a pressure sensor arranged on a bed;
if the first state is the first state, identifying whether the auxiliary judgment information meets the preset condition;
and if so, canceling the prompting operation of the sleep alarm clock when the specified time of the sleep alarm clock is reached.
Of course, those skilled in the art can understand that the processor 420 can also implement the technical solution of the alarm clock control method provided in any embodiment of the present application.
The mobile terminal 400 shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 4, the mobile terminal 400 includes a processor 420, a storage device 410, an input device 430, and an output device 440; the number of the processors 420 in the mobile terminal may be one or more, and one processor 420 is taken as an example in fig. 4; the processor 420, the storage device 410, the input device 430 and the output device 440 in the mobile terminal may be connected by a bus or other means, and are exemplified by a bus 450 in fig. 4.
The storage device 410 is a computer-readable storage medium, and can be used to store software programs, computer-executable programs, and modules, such as program instructions corresponding to the alarm clock control method in the embodiment of the present application.
The storage device 410 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the mobile terminal, and the like. Further, the storage 410 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 non-volatile solid state storage device. In some examples, storage 410 may further include memory located remotely from processor 420, which may be connected via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 430 may be used to receive input numbers, character information, or voice information, and to generate key signal inputs related to user settings and function control of the mobile terminal. The output device 440 may include a display screen, speakers, etc.
The mobile terminal provided by the embodiment of the application can realize controlling the alarm clock according to the requirements of the user, so that the effect of reminding the user to have a rest on time and waking the user up after the user has had a rest is achieved.
The control device, the storage medium and the mobile terminal of the alarm clock provided in the above embodiments can execute the control method of the alarm clock provided in any embodiment of the present application, and have corresponding functional modules and beneficial effects for executing the method. For technical details that are not described in detail in the above embodiments, reference may be made to a method for controlling an alarm clock provided in any embodiment of the present application.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.