Sleep time point detection method and system based on non-contact sensor

Through multi-dimensional data analysis and feature weight calculation, the non-contact sensor detection method solves the accuracy and adaptability problems of sleep time point detection in the existing technology, and achieves more efficient sleep time point identification.

CN120203529BActive Publication Date: 2025-09-09ZHEJIANG QISHENG DATA SERVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510685817.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-09-09
Estimated Expiration
2045-05-27

AI Technical Summary

Technical Problem

Existing sleep time point detection methods based on non-contact sensors are not very accurate and fail to effectively consider individual differences, resulting in low practical application value of the detection results.

Method used

A multi-dimensional data detection method is used to extract multiple sub-features such as body movement, breathing, and heartbeat from historical and detection data collected by non-contact sensors. The feature weights are calculated to form candidate time series and determine the sleep time points through a score model.

Benefits of technology

The accuracy and adaptability of sleep time point detection have been improved, which can adapt to the personalized differences of different users and provide scientific sleep time point detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120203529B_ABST
    Figure CN120203529B_ABST
Patent Text Reader

Abstract

The present invention relates to a sleep time point detection method and system based on a non-contact sensor. The method comprises obtaining discriminant features based on historical data and detection data collected by the non-contact sensor; sorting the sub-feature values ​​extracted from the detection data based on chronological order to form a candidate time series corresponding to each sub-feature; calculating the feature weight corresponding to each sub-feature based on the discriminant features obtained from the historical data and the detection data; merging the candidate time series corresponding to each sub-feature to obtain a total candidate time series, inputting the total candidate time series into a score model to obtain a score-candidate time series table, bringing the feature weights corresponding to each sub-feature into this table, and calculating a target prediction sequence table, selecting the final target candidate time point with the largest total score value in the target prediction sequence table as the final target sleep time point. This method takes into account the differences in sleep feature data of different users and provides scientific sleep time point detection results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sleep detection, and in particular to a sleep time point detection method and system based on a non-contact sensor. Background Art

[0002] Sleep quality directly impacts human health and quality of life. With the rise of health and wellness, more and more people are seeking to monitor and understand their sleep quality. To meet this demand, various sleep monitoring devices have been developed, including wearable devices (such as smartwatches and smart bracelets with sleep monitoring capabilities) and devices tightly integrated with bedding (such as smart mattresses).

[0003] Sleep time points are key indicators for evaluating sleep quality. Sleep time points include the time of falling asleep and the time of waking up. As two time endpoints of a sleep process, they need to be identified during the sleep quality monitoring process.

[0004] Based on this, existing technologies use devices such as sleep beds equipped with non-contact sensors to detect a user's sleep time. The sleep data collected by these non-contact sensors can be converted into a single physiological or behavioral parameter. Based on this single parameter, existing technologies use mathematical models to identify mathematical features such as extreme points or inflection points in the source data to determine sleep time. This method is inaccurate and does not account for individual differences, making it of limited practical application value. Summary of the Invention

[0005] To address the problems in the existing technology, the present invention provides a method and system for detecting sleep time points based on a non-contact sensor. This method utilizes multi-dimensional data, comprehensively considers the differences in sleep characteristics of different users, and provides scientific sleep time point detection results.

[0006] In one aspect, a method for detecting a sleep time point based on a non-contact sensor comprises:

[0007] Obtaining discriminant features based on historical data and detection data collected by the non-contact sensor; the discriminant features include multiple sub-features, each sub-feature includes multiple sub-feature values, each sub-feature value corresponds to a time point; the time interval between any two adjacent time points is the same length;

[0008] Sort the sub-feature values ​​extracted from the detection data based on the time sequence to form a candidate time series corresponding to each sub-feature;

[0009] Calculate the feature weight corresponding to each sub-feature based on the discriminant features obtained from the historical data and the detection data;

[0010] Merging the candidate time series corresponding to the sub-features to obtain a total candidate time series, inputting the total candidate time series into the score model to obtain a score-candidate time series table; the score-candidate time series table includes multiple candidate time points and multiple score values ​​corresponding to each candidate time point, the multiple score values ​​including the score values ​​corresponding to the multiple sub-features;

[0011] The feature weights corresponding to each sub-feature are brought into the score-candidate time series table, and a target prediction sequence table is calculated. The target prediction sequence table includes multiple final target candidate time points and multiple total score values; each final target candidate time point corresponds to a total score value; the total score value is determined based on the score values ​​corresponding to each sub-feature in the score-candidate time series table and the feature weights corresponding to the sub-features;

[0012] The final target candidate time point with the largest total score value in the target prediction sequence table is selected as the final target sleep time point.

[0013] As a preferred embodiment of the present invention, the feature weight corresponding to the sub-feature is calculated as follows:

[0014] Obtain sub-feature quality scores and sub-feature fluctuation values ​​based on historical data and current day data;

[0015] A weight comprehensive index of each sub-feature is calculated based on the sub-feature quality score and the sub-feature fluctuation value; and a feature weight of the target sub-feature is calculated based on the weight comprehensive index of the sub-feature.

[0016] As a preferred embodiment of the present invention, one of the multiple sub-features is a body motion feature, and the quality score of the body motion feature is calculated as follows:

[0017] (1)

[0018] Among them, Q tw Indicates the quality score of the body movement index, sum_tw mean represents the average of the total number of body movements in the past z days, sum_tw represents the total number of body movements detected, sum_tw i represents the total number of body movements on day i in the past z days, ε is the correction coefficient, and tw_history represents the maximum difference between the total number of body movements on a single day and the mean of the total number of body movements within z days in the past z days.

[0019] As a preferred embodiment of the present invention, one of the multiple sub-features is a breathing feature, and the quality score of the breathing feature is calculated as follows:

[0020] (2)

[0021] Among them, Qbr is the respiratory index quality score, cont of br in [x1, x2] represents the number of respiratory sub-eigenvalues ​​whose values ​​fall within the range [x1, x2] in the effective sleep data detected; N is the total number of respiratory sub-eigenvalues ​​in the effective sleep data detected; [x1, x2] is set based on the standard breathing interval of human sleep.

[0022] As a preferred embodiment of the present invention, one of the multiple sub-features is a heartbeat feature, and the quality score of the heartbeat feature is calculated as follows:

[0023] (3)

[0024] Among them, Q he is the heartbeat index quality score, cont of br in [x3, x4] represents the number of heartbeat sub-eigenvalues ​​whose values ​​fall within the range [x3, x4] in the effective sleep data detected; N is the total number of heartbeat sub-eigenvalues ​​in the effective sleep data detected; [x3, x4] is set based on the standard heartbeat interval of human sleep.

[0025] As a preferred embodiment of the present invention, before the time point at which the highest score is output, a threshold verification step is further included:

[0026] extracting historical sleep time points from the historical data;

[0027] Adding threshold time periods in the preceding and following time directions of the historical sleep time points to form threshold verification intervals;

[0028] Determine whether the time point with the largest total score value in the target prediction sequence table falls within the threshold approval interval; if it successfully falls within, output this time point as the final target sleep time point; if it fails to fall within, do not output it, and continue to determine whether the time point with the second largest total score value falls within the threshold approval interval until the final target sleep time point is successfully output.

[0029] As a preferred embodiment of the present invention, the discriminant feature includes a body motion sub-feature, and the body motion sub-feature includes multiple body motion sub-feature values. When forming a candidate time series corresponding to the body motion sub-feature, an adjacent window iteration method is used to select time points.

[0030] In another aspect, the present invention provides a sleep time point detection system based on a non-contact sensor, the system comprising:

[0031] A feature extraction module is used to obtain discriminant features based on historical data and detection data collected by the non-contact sensor; the discriminant features include multiple sub-features, each sub-feature includes multiple sub-feature values, each sub-feature value corresponds to a time point, and the time interval between any two adjacent time points is the same length;

[0032] The candidate time series generation module is used to sort the sub-feature values ​​extracted from the detection data based on the time sequence to form a candidate time series corresponding to each sub-feature;

[0033] A weight calculation module is used to calculate the feature weight corresponding to each sub-feature based on the discriminant features obtained from the historical data and the detection data;

[0034] A sequence table generation module is configured to merge the candidate time series corresponding to each sub-feature to obtain a total candidate time series, input the total candidate time series into a score model, and obtain a score-candidate time series table; the score-candidate time series table includes multiple candidate time points and multiple score values ​​corresponding to each candidate time point, wherein the multiple score values ​​include the score values ​​corresponding to each of the multiple sub-features;

[0035] A calculation module brings the feature weights corresponding to each sub-feature into the score-candidate time series table and calculates a target prediction sequence table, which includes multiple final target candidate time points and multiple total score values; each final target candidate time point corresponds to a total score value; the total score value is determined based on the score values ​​corresponding to each sub-feature in the score-candidate time series table and the feature weights corresponding to the sub-features;

[0036] The output module is used to select the final target candidate time point with the largest total score value in the target prediction sequence table as the final target sleep time point for output.

[0037] In another aspect, an electronic device includes a processor and a memory;

[0038] The processor is connected to the memory;

[0039] The memory is used to store executable program code;

[0040] The processor reads the executable program code stored in the memory to run a program corresponding to the executable program code, so as to execute the above-mentioned sleep time point detection method.

[0041] In summary, the technical solution provided by the present invention has the following beneficial effects:

[0042] 1. This sleep time point detection method uses non-contact sensors to capture user sleep data and extracts multiple discriminative features, such as body movement, breathing, or heartbeat characteristics. The method then weights these features to assess their contribution. While individual sleep processes vary from user to user, the feature weighting steps in this invention allow for a quantitative understanding of these differences. This method can improve both the adaptability and recognition accuracy of different user groups.

[0043] 2. This sleep time point detection method differs from traditional mathematical models in that it does not simply search for extreme points of data change or curve slope. Instead, it extracts candidate time points corresponding to each sub-feature to form a candidate time series. This total candidate time series is then acquired and subsequently scored using a score model to find the most likely point (with the highest score) among multiple possible time points to serve as the target sleep time point. Its score evaluation mechanism ensures that the resulting target sleep time point can be well adapted to the sleep process of different users. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0045] Figure 1 This is a flowchart of the sleep time point detection method;

[0046] Figure 2 This is the structural block diagram of the sleep time point detection system;

[0047] Figure 3 Schematic diagram of feature separation processing in an embodiment. DETAILED DESCRIPTION

[0048] The subject matter described herein will now be discussed with reference to example embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and are not intended to limit the scope of protection, applicability, or examples set forth in the claims. The functions and arrangements of the elements discussed may be changed without departing from the scope of protection of this specification. Various examples may omit, replace, or add various processes or components as needed. For example, the described method may be performed in an order different from the order described, and various steps may be added, omitted, or combined. In addition, features described relative to some examples may also be combined in other examples.

[0049] As used herein, the term "including" and its variations are open terms meaning "including but not limited to". The term "based on" means "based at least in part on". The terms "one embodiment" and "an embodiment" mean "at least one embodiment". The term "another embodiment" means "at least one other embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other definitions may be included below, whether explicit or implicit. Unless the context clearly indicates otherwise, the definition of a term is consistent throughout the specification.

[0050] The technical solution provided by the present invention targets sleep time points, including sleep falling time points and wake-up time points, which respectively correspond to the sleep falling time and wake-up time of the user in the total time period from going to bed to getting out of bed.

[0051] In the present invention, the non-contact sensor is mainly used to collect vibration characteristic signals, which can be achieved using a piezoelectric sensor, a resistive sensor or an acoustic wave sensor. Characteristics such as human body movements (turning over, moving limbs or moving horizontally), snoring, breathing and heartbeats will all generate vibrations, and the vibration characteristics corresponding to different behavioral characteristics are different. Taking a piezoelectric sensor as an example, when it is installed in an auxiliary medium (such as a mattress on a sleeping bed), it is used to collect all vibration information and convert the vibration information into a piezoelectric signal (voltage form) based on the piezoelectric principle. Figure 3 As shown, since different voltage features are distributed in different frequency domains in the piezoelectric signal, the existing algorithm can separate different voltage features from the acquired piezoelectric signal based on physical parameters such as frequency and amplitude, combined with confidence evaluation and other means, and perform data conversion, data clarification and other operations on these voltage features to obtain different discriminant features. The discriminant features are composed of various types of sub-features, such as body movement features, breathing features, heartbeat features, and dream talk features. Different discriminant feature weights can be used for different users to determine the sleep time point. In addition, the non-contact sensor can process all the collected raw piezoelectric signals based on the existing homologous judgment technology to solve the data mixing problem caused by the contact between an auxiliary medium and multiple users.

[0052] like Figure 1 As shown, an embodiment of the present invention provides a method for detecting sleep time points based on a non-contact sensor, the method comprising:

[0053] The historical data and detection data collected by the non-contact sensor are obtained, and the detection data are preprocessed to extract the discriminant features; the discriminant features contain multiple sub-features, each sub-feature contains multiple sub-feature values, and each sub-feature value corresponds to a time point; the time interval between any two adjacent time points is the same, and this time interval length is set as the calculation interval T.

[0054] In this embodiment, a piezoelectric film sensor is used as a possible implementation of a non-contact sensor, and the piezoelectric film sensor is arranged in the mattress of the smart bed to further explain the method.

[0055] First, the piezoelectric film sensor placed in the smart bed mattress is in a 24-hour standby state, used to obtain all vibration information of the user on the smart bed mattress. The piezoelectric film sensor can send data to the analysis device in the prior art. The analysis device processes the overall voltage information by executing the existing voltage feature separation algorithm to obtain multiple discriminant features. The discriminant features are the features used by the present invention to detect sleep time points. They contain multiple different sub-features, such as body movement sub-features, breathing sub-features, and heartbeat sub-features. Each sub-feature is composed of multiple sub-feature values. The sub-feature value is the quantitative value of the characteristic behavior. Each sub-feature value corresponds to a time point. The time interval between any two time points is the calculation interval T, that is, the sub-feature value is the quantitative value of the characteristic behavior occurring in the calculation interval T.

[0056] For example, let the calculation interval T be 10 seconds. Every 10 seconds, the processor will sort and record the number of characteristic behaviors collected by the piezoelectric film sensor during the previous 10-second period. Taking the body movement sub-feature as an example, if the first body movement sub-feature value is 0, the corresponding time point is 22:00:00, the second body movement sub-feature value is 1, the corresponding time point is 22:00:10, and the third body movement sub-feature value is 3, the corresponding time point is 22:00:20. It can be seen that within the 10 seconds from 22:00:00 to 22:00:10, the user performed one body movement behavior, and within the 10 seconds from 22:00:10 to 22:00:20, the user performed three body movements. Similarly, after every calculation interval T, the processor sorts and records, and the corresponding discriminant features include three sub-feature values ​​corresponding to each of the three sub-features: the body movement sub-feature, the breathing sub-feature, and the heartbeat sub-feature.

[0057] The historical data contains all the discriminant feature data in the valid sleep data of each day in the past z days, where the valid sleep data refers to the user's time in bed. For example, the bed time on the 3rd is 22:00:00, and the time of getting out of bed is 06:00:00 on the 4th. The actual time length corresponding to the valid sleep data is 28,800 seconds. If the calculation interval T is set to 10 seconds, each sub-feature in the valid sleep data of the 4th day contains 2,880 sub-feature values; the detection data contains all the discriminant feature data in the latest set of valid sleep data.

[0058] In addition, the method further includes sorting the sub-feature values ​​extracted from the detection data based on a time sequence to form a candidate time series corresponding to each sub-feature;

[0059] Since each sub-feature value corresponds to a time point, we can sort the sub-feature values ​​based on time order to form candidate time series corresponding to each sub-feature. Taking the body movement sub-feature, respiration sub-feature, and heartbeat sub-feature as examples, we can form three candidate time series: body movement candidate time series st1, respiration candidate time series st2, and heartbeat candidate time series st3.

[0060] Next, the feature weight corresponding to each sub-feature is calculated based on the historical data and detection data.

[0061] Let the body movement weight be w1, the breathing weight be w2, and the heartbeat weight be w3, then the weights can be calculated according to equations (4), (5), and (6):

[0062] (4)

[0063] (5)

[0064] (6)

[0065] Where: w tw is the comprehensive index of body motion data weight, w br is the comprehensive index of respiratory data weight, w he It is a comprehensive indicator of the weight of respiratory data.

[0066] (7)

[0067] (8)

[0068] (9)

[0069] Among them, Q tw Indicates the quality score of the body movement index, Q br is the respiratory index quality score, Q heis the heartbeat index quality score, V tw is the fluctuation value of body movement index, V br is the respiratory index fluctuation value, V he is the heartbeat index fluctuation value;

[0070] α and β are weighting coefficients, and satisfy α+β=1. The weighting coefficient reflects the trade-off between quality score and fluctuation. The value range of α is [0,1], which indicates the proportion of the importance of the corresponding quality score when calculating the weight index. The value range of β is [0,1], which indicates the proportion of the importance of the fluctuation of the corresponding index when calculating the weight index. α and β can be preset manually by referring to historical experience or historical data.

[0071] In this embodiment, the quality score Q of the body movement index tw , respiratory index quality score Q br and heartbeat indicator quality score Q he The calculation methods of are shown in formula (1), formula (10) and formula (11):

[0072] (1)

[0073] (10)

[0074] As shown in formula (1), sum_tw mean represents the average of the total number of body movements in the past z days. Specifically, the sum of all the body movement sub-feature values ​​in the valid sleep data of each day in the past z days (time corresponding to: from the detection of the going-in-bed state to the detection of the getting-out-of-bed state) is divided by the total number of days z to obtain the average daily total number of body movements.

[0075] sum_tw represents the total number of detected body movements. Specifically, the total number of detected body movements represents the sum of all body movement sub-feature values ​​in the complete and valid sleep data for the most recent day, indicating the total number of body movements that occurred from the time the user entered and exited bed.

[0076] sum_tw i represents the total number of body movements on day i in the past z days;

[0077] ε is the correction coefficient, which is actually a very small positive number used to avoid the denominator being 0;

[0078] tw_history represents the maximum difference between the total number of body movements on a single day and the mean of the total number of body movements in the past z days;

[0079] |sum_tw-sum_tw mean | represents the absolute difference between the total number of detected body movements and the mean number of body movements;

[0080] The total number of detected body movements refers to the total number of body movements in the most recent detection (all data obtained from the user getting into bed to getting out of bed). In formula (1), the numerator and denominator both represent the difference in body movement count based on the mean of the total number of body movements, and both are positive values ​​(taking the absolute value). If |sum_tw-sum_tw mean | is numerically less than tw _history, then Q tw The value of is not 0, which means that in the most recent test corresponding to the total number of body movements, the body movement index is consistent with the historical performance; if |sum_tw-sum_tw mean | is numerically greater than tw _history, then Q tw The value of is 0, which means that in the most recent detection corresponding to the total number of body movements, the body movement index has deviated from the "most biased historically" body movement index, and the body movement feature is no longer of reference value, which means that in subsequent calculations, the weight participation of the body movement feature will be adjusted to 0; based on this, it reflects the credibility of the detected body movement feature in the historical data and reflects the importance of the detected body movement feature.

[0081] (11)

[0082] As shown in formula (11), Q br is the respiratory index quality score; T is the calculation interval;

[0083] N is the total number of times the processor records the occurrence of the feature values ​​collected by the piezoelectric film sensor in a set of valid sleep data (also the number of sub-feature values ​​corresponding to each sub-feature). Its value is equal to the number of calculation intervals T. For example, when T = 10s, if the valid sleep data corresponding to a certain day is 8 hours (28800s), then N = 2880.

[0084] cont of br in [x1, x2] represents the number of respiratory sub-feature values ​​whose values ​​fall within the range [x1, x2] in the detected valid sleep data; [x1, x2] is set based on the standard respiratory interval for human sleep; for users with bound information, the user's attribute profile can be clearly understood. Based on this, combined with authoritative medical research results or historical data sets in relevant medical databases, the [x1, x2] interval can be selected for the user in a targeted manner (including but not limited to the official website of the National Health Commission, the National Center for Cardiovascular Disease, the National Standard Full-Text Public Disclosure System, the World Health Organization (WHO), etc.).

[0085] For example, a user whose binding information is over 60 years old has his breathing rate per minute manually set to [12, 18] based on the above method. If the calculation interval T = 10s, then the cont of br in [2, 3].

[0086] From formula (11), we can know that the number of respiratory sub-eigenvalues ​​whose values ​​fall within the range of [2,3] divided by N can be used to know the proportion of the time when the elderly user is in the normal respiratory frequency range during sleep, and the higher the proportion, the higher the Q br The larger the respiratory index quality score, the greater the contribution of the respiratory sub-feature.

[0087] (12)

[0088] From formula (12), we can see that Q he is the heartbeat index quality score; T is the calculation interval;

[0089] The calculation method is the same as that of formula (11), Q he The larger it is, the greater the contribution of the heartbeat sub-feature.

[0090] (i=1,2,...,N) (13)

[0091] (i=1,2,...,N) (14)

[0092] (i=1,2,...,N) (15)

[0093] Among them, based on the variance formula, such as in Equation (13), Equation (14) and Equation (15), V tw is the fluctuation value of body movement index, V br is the respiratory index fluctuation value, V he is the heartbeat index fluctuation value;

[0094] As can be seen from the previous steps, the three sub-eigenvalues ​​are sorted based on the time order to form the body movement candidate time series st1, the breathing candidate time series st2 and the heartbeat candidate time series st3, each of which contains N sub-eigenvalues;

[0095] It should be noted that, based on the normalization operation in the prior art, all sub-eigenvalues ​​are normalized so that the value of each sub-eigenvalue is within the range of [0, 1], so that V tw 、V br and V he The data are unified in form so as to be brought into equations (4), (5) and (6) to calculate the weighted comprehensive index;

[0096] Among them, tw_i norm represents the normalized value of the eigenvalue of the i-th body motion candidate time series;

[0097] twnorm_mean br_i represents the normalized mean of all body motion sub-feature values ​​in the body motion candidate time series; norm Represents the normalized value of the i-th respiratory sub-feature value in the respiratory candidate time series;

[0098] br_i norm_mean represents the normalized mean of all respiratory sub-feature values ​​in the respiratory candidate time series; he_i norm represents the normalized value of the i-th heartbeat sub-feature value in the heartbeat candidate time series;

[0099] he_i norm_mean Represents the normalized mean of all heartbeat sub-feature values ​​in the heartbeat candidate time series;

[0100] The weighted comprehensive index is calculated based on the above formulas (7), (8) and (9), and the relative weights of the quality score and the fluctuation are adaptively adjusted through the weighting coefficients α and β. When there is less historical data, the β coefficient can be increased and the α coefficient can be decreased to reduce the weight influence of the quality score. When there is more historical data, the β coefficient can be decreased and the α coefficient can be increased to increase the weight influence of the quality score.

[0101] When obtaining the comprehensive index w of body movement data weight tw , comprehensive index of respiratory data weight w br and the comprehensive index w of respiratory data weight he Then, we substitute the above equations (4), (5) and (6) to calculate the body motion weight w1, the breathing weight w2 and the heartbeat weight w3.

[0102] Then, the candidate time series corresponding to each sub-feature are merged to obtain the total candidate time series, and the total candidate time series is input into the score model to obtain the score-candidate time series table.

[0103] The above-mentioned body motion candidate time series st1, respiration candidate time series st2 and heartbeat candidate time series st3 are merged to form a total candidate time series ST (the repeated time points are not merged and deleted).

[0104] Furthermore, the total candidate time series ST is input into the score model to obtain a score-candidate time series table. In this embodiment, examples of three score models are provided: a body movement score model, a breathing score model, and a heartbeat score model. The total candidate time series ST will be input into the above three score models respectively, so that each time point has three corresponding score results.

[0105] Specifically, the body movement score model (falling asleep) is first shown:

[0106] (16)

[0107] (1) Set the score value range to [0,1];

[0108] (2) As can be seen from the above, each body motion sub-feature value corresponds to a time point, namely the candidate time point. The body motion sub-feature value corresponding to each candidate time point is extracted in turn, and the score of the candidate time point is calculated based on the above model;

[0109] Among them tw seep_score represents the sleep score at the candidate time point of falling asleep with body movement, before_sum represents the sum of the number of body movements in the period before the candidate time point of falling asleep with body movement, and after_sum represents the sum of the number of body movements in the period after the candidate time point of falling asleep with body movement; the greater the difference between before_sum and after_sum, the higher the sleep score; the "period of time" here can be set to m calculation intervals T, and m>0.

[0110] The following shows the breathing and heart rate score model (falling asleep):

[0111] (17)

[0112] (1) Set the score value range to [0,1];

[0113] (2) bh sleep_score represents the sleep score at the candidate time point of breathing / heartbeat falling asleep, and e represents a natural constant;

[0114] =before_mean-after_mean; =before_mean-mean;

[0115] Before_mean represents the mean number of breaths / heartbeats in the period before the candidate time point for falling asleep; after_mean represents the mean number of breaths or heartbeats in the period after the candidate time point for falling asleep; mean represents the mean value of the breath / heartbeat during the entire sleep process (i.e., corresponding to the valid sleep data), which is numerically equal to the mean value of all sub-feature values ​​of the breath / heartbeat in the valid sleep data. The formula shows that the greater the difference between before_mean and after_mean, the higher the sleep score.

[0116] k1 and k2 are adjustable slope parameters, which are used to control the slope of the function and can be adjusted according to actual needs; for example, if you want to increase or The impact on the score can be increased by increasing k1 or k2;

[0117] α1 and α2 are adjustable offset parameters, which are used to control the offset of the function and to adjust the base of the difference. For example, if you want or A certain value needs to be reached to significantly affect the score, and α1 or α2 can be adjusted.

[0118] Since k and α are both adjustable parameters, their specific values ​​can be adjusted to make them suitable for breathing / heartbeat model functions and different users.

[0119] Secondly, the above embodiment describes the calculation method for the sleep onset score. Similarly, the following describes the calculation method for the wakefulness score under the method of the present invention:

[0120] Show body movement score model (awakening):

[0121] (18)

[0122] (1) Set the score value range to [0,1];

[0123] (2) Based on the previous steps, each body motion sub-feature value corresponds to a time point, namely, a candidate time point. The body motion sub-feature value corresponding to each candidate time point is extracted in turn, and the score of the candidate awakening time point is calculated based on the awakening model shown in formula (18);

[0124] Among them tw wake_score represents the awakening score of the candidate time point of awakening by body movement, before_sum represents the sum of the number of body movements in the period before the candidate time point of awakening by body movement, and after_sum represents the sum of the number of body movements in the period after the candidate time point of awakening by body movement. The larger the difference between after_sum and before_sum, the higher the awakening score. The "period of time" here can be set to m calculation intervals T, and m>0.

[0125] The following shows the breathing and heart rate score model (awake):

[0126] (19)

[0127] (1) Set the score value range to [0,1];

[0128] (2) bh wake_score represents the awakening score at the candidate time point of respiratory / heartbeat awakening, and e represents a natural constant;

[0129] =before_mean-after_mean; =after_mean-mean;

[0130] Before_mean represents the mean number of breaths or heartbeats in the period before the candidate breathing / heartbeat awakening time point; after_mean represents the mean number of breaths or heartbeats in the period after the candidate breathing / heartbeat awakening time point; mean represents the mean of the breathing / heartbeat during the entire sleep process (i.e., corresponding to the valid sleep data), which is numerically equal to the mean of all breathing / heartbeat sub-feature values ​​in the valid sleep data. The formula shows that the greater the difference between before_mean and after_mean, the higher the awakening score.

[0131] k3 and k4 are adjustable slope parameters, which are used to control the slope of the function and can be adjusted according to actual needs; for example, if you want to increase or To influence the score, you can increase k3 or k4;

[0132] α3 and α4 are adjustable offset parameters, which are used to control the offset of the function and to adjust the base of the difference. For example, if you want or A certain value needs to be reached to significantly affect the score, and α3 or α4 can be adjusted.

[0133] Since k and α are both adjustable parameters, their specific values ​​can be adjusted to make them suitable for breathing / heartbeat model functions and different users.

[0134] Based on the above score model, the scores of the total candidate time series ST are calculated, and each time point has three corresponding score results. Then, the above body movement weight w1, breathing weight w2, and heartbeat weight w3 are brought into the score-candidate time series table and weighted summed up. This ensures that each time point ultimately corresponds to a total score value, and finally obtains the target prediction sequence table. Based on the above calculation operation, it can be seen that the total score value comprehensively considers the contribution of different sub-features, and the sub-feature contribution reflects the bias of different user groups in specific types of feature data, making this method applicable to all user groups.

[0135] Finally, from the target prediction sequence table, select the point with the largest total score as the final target sleep time point. If the sleep onset score model is used above, then this target sleep time point corresponds to the target sleep onset time point; if the wake-up score model is used above, then this target sleep time point corresponds to the target wake-up time point.

[0136] In another possible implementation, different from the above embodiment, when selecting the point with the largest total score value from the target prediction sequence table as the final target sleep time point, a threshold verification step needs to be performed: extract the historical sleep time point from the historical data; add threshold time periods in the preceding time direction and the succeeding time direction of the historical sleep time point to form a threshold verification interval; judge whether the time point with the largest total score value in the target prediction sequence table falls into the threshold verification interval; if it falls into the threshold verification interval successfully, output this time point as the final target sleep time point; if it fails to fall into the threshold verification interval, do not output it, and continue to judge and analyze whether the time point with the second largest total score value falls into the threshold verification interval until the final target sleep time point is successfully output.

[0137] Specifically, taking the target sleep onset time as an example, it is first necessary to extract the historical sleep onset time from the historical data. The historical sleep onset time can be determined based on the sleep onset time that has been determined in the previous days. Taking 21:00:00 as an example, add threshold time periods in the preceding time direction and the following time direction of 21:00:00 respectively. For example, the threshold time period is set to 15 minutes, and the final threshold verification interval is 20:45:00 to 21:15:00. At this time, when outputting the time point with the largest total score value in the target prediction sequence table, it is necessary to first determine whether this time point falls within the above-mentioned threshold verification interval.

[0138] For example, if the time point with the highest score in the target prediction sequence list is 21:10:40, then this time point can be directly determined as the final target sleep time point; if the time point with the highest score in the target prediction sequence list is 20:35:20, then this time point will not be output; then the time point with the second largest total score value in the target prediction sequence list is selected, for example, if the time point with the second largest total score value is 21:06:20, then this time point is used as the final target sleep time point, and so on. If the time point with the second largest total score value still does not fall into the threshold approval interval, continue to look for the time point with the third largest total score value until the final target sleep time point is determined.

[0139] Therefore, there may be abnormal time intervals between several adjacent time points with large total score values, which is usually caused by individual factors. At this time, the threshold verification step provided in this embodiment can use historical data to distinguish several possible time points with similar scores, ensuring that the final target sleep time point reaches the highest credibility.

[0140] In another possible embodiment, for the body motion sub-feature, when forming the candidate time series corresponding to the body motion sub-feature, an adjacent window iteration method is also used to select time points.

[0141] Through the adjacent window iteration method, the time points corresponding to the individual body motion sub-eigenvalues ​​in the body motion candidate time series can be made more scientific. The specific operation is: first, all body motion sub-eigenvalues ​​are arranged in chronological order, and then the time window is set. The time length of each time window is an integer multiple of the calculation interval T, which makes each time window contain multiple time points. Then the sliding step size is set, which is also an integer multiple of the calculation interval T, but needs to be smaller than the time length of the time window; each time window corresponds to a window body motion sub-eigenvalue, and its value is the sum of the individual body motion sub-eigenvalues ​​corresponding to multiple time points under the window. After the calculation is obtained, the window motion threshold TWP and the motion ratio threshold TWRP are set. A time window is extracted, and the motion sub-feature value of the window is compared with the set window motion threshold TWP. If the former is greater than the latter, the ratio of the window motion sub-feature value of the current time window to the window motion sub-feature value of the next adjacent window (the window obtained by sliding the current time window once according to the sliding step) is calculated (called the "motion ratio of the two adjacent windows"). This ratio is compared with the motion ratio threshold TWRP. If the former is greater than the latter, the time point in the middle of the current window is selected. By sliding the time window, all time points in the original total time series are selected, and based on these time points, a candidate time series corresponding to the motion sub-feature is formed. Compared with the sequence before the selection step, this candidate time series removes some low-confidence time points (the adjacent window iteration method can utilize the local continuity characteristics of time series data and the statistical correlation between adjacent windows to dynamically adjust the confidence level of the data within the window to eliminate low-confidence time points), thus reducing the data volume of the candidate time series.

[0142] In another possible embodiment, when forming candidate time series corresponding to the respiration or heartbeat sub-features, a conventional time series change point detection algorithm (e.g., the Dynp algorithm) can be used to perform change point detection on all time points corresponding to the respiration and heartbeat sub-feature values. Finally, successful time points are selected based on all detected time points to form candidate respiration or heartbeat time series. Furthermore, this can also be combined with the screening steps in the above embodiments to perform a double screening process, further reducing the data volume and improving the scientific nature of the data.

[0143] On the other hand, this embodiment also provides a sleep time point detection system based on a non-contact sensor, the system comprising:

[0144] A feature extraction module is used to obtain a discriminant feature based on historical data and detection data collected by the non-contact sensor; the discriminant feature includes multiple sub-features, each sub-feature includes multiple sub-feature values, and each sub-feature value corresponds to a time point;

[0145] The candidate time series generation module is used to sort the sub-feature values ​​based on the time sequence to form a candidate time series corresponding to each sub-feature;

[0146] The weight calculation module is used to calculate the feature weight corresponding to each sub-feature based on historical data and detection data;

[0147] A sequence table generation module is configured to merge the candidate time series corresponding to each sub-feature to obtain a total candidate time series, input the total candidate time series into a score model, and obtain a score-candidate time series table; the score-candidate time series table includes multiple candidate time points and multiple score values ​​corresponding to each candidate time point, wherein the multiple score values ​​include the score values ​​corresponding to each of the multiple sub-features;

[0148] A calculation module is used to bring the feature weights corresponding to each sub-feature into the score-candidate time series table and calculate a target prediction sequence table, which includes multiple final target candidate time points and multiple total score values; each final target candidate time point corresponds to a total score value; the total score value is determined based on the score values ​​corresponding to each sub-feature in the score-candidate time series table and the feature weights corresponding to the sub-features;

[0149] The output module is used to output the final target candidate time point with the largest total score value in the target prediction sequence table as the final target sleep time point.

[0150] On the other hand, the present invention further provides an electronic device, comprising a processor and a memory;

[0151] The processor is connected to the memory;

[0152] a memory for storing executable program code;

[0153] The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the sleep time point detection method.

[0154] Among them, computer-readable storage media may include, but are not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.

[0155] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0156] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. In the several embodiments provided in this application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of the device or unit can be electrical or other forms.

[0157] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0158] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0159] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory and includes a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, magnetic disk or optical disk, and other media that can store program code.

[0160] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable memory, which may include a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0161] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

Claims

1. A sleep time point detection method based on a non-contact sensor, characterized in that: Methods include: Obtaining discriminative features based on historical data and detection data collected by non-contact sensors; The discriminant feature includes multiple sub-features, each sub-feature includes multiple sub-feature values, each sub-feature value corresponds to a time point; the time interval between any two adjacent time points is the same; the sub-features include body movement features, breathing features and heartbeat features; Sort the sub-feature values ​​extracted from the detection data based on the time sequence to form a candidate time series corresponding to each sub-feature; Calculate the feature weight corresponding to each sub-feature based on the discriminant features obtained from the historical data and the detection data; Merging the candidate time series corresponding to the sub-features to obtain a total candidate time series, inputting the total candidate time series into a score model to obtain a score-candidate time series table; the score-candidate time series table includes multiple candidate time points and multiple score values ​​corresponding to each candidate time point, the multiple score values ​​including the score values ​​corresponding to each of the multiple sub-features; the candidate time point is either a candidate time for falling asleep or a candidate time for waking up; the score model includes a body movement score model and a breathing / heartbeat score model; The specific body movement score model used to calculate the scores corresponding to each candidate sleep onset time is: Among them, tw seep_score Indicates the sleep score of the candidate time point for falling asleep with body movement, before_sum indicates the sum of the number of body movements in the period before the candidate time point for falling asleep with body movement, and after_sum indicates the sum of the number of body movements in the period after the candidate time point for falling asleep with body movement; The body movement score model used to calculate the scores corresponding to each candidate awakening time is as follows: Among them, tw wake_score Indicates the awakening score of the candidate time point of awakening by body movement, before_sum indicates the sum of the number of body movements in the period before the candidate time point of awakening by body movement, and after_sum indicates the sum of the number of body movements in the period after the candidate time point of awakening by body movement; The breathing / heartbeat score model used to calculate the scores corresponding to each candidate sleep time is as follows: Among them, bh sleep_score Indicates the sleep score of the candidate breathing / heartbeat sleep time point, before_mean indicates the mean number of breathing / heartbeats in the period before the candidate breathing / heartbeat sleep time point; after_mean indicates the mean number of breathing or heartbeats in the period after the candidate breathing / heartbeat sleep time point; mean indicates the mean number of breathing / heartbeats during the entire sleep process, k1 and k2 are adjustable slope parameters, and α1 and α2 are adjustable offset parameters; =before_mean-after_mean; =before_mean-mean; The breathing / heartbeat score model used to calculate the corresponding scores of each candidate awakening time is as follows: The feature weights corresponding to each sub-feature are brought into the score-candidate time series table, and a target prediction sequence table is calculated. The target prediction sequence table includes multiple final target candidate time points and multiple total score values; each final target candidate time point corresponds to a total score value; the total score value is determined based on the score values ​​corresponding to each sub-feature in the score-candidate time series table and the feature weights corresponding to the sub-features; The final target candidate time point with the largest total score value in the target prediction sequence table is selected as the final target sleep time point.

2. The sleep time point detection method based on a non-contact sensor according to claim 1, characterized in that: The calculation method of the feature weight corresponding to the sub-feature is as follows: Obtain sub-feature quality scores and sub-feature fluctuation values ​​based on historical data and current day data; The weighted comprehensive index of each sub-feature is calculated based on the sub-feature quality score and sub-feature fluctuation value; The feature weight of the target sub-feature is obtained by calculating the weight comprehensive index of the sub-features.

3. The sleep time point detection method based on a non-contact sensor according to claim 2, characterized in that: One of the multiple sub-features is a body motion feature, and the quality score of the body motion feature is calculated as follows: Among them, Q tw Indicates the quality score of the body movement index, sum_tw mean represents the average of the total number of body movements in the past z days, sum_tw represents the total number of body movements detected, sum_tw i represents the total number of body movements on day i in the past z days, ε is the correction coefficient, and tw_history represents the maximum difference between the total number of body movements on a single day and the mean of the total number of body movements within z days in the past z days.

4. The sleep time point detection method based on a non-contact sensor according to claim 2, characterized in that: One of the multiple sub-features is a breathing feature, and the quality score of the breathing feature is calculated as follows: Among them, Q br is the respiratory index quality score, cont of br in [x1, x2] represents the number of respiratory sub-eigenvalues ​​whose values ​​fall within the range [x1, x2] in the effective sleep data detected; N is the total number of respiratory sub-eigenvalues ​​in the effective sleep data detected; [x1, x2] is set based on the standard breathing interval of human sleep.

5. The sleep time point detection method based on a non-contact sensor according to claim 2, characterized in that: One of the multiple sub-features is a heartbeat feature, and the quality score of the heartbeat feature is calculated as follows: Among them, Q he is the heartbeat index quality score, cont of br in [x3, x4] represents the number of heartbeat sub-eigenvalues ​​whose values ​​fall within the range [x3, x4] in the effective sleep data detected; N is the total number of heartbeat sub-eigenvalues ​​in the effective sleep data detected; [x3, x4] is set based on the standard heartbeat interval of human sleep.

6. The method for detecting sleep time points based on a non-contact sensor according to claim 1, characterized in that: Before outputting the time point with the highest score, a threshold verification step is also included: extracting historical sleep time points from the historical data; Adding threshold time periods in the preceding and following time directions of the historical sleep time points to form threshold verification intervals; Determine whether the time point with the largest total score value in the target prediction sequence table falls within the threshold approval interval; if it successfully falls within, output this time point as the final target sleep time point; if it fails to fall within, do not output it, and continue to determine whether the time point with the second largest total score value falls within the threshold approval interval until the final target sleep time point is successfully output.

7. The method for detecting sleep time points based on a non-contact sensor according to claim 1, characterized in that: The discriminant feature includes a body motion sub-feature, and the body motion sub-feature includes multiple body motion sub-feature values. When forming a candidate time series corresponding to the body motion sub-feature, an adjacent window iteration method is used to select time points.

8. A sleep time point detection system based on a non-contact sensor, characterized in that: The system includes: A feature extraction module is configured to obtain discriminant features based on historical data and detection data collected by the non-contact sensor; the discriminant features include multiple sub-features, each sub-feature includes multiple sub-feature values, and each sub-feature value corresponds to a time point; the sub-features include body movement features, breathing features, and heartbeat features; The candidate time series generation module is used to sort the sub-feature values ​​based on the time sequence to form a candidate time series corresponding to each sub-feature; The weight calculation module is used to calculate the feature weight corresponding to each sub-feature based on historical data and detection data; A sequence table generation module is configured to merge candidate time series corresponding to each sub-feature to obtain a total candidate time series, and input the total candidate time series into a score model to obtain a score-candidate time series table; the score-candidate time series table includes multiple candidate time points and multiple score values ​​corresponding to each candidate time point, the multiple score values ​​including the score values ​​corresponding to each of the multiple sub-features; the candidate time point is either a candidate time for falling asleep or a candidate time for waking up; the score model includes a body movement score model and a breathing / heartbeat score model; The specific body movement score model used to calculate the scores corresponding to each candidate sleep onset time is: Among them, tw seep_score Indicates the sleep score of the candidate time point for falling asleep with body movement, before_sum indicates the sum of the number of body movements in the period before the candidate time point for falling asleep with body movement, and after_sum indicates the sum of the number of body movements in the period after the candidate time point for falling asleep with body movement; The body movement score model used to calculate the scores corresponding to each candidate awakening time is as follows: Among them, tw wake_score Indicates the awakening score of the candidate time point of awakening by body movement, before_sum indicates the sum of the number of body movements in the period before the candidate time point of awakening by body movement, and after_sum indicates the sum of the number of body movements in the period after the candidate time point of awakening by body movement; The breathing / heartbeat score model used to calculate the scores corresponding to each candidate sleep time is as follows: Among them, bh sleep_score Indicates the sleep score of the candidate time point of breathing / heartbeat falling asleep, before_mean indicates the mean number of breathing / heartbeats in the period before the candidate time point of breathing / heartbeat falling asleep; after_mean indicates the mean number of breathing or heartbeats in the period after the candidate time point of breathing / heartbeat falling asleep; mean indicates the mean number of breathing / heartbeats during the whole sleep process, k1 and k2 are adjustable slope parameters, and α1 and α2 are adjustable offset parameters; =before_mean-after_mean; =before_mean-mean; The breathing / heartbeat score model used to calculate the scores corresponding to each candidate awakening time is as follows: Among them, bh wake_score Indicates the awakening score of the candidate breathing / heartbeat awakening time point, before_mean indicates the mean number of breathing / heartbeats in the period before the candidate breathing / heartbeat awakening time point, after_mean indicates the mean number of breathing or heartbeats in the period after the candidate breathing / heartbeat awakening time point, and mean indicates the mean number of breathing / heartbeats during the entire sleep process. k3 and k4 are adjustable slope parameters, and α3 and α4 are adjustable offset parameters. =before_mean-after_mean; =after_mean-mean; A calculation module is used to bring the feature weights corresponding to each sub-feature into the score-candidate time series table and calculate a target prediction sequence table, which includes multiple final target candidate time points and multiple total score values; each final target candidate time point corresponds to a total score value; the total score value is determined based on the score values ​​corresponding to each sub-feature in the score-candidate time series table and the feature weights corresponding to the sub-features; The output module is used to output the final target candidate time point with the largest total score value in the target prediction sequence table as the final target sleep time point.

9. An electronic device, characterized in that: including a processor and a memory; The processor is connected to the memory; The memory is used to store executable program code; The processor reads the executable program code stored in the memory to run a program corresponding to the executable program code, so as to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Determination method and device of sleep staging and computer equipment

    CN109567750A

  • Automatic mattress temperature adjusting method and system based on physiological data

    CN119606157A