A sleep quality detection method, device, equipment and storage medium
Patent Information
- Application Number
- CN202610950977.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-29
- Publication Date
- 2026-09-25
AI Technical Summary
然而,在家用场景中,心率、脑电等生理信号需要特定设备进行检测,用户佩戴这些设备时的舒适度及设备成本限制了多模态信号的应用
[0019]本发明公开的睡眠质量检测方法,首先采集被检测者的体动数据,然后对体动数据进行分析,根据预设规则输出相应的检测结果。本发明公开的睡眠质量检测方法,利用体动数据作为单一输入源,可以降低设备成本,提升用户体验,根据预设规则进行判断,可以提升异常识别的准确率和并适应多种场景。
Smart Images

Figure CN122805200A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of sleep monitoring technology, and in particular to a method, apparatus, device, and storage medium for sleep quality detection. Background Technology
[0002] Sleep quality monitoring is a method to assess sleep health by tracking data such as sleep onset time, sleep stages, and the number of awakenings during the night. Its core goal is to identify sleep problems and optimize sleep habits. Common methods include smart device monitoring, sleep diary recording, and professional medical testing.
[0003] In current technologies, most sleep monitoring devices rely on physiological signals such as heart rate and electroencephalogram (EEG) to determine sleep status. However, in home settings, these physiological signals require specific devices for detection, and the comfort and cost of these devices limit the application of multimodal signals. Summary of the Invention
[0004] This invention provides a method, apparatus, device, and storage medium for detecting sleep quality, enabling the detection of sleep quality through body movement data.
[0005] According to one aspect of the present invention, a method for detecting sleep quality is provided, comprising: Collect body movement data from the subjects being tested; The body motion data is analyzed, and corresponding detection results are output according to preset rules.
[0006] Further, the body motion data is analyzed, including: The sleep onset point, sleep expiration point, and bedtime interval are determined based on the body movement data, and the time interval between the sleep onset point and the sleep expiration point is taken as the main sleep interval. Based on the body movement data, determine the awake segments of the subject within the main sleep zone and the intensity of body movement at each sampling point; The duration of each moment of consciousness corresponding to each segment of consciousness is determined, and the total duration of consciousness is obtained by summing the durations of each moment of consciousness.
[0007] Furthermore, based on preset rules, the corresponding detection results are output, including: Determine the percentage of the number of first target sampling points within the main sleep interval; wherein, the body movement intensity corresponding to the first target sampling point is zero; If the total duration of wakefulness exceeds a first duration threshold, and at least one wakefulness segment has a single wakefulness duration exceeding a second duration threshold, and the proportion of the number of the first target sampling points is less than a first proportion threshold, then an abnormal prompt message is output as the detection result.
[0008] Furthermore, based on preset rules, the corresponding detection results are output, including: Extract the first time window before and after each of the said awake segments, and determine the proportion of the number of second target sampling points within the first time window; wherein, the body movement intensity corresponding to the second target sampling point is greater than the first intensity threshold; If the total awake time is greater than the first duration threshold, and the proportion of the number of the second target sampling points is greater than the second proportion threshold, then an abnormal prompt message is output as the detection result.
[0009] Furthermore, based on preset rules, the corresponding detection results are output, including: Extract the target awake segment within the main sleep interval; wherein the duration of a single awake segment corresponding to the target awake segment is greater than a third duration threshold. Two sampling points with body movement intensity less than the second intensity threshold are extracted before and after the target awake segment. If the duration of body movement intensity greater than zero between the two sampling points is greater than the fourth duration threshold, and the total awake duration is greater than the first duration threshold, then an abnormal prompt message is output as the detection result.
[0010] Furthermore, based on preset rules, the corresponding detection results are output, including: Extract the pre-sleep interval before the sleep point within the bed interval, and determine the proportion of the number of third target sampling points within the pre-sleep interval; wherein, the body movement intensity corresponding to the third target sampling point is greater than the third intensity threshold; If the proportion of the number of the third target sampling points is greater than the third proportion threshold, an abnormal prompt message will be output as the detection result.
[0011] Furthermore, based on preset rules, the corresponding detection results are output, including: Extract the pre-sleep interval before the sleep point within the bed interval, and determine the proportion of the number of first target sampling points within the pre-sleep interval; wherein, the body movement intensity corresponding to the first target sampling point is zero; If the duration ratio of the pre-sleep interval to the main sleep interval is greater than the fourth ratio threshold, and the number ratio of the first target sampling points is less than the fifth ratio threshold, then an abnormal prompt message is output as the detection result.
[0012] Furthermore, based on preset rules, the corresponding detection results are output, including: Extract the post-wake interval after the point of falling asleep within the bed interval, and determine the proportion of the fourth target sampling points within the post-wake interval; the body movement intensity corresponding to the fourth target sampling point is greater than the fourth intensity threshold; Determine the proportion of the fifth target sampling points within the bed interval; the body motion intensity corresponding to the fifth target sampling point is greater than the fifth intensity threshold. If the proportion of the fourth target sampling points is greater than the sixth proportion threshold, and the proportion of the fifth target sampling points is greater than the seventh proportion threshold, then an abnormal prompt message is output as the detection result.
[0013] Furthermore, based on preset rules, the corresponding detection results are output, including: Extract the second time window before the point of falling asleep within the bed interval, and determine the proportion of the number of sixth target sampling points within the second time window; wherein, the body movement intensity corresponding to the sixth target sampling point is greater than the sixth intensity threshold; If the proportion of the sixth target sampling points is greater than the eighth proportion threshold, an abnormal prompt message will be output as the detection result.
[0014] Furthermore, based on preset rules, the corresponding detection results are output, including: Extract the third time window after the sleep exit point within the bed interval, and determine the proportion of the number of seventh target sampling points within the third time window; wherein, the body movement intensity corresponding to the seventh target sampling point is greater than the seventh intensity threshold; If the proportion of the seventh target sampling points is greater than the ninth proportion threshold, an abnormal prompt message will be output as the detection result.
[0015] According to another aspect of the present invention, a sleep quality detection device is provided, comprising: a body movement data acquisition module and a detection result output module; The body movement data acquisition module is used to collect the body movement data of the subject being tested; The detection result output module is used to analyze the body motion data and output the corresponding detection results according to preset rules.
[0016] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the sleep quality detection method according to any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the sleep quality detection method according to any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program / instructions, which, when executed by a processor, implement the steps of the sleep quality detection method according to any embodiment of the present invention.
[0019] The sleep quality detection method disclosed in this invention first collects the body movement data of the subject, then analyzes the body movement data, and outputs corresponding detection results according to preset rules. This sleep quality detection method utilizes body movement data as a single input source, which can reduce equipment costs and improve user experience. Judging based on preset rules can improve the accuracy of anomaly detection and adapt to various scenarios.
[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a flowchart of a sleep quality detection method according to Embodiment 1 of the present invention; Figure 2 This is a flowchart of a sleep quality detection method according to Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of a sleep quality detection device according to Embodiment 3 of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device that implements the sleep quality detection method of Embodiment 4 of the present invention. Detailed Implementation
[0023] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0025] Example 1 Figure 1 This is a flowchart of a sleep quality detection method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where the sleep quality of a subject is detected through body movement data. The method can be executed by a sleep quality detection device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes: S110. Collect the body movement data of the subject being tested.
[0026] In this context, the tested individual is the user currently using the sleep quality detection method provided in this embodiment; body movement data refers to quantifiable data generated during physical activity (or physical exertion), used to reflect an individual's physiological responses and behavioral performance during exercise, daily activities, or training. Furthermore, body movement data that can be collected during sleep can be body activity or limb movement recorded by sensors (such as piezoelectric sensors, accelerometers, gyroscopes, etc.) during sleep, primarily used to indirectly infer sleep-wake states, such as determining whether the individual is awake, in light sleep, in deep sleep, or in the rapid eye movement (REM) stage.
[0027] In this embodiment, to test the sleep quality of the subject, body movement data can be collected by a sensor device placed on the mattress or worn on the subject.
[0028] S120. Analyze the body motion data and output the corresponding detection results according to the preset rules.
[0029] The preset rules are pre-defined rules for judging sleep quality based on the collected body movement data; the test results are the judgment results of the sleep quality of the tested person, such as sleep quality being excellent / good / poor, or a sleep test report containing abnormal prompts.
[0030] In this embodiment, the method for analyzing body movement data and outputting corresponding detection results according to preset rules can be as follows: analyze the intensity of body movement at each sampling point in the entire main sleep interval and the bed-in interval, and determine whether there is abnormal body movement data according to preset rules; or determine the awake segments in the main sleep interval (i.e., the time period between the subject waking up and falling asleep again) based on body movement data, and determine the number and duration of awake segments, as well as whether there are abnormalities in the body movement data within the awake segments, according to preset rules.
[0031] The sleep quality detection method disclosed in this invention first collects the subject's body movement data, then determines the sleep onset point, sleep exit point, and bedtime interval based on the body movement data, and uses the time interval between the sleep onset point and sleep exit point as the main sleep interval. Finally, the body movement data is analyzed, and corresponding detection results are output according to preset rules. This sleep quality detection method utilizes body movement data as a single input source, which can reduce equipment costs and improve user experience. The judgment based on preset rules can improve the accuracy of anomaly detection and adapt to various scenarios.
[0032] Example 2 Figure 2 This is a flowchart of a sleep quality detection method provided in Embodiment 2 of the present invention. This embodiment is a refinement of the above embodiment, such as... Figure 2 As shown, the method includes: S210. Collect the body movement data of the subject being tested.
[0033] In this context, the tested individuals are users currently using the sleep quality detection method provided in this embodiment; body movement data refers to quantifiable data generated during physical activity (or physical exertion), used to reflect an individual's physiological responses and behavioral performance during exercise, daily activities, or training. Furthermore, body movement data that can be collected during sleep can be body activity or limb movements recorded by sensors (such as accelerometers, gyroscopes, etc.) during sleep, primarily used to indirectly infer sleep-wake states, such as determining whether one is awake, in light sleep, in deep sleep, or in the rapid eye movement (REM) stage.
[0034] In this embodiment, to test the sleep quality of the subject, body movement data can be collected by a sensor device placed on the mattress or worn on the subject.
[0035] S220. Determine the sleep onset point, sleep end point, and bedtime interval based on body movement data, and use the time interval between the sleep onset point and sleep end point as the main sleep interval.
[0036] The sleep onset point is the moment when the subject transitions from a waking state to a sleeping state; the sleep expiration point is the moment when the subject transitions from a sleeping state to a waking state; and the bedtime interval is the total time the subject spends in bed, including both waking and sleeping states. The time between the sleep onset point and the sleep expiration point is the primary sleep interval.
[0037] In this embodiment, the determination of the sleep onset point, sleep expiration point, and bedtime based on body movement data mainly relies on algorithmic analysis of the frequency, amplitude, and duration of body movement. Generally, when the subject is awake, limb movements are frequent and large in amplitude; in a light sleep state, there are still slight, irregular limb movements; in a deep sleep state, the limbs are almost completely still and the muscles are relaxed. Furthermore, the sleep onset point can be defined as the transition from wakefulness to sustained stillness (e.g., 5–15 minutes without significant activity); the sleep expiration point can be defined as the moment when significant activity (such as turning over or raising an arm) suddenly appears from a sustained stillness and continues for a period of time; the bedtime period can be defined as the total time from getting into bed to getting out of bed, which can be manually set by the user or automatically identified by sensors or other devices through changes in ambient light, posture, or pressure on the bed.
[0038] Optionally, the specific methods for determining the sleep entry point, sleep exit point, and bed zone can be: Sleep onset point determination: When a subject's limb activity is significantly reduced (below a preset threshold) for 5–15 minutes, it can be determined that the subject has fallen asleep. For example, if there are frequent wrist-rolling movements in the first 10 minutes, followed by almost no movement in the next 15 minutes, then the end of the 15-minute mark is considered the sleep onset point.
[0039] Sleep point determination: When the device detects moderate to high activity (such as frequent turning over, sitting up, walking) for 5–10 minutes, it is determined to be awake or getting up.
[0040] In some other implementations, in addition to body movement, heart rate can be used as an auxiliary criterion. A stable heart rate can be used as an auxiliary criterion for falling asleep; an increased heart rate can be used as an auxiliary criterion for waking up or getting out of bed.
[0041] Bedtime identification: It can determine "getting into bed" and "getting up" based on information manually marked by the subject; it can also automatically infer the time spent in bed through ambient light sensors (lights off → lights on) or changes in posture (lying down → sitting up / standing); it can also automatically infer the time spent in bed through changes in pressure on the bed by setting pressure sensors on the bed.
[0042] S230. Based on the body movement data, determine the awake segments of the subject within the main sleep zone and the intensity of body movement at each sampling point, and determine the single awake duration corresponding to each awake segment and the total awake duration obtained by summing the single awake durations.
[0043] Among them, the waking segment of the subject within the main sleep interval is the time period during which the subject is awake within the main sleep interval; the body movement intensity at each sampling point is the specific data collected by the device that collects body movement data at each data sampling point.
[0044] In this embodiment, the awake segments of the subject within the main sleep range can be identified based on the collected body movement data. For example, if the sensor detects large limb movements (such as turning over, sitting up, or getting out of bed) within a short period of time, this time interval can be marked as an awake segment.
[0045] Furthermore, after identifying the lucid segments, the duration of each lucid moment can be determined based on the length of the time interval corresponding to each lucid moment, and the total duration of each lucid moment can be obtained by summing up the durations of each lucid moment.
[0046] Optionally, the method for determining the awake segments of the subject within the main sleep interval can be as follows: First, a threshold for body movement intensity is set; exceeding this threshold is considered awake. For example, an acceleration change exceeding a preset value per unit time. Then, within the main sleep interval, all consecutive time windows where activity exceeds this threshold can be found; each window represents a awake segment.
[0047] S240. Output the corresponding detection results according to the preset rules.
[0048] Among them, the preset rules are pre-set judgment rules for judging sleep quality based on the collected body movement data.
[0049] In this embodiment, by analyzing body movement data and combining it with preset rules, if the data features meet at least one preset rule for determining the existence of abnormal body movement behavior, a detection report is generated, and the abnormal information is indicated in the report as the detection result.
[0050] Optionally, the method for outputting the corresponding detection results according to the preset rules may be: determining the proportion of the number of first target sampling points in the main sleep interval; wherein, the body movement intensity corresponding to the first target sampling point is zero; if the total awake time is greater than the first duration threshold, and there is at least one awake segment whose single awake time is greater than the second duration threshold, and the proportion of the number of first target sampling points is less than the first proportion threshold, then an abnormal prompt message is output as the detection result.
[0051] For example, if the first duration threshold is 30 minutes, the second duration threshold is 10 minutes, and the first proportion threshold is 50%, then the preset rule could be: if the total awake time is greater than 30 minutes, and there is at least one awake segment with a single awake time greater than 10 minutes, and the proportion of sampling points with zero body movement intensity in the main sleep interval is less than 50%, then an abnormal prompt message is output as the detection result.
[0052] Optionally, the method for outputting the corresponding detection results according to preset rules can also be: extracting the first time window before and after each awake segment, and determining the proportion of the number of second target sampling points within the first time window; wherein, the body movement intensity corresponding to the second target sampling point is greater than the first intensity threshold; if the total awake duration is greater than the first duration threshold, and the proportion of the number of second target sampling points is greater than the second proportion threshold, then an abnormal prompt message is output as the detection result.
[0053] For example, the first time window can be the time window corresponding to a preset number of sampling points before and after the conscious segment, such as a time window corresponding to 40 sampling points before and after the conscious segment. The first intensity threshold can be 3, and the second proportion threshold can be 28%. Then the preset rule can be: if the total conscious duration is greater than 30 minutes, and the proportion of sampling points with a body movement intensity greater than 3 within the 40 sampling points before and after the conscious segment is greater than 28%, then an abnormal prompt message is output as the detection result. The body movement intensity can be determined based on the frequency of body movements within 1 minute. For example, body movement is detected every 10 seconds within 1 minute. If body movement is detected, the body movement intensity data is incremented by 1. A body movement intensity of 3 means that 3 body movements were detected within 1 minute.
[0054] Optionally, the method for outputting the corresponding detection results according to the preset rules can also be: extracting the target awake segment within the main sleep interval; wherein the duration of a single awake segment corresponding to the target awake segment is greater than the third duration threshold; extracting two sampling points before and after the target awake segment where the body movement intensity is less than the second intensity threshold respectively; if the duration of the body movement intensity greater than zero between the two sampling points is greater than the fourth duration threshold, and the total awake duration is greater than the first duration threshold, then outputting an abnormal prompt message as the detection result.
[0055] For example, if the third duration threshold is 20 minutes, the second intensity threshold is 4, and the fourth duration threshold is 20 minutes, then the preset rule could be: if the total awake time is greater than 30 minutes, and the duration of body movement intensity greater than 0 between two sampling points with body movement intensity less than 4 before and after a single awake segment with awake time greater than 20 minutes in the main sleep interval is greater than 20 minutes, then an abnormal prompt message is output as the detection result.
[0056] Optionally, the method for outputting the corresponding detection results according to preset rules can also be: extracting the pre-sleep interval before the sleep point in the bed interval, and determining the proportion of the number of third target sampling points in the pre-sleep interval; wherein, the body movement intensity corresponding to the third target sampling point is greater than the third intensity threshold; if the proportion of the number of third target sampling points is greater than the third proportion threshold, then an abnormal prompt message is output as the detection result.
[0057] For example, if the third intensity threshold is 3 and the third proportion threshold is 80%, the preset rule could be: if the proportion of sampling points with a body movement intensity greater than 3 in the pre-sleep interval before the bedtime point is greater than 80%, then an abnormal prompt message would be output as the detection result.
[0058] Optionally, the method for outputting the corresponding detection results according to the preset rules can also be: extracting the pre-sleep interval before the sleep point in the bed interval, and determining the proportion of the number of the first target sampling points in the pre-sleep interval; wherein, the body movement intensity corresponding to the first target sampling point is zero; if the duration ratio of the pre-sleep interval to the main sleep interval is greater than the fourth proportion threshold, and the proportion of the number of the first target sampling points is less than the fifth proportion threshold, then an abnormal prompt message is output as the detection result.
[0059] For example, if the fourth proportion threshold is 40% and the fifth proportion threshold is 30%, the preset rule could be: if the duration of the pre-sleep interval and the main sleep interval is greater than 40%, and the number of sampling points with zero body movement intensity in the pre-sleep interval before the bed entry point is less than 30%, then an abnormal prompt message is output as the detection result.
[0060] Optionally, the method for outputting the corresponding detection results according to preset rules can also be as follows: extract the post-wake interval after the sleep point in the bed interval, determine the proportion of the fourth target sampling points in the post-wake interval; the body movement intensity corresponding to the fourth target sampling point is greater than the fourth intensity threshold; determine the proportion of the fifth target sampling point in the bed interval; the body movement intensity corresponding to the fifth target sampling point is greater than the fifth intensity threshold; if the proportion of the fourth target sampling point is greater than the sixth proportion threshold and the proportion of the fifth target sampling point is greater than the seventh proportion threshold, then output an abnormal prompt message as the detection result.
[0061] For example, if the fourth intensity threshold is 4, the fifth intensity threshold is 5, the sixth proportion threshold is 40%, and the seventh proportion threshold is 50%, then the preset rule could be: if the proportion of sampling points with a body movement intensity greater than 4 in the wake-up interval after leaving the bed is greater than 40%, and the proportion of sampling points with a body movement intensity greater than 5 in the bed interval is greater than 50%, then an abnormal prompt message is output as the detection result.
[0062] Optionally, the method for outputting the corresponding detection results according to preset rules can also be: extracting the second time window before the point of falling asleep in the bed interval, and determining the proportion of the number of sixth target sampling points in the second time window; wherein, the body movement intensity corresponding to the sixth target sampling point is greater than the sixth intensity threshold; if the proportion of the number of sixth target sampling points is greater than the eighth proportion threshold, then an abnormal prompt message is output as the detection result.
[0063] For example, if the second time window is one hour, the sixth intensity threshold is 4, and the eighth proportion threshold is 40%, then the preset rule could be: if the proportion of sampling points with a body movement intensity greater than 4 is greater than 40% within one hour before the bedtime in the bed area, then an abnormal prompt message is output as the detection result.
[0064] Optionally, the method for outputting the corresponding detection results according to the preset rules can also be: extracting the third time window after the sleep point in the bed interval, and determining the proportion of the number of the seventh target sampling points in the third time window; wherein, the body movement intensity corresponding to the seventh target sampling point is greater than the seventh intensity threshold; if the proportion of the number of the seventh target sampling points is greater than the ninth proportion threshold, then an abnormal prompt message is output as the detection result.
[0065] For example, if the third time window is one hour, the seventh intensity threshold is 4, and the ninth proportion threshold is 40%, then the preset rule could be: if within one hour after the bed exit point, the proportion of sampling points with a body movement intensity greater than 4 is greater than 40%, then an abnormal prompt message is output as the detection result.
[0066] Furthermore, if no abnormal data movement rules are triggered, a complete sleep report without any abnormality prompts can be output by default.
[0067] The sleep quality detection method disclosed in this invention utilizes body movement data as a single input source, which can reduce equipment costs and improve user experience. By making judgments based on preset rules, it can improve the accuracy of anomaly detection and adapt to various scenarios. Furthermore, this method can be widely applied to sleep monitoring products such as smart wearable devices and mattress sensors, demonstrating good industrial applicability.
[0068] Example 3 Figure 3 This is a schematic diagram of a sleep quality detection device provided in Embodiment 3 of the present invention, as shown below. Figure 3 As shown, the device includes: a motion data acquisition module 310 and a detection result output module 320.
[0069] The body movement data acquisition module 310 is used to collect the body movement data of the subject being tested.
[0070] The detection result output module 320 is used to analyze the body motion data and output the corresponding detection results according to preset rules.
[0071] Optionally, the detection result output module 320 is also used to: determine the sleep onset point, sleep end point, and bedtime interval based on the body movement data, and take the time interval between the sleep onset point and sleep end point as the main sleep interval; determine the awake segments of the subject within the main sleep interval and the intensity of body movement at each sampling point based on the body movement data; determine the single awake duration corresponding to each awake segment and the total awake duration obtained by summing the single awake durations.
[0072] Optionally, the detection result output module 320 is further used to: determine the proportion of the number of first target sampling points within the main sleep interval; wherein the body movement intensity corresponding to the first target sampling point is zero; if the total awake time is greater than the first duration threshold, and there is at least one awake segment whose single awake time is greater than the second duration threshold, and the proportion of the number of first target sampling points is less than the first proportion threshold, then an abnormal prompt message is output as the detection result.
[0073] Optionally, the detection result output module 320 is also used to: extract the first time window before and after each awake segment, and determine the proportion of the number of second target sampling points within the first time window; wherein the body movement intensity corresponding to the second target sampling point is greater than the first intensity threshold; if the total awake duration is greater than the first duration threshold and the proportion of the number of second target sampling points is greater than the second proportion threshold, then an abnormal prompt message is output as the detection result.
[0074] Optionally, the detection result output module 320 is also used to: extract the target awake segment within the main sleep interval; wherein the duration of a single awake segment corresponding to the target awake segment is greater than the third duration threshold; extract two sampling points before and after the target awake segment where the body movement intensity is less than the second intensity threshold respectively; if the duration of the body movement intensity greater than zero between the two sampling points is greater than the fourth duration threshold, and the total awake duration is greater than the first duration threshold, then output an abnormal prompt message as the detection result.
[0075] Optionally, the detection result output module 320 is also used to: extract the pre-sleep interval before the sleep point in the bed interval, and determine the proportion of the number of third target sampling points in the pre-sleep interval; wherein the body movement intensity corresponding to the third target sampling point is greater than the third intensity threshold; if the proportion of the number of third target sampling points is greater than the third proportion threshold, then an abnormal prompt message is output as the detection result.
[0076] Optionally, the detection result output module 320 is also used to: extract the pre-sleep interval before the sleep point in the bed interval, and determine the proportion of the number of the first target sampling points in the pre-sleep interval; wherein, the body movement intensity corresponding to the first target sampling point is zero; if the duration ratio of the pre-sleep interval to the main sleep interval is greater than the fourth proportion threshold, and the proportion of the number of the first target sampling points is less than the fifth proportion threshold, then an abnormal prompt message is output as the detection result.
[0077] Optionally, the detection result output module 320 is also used to: extract the post-wake interval after the sleep point in the bed interval, determine the proportion of the fourth target sampling points in the post-wake interval; the body movement intensity corresponding to the fourth target sampling point is greater than the fourth intensity threshold; determine the proportion of the fifth target sampling point in the bed interval; the intensity corresponding to the fifth target sampling point is greater than the fifth intensity threshold; if the proportion of the fourth target sampling point is greater than the sixth proportion threshold and the proportion of the fifth target sampling point is greater than the seventh proportion threshold, then output an abnormal prompt message as the detection result.
[0078] Optionally, the detection result output module 320 is also used to: extract a second time window before the point of falling asleep within the bed interval, and determine the proportion of the number of sixth target sampling points within the second time window; wherein, the body movement intensity corresponding to the sixth target sampling point is greater than the sixth intensity threshold; if the proportion of the number of sixth target sampling points is greater than the eighth proportion threshold, then an abnormal prompt message is output as the detection result.
[0079] Optionally, the detection result output module 320 is also used to: extract the third time window after the sleep point in the bed interval, and determine the proportion of the number of the seventh target sampling points in the third time window; wherein, the body movement intensity corresponding to the seventh target sampling point is greater than the seventh intensity threshold; if the proportion of the number of the seventh target sampling points is greater than the ninth proportion threshold, then an abnormal prompt message is output as the detection result.
[0080] The sleep quality detection system provided in this embodiment of the invention can execute the sleep quality detection method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.
[0081] Example 4 Figure 4 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0082] like Figure 4As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0083] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0084] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as sleep quality detection methods.
[0085] In some embodiments, the sleep quality detection method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the sleep quality detection described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the sleep quality detection method by any other suitable means (e.g., by means of firmware).
[0086] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0087] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0088] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0089] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0090] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0091] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
Claims
1. A method for detecting sleep quality, characterized in that, include: Collect body movement data from the subjects being tested; The body motion data is analyzed, and corresponding detection results are output according to preset rules.
2. The method according to claim 1, characterized in that, The analysis of the body motion data includes: The sleep onset point, sleep expiration point, and bedtime interval are determined based on the body movement data, and the time interval between the sleep onset point and the sleep expiration point is taken as the main sleep interval. Based on the body movement data, determine the awake segments of the subject within the main sleep zone and the intensity of body movement at each sampling point; The duration of each moment of consciousness corresponding to each segment of consciousness is determined, and the total duration of consciousness is obtained by summing the durations of each moment of consciousness.
3. The method according to claim 2, characterized in that, The step of outputting the corresponding detection results according to preset rules includes: Determine the percentage of the number of first target sampling points within the main sleep interval; wherein, the body movement intensity corresponding to the first target sampling point is zero; If the total duration of wakefulness exceeds a first duration threshold, and at least one wakefulness segment has a single wakefulness duration exceeding a second duration threshold, and the proportion of the number of the first target sampling points is less than a first proportion threshold, then an abnormal prompt message is output as the detection result.
4. The method according to claim 2, characterized in that, The step of outputting the corresponding detection results according to preset rules includes: Extract the first time window before and after each of the said awake segments, and determine the proportion of the number of second target sampling points within the first time window; wherein, the body movement intensity corresponding to the second target sampling point is greater than the first intensity threshold; If the total awake time is greater than the first duration threshold, and the proportion of the number of the second target sampling points is greater than the second proportion threshold, then an abnormal prompt message is output as the detection result.
5. The method according to claim 2, characterized in that, The step of outputting the corresponding detection results according to preset rules includes: Extract the target awake segment within the main sleep interval; wherein the duration of a single awake segment corresponding to the target awake segment is greater than a third duration threshold. Two sampling points with body movement intensity less than the second intensity threshold are extracted before and after the target awake segment. If the duration of body movement intensity greater than zero between the two sampling points is greater than the fourth duration threshold, and the total awake duration is greater than the first duration threshold, then an abnormal prompt message is output as the detection result.
6. The method according to claim 2, characterized in that, The step of outputting the corresponding detection results according to preset rules includes: Extract the pre-sleep interval before the sleep point within the bed interval, and determine the proportion of the number of third target sampling points within the pre-sleep interval; wherein, the body movement intensity corresponding to the third target sampling point is greater than the third intensity threshold; If the proportion of the number of the third target sampling points is greater than the third proportion threshold, an abnormal prompt message will be output as the detection result.
7. The method according to claim 2, characterized in that, The step of outputting the corresponding detection results according to preset rules includes: Extract the pre-sleep interval before the sleep point within the bed interval, and determine the proportion of the number of first target sampling points within the pre-sleep interval; wherein, the body movement intensity corresponding to the first target sampling point is zero; If the duration ratio of the pre-sleep interval to the main sleep interval is greater than the fourth ratio threshold, and the number ratio of the first target sampling points is less than the fifth ratio threshold, then an abnormal prompt message is output as the detection result.
8. The method according to claim 2, characterized in that, The step of outputting the corresponding detection results according to preset rules includes: Extract the post-wake interval after the point of falling asleep within the bed interval, and determine the proportion of the fourth target sampling points within the post-wake interval; the body movement intensity corresponding to the fourth target sampling point is greater than the fourth intensity threshold; Determine the proportion of the fifth target sampling points within the bed interval; the body motion intensity corresponding to the fifth target sampling point is greater than the fifth intensity threshold. If the proportion of the fourth target sampling points is greater than the sixth proportion threshold, and the proportion of the fifth target sampling points is greater than the seventh proportion threshold, then an abnormal prompt message is output as the detection result.
9. The method according to claim 2, characterized in that, The step of outputting the corresponding detection results according to preset rules includes: Extract the second time window before the point of falling asleep within the bed interval, and determine the proportion of the number of sixth target sampling points within the second time window; wherein, the body movement intensity corresponding to the sixth target sampling point is greater than the sixth intensity threshold; If the proportion of the sixth target sampling points is greater than the eighth proportion threshold, an abnormal prompt message will be output as the detection result.
10. The method according to claim 2, characterized in that, The step of outputting the corresponding detection results according to preset rules includes: Extract the third time window after the sleep exit point within the bed interval, and determine the proportion of the number of seventh target sampling points within the third time window; wherein, the body movement intensity corresponding to the seventh target sampling point is greater than the seventh intensity threshold; If the proportion of the seventh target sampling points is greater than the ninth proportion threshold, an abnormal prompt message will be output as the detection result.
11. A sleep quality detection device, characterized in that, include: The body movement data acquisition module is used to collect the body movement data of the subject being tested; The detection result output module is used to analyze the body motion data and output the corresponding detection results according to preset rules.
12. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the sleep quality detection method according to any one of claims 1-10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the sleep quality detection method according to any one of claims 1-10.