Method and device for improving sleep, home system and storage medium
By obtaining and analyzing user's sleep data and controlling the operating mode of home appliances, the problem that the existing technology cannot promote good sleep habits is solved, and a suitable sleep environment is achieved to help users fall asleep more easily and maintain good sleep.
Patent Information
- Application Number
- CN202310646622.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-01
- Publication Date
- 2024-12-03
AI Technical Summary
The prior art is difficult to help users form good sleep habits. It can only control home appliances when it is determined that the user enters sleep to avoid affecting sleep, and cannot promote a good sleep environment.
By obtaining the target sleep data, target achievement time and historical sleep data of the target user, determine the expected sleep data for each day, and control the operating mode of the home appliance equipment based on the expected sleep data to create a suitable sleep atmosphere and help users develop a good sleep Habit.
Using the operating mode of home appliances to match the expected sleep data, it will make it easier for users to enter the sleep stage and help users form good sleep habits.
Smart Images

Figure CN119065260A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart home technology, for example, to a method, device, home system and storage medium for improving sleep. Background Art
[0002] With the improvement of living standards, people pay more and more attention to sleep. Good sleep can eliminate fatigue and contribute to physical and mental health.
[0003] The related technology discloses a control method for household appliances, including: a first device obtains user status information, the user status information is detected by a second device connected to the first device; determining that the user has fallen asleep based on the status information; and controlling the operation of a third device connected to the first device based on sleep information after the user has fallen asleep.
[0004] In the process of implementing the embodiments of the present disclosure, it is found that there are at least the following problems in the related art:
[0005] It can control the operation of related home appliances when it is determined that the user has fallen asleep, so as to prevent the home appliances from affecting the user's sleep. However, it cannot help the user form good sleeping habits.
[0006] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0007] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0008] The embodiments of the present disclosure provide a method, device, home system and storage medium for improving sleep, so as to improve the sleeping habits of a user.
[0009] In some embodiments, the method for improving sleep includes: obtaining the target sleep data, target achievement time and historical sleep data of the target user; determining the expected sleep data for each day within the target achievement time based on the target sleep data, target achievement time and historical sleep data; and controlling the target home appliance to operate in a corresponding mode based on the expected sleep data of each day.
[0010] In some embodiments, the apparatus for improving sleep includes: a processor and a memory storing program instructions, and the processor is configured to execute the aforementioned method for improving sleep when running the program instructions.
[0011] In some embodiments, the home system includes: one or more household appliances; and, the aforementioned device for improving sleep, which is communicatively connected to the household appliances.
[0012] In some embodiments, the storage medium stores program instructions, and when the program instructions are run, the aforementioned method for improving sleep is executed.
[0013] The method, device, home system and storage medium for improving sleep provided by the embodiments of the present disclosure can achieve the following technical effects:
[0014] First, the target user's target sleep data, the required target time, and the target user's previous historical sleep data are obtained, and based on this, the expected sleep data for each day within the target time is determined. Then, based on the expected sleep data for each day, the corresponding target home appliance is controlled to operate in the corresponding mode. In this way, the operating mode of the target home appliance is used to create an atmosphere that matches the expected sleep data, making it easier for the target user to enter the corresponding sleep stage at the expected sleep data. In this way, the target user can develop good sleeping habits.
[0015] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein:
[0017] Figure 1 is a schematic diagram of a method for improving sleep provided by an embodiment of the present disclosure;
[0018] Figure 2 is a schematic diagram of another method for improving sleep provided by an embodiment of the present disclosure;
[0019] Figure 3 is a schematic diagram of another method for improving sleep provided by an embodiment of the present disclosure;
[0020] Figure 4 is a schematic diagram of another method for improving sleep provided by an embodiment of the present disclosure;
[0021] Figure 5 is a schematic diagram of another method for improving sleep provided by an embodiment of the present disclosure;
[0022] Figure 6 is an application schematic diagram of a method for improving sleep according to an embodiment of the present disclosure;
[0023] Figure 7 is a schematic diagram of a device for improving sleep provided by an embodiment of the present disclosure;
[0024] Figure 8 A schematic diagram of another device for improving sleep provided by an embodiment of the present disclosure;
[0025] Fig. 9 It is a schematic diagram of a home system provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.
[0027] The terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0028] Unless otherwise stated, the term "plurality" means two or more.
[0029] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.
[0030] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.
[0031] The term "correspondence" may refer to an association relationship or a binding relationship. The correspondence between A and B means that there is an association relationship or a binding relationship between A and B.
[0032] Combination Figure 1 As shown, the embodiment of the present disclosure provides a method for improving sleep, comprising:
[0033] S101, the processor obtains target sleep data, target achievement time and historical sleep data of a target user.
[0034] S102, the processor determines the expected sleep data for each day within the target achievement time according to the target sleep data, the target achievement time and the historical sleep data.
[0035] S103: The processor controls the target home appliance to operate in a corresponding mode according to the expected sleep data of each day.
[0036] A device for improving sleep is set up in the target user's activity space (such as a bedroom). The processor of the device communicates with a smart bracelet, smart watch worn by the target user, or a smart pillow used by the target user through the Internet, Bluetooth, WiFi, radio frequency, infrared, etc. to obtain the target user's historical sleep data.
[0037] The target user can input the target sleep data and target achievement time set by himself through the terminal device. It is understandable that sleeping habits need to be gradually developed over a period of time, and thus the target sleep data cannot be achieved at one time, but requires a period of time. Therefore, the target achievement time is the time required to achieve the target sleep data set by the target user. For example, the target user sets to wake up at 7 am and fall asleep at 10 pm within 7 days, then waking up at 7 am and falling asleep at 10 pm are the target sleep data, and 7 days are the target achievement time. In some embodiments, the terminal device is, for example, a mobile device, a computer, etc., and the mobile device may include, for example, a mobile phone, a smart home device, a wearable device, a smart mobile device, a virtual reality device, etc., or any combination thereof, wherein the wearable device includes, for example: a smart watch, a smart bracelet, a pedometer, etc. The processor communicates with the terminal device through the Internet, Bluetooth, wifi, radio frequency, infrared, etc. to obtain the target sleep data and target achievement time set by the target user.
[0038] According to the target sleep data, the target duration and the historical sleep data, the expected sleep data for each day within the target duration is determined, that is, the expected sleep data for the first day, the second day, ..., and the last day within the target duration is determined. As can be seen from the foregoing, the target sleep data may include the time of waking up in the morning and the time of falling asleep at night, that is, the target sleep data includes different types of target sleep parameters. Therefore, the expected sleep data also includes different types of expected sleep parameters, and the types of expected sleep parameters are consistent with the types of target sleep parameters.
[0039] According to the expected sleep data of each day, the target home appliance is controlled to operate in the corresponding mode. Different expected sleep data corresponds to different target home appliances, and the operation mode is also different. For example, when the expected sleep data is the expected time to wake up in the morning, the corresponding target home appliance is the smart curtain, and the operation mode is the open curtain mode. When the expected sleep data is the expected time to fall asleep at night, the corresponding target home appliance is the smart lighting device, and the operation mode is the light off mode.
[0040] The method for improving sleep provided by the embodiment of the present disclosure first obtains the target sleep data of the target user, the required target achievement time, and the target user's previous historical sleep data, and based on this, determines the expected sleep data for each day within the target achievement time. Then, based on the expected sleep data for each day, the corresponding target home appliance is controlled to operate in a corresponding mode. In this way, the operating mode of the target home appliance is used to create an atmosphere that matches the expected sleep data, making it easier for the target user to enter the corresponding sleep stage at the expected sleep data. In this way, the target user can be helped to develop good sleeping habits.
[0041] Optionally, in step S101, the processor obtains historical sleep data of a target user, including:
[0042] The processor determines where the day falls within the goal attainment duration.
[0043] The processor obtains the historical sleep data of the target user according to the time position.
[0044] Determine the time position of the day within the target achievement duration, that is, the day. Obtain the historical sleep data of the target user based on the time position. For example, the historical sleep data can be the sleep data for a period of time, or the sleep data for the previous day. In this way, selecting appropriate historical sleep data will help accurately determine the expected sleep data for each day, making it easier to help the target user develop good sleep habits.
[0045] Optionally, the processor obtains historical sleep data of the target user according to the time position, including:
[0046] When the time position indicates that the current day is the first day within the target achievement duration, the processor obtains the original historical sleep data of the target user in a preset time period before the first day.
[0047] The processor obtains the actual sleep data of the target user on the previous day when the time position indicates that the current day is not the first day within the target achievement duration.
[0048] If the time position indicates that the current day is the first day within the target achievement period, it means that there is no sleep data of the target user in the process of developing good sleep habits at this time, and the sleep data of the target user before this time is needed. Therefore, at this time, the historical sleep data uses the previous historical sleep data, that is, the original historical sleep data of the target user in the preset time period before the first day is obtained. Optionally, the preset time period is 7 to 30 days or longer.
[0049] If the time position indicates that the current day is not the first day within the target achievement period, such as the second day, the third day, etc., the target user is already in the process of gradually developing sleep habits. Therefore, at this time, the historical sleep data uses the actual sleep data of the previous day, that is, the actual sleep data of the target user of the previous day is obtained.
[0050] Optionally, combined Figure 2 As shown, the embodiment of the present disclosure provides another method for improving sleep, comprising:
[0051] S101, the processor obtains target sleep data, target achievement time and historical sleep data of a target user.
[0052] S112: The processor screens the original historical sleep data to obtain final historical sleep data.
[0053] S122: The processor determines the expected sleep data for each day within the target achievement time period according to the final historical sleep data, the target sleep data, and the target achievement time period.
[0054] S103: The processor controls the target home appliance to operate in a corresponding mode according to the expected sleep data of each day.
[0055] When the historical data is the original historical sleep data of the target user in the preset time period before the first day, the original historical sleep data is the actual sleep data of the target user every day in the preset time period. However, when the target user has not yet entered the process of developing good sleep habits, there may be special actual sleep data that occasionally does not conform to his usual work and rest rules, such as going to bed late and getting up late, going to bed late and getting up early. However, these actual sleep data are not representative, and using these data will cause certain errors. Therefore, it is necessary to screen the original historical sleep data to exclude these unrepresentative "abnormal" data, and then obtain the final historical sleep data that can characterize the target user's usual work and rest time. Then, based on the final historical sleep data, target sleep data and target achievement time, determine the expected sleep data for each day within the target achievement time. In this way, the expected sleep data can be made more accurate.
[0056] Optionally, in step S112, the processor filters the original historical sleep data to obtain final historical sleep data, including:
[0057] The processor calculates a bias value of each type of original historical sleep parameter within a preset time period.
[0058] The processor removes the original historical sleep parameters corresponding to the bias values greater than the bias threshold to obtain the screened historical sleep parameters.
[0059] The processor uses the average value of each type of historical sleep parameters after screening as the final historical sleep data.
[0060] The original historical sleep data includes one or more categories of original historical sleep parameters. For example, it includes one or more of the time when you are ready to fall asleep T1, the time when you actually fall asleep T11, the time when you wake up T22, and the time when you get up T2. T1, T11, T22, and T2 belong to different categories of historical sleep parameters. The preset time period includes multiple days, so the original historical sleep data includes T1, T11, T22, and T2 for each day in the preset time period.
[0061] First, the bias value of each type of original historical sleep parameter within a preset time period is calculated, and then a plurality of bias values are obtained. The bias value represents the difference between the original historical sleep parameter and its corresponding parameter average value. A corresponding bias threshold A is set in advance for each type of original historical sleep parameter. For example, the bias threshold corresponding to the time of preparing to fall asleep is A1, the bias threshold corresponding to the actual time of falling asleep is A2, the bias threshold corresponding to the time of awakening is A3, and the bias threshold corresponding to the time of getting up is A4. A1, A2, A3 and A4 can be equal or different. Optionally, the bias threshold is 30 minutes. Each bias value is compared with the corresponding bias threshold. If a bias value is greater than the bias threshold, the original historical sleep parameter corresponding to the bias value is eliminated, and then the filtered historical sleep parameter is obtained. The average value of each type of filtered historical sleep parameter is calculated, and the obtained average value is used as the final historical sleep data. It can be understood that each type of historical sleep parameter corresponds to an average value. If, as described above, the original historical sleep data includes four types of historical sleep parameters, four average values are calculated. The set of these four average values is the final historical sleep data.
[0062] In this way, by eliminating the original historical sleep parameters corresponding to larger bias values and calculating the average values of the screened historical sleep parameters, it is possible to ensure that the final historical sleep data represents the usual work and rest time of the target user.
[0063] Optionally, the processor calculates a bias value of each type of original historical sleep parameter within a preset historical time period, including:
[0064] The processor calculates an average value of each type of original historical sleep parameter within a preset time period.
[0065] The processor calculates a parameter difference between the parameter average value and the original historical sleep parameter of the corresponding category.
[0066] The processor uses the absolute value of the parameter difference as the bias value of the original historical sleep parameter of the corresponding category within a preset time period.
[0067] First, the parameter average value of each category of original historical sleep parameters within a preset time period is calculated. In this way, multiple parameter average values can be obtained, and each parameter average value corresponds to a category of original historical sleep parameters. Then, each parameter average value is subtracted from the original historical sleep parameters of the corresponding category to obtain multiple parameter differences. Finally, the absolute value of each parameter difference is used as the bias value of the original historical sleep parameters of the corresponding category within the preset time period.
[0068] Optionally, at S122, the processor determines the expected sleep data for each day within the target achievement time according to the final historical sleep data, the target sleep data, and the target achievement time, including:
[0069] The processor calculates a first parameter difference between each type of final historical sleep parameter and the target sleep parameter.
[0070] The processor determines the expected sleep data for the first day within the target achievement time according to each type of final historical sleep parameter, the corresponding first parameter difference and the target achievement time.
[0071] The final historical sleep data includes: one or more categories of final historical sleep parameters. The categories of sleep parameters included in the final historical sleep data are the same as the categories of sleep parameters included in the target sleep data.
[0072] The final historical sleep parameters of each category are subtracted from the target sleep parameters of the corresponding category to obtain multiple first parameter differences. The first parameter difference represents the degree of adjustment that the target user needs to make to reach the corresponding target sleep parameters based on their current sleep parameters. Then, based on each category of final historical sleep parameters, the corresponding first parameter difference, and the target achievement time, the expected sleep data for each day within the target achievement time is determined. In this way, based on each category of final historical sleep parameters, the degree of adjustment required for each type of sleep parameters, and the target achievement time, the expected sleep data for the first day is determined, thereby helping the target user to gradually develop good sleep habits.
[0073] Optionally, the processor determines the expected sleep data for the first day within the target achievement time according to each type of final historical sleep parameter, the corresponding first parameter difference and the target achievement time, including:
[0074] The processor calculates a first ratio between an absolute value of the first parameter difference and the target achievement time.
[0075] The processor determines the difference between each type of final historical sleep parameter and the corresponding first ratio as the expected sleep data for the first day within the target achievement duration.
[0076] Compare the absolute value of each first parameter difference with the target achievement duration to obtain multiple first ratios. The first ratio represents the degree of adjustment required for the target user to achieve the corresponding target sleep parameter when it is distributed to each day. Difference each type of final historical sleep parameter from the corresponding first ratio to obtain multiple differences. The collection of these differences is determined as the expected sleep data for the first day within the target achievement duration. Here, the types of sleep parameters included in the expected sleep data depend on the types of sleep parameters included in the original historical sleep data, and the types of the two are the same.
[0077] Optionally, combined Figure 3 As shown, the embodiment of the present disclosure provides another method for improving sleep, comprising:
[0078] S101, the processor obtains target sleep data, target achievement time and historical sleep data of a target user.
[0079] S132: The processor calculates a second parameter difference between the actual sleep parameter and the target sleep parameter of each category of the previous day.
[0080] S142, the processor determines the expected sleep data for the day based on the actual sleep parameters of each category of the previous day, the corresponding second parameter difference and the target achievement time.
[0081] S103: The processor controls the target home appliance to operate in a corresponding mode according to the expected sleep data of each day.
[0082] The actual sleep parameters of each category of the previous day are subtracted from the target sleep parameters to obtain multiple second parameter differences. The second parameter difference represents the degree of adjustment required for the target user to achieve the corresponding target sleep parameters based on the actual sleep parameters of the previous day. Then, based on the actual sleep parameters of each category of the previous day, the corresponding second parameter difference, and the time it takes to achieve the target, the expected sleep data for the day is determined. In this way, based on the actual sleep parameters of each category of the previous day, the degree to which each type of sleep parameter needs to be adjusted, and the time it takes to achieve the target, the expected sleep data for the day is determined, and the expected sleep data for the day is continuously adjusted based on the actual achievement of the previous day, thereby helping the target user to gradually develop good sleep habits.
[0083] Optionally, in step S142, the processor determines the expected sleep data for the current day according to the actual sleep parameter of each category of the previous day, the corresponding second parameter difference and the target achievement time, including:
[0084] The processor determines the remaining time based on the target achievement time and the completed time.
[0085] The processor calculates a second ratio between the absolute value of the second parameter difference and the remaining time.
[0086] The processor determines the difference between each type of actual sleep parameter of the previous day and the corresponding second ratio as the expected sleep data of the current day.
[0087] The remaining time is determined based on the target achievement time and the completed time. Specifically, the difference between the target achievement time and the completed time is determined as the remaining time. Here, the unit of time is day. For example, if the target achievement time is 7 days, and the current day is the 3rd day, that is, the completed time is 2 days, then the remaining time is 5 days.
[0088] Compare the absolute value of each second parameter difference with the remaining duration to obtain multiple second ratios. The second ratio represents the degree of adjustment required for the target user to achieve the corresponding target sleep parameter when it is distributed to each day. Difference the actual sleep parameters of each category of the previous day with the corresponding second ratio to obtain multiple differences. The collection of these differences is determined as the expected sleep data for the day within the target achievement duration. Here, the types of sleep parameters included in the expected sleep data depend on the types of sleep parameters included in the original historical sleep data, and the types of the two are the same.
[0089] Combination Figure 4 As shown, the embodiment of the present disclosure provides another method for improving sleep, comprising:
[0090] S101, the processor obtains target sleep data, target achievement time and historical sleep data of a target user.
[0091] S102, the processor determines the expected sleep data for each day within the target achievement time according to the target sleep data, the target achievement time and the historical sleep data.
[0092] S113, when the current time reaches the expected time to prepare for falling asleep, the processor controls the target home appliance to operate in a sleep-aiding mode.
[0093] S123, when the current time reaches the expected actual sleeping time, the processor controls the target home appliance to operate in sleep mode.
[0094] S133, when the current time reaches the expected awakening time, the processor controls the target home appliance to operate the waking mode.
[0095] S143, when the current time reaches the expected time to wake up, the processor controls the target home appliance to operate in normal mode.
[0096] The parameter types included in the expected sleep data of each day are consistent with the parameter types included in the original historical sleep data. Optionally, the expected sleep data includes: one or more of the expected time to prepare for sleep, the expected actual time to fall asleep, the expected time to wake up, and the expected time to get up.
[0097] When the current time reaches the expected time to prepare for falling asleep, the target home appliances are controlled to run the sleep-aiding mode to create a sleeping atmosphere. Optionally, the target home appliances include but are not limited to smart curtains, smart lighting devices, and smart speakers. Optionally, the smart curtains are controlled to run the curtain closing mode, the smart lighting devices to run the dimming mode, and the smart speakers to send a voice prompt such as "put down the smart terminal device (such as a mobile phone)".
[0098] When the current time reaches the expected actual sleeping time, the target home appliance is controlled to run the sleep mode so that the target user can fall asleep. Optionally, the target home appliance includes but is not limited to smart lighting equipment, smart air conditioners, and smart sweeping robots. Optionally, the smart lighting equipment is controlled to be turned off, the smart air conditioner is controlled to run the silent (sleep) mode, and the smart sweeping robot is turned off.
[0099] When the current time reaches the expected awakening time, the target home appliance is controlled to run the wake-up mode to create a sober atmosphere and facilitate the target user to wake up. Optionally, the target home appliance includes but is not limited to smart lighting equipment, smart speakers, and smart kettles. Optionally, the smart lighting equipment is controlled to turn on and run the bright light mode, the smart speaker plays music, and the smart kettle automatically fills and boils water.
[0100] When the current time reaches the expected time to get up, the target home appliances are controlled to run in normal mode to create a daytime living atmosphere, thereby reminding the target user to get up. Optionally, the target home appliances include but are not limited to smart curtains, smart air conditioners, and smart sweeping robots. Optionally, the smart curtains are controlled to run in curtain opening mode, the smart air conditioners to run in daytime mode, and the smart sweeping robots to start running in cleaning mode.
[0101] In this way, different target home appliances are controlled to run in different modes based on the current moment to create a suitable atmosphere and help target users develop good sleeping habits.
[0102] Combination Figure 5 As shown, the embodiment of the present disclosure provides another method for improving sleep, comprising:
[0103] S101, the processor obtains target sleep data, target achievement time and historical sleep data of a target user.
[0104] S102, the processor determines the expected sleep data for each day within the target achievement time according to the target sleep data, the target achievement time and the historical sleep data.
[0105] S103: The processor controls the target home appliance to operate in a corresponding mode according to the expected sleep data of each day.
[0106] S104: The processor obtains the actual sleep data of the target user every day within the target achievement time.
[0107] S105 , when the target duration is reached, the processor generates a sleep report for the target user according to the actual sleep data and the target sleep data.
[0108] During the target duration, the target user's actual sleep data for each day is obtained. When the target duration is reached, a sleep report for the target user is generated based on the actual sleep data and the target sleep data for each day to evaluate whether the target user has achieved the target.
[0109] Specifically, under ideal circumstances, the target user reaches the target sleep data just on the last day, and the target user's various actual sleep parameters on the last day are equal to the corresponding various target sleep parameters. At this time, it is determined that the target user has reached the target. If the target user has various actual sleep parameters equal to the corresponding various target sleep parameters on a certain day before the last day, it means that the target user has reached the target ahead of time. If more than half of the various actual sleep parameters of the target user on the last day reach the corresponding target sleep parameters, it means that the target user's sleep has improved, and the target user is informed of the improvement results in the report. If more than half of the various actual sleep parameters of the target user on the last day do not reach the corresponding target sleep parameters, it means that the entire process of improving sleep is out of control. At this time, combined with the control of home appliances, it can be focused on checking whether the target user has executed activity suggestions, such as going to bed at the expected sleep time, and forming a report. In this way, the target user is reminded to focus on what has not been done, indicating the impact and harm on improving sleep.
[0110] Optionally, the target user's smart terminal device is installed with an application for improving sleep, and the device for improving sleep pushes the report to the corresponding application, or controls the smart speaker to play the report content, thereby informing the target user.
[0111] In this way, by analyzing the actual sleep data of the target user every day, a report is formed and notified to the target user, so that the target user can understand the results of sleep improvement.
[0112] Combination Figure 6 As shown, the following takes the target sleep data including the target sleep preparation time Tm1, the target actual sleep time Tm11, the target wake-up time Tm22 and the target wake-up time Tm2 as an example to illustrate the specific implementation process of the method for improving sleep provided by the embodiment of the present disclosure:
[0113] S601, the processor obtains Tm1, Tm11, Tm22 and Tm2 set by the target user, as well as the target achievement time R days, and obtains the original historical preparation time for going to bed T1, the original historical actual sleeping time T11, the original historical waking time T22 and the original historical waking time T2 of the target user for each day within the preset time period before the first day.
[0114] S602, the processor calculates the average value based on T1, T11, T22 and T2 of each day and
[0115] S603, processor according to The bias value Tpy of each original historical sleep parameter of each day is calculated to obtain a plurality of bias values Tpy.
[0116] S604, the processor determines whether there is a bias value Tpy that satisfies Tpy>A, where A is the bias threshold; if yes, execute S605; if not, execute S606.
[0117] S605: The processor removes the sleep parameter corresponding to the bias value Tpy; and then executes S607.
[0118] S606: The processor reserves the sleep parameter corresponding to the bias value Tpy; and then executes S607.
[0119] S607, the processor calculates the average value of each type of sleep parameter retained to obtain and Then the final historical sleep data is obtained.
[0120] S608, processor according to
[0121]
[0122] The expected time to prepare for falling asleep M11, the expected actual time to fall asleep M111, the expected time to wake up M122, and the expected time to get up M12 on the first day are calculated.
[0123] S609, when the current moment reaches M11, M111, M122 and M12, the processor controls the corresponding target home appliance to run the corresponding mode.
[0124] S610 , the processor obtains the target user's actual time of preparing to go to sleep Ts1 , actual time of going to sleep Ts11 , actual time of waking up Ts22 , and actual time of getting up Ts2 on the previous day.
[0125] S611, the processor calculates the expected time to prepare for sleep Mi1, the expected actual time to fall asleep Mi11, the expected time to wake up Mi22, and the expected time to wake up Mi2 for the day according to Mi1=Ts1-|Ts1-Tm1| / (R-i+1), Mi11=Ts11-|Ts11-Tm1| / (R-i+1), Mi22=Ts22-|Ts22-Tm22| / (R-i+1), Mi2=Ts2-|Ts2-Tm2| / (R-i+1); where i represents the i-th day within the target achievement time, i∈[2,R].
[0126] S612, when the current moment reaches the corresponding Mi1, Mi11, Mi22 and Mi2, the processor controls the corresponding target home appliance to run the corresponding mode.
[0127] S613, the processor determines whether i satisfies i=R; if yes, executes S614; if no, executes S610.
[0128] S614, the processor compares various sleep parameters of each day within the target achievement time with corresponding target sleep parameters.
[0129] S615, if the actual sleep parameters of the last day or a day before the last day are equal to the corresponding target sleep parameters, the processor determines that the target user has achieved the set sleep goal; then executes S618.
[0130] S616, if more than half of the various actual sleep parameters of the last day reach the corresponding target sleep parameters, the processor determines that the sleep of the target user has improved; and then executes S618.
[0131] S617, if more than half of the various actual sleep parameters of the last day do not reach the corresponding target sleep parameters, the processor determines that the sleep of the target user has not improved; and then executes S618.
[0132] S618: The processor generates a sleep report and informs the target user.
[0133] Combination Figure 7As shown, the embodiment of the present disclosure provides a device 70 for improving sleep, including: an acquisition module 71, a determination module 72 and a control module 73. The acquisition module 71 is configured to acquire the target sleep data, target achievement time and historical sleep data of the target user. The determination module 72 is configured to determine the expected sleep data for each day within the target achievement time according to the target sleep data, target achievement time and historical sleep data. The control module 73 is configured to control the target home appliance to operate in a corresponding mode according to the expected sleep data of each day.
[0134] Using the device for improving sleep provided by the embodiment of the present disclosure, first obtain the target sleep data of the target user, the required target achievement time, and the target user's previous historical sleep data, and based on this, determine the expected sleep data for each day within the target achievement time. Then, based on the expected sleep data of each day, control the corresponding target home appliance to operate in the corresponding mode. In this way, the operating mode of the target home appliance is used to create an atmosphere that matches the expected sleep data, making it easier for the target user to enter the corresponding sleep stage at the expected sleep data. In this way, the target user can develop good sleeping habits.
[0135] Combination Figure 8 As shown, the embodiment of the present disclosure provides a device 80 for improving sleep, including a processor 81 and a memory 82. Optionally, the device may also include a communication interface 83 and a bus 84. The processor 81, the communication interface 83, and the memory 82 may communicate with each other through the bus 84. The communication interface 83 may be used for information transmission. The processor 81 may call the logic instructions in the memory 82 to execute the method for improving sleep of the above embodiment.
[0136] In addition, the logic instructions in the memory 82 described above may be implemented in the form of software functional units and when sold or used as independent products, may be stored in a computer-readable storage medium.
[0137] The memory 82 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor 81 executes the function application and data processing by running the program instructions / modules stored in the memory 82, that is, implementing the method for improving sleep in the above embodiment.
[0138] The memory 82 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 82 may include a high-speed random access memory and may also include a non-volatile memory.
[0139] Combination Fig. 9 As shown, an embodiment of the present disclosure provides a home system 90, including: one or more household appliances, and the above-mentioned device 70 (80) for improving sleep. The device 70 (80) for improving sleep is communicatively connected with each household appliance. The installation relationship described here is not limited to placement inside the product, but also includes installation connections with other components of the product, including but not limited to physical connections, electrical connections or signal transmission connections. It can be understood by those skilled in the art that the device 70 (80) for improving sleep can be adapted to a feasible product body, thereby realizing other feasible embodiments.
[0140] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute the above-mentioned method for improving sleep.
[0141] The computer-readable storage medium mentioned above may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.
[0142] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes, or a transient storage medium.
[0143] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible changes. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0144] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods for each specific application to implement the described functions, but such implementations should not be considered to exceed the scope of the embodiments of the present disclosure. The technicians may clearly understand that, for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above may refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0145] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0146] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A method for improving sleep, It is characterized in that include: Obtain the target sleep data, target achievement time and historical sleep data of the target user; Determine the expected sleep data for each day within the target duration based on the target sleep data, target duration and historical sleep data; According to the expected sleep data of each day, the target home appliances are controlled to operate in corresponding modes.
2. The method according to claim 1, It is characterized in that The step of obtaining the historical sleep data of the target user includes: Determine where the day is in terms of the time frame for achieving the goal; Obtain the historical sleep data of the target user based on time and location.
3. The method according to claim 2, It is characterized in that The step of obtaining the historical sleep data of the target user according to the time position includes: When the time position represents that the current day is the first day within the target achievement duration, obtaining the original historical sleep data of the target user in a preset time period before the first day; When the time position indicates that the current day is not the first day within the target achievement duration, actual sleep data of the target user on the previous day is obtained.
4. The method according to claim 1, It is characterized in that The historical sleep data is the original historical sleep data of the target user in the preset time period before the first day; The step of determining the expected sleep data for each day within the target achievement time period according to the target sleep data, the target achievement time period and the historical sleep data includes: Filter the original historical sleep data to obtain the final historical sleep data; The expected sleep data for each day within the target duration is determined based on the final historical sleep data, the target sleep data, and the target duration.
5. The method according to claim 4, It is characterized in that The original historical sleep data includes: one or more types of original historical sleep parameters; The original historical sleep data is screened to obtain the final historical sleep data, including: Calculate the bias value of each type of original historical sleep parameter within a preset time period; Eliminate the original historical sleep parameters corresponding to the bias values greater than the bias threshold to obtain the screened historical sleep parameters; The average value of each type of historical sleep parameter after screening is taken as the final historical sleep data.
6. The method according to claim 5, It is characterized in that The calculating of the bias value of each type of original historical sleep parameter within a preset historical time period includes: Calculate the average value of each type of original historical sleep parameter within a preset time period; Calculate the parameter difference between the parameter average and the original historical sleep parameter of the corresponding category; The absolute value of the parameter difference is used as the bias value of the original historical sleep parameter of the corresponding category within the preset time period.
7. The method according to claim 4, It is characterized in that The final historical sleep data includes: one or more types of final historical sleep parameters; the target sleep data includes: one or more types of target sleep parameters of the same type as the final historical sleep parameters; Determining the expected sleep data for each day within the target achievement time according to the final historical sleep data, the target sleep data, and the target achievement time includes: Calculating a first parameter difference between each type of final historical sleep parameter and the target sleep parameter; According to each type of final historical sleep parameter, the corresponding first parameter difference and the target achievement time, the expected sleep data for the first day within the target achievement time is determined.
8. The method according to claim 7, It is characterized in that The step of determining the expected sleep data for the first day within the target achievement time duration according to each type of final historical sleep parameter, the corresponding first parameter difference and the target achievement time duration includes: Calculating a first ratio between the absolute value of the first parameter difference and the target achievement time; The difference between each type of final historical sleep parameter and the corresponding first ratio is determined as the expected sleep data for the first day within the target achievement duration.
9. The method according to claim 1, It is characterized in that The historical sleep data is the actual sleep data of the target user on the previous day; The actual sleep data of the previous day includes: one or more types of actual sleep parameters; the target sleep data includes: one or more types of target sleep parameters of the same type as the actual sleep parameters; The step of determining the expected sleep data for each day within the target achievement time period according to the target sleep data, the target achievement time period and the historical sleep data includes: Calculating a second parameter difference between the actual sleep parameter and the target sleep parameter for each category of the previous day; The expected sleep data for the day is determined based on the actual sleep parameters of each category of the previous day, the corresponding second parameter difference and the target achievement time.
10. The method according to claim 9, It is characterized in that Determining the expected sleep data for the current day according to each type of expected sleep parameter of the previous day, the corresponding second parameter difference and the target achievement time includes: Determine the remaining time based on the time it takes to achieve the goal and the time already completed; Calculating a second ratio between the absolute value of the second parameter difference and the remaining time; The difference between the actual sleep parameter of each category on the previous day and the corresponding second ratio is determined as the expected sleep data for the current day.
11. The method according to any one of claims 1 to 10, It is characterized in that The expected sleep data includes: at least one of an expected time to prepare for sleep, an expected time to actually fall asleep, an expected time to wake up, and an expected time to wake up; The controlling the target home appliance to operate in a corresponding mode according to the expected sleep data of each day includes: When the desired time to prepare for falling asleep is reached at the current moment, the target home appliance is controlled to operate in a sleep-aiding mode; When the expected actual sleeping time is reached at the current time, the target home appliance is controlled to operate in a sleep mode; When the expected awake time is reached at the current moment, the target home appliance is controlled to run the wake-up mode; When the current time reaches the expected time to wake up, the target home appliance is controlled to operate in normal mode.
12. The method according to any one of claims 1 to 10, It is characterized in that The method further comprises: Obtain the target user's actual sleep data for each day within the target achievement period; When the target duration is reached, a sleep report for the target user is generated based on the actual sleep data and the target sleep data.
13. A device for improving sleep, comprising a processor and a memory storing program instructions, It is characterized in that The processor is configured to execute the method for improving sleep according to any one of claims 1 to 12 when running the program instructions.
14. A home system, It is characterized in that include: one or more household appliances; and, The device for improving sleep as claimed in claim 13 is communicatively connected to a household appliance.
15. A storage medium storing program instructions, It is characterized in that When the program instructions are executed, the method for improving sleep according to any one of claims 1 to 12 is executed.
