Sleep heart rate detection method and device based on BCG signal

Through the deep residual-long and short-term memory hybrid neural network model based on BCG signals, combined with time domain and frequency domain analysis, the continuity and accuracy of sleep heart rate monitoring in the prior art are solved, and high-precision sleep quality detection and real-time early warning are achieved.

CN120477698APending Publication Date: 2025-08-15GUANGZHOU INST OF RAILWAY TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510325362.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The prior art is difficult to achieve continuous and accurate monitoring of sleep heart rate, contact equipment affects comfort and contactless equipment measurement accuracy and stability are insufficient.

Method used

The sleep heart rate detection method based on BCG signal is adopted, and the deep residual-long and short-term memory hybrid neural network model is used, combined with time domain and frequency domain analysis, the characteristics of the heart rate signal are obtained, and the sleep quality scoring model is evaluated and alarmed.

Benefits of technology

It realizes high-precision contactless sleep quality detection, improves the robustness of heart rate signal extraction and the objectivity of sleep evaluation, and provides real-time hierarchical early warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120477698A_ABST
    Figure CN120477698A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of sleep heart rate detection, in particular to a sleep detection method based on a BCG signal, comprising: acquiring a BCG signal collected by a BCG sensor; performing data preprocessing on the BCG signal to obtain a processed BCG signal; inputting the processed BCG signal into a heart rate acquisition model to acquire a heart rate signal; performing time domain analysis and frequency domain analysis on the heart rate signal to obtain time domain characteristics and frequency domain characteristics of the heart rate signal; the time domain features comprise a standard deviation, a root-mean-square deviation and a percentage of an adjacent RR interval difference value exceeding 50ms; the frequency domain characteristic is a ratio of low-frequency power to high-frequency power; inputting the time domain feature and the frequency domain feature of the heart rate signal into a sleep quality scoring model to obtain a sleep quality score; and according to the sleep quality score and a sleep quality early warning rule set in advance, giving an alarm. The technical problem that in the prior art, it is difficult to continuously and accurately monitor the sleep heart rate is solved.
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 heart rate detection, and in particular to a sleep heart rate detection method and device based on BCG signals. Background Art

[0002] In today's society, people are paying more and more attention to health issues, and sleep quality, as one of the important indicators to measure health status, has received widespread attention. Heart rate, as a key parameter reflecting the physiological state of the human body, plays an intuitive and important role in sleep monitoring. Traditional contact heart rate monitoring devices, such as electrocardiogram (ECG) monitors, require electrodes to be attached to the user's body, which not only affects the user's sleep comfort, but may also cause inaccurate monitoring data due to electrode detachment or signal interference. In addition, when these devices are worn for a long time, the electrodes are easily affected by factors such as sweat and friction, resulting in poor signal stability, making it difficult to meet users' needs for convenience and comfort in sleep heart rate monitoring.

[0003] At the same time, existing non-contact heart rate monitoring technologies, such as photoplethysmography (PPG) measurements based on optical sensors, while somewhat avoiding the drawbacks of contact devices, still lack measurement accuracy and stability. PPG sensors are easily affected by factors such as changes in ambient light and user movement, resulting in high noise in the heart rate detection signal and an inability to accurately reflect the user's true heart rate changes during sleep. In addition, PPG measurements typically require the user to remain relatively still and are sensitive to body movements such as frequent tossing and turning during sleep, making it difficult to achieve continuous and accurate monitoring of sleeping heart rate.

[0004] Therefore, there is an urgent need for a sleep heart rate detection method and device based on BCG signals. Summary of the Invention

[0005] (1) Technical issues to be resolved

[0006] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides a method and device for detecting the sleeping heart rate based on BCG signals, which solves the technical problem in the prior art that it is difficult to achieve continuous and accurate monitoring of the sleeping heart rate.

[0007] (2) Technical solution

[0008] In order to achieve the above objectives, the main technical solutions adopted by the present invention include:

[0009] In a first aspect, an embodiment of the present invention provides a method for detecting a sleeping heart rate based on a BCG signal, comprising:

[0010] S100, obtaining a BCG signal collected by a BCG sensor; and performing data preprocessing on the BCG signal to obtain a processed BCG signal;

[0011] S200, inputting the processed BCG signal into a pre-established heart rate acquisition model to acquire a heart rate signal; the heart rate acquisition model is a deep residual-long short-term memory hybrid neural network model;

[0012] S300, performing time domain analysis and frequency domain analysis on the heart rate signal to obtain time domain features and frequency domain features of the heart rate signal; the time domain features include: standard deviation, root mean square deviation, and percentage of adjacent RR interval differences exceeding 50 ms; the frequency domain features include the ratio of low frequency power to high frequency power;

[0013] S400: Input the time domain features and frequency domain features of the heart rate signal into a sleep quality scoring model to obtain a sleep quality score; and issue an alarm based on the sleep quality score and a pre-set sleep quality warning rule.

[0014] Optionally, in S100, performing data preprocessing on the BCG signal to obtain the processed BCG signal includes:

[0015] S110, amplifying the BCG signal through a signal amplifier to obtain an amplified BCG signal;

[0016] S120, performing bandpass filtering and power frequency notch filtering on the amplified signal in sequence to obtain a BCG signal with noise removed; wherein the frequency range of the bandpass filtering is 0.5 Hz-30 Hz, and the center frequency of the power frequency notch filtering is 50 Hz;

[0017] S130 , performing analog-to-digital conversion on the BCG signal after noise removal, and generating a digitized BCG signal as a processed BCG signal using a sampling frequency of not less than 500 Hz.

[0018] Optionally, in S200, the heart rate acquisition model includes:

[0019] The preprocessing module standardizes the input processed BCG signal to generate time series data;

[0020] A deep residual network module, consisting of at least three residual blocks, each of which consists of a one-dimensional convolutional layer, a batch normalization layer, and an activation function, used to extract local spatial features of BCG signals from the input time series data;

[0021] The long short-term memory module is used to receive the local spatial features output by the deep residual network module and capture the temporal dependency of the BCG signal through at least one layer of LSTM units;

[0022] The attention mechanism module performs time-weighted weighting on the temporal dependencies of the BCG signals output by the long-short-term memory module to obtain weighted heart rate-related features.

[0023] The heart rate decoding module maps the weighted heart rate-related features into a heart rate signal through a fully connected layer to obtain the heart rate signal.

[0024] Optionally, the attention mechanism module adopts a multi-head self-attention mechanism, and the number of attention heads is no more than 4.

[0025] Optionally, the heart rate acquisition model is a pre-trained heart rate acquisition model;

[0026] The training method of the heart rate acquisition model is:

[0027] A weighted combination of the mean square error loss function and the dynamic time warping loss function is used; the Adam optimizer is used for end-to-end training, and the learning rate decay strategy is cosine annealing.

[0028] Optionally, the S300 includes:

[0029] S310, performing RR interval detection on the heart rate signal, locating the R wave apex in the heart rate signal using a peak detection algorithm, extracting the time intervals between adjacent R waves, and obtaining an RR interval sequence; and obtaining the standard deviation, root mean square deviation, and percentage of adjacent RR interval differences exceeding 50 ms of the RR interval sequence;

[0030] S320, performing interpolation resampling on the RR interval sequence to obtain an equally spaced heart rate variability signal, performing fast Fourier transform on the heart rate variability signal to obtain a power spectral density;

[0031] S330 , dividing the power spectrum density into a low-frequency power band and a high-frequency power band according to a preset physiological frequency band, and obtaining a ratio of the low-frequency power to the high-frequency power as a frequency domain feature.

[0032] Optionally, in S300, the preset physiological frequency band is:

[0033] When the frequency is 0.04-0.15Hz, it is divided into the low-frequency power band;

[0034] When the frequency is 0.15-0.4Hz, it is divided into the high-frequency power band.

[0035] Optionally, the step S400 of inputting the time domain features and frequency domain features of the heart rate signal into a sleep quality scoring model to obtain a sleep quality score includes:

[0036] The time domain features and frequency domain features of the heart rate signal are input into the following formula to obtain the sleep quality score:

[0037]

[0038] Among them, ω1, ω2, ω3, and ω4 are the weights of each parameter, SQS is the sleep quality score, which is a percentage system, SDNN is the standard deviation, RMSSD is the root mean square difference, pNN50 is the percentage of adjacent RR intervals with a difference of more than 50 ms, and LF / HF is the ratio of low-frequency power to high-frequency power.

[0039] Optionally, in S400, the sleep quality warning rule set in advance includes:

[0040] When the sleep quality score is lower than the preset first threshold, a level one alarm is triggered; when the sleep quality score is higher than the first threshold and lower than the second threshold, a level two alarm is triggered;

[0041] And when the score drop rate of adjacent time windows exceeds the preset change rate threshold, a third-level alarm is triggered.

[0042] In a second aspect, an embodiment of the present invention provides a sleep detection device based on BCG signals, comprising:

[0043] A signal acquisition module is used to acquire the BCG signal collected by the BCG sensor; and perform data preprocessing on the BCG signal to obtain a processed BCG signal;

[0044] A heart rate signal acquisition module inputs the processed BCG signal into a pre-built heart rate acquisition model to acquire the heart rate signal; the heart rate acquisition model is a deep residual-long short-term memory hybrid neural network model;

[0045] a signal processing module, configured to perform time domain analysis and frequency domain analysis on the heart rate signal to obtain time domain features and frequency domain features of the heart rate signal; the time domain features include: standard deviation, root mean square deviation, and percentage of adjacent RR interval differences exceeding 50ms; the frequency domain features include the ratio of low-frequency power to high-frequency power;

[0046] The alarm module is used to input the time domain characteristics and frequency domain characteristics of the heart rate signal into the sleep quality scoring model to obtain a sleep quality score; and to issue an alarm based on the sleep quality score and pre-set sleep quality warning rules.

[0047] (3) Beneficial effects

[0048] The beneficial effects of the present invention are as follows: a sleep detection method and device based on BCG signals of the present invention, due to the use of a deep residual-long short-term memory hybrid neural network model combined with multimodal heart rate variability analysis, can achieve high-precision non-contact sleep quality detection compared with the existing technology, achieving the technical effects of improving the robustness of heart rate signal extraction, enhancing the objectivity of sleep assessment and the real-time nature of graded warning. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 Schematic diagram of a sleep detection method based on BCG signals. DETAILED DESCRIPTION

[0050] In order to better explain the present invention and facilitate understanding, the present invention is described in detail below through specific implementation methods in conjunction with the accompanying drawings.

[0051] BCG signal: BCG signal is a subtle change in the external pressure of the human body caused by heart beats and blood circulation in the aorta. It is a non-contact heart activity detection technology.

[0052] To better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. Instead, these embodiments are provided to enable a clearer and more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0053] Example 1

[0054] A sleep detection method based on BCG signals in this embodiment includes:

[0055] S100, obtaining a BCG signal collected by a BCG sensor; and performing data preprocessing on the BCG signal to obtain a processed BCG signal;

[0056] S200, inputting the processed BCG signal into a pre-established heart rate acquisition model to acquire a heart rate signal; the heart rate acquisition model is a deep residual-long short-term memory hybrid neural network model;

[0057] S300, performing time domain analysis and frequency domain analysis on the heart rate signal to obtain time domain features and frequency domain features of the heart rate signal; the time domain features include: standard deviation, root mean square deviation, and percentage of adjacent RR interval differences exceeding 50 ms; the frequency domain features include the ratio of low frequency power to high frequency power;

[0058] S400: Input the time domain features and frequency domain features of the heart rate signal into a sleep quality scoring model to obtain a sleep quality score; and issue an alarm based on the sleep quality score and a pre-set sleep quality warning rule.

[0059] This embodiment uses a highly sensitive, non-contact ballistocardiogram (BCG) sensor, mounted in the center of the mattress or bed board, roughly corresponding to the human heart. This sensor accurately captures the tiny mechanical vibrations caused by the heart pumping blood and converts these vibrations into electrical signals, providing raw data for subsequent heart rate detection. For example, a piezoelectric film sensor, at a sampling frequency of 100Hz, can simultaneously capture heartbeat, respiration, and body movement signals.

[0060] In this embodiment, the BCG sensor acquires BCG signals every minute. For BCG signal collection throughout the entire sleep cycle, the time window is set to the entire period from falling asleep to waking up. Typically, a normal adult sleeps between 6 and 9 hours at night. This time window fully captures BCG signal changes throughout the entire sleep process, providing sufficient data for a comprehensive analysis of sleep quality.

[0061] When inputting the processed BCG signal into the heart rate acquisition model, a sliding time window approach is used to obtain a stable heart rate signal. For example, a sliding time window of 3-5 minutes is set. As time passes, this window continuously slides, and the BCG signal within each window is processed to obtain the heart rate signal. This allows capturing heart rate fluctuations over shorter periods of time while also reflecting heart rate trends over longer periods of time.

[0062] When performing time and frequency domain analysis on heart rate signals, considering the normal fluctuation period of heart rate, analysis can be performed on heart rate signal segments every 3-5 minutes. This time window ensures sufficient data points for accurate time and frequency domain feature calculations and timely reflects changes in heart rate characteristics.

[0063] When the time domain features and frequency domain features of the heart rate signal are input into the sleep quality scoring model, 30 minutes is set as a scoring time window. Then, the time domain features and frequency domain features of the heart rate signal input into the sleep quality scoring model are the average values of the time domain features and the average values of the frequency domain features every 30 minutes.

[0064] The BCG signal-based sleep detection method of this embodiment is not only suitable for home sleep monitoring, but can also be widely used in hospital wards, nursing homes, sports rehabilitation centers, and other places to provide professional sleep heart rate monitoring services for different populations. In hospital wards, it can help doctors monitor patients' sleeping heart rates in real time and promptly identify potential heart problems; in nursing homes, it can provide long-term sleep health management for the elderly, improving their quality of life; and in sports rehabilitation centers, it can provide athletes with scientific sleep monitoring and recovery guidance to assist their training and competitions.

[0065] The sleep detection method based on BCG signals in this embodiment ensures that BCG signal changes throughout the entire sleep process are fully captured. It also uses a deep residual-long short-term memory hybrid neural network model and processes BCG signals with a 3-5 minute sliding time window. This method can capture both short-term heart rate fluctuations and long-term heart rate trends. This improves the accuracy and stability of heart rate signal extraction and facilitates more precise assessment of heart rate variations during sleep.

[0066] Example 2

[0067] A sleep detection method based on BCG signals in this embodiment includes:

[0068] Step S100: obtaining a BCG signal collected by a BCG sensor; and performing data preprocessing on the BCG signal to obtain a processed BCG signal;

[0069] Step S200: Input the processed BCG signal into a pre-built heart rate acquisition model to acquire the heart rate signal; the heart rate acquisition model is a deep residual-long short-term memory hybrid neural network model;

[0070] Step S300: Perform time domain analysis and frequency domain analysis on the heart rate signal to obtain time domain features and frequency domain features of the heart rate signal; the time domain features include: standard deviation, root mean square deviation, and the percentage of adjacent RR interval differences exceeding 50ms; the frequency domain features are the ratio of low frequency power to high frequency power;

[0071] Step S400: Input the time domain features and frequency domain features of the heart rate signal into a sleep quality scoring model to obtain a sleep quality score; and issue an alarm based on the sleep quality score and pre-set sleep quality warning rules.

[0072] In step S100, data preprocessing is performed on the BCG signal to obtain the processed BCG signal, including:

[0073] Step S110: amplifying the BCG signal through a signal amplifier to obtain an amplified BCG signal;

[0074] Specifically, because BCG signals are typically very weak, they must first be amplified using a signal amplifier to improve the signal-to-noise ratio and ensure the effectiveness of subsequent processing. In practice, a low-noise amplifier with high input impedance is selected to reduce the impact of external interference and internal circuit noise. The specific amplification factor is determined by the actual sensor output and the required signal-to-noise ratio. For most applications, the amplification factor can be adjusted between 100x and 1000x.

[0075] Step S120: performing bandpass filtering and power frequency notch filtering on the amplified signal in sequence to obtain a BCG signal with noise removed; wherein the frequency range of the bandpass filtering is 0.5 Hz-30 Hz, and the center frequency of the power frequency notch filtering is 50 Hz;

[0076] Bandpass filtering removes frequency components outside the 0.5Hz to 30Hz range. These frequencies typically cover the primary frequency bands of physiological signals such as heartbeat and respiration, while also eliminating unnecessary high-frequency noise. In the specific implementation, a second-order or higher-order Butterworth bandpass filter is designed with a lower cutoff frequency of 0.5Hz and an upper cutoff frequency of 30Hz.

[0077] The purpose of power frequency notch filtering is to eliminate 50Hz power frequency interference introduced by power lines, one of the most common types of environmental electromagnetic interference. In the specific implementation, a narrowband notch filter is used with a center frequency set to 50Hz (for China).

[0078] Step S130 : performing analog-to-digital conversion on the BCG signal after noise removal, and generating a digitized BCG signal as a processed BCG signal using a sampling frequency of not less than 500 Hz.

[0079] When performing analog-to-digital conversion, a high-speed ADC (analog-to-digital converter) with a resolution of at least 16 bits is selected to ensure sufficient accuracy. The sampling frequency is also maintained at a minimum of 500Hz. This not only meets the requirements of the Nyquist sampling theorem but also captures rapidly changing heartbeat and respiratory signals. Furthermore, an anti-aliasing filter is added to the ADC front end to prevent aliasing caused by signal components above the Nyquist frequency, which could affect the final data quality.

[0080] In this embodiment, the heart rate acquisition model in step S200 includes:

[0081] The preprocessing module standardizes the input processed BCG signal to ensure that the data has zero mean and unit variance, generating time series data to improve the stability and efficiency of subsequent processing;

[0082] Specifically, for each time series segment, its mean and standard deviation are calculated, and these statistics are used to normalize the data.

[0083] The deep residual network module includes at least 3 residual blocks, each of which consists of a one-dimensional convolutional layer, a batch normalization layer, and an activation function, and is used to extract the local spatial features of the BCG signal from the input time series data; the convolutional layer uses a filter of appropriate size (for example, 3 or 5) to capture the different frequency components of the BCG signal.

[0084] The long short-term memory module is used to receive the local spatial features output by the deep residual network module and capture the temporal dependency of the BCG signal through at least one layer of LSTM units;

[0085] The forward and backward layers of the LSTM unit each have 128 hidden units, and the peephole connection enhances the temporal memory. The temporal dependency is output every 10 time steps to form coarse-grained temporal features.

[0086] The attention mechanism module performs time-weighted weighting on the temporal dependencies of the BCG signals output by the long-short-term memory module to obtain weighted heart rate-related features.

[0087] The attention mechanism module adopts a multi-head self-attention mechanism, and the number of attention heads does not exceed 4.

[0088] Specifically, multi-head self-attention (4 heads) implements:

[0089] The 256-dimensional features output by LSTM are divided into four 64-dimensional subspaces, and scaled dot product attention is calculated for each subspace. A learnable rotational position encoding (RoPE) is introduced with an encoding length of 32. Furthermore, the attention window is limited to ±5 seconds, and a spectral weight mask is applied to the heart rate fluctuation sensitive frequency band (0.5-5Hz).

[0090] The heart rate decoding module maps weighted heart rate-related features into a heart rate signal through a fully connected layer, obtaining the heart rate signal. The fully connected layer can contain one or more hidden layers, with the number of layers and neurons per layer adjusted based on actual needs. The output layer typically uses a linear activation function to directly output the predicted heart rate value.

[0091] In the specific implementation process, the heart rate acquisition model is a heart rate acquisition model trained in advance;

[0092] The training method of the heart rate acquisition model is:

[0093] A weighted combination of the mean square error loss function and the dynamic time warping loss function is used; the Adam optimizer is used for end-to-end training, and the learning rate decay strategy is cosine annealing.

[0094] Among them, the mean square error loss function can measure the difference between the predicted heart rate signal and the true heart rate signal. The specific formula is:

[0095]

[0096] Among them, yi is the real heart rate value, is the heart rate value predicted by the model, and n is the number of samples.

[0097] The dynamic time warping loss function measures the similarity between two time series by calculating the shortest path distance between them, allowing for a certain degree of time warping. This enhances the model's ability to adapt to changes in heartbeat patterns between individuals and improves model generalization performance.

[0098] Furthermore, cosine annealing helps the model escape from local minima by gradually reducing the learning rate while maintaining a high convergence rate. The specific formula is as follows:

[0099]

[0100] Among them, η t is the learning rate of the current iteration, η max and η min are the maximum and minimum values of the learning rate, T cur is the current epoch number, T max is the total number of epochs.

[0101] Compared with fixed learning rate or step-by-step decay, cosine annealing can provide a smoother learning rate adjustment process, which helps the model find a better solution space.

[0102] The detailed training method described above, especially the weighted combination of the mean squared error loss function and the dynamic time warping loss function, end-to-end training using the Adam optimizer, and learning rate adjustment using the cosine annealing strategy, can effectively improve the accuracy and robustness of the heart rate acquisition model, thereby better serving the task of sleep quality detection based on BCG signals.

[0103] Specifically, when training the heart rate acquisition model in this embodiment, a training data set is used for training, wherein the training data set includes: historical real heart rate signals and BCG signals;

[0104] Furthermore, the training dataset consists of a training set, a validation set, and a test set, with a ratio of 70%, 15%, and 15%. The training set is used for model training, the validation set is used to adjust model hyperparameters, and the test set is used for final model performance evaluation. During training, the model learns the mapping relationship between BCG signal features and heart rate labels, enabling accurate heart rate estimation, providing a reliable basis for health monitoring of railway workers.

[0105] In this embodiment, step S300 includes:

[0106] Step S310: Perform RR interval detection on the heart rate signal, locate the R wave apex in the heart rate signal using a peak detection algorithm, extract the time intervals between adjacent R waves, and obtain an RR interval sequence; and obtain the standard deviation, root mean square deviation, and percentage of adjacent RR interval differences exceeding 50 ms of the RR interval sequence;

[0107] In specific implementations, a differential threshold method or a wavelet transform-based approach is used to initially identify possible R-wave locations. A local maximum search technique is then applied to locate the exact R-wave apex within each cardiac cycle. The search range can be limited by setting a window size to improve computational efficiency. For each identified R-wave location, the time difference between it and the previous R-wave location is calculated to form a sequence of R-R intervals.

[0108] Furthermore, the standard deviation of the RR interval series can measure the overall heart rate variability and is related to the comprehensive regulation of the autonomic nervous system. Its calculation formula is:

[0109]

[0110] Among them, SDNN is the standard deviation of the RR interval series, MeanRR is the average value of all RR intervals, reflecting the average heart rate, RR i is the heart rate value of the i-th time window, and N is the time window.

[0111] The root mean square deviation can reflect the activity of the parasympathetic nerve (vagus nerve). The calculation formula is:

[0112]

[0113] Here, RMSSD is the root mean square difference.

[0114] Step S320: performing interpolation resampling on the RR interval sequence to obtain an equally spaced heart rate variability signal, performing fast Fourier transform on the heart rate variability signal to obtain a power spectral density;

[0115] Step S330: Divide the power spectrum density into a low-frequency power band and a high-frequency power band according to a preset physiological frequency band, and obtain the ratio of the low-frequency power to the high-frequency power as a frequency domain feature.

[0116] Step S330 specifically includes: dividing the power spectrum density into a low-frequency power band and a high-frequency power band according to a preset physiological frequency band, and numerically integrating the power spectrum density in the low-frequency band and the high-frequency band respectively to obtain:

[0117] Low frequency power:

[0118] High frequency power:

[0119] Among them, P(f) is the power spectrum density value at frequency f, and the ratio of low-frequency power to high-frequency power is used as the frequency domain feature.

[0120] Furthermore, in step S320, performing fast Fourier transform on the heart rate variability signal to obtain the power spectrum density specifically includes:

[0121] Detrending: Detrending the equally spaced heart rate variability signal to eliminate baseline drift;

[0122] Windowing: Hanning window is used to window the detrended signal to suppress spectrum leakage;

[0123] Fast Fourier Transform (FFT): Perform FFT calculation on the windowed signal to obtain the complex spectrum;

[0124] Power spectral density calculation: Divide the square of the complex spectrum amplitude by the signal length and the window function energy compensation coefficient to obtain the power spectral density value.

[0125] Among them, the preset physiological frequency bands are:

[0126] When the frequency is 0.04-0.15Hz, it is divided into the low-frequency power band;

[0127] When the frequency is 0.15-0.4Hz, it is divided into the high-frequency power band.

[0128] In step S400, the time domain features and frequency domain features of the heart rate signal are input into the sleep quality scoring model. Obtaining the sleep quality score includes:

[0129] The time domain and frequency domain features of the heart rate signal are input into the following formula to obtain the sleep quality score:

[0130]

[0131] Among them, ω1, ω2, ω3, and ω4 are the weights of each parameter, SQS is the sleep quality score, which is a percentage system, SDNN is the standard deviation, RMSSD is the root mean square difference, pNN50 is the percentage of adjacent RR intervals with a difference of more than 50 ms, and LF / HF is the ratio of low-frequency power to high-frequency power.

[0132] Furthermore, in step S400, the sleep quality warning rules set in advance include:

[0133] When the sleep quality score is lower than the preset first threshold, a level one alarm is triggered; when the sleep quality score is higher than the first threshold and lower than the second threshold, a level two alarm is triggered;

[0134] And when the score drop rate of adjacent time windows exceeds the preset change rate threshold, a third-level alarm is triggered.

[0135] The sleep detection method based on BCG signals in this embodiment realizes high-precision non-contact sleep quality detection, achieving the technical effects of improving the robustness of heart rate signal extraction, enhancing the objectivity of sleep assessment and the real-time performance of graded warning.

[0136] Example 3

[0137] A sleep detection device based on BCG signals in this embodiment includes:

[0138] The signal acquisition module is used to acquire the BCG signal collected by the BCG sensor; and perform data preprocessing on the BCG signal to obtain the processed BCG signal;

[0139] The heart rate signal acquisition module inputs the processed BCG signal into a pre-built heart rate acquisition model to obtain the heart rate signal; the heart rate acquisition model is a deep residual-long short-term memory hybrid neural network model;

[0140] The signal processing module is used to perform time domain analysis and frequency domain analysis on the heart rate signal to obtain the time domain characteristics and frequency domain characteristics of the heart rate signal; the time domain characteristics include: standard deviation, root mean square deviation, and the percentage of adjacent RR interval differences exceeding 50ms; the frequency domain characteristics are the ratio of low-frequency power to high-frequency power;

[0141] The alarm module is used to input the time domain characteristics and frequency domain characteristics of the heart rate signal into the sleep quality scoring model to obtain the sleep quality score; and to issue an alarm based on the sleep quality score and the sleep quality warning rules set in advance.

[0142] The sleep detection device based on BCG signals in this embodiment avoids interference with the user's sleep, improves the user's sleep quality and user experience, and simultaneously monitors the user's heart rate changes in real time, and provides instant sleep quality assessment through HRV analysis, providing timely health feedback to the user and the doctor.

[0143] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature specified as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, "plurality" means two or more, unless otherwise specifically defined.

[0144] In the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," "connect," "fixed," etc. should be understood broadly. For example, they may refer to fixed connection, detachable connection, or integration; mechanical connection or electrical connection; direct connection or indirect connection through an intermediate medium; and internal communication between two components or interaction between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.

[0145] In the present invention, unless otherwise expressly specified or limited, when a first feature is "above" or "below" a second feature, it may mean that the first and second features are in direct contact, or that the first and second features are in indirect contact through an intermediate medium. Furthermore, when a first feature is "above," "above," or "above" a second feature, it may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is at a higher level than the second feature. When a first feature is "below," "below," or "below" a second feature, it may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is at a lower level than the second feature.

[0146] In the description of this specification, the terms "one embodiment", "some embodiments", "embodiments", "examples", "specific examples" or "some examples" refer to the specific features, structures, materials or characteristics described in conjunction with the embodiment or example and included in at least one embodiment or example of the present invention. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and features of different embodiments or examples, unless they are mutually inconsistent.

[0147] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may alter, modify, replace and modify the above embodiments within the scope of the present invention.

Claims

1. A sleep detection method based on BCG signals, characterized in that: include: S100, obtaining a BCG signal collected by a BCG sensor; and performing data preprocessing on the BCG signal to obtain a processed BCG signal; S200, inputting the processed BCG signal into a pre-established heart rate acquisition model to acquire a heart rate signal; the heart rate acquisition model is a deep residual-long short-term memory hybrid neural network model; S300, performing time domain analysis and frequency domain analysis on the heart rate signal to obtain time domain features and frequency domain features of the heart rate signal; the time domain features include: standard deviation, root mean square deviation, and percentage of adjacent RR interval differences exceeding 50 ms; the frequency domain features include the ratio of low frequency power to high frequency power; S400: Input the time domain features and frequency domain features of the heart rate signal into a sleep quality scoring model to obtain a sleep quality score; and issue an alarm based on the sleep quality score and a pre-set sleep quality warning rule.

2. The sleep detection method based on BCG signals according to claim 1, characterized in that: In S100, performing data preprocessing on the BCG signal to obtain the processed BCG signal includes: S110, amplifying the BCG signal through a signal amplifier to obtain an amplified BCG signal; S120, performing bandpass filtering and power frequency notch filtering on the amplified signal in sequence to obtain a BCG signal with noise removed; wherein the frequency range of the bandpass filtering is 0.5 Hz-30 Hz, and the center frequency of the power frequency notch filtering is 50 Hz; S130 , performing analog-to-digital conversion on the BCG signal after noise removal, and generating a digitized BCG signal as a processed BCG signal using a sampling frequency of not less than 500 Hz.

3. The sleep detection method based on BCG signals according to claim 1, characterized in that: In S200, the heart rate acquisition model includes: The preprocessing module standardizes the input processed BCG signal to generate time series data; A deep residual network module, consisting of at least three residual blocks, each of which consists of a one-dimensional convolutional layer, a batch normalization layer, and an activation function, used to extract local spatial features of BCG signals from the input time series data; The long short-term memory module is used to receive the local spatial features output by the deep residual network module and capture the temporal dependency of the BCG signal through at least one layer of LSTM units; The attention mechanism module performs time-weighted weighting on the temporal dependencies of the BCG signals output by the long-short-term memory module to obtain weighted heart rate-related features. The heart rate decoding module maps the weighted heart rate-related features into a heart rate signal through a fully connected layer to obtain the heart rate signal.

4. The sleep detection method based on BCG signals according to claim 3, characterized in that: The attention mechanism module adopts a multi-head self-attention mechanism, and the number of attention heads does not exceed 4.

5. The sleep detection method based on BCG signals according to claim 3, characterized in that: The heart rate acquisition model is a heart rate acquisition model trained in advance; The training method of the heart rate acquisition model is: A weighted combination of the mean square error loss function and the dynamic time warping loss function is used; the Adam optimizer is used for end-to-end training, and the learning rate decay strategy is cosine annealing.

6. The sleep detection method based on BCG signals according to claim 1, characterized in that: The S300 includes: S310, performing RR interval detection on the heart rate signal, locating the R wave apex in the heart rate signal using a peak detection algorithm, extracting the time intervals between adjacent R waves, and obtaining an RR interval sequence; and obtaining the standard deviation, root mean square deviation, and percentage of adjacent RR interval differences exceeding 50 ms of the RR interval sequence; S320, performing interpolation resampling on the RR interval sequence to obtain an equally spaced heart rate variability signal, performing fast Fourier transform on the heart rate variability signal to obtain a power spectral density; S330 , dividing the power spectrum density into a low-frequency power band and a high-frequency power band according to a preset physiological frequency band, and obtaining a ratio of the low-frequency power to the high-frequency power as a frequency domain feature.

7. The sleep detection method based on BCG signals according to claim 6, characterized in that: In the above S300, the preset physiological frequency bands are: When the frequency is 0.04-0.15Hz, it is divided into the low-frequency power band; When the frequency is 0.15-0.4Hz, it is divided into the high-frequency power band.

8. The sleep detection method based on BCG signals according to claim 1, characterized in that: The step S400 of inputting the time domain features and frequency domain features of the heart rate signal into a sleep quality scoring model to obtain a sleep quality score includes: The time domain features and frequency domain features of the heart rate signal are input into the following formula to obtain the sleep quality score: Among them, ω1, ω2, ω3, and ω4 are the weights of each parameter, SQS is the sleep quality score, which is a percentage system, SDNN is the standard deviation, RMSSD is the root mean square difference, pNN50 is the percentage of adjacent RR intervals with a difference of more than 50 ms, and LF / HF is the ratio of low-frequency power to high-frequency power.

9. The sleep detection method based on BCG signals according to claim 1, characterized in that: In S400, the sleep quality warning rules set in advance include: When the sleep quality score is lower than the preset first threshold, a level one alarm is triggered; when the sleep quality score is higher than the first threshold and lower than the second threshold, a level two alarm is triggered; And when the score drop rate of adjacent time windows exceeds the preset change rate threshold, a third-level alarm is triggered.

10. A sleep detection device based on BCG signals, characterized in that: include: A signal acquisition module is used to acquire the BCG signal collected by the BCG sensor; and performing data preprocessing on the BCG signal to obtain a processed BCG signal; A heart rate signal acquisition module inputs the processed BCG signal into a pre-built heart rate acquisition model to acquire the heart rate signal; the heart rate acquisition model is a deep residual-long short-term memory hybrid neural network model; a signal processing module, configured to perform time domain analysis and frequency domain analysis on the heart rate signal to obtain time domain features and frequency domain features of the heart rate signal; the time domain features include: standard deviation, root mean square deviation, and percentage of adjacent RR interval differences exceeding 50ms; the frequency domain features include the ratio of low-frequency power to high-frequency power; The alarm module is used to input the time domain characteristics and frequency domain characteristics of the heart rate signal into the sleep quality scoring model to obtain a sleep quality score; and to issue an alarm based on the sleep quality score and pre-set sleep quality warning rules.