Sleep detection method, related device and communication system
A multi-faceted sleep detection method using heart rate, activity, and device usage data improves the accuracy of sleep onset time identification by accounting for diverse user behaviors and environmental cues.
Patent Information
- Application Number
- CN202410063004.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-15
- Publication Date
- 2025-07-15
AI Technical Summary
When existing electronic devices detect users' sleep time, they often lead to misjudgment due to users' quiet activities. Especially when playing with mobile phones or listening to music, the heart rate data is low and the amount of activity is small, resulting in inaccurate detection of sleep time.
Combined with a variety of data such as heart rate detection, activity statistics, bed motion detection, walking characteristic detection, ambient light detection, ambient sound detection and electronic equipment usage, the user's sleep time is comprehensively determined, and the most accurate sleep time is determined through a comprehensive analysis of multiple suspected sleeping points.
It improves the accuracy of sleep time detection, reduces misjudgment, and can more accurately identify whether the user is actually asleep.
Smart Images

Figure CN120304772A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of terminals, and in particular, to a sleep detection method, related device, and communication system. Background Art
[0002] With the development of electronic devices and the research on the sleep state of users, more and more electronic devices (such as smart watches and smart bracelets) can detect the sleep state of users. For example, an electronic device can detect the user's bedtime, wake-up time, and stages of the sleep state. However, electronic devices usually perform sleep detection based on the user's heart rate data and motion data, and the detection results often have errors. For example, in scenarios where the user lies quietly in bed playing with the phone, listening to music, or watching TV, the user's heart rate data is usually low, and the user's activity level is small. The electronic device may determine that the user is asleep when the user is actually not asleep yet. Summary of the Invention
[0003] This application provides a sleep detection method, related device, and communication system. The method combines data obtained from various detections such as heart rate detection, activity level statistics, detection of getting-into-bed actions, detection of walking characteristics, ambient light detection, ambient sound detection, and detection of the usage of electronic devices such as mobile phones and / or tablets to determine the user's bedtime and improve the accuracy of bedtime detection.
[0004] In a first aspect, this application provides a sleep detection method. Specifically, obtain the user's heart rate and motion data, where the motion data includes acceleration and / or angular velocity; obtain the ambient light brightness, ambient sound volume, and usage data of one or more electronic devices, and the usage data of one or more electronic devices includes the screen-off time of one or more electronic device screens; determine the activity level, walking characteristics, and getting-into-bed action characteristics based on the motion data; determine the user's bedtime based on the heart rate, activity level, walking characteristics, getting-into-bed action characteristics, ambient light brightness, ambient sound volume, and usage data of one or more electronic devices.
[0005] The above one or more electronic devices may include one or more of the following: mobile phone, tablet computer, television, laptop computer.
[0006] It can be seen that the above method combines multiple factors: heart rate, motion data, ambient light brightness, ambient sound volume, and usage data of one or more electronic devices to determine the user's bedtime, which can improve the accuracy of bedtime detection.
[0007] In combination with the first aspect, in some embodiments, a first sleep onset point is determined according to the characteristics of the action of getting into bed, a second sleep onset point is determined according to the activity level, a third sleep onset point is determined according to the walking characteristics, a fourth sleep onset point is determined according to the heart rate, a fifth sleep onset point is determined according to the ambient light brightness, a sixth sleep onset point is determined according to the ambient sound volume, and a seventh sleep onset point is determined according to the usage data of one or more electronic devices; the sleep time of the user is determined according to the first sleep onset point, the second sleep onset point, the third sleep onset point, the fourth sleep onset point, the fifth sleep onset point, the sixth sleep onset point, and the seventh sleep onset point.
[0008] Among them, the first sleep onset point is the time when the action of getting into bed occurs, the second sleep onset point is the time when the activity level is less than the activity level threshold, the third sleep onset point is the time when the user changes from the walking state to the non-walking state, the fifth sleep onset point is the time when the ambient light brightness is less than the brightness threshold, the sixth sleep onset point is the time when the ambient sound volume is less than the volume threshold, and the seventh sleep onset point is the time when one or more electronic devices turn off the screen.
[0009] In combination with the first aspect, in some embodiments, a first time is determined according to the second sleep onset point and the fourth sleep onset point; when the first sleep onset point, the third sleep onset point, the fifth sleep onset point, the sixth sleep onset point, and the seventh sleep onset point are all earlier than the first time, the first time is determined as the sleep time of the user.
[0010] The first time is any time between the second sleep onset point and the fourth sleep onset point, or the average value of the second sleep onset point and the fourth sleep onset point.
[0011] It can be seen that the mobile phone can use the second sleep onset point determined based on the activity level and the fourth sleep onset point determined based on the heart rate as the benchmark, and use the first sleep onset point, the third sleep onset point, the fifth sleep onset point to the seventh sleep onset point as the auxiliary to determine the sleep time of the user. It can be understood that the activity level and the heart rate can directly reflect whether the user is asleep. The above-mentioned action of getting into bed, walking characteristics, brightness of the ambient light, volume of the ambient sound, and turning off the screen of the mobile phone can reflect that the user is preparing to go to sleep. It may take some time for the user to go from preparing to go to sleep to actually falling asleep. The first sleep onset point and the third sleep onset point being earlier than the first time can indicate that the user takes some time to fall asleep after getting into bed. The fifth sleep onset point being earlier than the first time can indicate that the ambient light becomes darker before the user falls asleep. The sixth sleep onset point being earlier than the first time can indicate that the volume of the ambient sound decreases before the user falls asleep. The seventh sleep onset point being earlier than the first time can indicate that the user turns off the screen of electronic devices such as mobile phones before falling asleep.
[0012] In combination with the first aspect, in some embodiments, when the fifth sleep onset point and the sixth sleep onset point are both earlier than the seventh sleep onset point, and the seventh sleep onset point is later than the first time, a second time is determined according to the seventh sleep onset point, and the second time is determined as the sleep time of the user, and the second time is later than the seventh sleep onset point.
[0013] It can be seen that when it is detected that the user has fallen asleep based on the activity level and heart rate, the user may be in a state of quietly lying in bed using the mobile phone, that is, the user is not actually asleep. Moreover, the user usually needs some time to fall asleep after turning off the screen of the mobile phone. Therefore, the second moment after the screen of electronic devices such as mobile phones is turned off can be used as the user's falling asleep time. The above sleep detection in combination with the usage situation of electronic devices such as mobile phones can improve the accuracy of falling asleep time detection.
[0014] Combined with the first aspect, in some embodiments, when both the sixth falling asleep point and the seventh falling asleep point are earlier than the fifth falling asleep point, the fifth falling asleep point is later than the first moment, and the time difference between the fifth falling asleep point and the first moment is less than or equal to the first difference value, the third moment is determined according to the fifth falling asleep point, and the third moment is determined as the user's falling asleep time, and the third moment is later than the fifth falling asleep point.
[0015] It can be seen that when both the sixth falling asleep point and the seventh falling asleep point are earlier than the fifth falling asleep point, the user may have first turned off the audio being played in the sleep environment and then turned off the screen of electronic devices such as mobile phones before turning off the light to go to sleep. When the fifth falling asleep point is later than the above first moment and the time difference between the fifth falling asleep point and the first moment is less than or equal to the first difference value, the user may have quietly lain in bed for a period of time with the light on before turning off the light to prepare to fall asleep. Therefore, the user's actual falling asleep time may be slightly later than the time when the ambient light brightness dims. The above sleep detection in combination with the ambient light brightness can improve the accuracy of falling asleep time detection.
[0016] Combined with the first aspect, in some embodiments, when both the fifth falling asleep point and the seventh falling asleep point are earlier than the sixth falling asleep point, the sixth falling asleep point is later than the first moment, and the time difference between the sixth falling asleep point and the first moment is less than or equal to the second difference value, the fourth moment is determined according to the sixth falling asleep point, and the fourth moment is determined as the user's falling asleep time, and the fourth moment is later than the sixth falling asleep point.
[0017] It can be seen that when both the fifth falling asleep point and the seventh falling asleep point are earlier than the sixth falling asleep point, the user may have first turned off the screen of the mobile phone and then turned off the light before the audio was turned off. When the sixth falling asleep point is later than the above first moment and the time difference between the sixth falling asleep point and the first moment is less than or equal to the second difference value, the user may have listened to music quietly in bed for a period of time and then actively turned off the played audio. Therefore, the user's actual falling asleep time may be slightly later than the sixth falling asleep point (i.e., the time when the ambient sound volume decreases).
[0018] Combined with the first aspect, in some embodiments, when the sixth falling asleep point is later than the first moment, the time difference between the sixth falling asleep point and the first moment is greater than the second difference value, and both the fifth falling asleep point and the seventh falling asleep point are earlier than the first moment, the fifth moment is determined according to the first moment, and the fifth moment is determined as the user's falling asleep time, and the fifth moment is later than the first moment.
[0019] In combination with the first aspect, in some embodiments, when the sixth sleep onset point and the seventh sleep onset point are later than the first time, the time difference between the sixth sleep onset point and the first time is greater than the second difference, and the fifth sleep onset point is earlier than the first time, the sixth time is determined according to the seventh sleep onset point, and the sixth time is determined as the user's sleep onset time, and the sixth time is later than the seventh sleep onset point.
[0020] In combination with the first aspect, in some embodiments, when the fifth sleep onset point and the sixth sleep onset point are later than the first time, the time difference between the fifth sleep onset point and the first time is less than or equal to the first difference, the time difference between the sixth sleep onset point and the first time is greater than the second difference, and the seventh sleep onset point is earlier than the first time, the seventh time is determined according to the fifth sleep onset point, and the seventh time is determined as the user's sleep onset time, and the seventh time is later than the fifth sleep onset point.
[0021] In combination with the first aspect, in some embodiments, when the fifth sleep onset point and the sixth sleep onset point are later than the first time, the time difference between the fifth sleep onset point and the first time is greater than the first difference, the time difference between the sixth sleep onset point and the first time is greater than the second difference, and the seventh sleep onset point is earlier than the first time, the eighth time is determined according to the first time, and the eighth time is determined as the user's sleep onset time, and the eighth time is later than the first time.
[0022] It can be seen that when the sixth sleep onset point is later than the above-mentioned first time and the time difference between the sixth sleep onset point and the first time is greater than the second difference, the user may fall asleep during the audio playback. The audio continues to play without being paused after the user falls asleep. The moment when the ambient sound volume decreases (i.e., the sixth sleep onset point) does not reflect the user's actual sleep onset time. Among them, if the above-mentioned fifth sleep onset point and / or seventh sleep onset point are within the time period between the first time and the sixth sleep onset point, it is possible that the user turns off the light actively after lying quietly in bed for a period of time and / or turns off the mobile phone screen actively after using the mobile phone quietly in bed for a period of time, and continues to listen to the audio. Therefore, when the moment when the ambient sound volume decreases (i.e., the sixth sleep onset point) does not reflect the user's actual sleep onset time, the mobile phone can determine the sleep onset point according to the fifth sleep onset point and / or the seventh sleep onset point. The above embodiments can improve the accuracy of sleep onset time detection by combining the brightness of the ambient light, the volume of the ambient sound, and the usage of the mobile phone.
[0023] In combination with the first aspect, in some embodiments, a first time period is determined according to the user's bedtime, and the first heart rate and first movement data of the user in the first time period are obtained; a second time period is determined according to the user's wake-up time, and the second heart rate and second movement data of the user in the second time period are obtained; a first activity level, first walking characteristics, and first bed-entry action characteristics are determined according to the first movement data, and a second activity level, second walking characteristics, and first bed-exit action characteristics are determined according to the second movement data; the user's bedtime and wake-up time are determined according to the first heart rate, second heart rate, first activity level, first walking characteristics, first bed-entry action characteristics, second activity level, second walking characteristics, and first bed-exit action characteristics.
[0024] It can be seen that the above method combines the walking characteristics, heart rate, activity level, and bed-entry and bed-exit actions near the bedtime and wake-up time to determine the user's bedtime and wake-up time. Since there are obvious walking behavior changes when the user goes to bed and wakes up, and the walking characteristics in the bed-entry stage and the bed-exit stage are symmetric, the above method of combining walking characteristics for sleep detection can improve the accuracy of bed-entry and bed-exit time detection.
[0025] In combination with the first aspect, in some embodiments, a first bed-entry point is determined according to the first heart rate and first activity level; a first bed-exit point is determined according to the second heart rate and second activity level; a second bed-entry point and a second bed-exit point are determined according to the first walking characteristics and the second walking characteristics; a third bed-entry point is determined according to the first bed-entry action characteristics; a third bed-exit point is determined according to the first bed-exit action characteristics; the user's bedtime is determined according to the first bed-entry point, the second bed-entry point, and the third bed-entry point; the user's wake-up time is determined according to the first bed-exit point, the second bed-exit point, and the third bed-exit point.
[0026] Wherein, the first bed-entry point is the time when the first heart rate drops to the first heart rate threshold and the first activity level drops to the first activity level threshold, and the first bed-exit point is the time when the second heart rate rises to the second heart rate threshold and / or the second activity level rises to the second activity level threshold; the second bed-entry point is the time when the last walking behavior occurs within the first time period, and the second bed-exit point is the time when the first walking behavior occurs within the second time period; the third bed-entry point is the time when the bed-entry action occurs, and the third bed-exit point is the time when the bed-exit action occurs.
[0027] In combination with the first aspect, in some embodiments, when the time difference between any two of the first bedtime, the second bedtime, and the third bedtime is less than the third difference value, the average value of the first bedtime, the second bedtime, and the third bedtime is determined as the user's bedtime, or any time between the earliest time and the latest time among the first bedtime, the second bedtime, and the third bedtime is determined as the user's bedtime; when the time difference between any two of the first wake-up time, the second wake-up time, and the third wake-up time is less than the fourth difference value, the average value of the first wake-up time, the second wake-up time, and the third wake-up time is determined as the user's wake-up time, or any time between the earliest time and the latest time among the first wake-up time, the second wake-up time, and the third wake-up time is determined as the user's wake-up time.
[0028] In combination with the first aspect, in some embodiments, when the time difference between the second bedtime and the third bedtime is less than the third difference value, and the time difference between the first bedtime and the second bedtime is greater than or equal to the third difference value, the average value of the second bedtime and the third bedtime is determined as the user's bedtime, or any time between the second bedtime and the third bedtime is determined as the user's bedtime; when the time difference between the second wake-up time and the third wake-up time is less than the fourth difference value, and the time difference between the first wake-up time and the second wake-up time is greater than or equal to the fourth difference value, the average value of the second wake-up time and the third wake-up time is determined as the user's wake-up time, or any time between the second wake-up time and the third wake-up time is determined as the user's wake-up time.
[0029] The first time period includes the time period before the user's falling asleep time, and the second time period includes the time period after the user's waking up time.
[0030] In combination with the first aspect, in some embodiments, the user's falling asleep time, waking up time, bedtime, and wake-up time are displayed.
[0031] In combination with the first aspect, in some embodiments, the user's heart rate and motion data are acquired by a wearable device, and the wearable device includes one or more of the following: smart watch, smart bracelet.
[0032] In the second aspect, the present application provides a sleep detection method, which can be applied to a communication system including a smart watch and a mobile phone. Among them, the smart watch can obtain the user's heart rate and motion data, and the motion data includes acceleration and / or angular velocity; the smart watch can also obtain the ambient light brightness and ambient sound volume; the mobile phone can obtain the usage data of one or more electronic devices, and the usage data of one or more electronic devices includes the screen off time of one or more electronic devices; the mobile phone can determine the activity amount, walking characteristics and bed-going action characteristics based on the motion data; the mobile phone can determine the user's sleep time based on the heart rate, activity amount, walking characteristics, bed-going action characteristics, ambient light brightness, ambient sound volume and the usage data of one or more electronic devices.
[0033] The one or more electronic devices mentioned above may include one or more of the following: a mobile phone, a tablet computer, a television, and a laptop computer.
[0034] In some embodiments, the smart watch can send the user's heart rate and exercise data to the mobile phone. The smart watch can also send the ambient light brightness and ambient sound volume to the mobile phone.
[0035] It can be seen that the above method combines multiple factors: heart rate, motion data, ambient light brightness, ambient sound volume, and usage data of one or more electronic devices to determine the user's bedtime, which can improve the accuracy of bedtime detection.
[0036] In combination with the second aspect, in some embodiments, the mobile phone can determine a first sleeping point based on the characteristics of the going to bed action, the mobile phone can determine a second sleeping point based on the amount of activity, the mobile phone can determine a third sleeping point based on the walking characteristics, the mobile phone can determine a fourth sleeping point based on the heart rate, the mobile phone can determine a fifth sleeping point based on the ambient light brightness, the mobile phone can determine a sixth sleeping point based on the ambient sound volume, and the mobile phone can determine a seventh sleeping point based on usage data of one or more electronic devices; the mobile phone can determine the user's bedtime based on the first sleeping point, the second sleeping point, the third sleeping point, the fourth sleeping point, the fifth sleeping point, the sixth sleeping point, and the seventh sleeping point.
[0037] Among them, the first sleep point is the time when the action of going to bed occurs, the second sleep point is the time when the activity level is less than the activity level threshold, the third sleep point is the time when the user changes from a walking state to a non-walking state, the fifth sleep point is the time when the ambient light brightness is less than the brightness threshold, the sixth sleep point is the time when the ambient sound volume is less than the volume threshold, and the seventh sleep point is the time when one or more electronic devices turn off the screen.
[0038] Optionally, one or more of the first to sixth sleeping points may be determined by a smart watch, wherein the smart watch may send the sleeping point determined by itself to the mobile phone.
[0039] In combination with the second aspect, in some embodiments, the mobile phone can determine the first time based on the second sleeping point and the fourth sleeping point; when the first sleeping point, the third sleeping point, the fifth sleeping point, the sixth sleeping point, and the seventh sleeping point are all earlier than the first time, the mobile phone can determine the first time as the user's bedtime.
[0040] The first time is any time between the second sleep onset point and the fourth sleep onset point, or is the average of the second sleep onset point and the fourth sleep onset point.
[0041] It can be seen that the mobile phone can use the second sleeping point determined based on the amount of activity and the fourth sleeping point determined based on the heart rate as a benchmark, and the first sleeping point, the third sleeping point, the fifth sleeping point to the seventh sleeping point as an auxiliary to determine the user's sleeping time. It can be understood that the amount of activity and the heart rate can directly reflect whether the user has fallen asleep. The above-mentioned bed action, walking characteristics, the brightness of the ambient light, the volume of the ambient sound, and the mobile phone screen off can reflect that the user is preparing to fall asleep. It may take a while for the user to actually fall asleep from preparing to fall asleep. The first sleeping point and the third sleeping point are earlier than the first time, which can indicate that the user fell asleep after a period of time after going to bed. The fifth sleeping point is earlier than the first time, which can indicate that the ambient light dims before the user falls asleep. The sixth sleeping point is earlier than the first time, which can indicate that the volume of the ambient sound decreases before the user falls asleep. The seventh sleeping point is earlier than the first time, which can indicate that the screen of the mobile phone or other electronic devices is turned off before the user falls asleep.
[0042] In combination with the second aspect, in some embodiments, when the fifth and sixth sleeping points are both earlier than the seventh sleeping point, and the seventh sleeping point is later than the first time, the mobile phone can determine a second time based on the seventh sleeping point, and determine the second time as the user's bedtime, and the second time is later than the seventh sleeping point.
[0043] It can be seen that when the user falls asleep based on the activity level and heart rate detection, the user may be in a state of quietly lying in bed using the mobile phone, that is, the user is not actually asleep. In addition, it usually takes a while for the user to fall asleep after turning off the screen of the mobile phone. Therefore, the second time after the mobile phone or other electronic device turns off the screen can be used as the user's bedtime. The above sleep detection combined with the use of mobile phones and other electronic devices can improve the accuracy of sleep time detection.
[0044] In combination with the second aspect, in some embodiments, when the sixth sleep point and the seventh sleep point are both earlier than the fifth sleep point, the fifth sleep point is later than the first time, and the time difference between the fifth sleep point and the first time is less than or equal to the first difference, the mobile phone can determine a third time based on the fifth sleep point, and determine the third time as the user's bedtime, and the third time is later than the fifth sleep point.
[0045] It can be seen that when both the sixth sleep onset point and the seventh sleep onset point are earlier than the fifth sleep onset point, the user may have first turned off the audio playing in the sleep environment and then turned off the screens of electronic devices such as mobile phones before turning off the lights to go to sleep. When the fifth sleep onset point is later than the above-mentioned first time and the time difference between the fifth sleep onset point and the first time is less than or equal to the first difference value, the user may have lain quietly in bed for some time with the lights on before turning off the lights to prepare to go to sleep. Therefore, the actual sleep onset time of the user may be slightly later than the time when the ambient light brightness dims. The above-mentioned sleep detection combined with the ambient light brightness can improve the accuracy of sleep onset time detection.
[0046] Combined with the second aspect, in some embodiments, when both the fifth sleep onset point and the seventh sleep onset point are earlier than the sixth sleep onset point, the sixth sleep onset point is later than the first time, and the time difference between the sixth sleep onset point and the first time is less than or equal to the second difference value, the mobile phone can determine a fourth time according to the sixth sleep onset point and determine the fourth time as the user's sleep onset time, and the fourth time is later than the sixth sleep onset point.
[0047] It can be seen that when both the fifth sleep onset point and the seventh sleep onset point are earlier than the sixth sleep onset point, the user may have first turned off the screen of the mobile phone and then turned off the lights before the audio playing was turned off. When the sixth sleep onset point is later than the above-mentioned first time and the time difference between the sixth sleep onset point and the first time is less than or equal to the second difference value, the user may have listened to music quietly in bed for some time before actively turning off the playing audio. Therefore, the actual sleep onset time of the user may be slightly later than the sixth sleep onset point (i.e., the time when the ambient sound volume decreases).
[0048] Combined with the second aspect, in some embodiments, when the sixth sleep onset point is later than the first time, the time difference between the sixth sleep onset point and the first time is greater than the second difference value, and both the fifth sleep onset point and the seventh sleep onset point are earlier than the first time, the mobile phone can determine a fifth time according to the first time and determine the fifth time as the user's sleep onset time, and the fifth time is later than the first time.
[0049] Combined with the second aspect, in some embodiments, when the sixth sleep onset point and the seventh sleep onset point are later than the first time, the time difference between the sixth sleep onset point and the first time is greater than the second difference value, and the fifth sleep onset point is earlier than the first time, the mobile phone can determine a sixth time according to the seventh sleep onset point and determine the sixth time as the user's sleep onset time, and the sixth time is later than the seventh sleep onset point.
[0050] In combination with the second aspect, in some embodiments, when the fifth sleep onset point and the sixth sleep onset point are later than the first time, the time difference between the fifth sleep onset point and the first time is less than or equal to the first difference value, the time difference between the sixth sleep onset point and the first time is greater than the second difference value, and the seventh sleep onset point is earlier than the first time, the mobile phone can determine the seventh time according to the fifth sleep onset point and determine the seventh time as the user's sleep onset time, and the seventh time is later than the fifth sleep onset point.
[0051] In combination with the second aspect, in some embodiments, when the fifth sleep onset point and the sixth sleep onset point are later than the first time, the time difference between the fifth sleep onset point and the first time is greater than the first difference value, the time difference between the sixth sleep onset point and the first time is greater than the second difference value, and the seventh sleep onset point is earlier than the first time, the mobile phone can determine the eighth time according to the first time and determine the eighth time as the user's sleep onset time, and the eighth time is later than the first time.
[0052] It can be seen that when the sixth sleep onset point is later than the above-mentioned first time and the time difference between the sixth sleep onset point and the first time is greater than the second difference value, the user may fall asleep during the audio playback. The audio continues to play without being paused after the user falls asleep. The moment when the ambient sound volume weakens (i.e., the sixth sleep onset point) does not reflect the user's actual sleep onset time. Among them, if the above-mentioned fifth sleep onset point and / or the seventh sleep onset point are within the time period between the first time and the sixth sleep onset point, it is possible that the user actively turns off the light after lying quietly in bed for a period of time and / or actively turns off the mobile phone screen after using the mobile phone quietly in bed for a period of time and continues to listen to the audio. Therefore, when the moment when the ambient sound volume weakens (i.e., the sixth sleep onset point) cannot reflect the user's actual sleep onset time, the mobile phone can determine the sleep onset point according to the fifth sleep onset point and / or the seventh sleep onset point. The above embodiments can improve the accuracy of sleep onset time detection by combining the brightness of the ambient light, the volume of the ambient sound, and the usage situation of the mobile phone.
[0053] In combination with the second aspect, in some embodiments, the mobile phone can determine the first time period according to the user's sleep onset time and obtain the first heart rate and the first motion data of the user during the first time period; the mobile phone can determine the second time period according to the user's wake-up time and obtain the second heart rate and the second motion data of the user during the second time period; the mobile phone can determine the first activity amount, the first walking feature, and the first getting-into-bed action feature according to the first motion data, and determine the second activity amount, the second walking feature, and the first getting-out-of-bed action feature according to the second motion data; the mobile phone can determine the user's getting-into-bed time and getting-out-of-bed time according to the first heart rate, the second heart rate, the first activity amount, the first walking feature, the first getting-into-bed action feature, the second activity amount, the second walking feature, and the first getting-out-of-bed action feature.
[0054] Among them, the above-mentioned first heart rate, the second motion data, the second heart rate, and the second motion data can be obtained by the mobile phone from the smart watch.
[0055] It can be seen that the above method combines the walking characteristics, heart rate, activity level near the bedtime and wake-up time, and the detection of getting in and out of bed actions to determine the user's bedtime and wake-up time. Since there are obvious changes in walking behavior when the user gets in and out of bed, and the walking characteristics in the getting-into-bed stage and the getting-out-of-bed stage are symmetric, the above method of sleep detection combining walking characteristics can improve the accuracy of getting-into-bed and getting-out-of-bed time detection.
[0056] In combination with the second aspect, in some embodiments, the mobile phone can determine the first getting-into-bed point according to the first heart rate and the first activity level; the mobile phone can determine the first getting-out-of-bed point according to the second heart rate and the second activity level; the mobile phone can determine the second getting-into-bed point and the second getting-out-of-bed point according to the first walking characteristic and the second walking characteristic; the mobile phone can determine the third getting-into-bed point according to the first getting-into-bed action characteristic; the mobile phone can determine the third getting-out-of-bed point according to the first getting-out-of-bed action characteristic; the mobile phone can determine the user's bedtime according to the first getting-into-bed point, the second getting-into-bed point, and the third getting-into-bed point; the mobile phone can determine the user's wake-up time according to the first getting-out-of-bed point, the second getting-out-of-bed point, and the third getting-out-of-bed point.
[0057] Wherein, the first getting-into-bed point is the time when the first heart rate drops to the first heart rate threshold and the first activity level drops to the first activity level threshold, and the first getting-out-of-bed point is the time when the second heart rate rises to the second heart rate threshold and / or the second activity level rises to the second activity level threshold; the second getting-into-bed point is the time when the last walking behavior occurs within the first time period, and the second getting-out-of-bed point is the time when the first walking behavior occurs within the second time period; the third getting-into-bed point is the time when the getting-into-bed action occurs, and the third getting-out-of-bed point is the time when the getting-out-of-bed action occurs.
[0058] In combination with the second aspect, in some embodiments, when the time difference between any two of the first getting-into-bed point, the second getting-into-bed point, and the third getting-into-bed point is less than the third difference value, the mobile phone can determine the average value of the first getting-into-bed point, the second getting-into-bed point, and the third getting-into-bed point as the user's bedtime, or determine any time between the earliest time and the latest time among the first getting-into-bed point, the second getting-into-bed point, and the third getting-into-bed point as the user's bedtime; when the time difference between any two of the first getting-out-of-bed point, the second getting-out-of-bed point, and the third getting-out-of-bed point is less than the fourth difference value, the mobile phone can determine the average value of the first getting-out-of-bed point, the second getting-out-of-bed point, and the third getting-out-of-bed point as the user's wake-up time, or determine any time between the earliest time and the latest time among the first getting-out-of-bed point, the second getting-out-of-bed point, and the third getting-out-of-bed point as the user's wake-up time.
[0059] In combination with the second aspect, in some embodiments, when the time difference between the second bedtime point and the third bedtime point is less than a third difference value, and the time difference between the first bedtime point and the second bedtime point is greater than or equal to the third difference value, the mobile phone may determine the average value of the second bedtime point and the third bedtime point as the user's bedtime, or determine any time between the second bedtime point and the third bedtime point as the user's bedtime; when the time difference between the second wake-up time point and the third wake-up time point is less than a fourth difference value, and the time difference between the first wake-up time point and the second wake-up time point is greater than or equal to the fourth difference value, the mobile phone may determine the average value of the second wake-up time point and the third wake-up time point as the user's wake-up time, or determine any time between the second wake-up time point and the third wake-up time point as the user's wake-up time.
[0060] The first time period includes the time period before the user's falling asleep time, and the second time period includes the time period after the user's waking up time.
[0061] In combination with the second aspect, in some embodiments, the smartwatch and / or the mobile phone may display the user's falling asleep time, waking up time, bedtime, and wake-up time.
[0062] In a third aspect, the present application provides a sleep detection method, which can be applied to a communication system including a processing device and a data acquisition device. Wherein, the data acquisition device may acquire the user's heart rate and motion data, and the motion data includes acceleration and / or angular velocity; the data acquisition device may acquire the ambient light brightness, ambient sound volume, usage data of one or more electronic devices, and the usage data of one or more electronic devices includes the screen off time of one or more electronic device screens; the processing device may determine the activity level, walking characteristics, and bedtime action characteristics according to the motion data; and determine the user's falling asleep time according to the heart rate, activity level, walking characteristics, bedtime action characteristics, ambient light brightness, ambient sound volume, and usage data of one or more electronic devices.
[0063] The above one or more electronic devices may include one or more of the following: mobile phone, tablet computer, television, laptop computer.
[0064] It can be seen that the above method combines multiple factors: heart rate, motion data, ambient light brightness, ambient sound volume, usage data of one or more electronic devices, to determine the user's falling asleep time, which can improve the accuracy of falling asleep time detection.
[0065] In combination with the third aspect, in some embodiments, the processing device may determine a first sleep onset point based on the characteristics of the action of going to bed, the processing device may determine a second sleep onset point based on the activity level, the processing device may determine a third sleep onset point based on the walking characteristics, determine a fourth sleep onset point based on the heart rate, the processing device may determine a fifth sleep onset point based on the ambient light brightness, the processing device may determine a sixth sleep onset point based on the ambient sound volume, and the processing device may determine a seventh sleep onset point based on the usage data of one or more electronic devices; the processing device may determine the user's sleep time based on the first sleep onset point, the second sleep onset point, the third sleep onset point, the fourth sleep onset point, the fifth sleep onset point, the sixth sleep onset point, and the seventh sleep onset point.
[0066] Among them, the first sleep onset point is the time when the action of going to bed occurs, the second sleep onset point is the time when the activity level is less than the activity threshold, the third sleep onset point is the time when the user changes from the walking state to the non-walking state, the fifth sleep onset point is the time when the ambient light brightness is less than the brightness threshold, the sixth sleep onset point is the time when the ambient sound volume is less than the volume threshold, and the seventh sleep onset point is the time when one or more electronic devices turn off the screen.
[0067] In combination with the third aspect, in some embodiments, the processing device may determine a first time based on the second sleep onset point and the fourth sleep onset point; in the case where the first sleep onset point, the third sleep onset point, the fifth sleep onset point, the sixth sleep onset point, and the seventh sleep onset point are all earlier than the first time, the processing device may determine the first time as the user's sleep time.
[0068] The first time is any time between the second sleep onset point and the fourth sleep onset point, or the average value of the second sleep onset point and the fourth sleep onset point.
[0069] It can be seen that the above embodiments can use the second sleep onset point determined based on the activity level and the fourth sleep onset point determined based on the heart rate as a benchmark, and use the first sleep onset point, the third sleep onset point, the fifth sleep onset point to the seventh sleep onset point as an aid to determine the user's sleep time. It can be understood that the activity level and the heart rate can more directly reflect whether the user has fallen asleep. The above actions of going to bed, walking characteristics, brightness of the ambient light, volume of the ambient sound, and turning off the screen of the mobile phone can reflect that the user is preparing to fall asleep. It may take some time for the user to go from preparing to fall asleep to actually entering the sleep state. The first sleep onset point and the third sleep onset point being earlier than the first time may indicate that the user takes some time to fall asleep after going to bed. The fifth sleep onset point being earlier than the first time may indicate that the ambient light becomes darker before the user falls asleep. The sixth sleep onset point being earlier than the first time may indicate that the volume of the ambient sound decreases before the user falls asleep. The seventh sleep onset point being earlier than the first time may indicate that the user turns off the screen of electronic devices such as mobile phones before falling asleep.
[0070] In combination with the third aspect, in some embodiments, when the fifth sleep onset point and the sixth sleep onset point are both earlier than the seventh sleep onset point, and the seventh sleep onset point is later than the first time, the processing device may determine a second time based on the seventh sleep onset point and determine the second time as the user's sleep onset time, where the second time is later than the seventh sleep onset point.
[0071] It can be seen that when it is detected that the user has fallen asleep based on the activity level and heart rate, the user may be in a state of quietly lying in bed using the mobile phone, that is, the user has not actually fallen asleep. And usually, it takes a while for the user to fall asleep after turning off the screen of the mobile phone. Therefore, the second time after the screen of electronic devices such as mobile phones is turned off can be used as the user's sleep onset time. The above sleep detection in combination with the usage of electronic devices such as mobile phones can improve the accuracy of sleep onset time detection.
[0072] In combination with the third aspect, in some embodiments, when the sixth sleep onset point and the seventh sleep onset point are both earlier than the fifth sleep onset point, the fifth sleep onset point is later than the first time, and the time difference between the fifth sleep onset point and the first time is less than or equal to the first difference value, the processing device may determine a third time based on the fifth sleep onset point and determine the third time as the user's sleep onset time, where the third time is later than the fifth sleep onset point.
[0073] It can be seen that when the sixth sleep onset point and the seventh sleep onset point are both earlier than the fifth sleep onset point, the user may first turn off the audio being played in the sleep environment and turn off the screen of electronic devices such as mobile phones before turning off the light. When the fifth sleep onset point is later than the above first time and the time difference between them is less than or equal to the first difference value, the user may lie quietly in bed for a while with the light on before turning off the light and preparing to fall asleep. Therefore, the user's actual sleep onset time may be slightly later than the time when the ambient light brightness dims. The above sleep detection in combination with the ambient light brightness can improve the accuracy of sleep onset time detection.
[0074] In combination with the third aspect, in some embodiments, when the fifth sleep onset point and the seventh sleep onset point are both earlier than the sixth sleep onset point, the sixth sleep onset point is later than the first time, and the time difference between the sixth sleep onset point and the first time is less than or equal to the second difference value, the processing device may determine a fourth time based on the sixth sleep onset point and determine the fourth time as the user's sleep onset time, where the fourth time is later than the sixth sleep onset point.
[0075] It can be seen that when the fifth sleep onset point and the seventh sleep onset point are both earlier than the sixth sleep onset point, the user may first turn off the screen of the mobile phone and turn off the light before the audio is turned off. When the sixth sleep onset point is later than the above first time and the time difference between them is less than or equal to the second difference value, the user may lie quietly in bed listening to music for a while and then actively turn off the played audio. Therefore, the user's actual sleep onset time may be slightly later than the sixth sleep onset point (i.e., the time when the ambient sound volume decreases).
[0076] In combination with the third aspect, in some embodiments, when the sixth sleep onset point is later than the first time, the time difference between the sixth sleep onset point and the first time is greater than the second difference, and both the fifth sleep onset point and the seventh sleep onset point are earlier than the first time, the processing device may determine a fifth time according to the first time and determine the fifth time as the user's sleep onset time, where the fifth time is later than the first time.
[0077] In combination with the third aspect, in some embodiments, when the sixth sleep onset point and the seventh sleep onset point are later than the first time, the time difference between the sixth sleep onset point and the first time is greater than the second difference, and the fifth sleep onset point is earlier than the first time, the processing device may determine a sixth time according to the seventh sleep onset point and determine the sixth time as the user's sleep onset time, where the sixth time is later than the seventh sleep onset point.
[0078] In combination with the third aspect, in some embodiments, when the fifth sleep onset point and the sixth sleep onset point are later than the first time, the time difference between the fifth sleep onset point and the first time is less than or equal to the first difference, the time difference between the sixth sleep onset point and the first time is greater than the second difference, and the seventh sleep onset point is earlier than the first time, the processing device may determine a seventh time according to the fifth sleep onset point and determine the seventh time as the user's sleep onset time, where the seventh time is later than the fifth sleep onset point.
[0079] In combination with the third aspect, in some embodiments, when the fifth sleep onset point and the sixth sleep onset point are later than the first time, the time difference between the fifth sleep onset point and the first time is greater than the first difference, the time difference between the sixth sleep onset point and the first time is greater than the second difference, and the seventh sleep onset point is earlier than the first time, the processing device may determine an eighth time according to the first time and determine the eighth time as the user's sleep onset time, where the eighth time is later than the first time.
[0080] It can be seen that when the sixth sleep onset point is later than the above-mentioned first time and the time difference between the sixth sleep onset point and the first time is greater than the second difference, the user may fall asleep during the audio playback. The audio continues to play without being paused after the user falls asleep. The moment when the ambient sound volume weakens (i.e., the sixth sleep onset point) does not reflect the user's actual sleep onset time. Among them, if the above-mentioned fifth sleep onset point and / or seventh sleep onset point are within the time period between the first time and the sixth sleep onset point, it is possible that the user lies quietly in bed for a period of time and then actively turns off the light and / or lies quietly in bed and uses the mobile phone for a period of time and then actively turns off the mobile phone screen, and continues to listen to the audio. Therefore, when the moment when the ambient sound volume weakens (i.e., the sixth sleep onset point) does not reflect the user's actual sleep onset time, the mobile phone may determine the sleep onset point according to the fifth sleep onset point and / or the seventh sleep onset point. The above embodiments can improve the accuracy of sleep onset time detection by combining the brightness of the ambient light, the volume of the ambient sound, and the usage situation of the mobile phone.
[0081] In combination with the third aspect, in some embodiments, the processing device may determine a first time period according to the user's bedtime, and obtain a first heart rate and first motion data of the user during the first time period; the processing device may determine a second time period according to the user's wake-up time, and obtain a second heart rate and second motion data of the user during the second time period; the processing device may determine a first activity level, a first walking feature, and a first bed getting-in action feature according to the first motion data, and the processing device may determine a second activity level, a second walking feature, and a first bed getting-out action feature according to the second motion data; the processing device may determine the user's bedtime and wake-up time according to the first heart rate, the second heart rate, the first activity level, the first walking feature, the first bed getting-in action feature, the second activity level, the second walking feature, and the first bed getting-out action feature.
[0082] Wherein, the above-mentioned first heart rate, first motion data, second heart rate, and second motion data may be obtained by the processing device from the data acquisition device.
[0083] It can be seen that the above method combines the walking features, heart rate, activity level, and bed getting-in and out actions near the bedtime and wake-up time to determine the user's bedtime and wake-up time. Since there are obvious changes in the walking behavior of the user when getting in and out of bed, and the walking features in the bed getting-in stage and the bed getting-out stage are symmetrical, the above method of combining walking features for sleep detection can improve the accuracy of detecting the bed getting-in and out times.
[0084] In combination with the third aspect, in some embodiments, the processing device may determine a first bed getting-in point according to the first heart rate and the first activity level; the processing device may determine a first bed getting-out point according to the second heart rate and the second activity level; the processing device may determine a second bed getting-in point and a second bed getting-out point according to the first walking feature and the second walking feature; the processing device may determine a third bed getting-in point according to the first bed getting-in action feature; the processing device may determine a third bed getting-out point according to the first bed getting-out action feature; the processing device may determine the user's bedtime according to the first bed getting-in point, the second bed getting-in point, and the third bed getting-in point; the processing device may determine the user's wake-up time according to the first bed getting-out point, the second bed getting-out point, and the third bed getting-out point.
[0085] Wherein, the first bed getting-in point is the time when the first heart rate drops to the first heart rate threshold and the first activity level drops to the first activity level threshold, and the first bed getting-out point is the time when the second heart rate rises to the second heart rate threshold and / or the second activity level rises to the second activity level threshold; the second bed getting-in point is the time when the last walking behavior occurs within the first time period, and the second bed getting-out point is the time when the first walking behavior occurs within the second time period; the third bed getting-in point is the time when the bed getting-in action occurs, and the third bed getting-out point is the time when the bed getting-out action occurs.
[0086] In combination with the third aspect, in some embodiments, when the time difference between any two of the first bedtime point, the second bedtime point, and the third bedtime point is less than the third difference value, the processing device may determine the average value of the first bedtime point, the second bedtime point, and the third bedtime point as the user's bedtime, or determine any time between the earliest time and the latest time among the first bedtime point, the second bedtime point, and the third bedtime point as the user's bedtime; when the time difference between any two of the first wake-up time point, the second wake-up time point, and the third wake-up time point is less than the fourth difference value, the processing device may determine the average value of the first wake-up time point, the second wake-up time point, and the third wake-up time point as the user's wake-up time, or determine any time between the earliest time and the latest time among the first wake-up time point, the second wake-up time point, and the third wake-up time point as the user's wake-up time.
[0087] In combination with the third aspect, in some embodiments, when the time difference between the second bedtime point and the third bedtime point is less than the third difference value, and the time difference between the first bedtime point and the second bedtime point is greater than or equal to the third difference value, the processing device may determine the average value of the second bedtime point and the third bedtime point as the user's bedtime, or determine any time between the second bedtime point and the third bedtime point as the user's bedtime; when the time difference between the second wake-up time point and the third wake-up time point is less than the fourth difference value, and the time difference between the first wake-up time point and the second wake-up time point is greater than or equal to the fourth difference value, the processing device may determine the average value of the second wake-up time point and the third wake-up time point as the user's wake-up time, or determine any time between the second wake-up time point and the third wake-up time point as the user's wake-up time.
[0088] The first time period includes the time period before the user's falling asleep time, and the second time period includes the time period after the user's waking up time.
[0089] Fourth aspect, the present application provides an electronic device. The electronic device includes a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call the computer program so that the electronic device is implemented in any possible method as in the first aspect.
[0090] Fifth aspect, the present application provides a computer-readable storage medium, including instructions, when the instructions run on the electronic device, enabling the electronic device to execute any possible implementation method as in the first aspect.
[0091] Sixth aspect, the present application provides a computer program product, which may include computer instructions, when the computer instructions run on the electronic device, enabling the electronic device to execute any possible implementation method as in the first aspect.
[0092] Seventh aspect, the present application provides a chip, which is applied to an electronic device. The chip includes one or more processors, and the processors are configured to call computer instructions to cause the electronic device to execute any possible implementation method in the first aspect.
[0093] It can be understood that the electronic device provided in the above fourth aspect, the computer-readable storage medium provided in the fifth aspect, the computer program product provided in the sixth aspect, and the chip provided in the seventh aspect are all used to execute the method provided in the embodiments of the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0094] Figure 1 is a schematic diagram of a communication system provided by an embodiment of the present application;
[0095] Figure 2 is a schematic diagram of the structure of an electronic device 100 provided by an embodiment of the present application;
[0096] Figure 3 is a schematic diagram of the structure of another electronic device 100 provided by an embodiment of the present application;
[0097] Figure 4 is a schematic diagram of a method for determining the sleep onset time provided by an embodiment of the present application;
[0098] Figure 5 is a schematic diagram of a method for determining the time of getting in and out of bed provided by an embodiment of the present application;
[0099] Figure 6 is a schematic diagram of a sleep detection result provided by an embodiment of the present application;
[0100] Figure 7 is a schematic diagram of another communication system provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0101] The following describes the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Among them, in the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification and claims of the present application, the singular forms "a", "the", "above-mentioned", "this", and "such" are also intended to include expressions such as "one or more", unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of the present application, "at least one" and "one or more" mean one or more than two (including two). The term "and / or" is used to describe the association relationship of associated objects and indicates that three relationships can exist; for example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after.
[0102] Reference to "one embodiment" or "some embodiments" etc. described in this specification means that a specific feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "comprise", "include", "have" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways. The term "connection" includes direct connection and indirect connection, unless otherwise stated. "First" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features.
[0103] In the embodiments of the present application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design solution described as "exemplarily" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplarily" or "for example" is intended to present relevant concepts in a specific manner.
[0104] The present application provides a sleep detection method. By combining data obtained from multiple detections such as heart rate detection, activity amount statistics, detection of getting into bed actions, detection of walking characteristics, ambient light detection, ambient sound detection, and detection of the usage situation of electronic devices such as mobile phones and / or tablets, the sleep time of the user is determined, and the accuracy of sleep time detection is improved.
[0105] In addition, this application can also determine the user's bedtime and wake-up time by combining the heart rate data, activity data, walking characteristics and motion characteristics of getting in and out of bed detected by the wearable device. The above bedtime and wake-up time can help users better understand their sleep status.
[0106] The sleep detection method provided by this application can be applied to the communication system 10.
[0107] Figure 1 An exemplary schematic diagram of the communication system 10 is shown.
[0108] As Figure 1 shown, the communication system 10 may include a mobile phone and a smart watch. A communication connection may be established between the mobile phone and the smart watch. For example, the communication connection may be a Bluetooth connection, a wireless local area network (WLAN) connection, etc. This application does not limit the manner of the above communication connection.
[0109] In some embodiments, the smart watch may include a heart rate detection device, an ambient light sensor, an audio input device, a motion sensor, etc. Among them, the heart rate detection device can be used to detect the user's heart rate data. For example, the heart rate detection device can generate a photoplethysmography (PPG) signal and use the PPG signal to determine the user's heart rate data. The ambient light sensor can be used to detect the brightness of the ambient light in the environment where the smart watch is located. The audio input device can be used to collect sound signals. For example, the audio input device may include a microphone. The motion sensor can be used to collect motion data, such as acceleration data, angular velocity data, etc. The motion sensor may include, but is not limited to, an acceleration sensor, a gyroscope, etc.
[0110] The mobile phone may also include one or more devices such as an ambient light sensor, an audio input device, and a motion sensor. The mobile phone can detect whether the mobile phone screen is turned off. When the mobile phone is in the screen-off state, the mobile phone can also detect whether there is an audio playback application running in the mobile phone, that is, whether the mobile phone plays audio in the screen-off state.
[0111] In some embodiments, the smart watch can send one or more data such as the detected heart rate data, ambient light brightness data, ambient sound brightness data, and motion data to the mobile phone. Then, the mobile phone can determine the user's sleep onset time based on the above data from the smart watch and the usage situation of the mobile phone. The sleep onset time can represent the time when the user enters sleep from the waking state.
[0112] The smart watch or the mobile phone can also determine the user's wake-up time based on the heart rate data, motion data, etc. detected by the smart watch. The wake-up time can represent the time when the user wakes up.
[0113] The smartwatch or mobile phone can also detect the user's bedtime and wake-up time. It can be understood that the user may not fall asleep immediately after going to bed, and the user may not get up immediately after waking up. Therefore, the bedtime is earlier than or the same as the falling asleep time, and the wake-up time is later than or the same as the waking up time. The bedtime can also be referred to as the getting-up time. The smartwatch or mobile phone can extract the walking characteristics and the action characteristics of getting in and out of bed from the motion data detected by the smartwatch. Based on the falling asleep time and the waking up time, the smartwatch or mobile phone can combine the walking characteristics and the action characteristics of getting in and out of bed to determine the bedtime and the wake-up time.
[0114] In some embodiments, the smartwatch and / or the mobile phone can display the user's sleep data. The sleep data can include but is not limited to the bedtime, the falling asleep time, the waking up time, and the wake-up time.
[0115] Not limited to smartwatches and mobile phones, the communication system 10 can also include more devices. For example, the communication system 10 can also include wearable devices such as smart bracelets and smart glasses, tablets, TVs, speakers, and so on. In some embodiments, the mobile phone can establish a communication connection with the wearable devices, tablets, TVs, speakers and other devices in the communication system 10. In addition to the heart rate data, motion data, ambient light brightness data, and ambient sound volume data detected by the above smartwatch, the mobile phone can also combine the usage conditions of one or more devices such as smart glasses, tablets, TVs, speakers, etc. to determine the user's sleep data. For example, the mobile phone can combine one or more pieces of data such as the wearing state of the smart glasses, the screen-on / off state of the tablet, the screen-on / off state of the TV, and the audio playback state of the speaker to determine whether the user has fallen asleep. It can be understood that the smart glasses changing from the wearing state to the non-wearing state (i.e., the smart glasses are taken off) can indicate that the user is about to fall asleep. The tablet being in the screen-on state can indicate that the user is still using the tablet, that is, the user has not fallen asleep yet. The tablet changing from the screen-on state to the screen-off state can indicate that the user is about to fall asleep. Similarly, the TV being in the screen-on state can indicate that the user is still watching TV, that is, the user has not fallen asleep yet. The speaker playing audio can indicate that the user is still listening to audio, that is, the user has not fallen asleep yet.
[0116] The structure of the electronic device involved in the present application will be introduced below.
[0117] Figure 2 An exemplary structural diagram of the electronic device 100 is shown.
[0118] As Figure 2As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0119] It can be understood that the structure illustrated in the embodiments of this application does not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than those illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0120] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0121] Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.
[0122] A memory may also be provided in the processor 110 for storing instructions and data. In some examples, the memory in the processor 110 is a cache memory. This memory can hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses and reduces the waiting time of the processor 110, thus improving the efficiency of the system.
[0123] In the present application, a computer program may be stored in the memory for enabling a controller or a processor to implement the sleep detection method of the present application through an interface or a protocol. Exemplarily, the computer program stored in the memory can be used for: performing heart rate detection, determining the brightness of ambient light, determining the volume of ambient sound, determining the activity level according to the motion data of a motion sensor and extracting walking features and action features of getting in and out of bed from the motion data, determining the sleep onset time, determining the wake-up time, determining the bedtime, determining the wake-up time, etc.
[0124] The USB interface 130 is an interface compliant with the USB standard specification. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used for data transmission between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones.
[0125] The charging management module 140 is used to receive a charging input from a charger. Among them, the charger can be a wireless charger or a wired charger. While charging the battery 142, the charging management module 140 can also supply power to the electronic device through the power management module 141.
[0126] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives inputs from the battery 142 and / or the charging management module 140 and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, the wireless communication module 160, etc.
[0127] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc.
[0128] The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example: the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0129] The mobile communication module 150 may provide solutions for wireless communication including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 may receive electromagnetic waves through the antenna 1, filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves through the antenna 1 and radiate it out.
[0130] The wireless communication module 160 may provide solutions for wireless communication including WLAN (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc., applied to the electronic device 100. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves through the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive the signals to be transmitted from the processor 110, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna 2 and radiate them out.
[0131] The electronic device 100 realizes the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering.
[0132] The display screen 194 is used to display images, videos, etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0133] The electronic device 100 may realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, etc.
[0134] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, light passes through the lens and is transmitted to the camera photosensitive element, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye.
[0135] The camera 193 is used to capture still images or videos. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0136] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.
[0137] The NPU is a neural-network (NN) computing processor. By learning from the biological neural network structure, such as learning from the transmission mode between human brain neurons, it can quickly process the input information and can also continuously self-learn. Through the NPU, applications such as intelligent cognition of the electronic device 100 can be realized, such as: image recognition, face recognition, speech recognition, text understanding, etc.
[0138] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. For example, files such as music and videos are saved in the external memory card.
[0139] The internal memory 121 can be used to store computer-executable program code, and the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as the sound playback function, the image playback function, etc.). The data storage area can store the data created during the use of the electronic device 100 (such as audio data, phone book, etc.). In addition, the internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0140] The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor, etc. For example, music playback, recording, etc.
[0141] The audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used for encoding and decoding audio signals. In some examples, the audio module 170 can be disposed in the processor 110, or some functional modules of the audio module 170 can be disposed in the processor 110. The speaker 170A, also referred to as a "loudspeaker", is used to convert an audio electrical signal into a sound signal. The receiver 170B, also referred to as an "earpiece", is used to convert an audio electrical signal into a sound signal. The microphone 170C, also referred to as a "microphone" or "transmitter", is used to convert a sound signal into an electrical signal. The headphone jack 170D is used to connect a wired headphone.
[0142] The above-mentioned speaker 170A and receiver 170B can belong to the audio output device of the electronic device 100. Not limited to the speaker 170A and receiver 170B, the audio output device of the electronic device 100 can also include other devices for playing audio. The above-mentioned microphone 170C can belong to the audio input device of the electronic device 100. Not limited to the microphone 170C, the audio input device of the electronic device 100 can also include other devices for collecting sound signals.
[0143] The sensor module 180 can include a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a gravity sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.
[0144] Among them, the gyroscope sensor can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor.
[0145] The acceleration sensor can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. The acceleration sensor can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0146] In some embodiments, when the electronic device 100 is a device worn on the user's wrist (such as a smart watch or a smart bracelet), the electronic device 100 can also detect the posture of the user's arm based on the gyroscope sensor and / or the acceleration sensor. Among them, when detecting the user's sleep state, the electronic device 100 can also use the above-mentioned posture data of the user's arm.
[0147] The button 190 includes a power-on button, volume buttons, etc. The motor 191 can generate a vibration prompt. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power change, and can also be used to indicate messages, missed calls, notifications, etc.
[0148] The SIM card interface 195 is used to connect the SIM card. The SIM card can be inserted into or pulled out from the SIM card interface 195 to achieve contact and separation from the electronic device 100. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communication. In some examples, the electronic device 100 uses an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0149] Figure 3 An exemplary structural schematic diagram of another electronic device 100 is shown.
[0150] As Figure 3 shown, the electronic device 100 may include a heart rate detection module, a motion data acquisition module, an activity amount statistics module, a feature extraction module, a screen on / off detection module, an ambient sound detection module, an ambient light detection module, a sleep / wake detection module, and a getting in / out of bed detection module.
[0151] The heart rate detection module can be used to detect the user's heart rate. In some embodiments, the heart rate detection module can collect PPG signals and determine the heart rate based on the PPG signals. The embodiments of the present application do not limit the above heart rate detection method.
[0152] In some embodiments, the heart rate detection module can also determine the heart rate variability (HRV) based on the heart rate data. HRV can be used to represent the irregularity of the heartbeat. The irregularity of the heartbeat is dominated by the autonomic nervous system. Therefore, HRV can reflect the health of the nervous system. The higher the HRV, the better the cardiovascular function and stress resistance can be represented. HRV can also reflect the working condition of the autonomic nervous system. The autonomic nervous system can include the sympathetic nerve for fight or flight and the parasympathetic nerve for relaxation or digestion. When the user is in the mode dominated by the sympathetic nerve for fight or flight, the user's HRV is lower. When the user is in the mode dominated by the parasympathetic nerve for relaxation or digestion, the user's HRV is higher.
[0153] The electronic device 100 can determine whether the user is asleep based on HRV. In a possible implementation, the electronic device 100 can determine the user's sleep time according to the frequency index of HRV. The frequency domain indexes of HRV can include high frequency power (HFP) and normalized HFP (nHFP). HFP can be the variance during normal heartbeats in the high frequency range and can represent the activity of the parasympathetic nerve. nHFP can be a quantitative index of parasympathetic nerve activity. Among them, the time corresponding to the rising edge of nHFP can be the user's sleep time.
[0154] The motion data acquisition module can be used to acquire the motion data collected by the motion sensor. For example, acceleration data, angular velocity data, and so on.
[0155] The activity amount statistics module can be used to determine the activity amount according to the motion data. The activity amount can indicate whether the electronic device 100 is moving and whether the posture changes. Among them, the faster the electronic device 100 moves and the greater the posture change, the greater the activity amount. When the electronic device 100 is worn on the user's body or held by the user, the activity amount of the electronic device 100 can reflect the activity amount of the user. For example, the electronic device 100 is a smart watch worn on the user's wrist. The activity amount determined by the activity amount statistics module of the electronic device 100 can reflect the activity of the user's arm. A small activity amount determined by the activity amount statistics module can indicate that the user's arm is basically stationary and the possibility of the user falling asleep is high. A large activity amount determined by the activity amount statistics module can indicate that the user's arm is moving frequently and the possibility of the user falling asleep is low.
[0156] The feature extraction module can be used to extract the walking feature and the action feature according to the motion data.
[0157] The above walking features may include features of the user's walking state changing to a non-walking state and features of the user changing from a non-walking state to a walking state. It can be understood that the user getting into bed and getting out of bed are two opposite processes. The walking features in the user getting into bed stage and the walking features in the getting out of bed stage are symmetric. When the user is walking, the legs will alternately perform the actions of retracting and extending. For example, when the left leg is behind and the right leg is in front, the left foot first performs the retracting action and then the extending action, causing the state of the left and right legs to change to the left leg in front and the right leg behind. Then, the right leg first performs the retracting action and then the extending action, causing the state of the left and right legs to change back to the left leg behind and the right leg in front. In the getting into bed stage, the user changes from a walking state to a non-walking state. Among them, the user will walk to the edge of the bed, retract the feet to stop walking and lie on the bed. Therefore, the walking features in getting into bed may include: the vertical acceleration increases when retracting the feet, and the horizontal acceleration decreases when retracting the feet. In the getting out of bed stage, the user changes from a non-walking state to a walking state. Among them, the user will move to the edge of the bed and extend the feet to start walking. Therefore, the walking features in getting out of bed may include: the vertical acceleration decreases when extending the feet, and the horizontal acceleration increases when extending the feet.
[0158] The above action features may include the action features of getting into bed and the action features of getting out of bed. The action features can reflect the types of actions performed by the user.
[0159] In some embodiments, the feature extraction module may use a feature extraction algorithm to extract the above walking features and action features. The feature extraction algorithm may include a principal component analysis algorithm (PCA), a support vector machine (SVM) algorithm, and so on. The embodiments of the present application do not limit the feature extraction algorithm.
[0160] The screen on / off detection module can be used to detect whether the screen of the electronic device 100 is in the on-screen state or the off-screen state.
[0161] The ambient sound detection module can be used to detect the volume of the sound in the environment where the electronic device 100 is located. The ambient sound detection module can obtain the sound collected by the electronic device 100 and analyze the volume of the sound.
[0162] The ambient light detection module can be used to detect the brightness of the ambient light in the environment where the electronic device 100 is located. For example, the ambient light detection module may include an ambient light sensor.
[0163] The sleep in and out detection module can be used to determine the user's sleep in time and sleep out time based on one or more of the following data: the heart rate data detected by the above-mentioned heart rate detection module, the motion data detected by the motion data acquisition module, the activity level determined by the activity level statistics module, the walking characteristics and motion characteristics determined by the feature extraction module, the screen on / off state determined by the screen on / off detection module, the ambient sound volume determined by the ambient sound detection module, and the ambient light brightness determined by the ambient light detection module.
[0164] In some embodiments, the electronic device 100 may receive data indicating the usage of other electronic devices. The sleep in and out detection module in the electronic device 100 may also combine the above-mentioned data indicating the usage of other electronic devices to determine the user's sleep in time and sleep out time.
[0165] In some embodiments, the electronic device 100 may not include a heart rate detection module. The electronic device 100 may obtain heart rate data from other electronic devices (such as wearable devices like smart watches). Optionally, the electronic device 100 uses one or more of the following data detected by other devices, such as motion data, ambient sound volume, and ambient light brightness, when determining the user's sleep in and out time.
[0166] The getting in and out of bed detection module can be used to determine the user's getting in bed time and getting out of bed time based on one or more of the following data: sleep in time, sleep out time, the above-mentioned heart rate data, activity level, walking characteristics, and motion characteristics.
[0167] The specific methods for determining the user's sleep in and out time and getting in and out of bed time will be introduced in the subsequent embodiments. They will not be elaborated here.
[0168] Not limited to Figure 3 the modules shown, the electronic device 100 may also include more or fewer modules, or combine certain modules, or split certain modules. Figure 3 The various modules shown are only exemplary illustrations of the present application. Figure 3
[0169] The structure of the electronic device (such as a mobile phone, smart watch, etc.) in the foregoing Figure 1 shown communication system 10 can refer to the device structure shown in Figure 2 and Figure 3 Figure 2 shown.
[0170] The present application provides a sleep detection method, which can obtain the user's heart rate, motion data, ambient light brightness, ambient sound volume, and usage data of one or more electronic devices. The above motion data may include acceleration and / or angular velocity, and the usage data of the one or more electronic devices may include the screen off time of the screens of these one or more electronic devices. This method can determine the activity level, walking characteristics, and going-to-bed action characteristics based on the above motion data, and determine the user's sleep time based on the heart rate, activity level, walking characteristics, going-to-bed action characteristics, ambient light brightness, ambient sound volume, and the usage data of the one or more electronic devices. This sleep time can also be referred to as the sleep point.
[0171] The one or more electronic devices may include, but are not limited to: mobile phones, tablets, TVs, speakers, and laptop computers. In addition to the screen off time, the usage data of the one or more electronic devices may further include one or more of the following: the duration of the tablet screen being in the off state, the time when the tablet receives user operations while the screen is in the on state, the time when the tablet plays audio while the screen is in the off state, the duration of the TV playing multimedia content, the time when the TV is turned off, the duration of the speaker playing audio, and the time when the speaker stops playing audio.
[0172] Figure 4 An exemplary schematic diagram of a method for determining the sleep time provided by the present application is shown.
[0173] In some embodiments, the present application can determine multiple suspected sleep points based on the motion data, heart rate data, ambient light brightness, ambient sound volume detected by the wearable device, and the on / off screen states of the mobile phone and / or tablet, and then determine a sleep point by synthesizing these multiple suspected sleep points. This user sleep point can represent the user's sleep time.
[0174] Here, taking the use of a smart watch and a mobile phone to determine the sleep time as an example for introduction.
[0175] As Figure 4 shown, the smart watch may include a motion sensor, a heart rate detection module, an ambient light sensor, and an audio input device.
[0176] The smart watch can collect motion data such as acceleration data and angular velocity data through the motion sensor. In some embodiments, the smart watch can perform going-to-bed action detection, activity level statistics, and walking characteristic detection based on the motion data.
[0177] Among them, the smartwatch can use feature extraction algorithms such as PCA and SVM to extract motion features from the motion data. Then, the smartwatch can use the motion features as the input of the going-to-bed motion detection model, and use the going-to-bed motion detection module to determine the motion features of the going-to-bed motion. The smartwatch can determine the occurrence time of the going-to-bed motion as the suspected sleep point 1. The suspected sleep point 1 can also be referred to as the first sleep point. The going-to-bed motion detection model can be a trained neural network model, which can be used to identify the features of the going-to-bed motion. The type of the going-to-bed motion detection model is not limited in the embodiments of the present application.
[0178] The smartwatch can determine the activity amount according to the motion data, and determine the suspected sleep point 2 based on the activity amount. The suspected sleep point 2 can also be referred to as the second sleep point. It can be understood that after the user falls asleep, the body usually remains stationary or moves slightly occasionally. Therefore, the activity amount detected by the smartwatch after the user falls asleep is relatively small. The smartwatch can determine whether the activity amount within a period of time is less than the activity amount threshold. If the activity amount within a period of time is less than the activity amount threshold, the smartwatch can determine any time point within this period of time as the suspected sleep point 2. The activity amount within the above period of time being less than the activity amount threshold may include that the average value of the activity amount within this period of time is less than the activity amount threshold. The duration of the above period of time and the activity amount threshold can both be preset. The values of the duration of the above period of time and the activity amount threshold are not limited in the embodiments of the present application.
[0179] The smartwatch can also use the feature extraction algorithm to extract the walking feature from the motion data, and determine the time of the last walk as the suspected sleep point 3 according to the walking feature. The suspected sleep point 2 can also be referred to as the third sleep point. The above time of the last walk can include the time when the walking state changes to a non-walking state.
[0180] The smartwatch can detect the user's heart rate through the heart rate detection module, and determine the suspected sleep point 4 based on the heart rate. The suspected sleep point 4 can also be referred to as the fourth sleep point. In some embodiments, the smartwatch can determine the HRV according to the heart rate, and determine the time when the rising edge of the HRV frequency feature nHFP appears as the suspected sleep point 4.
[0181] The smartwatch can detect the brightness of the ambient light through an ambient light sensor and determine the time when the brightness of the ambient light is less than a brightness threshold as the suspected sleep onset point 5. The suspected sleep onset point 5 can also be referred to as the fifth sleep onset point. It can be understood that users usually turn off the lights before going to sleep and fall asleep in a dimly lit environment. The smartwatch can determine whether the brightness of the ambient light is less than the brightness threshold within a period of time. If the brightness of the ambient light is less than the brightness threshold throughout this period of time, the smartwatch can determine any time point within this period of time as the suspected sleep onset point 5. The brightness of the ambient light being less than the brightness threshold within the above-mentioned period of time can include the average brightness of the ambient light being less than the brightness threshold within this period of time. The above-mentioned brightness threshold can be preset. The embodiments of the present application do not limit the value of the brightness threshold.
[0182] The smartwatch can collect ambient sound through an audio input device and detect the volume of the ambient sound. The smartwatch can determine the time when the volume of the ambient sound is less than a volume threshold as the suspected sleep onset point 6. The suspected sleep onset point 6 can also be referred to as the sixth sleep onset point. It can be understood that the user's sleep environment is usually quiet. The smartwatch can determine whether the volume of the ambient sound is less than the volume threshold within a period of time. If the volume of the ambient sound is less than the volume threshold throughout this period of time, the smartwatch can determine any time point within this period of time as the suspected sleep onset point 6. The volume of the ambient sound being less than the volume threshold within the above-mentioned period of time can include the average volume of the ambient sound being less than the volume threshold within this period of time. The above-mentioned volume threshold can be preset. The embodiments of the present application do not limit the value of the volume threshold.
[0183] The mobile phone can perform screen on / off detection to determine whether the mobile phone is in the screen-on state or the screen-off state. It can be understood that users will not view the mobile phone screen after falling asleep, and the mobile phone screen will be in the screen-off state for a long time. After detecting that the mobile phone enters the screen-off state, the mobile phone can determine whether the mobile phone has been in the screen-off state within a preset duration. If the mobile phone has been in the screen-off state within the preset duration, the mobile phone can determine the time when it enters the screen-off state (i.e., the time of turning off the screen) as the suspected sleep onset point 7. The suspected sleep onset point 7 can also be referred to as the seventh sleep onset point.
[0184] Optionally, the mobile phone can also determine the above-mentioned suspected sleep onset point 7 in combination with the user operations on the mobile phone. For example, in the case where the user is about to fall asleep without turning off the mobile phone screen, the mobile phone screen may not automatically turn off and remain in the screen-on state. In the screen-on state, the mobile phone can detect whether there are any user operations on the mobile phone within a preset time period. The above-mentioned preset time period can be 1 minute, 2 minutes, etc. The embodiments of the present application do not limit the duration of the above-mentioned preset time period. If the mobile phone does not detect any user operations within the preset time period in the screen-on state, the mobile phone can determine any time within this preset time period as the suspected sleep onset point 7.
[0185] In some embodiments, one or more of the above-mentioned suspected sleep onset points 1 to 7 can be determined by a mobile phone. For example, a smartwatch can send the motion data detected by its motion sensor to the mobile phone. The mobile phone can detect the going-to-bed action, count the activity level, and detect the walking characteristics based on the motion data, so as to determine the suspected sleep onset points 1 to 3. The smartwatch can send the heart rate detected by its heart rate detection module to the mobile phone. The mobile phone can determine the suspected sleep onset point 4 based on the heart rate. The smartwatch can send the ambient light data detected by its ambient light sensor to the mobile phone. The mobile phone can determine the suspected sleep onset point 5 based on the ambient light data from the smartwatch. Optionally, the mobile phone has an ambient light sensor. The mobile phone can determine the above-mentioned suspected sleep onset point 5 based on the ambient light data detected by its own ambient light sensor. The smartwatch can send the volume of the ambient sound collected by its audio input device to the mobile phone. The mobile phone can determine the suspected sleep onset point 6 based on the volume of the ambient sound from the smartwatch. Optionally, the mobile phone has an audio input device. The mobile phone can collect the ambient sound with its own audio input device and then determine the above-mentioned suspected sleep onset point 6 based on the volume of the ambient sound.
[0186] The mobile phone can synthesize the above-mentioned suspected sleep onset points 1 to 7 to obtain the sleep onset point.
[0187] In some embodiments, the mobile phone can use the suspected sleep onset point 2 determined based on the activity level and the suspected sleep onset point 4 determined based on the heart rate as the benchmarks, and use the suspected sleep onset points 1, 3, 5 to 7 as the supplements to determine the sleep onset point. It can be understood that the activity level and the heart rate can more directly reflect whether the user has fallen asleep. The above-mentioned going-to-bed action, walking characteristics, brightness of the ambient light, volume of the ambient sound, and the screen off of the mobile phone can reflect that the user is preparing to fall asleep. It may take some time for the user to go from preparing to fall asleep to actually entering the sleep state. For example, the user may play with the mobile phone for a while after going to bed before falling asleep. The user may meditate for a while after turning off the light before falling asleep.
[0188] After the user falls asleep, the activity level decreases and the heart rate also drops to near the resting heart rate. If the user has a large amount of activity (for example, the user frequently turns over or waves the arm), the user's heart rate will also be relatively high. Therefore, the suspected sleep point 2 and the suspected sleep point 4 are usually the same or have a small difference. The mobile phone can detect whether the difference between the suspected sleep point 2 and the suspected sleep point 4 is less than the first preset time difference. For example, the above-mentioned first preset time difference can be 2 minutes, or 5 minutes, etc. The present application does not limit the value of the above-mentioned first preset time difference. If the difference between the suspected sleep point 2 and the suspected sleep point 4 is less than the first preset time difference, the mobile phone can determine the time point t1 based on the suspected sleep point 2 and the suspected sleep point 4. The time point t1 can also be referred to as the first time. Among them, the time point t1 can be the suspected sleep point 2, or the suspected sleep point 4, or the average value of the suspected sleep point 2 and the suspected sleep point 4, or any time point between the suspected sleep point 2 and the suspected sleep point 4.
[0189] Furthermore, the mobile phone can determine whether the suspected sleep point 1, the suspected sleep point 3, the suspected sleep point 5 to the suspected sleep point 7 are earlier or later than the time point t1. If the suspected sleep point 1, the suspected sleep point 3, the suspected sleep point 5 to the suspected sleep point 7 are all earlier than the time point t1, the mobile phone can determine the time point t1 as the sleep point. It can be understood that the suspected sleep point 1 and the suspected sleep point 3 before the time point t1 can indicate that the user falls asleep after a period of time (that is, the time difference between the suspected sleep point 1 and the time point t1, or the time difference between the suspected sleep point 3 and the time point t1) after going to bed. The suspected sleep point 5 before the time point t1 can indicate that the ambient light becomes dim before the user falls asleep. The suspected sleep point 6 before the time point t1 can indicate that the volume of the ambient sound decreases before the user falls asleep. The suspected sleep point 7 before the time point t1 can indicate that the user turns off the mobile phone screen before falling asleep.
[0190] If the suspected sleep point 5 is after the time point t1, the mobile phone can determine whether the time difference between the suspected sleep point 5 and the time point t1 is greater than the second preset time difference. The second preset time difference can be 10 minutes, or 20 minutes, etc. The embodiments of the present application do not limit the value of the second preset time difference. The time difference between the suspected sleep point 5 and the time point t1 being greater than the second preset time difference can indicate that the user falls asleep in an environment with relatively strong ambient light brightness. For example, the user may fall asleep without turning off the light. Therefore, in the case where the time difference between the suspected sleep point 5 and the time point t1 is greater than the second preset time difference, the suspected sleep point 5 can be not used as an evaluation factor for determining the sleep point.
[0191] The time difference between the suspected sleep onset point 5 and the time point t1 is less than or equal to the second preset time difference, which may indicate that the ambient light dims within a short time after the time point t1. For example, the user lies quietly in bed for a while with the light on and then turns off the light to prepare for sleep. When the user lies quietly in bed with the light on, the activity level is low and the heart rate is relatively slow. The above-mentioned suspected sleep onset points 2 and 4 may be the time points during which the user lies quietly in bed with the light on. Therefore, when the time difference between the suspected sleep onset point 5 and the time point t1 is less than or equal to the second preset time difference, the actual sleep onset time of the user is later than the time point t1 and closer to the suspected sleep onset point 5.
[0192] If the suspected sleep onset point 6 is after the time point t1, the mobile phone can determine whether the time difference between the suspected sleep onset point 6 and the time point t1 is greater than the third preset time difference. The third preset time difference can be 10 minutes, 20 minutes, etc. The embodiments of the present application do not limit the value of the third preset time difference. The time difference between the suspected sleep onset point 6 and the time point t1 being greater than the third preset time difference may indicate that the user falls asleep in an environment with a relatively high ambient sound volume. For example, the user may start playing music before falling asleep and fall asleep during the music playback. The music continues to play without being paused after the user falls asleep. Among them, the user may lie quietly in bed listening to music while preparing to fall asleep. When the user has not actually fallen asleep, the user state reflected by the activity level and heart rate may already be the sleep state. That is, the above-mentioned suspected sleep onset points 2 and 4 may be the time points before the user actually falls asleep. Therefore, when the time difference between the suspected sleep onset point 6 and the time point t1 is greater than the third preset time difference, the actual sleep onset time of the user is slightly later than the time point t1.
[0193] The time difference between the suspected sleep onset point 6 and the time point t1 being less than or equal to the third preset time difference may indicate that the volume of the ambient sound decreases within a short time after the time point t1. For example, the user listens to music quietly in bed for a while and then actively turns off the music and prepares to fall asleep. When the user listens to music quietly in bed, the activity level is low and the heart rate is relatively slow. The above-mentioned suspected sleep onset points 2 and 4 may be the time points during which the user listens to music quietly in bed and has not yet fallen asleep. Therefore, when the time difference between the suspected sleep onset point 6 and the time point t1 is less than or equal to the third preset time difference, the actual sleep onset time of the user is later than the time point t1 and closer to the suspected sleep onset point 6.
[0194] After the suspected sleep onset point 7 is after the time point t1, it can indicate that the user is still using the mobile phone after the time point t1. For example, the user is quietly lying in bed using the mobile phone. During the process of the user quietly lying in bed using the mobile phone, the activity level is relatively low and the heart rate is also relatively slow. Therefore, the above-mentioned suspected sleep onset points 2 and 4 may be time points during the period when the user is quietly lying in bed using the mobile phone. The actual sleep time of the user is later than the time point t1 and closer to the suspected sleep onset point 7.
[0195] After the suspected sleep onset points 1 and 3 are after the time point t1, it can indicate that the user got up and then got back into bed after falling asleep. For example, after the user falls asleep, they may get up to use the toilet or drink water, and then get back into bed to continue sleeping. The suspected sleep onset points 1 and 3 after the time point t1 may not affect the mobile phone's determination of the user's actual sleep time.
[0196] In some embodiments, when both the suspected sleep onset points 5 and 6 are earlier than the suspected sleep onset point 7, and the suspected sleep onset point 7 is later than the above time point t1, the mobile phone can determine the time point t2 based on the suspected sleep onset point 7. The time point t2 can also be referred to as the second time. The time point t2 is later than the suspected sleep onset point 7. Exemplarily, the time point t2 can be a time point separated from the suspected sleep onset point 7 by a preset time period after the suspected sleep onset point 7. For example, the preset time period can be 3 minutes, or 5 minutes, or 10 minutes, etc. The mobile phone can determine the time point t2 as the sleep onset point.
[0197] It can be understood that when the mobile phone detects that the user is asleep based on the activity level and heart rate, the user may be in a state of quietly lying in bed using the mobile phone, that is, the user is not actually asleep. And the user usually needs some time to fall asleep after turning off the screen of the mobile phone. Therefore, the mobile phone determines the time point t2 after turning off the screen of the mobile phone as the sleep onset point. The above sleep detection in combination with the usage situation of the mobile phone can improve the accuracy of sleep time detection.
[0198] In some embodiments, when both the suspected sleep onset points 6 and 7 are earlier than the suspected sleep onset point 5, the suspected sleep onset point 5 is later than the above time point t1, and the time difference between the suspected sleep onset point 5 and the time point t1 is less than or equal to the second preset time difference, the mobile phone can determine the time point t3 based on the suspected sleep onset point 5. The second preset time difference can also be referred to as the first difference. The time point t3 can also be referred to as the third time. The time point t3 is later than the suspected sleep onset point 5. Exemplarily, the time point t3 can be a time point separated from the suspected sleep onset point 5 by a preset time period after the suspected sleep onset point 5. The mobile phone can determine the time point t3 as the sleep onset point.
[0199] It can be understood that when both the suspected sleep point 6 and the suspected sleep point 7 are earlier than the suspected sleep point 5, the user may have turned off the audio being played in the sleep environment and turned off the screen of the mobile phone before turning off the light to go to bed. When the suspected sleep point 5 is later than the above time point t1 and the time difference between the suspected sleep point 5 and the time point t1 is less than or equal to the second preset time difference, the user may have lain quietly in bed for a while with the light on before turning off the light to prepare to fall asleep. Therefore, the actual sleep time of the user may be slightly later than the time when the ambient light brightness dims. The above sleep detection in combination with the ambient light brightness can improve the accuracy of sleep time detection.
[0200] In some embodiments, when both the suspected sleep point 5 and the suspected sleep point 7 are earlier than the suspected sleep point 6, the suspected sleep point 6 is later than the above time point t1, and the time difference between the suspected sleep point 6 and the time point t1 is less than or equal to the third preset time difference, the mobile phone can determine the time point t4 according to the suspected sleep point 6. The third preset time difference can also be referred to as the second difference. The time point t4 can also be referred to as the fourth time. The time point t4 is later than the suspected sleep point 6. Exemplarily, the time point t4 can be a time point separated from the suspected sleep point 6 by a preset time period after the suspected sleep point 6. The mobile phone can determine the time point t4 as the sleep point.
[0201] It can be understood that when both the suspected sleep point 5 and the suspected sleep point 7 are earlier than the suspected sleep point 6, the user may have turned off the screen of the mobile phone and turned off the light before the audio was turned off. When the suspected sleep point 6 is later than the above time point t1 and the time difference between the suspected sleep point 6 and the time point t1 is less than or equal to the third preset time difference, the user may have actively turned off the played audio after listening to music quietly in bed for a while. Therefore, the actual sleep time of the user may be slightly later than the suspected sleep point 6 (i.e., the time when the ambient sound volume decreases).
[0202] When the suspected sleep point 6 is later than the above time point t1 and the time difference between the suspected sleep point 6 and the time point t1 is greater than the third preset time difference, the mobile phone can determine whether the suspected sleep point 5 and the suspected sleep point 7 are earlier than the time point t1.
[0203] If both the suspected sleep onset point 5 and the suspected sleep onset point 7 are earlier than the above time point t1, the mobile phone can determine the time point t5 according to the time point t1. The time point t5 can also be referred to as the fifth time. The time point t5 is later than the time point t1. Exemplarily, the time point t5 can be a time point separated from the time point t1 by a preset time period after the time point t1. The mobile phone can determine the time point t5 as the sleep onset point. It can be understood that both the suspected sleep onset point 5 and the suspected sleep onset point 7 being earlier than the above time point t1 can indicate that the user first turns off the light and turns off the mobile phone screen and then lies quietly in bed ready to fall asleep. However, when the user lies quietly in bed, it is possible to listen to audio. Therefore, the mobile phone can combine the volume of the ambient sound to determine the user's sleep time to improve the accuracy of sleep time detection.
[0204] If the suspected sleep onset point 5 is earlier than the time point t1 and the suspected sleep onset point 7 is later than the time point t1, the mobile phone can determine the sleep onset point according to the suspected sleep onset point 7. Exemplarily, the sleep onset point determined by the mobile phone according to the suspected sleep onset point 7 can be the sixth time. The sixth time is later than the suspected sleep onset point 7. Among them, the above sleep onset point determined according to the suspected sleep onset point 7 (such as the sixth time) can be a time point later than the suspected sleep onset point 7 by a preset time period.
[0205] If the suspected sleep onset point 5 is later than the time point t1 and the suspected sleep onset point 7 is earlier than the time point t1, the mobile phone can determine the sleep onset point according to the suspected sleep onset point 5 when the time difference between the suspected sleep onset point 5 and the time point t1 is less than or equal to the second preset time difference. Exemplarily, the sleep onset point determined by the mobile phone according to the suspected sleep onset point 5 can be the seventh time. The seventh time is later than the suspected sleep onset point 5. Among them, the above sleep onset point determined according to the suspected sleep onset point 5 (such as the seventh time) can be a time point later than the suspected sleep onset point 5 by a preset time period. If the suspected sleep onset point 5 is later than the time point t1 and the suspected sleep onset point 7 is earlier than the time point t1, the mobile phone can use the time point t5 determined by the above time point t1 as the sleep onset point when the time difference between the suspected sleep onset point 5 and the time point t1 is greater than the second preset time difference. Or, the sleep onset point determined by the mobile phone according to the time point t1 is the eighth time. The eighth time is later than the time point t1. The eighth time can be the same as or different from the above time point t5.
[0206] If both the suspected sleep onset point 5 and the suspected sleep onset point 7 are later than the time point t1, the mobile phone can determine the sleep onset point according to the order of the suspected sleep onset point 5 and the suspected sleep onset point 7. Specifically, reference can be made to the introduction of the foregoing embodiments. Details are not described herein again.
[0207] It can be understood that when the suspected sleep point 6 is later than the above time point t1 and the time difference between the suspected sleep point 6 and the time point t1 is greater than the third preset time difference, the user may fall asleep during the audio playback. The audio continues to play without being paused after the user falls asleep. The moment when the ambient sound volume weakens (i.e., the suspected sleep point 6) does not reflect the actual sleep time of the user. Among them, if the above suspected sleep point 5 and / or suspected sleep point 7 are within the time period from the time point t1 to the suspected sleep point 6, it is possible that the user actively turns off the light after lying quietly in bed for a period of time and / or actively turns off the mobile phone screen after using the mobile phone while lying quietly in bed for a period of time, and continues to listen to the audio. Therefore, when the moment when the ambient sound volume weakens (i.e., the suspected sleep point 6) does not reflect the actual sleep time of the user, the mobile phone can determine the sleep point according to the suspected sleep point 5 and / or suspected sleep point 7. The above embodiments combine the brightness of the ambient light, the volume of the ambient sound, and the usage of the mobile phone to perform sleep detection, which can improve the accuracy of sleep time detection.
[0208] The above method for determining the sleep point by comprehensively considering the suspected sleep points 1 to 7 is only an exemplary illustration of the present application and should not limit the present application. The smartwatch and / or mobile phone can also use other methods to determine the sleep point according to the suspected sleep points 1 to 7.
[0209] Not limited to the above suspected sleep points 1 to 7, the smartwatch and / or mobile phone can also generate more or fewer suspected sleep points, and then determine the sleep point according to all the suspected sleep points to improve the accuracy of sleep time detection.
[0210] Exemplarily, the mobile phone can also obtain the usage of the tablet computer and determine a suspected sleep point according to the usage of the tablet computer. Among them, the usage of the tablet computer can include, but is not limited to: the time when the tablet computer screen is turned off, the duration of the screen in the off state, the time when the tablet computer receives user operations when the screen is in the on state, the time when the tablet computer plays audio when the screen is in the off state, and so on. The suspected sleep point determined according to the usage of the tablet computer can be the time point reflecting that the user stops using the tablet computer. It can be understood that when the user is using the tablet computer, it means that the user has not fallen asleep yet. If the user stops using the tablet computer, the user may be about to prepare to fall asleep. That is, the actual sleep time of the user is usually later than the suspected sleep point determined according to the usage of the tablet computer.
[0211] The mobile phone can also obtain the usage situation of the TV and determine a suspected bedtime based on the usage situation of the TV. Among them, the usage situation of the TV can include, but is not limited to, the duration of the TV playing multimedia content, the time when the TV is turned off, and so on. The suspected bedtime determined according to the usage situation of the TV can be the time point reflecting that the user stops watching TV. It can be understood that when the time when the TV is turned off is slightly later than the suspected bedtime determined according to the activity amount and heart rate, the user may lie quietly in bed and watch TV for a while and then actively turn off the TV. When the time when the TV is turned off is much later than the suspected bedtime determined according to the activity amount and heart rate, the user may fall asleep during the process of watching TV. The TV continues to play and is not turned off after the user falls asleep.
[0212] The mobile phone can also obtain the usage situation of the speaker and determine a suspected bedtime based on the usage situation of the speaker. Among them, the usage situation of the speaker can include, but is not limited to, the duration of the speaker playing audio, the time when the speaker stops playing audio, and so on. The suspected bedtime determined according to the usage situation of the speaker can be the time point reflecting that the user stops listening to audio.
[0213] In some embodiments, the above-mentioned electronic devices such as smart watches, mobile phones, tablets, TVs, speakers, etc. can all be electronic devices associated with the same user. The embodiments of the present application do not limit the method for associating electronic devices with users. For example, two electronic devices being associated with the same user can mean that the device accounts logged in on these two electronic devices are accounts of the same user.
[0214] In some embodiments, the smart watch and / or the mobile phone can also detect the user's waking-up time. Among them, the smart watch can determine the user's waking-up time according to the activity amount and heart rate. Optionally, on the basis of the activity amount and heart rate, the mobile phone can also combine data such as the alarm clock set in the mobile phone, the time when the mobile phone screen lights up and is started to be used by the user, etc. to determine the user's waking-up time. The embodiments of the present application do not limit the method for detecting the waking-up time.
[0215] Figure 5 An exemplary schematic diagram of a method for determining the time of getting in and out of bed provided by the present application is shown.
[0216] In some embodiments, the present application can determine the user's time of getting in bed and time of getting out of bed according to the bedtime, waking-up time, heart rate data and exercise data detected by the wearable device.
[0217] Here, taking the use of a smart watch and a mobile phone to determine the time of getting in and out of bed as an example for introduction.
[0218] As Figure 5 shown, the method for determining the time of getting in and out of bed may include steps S511 to S520.
[0219] S511. Obtain PPG data.
[0220] S512. Obtain the motion data detected by the motion sensor.
[0221] S513. Determine the heart rate based on the PPG data.
[0222] In some embodiments, the smartwatch can obtain PPG data through the heart rate detection module and detect motion data through the motion sensor. The smartwatch can determine the user's heart rate based on the PPG data. The smartwatch can send the heart rate and motion data to the mobile phone, and the mobile phone can detect the user's sleep onset time and getting in and out of bed time.
[0223] S514. Determine the activity level based on the motion data.
[0224] S515. Extract walking features from the motion data.
[0225] S516. Extract action features from the motion data.
[0226] For the above methods of determining the activity level and extracting walking features and action features, reference can be made to the introduction in the foregoing embodiments.
[0227] The mobile phone can combine data such as heart rate, activity level, walking features, and action features to determine the user's sleep onset time and wake-up time. Specifically, reference can be made to the introduction in the foregoing Figure 4 embodiments.
[0228] S517. Use the getting in and out of bed recognition algorithm to determine the suspected getting in bed time and suspected getting out of bed time based on the heart rate and activity level.
[0229] In some embodiments, the mobile phone can obtain the heart rate and activity level within a period of time before the sleep onset time and the heart rate and activity level within a period of time after the wake-up time. The duration of the above-mentioned period of time before the sleep onset time and the period of time after the wake-up time can be 30 minutes, 40 minutes, 1 hour, etc. The embodiments of the present application do not limit the value of this duration.
[0230] Based on the above-mentioned heart rate and activity level before going to sleep, the mobile phone can use the getting in and out of bed recognition algorithm to determine the suspected getting in bed time. Based on the above-mentioned heart rate and activity level after waking up, the mobile phone can use the getting in and out of bed recognition algorithm to determine the suspected getting out of bed time. Among them, the above-mentioned getting in and out of bed recognition algorithm can determine the suspected getting in bed time and suspected getting out of bed time according to the principle that both the heart rate and activity level will decrease significantly after the user gets in bed and both the heart rate and activity level will increase significantly after getting out of bed.
[0231] For example, the suspected bedtime determined by the above upper and lower bed recognition algorithm can be the time when the heart rate starts to drop to the heart rate threshold 1 and the activity level starts to drop to the activity level threshold 1 before the bedtime. Among them, before the suspected bedtime, the heart rate of the user is higher than the above heart rate threshold 1 for most of the time, and / or the activity level of the user is higher than the above activity level threshold 1 for most of the time. After the suspected bedtime, the heart rate of the user is lower than the heart rate threshold 1 for most of the time, and the activity level is lower than the activity level threshold 1 for most of the time. The suspected wake-up time determined by the above upper and lower bed recognition algorithm can be the time when the heart rate starts to rise to the heart rate threshold 2 and / or the activity level starts to rise to the activity level threshold 2 after the wake-up time. Among them, before the suspected wake-up time, the heart rate of the user is lower than the above heart rate threshold 2 for most of the time, and the activity level is lower than the above activity level threshold 2 for most of the time. After the suspected wake-up time, the heart rate of the user is higher than the heart rate threshold 2 for most of the time, and / or the activity level is higher than the activity level threshold 2 for most of the time. The specific implementation manner of the above upper and lower bed recognition algorithm is not limited in the embodiments of the present application.
[0232] S518. Identify the time of getting in and out of bed based on walking characteristics.
[0233] Users usually have walking behaviors before going to bed, and hardly have walking behaviors after going to bed. Users usually do not have walking behaviors before getting out of bed, and will have walking behaviors after getting out of bed.
[0234] In some embodiments, the mobile phone can obtain the walking characteristics within a period of time before the bedtime and the walking characteristics within a period of time after the wake-up time. Based on the change of the walking behavior of the user when getting in and out of bed, and the principle that the walking characteristics in the getting-into-bed stage and the getting-out-of-bed stage are symmetric, the mobile phone can determine the time of the user getting in and out of bed. The time of getting in and out of bed can include the time of getting into bed and the time of getting out of bed. Among them, the time of getting into bed can represent the time when the last walking behavior occurs before the bedtime. The time of getting out of bed can represent the time when the first walking behavior occurs after the wake-up time.
[0235] S519. Identify the time when the getting-into-bed action and the getting-out-of-bed action occur based on action characteristics.
[0236] The actions that most users perform when going to bed every day are similar. For example, the actions of going to bed may include, but are not limited to: sitting on the bed first after reaching the edge of the bed, then lifting the legs and placing them on the bed, and finally lying down and covering with a quilt. The actions that most users perform when getting out of bed every day are also similar. For example, the actions of getting out of bed may include, but are not limited to: sitting up in bed first, then moving to the edge of the bed, moving the legs off the bed, putting on shoes and standing up. The mobile phone can detect the user's actions of going to bed and getting out of bed based on a pre-trained model for detecting going-to-bed actions and a model for detecting getting-out-of-bed actions respectively. The above-mentioned models for detecting going-to-bed actions and getting-out-of-bed actions can be neural network models. The embodiments of the present application do not limit the types of the models for detecting going-to-bed actions and getting-out-of-bed actions.
[0237] In some embodiments, the mobile phone can obtain the action features within a period of time before the bedtime and the walking features within a period of time after the wake-up time. The mobile phone can use the action features before going to sleep as the input of the model for detecting going-to-bed actions, and use the model for detecting going-to-bed actions to detect the action of going to bed, so as to determine the time when the action of going to bed occurs. The mobile phone can use the action features after waking up as the input of the model for detecting getting-out-of-bed actions, and use the model for detecting getting-out-of-bed actions to detect the action of getting out of bed, so as to determine the time when the action of getting out of bed occurs.
[0238] In some embodiments, the above-mentioned models for detecting going-to-bed actions and getting-out-of-bed actions can also perform self-learning, so as to improve the accuracy of detecting going-to-bed actions and getting-out-of-bed actions.
[0239] S520. Obtain the bedtime and the wake-up time by synthesizing the suspected bedtime, the suspected wake-up time, the time of walking between going to bed and getting out of bed, and the times when the actions of going to bed and getting out of bed occur.
[0240] In some embodiments, when the suspected bedtime, the time of walking before going to bed, and the time when the action of going to bed occurs are close, the mobile phone can use any one of the suspected bedtime, the time of walking before going to bed, and the time when the action of going to bed occurs as the bedtime, or use the average value of the suspected bedtime, the time of walking before going to bed, and the time when the action of going to bed occurs as the bedtime, or select any time between the earliest time and the latest time among the suspected bedtime, the time of walking before going to bed, and the time when the action of going to bed occurs as the bedtime.
[0241] When the suspected wake-up time, the time of walking after getting out of bed, and the time when the action of getting out of bed occurs are close, the mobile phone can use any one of the suspected wake-up time, the time of walking after getting out of bed, and the time when the action of getting out of bed occurs as the wake-up time, or use the average value of the suspected wake-up time, the time of walking after getting out of bed, and the time when the action of getting out of bed occurs as the wake-up time, or select any time between the earliest time and the latest time among the suspected wake-up time, the time of walking after getting out of bed, and the time when the action of getting out of bed occurs as the wake-up time.
[0242] The above-mentioned suspected bedtime, time of walking to bed, and time of the bed getting-in action are close, which can indicate that the time differences between any two of them are less than a preset time difference (such as the third difference). The above-mentioned suspected wake-up time, time of walking out of bed, and time of the bed getting-out action are close, which can indicate that the time differences between any two of them are less than a preset time difference (such as the fourth difference).
[0243] Among them, if the suspected bedtime is later than the time of walking to bed and the time difference between them is greater than the preset time difference, it means that the user may have a large amount of activity after going to bed. For example, the user may frequently turn over after going to bed, or do some pre-sleep stretching exercises in bed. This causes the smartwatch to still detect a large amount of activity and a high heart rate after the user goes to bed. Therefore, when the suspected bedtime is later than the time of walking to bed and the time difference between them is greater than the preset time difference, the suspected bedtime can be not used as an evaluation factor for determining the bedtime. At this time, the mobile phone can determine the bedtime based on the time of walking to bed and the time of the bed getting-in action.
[0244] If the suspected wake-up time is earlier than the time of walking out of bed and the time difference between them is greater than the preset time difference, it means that the user may not get out of bed after waking up and has a large amount of activity in bed. For example, the user may use the mobile phone in bed after waking up, or do some morning stretching exercises in bed. This causes the smartwatch to detect a large amount of activity and a high heart rate before the user gets out of bed. Therefore, when the suspected wake-up time is earlier than the time of walking out of bed and the time difference between them is greater than the preset time difference, the suspected wake-up time can be not used as an evaluation factor for determining the wake-up time. At this time, the mobile phone can determine the wake-up time based on the time of walking out of bed and the time of the bed getting-out action.
[0245] Not limited to the activity amount, heart rate, walking characteristics, and movement characteristics within a period of time before the sleep time, the mobile phone can also combine the activity amount, heart rate, walking characteristics, and movement characteristics within a period of time after the sleep time to determine the bedtime. This can avoid inaccurate detection due to too little data volume between going to bed and falling asleep in the case where the user falls asleep quickly after going to bed. Similarly, not limited to the activity amount, heart rate, walking characteristics, and movement characteristics within a period of time after the waking-up time, the mobile phone can also combine the activity amount, heart rate, walking characteristics, and movement characteristics within a period of time before the waking-up time to determine the wake-up time. This can avoid inaccurate detection due to too little data volume between waking up and getting out of bed in the case where the user gets out of bed immediately after waking up.
[0246] In some embodiments, if the time of getting out of bed is not detected based on the activity level, heart rate, walking characteristics, and movement characteristics within a preset time period after the time of falling asleep, the mobile phone may determine the preset time after the time of falling asleep as the time of getting out of bed. The duration of the preset time period after the time of falling asleep may be 1 hour, 2 hours, or the like. The preset time after the time of falling asleep may be 1 hour, 2 hours, or the like after the time of falling asleep. The embodiments of the present application do not limit this. The fact that the time of getting out of bed is not detected based on the activity level and heart rate may indicate that both the activity level and heart rate of the user remain at a relatively low level after the time of falling asleep. That is, the algorithm for identifying getting in and out of bed cannot determine a suspected time of getting out of bed based on the activity level and heart rate. The fact that the time of getting out of bed is not detected based on the walking characteristics may indicate that the user has not had any walking behavior after the time of falling asleep. That is, the mobile phone cannot detect the time of getting out of bed and walking based on the walking characteristics. The fact that the time of getting out of bed is not detected based on the movement characteristics may indicate that the user has no movement of getting out of bed after the time of falling asleep. That is, the mobile phone cannot detect the movement of getting out of bed based on the movement characteristics, and thus cannot determine the time when the movement of getting out of bed occurs.
[0247] In some embodiments, one or more of the steps S514 - S520 above may also be executed by a smart watch.
[0248] From the method Figure 5 shown above, it can be seen that the present application combines the time of falling asleep with the walking characteristics, heart rate, activity level, and detection of getting in and out of bed actions near the time of waking up to determine the time when the user gets into bed and the time when the user gets out of bed. Since there are obvious changes in the walking behavior of the user when getting into bed and getting out of bed, and the walking characteristics in the getting - into - bed stage and the getting - out - of - bed stage are symmetric, the above - mentioned method for sleep detection by combining walking characteristics can improve the accuracy of detecting the time of getting in and out of bed.
[0249] The present application provides a sleep detection method. This method can determine a first time period based on the time when the user falls asleep, and obtain the first heart rate and first exercise data of the user during the first time period. It can determine a second time period based on the time when the user wakes up, and obtain the second heart rate and second exercise data of the user during the second time period. This method can determine the first activity level, first walking characteristics, and first getting - into - bed action characteristics based on the first exercise data, and determine the second activity level, second walking characteristics, and first getting - out - of - bed action characteristics based on the second exercise data. Then, this method can determine the time when the user gets into bed and the time when the user gets out of bed based on the first heart rate, second heart rate, first activity level, first walking characteristics, first getting - into - bed action characteristics, second activity level, second walking characteristics, and first getting - out - of - bed action characteristics.
[0250] The above first time period may include a period of time before the bedtime. The above second time period may include a period of time after the wake-up time. Optionally, the above first time period may further include a period of time after the bedtime. The above second time period may further include a period of time before the wake-up time.
[0251] In some embodiments, the durations of the first time period and the second time period may be the same.
[0252] In some embodiments, the mobile phone may determine a first bedtime based on a first heart rate and a first activity level, and determine a first wake-up time based on a second heart rate and a second activity level. The above first bedtime and first wake-up time may be determined according to a getting-into-bed and getting-out-of-bed recognition algorithm. The first bedtime may also be referred to as the suspected bedtime. The first wake-up time may also be referred to as the suspected wake-up time. The first bedtime may be the time when the first heart rate drops to a first heart rate threshold and the first activity level drops to a first activity level threshold. The first wake-up time may be the time when the second heart rate rises to a second heart rate threshold, and / or, the second activity level rises to a second activity level threshold. The first heart rate threshold may also be referred to as the heart rate threshold 1. The first activity level threshold may also be referred to as the activity level threshold 1. The second heart rate threshold may also be referred to as the heart rate threshold 2. The second activity level threshold may also be referred to as the activity level threshold 2.
[0253] The mobile phone may determine a second bedtime and a second wake-up time based on a first walking feature and a second walking feature. The above second bedtime and second wake-up time may be determined based on the principle that the walking features of the user during the getting-into-bed stage and the getting-out-of-bed stage are symmetric. The second bedtime and second wake-up time are determined according to the time when the symmetric features exist in the first walking feature and the second walking feature. The second bedtime may also be referred to as the time of getting into bed while walking. The second wake-up time may also be referred to as the time of getting out of bed while walking. The second bedtime may be the time when the last walking behavior occurs within the first time period. The second wake-up time may be the time when the first walking behavior occurs within the second time period.
[0254] The mobile phone may determine a third bedtime based on a first getting-into-bed action feature and determine a third wake-up time based on a first getting-out-of-bed action feature. The third bedtime may be determined based on a getting-into-bed action detection model. The third wake-up time may be determined based on a getting-out-of-bed action detection model. The third bedtime may be the time when the getting-into-bed action occurs. The third wake-up time may be the time when the getting-out-of-bed action occurs.
[0255] In some embodiments, when the time difference between any two of the first bedtime point, the second bedtime point, and the third bedtime point is less than a third difference value, the mobile phone may determine the average value of the first bedtime point, the second bedtime point, and the third bedtime point as the user's bedtime, or determine any time between the earliest time and the latest time among the first bedtime point, the second bedtime point, and the third bedtime point as the user's bedtime.
[0256] In some embodiments, when the time difference between any two of the first wake-up time point, the second wake-up time point, and the third wake-up time point is less than a fourth difference value, the mobile phone may determine the average value of the first wake-up time point, the second wake-up time point, and the third wake-up time point as the user's wake-up time, or determine any time between the earliest time and the latest time among the first wake-up time point, the second wake-up time point, and the third wake-up time point as the user's wake-up time.
[0257] In some embodiments, when the time difference between the second bedtime point and the third bedtime point is less than a third difference value, and the time difference between the first bedtime point and the second bedtime point is greater than the third difference value, the mobile phone may determine the user's bedtime according to the second bedtime point and the third bedtime point. For example, the mobile phone may determine the average value of the second bedtime point and the third bedtime point as the user's bedtime, or determine any time between the second bedtime point and the third bedtime point as the user's bedtime. That is to say, when the time difference between the first bedtime point and the second bedtime point is too large, the first bedtime point may not be used as an evaluation factor for the bedtime.
[0258] In some embodiments, when the time difference between the second wake-up time point and the third wake-up time point is less than a fourth difference value, and the time difference between the first wake-up time point and the second wake-up time point is greater than the fourth difference value, the mobile phone may determine the user's wake-up time according to the second wake-up time point and the third wake-up time point. For example, the mobile phone may determine the average value of the second wake-up time point and the third wake-up time point as the user's wake-up time, or determine any time between the second wake-up time point and the third wake-up time point as the user's wake-up time. That is to say, when the time difference between the first wake-up time point and the second wake-up time point is too large, the first wake-up time point may not be used as an evaluation factor for the wake-up time.
[0259] In some embodiments, when sleep data such as sleep and wake times and getting in and out of bed times are detected, the smartwatch and / or the mobile phone may display the sleep data. Here, the display of sleep data by the mobile phone is taken as an example for illustration.
[0260] Figure 6 An exemplary schematic diagram of a sleep detection result is shown.
[0261] As Figure 6As shown, the mobile phone can display a user interface 610. The user interface 610 may include a time option 611, a sleep duration 612, a bedtime 613, a wake-up time 614, a sleep onset time 615, and a sleep offset time 616.
[0262] The time option 611 can be used to select which time period of sleep data to view. For example, the time option 611 may include a "daily option", a "weekly option", a "monthly option", a "yearly option", and so on. The "daily option" can be used to select to view the sleep data of one day (e.g., yesterday). The "weekly option" can be used to select to view the sleep data of one week (e.g., the most recent week). The "monthly option" can be used to select to view the sleep data of one month (e.g., the most recent month). The "yearly option" can be used to select to view the sleep data of one year (e.g., the most recent year).
[0263] The sleep duration 612 can be used to indicate the user's sleep duration, that is, the duration from the sleep onset time to the sleep offset time.
[0264] The bedtime 613 can be used to indicate the user's bedtime.
[0265] The wake-up time 614 can be used to indicate the user's wake-up time.
[0266] The sleep onset time 615 can be used to indicate the user's sleep onset time.
[0267] The sleep offset time 616 can be used to indicate the user's sleep offset time.
[0268] In this way, the user can understand how much time it takes from going to bed to falling asleep and how much time it takes from waking up to getting out of bed based on the above sleep data, so as to adjust their sleep habits and improve their sleep quality. Moreover, the mobile phone can provide sleep suggestions for the user based on the duration from the bedtime to the sleep onset time and the time from the sleep offset time to the wake-up time every day. For example, when it is detected that the use of electronic devices such as mobile phones and / or tablets affects the user's sleep onset time, the sleep suggestions provided by the mobile phone may include, but are not limited to: reducing the duration of using mobile phones, tablets and other electronic devices after going to bed can help you fall asleep faster. For another example, when it is detected that the ambient light affects the user's sleep onset time, the sleep suggestions provided by the mobile phone may include, but are not limited to: turning off the lights as early as possible after going to bed can help you fall asleep faster. The above sleep suggestions are only exemplary descriptions of this application and should not constitute a limitation to this application.
[0269] Please refer to Figure 7 , Figure 7 which exemplarily shows a schematic diagram of the communication system 20 provided by this application.
[0270] The sleep detection method provided by this application can be applied to the communication system 20.
[0271] AsFigure 7 As shown, the communication system 20 may include a processing device, a storage device, and a data acquisition device.
[0272] The data acquisition device can be used to collect heart rate data, motion data (such as acceleration, angular velocity, etc.), ambient light brightness data, ambient sound volume data, and usage data of one or more electronic devices. The usage data of the one or more electronic devices may include the screen off time of the screens of the one or more electronic devices.
[0273] In some embodiments, the data acquisition device may include one or more sensors. For example, motion sensors such as an ambient light sensor, an acceleration sensor, and an angular velocity sensor. The data acquisition device may also include a heart rate detection device, an audio input device, etc. The components included in the data acquisition device may be all configured on one device, or may also be configured on multiple devices. The embodiments of the present application do not limit the form of existence of the data acquisition device. For example, the sensors, heart rate detection device, and audio input device included in the data acquisition device may all be components on a wearable device (such as a smart watch). Or, the sensors and heart rate detection device included in the data acquisition device may be components on a smart watch, and the audio input device may be a component on a mobile phone. Or, the heart rate detection device included in the data acquisition device may be an independent device, and the sensors and audio input device may be components on a smart watch.
[0274] In some embodiments, the data acquisition device may send the collected data to the processing device. The processing device may determine sleep data such as the user's falling asleep time, waking up time, going to bed time, getting out of bed time, etc. based on the data collected by the data acquisition device. The processing device may perform going to bed action detection, activity volume statistics, and walking feature detection based on the motion data. The processing device may also determine the aforementioned Figure 4 suspected falling asleep points 1 to 7 as shown. Then, the processing device may synthesize the suspected falling asleep points 1 to 7 to determine the falling asleep point. The processing device may also extract walking features and action features from the motion data, and determine the time of going up and down the bed, and the time when the going to bed action and getting out of bed action occur. The processing device may determine the suspected going to bed time and suspected getting out of bed time based on the heart rate and activity volume. Furthermore, the processing device may determine the user's going to bed time and getting out of bed time. The specific process of the processing device determining the sleep data may refer to the methods shown in the aforementioned Figure 4 and Figure 5 as shown. Details are not described herein again.
[0275] In some embodiments, the processing device may include a processor configured on one or more devices. Embodiments of the present application do not limit the form of existence of the processing device. For example, the processing device may include the processors of a smart watch and a mobile phone. Detecting the bedtime action, counting the activity amount, and detecting the walking characteristics based on the motion data may be executed by the processor of the mobile phone. Determining the above Figure 4 suspected sleep points 1-3, suspected sleep point 7, and the combined suspected sleep points 1 to the obtained sleep point shown may also be executed by the processor of the mobile phone. Determining the above Figure 4 suspected sleep points 4 to suspected sleep point 6 shown may be executed by the processor of the smart watch. Alternatively, the processing device may also be an independent device. For example, the processor may be the processor of the mobile phone. The above steps of determining the user's sleep data based on the data collected by the data collection device may all be executed by the processor of the mobile phone.
[0276] In some embodiments, the data collection device may send the collected data to the storage device. Then, the processor device may obtain the data collected by the data collection device from the storage device. The processing device may also send the detected sleep data of the user to the storage device. The storage device may store the data collected by the data collection device, the sleep data detected by the processing device, etc.
[0277] The storage device may also store a computer program for enabling the processing device to detect sleep data. The processing device may obtain the above computer program from the storage device and then execute the computer program to perform sleep data detection.
[0278] In some embodiments, the storage device may include a memory configured on one or more devices. Embodiments of the present application do not limit the form of existence of the storage device. For example, the storage device may include the memories of a smart watch and a mobile phone. Alternatively, the storage device may also include only the memory of the smart watch, or only the memory of the mobile phone.
[0279] In some embodiments, the communication system 20 may further include more devices. For example, the communication system 20 may further include a display device. The display device may include a display screen on one or more devices. The display device may be used to display the sleep data detected by the above processing device, such as the sleep time, wake-up time, bedtime, wake-up time, and so on.
[0280] It can be understood that the user interface described in the embodiments of the present application is only an example interface and does not limit the solution of the present application. In other embodiments, the user interface may adopt different interface layouts, may include more or fewer controls, and may add or reduce other function options. As long as it is based on the same inventive concept provided by the present application, it is within the protection scope of the present application.
[0281] It should be noted that, without conflict or contradiction, any feature in any embodiment of the present application, or any part of any feature, can be combined, and the combined technical solution is also within the scope of the embodiments of the present application.
[0282] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A sleep detection method, characterized in that, The method includes: Obtaining the user's heart rate and exercise data, where the exercise data includes acceleration and / or angular velocity; Obtaining the ambient light brightness, ambient sound volume, and usage data of one or more electronic devices, where the usage data of the one or more electronic devices includes the screen off time of the screens of the one or more electronic devices; Determining the activity level, walking characteristics, and bed - getting action characteristics based on the exercise data; Determining the user's bedtime based on the heart rate, the activity level, the walking characteristics, the bed - getting action characteristics, the ambient light brightness, the ambient sound volume, and the usage data of the one or more electronic devices.
2. The method according to claim 1, characterized in that The determining the user's bedtime based on the heart rate, the activity level, the walking characteristics, the bed - getting action characteristics, the ambient light brightness, the ambient sound volume, and the usage data of the one or more electronic devices specifically includes: Determining a first bedtime point according to the bed - getting action characteristics, a second bedtime point according to the activity level, a third bedtime point according to the walking characteristics, a fourth bedtime point according to the heart rate, a fifth bedtime point according to the ambient light brightness, a sixth bedtime point according to the ambient sound volume, and a seventh bedtime point according to the usage data of the one or more electronic devices; Determining the user's bedtime based on the first bedtime point, the second bedtime point, the third bedtime point, the fourth bedtime point, the fifth bedtime point, the sixth bedtime point, and the seventh bedtime point.
3. The method according to claim 2, wherein The first bedtime point is the time when the bed - getting action occurs, the second bedtime point is the time when the activity level is less than the activity threshold, the third bedtime point is the time when the user changes from a walking state to a non - walking state, the fifth bedtime point is the time when the ambient light brightness is less than the brightness threshold, the sixth bedtime point is the time when the ambient sound volume is less than the volume threshold, and the seventh bedtime point is the time when the one or more electronic devices turn off their screens.
4. The method according to claim 2 or 3, characterized in that, The determining the user's bedtime based on the first bedtime point, the second bedtime point, the third bedtime point, the fourth bedtime point, the fifth bedtime point, the sixth bedtime point, and the seventh bedtime point specifically includes: Determining a first time according to the second bedtime point and the fourth bedtime point; When the first bedtime point, the third bedtime point, the fifth bedtime point, the sixth bedtime point, and the seventh bedtime point are all earlier than the first time, determining the first time as the user's bedtime.
5. The method according to claim 4, wherein The first time is any time between the second bedtime point and the fourth bedtime point, or the average value of the second bedtime point and the fourth bedtime point.
6. The method according to claim 4 or 5, characterized in that, The method further includes: When the fifth bedtime point and the sixth bedtime point are both earlier than the seventh bedtime point, and the seventh bedtime point is later than the first time, determining a second time according to the seventh bedtime point and determining the second time as the user's bedtime, where the second time is later than the seventh bedtime point.
7. The method according to any one of claims 4-6, characterized in that The method further includes: When both the sixth sleep onset point and the seventh sleep onset point are earlier than the fifth sleep onset point, the fifth sleep onset point is later than the first time, and the time difference between the fifth sleep onset point and the first time is less than or equal to the first difference, determine a third time according to the fifth sleep onset point, and determine the third time as the user's sleep onset time, where the third time is later than the fifth sleep onset point.
8. The method according to any one of claims 4 to 7, characterized in that The method further includes: When both the fifth sleep onset point and the seventh sleep onset point are earlier than the sixth sleep onset point, the sixth sleep onset point is later than the first time, and the time difference between the sixth sleep onset point and the first time is less than or equal to the second difference, determine a fourth time according to the sixth sleep onset point, and determine the fourth time as the user's sleep onset time, where the fourth time is later than the sixth sleep onset point.
9. The method according to any one of claims 4-8, characterized in that, The method further includes: When the sixth sleep onset point is later than the first time, the time difference between the sixth sleep onset point and the first time is greater than the second difference, and both the fifth sleep onset point and the seventh sleep onset point are earlier than the first time, determine a fifth time according to the first time, and determine the fifth time as the user's sleep onset time, where the fifth time is later than the first time.
10. The method according to any one of claims 4-9, characterized in that, The method further includes: When the sixth sleep onset point and the seventh sleep onset point are later than the first time, the time difference between the sixth sleep onset point and the first time is greater than the second difference, and the fifth sleep onset point is earlier than the first time, determine a sixth time according to the seventh sleep onset point, and determine the sixth time as the user's sleep onset time, where the sixth time is later than the seventh sleep onset point.
11. The method according to any one of claims 4-10, characterized in that, The method further includes: When the fifth sleep onset point and the sixth sleep onset point are later than the first time, the time difference between the fifth sleep onset point and the first time is less than or equal to the first difference, the time difference between the sixth sleep onset point and the first time is greater than the second difference, and the seventh sleep onset point is earlier than the first time, determine a seventh time according to the fifth sleep onset point, and determine the seventh time as the user's sleep onset time, where the seventh time is later than the fifth sleep onset point.
12. The method according to any one of claims 4-11, characterized in that, The method further includes: When the fifth sleep onset point and the sixth sleep onset point are later than the first time, the time difference between the fifth sleep onset point and the first time is greater than the first difference, the time difference between the sixth sleep onset point and the first time is greater than the second difference, and the seventh sleep onset point is earlier than the first time, determine an eighth time according to the first time, and determine the eighth time as the user's sleep onset time, where the eighth time is later than the first time.
13. The method according to any one of claims 1 to 12, characterized in that, The method further includes: Determine a first time period according to the user's sleep onset time, and obtain the first heart rate and first exercise data of the user during the first time period; Determine a second time period according to the user's wake-up time, and obtain the second heart rate and second exercise data of the user during the second time period; Determine the first activity amount, the first walking feature, and the first bed - getting action feature based on the first motion data, and determine the second activity amount, the second walking feature, and the first bed - leaving action feature based on the second motion data; Determine the user's bed - getting time and bed - leaving time based on the first heart rate, the second heart rate, the first activity amount, the first walking feature, the first bed - getting action feature, the second activity amount, the second walking feature, and the first bed - leaving action feature.
14. The method according to claim 13, wherein The determining the user's bed - getting time and bed - leaving time based on the first heart rate, the second heart rate, the first activity amount, the first walking feature, the first bed - getting action feature, the second activity amount, the second walking feature, and the first bed - leaving action feature specifically includes: Determine the first bed - getting point based on the first heart rate and the first activity amount; Determine the first bed - leaving point based on the second heart rate and the second activity amount; Determine the second bed - getting point and the second bed - leaving point based on the first walking feature and the second walking feature; Determine the third bed - getting point based on the first bed - getting action feature; Determine the third bed - leaving point based on the first bed - leaving action feature; Determine the user's bed - getting time based on the first bed - getting point, the second bed - getting point, and the third bed - getting point; Determine the user's bed - leaving time based on the first bed - leaving point, the second bed - leaving point, and the third bed - leaving point.
15. The method according to claim 14, wherein The first bed - getting point is the time when the first heart rate drops to the first heart rate threshold and the first activity amount drops to the first activity amount threshold. The first bed - leaving point is the time when the second heart rate rises to the second heart rate threshold and / or the second activity amount rises to the second activity amount threshold; The second bed - getting point is the time when the last walking behavior occurs within the first time period, and the second bed - leaving point is the time when the first walking behavior occurs within the second time period. The third bed - getting point is the time when the bed - getting action occurs, and the third bed - leaving point is the time when the bed - leaving action occurs.
16. The method according to claim 14 or 15, characterized in that The determining the user's bed - getting time based on the first bed - getting point, the second bed - getting point, and the third bed - getting point; The determining the user's bed - leaving time based on the first bed - leaving point, the second bed - leaving point, and the third bed - leaving point specifically includes: When the time difference between any two of the first bed - getting point, the second bed - getting point, and the third bed - getting point is less than the third difference, determine the average value of the first bed - getting point, the second bed - getting point, and the third bed - getting point as the user's bed - getting time, or determine any time between the earliest time and the latest time among the first bed - getting point, the second bed - getting point, and the third bed - getting point as the user's bed - getting time; When the time difference between any two of the first getting-out-of-bed point, the second getting-out-of-bed point, and the third getting-out-of-bed point is less than a fourth difference value, the average value of the first getting-out-of-bed point, the second getting-out-of-bed point, and the third getting-out-of-bed point is determined as the getting-out-of-bed time of the user, or any time between the earliest time and the latest time among the first getting-out-of-bed point, the second getting-out-of-bed point, and the third getting-out-of-bed point is determined as the getting-out-of-bed time of the user.
17. The method according to any one of claims 14-16, characterized in that, Determining the going-to-bed time of the user according to the first going-to-bed point, the second going-to-bed point, and the third going-to-bed point; Determining the getting-out-of-bed time of the user according to the first getting-out-of-bed point, the second getting-out-of-bed point, and the third getting-out-of-bed point specifically includes: When the time difference between the second going-to-bed point and the third going-to-bed point is less than a third difference value, and the time difference between the first going-to-bed point and the second going-to-bed point is greater than or equal to the third difference value, the average value of the second going-to-bed point and the third going-to-bed point is determined as the going-to-bed time of the user, or any time between the second going-to-bed point and the third going-to-bed point is determined as the going-to-bed time of the user; When the time difference between the second getting-out-of-bed point and the third getting-out-of-bed point is less than a fourth difference value, and the time difference between the first getting-out-of-bed point and the second getting-out-of-bed point is greater than or equal to the fourth difference value, the average value of the second getting-out-of-bed point and the third getting-out-of-bed point is determined as the getting-out-of-bed time of the user, or any time between the second getting-out-of-bed point and the third getting-out-of-bed point is determined as the getting-out-of-bed time of the user.
18. The method according to any one of claims 13-17, characterized in that The first time period includes the time period before the user's falling asleep time, and the second time period includes the time period after the user's waking up time.
19. The method according to any one of claims 13-18, characterized in that The method further includes: Displaying the user's falling asleep time, waking up time, going-to-bed time, and getting-out-of-bed time.
20. The method according to any one of claims 1-19, characterized in that, The heart rate and movement data of the user are acquired by a wearable device, and the wearable device includes one or more of the following: smart watch, smart bracelet.
21. The method according to any one of claims 1-20, characterized in that, The one or more electronic devices include one or more of the following: mobile phone, tablet computer, television, laptop computer.
22. An electronic device, characterized in that, The electronic device includes a memory and a processor. Among them, the memory is used to store a computer program; the processor is used to call the computer program so that the electronic device executes the method according to any one of claims 1-21.
23. A computer-readable storage medium stores instructions, characterized in that, When the instruction runs on the electronic device, the electronic device executes the method according to any one of claims 1-21.
24. A computer program product, characterized in that, The computer program product contains computer instructions. When the computer instructions run on the electronic device, the electronic device executes the method according to any one of claims 1-21.
Citation Information
Cited By
Sleep detection method, related apparatus, and communication system
WO2025152907A1