CN113542496A - Intelligent alarm clock processing method and device for mobile terminal, mobile terminal and storage medium - Google Patents

Intelligent alarm clock processing method and device for mobile terminal, mobile terminal and storage medium Download PDF

Info

Publication number
CN113542496A
CN113542496A CN202110718971.XA CN202110718971A CN113542496A CN 113542496 A CN113542496 A CN 113542496A CN 202110718971 A CN202110718971 A CN 202110718971A CN 113542496 A CN113542496 A CN 113542496A
Authority
CN
China
Prior art keywords
alarm clock
time
user
screen
mobile terminal
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
CN202110718971.XA
Other languages
Chinese (zh)
Other versions
CN113542496B (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.)
Huizhou TCL Cloud Internet Corp Technology Co Ltd
Original Assignee
Huizhou TCL Cloud Internet Corp 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 Huizhou TCL Cloud Internet Corp Technology Co Ltd filed Critical Huizhou TCL Cloud Internet Corp Technology Co Ltd
Priority to CN202110718971.XA priority Critical patent/CN113542496B/en
Publication of CN113542496A publication Critical patent/CN113542496A/en
Application granted granted Critical
Publication of CN113542496B publication Critical patent/CN113542496B/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/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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention discloses a method and a device for processing an intelligent alarm clock of a mobile terminal, the mobile terminal and a storage medium, wherein the method comprises the following steps: acquiring alarm clock time set by a user; when the function of the intelligent alarm clock is detected to be started, judging whether a screen-off and screen-off event is detected; detecting a screen-off and screen-off event, and starting timing the sleep time; according to the difference value between the alarm clock time set by the user and the timing sleep time and a preset reasonable sleep cycle, calculating a sleep cycle time point closest to the alarm clock time set by the user according to a preset algorithm; and controlling alarm clock ringing reminding when the current time reaches the sleep cycle time point according to the sleep cycle time point. The mobile terminal can automatically search the nearest sleep cycle time point based on the alarm clock set by the user, and can remind the user of the intelligent alarm clock, so that convenience is brought to the user.

Description

Intelligent alarm clock processing method and device for mobile terminal, mobile terminal and storage medium
Technical Field
The invention relates to the technical field of mobile terminals, in particular to a method and a device for processing an intelligent alarm clock of a mobile terminal, the mobile terminal and a storage medium.
Background
With the development of science and technology and the continuous improvement of the living standard of people, various mobile terminals such as mobile phones are more and more popular, and the mobile phones become indispensable communication tools in the life of people. The alarm clock is one of the commonly used functions of the mobile phone.
The common alarm Clock on the mobile phone in the prior art can set the specific time and date to be reminded, the alarm Clock repetition frequency, the ring tone and other functions in Clock application to achieve the effect of waking up a user.
Thus, there is a need for improvements and enhancements in the art.
Disclosure of Invention
The invention aims to solve the technical problem that a method and a device for processing an intelligent alarm clock of a mobile terminal, the mobile terminal and a storage medium are provided aiming at the defects in the prior art.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a processing method of an intelligent alarm clock of a mobile terminal is provided, wherein the method comprises the following steps:
acquiring alarm clock time set by a user;
when the function of the intelligent alarm clock is detected to be started, judging whether a screen-off and screen-off event is detected;
when the screen-off and screen-off event is detected, starting timing the sleep time;
according to the difference value between the alarm clock time set by the user and the timing sleep time and a preset reasonable sleep cycle, calculating a sleep cycle time point closest to the alarm clock time set by the user according to a preset algorithm;
and controlling alarm clock ringing reminding when the current time reaches the sleep cycle time point according to the sleep cycle time point.
The intelligent alarm clock processing method of the mobile terminal comprises the following steps of:
and setting the reasonable sleep cycle on the mobile terminal in advance.
The intelligent alarm clock processing method of the mobile terminal comprises the following steps of:
the alarm clock time is set on the mobile terminal in advance.
The processing method of the intelligent alarm clock of the mobile terminal comprises the following steps of judging whether a screen-off and screen-off event is detected when the function of the intelligent alarm clock is detected to be started:
registering a screen state monitoring event in advance, wherein the screen state monitoring event is used for monitoring a screen-off event of the mobile terminal;
and when the function of the intelligent alarm clock is detected to be started, judging whether a screen-off and screen-off event is detected.
The processing method of the intelligent alarm clock of the mobile terminal comprises the following steps of when a screen-off and screen-off event is detected, starting timing the sleep time:
when the screen-off and screen-off event is detected, whether the user falls asleep is detected through the sensor induction;
and when the user is detected to fall asleep, controlling to start timing the sleep time.
The intelligent alarm clock processing method for the mobile terminal comprises the following steps of measuring a sleep cycle time point closest to the alarm clock time set by the user according to a preset algorithm according to a difference value between the alarm clock time set by the user and the timing sleep time and a preset reasonable sleep cycle, wherein the step comprises the following steps:
calculating the total time from the timed sleep time to the alarm clock time set by the user;
dividing the total time obtained by calculation by a preset reasonable sleep cycle to obtain a quotient and a remainder time;
judging whether the remainder time is greater than a preset threshold value;
when the remainder time is greater than or equal to the preset threshold value, selecting the alarm clock time set by the user as the latest sleep cycle time point as the intelligent ringing time;
and when the remainder time is smaller than the preset threshold value, selecting the alarm clock time set by the user minus the remainder time as the latest sleep cycle time point as the intelligent ringing time.
The processing method of the intelligent alarm clock of the mobile terminal comprises the following steps of measuring the time point of the sleep cycle closest to the alarm clock time set by the user according to the difference value between the alarm clock time set by the user and the timing sleep time and the preset reasonable sleep cycle and the preset algorithm:
defining the alarm clock time set by the user as tsetLet the current time be t0The preset reasonable sleep cycle is 90 minutes; the real intelligent ringing time t of the alarm clock is preliminarily calculated through a specified algorithmreal: calculated by the following algorithm:
treal=tset-(tset-t0) % 90, unit: for a min period,
i.e. at the current time t0As the first item, selecting the arithmetic progression with the tolerance of 90min to not exceed the time t set by the usersetAnd the value with the minimum difference with the absolute value is used as the time value t of the real ring obtained initiallyreal
Calculated intelligent ringing time trealHas an interval of (t)set-90,tset]The unit: min; meanwhile, if the difference between the absolute value of the user-set time and the absolute value of the intelligent ringing time is greater than a predetermined threshold value TmaxIntervalThen select the user-set time as the intelligent ringing time, i.e. treal=tset
An intelligent alarm clock processing device of a mobile terminal, wherein the device comprises:
the alarm clock acquisition module is used for acquiring the alarm clock time set by a user;
the screen-off detection and judgment module is used for judging whether a screen-off and screen-off event is detected when the function of the intelligent alarm clock is detected to be started;
the timing module is used for starting timing the sleep time when detecting the screen-off and screen-off event;
the intelligent alarm clock confirmation module is used for measuring a sleep cycle time point closest to the alarm clock time set by the user according to a preset algorithm according to the difference value between the alarm clock time set by the user and the timing sleep time and a preset reasonable sleep cycle;
and the intelligent alarm clock ringing reminding control module is used for controlling alarm clock ringing reminding when the current time reaches the sleep cycle time point according to the sleep cycle time point.
A mobile terminal comprises a memory, a processor and a mobile terminal intelligent alarm clock processing program which is stored in the memory and can run on the processor, wherein when the processor executes the mobile terminal intelligent alarm clock processing program, the steps of any one of the mobile terminal intelligent alarm clock processing methods are realized.
A computer readable storage medium, wherein the computer readable storage medium has a mobile terminal intelligent alarm clock processing program stored thereon, and when the mobile terminal intelligent alarm clock processing program is executed by a processor, the steps of any one of the mobile terminal intelligent alarm clock processing methods are implemented.
Has the advantages that: compared with the prior art, the invention provides an intelligent alarm clock processing method of a mobile terminal, and provides an intelligent auxiliary sleep alarm clock processing method, which is based on a reasonable sleep cycle of a human body sleep cycle of 90 minutes; and searching the latest sleep cycle time point according to the alarm clock time point set by the user, and ringing at the time point. At the moment, the user has experienced a complete sleep cycle, so that the success rate of one-time getting-up at the moment is highest, namely, the reasonable alarm clock intelligent reminding is achieved to improve the getting-up success rate, a good sleep and rest effect is achieved, and convenience is provided for the user.
Drawings
Fig. 1 is a flowchart of a specific implementation of a processing method of an intelligent alarm clock of a mobile terminal according to an embodiment of the present invention.
Fig. 2 is a flowchart of a specific application implementation of the processing method of the intelligent alarm clock of the mobile terminal provided by the invention.
Fig. 3 is a schematic block diagram of an intelligent alarm clock processing apparatus of a mobile terminal according to an embodiment of the present invention.
Fig. 4 is a schematic diagram of an internal structure of a terminal device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and effects of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It should be noted that, if directional indications (such as up, down, left, right, front, and back … …) are involved in the embodiment of the present invention, the directional indications are only used to explain the relative positional relationship between the components, the movement situation, and the like in a specific posture (as shown in the drawing), and if the specific posture is changed, the directional indications are changed accordingly.
In addition, if there is a description of "first", "second", etc. in an embodiment of the present invention, the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
With the development of science and technology and the continuous improvement of the living standard of people, various mobile terminals such as mobile phones are more and more popular, and the mobile phones become indispensable communication tools in the life of people. The alarm clock is one of the commonly used functions of the mobile phone.
The common alarm Clock on the mobile phone in the prior art can set the specific time and date to be reminded, the alarm Clock repetition frequency, the ring tone and other functions in Clock application to achieve the effect of waking up a user.
The existing intelligent alarm clock technology is mainly focused on technologies such as volume increase, repetition frequency increase and alarm clock ring enriching under a specific scene, although the intelligent alarm clock technology can play a role of forcibly waking up a user, research shows that the design can lead the user to wake up repeatedly, chronic fatigue can be caused, harm to the health of people is caused to a certain degree, and the intelligent alarm clock technology is inconvenient for the user to use sometimes. Therefore, a more scientific and reasonable mode is sought, the basic function of waking up the user is realized, meanwhile, better user experience is brought, and the physical health of the user is cared.
Aiming at the current clock application, the alarm clock part mainly comprises the contents of setting an alarm clock time point, setting alarm clock repetition time, setting alarm clock ring, whether to cycle according to the week and the like. The alarm clock setting process in the prior art comprises the following steps: the user only needs to enter the Clock application, click the + number to create a new alarm Clock, set the required time point and cycle time, and the content of the alarm Clock ring, and the Clock application rings at the set time point to achieve the reminding effect. The traditional Clock is too simple in application function design, deep research is not carried out on human sleep health, and the healthy sleep quality cannot be guaranteed. The invention aims to design an intelligent sleep-assisting alarm clock from the perspective of human sleep health, and the intelligent sleep-assisting alarm clock is matched with a scientific sleep theory as far as possible.
In order to solve the above problems, an embodiment of the present invention provides a method for processing an intelligent alarm clock of a mobile terminal, and the present invention provides a method for designing an intelligent sleep-assisting alarm clock, which is based on scientific research on a 90-minute sleep cycle of a human body, searches a latest sleep cycle time point before according to an alarm clock time point set by a user, and performs a ring alert at the time point. At this point the user has experienced a complete sleep cycle and therefore the success rate of one-time getting up at that point is highest. In addition, logic optimization is performed on boundary scenes and specific scenes, and user experience is further guaranteed. The invention aims to provide a method and an idea for intellectualization of the future alarm clock, provides convenience for users to use and improves user experience.
Sleep cycle theory of the intelligent sleep alarm clock: it is theorized that the sleep time of a human body is not the reason for whether the brain is awake after waking up, but the key point is the number of sleep cycles completed during sleeping, and each sleep cycle has five obvious stages and respectively presents different brain wave signs. Each sleep cycle takes approximately 90 minutes, which 90 minutes are divided into: a normal sleep period of 65 minutes, or a non-REM period (REM: rapid eye rotation); then a 20 minute REM sleep period (when the brain dreams); the last 5 minutes is again a non-REM phase. Generally, the REM phase is shorter in duration (less than 20 minutes) in the early sleep cycles and longer (more than 20 minutes) in the later cycles. In case of natural sleep without alarm setting and without any other external intervention, on average wake up after a multiple of 90 minutes, like 4 half hours, 6 hours, 7 half hours, or 9 hours, etc., instead of 7 hours or 8 hours, since these are not multiples of 90 minutes. In the time period between two cycles, not really in sleep: the person's consciousness is hazy and blurred during this period, and if not disturbed (e.g., light, cold, urgency, noise, etc.) the person will enter the next 90 minute sleep cycle. A person who has slept for only four sleep cycles (i.e. 6 hours) typically feels more full rest than those who have slept for 8 to 10 hours but have not completed the (last) sleep cycle.
Based on the theory, the invention mainly provides an intelligent sleep assisting alarm Clock processing method meeting the scientific sleep cycle, a user needs to select to enter a sleep intelligent mode in Clock application, a sleep cycle time point closest to the set time is searched before the alarm Clock time point set by the user arrives, and an alarm Clock is sounded at the time point, so that the basic theory of the scientific sleep is met.
In addition, considering that part of people have the habit of using the mobile phone before sleeping, the time point of the last screen off of the mobile phone is taken as the time point of falling asleep when the sleep cycle is calculated scientifically (if the screen is lightened again, the sleep cycle is recalculated).
Exemplary method
First embodiment
As shown in fig. 1, an embodiment of the present invention provides a mobile terminal intelligent alarm clock processing method, which can be used in mobile devices such as a mobile phone and a tablet computer. The method in the embodiment of the invention comprises the following steps:
s100, acquiring alarm clock time set by a user;
in the embodiment of the invention, the alarm clock time needs to be set on the mobile terminal mobile phone in advance. Taking a mobile phone as an example, a user can set an alarm clock on the mobile phone, for example, when the user needs to set a wake-up alarm clock, a wake-up alarm clock at 7 am is set on the mobile phone.
In the embodiment of the present invention, according to the sleep cycle, each sleep cycle takes about 90 minutes, and the reasonable sleep cycle is set to 90 minutes in advance on the mobile terminal in the embodiment of the present invention. I.e. every 90 minutes for a reasonable sleep period.
S200, when the function of the intelligent alarm clock is detected to be started, judging whether a screen-off and screen-off event is detected;
in the embodiment of the invention, when the function of the intelligent alarm clock is detected to be started, whether a screen turn-off event is detected is judged. In a specific embodiment, the invention can register a screen state monitoring event e in advance on the mobile terminalscreenThe mobile terminal screen-off monitoring system is used for monitoring screen-off events of the mobile terminal; when the function of the intelligent alarm clock is detected to be started, whether a screen-off and screen-off event is detected is judged. When the alarm clock is implemented specifically, a user can set the alarm clock time before sleeping and set whether the alarm clock is in a common alarm clock mode or an intelligent alarm clock mode. If the alarm clock is in the common alarm clock mode, the alarm clock can be immediately reminded when the alarm clock point set by the user is reached. And the setting of the intelligent alarm clock mode is the processing mode of the intelligent alarm clock of the mobile terminal.
Step S300, when a screen-off and screen-off event is detected, starting timing sleep time;
because the habit of using the mobile phone before sleeping is considered in part of people, the time point of the last screen off of the mobile phone is taken as the time point of falling asleep when the sleep cycle is scientifically calculated (if the screen is lightened again, the sleep cycle is recalculated).
In the embodiment of the invention, when the mobile terminal mobile phone detects the screen-off and screen-off event, the sleep time is timed. Namely, after a user plays a mobile phone in bed at night and sets an alarm clock, and starts the intelligent alarm clock mode, when the user turns off the screen and puts off the screen for sleeping, the mobile phone can detect the event of turning off the screen and putting off the screen, and start to time the sleeping time. For example, at 23 o' clock 00 pm the user starts sleeping.
Specifically, in order to calculate the sleep time more accurately, the intelligent alarm clock is made more contract. When the mobile phone detects a screen-off event, the mobile phone can further detect whether the user falls asleep through the sensor; for sleep detection in the embodiment of the invention, the sound sensor or the infrared sensor arranged on the mobile phone can be used for detecting that the user basically does not act and is in a quiet state so as to judge that the user falls asleep; the action during sleeping can be monitored by using gravity sensing arranged on the mobile phone, and because the mobile phone is not far away from a person, even a small action of turning over can be detected by the gravity sensing; or the sensor such as a body motion recorder (actigraph) sensor installed on other intelligent terminals, or the pulse sensor detects the gentle state of the user's pulse for treating sleep, and the oximeter, the brain wave sensor and the like detect the state of the user falling asleep, and then the state is sent to the terminal of the invention through the internet of things.
In the embodiment of the invention, when the user is detected to fall asleep, the timing of the sleep time is controlled to be started. Whether detect the user through the sensor like this and fall asleep, it is more accurate to detect, more makes things convenient for the setting realization of intelligent alarm clock.
Step S400, according to the difference value between the alarm clock time set by the user and the timing sleep time and a preset reasonable sleep cycle, calculating a sleep cycle time point closest to the alarm clock time set by the user according to a preset algorithm;
in the embodiment of the invention, the sleep cycle time point closest to the alarm clock time set by the user is measured according to the difference value between the alarm clock time set by the user and the timing sleep time and the preset reasonable sleep cycle and the preset algorithm.
Specifically, for example, the total time from the timed sleep time to the alarm time set by the user is calculated; for example, when the mobile phone of the user is detected to turn off the screen from 23 pm, the timed sleep time is 23 pm, and if the alarm time set by the user is 7 am. This is done from the timed sleep time evening 23: the total time from 00 to the alarm clock time of 7 points set by the user is 8 hours, and the time is converted into 480 minutes;
dividing the total time obtained by calculation by a preset reasonable sleep cycle to obtain a quotient and a remainder time; dividing the calculated total time 480 minutes by the preset reasonable sleep cycle 90 minutes to obtain a quotient 5 and a remainder time 30 minutes as described above;
judging whether the remainder time is greater than a preset threshold value; in the embodiment of the present invention, the predetermined threshold is preferably 75 minutes; for example, judging whether the remainder time, for example, 30 minutes, is greater than a preset predetermined threshold, for example, 75 minutes;
when the remainder time, for example, 30 minutes, is smaller than the preset predetermined threshold, for example, 75 minutes, the alarm time set by the user, for example, 7 am minus the remainder time, for example, 30 minutes, is selected as the latest sleep cycle time point 6: and 30, as the intelligent ring time. Then the ratio of 6: 30 as the smart alarm time by the end of just one sleep period. Therefore, the user can easily wake up, the sleep cycle is completed, and a better sleep effect is achieved. Providing convenience for users.
In the embodiment of the invention, when the remainder time is greater than or equal to the preset predetermined threshold, the alarm clock time set by the user is selected as the latest sleep cycle time point to be used as the intelligent ringing time.
For example: when the alarm clock set by the user is 7.50 am, the user also detects that the time goes to sleep is 23:00 pm. From 23:00 at night to 7: 50 for a total of 8 hours and 50 minutes, with the following minutes: 530 minutes; the remainder is 80 minutes when 530/90 is 5. In this example, when the remaining time, for example, 80 minutes, is greater than or equal to the preset predetermined threshold, for example, 75 minutes, the alarm time set by the user, for example, 7.50 am, is selected as the latest sleep cycle time point.
In the embodiment of the present invention, the step of calculating, according to the difference between the alarm clock time set by the user and the timed sleep time and the preset reasonable sleep cycle and according to the preset algorithm, the sleep cycle time point closest to the alarm clock time set by the user includes:
defining the alarm clock time set by the user as tsetLet the current time be t0The preset reasonable sleep cycle is 90 minutes; the real intelligent ringing time t of the alarm clock is preliminarily calculated through a specified algorithmreal: calculated by the following algorithm:
treal=tset-(tset-t0) % 90, unit: for a min period,
i.e. at the current time t0As the first item, selecting the arithmetic progression with the tolerance of 90min to not exceed the time t set by the usersetAnd the value with the minimum difference with the absolute value is used as the time value t of the real ring obtained initiallyreal
Calculated intelligent ringing time trealHas an interval of (t)set-90,tset]The unit: min; meanwhile, if the difference between the absolute value of the user-set time and the absolute value of the intelligent ringing time is greater than a predetermined threshold value TmaxIntervalThen select the user-set time as the intelligent ringing time, i.e. treal=tset
That is, in the embodiment of the present invention, the algorithm of the above embodiment mainly includes the following two scenarios:
the first scenario is: detecting that the screen-off sleeping time is 11 o 'clock sleeping at night, setting 7 o' clock alarm- > for 8 hours (480min), 480% of alarm clock 90 ═ 30min (30< Tmax ═ 75); therefore, the time of subtracting 30 points from 7 points is 6 and a half points, and the real ringing time of the alarm clock is 6 and a half points. Thus, the time period from 11 o 'clock to 6 o' clock and half is just 5 sleep cycles (1.5 x 5 ═ 7.5h) for the user to sleep
The second scenario is: detecting that the screen-off sleeping time is 11 o 'clock sleeping at night, setting 7 o' clock 50 alarm- > for 530min, and 530% of alarm 90-80 min (80 Tmax-75); at this time, the time of subtracting 80 from the 7 o ' clock 50 is 6 o ' clock half, the sleep cycle is far away from the time set by the user, so the 7 o ' clock 50 is taken as the real ring time, thus the total 8h50min is counted from the 11 o ' clock to the 7 o ' clock 50, the difference is just 10min from the 6 sleep cycles (1.5 x 6 h 9h), and the sleep cycle is close to the 6 sleep cycles.
And S500, controlling alarm clock ringing reminding when the current time reaches the sleep cycle time point according to the sleep cycle time point.
Based on the steps, according to the sleep cycle time point, when the current time reaches the sleep cycle time point, the alarm clock ringing reminding is controlled.
Therefore, the intelligent sleep-assisting alarm Clock meeting the scientific sleep cycle is mainly designed, a user needs to select to enter a sleep intelligent mode in Clock application, a sleep cycle time point closest to a set time is searched before an alarm Clock time point set by the user arrives, and the alarm Clock is sounded at the time point.
Based on the above method embodiment, the invention also provides a specific application embodiment,
as shown in fig. 2, a method for processing an intelligent alarm clock of a mobile terminal according to an embodiment of the present invention includes the following steps:
step S10, start;
step S11, entering a clock application, and creating or editing an alarm clock; proceeding to S12;
in this embodiment, when the user sets the alarm clock, the user may enter a clock application to create or edit an alarm clock.
Step S12, setting the alarm clock to be in an intelligent alarm clock mode, storing the alarm clock mode, and recording the ringing time t set by the userset(ii) a And proceeds to step S13;
in the specific application embodiment of the invention, the alarm clock has two modes for the user to select, which are divided into a common mode and an intelligent mode; when the user selects the 'intelligent mode' and stores the alarm clock, the ringing time t set by the user is recordedset
Step S13, registering a monitor event e of mobile phone screen statescreen(ii) a Listening for an event escreenExecuting the subsequent flow when the screen is monitored to be off, and proceeding to step S14;
in the embodiment of the invention, a monitoring event e of the screen state of a mobile phone is registeredscreenAnd after the screen-off event of the mobile phone is monitored, executing subsequent calculation and setting the flow of the intelligent alarm clock. As part of people have the habit of using the mobile phone before sleeping, the intelligent alarm clock can be set after the screen is turned off to be closer to the real sleep starting time of the user.
Step S14, obtaining the current time t0Preliminarily (or re-) calculating the time value t of the real ringing time of the alarm clockreal
Step S15, determining the ringing time t set by the usersetTime value t of real ringingrealWhether it is greater than a predetermined threshold value TmaxIntervalIf yes, the process proceeds to step S16, otherwise, the process proceeds to step S17;
step S16, the time value t of real alarm clock ringing is setrealSetting a set ringing time t as set by a usersetAnd proceeds to step S17;
step S17, calling the relevant API provided by the system, and setting a ring time as the real ring time value trealThe alarm clock of (1); and proceeds to step S18;
step S18, listening to event e before alarm clock ringingscreenIs a screen-out blanking event heard? If yes, the process proceeds to step S14, and if no, the process proceeds to step S19;
step S19, alarm clockAt the time of intelligent ringingrealSounding, removing snoop event escreenThen, it proceeds to step S20;
and step S20, end.
In the embodiment of the invention, the real intelligent ringing time t of the alarm clock is preliminarily calculated through a specified algorithmreal(ii) a The algorithm is as follows: let the current time be t0Then t isreal=tset-(tset-t0) % 90 (unit: min), i.e. at the current time t0As the first item, selecting the arithmetic progression with the tolerance of 90min to not exceed the time t set by the usersetAnd the value with the minimum difference with the absolute value is used as the time value t of the real ring obtained initiallyreal
According to the algorithm, the calculated intelligent ringing time trealHas an interval of (t)set-90,tset](unit: min); meanwhile, if the difference between the absolute value of the user-set time and the absolute value of the intelligent ringing time is greater than a predetermined threshold value TmaxInterval(set for 75min, can be adjusted according to the specific business requirement), then select the user-set time as the intelligent ring-down time, i.e. treal=tset(ii) a Under the scene, the ringing time is close to the time point of the next complete sleep cycle, so that the early ringing time is avoided, the user experience is ensured, and the theory of scientific sleep is matched.
In the embodiment of the invention, an alarm clock which rings at the intelligent ringing time is set through a corresponding API provided by the system. Before the ring time, if escreenAnd if the screen-off event is monitored again, the screen is awakened before the event, the operation scene is usually a telephone, an alarm clock, user active operation and the like, and at the moment, the user is not in a sleep state with high probability, the sleep cycle is interrupted, so that the intelligent ringing time is recalculated according to a specified algorithm. At the moment, the intelligent ringing time t is recalculatedrealAnd the subsequent processes are executed.
The alarm clock removes the monitoring event e after sounding at the moment of intelligent ringingscreenAnd the flow ends.
Examples are: the algorithm mainly comprises the following two scenes:
one), 11 o 'clock at night, 7 o' clock alarm- > 8 hours (480min), 480% 90-30 min (30< Tmax-75); therefore, the time of subtracting 30 points from 7 points is 6 and a half points, and the real ringing time of the alarm clock is 6 and a half points. Thus, the time period from 11 o 'clock to 6 o' clock and half is just 5 sleep cycles (1.5 x 5 ═ 7.5h) for the user to sleep
Two), 11 o 'clock sleep at night, set 7 o' clock 50 alarm- > for 530min, 530% 90-80 min (80 Tmax-75); at this time, the time of subtracting 80 from the 7 o ' clock 50 is 6 o ' clock half, the sleep cycle is far away from the time set by the user, so the 7 o ' clock 50 is taken as the real ring time, thus the total 8h50min is counted from the 11 o ' clock to the 7 o ' clock 50, the difference is just 10min from the 6 sleep cycles (1.5 x 6 h 9h), and the sleep cycle is close to the 6 sleep cycles.
Exemplary device
As shown in fig. 3, an embodiment of the present invention provides an intelligent alarm clock processing apparatus for a mobile terminal, where the apparatus includes:
a set alarm clock obtaining module 610, configured to obtain an alarm clock time set by a user;
the screen-off detection and judgment module 620 is used for judging whether a screen-off and screen-off event is detected when the function of the intelligent alarm clock is detected to be started;
the timing module 630 is configured to start timing the sleep time when the screen-off event is detected;
the intelligent alarm clock confirmation module 640 is configured to calculate, according to a preset reasonable sleep cycle and a difference between the alarm clock time set by the user and the timed sleep time, a sleep cycle time point closest to the alarm clock time set by the user according to a preset algorithm;
and the intelligent alarm clock ringing reminding control module 650 is configured to control alarm clock ringing reminding according to the sleep cycle time point, when the current time reaches the sleep cycle time point, as described above.
Based on the above embodiments, the present invention further provides a terminal device, and a schematic block diagram thereof may be as shown in fig. 4. The terminal equipment comprises a processor, a memory, a network interface and a display screen which are connected through a system bus. Wherein the processor of the terminal device is configured to provide computing and control capabilities. The memory of the terminal equipment comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the terminal device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a mobile terminal intelligent alarm clock process. The display screen of the terminal equipment can be a liquid crystal display screen or an electronic ink display screen.
It will be understood by those skilled in the art that the block diagram in fig. 4 is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation to the terminal device to which the solution of the present invention is applied, and a specific terminal device may include more or less components than those in the figure, or combine some components, or have different component arrangements.
In one embodiment, a terminal device is provided, the terminal device includes a memory, a processor and a mobile terminal intelligent alarm clock processing program stored on the processor and capable of running on the processor, and the processing executes the following steps:
acquiring alarm clock time set by a user;
when the function of the intelligent alarm clock is detected to be started, judging whether a screen-off and screen-off event is detected;
when the screen-off and screen-off event is detected, starting timing the sleep time;
according to the difference value between the alarm clock time set by the user and the timing sleep time and a preset reasonable sleep cycle, calculating a sleep cycle time point closest to the alarm clock time set by the user according to a preset algorithm;
and controlling alarm clock ringing reminding when the current time reaches the sleep cycle time point according to the sleep cycle time point.
Wherein, the step of obtaining the alarm clock time set by the user comprises the following steps:
and setting the reasonable sleep cycle on the mobile terminal in advance.
Wherein, the step of obtaining the alarm clock time set by the user comprises the following steps:
the alarm clock time is set on the mobile terminal in advance.
Wherein, when detecting that the intelligent alarm clock function is opened, judge whether detect the step that goes out the screen and put out the screen event and include:
registering a screen state monitoring event in advance, wherein the screen state monitoring event is used for monitoring a screen-off event of the mobile terminal;
and when the function of the intelligent alarm clock is detected to be started, judging whether a screen-off and screen-off event is detected.
Wherein, when detecting the event of screen off and screen off, the step of starting timing the sleep time comprises:
when the screen-off and screen-off event is detected, whether the user falls asleep is detected through the sensor induction;
and when the user is detected to fall asleep, controlling to start timing the sleep time.
The step of calculating the sleep cycle time point closest to the alarm clock time set by the user according to a preset algorithm according to the difference value between the alarm clock time set by the user and the timing sleep time and a preset reasonable sleep cycle comprises the following steps:
calculating the total time from the timed sleep time to the alarm clock time set by the user;
dividing the total time obtained by calculation by a preset reasonable sleep cycle to obtain a quotient and a remainder time;
judging whether the remainder time is greater than a preset threshold value;
when the remainder time is greater than or equal to the preset threshold value, selecting the alarm clock time set by the user as the latest sleep cycle time point as the intelligent ringing time;
and when the remainder time is smaller than the preset threshold value, selecting the alarm clock time set by the user minus the remainder time as the latest sleep cycle time point as the intelligent ringing time.
Wherein, the step of calculating the sleep cycle time point closest to the alarm clock time set by the user according to a preset algorithm according to the difference value between the alarm clock time set by the user and the timing sleep time and a preset reasonable sleep cycle comprises:
defining the alarm clock time set by the user as tsetLet the current time be t0The preset reasonable sleep cycle is 90 minutes; the real intelligent ringing time t of the alarm clock is preliminarily calculated through a specified algorithmreal: calculated by the following algorithm:
treal=tset-(tset-t0) % 90, unit: for a min period,
i.e. at the current time t0As the first item, selecting the arithmetic progression with the tolerance of 90min to not exceed the time t set by the usersetAnd the value with the minimum difference with the absolute value is used as the time value t of the real ring obtained initiallyreal
Calculated intelligent ringing time trealHas an interval of (t)set-90,tset]The unit: min; meanwhile, if the difference between the absolute value of the user-set time and the absolute value of the intelligent ringing time is greater than a predetermined threshold value TmaxIntervalThen select the user-set time as the intelligent ringing time, i.e. treal=tset
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 hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
In summary, the invention discloses a method and a device for processing an intelligent alarm clock of a mobile terminal, the mobile terminal and a storage medium, wherein the method comprises the following steps: acquiring alarm clock time set by a user; when the function of the intelligent alarm clock is detected to be started, judging whether a screen-off and screen-off event is detected; detecting a screen-off and screen-off event, and starting timing the sleep time; according to the difference value between the alarm clock time set by the user and the timing sleep time and a preset reasonable sleep cycle, calculating a sleep cycle time point closest to the alarm clock time set by the user according to a preset algorithm; and controlling alarm clock ringing reminding when the current time reaches the sleep cycle time point according to the sleep cycle time point. The invention provides an intelligent sleep-assisting alarm clock processing method, which is based on a reasonable sleep cycle of a human body sleep cycle of 90 minutes; and searching the latest sleep cycle time point according to the alarm clock time point set by the user, and ringing at the time point. At the moment, the user has experienced a complete sleep cycle, so that the success rate of one-time getting-up at the moment is highest, namely, the reasonable alarm clock intelligent reminding is achieved to improve the getting-up success rate, a good sleep and rest effect is achieved, and convenience is provided for the user.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A processing method of an intelligent alarm clock of a mobile terminal is characterized by comprising the following steps:
acquiring alarm clock time set by a user;
when the function of the intelligent alarm clock is detected to be started, judging whether a screen-off and screen-off event is detected;
when the screen-off and screen-off event is detected, starting timing the sleep time;
according to the difference value between the alarm clock time set by the user and the timing sleep time and a preset reasonable sleep cycle, calculating a sleep cycle time point closest to the alarm clock time set by the user according to a preset algorithm;
and controlling alarm clock ringing reminding when the current time reaches the sleep cycle time point according to the sleep cycle time point.
2. The method for processing the intelligent alarm clock of the mobile terminal according to claim 1, wherein the step of obtaining the alarm clock time set by the user comprises the steps of:
and setting the reasonable sleep cycle on the mobile terminal in advance.
3. The method for processing the intelligent alarm clock of the mobile terminal according to claim 1, wherein the step of obtaining the alarm clock time set by the user comprises the steps of:
the alarm clock time is set on the mobile terminal in advance.
4. The method for processing the intelligent alarm clock of the mobile terminal according to claim 1, wherein the step of judging whether the screen-off and screen-off event is detected when the function of the intelligent alarm clock is detected to be turned on comprises the following steps:
registering a screen state monitoring event in advance, wherein the screen state monitoring event is used for monitoring a screen-off event of the mobile terminal;
and when the function of the intelligent alarm clock is detected to be started, judging whether a screen-off and screen-off event is detected.
5. The method for processing the intelligent alarm clock of the mobile terminal according to claim 1, wherein the step of starting to time the sleep time when the screen-off and screen-off event is detected comprises:
when the screen-off and screen-off event is detected, whether the user falls asleep is detected through the sensor induction;
and when the user is detected to fall asleep, controlling to start timing the sleep time.
6. The method for processing the intelligent alarm clock of the mobile terminal according to claim 1, wherein the step of calculating the time point of the sleep cycle closest to the alarm clock time set by the user according to the difference between the alarm clock time set by the user and the timed sleep time and the preset reasonable sleep cycle and the preset algorithm comprises:
calculating the total time from the timed sleep time to the alarm clock time set by the user;
dividing the total time obtained by calculation by a preset reasonable sleep cycle to obtain a quotient and a remainder time;
judging whether the remainder time is greater than a preset threshold value;
when the remainder time is greater than or equal to the preset threshold value, selecting the alarm clock time set by the user as the latest sleep cycle time point as the intelligent ringing time;
and when the remainder time is smaller than the preset threshold value, selecting the alarm clock time set by the user minus the remainder time as the latest sleep cycle time point as the intelligent ringing time.
7. The method for processing the intelligent alarm clock of the mobile terminal according to claim 1, wherein the step of calculating the time point of the sleep cycle closest to the alarm clock time set by the user according to a preset algorithm based on the difference between the alarm clock time set by the user and the timed sleep time and a preset reasonable sleep cycle comprises:
defining the alarm clock time set by the user as tsetLet the current time be t0The preset reasonable sleep period is 90 minute; the real intelligent ringing time t of the alarm clock is preliminarily calculated through a specified algorithmreal: calculated by the following algorithm:
treal=tset-(tset-t0) % 90, unit: for a min period,
i.e. at the current time t0As the first item, selecting the arithmetic progression with the tolerance of 90min to not exceed the time t set by the usersetAnd the value with the minimum difference with the absolute value is used as the time value t of the real ring obtained initiallyreal
Calculated intelligent ringing time trealHas an interval of (t)set-90,tset]The unit: min; meanwhile, if the difference between the absolute value of the user-set time and the absolute value of the intelligent ringing time is greater than a predetermined threshold value TmaxIntervalThen select the user-set time as the intelligent ringing time, i.e. treal=tset。
8. A mobile terminal intelligent alarm clock processing device is characterized in that the device comprises:
the alarm clock acquisition module is used for acquiring the alarm clock time set by a user;
the screen-off detection and judgment module is used for judging whether a screen-off and screen-off event is detected when the function of the intelligent alarm clock is detected to be started;
the timing module is used for starting timing the sleep time when detecting the screen-off and screen-off event;
the intelligent alarm clock confirmation module is used for measuring a sleep cycle time point closest to the alarm clock time set by the user according to a preset algorithm according to the difference value between the alarm clock time set by the user and the timing sleep time and a preset reasonable sleep cycle;
and the intelligent alarm clock ringing reminding control module is used for controlling alarm clock ringing reminding when the current time reaches the sleep cycle time point according to the sleep cycle time point.
9. A mobile terminal, characterized in that the mobile terminal comprises a memory, a processor and a mobile terminal intelligent alarm clock processing program stored in the memory and capable of running on the processor, and when the processor executes the mobile terminal intelligent alarm clock processing program, the steps of the mobile terminal intelligent alarm clock processing method according to any one of claims 1-7 are implemented.
10. A computer-readable storage medium, wherein the computer-readable storage medium has a mobile terminal intelligent alarm clock processing program stored thereon, and when the mobile terminal intelligent alarm clock processing program is executed by a processor, the steps of the mobile terminal intelligent alarm clock processing method according to any one of claims 1-7 are implemented.
CN202110718971.XA 2021-06-28 2021-06-28 Mobile terminal intelligent alarm clock processing method and device, mobile terminal and storage medium Active CN113542496B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110718971.XA CN113542496B (en) 2021-06-28 2021-06-28 Mobile terminal intelligent alarm clock processing method and device, mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110718971.XA CN113542496B (en) 2021-06-28 2021-06-28 Mobile terminal intelligent alarm clock processing method and device, mobile terminal and storage medium

Publications (2)

Publication Number Publication Date
CN113542496A true CN113542496A (en) 2021-10-22
CN113542496B CN113542496B (en) 2022-10-25

Family

ID=78125977

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110718971.XA Active CN113542496B (en) 2021-06-28 2021-06-28 Mobile terminal intelligent alarm clock processing method and device, mobile terminal and storage medium

Country Status (1)

Country Link
CN (1) CN113542496B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114760385A (en) * 2022-04-01 2022-07-15 靳秀超 Alarm clock-based terminal control method and intelligent terminal

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003079588A (en) * 2001-09-10 2003-03-18 Tsugio Nagai Sleep cycle alarm clock
CN101612431A (en) * 2008-06-27 2009-12-30 魏赞 Method for assisting sleep and device
JP2015161542A (en) * 2014-02-26 2015-09-07 セイコーエプソン株式会社 Notification device and control method
US20160217672A1 (en) * 2015-01-28 2016-07-28 Samsung Electronics Co., Ltd. Method and apparatus for improving and monitoring sleep
KR20160092889A (en) * 2015-01-28 2016-08-05 삼성전자주식회사 Apparatus and Method for assisting sound sleep
CN106861013A (en) * 2017-03-09 2017-06-20 郑州大学 A kind of intelligent sleep instrument and control method
WO2019205145A1 (en) * 2018-04-28 2019-10-31 华为技术有限公司 Method and apparatus for setting ringing time of alarm clock, and electronic device
CN110658717A (en) * 2019-09-30 2020-01-07 安徽华米信息科技有限公司 Alarm clock control method, device, equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003079588A (en) * 2001-09-10 2003-03-18 Tsugio Nagai Sleep cycle alarm clock
CN101612431A (en) * 2008-06-27 2009-12-30 魏赞 Method for assisting sleep and device
JP2015161542A (en) * 2014-02-26 2015-09-07 セイコーエプソン株式会社 Notification device and control method
US20160217672A1 (en) * 2015-01-28 2016-07-28 Samsung Electronics Co., Ltd. Method and apparatus for improving and monitoring sleep
KR20160092889A (en) * 2015-01-28 2016-08-05 삼성전자주식회사 Apparatus and Method for assisting sound sleep
CN106861013A (en) * 2017-03-09 2017-06-20 郑州大学 A kind of intelligent sleep instrument and control method
WO2019205145A1 (en) * 2018-04-28 2019-10-31 华为技术有限公司 Method and apparatus for setting ringing time of alarm clock, and electronic device
CN110658717A (en) * 2019-09-30 2020-01-07 安徽华米信息科技有限公司 Alarm clock control method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114760385A (en) * 2022-04-01 2022-07-15 靳秀超 Alarm clock-based terminal control method and intelligent terminal

Also Published As

Publication number Publication date
CN113542496B (en) 2022-10-25

Similar Documents

Publication Publication Date Title
US11589805B2 (en) Adjusting alarms based on sleep onset latency
US20160246259A1 (en) Method, appararus and wearable apparatus for automatically reminding user to sleep
CN106214121B (en) Sleep reminding method and device and wearable device
US20150348390A1 (en) Wake-up device
TWI643041B (en) Smart system and method for controlling alarm
US20190213060A1 (en) Facilitating Restful Sleep Using Reminders
CN111568380B (en) Alarm clock setting method, device and equipment based on wake-up time prediction
CN107968885B (en) Alarm clock reminding method, mobile terminal and computer readable storage medium
CN111657855B (en) Sleep evaluation and sleep awakening method and device and electronic equipment
CN113542496B (en) Mobile terminal intelligent alarm clock processing method and device, mobile terminal and storage medium
CN106540367B (en) Sleep management method and smart bracelet
CN115153454A (en) Sleep-assisting stimulation control method and device, sleep-assisting equipment and storage medium
CN111357267B (en) Alarm clock ringing time setting method and device and electronic equipment
CN105725969B (en) Quarter-bell control method and alarm control unit for wearable device
CN113521488A (en) Insomnia treatment method and device capable of helping to recover sleep state
CN111163219A (en) Alarm clock processing method and device, storage medium and terminal
CN111385417A (en) Alarm clock control method and device, electronic equipment and storage medium
CN107645602A (en) A kind of processing method of information, device and storage medium
CN113952578A (en) Sleep awakening method and device for insomnia treatment
WO2019213804A1 (en) Method for operating an electronic device as an alarm clock
WO2023174129A1 (en) Charging control method and electronic device
US20230256192A1 (en) Systems and methods for inducing sleep of a subject
CN113662516A (en) Method, device, equipment and medium for work and rest management based on body temperature measurement
CN114338902A (en) Method for dynamically setting alarm clock, storage medium, control equipment and wearable equipment
CN114118940A (en) Alarm reminding method and device, storage medium and electronic equipment

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