A method for modifying wakefulness determination in sleep monitoring
By extracting effective segments from sleep data and applying correction duration thresholds and stability conditions, the problem of wakefulness determination error in existing technologies is solved, and more accurate wakefulness recognition is achieved.
Patent Information
- Application Number
- CN202210802478.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-07
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2042-07-07
AI Technical Summary
Existing sleep monitoring products suffer from delays and errors in identifying whether a user is awake, especially when the user gets out of bed or makes only minor movements, making it difficult to accurately determine their awake state.
By extracting effective segments from sleep data and using preset correction duration thresholds and stability conditions, it is determined whether wakefulness needs to be corrected. This includes grouped sleep data, calculating range and location differences, ensuring that only data that meets certain stability and length conditions is used for wakefulness determination correction.
It improves the accuracy of wakefulness determination, reduces false alarms, ensures that users are not identified as asleep during periods when they are out of bed or making small movements, and enhances the reliability of wakefulness determination.
Smart Images

Figure CN117398063B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of sleep monitoring, and in particular relates to a correction method for wakefulness determination in sleep monitoring. BACKGROUND
[0002] Sleep quality is an important factor to ensure physical health, and with the improvement of people's living standards, the importance of sleep quality is also increasing. In order to monitor the sleep quality, with the development of science and technology, the existing technology has appeared the technical scheme of measuring various physiological indexes of human body in sleep by instrument, and then realizing sleep quality evaluation.
[0003] At present, the product forms for sleep monitoring are various, such as millimeter wave radar device, bracelet, sleep belt, sleep mattress, etc. Most of the above products collect physiological parameters of human body such as heart rate, breathing frequency, body motion signal, etc. through piezoelectric, photoelectric and other signals, and realize sleep collection of target user in combination with other signal characteristics. The information obtained by the sleep collection can include sleep-in time, wake-up time, sleep stage, sleep-in duration, non-sleep duration on bed, total sleep duration, etc.
[0004] However, the existing sleep monitoring products have more or less detection errors. For example, the piezoelectric product identifies whether the user is in a wake-up state by detecting the user's body motion signal, but there is a problem of judgment delay. Specifically, when detecting the motion signal on the bed, it cannot be determined whether the user has woken up or is in sleep, and it is necessary to determine the time when the user finally leaves the bed after leaving the bed for a period of time.
[0005] Therefore, on the basis of the existing sleep monitoring technology, how to further correct the wake-up determination and improve the accuracy of the wake-up state recognition of the user, and prevent the sleep state misjudgment of the user caused by special circumstances, has become a problem to be solved.
[0006] Therefore, the present application is proposed. SUMMARY
[0007] The technical problem to be solved by the present application is to overcome the shortcomings of the prior art, and to provide a correction method for wake-up determination in sleep monitoring. By extracting the effective segment from the sleep data, it can be determined whether the wake-up time needs to be corrected, and the misjudgment of the wake-up time can be effectively avoided.
[0008] To solve the above technical problems, the basic idea of the technical scheme of the present application is:
[0009] A correction method for wake-up determination in sleep monitoring, comprising:
[0010] obtaining sleep data in the sleep process of a user, determining a wake-up time W1 according to the sleep datat ;
[0011] extracting several effective segments from the sleep process of the user according to the sleep data, determining a wake-up time W1 t the end time X of the last effective segment t ;
[0012] comparing the wake-up time W1 t with the end time X t , judging whether to correct the wake-up time W1 t according to the comparison result.
[0013] Further, if W1 t -X t >T1, the correction result of the wake-up time retains the value of the wake-up time W1 t ;
[0014] If W1 t -X t <T1, the correction result of the wake-up time is the value of the end time X t ;
[0015] Wherein, T1 is a preset correction time threshold.
[0016] Further, the sleep data collected in the sleep process is grouped according to a preset first time interval t1, and each group of sleep data has a corresponding position mark;
[0017] The wake-up time W1 t has a corresponding wake-up position W1, and the end time X t has a corresponding end position X; the position difference AL between the wake-up position W1 and the end position X is calculated according to AL=W1-X.
[0018] If AL>T1 / t1, the position mark corresponding to the correction result of the wake-up time is W1; if AL<T1 / t1, the position mark corresponding to the correction result of the wake-up time is X.
[0019] Further, before extracting the effective segment, whether the stability condition is met is calculated for each group of sleep data respectively.
[0020] The extraction of the effective segment includes: when at least two consecutive groups of sleep data meet the stability condition, it is determined that the at least two consecutive groups of sleep data form a continuous segment, and whether it belongs to an effective segment is judged according to the length of the continuous segment.
[0021] Further, the length of the i-th continuous segment in time sequence is L i , if L iif ThrLength, then the ith continuous segment is determined as a valid segment; wherein the ThrLength is a preset valid segment length threshold.
[0022] Further, the calculation of whether the set of sleep data satisfies the stability condition comprises:
[0023] The set of sleep data is divided into N determination units according to a preset second time interval t2;
[0024] The range of the multiple sleep data in the same determination unit is obtained, and N ranges are obtained;
[0025] The difference R between the maximum value and the minimum value in the N ranges is calculated;
[0026] If R < ThrStability, the set of sleep data satisfies the stability condition, otherwise the set of sleep data does not satisfy the stability condition;
[0027] wherein the ThrStability is a preset stability judgment threshold.
[0028] Further, before the calculation of whether the set of sleep data satisfies the stability condition, further comprising:
[0029] For each set of sleep data, the range R' of the multiple sleep data therein is obtained;
[0030] If Thr min <R’<Thr max , the calculation of whether the set of sleep data satisfies the stability condition is performed; otherwise, the set of sleep data is not used for the correction of the wake time.
[0031] Further, after the sleep data is grouped according to the preset first time interval t1, the sleep process includes L sets of sleep data in total, wherein the number of sets satisfying the stability condition is Y;
[0032] If Y / L is greater than a preset first proportion threshold r1, the valid segments are extracted, and whether to correct the wake time is determined according to the end position X corresponding to the last valid segment.
[0033] Further, if Y / L is less than or equal to the first proportion threshold r1, the position mark corresponding to the wake time correction result is retained as W1.
[0034] Further, the calculation of the wake time W1 t before a preset time interval includes the number L' of sets of sleep data, and the number Y' of sets of sleep data satisfying the stability condition in the preset time interval;
[0035] If Y' / L' is greater than a preset second proportion threshold r2, an effective segment is extracted from the preset time interval, and whether to correct the wake-up time is determined according to the end position X corresponding to the last effective segment.
[0036] Compared with the prior art, the present application has the following beneficial effects.
[0037] In the present application, according to the end time X of the last effective segment in the sleep data t whether to correct the directly determined wake-up time W1 t is determined, the accuracy of the wake-up determination is improved, and the time interval in which the user leaves the bed or the motion amplitude is small is prevented from being identified as the sleep state, thereby preventing the misjudgment of the wake-up time.
[0038] In the present application, when a group of sleep data meets the stability condition, it is indicated that the sleep data does not have a large fluctuation in the corresponding time interval, and is relatively reliable, so that the group of sleep data can be used to guide the correction of the wake-up determination, thereby reducing the possibility of correction error. Only when the continuous segment in the sleep process is greater than the effective segment length threshold, the continuous segment is determined as an effective segment, which is used to guide the correction of the wake-up determination, thereby avoiding the correction error caused by the sleep data that appears unexpectedly.
[0039] In the present application, the proportion of the number of groups of sleep data meeting the stability condition in the whole sleep process, or in the preset time interval before the wake-up time W1 t is calculated, and the wake-up time is corrected only when the proportion is large, thereby further ensuring the reliability of the correction result.
[0040] The specific embodiments of the present application will be further described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS
[0041] The accompanying drawings, which are part of the present application, serve to provide a further understanding of the present application, and the schematic embodiments of the present application and the descriptions thereof serve to explain the present application, but do not constitute an improper limitation on the present application. Obviously, the accompanying drawings in the following description are only some embodiments, and other drawings can be obtained by those skilled in the art without creative labor on the basis of the drawings. In the drawings:
[0042] Figure 1 is a flowchart of the correction method of the wake-up determination in the embodiments of the present application;
[0043] Figure 2 is a curve diagram of the sleep data in the first embodiment of the present application;
[0044] Figure 3is a corresponding relation diagram of the sleep staging curve and the heart rate effectiveness marker curve in embodiment one of the present application.
[0045] It should be noted that the drawings and the written description are not intended to limit the scope of the inventive concept in any way, but are merely to illustrate the inventive concept to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical scheme and advantages of the embodiments of the present application more clear, the technical scheme in the embodiments will be clearly and completely described below by referring to the drawings of the embodiments of the present application, and the following embodiments are used to illustrate the present application but not to limit the scope of the present application.
[0047] As shown in Figure 1 , the correction method for wakefulness determination in sleep monitoring of the present application comprises the following steps:
[0048] obtaining sleep data in a sleep process of a user, determining a wake time W1 t from the sleep data;
[0049] extracting a plurality of effective segments from the sleep process of the user according to the sleep data, determining an end time X t of the last effective segment;
[0050] comparing the wake time W1 t with the end time X t , and determining whether to correct the wake time W1 t according to the comparison result.
[0051] Further, if W1 t -X t >T1, the correction result of the wake time retains the value of the wake time W1 t ;
[0052] if W1 t -X t t ;
[0053] wherein T1 is a preset correction duration threshold.
[0054] In the above scheme, the effective segments are extracted from the sleep data, and whether to correct the directly determined wake time W1 t is determined according to the end time X t of the last effective segment, so as to prevent the time interval in which the user gets out of bed or the motion amplitude is small from being identified as a sleep state, thereby avoiding the misjudgment of the wake time and effectively improving the accuracy of the wake determination.
[0055] As a preferred embodiment of the present application, the sleep data collected in the sleep process is grouped according to a preset first time interval t1, and whether the stability condition is met is calculated for each group of sleep data before the effective segment is extracted;
[0056] The effective segment extraction includes: when the stability condition is met for at least two consecutive groups of sleep data, it is determined that the at least two consecutive groups of sleep data form a continuous segment, and whether the continuous segment belongs to an effective segment is determined according to the length of the continuous segment.
[0057] Further, the length of the i th continuous segment in time sequence is L i , and if L i > ThrLength, the i th continuous segment is determined as an effective segment; wherein ThrLength is a preset effective segment length threshold.
[0058] In the above scheme, the sleep data is grouped, and whether the stability condition is met for each group of sleep data is calculated, and only the sleep data meeting the stability condition can be used to guide the correction of the wake-up determination, reducing the possibility of correction error. And for the continuous segment formed by the continuous multiple groups of sleep data meeting the stability condition, only when the length of the continuous segment is greater than the effective segment length threshold, it is determined as an effective segment, which is used to guide the correction of the wake-up determination, avoiding the correction error caused by some unexpected sleep data being used for correction.
[0059] As another preferred embodiment of the present application, after the sleep data is grouped according to the preset first time interval t1, the sleep process includes L groups of sleep data in total, and the number of groups meeting the stability condition is Y;
[0060] If Y / L is greater than a preset first proportion threshold r1, an effective segment is extracted, and whether the wake-up time is corrected is determined according to the end position X corresponding to the last effective segment.
[0061] And / or, the number of groups of sleep data contained in a preset time interval before the wake-up time W1 t is calculated, and the number of groups of sleep data meeting the stability condition in the preset time interval is Y';
[0062] If Y' / L' is greater than a preset second proportion threshold r2, an effective segment is extracted from the preset time interval, and whether the wake-up time is corrected is determined according to the end position X corresponding to the last effective segment.
[0063] In the above scheme, the number of groups of sleep data meeting the stability condition is counted, and whether the wake-up time W1 tThe proportion in the previous preset time interval is only further guided to correct the wake time according to the last effective segment when the proportion is greater than the corresponding proportion threshold, and the reliability of the correction result is further ensured.
[0064] Embodiment one
[0065] The embodiment provides a correction method for wake determination in sleep monitoring. The wake time correction method can be used for correcting the wake time of a user determined by a sleep monitoring device, so that the wake determination is closer to the real wake time of the user.
[0066] As Figure 1 shown, the wake determination correction method includes the following steps:
[0067] Obtain sleep data in the sleep process of the user, and determine a wake time W1 t according to the sleep data.
[0068] Extract a plurality of effective segments from the sleep process of the user according to the sleep data, and determine an end time X t of the last effective segment.
[0069] Compare the wake time W1 t with the end time X t , and determine whether to correct the wake time W1 t according to the comparison result.
[0070] Further, a correction duration threshold T1 is preset. If W1 t -X t >T1, the wake time correction result retains the value of the wake time W1 t ; if W1 t -X t <T1, the wake time correction result is the value of the end time X t .
[0071] For the case of W1 t -X t =T1, the value of the wake time W1 t may be retained, or the value of the end time X t may be corrected.
[0072] In the embodiment, the sleep monitoring device uses a piezoelectric signal to collect physiological parameters and body movement amplitude, frequency and other characteristics of the user, such as a sleep box, a sleep belt, a sleep mattress and the like. That is, the sleep data is a piezoelectric signal collected by the sleep monitoring device in the sleep process of the user.
[0073] For example, the sleep box is placed between the pillow and the mattress, and the piezoelectric signals collected are as shown in FIG. 8. Figure 2 The P1 interval is background noise, i.e., the user is not using the sleep box at present. During the use of the sleep box, when the user's head or other parts move above the pillow, strong piezoelectric signal fluctuations will be generated, corresponding to the P2 interval in FIG. 8. The P3 interval is the piezoelectric signal collected when the user is in contact with the pillow but in a quiet state, which reflects the user's pulse information and can be used to extract physiological parameters such as heart rate and respiration. Figure 2
[0074] After collecting the piezoelectric signals generated during the user's whole night sleep, the wake-up time W1 t can be determined according to the change of the piezoelectric signals. The wake-up time W1 t may be determined in any way in the prior art, which is not limited here. However, the wake-up time W1 t determined by the prior art may not be accurate enough, which may result in the wake-up time W1 t being wrong. The possible reasons are: the sleep box collects piezoelectric signals to determine that the heart rate change in the current stage is the smallest, the user's body movement is the least, and it is determined to be a deep sleep stage, but in fact the user has already woken up and left the bed; or the user using the sleep box has already left the bed, but there is still someone else sleeping on the bed, at this time the piezoelectric signals detected by the sleep box are different from the pure background noise, and misjudgment may occur.
[0075] In this embodiment, a set of correction algorithms can be written in the program for sleep monitoring to implement the correction method for the above wake-up determination. Specifically, after the wake-up time W1 t is determined by the algorithm in the prior art, the end time X t of the last valid segment before the wake-up time W1 t is found, and the time interval between the end time X t and the wake-up time W1 t is often determined by the algorithm to be a deep sleep stage. By comparing the length of the time interval between X t and W1 t , if it is less than the correction time threshold T1, it means that it is less than the length of the deep sleep stage before waking up in general, and there is a high probability that the algorithm has made a mistake, and then the value of the wake-up time to the end time X t can be corrected.
[0076] In this embodiment, the sleep data used to guide the correction process of the wake-up time is collected when the user is in a quiet state, i.e., the user's whole night sleep data (i.e., the collected piezoelectric signals) are first divided into stages to determine the P1 interval corresponding to the background noise, the P2 interval corresponding to the user's active state, and the P3 interval corresponding to the user's quiet state.
[0077] Specifically, first, the sleep data collected in the sleep process is grouped according to a preset first time interval t1, and a range R' is taken for the multiple sleep data in each group. If Thr min <R'<Thr max , the sleep data in the group belongs to the P3 interval corresponding to the quiet state of the user, and whether the sleep data in the group meets the stability condition can be further calculated to determine whether it can be used for the correction of the wakefulness determination. If R' does not belong to the interval range (Thr min , Thr max ), the sleep data in the group is not used for the correction of the wakefulness determination.
[0078] In detail, the collected sleep data can be grouped, for example, 10s a group. The sleep monitoring device has a corresponding background fluctuation amplitude Amplitude, and then the range R' in each group of sleep data near the background fluctuation amplitude Amplitude is determined as background noise. A motion threshold multiple ThrMotion is preset in the correction algorithm, and for each group of sleep data, if its range R' > ThrMotion x Amplitude, it is determined that the sleep data in the group corresponds to the active state of the user.
[0079] Generally, the strength of the motion signal is much greater than the signal strength generated by the pulsatile fluctuation, and a heart rate high threshold multiple ThrHRMax and ThrHRMax < ThrMotion are preset in the correction algorithm, and a heart rate low threshold multiple ThrHRMin is also preset. When the range R' of a group of sleep data meets ThrHRMin x Amplitude < R' < ThrHRMax x Amplitude, it is determined that the sleep data in the group corresponds to the quiet state of the user, and can be used for collecting and analyzing the heart rate. At this time, whether the sleep data in the group can be used for the correction of the wakefulness determination is determined by further calculating whether it meets the stability condition.
[0080] For example, in the embodiment, the value of the background fluctuation amplitude Amplitude is 800, and the motion threshold multiple ThrMotion is 10. When the range R' of a group of sleep data is 9000, R' = 9000 > 10 x 800 = 8000, it is determined that it corresponds to the active state of the user. The value of the heart rate high threshold multiple ThrHRMax is 5, and the value of the heart rate low threshold multiple ThrHRMin is 1.5, so when the range R' of a group of sleep data meets 1.5 x 800 = 1200 < R' < 5 x 800 = 4000, it is determined that the sleep data in the group corresponds to the quiet state of the user, and whether it meets the stability condition can be further calculated.
[0081] In a further scheme of the embodiment, a stability judgment threshold ThrStability is preset in the correction algorithm, and the calculation of whether the set of sleep data satisfies the stability condition specifically comprises:
[0082] The set of sleep data is divided into N judgment units according to the preset second time interval t2, N being an integer greater than or equal to 2;
[0083] The range of the multiple sleep data in the same judgment unit is obtained, to obtain N ranges;
[0084] The difference R between the maximum value and the minimum value in the N ranges is calculated;
[0085] If R < ThrStability, the set of sleep data satisfies the stability condition, otherwise the set of sleep data does not satisfy the stability condition.
[0086] Specifically, the N ranges are subtracted from each other in pairs and the absolute values are taken, and the maximum value in the obtained absolute values is the difference R.
[0087] In detail, taking sleep data 10s as a set for grouping as an example, when judging that the set of sleep data corresponds to the quiet state of the user, the set of sleep data is further divided into 5 judgment units, and the time length corresponding to each judgment unit, i.e., the second time interval t2 is 2s. The range of the multiple sleep data in each judgment unit is obtained, to obtain a sequence such as [1300, 1350, 1310, 1380, 1290]. Any two items in the above sequence are subtracted from each other in pairs and the absolute values are taken, and the maximum absolute value, i.e., the difference R, is |1380-1290| = 90. Assuming that the stability judgment threshold ThrStability = 100, R < ThrStability, and the stability condition is satisfied.
[0088] In the embodiment, in order to facilitate the record of the intermediate results of operation in the correction process by the correction algorithm (the intermediate results of operation refer to various judgment results involved in the correction process), a heart rate effectiveness flag FlagHRquality is set in the correction algorithm. When it is judged that the set of sleep data satisfies the stability condition, the corresponding heart rate effectiveness flag FlagHRquality is recorded as 1, otherwise the heart rate effectiveness flag FlagHRquality is recorded as 0.
[0089] In the above scheme, for the plurality of sets of sleep data collected in the quiet state of the user, further division is made into a plurality of determination units, and the difference between the respective ranges of the plurality of determination units obtained is compared. In this way, the case where the sleep data in the first time interval t1 appears relatively large fluctuations can be excluded, that is, the sleep data satisfying the stability condition corresponds to the absence of a large body movement of the user in the corresponding time interval. Only the sleep data satisfying the stability condition can be used to guide the correction process of the wake-up determination, and this part of the sleep data is more stable and relatively more reliable, which can reduce the possibility of error in the correction.
[0090] In a further scheme of the embodiment, the proportion of the number of sets of sleep data satisfying the stability condition Y in the whole night sleep process of the user also needs to be calculated, and whether to correct the wake-up time W1 t is determined according to the judgment result.
[0091] Specifically, after grouping the sleep data according to the preset first time interval t1, the sleep process includes L sets of sleep data, denoted as L. After calculating whether each set of sleep data satisfies the stability condition, the number of sets satisfying the stability condition is Y, that is, the number of heart rate effectiveness flags FlagHRquality with a value of 1 is Y.
[0092] In the correction algorithm, there is a first proportion threshold r1. If Y / L>r1, the effective segment is extracted, and whether to correct the wake-up time is determined according to the end time X t of the last effective segment and the wake-up time W1 t . If Y / L≤r1, the correction of the wake-up determination is not performed, that is, the wake-up time correction result retains the value of the wake-up time W1 t .
[0093] In detail, after grouping the sleep data collected throughout the night according to the first time interval t1, each set of sleep data has a position mark according to time sorting. Correspondingly, the wake-up time W1 t has a corresponding wake-up position W1 according to the sleep data group in which it is located, and the end time X t has a corresponding end position X according to the sleep data group in which it is located. As shown in Figure 3 , the upper curve is the sleep staging curve determined directly according to the sleep data, and the beginning of the rightmost platform is the wake-up position W1.
[0094] When Y / L>r1, the effective segment is further extracted, and whether to correct the wake-up time is determined according to the comparison between the end position X of the last effective segment and the wake-up position W1. If Y / L is less than or equal to the first proportion threshold r1, the position mark of the wake-up time correction result is retained as W1.
[0095] The above process is exemplified as follows, assuming that the sleep monitoring device detects that the user falls asleep at 11:00 pm and wakes up at 07:00 am the next day, and the total duration from falling asleep to waking up is 8 hours, and the length of the whole sleep is L = 8 h x 60 min x 60 s / 10 s = 2880. After calculating the heart rate effectiveness flag FlagHRquality, the number Y of the heart rate effectiveness flags FlagHRquality that are 1 is 1800. When the first proportion threshold r1 is 1 / 4, Y / L = 1800 / 2880 > r1, and the sleep reliability flag FlagSleepReliability in the correction algorithm is set to 1, otherwise, the sleep reliability flag FlagSleepReliability is 0.
[0096] In the embodiment, the sleep reliability flag FlagSleepReliability is set in the correction algorithm for the convenience of running the correction algorithm. When the comparison result is Y / L > r1, the corresponding sleep reliability flag FlagSleepReliability is recorded as 1, otherwise, the sleep reliability flag FlagSleepReliability is recorded as 0.
[0097] In the above scheme, the proportion of each group of sleep data in which the heart rate effectiveness flag FlagHRquality is 1 in the whole sleep process is counted. When the proportion is large, it is consistent with the actual situation of most users, and the sleep data collected is relatively reliable. In this case, the wake-up time is corrected, further ensuring the reliability of the correction result.
[0098] Further, the sleep data collected in the embodiment is a piezoelectric signal. When the heart rate effectiveness flag FlagHRquality = 1 is obtained by calculating the piezoelectric signal, it indicates that the user is in bed and within the effective monitoring range of the sleep monitoring device in the corresponding time interval. However, when the user is in bed and sleeps but is not within the effective monitoring range of the sleep monitoring device, only background noise whose amplitude is a multiple of the background noise amplitude Amplitude and is lower than the heart rate low threshold multiple ThrHRMin can be collected. This part of the piezoelectric signal cannot be used for heart rate calculation, and the corresponding heart rate effectiveness flag FlagHRquality = 0.
[0099] However, the sleep monitoring device cannot accurately distinguish whether the user is in the off-bed state or in the area outside the effective monitoring range in the time interval corresponding to the heart rate effectiveness flag FlagHRquality = 0. If the amplitude of the user's activity is small enough, for example, in a deep sleep state, the piezoelectric signal collected is also very close to the background noise.
[0100] The prior art algorithm generally identifies the above situation as a deep sleep stage, but it can actually be off the bed or other state, and thus needs to be judged according to the sleep data in this part to determine whether the wake-up determination needs to be corrected. Specifically, the wake-up time W1 t The position of the last closest heart rate validity flag FlagHRquality = 1, after which the time interval can be a false deep sleep stage, and correction is needed.
[0101] On the other hand, by finding the wake-up time W1 t The position of the last closest heart rate validity flag FlagHRquality = 1 can also be used to distinguish multiple people sleeping. When the user using the sleep monitoring device gets off the bed, but there are other people sleeping on the bed, although the subsequent sleep data with a fluctuation amplitude greater than the background noise can be detected, that is, it is determined that there is a body movement signal, but the body movement signal is generated by other people who do not use the sleep monitoring device, and thus the proportion of the heart rate validity flag FlagHRquality in the unit time interval will be greatly reduced, or even 0.
[0102] In this embodiment, when the number of times that the heart rate validity flag FlagHRquality = 1 appears in the entire sleep process is counted, the sleep reliability flag FlagSleepReliability = 1 is calculated, and the wake-up time W1 t The position of the last closest heart rate validity flag FlagHRquality = 1 before.
[0103] The extracting of the effective segment specifically includes: when the consecutive at least two groups of sleep data satisfy the stability condition, it is determined that the consecutive at least two groups of sleep data form a continuous segment, and whether it belongs to an effective segment is determined according to the length of the continuous segment. The length refers to the number of groups of sleep data contained in the continuous segment.
[0104] The length of the ith continuous segment is recorded as L i in time sequence. The correction algorithm presets an effective segment length threshold ThrLength. If L i > ThrLength, the ith continuous segment is determined to be an effective segment, otherwise it is not an effective segment.
[0105] In the above scheme, the effective segment first needs to be composed of sleep data that satisfies the stability condition (i.e., the heart rate validity flag FlagHRquality = 1) for two or more groups in succession, to avoid the situation that the correction of the wake-up determination is made according to a single group of sleep data. The position of the last closest wake-up time W1 tIn the time interval, the sleep data with the heart rate quality flag FlagHRquality=1 appearing alone has a high probability of being caused by detection errors, and thus the reliability of the correction result can be ensured.
[0106] Meanwhile, by setting the effective segment length threshold ThrLength, only when the length of the continuous segment is greater than the effective segment length threshold ThrLength, the continuous segment is determined as an effective segment, which is used to guide the correction of the wakefulness determination. When a short continuous segment is generated due to detection errors, the continuous segment is used for correction, which causes the correction error.
[0107] In detail, after the heart rate quality flag of each group of sleep data is calculated and determined in the embodiment, a plurality of continuous segments are determined from the whole sleep process, and recorded in the form of a continuous segment array HRqualityArray. The continuous segment array HRqualityArray is shown in Table 1 below, for example. The first column is the number of the continuous segment arranged in time sequence, the second column is the starting position, the third column is the end position, and the fourth column is the length of the continuous segment. The starting position specifically refers to the position number of the first group of sleep data in the continuous segment, and the end position refers to the position number of the last group of sleep data in the continuous segment.
[0108] Table 1
[0109] 4 55 65 11 5 72 76 5 6 78 85 8 7 96 112 17 8 119 283 165 9 290 315 26 10 324 344 21 11 352 356 5
[0110] Suppose the time length corresponding to the effective segment length threshold ThrLength is 2 min, and the first time interval t1 is 10 s, then ThrLength=2 min / 10 s=12. In the continuous segment array HRqualityArray shown in Table 1 above, the continuous segment with a length of 21 is the last effective segment, which is recorded as the “target” segment M, and the number of the last effective segment LocHRqualityLast=10, the starting position of the effective segment is 324, the end position is 344, and the length is 21.
[0111] Further, the wakefulness time W1 is determined in the embodiment t The step of correction after the last effective segment includes:
[0112] According to AL=W1-X, the position difference AL between the wakefulness position W1 and the wakefulness time W1 t of the last effective segment;
[0113] If AL > T1 / t1, the position mark corresponding to the corrected wake time is kept as W1; if AL < T1 / t1, the position mark corresponding to the corrected wake time is modified as X.
[0114] For example, based on the continuous segment array HRqualityArray shown in Table 1, the operation is continued to guide the correction process, in which the determined wake time W1 t The end position X of the last valid segment is 344. Referring to Figure 3 The upper curve is the sleep staging curve, and the lower curve is the change curve of the sleep whole-course heart rate validity flag FlagHRquality. When the wake time W1 t The corresponding wake position W1 is 600, and the "target" segment M corresponds to the interval shown as B in the change curve of the heart rate validity flag FlagHRquality. The position difference AL = 600-344 = 256 is calculated, which is the length of the interval A in the sleep staging curve.
[0115] When the correction duration threshold T1 is 60 min, AL = 256 is less than the length corresponding to the correction duration threshold T1 (which is 60 min x 60 s / 10 s = 360), and the position mark corresponding to the wake time is corrected to the end position X of the "target" segment M, i.e., the starting position of the interval A in the sleep staging curve.
[0116] When the correction duration threshold T1 is 30 min, AL = 256 is greater than the length corresponding to the correction duration threshold T1 (which is 30 min x 60 s / 10 s = 180), and the position mark corresponding to the wake time is kept at the current wake position W1, which is equivalent to not performing correction.
[0117] As shown in Figure 3 The change curve of the heart rate validity flag FlagHRquality mainly has two intervals with consecutive FlagHRquality values of 0, which correspond to two "deep pits" before the wake position W1 in the sleep staging curve, i.e., interval D and interval A, corresponding to the deep sleep state or off-bed state of the user. The starting position of the interval A is the end position X of the "target" segment M. When it is determined that the correction duration threshold T1 is met, i.e., AL = W1-X < T1 / t1, the position mark of the wake time is modified as X, i.e., the "deep pit" at the interval A in the sleep staging curve is removed.
[0118] As for the interval D, it also has a valid segment before the starting position, but this valid segment is not the last valid segment before the wake time W1 t Therefore, the interval D is kept in the sleep staging curve.
[0119] In this embodiment, the specific value of the correction time threshold T1 can be adjusted autonomously using artificial intelligence (AI) technology during the use of the sleep monitoring device. For example, the value of the correction time threshold T1 used in the correction algorithm can be continuously adjusted through AI learning in combination with parameters such as the intensity of the piezoelectric signal collected, the thickness of the pillow used by the user, and the like.
[0120] In this embodiment, the sleep data collected during sleep is first processed, and the heart rate validity flag is calculated. Multiple people sleeping can be distinguished by searching for the last time when the heart rate validity flag is continuously 1. At the same time, according to the distribution of the heart rate validity flag in the whole sleep process, it is determined whether to correct the wake-up time, which improves the accuracy of the wake-up determination and prevents the time interval when the user gets out of bed or moves slightly on the bed from being identified as a sleep state, thereby causing a false wake-up time determination.
[0121] Embodiment Two
[0122] The difference between this embodiment and the above-mentioned embodiment one is that a preset time interval is set in the correction algorithm, the number of sleep data groups L' contained in the preset time interval before the wake-up time W1 t and the number of sleep data groups Y' meeting the stability condition in the preset time interval, and whether to correct is determined according to the value of Y' / L'.
[0123] Specifically, in this embodiment, the sleep data of the whole night is no longer counted as in embodiment one, but only the sleep data collected in the preset time interval (such as two hours) before the wake-up time W1 t is analyzed, and the proportion of sleep data meeting the stability condition is determined, so that the value of the sleep reliability flag FlagSleepReliability is 1 or 0.
[0124] In the specific scheme of this embodiment, a plurality of sleep data groups contained in the preset time interval before the wake-up time W1 t are intercepted, and the total number of the sleep data groups is L', and the number Y' of groups meeting FlagHRquality=1 is determined. The correction algorithm is preset with a second proportion threshold r2, and if Y' / L'>r2, an effective segment is extracted from the preset time interval, and the end position X corresponding to the last effective segment is determined.
[0125] In this embodiment, the value of the second proportion threshold r2 can be the same as or different from the value of the first proportion threshold r1 in embodiment one.
[0126] Further, a position difference AL = W1 - X is calculated, if AL > T1 / t1, the position mark corresponding to the correction result of the wake time is kept as W1; if AL < T1 / t1, the position mark corresponding to the correction result of the wake time is corrected as X.
[0127] The above correction judgment logic is the same as that of Embodiment One, and will not be described separately.
[0128] In the correction method of the present embodiment, the steps before calculating the sleep reliability flag FlagSleepReliability are the same as those in Embodiment One. That is, after obtaining the sleep data of the whole night, the sleep data is first grouped, the sleep data corresponding to the user's quiet state is determined, and then the heart rate effectiveness flag FlagHRquality is calculated for each group of sleep data corresponding to the quiet state. These steps are the same as those in Embodiment One, and will not be described again in the present embodiment.
[0129] The determination of the wake time is often only related to the sleep data collected in a period of time before the wake time, and has little relevance to other stages, especially the early stage of the sleep process. In the present embodiment, when calculating the sleep reliability flag FlagSleepReliability to determine whether the wake determination correction can be performed, only the sleep data collected in the preset time interval before the wake time W1 t is analyzed, instead of analyzing the sleep data of the whole sleep process. As long as the sleep data collected in a period of time before the wake time W1 t satisfies FlagSleepReliability = 1, it can be used to guide the correction of the wake determination, especially to avoid the situation that the sleep data in the early stage of the sleep process is not stable enough, the sleep data of the whole sleep process cannot satisfy the condition of FlagSleepReliability = 1, and thus the correction of the wake determination fails.
[0130] Embodiment Three
[0131] The present embodiment is a further limitation of Embodiments One or Two. In the correction process, the sleep reliability flag FlagSleepReliability is calculated for the whole sleep process and the preset time interval before the wake time W1 t , respectively. When any one of the two sleep reliability flags FlagSleepReliability obtained is 1, the effective segment extraction is further performed to determine whether the current wake time W1 t needs to be corrected.
[0132] In the first scheme of the embodiment, in the correction process, the number L of sleep data groups included in the whole sleep process and the number L' of sleep data groups included in the preset time interval before the wake-up time W1 are obtained respectively, and then the number Y of groups meeting the stability condition in the whole sleep process and the number Y' of sleep data groups meeting the stability condition in the preset time interval are counted respectively. t In the first scheme of the embodiment, in the correction process, the number L of sleep data groups included in the whole sleep process and the number L' of sleep data groups included in the preset time interval before the wake-up time W1 are obtained respectively, and then the number Y of groups meeting the stability condition in the whole sleep process and the number Y' of sleep data groups meeting the stability condition in the preset time interval are counted respectively.
[0133] Y / L and Y' / L' are calculated respectively, and when any one of Y / L>r1 and Y' / L'>r2 is satisfied, the effective fragment is extracted, and the wake-up time W1 is determined. t The end position X of the last effective fragment is determined according to the comparison result of AL=W1-X and T1 / t1, and whether the wake-up time is corrected is determined.
[0134] If Y / L≤r1 and Y' / L'≤r2, the position mark corresponding to the correction result of the wake-up time is kept as W1, that is, no correction is performed.
[0135] In the second scheme of the embodiment, the number L of sleep data groups in the whole sleep process and the number Y of groups meeting the stability condition are counted first. If Y / L>r1 is calculated, the effective fragment is extracted, and whether the wake-up time W1 t The end position X of the last effective fragment is determined according to the comparison result of AL=W1-X and T1 / t1, and whether the wake-up time is corrected is determined.
[0136] If Y / L≤r1, the sleep data groups included in the preset time interval before the wake-up time W1 t are intercepted, the number L' of sleep data groups and the number Y' of groups meeting the stability condition are determined, and if Y' / L'>r2 is calculated, the effective fragment is extracted, and whether the wake-up time W1 t The end position X of the last effective fragment is determined according to the comparison result of AL=W1-X and T1 / t1, and whether the wake-up time is corrected is determined. Otherwise, the position mark corresponding to the correction result of the wake-up time is kept as W1, and no correction is performed.
[0137] In the third scheme of the embodiment, the sleep data groups included in the preset time interval before the wake-up time W1 t are intercepted, the number L' of sleep data groups and the number Y' of groups meeting the stability condition are determined, and if Y' / L'>r2 is calculated, the effective fragment is extracted, and whether the wake-up time W1 t The end position X of the last effective fragment is determined according to the comparison result of AL=W1-X and T1 / t1, and whether the wake-up time is corrected is determined.
[0138] If Y' / L'≤r2, the number L of sleep data groups in the whole sleep process and the number Y of groups meeting the stability condition are counted. If Y / L>r1 is calculated, the effective fragment is extracted, and whether the wake-up time W1 tThe end position X of the last valid segment determines whether correction is required. Otherwise, the position marker corresponding to the correction result at the conscious moment is retained as W1, and no correction is performed.
[0139] The three schemes in this embodiment all calculate the sleep reliability flag FlagSleepReliability in two different ways. The only difference is that the order in which the two methods are implemented is changed, but they can all achieve the same effect.
[0140] Because the reliability markers of sleep can be determined both by analyzing sleep data throughout the entire sleep process and by analyzing wakefulness time W1. t Judging by sleep data within the previously preset time interval can significantly increase the probability of calculating FlagSleepReliability=1, thereby improving the success rate of correcting wakefulness determination.
[0141] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-described technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A method of correction of wakefulness determination in sleep monitoring, characterized in that, The method comprises the following steps: Obtaining sleep data in a sleep process of a user, determining a wake time W1 according to the sleep data t ; extracting from the sleep data a number of valid segments from the sleep process of the user, determining a wake-up time W1 t end time X of the last valid segment t ; comparing the wake-up time W1 t with the end time X t and, based on the comparison, determining whether to correct the wake-up time W1 t The sleep data collected in the sleep process is grouped according to a preset first time interval t1, and each group of sleep data has a corresponding position mark; the wake-up time W1 t has a corresponding wake-up position W1, and the end time X t has a corresponding end position X; The step of making correction comprises: calculating the position difference AL between the wake position W1 and the end position X according to AL=W1-X; if AL>T1 / t1, the position mark corresponding to the wake time correction result is W1; if AL Before extracting the effective segment, whether each group of sleep data satisfies the stability condition is calculated respectively; the step of extracting the effective segment comprises: when at least two groups of continuous sleep data satisfy the stability condition, it is determined that the at least two groups of continuous sleep data form a continuous segment, and whether the continuous segment belongs to the effective segment is determined according to the length of the continuous segment.
2. The method of claim 1, wherein the method further comprises: The length of the i-th continuous segment in chronological order is L i , if L i > ThrLength, the i-th continuous segment is determined as a valid segment; wherein ThrLength is a preset threshold of the length of a valid segment.
3. The method of claim 1, wherein the method further comprises: The step of calculating whether a group of sleep data satisfies the stability condition comprises: A group of sleep data is divided into N determination units according to a preset second time interval t2; The range of a plurality of sleep data in the same determination unit is obtained, and N ranges are obtained; The difference R between the maximum value and the minimum value in the N ranges is calculated; If R Before calculating whether a group of sleep data satisfies the stability condition, the method further comprises:
4. The method of claim 3, wherein the method further comprises: The range R' of a plurality of sleep data in each group of sleep data is obtained; After the sleep data is grouped according to the preset first time interval t1, the sleep process comprises L groups of sleep data in total, and the number of groups satisfying the stability condition is Y; if Thr min if R' < Thr max then calculate whether the set of sleep data satisfies the stability condition; otherwise, the set of sleep data is not used for the correction of the wakefulness determination.
5. The method of claim 1-4, wherein, If Y / L is greater than a preset first proportion threshold r1, the effective segment is extracted, and whether the wake time is corrected is determined according to the end position X corresponding to the last effective segment. If Y / L is less than or equal to the first proportion threshold r1, the position mark corresponding to the wake time correction result is kept as W1.
6. The method of claim 5, wherein the method further comprises: If Y' / L' is greater than a preset second proportion threshold r2, the effective segment is extracted from the preset time interval, and whether the wake time is corrected is determined according to the end position X corresponding to the last effective segment.
7. The method of claim 1-4, wherein, Calculate the wake-up time W1 t The number of sleep data sets included in the previous preset time interval is L', and the number of sleep data sets meeting the stability condition in the preset time interval is Y'.
Citation Information
Patent Citations
Sleep state judgment method and system, wearable device and storage medium
CN113495609A
Monitoring Sleep Stages to Determine Optimal Arousal Times and to Alert an Individual to Negative States of Wakefulness
US20100152546A1