Sleep staging detection method and system based on smart watch
Through multi-source signal fusion and deep learning methods, combined with bidirectional long short-term memory networks and temporal autocorrelation feature analysis, the problems of insufficient information and noise influence in smart watch sleep monitoring are solved, and high-accuracy sleep state recognition is achieved.
Patent Information
- Application Number
- CN202510921995.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-07-04
AI Technical Summary
Existing smartwatch-based sleep monitoring methods lack information dimensions, are easily affected by environmental noise, and fail to effectively utilize the timing-dependent characteristics of sleep signals, resulting in low accuracy in judging sleep state transitions.
By fusing heart rate variability signals, three-axis acceleration signals and body motion intensity index signals, and combining bidirectional long short-term memory networks and temporal autocorrelation feature analysis, accurate identification and classification of human sleep states can be achieved.
The accuracy and anti-interference ability of sleep state recognition have been improved, and it can maintain a high recognition rate under conditions of intense body movement or strong noise interference, providing stable and reliable sleep monitoring support.
Smart Images

Figure CN120753596A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sleep stage detection, and in particular to a sleep stage detection method and system based on a smart watch. Background Art
[0002] As people's attention to sleep health continues to grow, sleep monitoring technology is playing an increasingly important role in the healthcare field. Traditional sleep monitoring mainly relies on polysomnography, which must be performed in professional medical institutions. Not only is the testing process complicated, but it also requires the testee to wear multiple sensors, which seriously affects sleep comfort. Furthermore, the equipment is expensive, making it difficult to meet the needs of daily home monitoring.
[0003] At present, some sleep monitoring solutions based on portable devices have appeared on the market. For example, the patent with application number CN202510238137.9 discloses a sleep staging detection method based on polysomnography. This method extracts different frequency features through multiple CNN sequences and uses a multi-level model for sleep staging identification. However, this method still requires the collection of polysomnography data, the equipment is inconvenient to carry, and the signal acquisition is easily interfered by factors such as body movement, which reduces the accuracy of recognition. In addition, this method mainly relies on the CNN network for feature extraction, fails to fully utilize the temporal correlation of sleep signals, resulting in an inaccurate characterization of the sleep state transition process.
[0004] In recent years, with the widespread adoption of wearable devices such as smartwatches, sleep monitoring methods based on single sensors have gradually gained popularity. However, existing smartwatch-based sleep monitoring methods have the following major problems: First, most methods rely solely on a single physiological signal source for sleep state identification, such as heart rate variability or acceleration data, which lacks sufficient information dimensionality and is easily affected by environmental noise. Second, existing methods perform relatively simple noise reduction and feature extraction on the raw signal, failing to effectively remove the influence of various interfering factors. Finally, the temporal dependence of sleep states is often overlooked in the design of sleep stage identification models, resulting in low accuracy in determining sleep state transitions.
[0005] Therefore, how to achieve accurate and reliable sleep stage recognition based on portable devices such as smart watches has become a technical problem that needs to be solved urgently in this field. In response to the above problem, the present invention proposes a new sleep stage recognition method based on multi-source signal fusion. Summary of the Invention
[0006] In view of this, the present invention provides a sleep stage detection method and system based on a smart watch, the purpose of which is to accurately identify and classify the human body's sleep state by fusing heart rate variability signals, three-axis acceleration signals and body movement intensity index signals, combining bidirectional long short-term memory networks and temporal autocorrelation feature analysis.
[0007] To achieve the above objectives, the present invention provides a sleep stage detection method based on a smart watch, comprising the following steps: S1: Using the smartwatch's sensors, the wearer's heart rate variability, triaxial accelerometer data, and body movement intensity index (BMI) are acquired. Multi-source signal fusion and time synchronization are then performed to obtain synchronized multi-source signals. S2: Perform noise reduction on the synchronized multi-source signals, extract time domain features, and construct feature vectors; S3: Calculate the time series autocorrelation feature of the feature vector; the time series autocorrelation feature is to calculate the autocorrelation coefficient of the four dimensions of the feature vector at each time delay, and then take the average of the autocorrelation coefficients of the four dimensions as the autocorrelation feature of the time delay; S4: Based on the bidirectional long short-term memory network, the input feature vector and temporal autocorrelation features are temporally modeled to obtain the fused bidirectional feature representation; S5: Multi-classification processing is performed on the fused bidirectional feature representation based on the Softmax classifier to achieve accurate classification of sleep stages.
[0008] Optionally, in step S1, the wearer's heart rate variability, accelerometer data, and body movement intensity index are acquired through sensors of the smartwatch and multi-source signal fusion and time synchronization are performed, including: S11: Collect heart rate variability signals and perform sliding window filtering, specifically: ; in, for Heart rate variability signal at each sampling point; is the sum function; is the sliding window weight function, is the time index within the sliding window, is the sliding window size; for Heart rate variability signal at each sampling point; S12: Get triaxial accelerometer data and calculate synthetic acceleration , specifically: ; in, for The synthetic acceleration of the sampling point at the moment; 、 and They are The sampling point at axis, Axis and The acceleration component in the axial direction; S13: Calculate the body movement intensity index , specifically: ; in, for The body movement intensity index at the sampling point; The length of the time window required to calculate the body movement intensity index; The time index within the time window required to calculate the body movement intensity index; for The synthetic acceleration of the sampling point at the moment; is the attenuation coefficient; is a natural constant; S14: Constructing a multi-source signal fusion matrix , specifically: ; in, for Multi-source signal fusion matrix of the sampling point at the moment; 、 and They are Heart rate variability signal at each sampling point, The composite acceleration and The body movement intensity index of the sampling point at the moment is normalized to interval; S15: Time synchronization of the multi-source signal fusion matrix to obtain synchronized multi-source signals , specifically: ; in, for Multi-source signals after synchronization of moment sampling points; for The first in the multi-source signal fusion matrix of the sampling point at time a signal; For the The time delay of a signal; For the The weight coefficient of each signal; .
[0009] Optionally, in step S2, the collected original signal is subjected to noise reduction processing, and time domain features are extracted to construct a feature vector, including: S21: Using wavelet transform to perform multi-scale decomposition on the synchronized multi-source signals, specifically: ; in, For the Layer Wavelet decomposition coefficients of the sampling points at time instant; is the number of decomposition layers; is the wavelet transform function; S22: Perform noise reduction processing using a threshold function, specifically: ; in, For the Layer The wavelet coefficients after noise reduction at the moment sampling point; is a symbolic function; For the Threshold parameters of the layer; S23: Reconstruct the signal through the wavelet reconstruction function to obtain the reconstructed signal , specifically: ; in, for The signal reconstructed at the sampling point at that moment; is the total number of wavelet decomposition layers; is the wavelet reconstruction function; S24: Extract the time domain features of the reconstructed signal to form a feature vector , specifically: ; in, for Feature vector of sampling point at time instant; for Average amplitude of sampling points at the moment; for RMS value of the sampling point at the moment; for Maximum amplitude of the sampling point at a given moment; for The rate of change of the waveform at the sampling point at the moment; and They are Sampling point and The signal reconstructed at the sampling point at that moment; Count variables for temporary sampling points; The length of the feature extraction time window.
[0010] Optionally, calculating the time series autocorrelation feature of the feature vector in step S3 includes: Calculate eigenvectors The time series autocorrelation characteristics are obtained to obtain the autocorrelation coefficient sequence , specifically: ; in, Time delay The autocorrelation coefficient of is the total length of the sequence; is the time delay, , is the maximum delay; ; express Sampling point No. Dimensional characteristics; express Time sampling point No. Dimensional characteristics; for The feature vector of the sampling point at time.
[0011] Optionally, in step S4, based on a bidirectional long short-term memory network structure, temporal modeling is performed on the input feature vector and temporal autocorrelation feature to obtain a fused bidirectional feature representation, including: S41: Construct the forward network input sequence, specifically: ; in, for The forward network input sequence of the sampling point at time; is the length of the historical time window; S42: Construct the forward network gating unit, specifically: ; in, for Input gate status at the moment sampling point; for Output gate status at the moment sampling point; for Candidate status of sampling points at a given moment; 、 、 Both are forward weight matrices; 、 、 Both are forward cycle weight matrices; 、 、 are bias vectors; for The forward hidden state of the sampling point at time; is the S-type activation function; is the hyperbolic tangent function; S43: Construct a backward network gating unit, specifically: ; in, for The state of the backward input gate at the sampling point at the moment; for The backward output gate state at the sampling point at the moment; for Backward candidate state of the sampling point at the moment; 、 、 Both are backward weight matrices; 、 、 Both are backward recurrent weight matrices; 、 、 are all backward bias vectors; for The backward hidden state of the sampling point at the moment; S44: Update the bidirectional long short-term memory network state, specifically: ; in, and They are Sampling point and Forward memory state of the moment sampling point; and for Sampling point and The backward memory state of the sampling point at the moment; ⊙ is the element-by-element multiplication; S45: Perform time series modeling on the input feature vector and time series autocorrelation features to obtain the fused bidirectional feature representation, specifically: ; in, for Bidirectional feature representation after fusion of moment sampling points.
[0012] Optionally, in step S5, multi-classification processing is performed on the fused bidirectional feature representation based on a Softmax classifier to achieve accurate classification of sleep stages, including: S51: Based on the fused bidirectional feature representation, construct a labeled dataset, where each sample contains the fused bidirectional feature representation and the corresponding labeled sleep stage labels , They represent the wakefulness period, rapid eye movement period, light sleep period, and deep sleep period respectively. During the training phase, the Softmax classifier is used to calculate the probability distribution of each sleep stage category, specifically: ; in, For training samples Bidirectional feature representation after fusion of moment sampling points; For the training phase The bidirectional feature representation after the fusion of the sampling points at the moment belongs to the The probability of each category; They correspond to the wakefulness period, rapid eye movement period, light sleep period and deep sleep period respectively; For the The weight vector of the class; For the Class bias; is an exponential function; S52: Train the Softmax classifier to obtain a trained Softmax classifier. Specifically, the Softmax classifier is trained using a mini-batch stochastic gradient descent method. During the training phase, cross entropy is used as the loss function. An L2 regularization term is introduced to prevent overfitting. The training process continues until the accuracy of the epoch validation set does not improve for five consecutive rounds or the maximum number of training rounds, 100, is reached. S53: Based on the trained Softmax classifier, the sleep stage classification results are calculated for the predicted samples, specifically: ; in, For the sample to be predicted Bidirectional feature representation after fusion of moment sampling points; For the prediction stage The bidirectional feature representation after the fusion of the sampling points at the moment belongs to the The probability of each category; and are the trained model parameters; for Sleep state classification results at the sampling point in time.
[0013] The present invention also discloses a sleep stage detection system based on a smart watch, comprising: Signal acquisition module: This module uses the smartwatch's sensors to acquire the wearer's heart rate variability, triaxial accelerometer data, and body movement intensity index (BMI) as three original physiological signals. It then performs multi-source signal fusion and time synchronization to obtain synchronized multi-source signals. Signal preprocessing module: performs noise reduction on the synchronized multi-source signals, extracts time domain features, and constructs feature vectors; Time series autocorrelation module: calculates the time series autocorrelation features of the feature vector; Bidirectional feature module: Based on the bidirectional long short-term memory network, it performs temporal modeling on the input feature vector and temporal autocorrelation features to obtain a fused bidirectional feature representation; Classification module: Based on the Softmax classifier, multi-classification processing is performed on the fused bidirectional feature representation to achieve accurate classification of sleep stages.
[0014] Compared with the prior art, the present invention has at least the following beneficial effects: The present invention combines heart rate variability signals with triaxial acceleration signals through multi-source fusion, introduces a time-attenuated body motion intensity index, and optimizes signal combination through adaptive weighting coefficients. This multi-source signal fusion strategy not only improves the information richness of sleep state identification but also effectively offsets the limitations of a single signal source, significantly enhancing the system's anti-interference capabilities. This method maintains a high recognition accuracy, especially under conditions of intense body motion or strong measurement noise interference, providing more stable and reliable technical support for sleep monitoring.
[0015] This paper achieves refined processing of the original signal by combining multi-scale decomposition using wavelet transforms with adaptive threshold noise reduction, and innovatively constructs a time-domain feature vector containing the average amplitude, root mean square value, maximum amplitude, and waveform change rate. On this basis, time series autocorrelation feature analysis is introduced to further explore the signal's periodic variation patterns and long-range dependency characteristics. This multi-level feature extraction method not only comprehensively characterizes the time-domain characteristics of sleep signals, but also accurately captures the key features of sleep state transitions, providing a rich feature representation for sleep stage identification.
[0016] This paper uses a bidirectional long short-term memory network to perform deep temporal modeling of feature sequences. Through forward and backward information transfer, combined with fine-tuning of the gating mechanism, it accurately models the temporal dependencies of sleep states. Simultaneously, a softmax classifier and an adaptive learning rate adjustment strategy are introduced to establish an end-to-end sleep stage recognition framework. This method, combining deep learning with traditional feature engineering, not only significantly improves the accuracy of sleep state recognition but also has strong generalization capabilities, can adapt to individual differences among different users, and provides a reliable technical support for sleep health monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is a flowchart of a sleep stage detection method based on a smart watch according to an embodiment of the present invention; Figure 2Schematic diagram of multi-source signal fusion according to an embodiment of the present invention, including: (a) heart rate variability signal schematic diagram; (b) accelerometer signal schematic diagram; (c) body motion intensity signal schematic diagram; and (d) multi-source fusion schematic diagram. DETAILED DESCRIPTION
[0018] The present invention will be further described below with reference to the accompanying drawings, but the present invention is not limited in any way. Any changes or substitutions made based on the teachings of the present invention fall within the scope of protection of the present invention.
[0019] Example 1: A sleep stage detection method based on a smart watch, such as Figure 1 As shown, the following steps are included: S1: Through the sensors of the smart watch, the wearer's heart rate variability, triaxial accelerometer data and body movement intensity index are obtained, and multi-source signal fusion and time synchronization are performed. Figure 2 Shown, including: S11: Collect heart rate variability signals and perform sliding window filtering, such as Figure 2 (a), specifically: ; in, for Heart rate variability signal at each sampling point; is the sum function; is the sliding window weight function, which is the Hanning window function in this embodiment, satisfying , is the time index within the sliding window, is pi, is the sliding window size, which is 1000 in this embodiment, representing 1000 sampling points; for Heart rate variability signal at each sampling point; S12: Get the three-axis accelerometer data, such as Figure 2 (b) Calculate the resultant acceleration , specifically: ; in, for The synthetic acceleration of the sampling point at the moment; 、 and They are The sampling point at axis, Axis and The acceleration component in the axial direction; S13: Calculate the body movement intensity index ,like Figure 2 (c), specifically: ; in, for The body movement intensity index at the sampling point; The time window length required for calculating the body movement intensity index is 6000 in this embodiment, representing 6000 sampling points; The time index within the time window required to calculate the body movement intensity index; for The synthetic acceleration of the sampling point at the moment; is the attenuation coefficient, which is 0.1 in this embodiment; is a natural constant; S14: Constructing a multi-source signal fusion matrix , specifically: ; in, for Multi-source signal fusion matrix of the sampling point at the moment; 、 and They are Heart rate variability signal at each sampling point, The composite acceleration and The body movement intensity index of the sampling point at the moment is normalized to interval; S15: Time synchronization of the multi-source signal fusion matrix to obtain synchronized multi-source signals ,like Figure 2 (d), specifically: ; in, for Multi-source signals after synchronization of moment sampling points; for The first in the multi-source signal fusion matrix of the sampling point at time a signal; For the The time delay of the signal, in this embodiment 、 and There are 0 sampling points, 5 sampling points and 10 sampling points respectively; For the The weight coefficient of the signal, in this embodiment 、 and 0.4, 0.3 and 0.3 respectively; .
[0020] It should be noted that this step first implements sliding window filtering of the heart rate variability signal, effectively eliminating high-frequency noise and mutation interference in the original signal, and improving the stability and reliability of the signal; secondly, by calculating the composite acceleration of the three-axis acceleration, it comprehensively reflects the human body's motion state and avoids the loss of motion characteristics that may be caused by single-direction acceleration data; thirdly, the calculation of the body motion intensity index is introduced, and the exponential decay weighting method is adopted, which not only retains the importance of recent body motion information, but also takes into account the reference value of historical body motion information, so that the body motion intensity index can more accurately reflect the continuous change process of the human body's activity state.
[0021] S2: Perform noise reduction on the synchronized multi-source signals, extract time domain features, and construct feature vectors, including: S21: Using wavelet transform to synchronize the multi-source signals Perform multi-scale decomposition, specifically: ; in, For the Layer Wavelet decomposition coefficients of the sampling points at time instant; To decompose the number of layers, in this embodiment ; is a wavelet transform function, which is the db4 wavelet basis function in this embodiment; S22: Perform noise reduction processing using a threshold function, specifically: ; in, For the Layer The wavelet coefficients after noise reduction at the moment sampling point; is a symbolic function; For the The threshold parameter of the layer, in this embodiment 、 and 0.5, 0.3 and 0.2 respectively; S23: Reconstruct the signal through the wavelet reconstruction function to obtain the reconstructed signal , specifically: ; in, for The signal reconstructed at the sampling point at that moment; is the total number of wavelet decomposition layers, which is 3 in this embodiment; is the wavelet reconstruction function; S24: Extract the time domain features of the reconstructed signal to form a feature vector , specifically: ; in, for Feature vector of sampling point at time; for Average amplitude of sampling points at the moment; for RMS value of the sampling point at the moment; for Maximum amplitude of the sampling point at a given moment; for The rate of change of the waveform at the sampling point at the moment; and They are Sampling point and The signal reconstructed at the sampling point at that moment; Count variables for temporary sampling points; is the length of the feature extraction time window. In this embodiment, 1000 represents 1000 sampling points.
[0022] It should be noted that this step first uses the db4 wavelet basis function to perform three-layer multi-scale decomposition, making full use of the localization characteristics of the wavelet transform in the time-frequency domain, and can effectively capture the detailed features of the signal in different frequency bands; secondly, an adaptive threshold function is introduced for noise reduction processing. By setting different threshold parameters for different decomposition layers, hierarchical suppression of noise is achieved, which not only retains the important features of the signal but also effectively removes noise interference of different scales; thirdly, the denoised signal is restored through wavelet reconstruction to ensure the integrity and continuity of the signal.
[0023] S3: Calculate the time series autocorrelation feature of the feature vector, wherein the time series autocorrelation feature is to calculate the autocorrelation coefficient of the four dimensions of the feature vector at each time delay, and then take the average of the autocorrelation coefficients of the four dimensions as the autocorrelation feature of the time delay; including: Calculate eigenvectors The time series autocorrelation characteristics are obtained to obtain the autocorrelation coefficient sequence , specifically: ; in, Time delay The autocorrelation coefficient of is the total length of the sequence, which is 6000 in this embodiment, representing 6000 sampling points; is the time delay, , is the maximum delay amount, which is 1000 in this embodiment, representing 1000 sampling points; ; express Time sampling point No. Dimensional characteristics; express Time sampling point No. Dimensional characteristics; for The feature vector of the sampling point at time.
[0024] This step calculates the autocorrelation coefficients of the four-dimensional eigenvectors respectively, which comprehensively reflects the correlation variation law of different characteristic components in the time dimension, and helps to discover the periodic pattern and long-range dependence characteristics of the signal.
[0025] S4: Based on the bidirectional long short-term memory network, the input feature vector and temporal autocorrelation features are modeled to obtain the fused bidirectional feature representation, including: S41: Construct the forward network input sequence, specifically: ; in, for The forward network input sequence of the sampling point at time; is the length of the historical time window, which is 100 in this embodiment, representing 100 sampling points; S42: Construct the forward network gating unit, specifically: ; in, for Input gate status at the moment sampling point; for Output gate status at the moment sampling point; for Candidate status of sampling points at a given moment; 、 、 Both are forward weight matrices; 、 、 Both are forward cycle weight matrices; 、 、 are bias vectors; for The forward hidden state of the sampling point at time; is the S-type activation function; is the hyperbolic tangent function; S43: Construct a backward network gating unit, specifically: ; in, for The state of the backward input gate at the sampling point at the moment; for The backward output gate state at the sampling point at the moment; for Backward candidate state of the sampling point at the moment; 、 、 Both are backward weight matrices; 、 、 Both are backward recurrent weight matrices; 、 、 are all backward bias vectors; for The backward hidden state of the sampling point at the moment; S44: Update the bidirectional long short-term memory network state, specifically: ; in, and They are Sampling point and Forward memory state of the moment sampling point; and for Sampling point and The backward memory state of the sampling point at the moment; ⊙ is the element-by-element multiplication; S45: Perform time series modeling on the input feature vector and time series autocorrelation features to obtain the fused bidirectional feature representation, specifically: ; in, for Bidirectional feature representation after fusion of moment sampling points; in this embodiment, the network hidden layer dimension is set to 128.
[0026] It should be noted that this step uses a bidirectional long short-term memory network to simultaneously consider the influence of historical information and future information. Through information transmission in both forward and backward directions, it can fully capture the temporal dependencies of sleep signals. Secondly, the gating mechanism of the long short-term memory network can adaptively control the transmission and forgetting of information. The input gate is responsible for selectively receiving new information, the forget gate can clear irrelevant historical information, and the output gate controls the output strength of information. This sophisticated information regulation mechanism is particularly suitable for processing the gradual process of sleep state.
[0027] S5: Multi-classification processing is performed on the fused bidirectional feature representation based on the Softmax classifier to achieve accurate classification of sleep stages, including: S51: Construct a labeled dataset based on the data processed in steps S1-S4, where each sample contains the fused bidirectional feature representation and the corresponding labeled sleep stage labels , They represent the wakefulness period, rapid eye movement period, light sleep period and deep sleep period respectively; during the training phase, the Softmax classifier is used to calculate the probability distribution of each category, specifically: ; in, For training samples Bidirectional feature representation after fusion of moment sampling points; For the training phase The bidirectional feature representation after the fusion of the sampling points at the moment belongs to the The probability of each category; They correspond to the wakefulness period, rapid eye movement period, light sleep period and deep sleep period respectively; For the The weight vector of the class; For the Class bias; is an exponential function; S52: Training the Softmax classifier to obtain a trained Softmax classifier, specifically: the training process of the Softmax classifier adopts the small batch stochastic gradient descent method; in the training stage, cross entropy is used as the loss function. In this embodiment, the batch size is set to 32, the initial value of the learning rate is set to 0.001, and an adaptive learning rate adjustment strategy is adopted. When the accuracy of the validation set does not improve for three consecutive epochs, the learning rate is reduced to 0.1 times the original value; at the same time, an L2 regularization term is introduced to prevent overfitting. In this embodiment, the regularization coefficient is set to 0.0001; the training process continues until the accuracy of the validation set does not improve for five consecutive rounds or the maximum number of training rounds is reached, 100 rounds; S53: Based on the trained Softmax classifier, the classification decision is calculated in the prediction phase, specifically: ; in, For the sample to be predicted Bidirectional feature representation after fusion of moment sampling points; For the prediction stage The bidirectional feature representation after the fusion of the sampling points at the moment belongs to the The probability of each category; and are the trained model parameters; for Sleep state classification results at the sampling point in time.
[0028] To further explain, this step constructs a standardized labeled dataset to clearly divide sleep states into four categories: wakefulness, rapid eye movement, light sleep, and deep sleep, providing a reliable training basis for the classification task; secondly, the Softmax classifier is used for multi-classification processing, which can convert the bidirectional feature representation into the probability distribution of each sleep state, not only outputting the final classification result, but also providing classification confidence information.
[0029] Example 2: The present invention also discloses a sleep stage detection system based on a smart watch, comprising the following five modules: Signal acquisition module: This module uses the smartwatch's sensors to acquire the wearer's heart rate variability, triaxial accelerometer data, and body movement intensity index (BMI) as three original physiological signals. It then performs multi-source signal fusion and time synchronization to obtain synchronized multi-source signals. Signal preprocessing module: performs noise reduction on the synchronized multi-source signals, extracts time domain features, and constructs feature vectors; Time series autocorrelation module: calculates the time series autocorrelation features of the feature vector; Bidirectional feature module: Based on the bidirectional long short-term memory network, it performs temporal modeling on the input feature vector and temporal autocorrelation features to obtain a fused bidirectional feature representation; Classification module: Based on the Softmax classifier, multi-classification processing is performed on the fused bidirectional feature representation to achieve accurate classification of sleep stages.
[0030] It should be noted that the serial numbers of the above-mentioned embodiments of the present invention are for descriptive purposes only and do not represent the advantages or disadvantages of the embodiments. In addition, the terms "including", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method comprising the element.
[0031] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0032] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A sleep stage detection method based on a smart watch, characterized in that: The following steps are involved: S1: Using the smartwatch's sensors, the wearer's heart rate variability, triaxial accelerometer data, and body movement intensity index (BMI) are acquired. Multi-source signal fusion and time synchronization are then performed to obtain synchronized multi-source signals. S2: Perform noise reduction on the synchronized multi-source signals, extract time domain features, and construct feature vectors; S3: Calculate the time series autocorrelation feature of the feature vector; the time series autocorrelation feature is to calculate the autocorrelation coefficient of the four dimensions of the feature vector at each time delay, and then take the average of the autocorrelation coefficients of the four dimensions as the autocorrelation feature of the time delay; S4: Based on the bidirectional long short-term memory network, the input feature vector and temporal autocorrelation features are temporally modeled to obtain the fused bidirectional feature representation; S5: Multi-classification processing is performed on the fused bidirectional feature representation based on the Softmax classifier to achieve accurate classification of sleep stages.
2. The sleep stage detection method based on a smart watch according to claim 1, characterized in that: Said S1 comprises: S11: Collect heart rate variability signals and perform sliding window filtering, specifically: ; in, for Heart rate variability signal at each sampling point; is the sum function; is the sliding window weight function, is the time index within the sliding window, is the sliding window size; for Heart rate variability signal at each sampling point; S12: Get triaxial accelerometer data and calculate synthetic acceleration , specifically: ; in, for The synthetic acceleration of the sampling point at the moment; 、 and They are The sampling point at axis, Axis and The acceleration component in the axial direction; S13: Calculate the body movement intensity index , specifically: ; in, for The body movement intensity index at the sampling point; The length of the time window required to calculate the body movement intensity index; The time index within the time window required to calculate the body movement intensity index; for The synthetic acceleration of the sampling point at the moment; is the attenuation coefficient; is a natural constant; S14: Constructing a multi-source signal fusion matrix , specifically: ; in, for Multi-source signal fusion matrix of the sampling point at the moment; 、 and They are Heart rate variability signal at each sampling point, The composite acceleration and The body movement intensity index of the sampling point at the moment is normalized to interval; S15: Time synchronization of the multi-source signal fusion matrix to obtain synchronized multi-source signals , specifically: ; in, for Multi-source signals after synchronization of moment sampling points; for The first in the multi-source signal fusion matrix of the sampling point at time a signal; For the The time delay of a signal; For the The weight coefficient of each signal; .
3. The sleep stage detection method based on a smart watch according to claim 2, characterized in that: The S2 includes: S21: Use wavelet transform to perform multi-scale decomposition on the synchronized multi-source signals, specifically: ; in, For the Layer Wavelet decomposition coefficients of the sampling points at time instant; is the number of decomposition layers; is the wavelet transform function; S22: Perform noise reduction processing using a threshold function, specifically: ; in, For the Layer The wavelet coefficients after noise reduction at the moment sampling point; is a symbolic function; For the Threshold parameters of the layer; S23: Reconstruct the signal through the wavelet reconstruction function to obtain the reconstructed signal , specifically: ; in, for The signal reconstructed at the sampling point at that moment; is the total number of wavelet decomposition layers; is the wavelet reconstruction function; S24: Extract the time domain features of the reconstructed signal to form a feature vector , specifically: ; in, for Feature vector of sampling point at time instant; for Average amplitude of sampling points at the moment; for RMS value of the sampling point at the moment; for Maximum amplitude of the sampling point at a given moment; for The rate of change of the waveform at the sampling point at the moment; and They are The sampling point and The signal reconstructed at the sampling point at that moment; Count variables for temporary sampling points; The length of the feature extraction time window.
4. The sleep stage detection method based on a smart watch according to claim 3, characterized in that: The S3 includes: Calculate eigenvectors The time series autocorrelation characteristics are obtained to obtain the autocorrelation coefficient sequence , specifically: ; in, Time delay The autocorrelation coefficient of is the total length of the sequence; is the time delay, , is the maximum delay; ; express Time sampling point No. Dimensional characteristics; express Time sampling point No. Dimensional characteristics; for The feature vector of the sampling point at time.
5. The sleep stage detection method based on a smart watch according to claim 4, characterized in that: The S4 includes: S41: Construct the forward network input sequence, specifically: ; in, for The forward network input sequence of the sampling point at time; is the length of the historical time window; S42: Construct the forward network gating unit, specifically: ; in, for Input gate status at the moment sampling point; for Output gate status at the moment sampling point; for Candidate status of sampling points at a given moment; 、 、 Both are forward weight matrices; 、 、 Both are forward cycle weight matrices; 、 、 are bias vectors; for The forward hidden state of the sampling point at time; is the S-type activation function; is the hyperbolic tangent function; S43: Construct a backward network gating unit, specifically: ; in, for The state of the backward input gate at the sampling point at the moment; for The backward output gate state at the sampling point at the moment; for Backward candidate state of the sampling point at the moment; 、 、 Both are backward weight matrices; 、 、 Both are backward recurrent weight matrices; 、 、 are all backward bias vectors; for The backward hidden state of the sampling point at the moment; S44: Update the bidirectional long short-term memory network state, specifically: ; in, and They are The sampling point and Forward memory state of the moment sampling point; and for The sampling point and The backward memory state of the sampling point at the moment; ⊙ is the element-by-element multiplication; S45: Perform time series modeling on the input feature vector and time series autocorrelation features to obtain the fused bidirectional feature representation, specifically: ; in, for Bidirectional feature representation after fusion of moment sampling points.
6. The sleep stage detection method based on a smart watch according to claim 5, characterized in that: The S5 includes: S51: Based on the fused bidirectional feature representation, construct a labeled dataset, where each sample contains the fused bidirectional feature representation and the corresponding labeled sleep stage labels , They represent the wakefulness period, rapid eye movement period, light sleep period, and deep sleep period respectively. During the training phase, the Softmax classifier is used to calculate the probability distribution of each sleep stage category, specifically: ; in, For training samples Bidirectional feature representation after fusion of moment sampling points; For the training phase The bidirectional feature representation after the fusion of the sampling points at the moment belongs to the The probability of each category; They correspond to the wakefulness period, rapid eye movement period, light sleep period and deep sleep period respectively; For the The weight vector of the class; For the Class bias; is an exponential function; S52: Train the Softmax classifier to obtain a trained Softmax classifier. Specifically, the Softmax classifier is trained using a mini-batch stochastic gradient descent method. During the training phase, cross entropy is used as the loss function. An L2 regularization term is introduced to prevent overfitting. The training process continues until the accuracy of the epoch validation set does not improve for five consecutive rounds or the maximum number of training rounds, 100, is reached. S53: Based on the trained Softmax classifier, the sleep stage classification results are calculated for the predicted samples, specifically: ; in, For the sample to be predicted Bidirectional feature representation after fusion of moment sampling points; The sample to be predicted The bidirectional feature representation after the fusion of the sampling points at the moment belongs to the The probability of each category; and is the trained Softmax classifier parameter; for Classification results of sleep stages at the moment sampling point.
7. A sleep stage detection system based on a smart watch, characterized in that: include: Signal acquisition module: This module uses the smartwatch's sensors to acquire the wearer's heart rate variability, triaxial accelerometer data, and body movement intensity index (BMI) as three original physiological signals. It then performs multi-source signal fusion and time synchronization to obtain synchronized multi-source signals. Signal preprocessing module: performs noise reduction on the synchronized multi-source signals, extracts time domain features, and constructs feature vectors; Time series autocorrelation module: calculates the time series autocorrelation features of the feature vector; Bidirectional feature module: Based on the bidirectional long short-term memory network, it performs temporal modeling on the input feature vector and temporal autocorrelation features to obtain a fused bidirectional feature representation; Classification module: Based on the Softmax classifier, multi-classification processing is performed on the fused bidirectional feature representation to achieve accurate classification of sleep stages; To implement a sleep stage detection method based on a smart watch as described in any one of claims 1-6.
Citation Information
Patent Citations
Sleep staging detection method and sleep staging detection device
CN119719921A
Sleep-aiding massage eyeshade based on brainwave resonance
CN117338515A
Sleep state monitoring method based on GM-GP algorithm
CN119377900A
Feature information extraction method and system of sleep state monitoring model
CN119498776A
HRV-based sleep monitoring analysis method and system
CN119673460A
Cited By
End-to-end sleep monitoring and event detection method based on wrist accelerometer
CN121080930A
Intelligent watch arrhythmia early warning method and system based on deep learning
CN121370102A