A sleep state real-time monitoring method and system
By collecting multimodal physiological data in real time using a non-invasive sleep mat and combining it with multimodal algorithms to determine sleep state and dynamically adjust interventions, this technology solves the problems of high user discomfort and poor monitoring compliance in existing technologies, and achieves comfortable and efficient sleep state monitoring and personalized guidance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAN NEW HOPE MEDICAL EQUIP CO LTD
- Filing Date
- 2025-10-27
- Publication Date
- 2026-04-24
AI Technical Summary
Existing sleep monitoring technologies rely on wearable devices, which are highly invasive, cause significant user discomfort, result in poor long-term monitoring compliance, lack proactive intervention mechanisms, cannot guide users into sleep in real time, and have insufficient connection between sleep stage segmentation and state assessment.
The non-invasive sleep pad integrates piezoelectric sensors, flexible dry electrodes, and pressure sensors to collect heart rate variability signals, electroencephalogram (EEG) signals, and body movement data in real time. It uses a multimodal algorithm to determine sleep status and initiate active intervention, dynamically adjusting music parameters to achieve personalized sleep guidance and full-cycle monitoring.
It improves monitoring comfort and accuracy, reduces user discomfort, enhances long-term monitoring compliance, and enables continuous monitoring and personalized intervention of sleep status throughout the entire life cycle.
Smart Images

Figure CN121337270B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of sleep monitoring technology, specifically a method and system for real-time monitoring of sleep state. Background Technology
[0002] Accurate monitoring of sleep states and assisting users in entering stable sleep have become key needs for improving sleep quality. Existing sleep monitoring technologies have the following shortcomings: they largely rely on wearable devices, such as wristbands and headbands, which are highly invasive, cause significant user discomfort, and result in poor long-term monitoring compliance; they can only passively collect sleep data and lack active intervention mechanisms for the sleep-disappearing state, failing to guide users into sleep in real time; the connection between sleep stage segmentation and state judgment is insufficient, making it impossible to quickly restart the monitoring and intervention process when the user wakes up, leading to a break in the monitoring loop. To address these issues, this invention proposes a non-invasive, real-time sleep state monitoring method that combines active intervention and closed-loop monitoring. Through multimodal physiological data collection, hierarchical algorithm judgment, and dynamic intervention, it achieves accurate monitoring of sleep states and sleep guidance. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention proposes a real-time sleep state monitoring method and system. Using a non-invasive sleep mat integrating a piezoelectric sensor, flexible dry electrodes, and a pressure sensor, it collects the user's heart rate variability, electroencephalogram (EEG) signals, and body movement data in real time. Based on this physiological data, a first algorithm model determines whether the user has reached a state of voluntary sleep. If not, an active intervention program is initiated to play adjustment music, dynamically adjusting the music volume, playback speed, or track based on physiological data feedback until the user enters a state of voluntary sleep. After the user falls asleep, physiological data is continuously collected, and a second algorithm model is used to segment the sleep state into wakefulness, light sleep, deep sleep, and REM sleep. If the segmentation result indicates wakefulness, the voluntary sleep state assessment is repeated. This invention combines non-invasive monitoring with personalized intervention, improving monitoring comfort and accuracy.
[0004] To achieve the above objectives, the present invention provides the following technical solution:
[0005] A method for real-time monitoring of sleep states, comprising:
[0006] The user's physiological data is collected in real time using non-invasive sensing devices. Based on the physiological data, a first algorithm model is used to determine in real time whether the user has reached a state of voluntary sleep. The physiological data includes heart rate variability signals, electroencephalogram (EEG) signals, and body movement data.
[0007] If it is determined that the user has not reached a state of voluntary sleep, an active intervention program is initiated, and intervention parameters are dynamically adjusted based on physiological data feedback during the intervention process until the user is determined to have entered a state of voluntary sleep; the dynamic adjustment of intervention parameters includes adjusting the volume, playback speed or track of the music in real time based on physiological data feedback.
[0008] After the user enters a sleep state, physiological data is continuously collected, and the sleep stages are segmented in real time using a second algorithm model; the sleep stages include wakefulness, light sleep, deep sleep, and REM sleep.
[0009] If the sleep stage output by the second algorithm model is the waking period, then the autonomous sleep state judgment will be re-executed.
[0010] Specifically, both the first and second algorithm models are invoked via cloud APIs; the non-invasive sensing device is a sleep mat integrating piezoelectric sensors, flexible dry electrodes, and pressure sensors, and the non-invasive sensing device uploads pre-processed physiological data to a cloud server for calculation via a wireless network and receives the returned judgment and staging results.
[0011] Specifically, the user's physiological data is collected in real time through non-invasive sensing devices, including:
[0012] The piezoelectric sensor integrated in the sleeping pad collects vibration signals caused by the user's heartbeat and breathing movements, and converts them into a first electrical signal through the piezoelectric effect; the first electrical signal contains mixed information of heart rate variability signal and respiratory signal.
[0013] The sleep pad integrates flexible dry electrodes to collect electrophysiological signals from the user's scalp via contact measurement, and converts these signals into a second electrical signal; this second electrical signal is the electroencephalogram (EEG) signal; the EEG signal includes... Wave, Wave, spread Waveform characteristic parameters;
[0014] The pressure sensor array integrated in the sleeping mat collects pressure distribution change signals of various parts of the user's body and converts them into a third electrical signal; the third electrical signal is used to characterize body movement data.
[0015] Specifically, real-time collection of users' physiological data through non-invasive sensing devices also includes:
[0016] The first electrical signal is bandpass filtered to separate the first sub-signal containing the heart rate variability signal and the second sub-signal containing the respiratory signal. The first sub-signal is envelope extracted and peak detected to identify each heartbeat cycle and generate a set of heartbeat interval sequences. The heartbeat interval sequences are then subjected to outlier removal and interpolation resampling to obtain the heart rate variability time series signal.
[0017] The second electrical signal is bandpass filtered to obtain a preprocessed second electrical signal, and EEG signal features are extracted from the preprocessed second electrical signal by segment extraction.
[0018] The third electrical signal is low-pass filtered to obtain a preprocessed third electrical signal. The variance of the preprocessed third electrical signal within a continuous time window is calculated, and combined with a preset variance threshold, body motion data is generated.
[0019] Specifically, the step of determining in real time whether the user has reached a state of voluntary sleep based on the physiological data using the first algorithm model includes:
[0020] The received heart rate variability time-series signal, EEG signal features and body motion data are mapped to a three-dimensional feature space to form a multimodal time-series feature matrix with a time step of T.
[0021] The multimodal temporal feature matrix is input into the first algorithm model to obtain comprehensive state features; the first algorithm model is either a multimodal temporal fusion model based on dynamic attention mechanism or a multimodal association fusion model based on graph neural network;
[0022] When it is a multimodal temporal fusion model based on dynamic attention mechanism, it includes a parallel heart rate variability signal encoding layer, an EEG signal encoding layer, and a body motion data encoding layer;
[0023] When it is a multimodal association fusion model based on graph neural networks, it includes a modal node construction module, an association edge weight calculation module, and a graph convolution feature fusion module;
[0024] The comprehensive state features are input into the output layer of the first algorithm model. The input comprehensive state features are processed by the sigmoid function with temperature parameters, and the probability value of the user being in a voluntary sleep state is output. When the probability value is greater than or equal to the preset probability threshold, it is determined that the user has reached a voluntary sleep state; otherwise, it is determined that the user has not reached a voluntary sleep state.
[0025] Specifically, when the first algorithm model is a multimodal temporal fusion model based on a dynamic attention mechanism, the multimodal temporal feature matrix is input into the first algorithm model to obtain comprehensive state features, including:
[0026] The heart rate variability signal coding layer uses a bidirectional LSTM network to process the three-dimensional features of the heart rate variability time series signal, captures the dependency relationship of the inter-cardiac interval sequence through a gating mechanism, and outputs a heart rate feature vector.
[0027] The EEG signal encoding layer adopts a structure combining convolutional neural network and Transformer encoder. First, the local spectral features of the EEG signal are extracted by three-dimensional features of the EEG signal through three-layer 1D convolution. Then, the spatiotemporal correlation of the EEG rhythm is modeled by multi-head self-attention mechanism, and the EEG feature vector is output.
[0028] The motion data encoding layer adopts a temporal convolutional network, which captures the motion change patterns at different time scales by dilated convolution to obtain the three-dimensional features of the motion data and outputs the motion feature vector.
[0029] The obtained heart rate feature vector, EEG feature vector, and body movement feature vector are input into the dynamic attention fusion layer of the first algorithm model. This dynamic attention fusion layer introduces prior knowledge of sleep states, including the distribution of physiological features during the wake-sleep transition, as attention weight initialization parameters. The weight allocation is dynamically adjusted by calculating the mutual information entropy of the heart rate feature vector, EEG feature vector, and body movement feature vector. After weighted fusion, a comprehensive state feature is generated. The distribution of physiological features during the wake-sleep transition is the joint distribution of the standard deviation of heart rate variability signal, the power proportion of each frequency band of the EEG signal, and the body movement frequency. The frequency bands of the EEG signal include... Wave, Wave, spread Wave.
[0030] Specifically, when the first algorithm model is a multimodal correlation fusion model based on graph neural networks, the multimodal temporal feature matrix is input into the first algorithm model to obtain comprehensive state features, including:
[0031] The modal node construction module divides the heart rate variability time-series signal into multiple subsequences according to the time step. The statistical characteristics of each subsequence constitute the internal characteristics of the heart rate modal node. The EEG signal characteristics are divided according to frequency bands, and the power ratio and rhythm period of each frequency band constitute the internal characteristics of the EEG modal node. The body movement data are divided according to time windows, and the number of body movements and the maximum amplitude within each time window constitute the internal characteristics of the body movement modal node. The statistical characteristics include mean, standard deviation, and peak value.
[0032] The associated edge weight calculation module calculates the Pearson correlation coefficient between the heart rate modality nodes and the electroencephalogram modality nodes, calculates the mutual information value between the heart rate modality nodes and the body movement modality nodes, and calculates the normalized cross-correlation coefficient between the electroencephalogram modality nodes and the body movement modality nodes, and performs a weighted sum of the Pearson correlation coefficient, the mutual information value, and the normalized cross-correlation coefficient to obtain the associated edge weights between each modality node;
[0033] The graph convolutional feature fusion module adopts a graph attention network structure, assigns weights to the neighbor nodes of each modality node through a multi-head attention mechanism, updates the features of each modality node by combining the features of its neighbor nodes and the assigned weights to obtain the updated node features, and then splices and reduces the dimensions of all the updated node features to generate a comprehensive state feature, where the weight value is comprehensively determined based on the similarity between the associated edge weight and the internal feature of the node.
[0034] Specifically, in the step of starting the active intervention program if it is determined that the autonomous sleep state has not been reached, the active intervention program is to play adjustment music, which specifically includes:
[0035] Construct an adjustment music library; the adjustment music library contains 3 types of music, namely wave-induced music, soothing classical music, and natural sound effect music;
[0036] Based on the physiological feature distribution in the wake-sleep transition stage, when the standard deviation of the user's heart rate variability signal is less than the preset standard deviation threshold, initially select wave-induced music; when the wave power ratio of the electroencephalogram signal is greater than the preset power ratio percentage threshold, initially select soothing classical music; when the body movement frequency is greater than the preset frequency threshold, initially select natural sound effect music;
[0037] Play the initially selected music through the Bluetooth speaker integrated in the sleep pad, and set the initial volume and playback speed.
[0038] Specifically, the second algorithm model is a multi-modal sleep staging model based on deep federated learning, including:
[0039] Construct a federated learning architecture between the local terminal and the cloud server; the local terminal is used for local data processing and model training; the cloud server is used for global model aggregation and parameter update; the local terminal is an edge computing device supporting the sleep pad;
[0040] The local terminal segments the preprocessed heart rate variability time series signal, electroencephalogram signal features, and body movement data according to a preset time length to form a local sleep segment data set, and performs privacy protection processing on the local sleep segment data set using the differential privacy algorithm;
[0041] The local terminal uses an improved ResNet network as a local model and trains the model based on a privacy-preserving local sleep fragment dataset to obtain local model parameters.
[0042] The local terminal encrypts and uploads the trained local model parameters to the cloud server. The cloud server performs weighted aggregation on the local model parameters uploaded by multiple local terminals to obtain the global model parameters.
[0043] The cloud server encrypts and distributes the global model parameters to each local terminal. The local terminal updates its local model based on the global model parameters and repeats the process iteratively until the local model converges.
[0044] After the local model converges, the local terminal inputs the real-time collected sleep segments into the updated local model, and outputs the probability of the user being in the awake, light sleep, deep sleep and REM sleep stages through the softmax function, and takes the stage with the highest probability as the current sleep stage.
[0045] A real-time sleep state monitoring system includes: a data acquisition module, a sleep state judgment module, an active intervention control module, a sleep stage segmentation module, and a state cycle monitoring module.
[0046] The data acquisition module is used to collect the user's heart rate variability signal, electroencephalogram (EEG) signal, and body movement data in real time.
[0047] The sleep state determination module is used to determine whether the user has reached a state of voluntary sleep based on the collected physiological data and a first algorithm model.
[0048] The active intervention control module is used to activate and dynamically adjust the active intervention program when the user has not reached a state of voluntary sleep, until it is determined that the user has entered a state of voluntary sleep.
[0049] The sleep stage segmentation module is used to determine the sleep stage in real time through a second algorithm model after the user enters a state of voluntary sleep.
[0050] The state cycle monitoring module is used for real-time sleep monitoring. When the user returns to the waking state from sleep, a re-judgment process is triggered.
[0051] Compared with the prior art, the beneficial effects of the present invention are:
[0052] 1. This invention proposes a real-time sleep state monitoring system and optimizes and improves its architecture, operation steps and processes. The system has the advantages of simple process, low investment and operating costs and low production and working costs.
[0053] 2. This invention proposes a real-time sleep monitoring method that uses a sleep mat with integrated multi-sensor technology as a non-invasive sensing device. This eliminates the need for users to wear any wearable devices, effectively reducing user discomfort during monitoring and improving long-term monitoring compliance. By dynamically adjusting the volume, playback speed, and track of music, personalized sleep guidance based on user physiological data feedback is achieved, making it easier to help users enter a state of autonomous sleep compared to fixed intervention methods. Through a process restart mechanism, when a user returns to wakefulness from a sleep state, the judgment and intervention process can be quickly restarted, solving the monitoring interruption problem in existing technologies and achieving continuous monitoring of sleep states throughout the entire lifecycle. Attached Figure Description
[0054] Figure 1 This is a schematic diagram of a real-time sleep state monitoring method according to the present invention;
[0055] Figure 2 This is a flowchart illustrating the principle of a real-time sleep state monitoring method according to the present invention.
[0056] Figure 3 This is an architecture diagram of a real-time sleep state monitoring system according to the present invention. Detailed Implementation
[0057] Example 1:
[0058] Please see Figure 1 and Figure 2 The present invention provides an embodiment of a method for real-time monitoring of sleep state, the method comprising S1 to S4, including the following steps:
[0059] S1: Real-time collection of the user's physiological data through non-invasive sensing devices; based on the physiological data, a first algorithm model is used to determine in real time whether the user has reached a state of voluntary sleep; the physiological data includes heart rate variability signals, electroencephalogram (EEG) signals, and body movement data.
[0060] S2: If it is determined that the user has not reached a state of voluntary sleep, an active intervention program is initiated, and the intervention parameters are dynamically adjusted based on physiological data feedback during the intervention process until the user is determined to have entered a state of voluntary sleep; the dynamic adjustment of intervention parameters includes adjusting the volume, playback speed or track of the music in real time based on physiological data feedback.
[0061] Furthermore, the criteria for determining the voluntary sleep state are as follows: ,in, The low-frequency components of the heart rate variability signal, High-frequency components representing heart rate variability signals, Indicating brain signals Wave energy percentage Indicating brain signals Wave energy percentage express The amount of body movement data within a time period. This represents the preset minimum value of the heart rate variability signal component. This indicates the preset minimum energy percentage.
[0062] S3: After the user enters a sleep state, physiological data is continuously collected, and the sleep stages are segmented in real time through the second algorithm model; the sleep stages include the wakefulness stage, light sleep stage, deep sleep stage, and REM sleep stage;
[0063] Furthermore, the criteria for determining the period of wakefulness are: in the electroencephalogram (EEG) signals Furthermore, the body movement data showed obvious body movement or .
[0064] Furthermore, the criteria for determining the light sleep stage are: in the electroencephalogram (EEG) signals and The ratio of low-frequency to high-frequency components in the heart rate variability signal was [1.2, 1.5], and the body movement data showed occasional slight body movement.
[0065] Furthermore, the criteria for determining the deep sleep stage are: in the electroencephalogram (EEG) signals ,and ,and .
[0066] Furthermore, the criteria for determining the rapid eye movement (REM) phase are: in the electroencephalogram (EEG) signals and , Furthermore, body movement data showed intermittent, slight body movements, among which... Indicating brain signals Wave energy percentage.
[0067] S4: If the sleep stage output by the second algorithm model is the waking period, then the autonomous sleep state judgment will be re-executed.
[0068] Both the first and second algorithm models are invoked via cloud APIs; the non-invasive sensing device is a sleep mat integrating piezoelectric sensors, flexible dry electrodes, and pressure sensors, and the non-invasive sensing device uploads pre-processed physiological data to a cloud server for calculation via a wireless network and receives the returned judgment and staging results.
[0069] Real-time collection of user physiological data through non-invasive sensing devices, including:
[0070] A1: The piezoelectric sensor integrated in the sleeping pad collects weak vibration signals caused by the user's heartbeat and breathing movements, and converts them into a first electrical signal through the piezoelectric effect; the first electrical signal contains mixed information of heart rate variability signal and respiratory signal, wherein the piezoelectric effect is prior art in the field and is not an inventive solution of this application, and will not be described in detail here;
[0071] Furthermore, the frequency range of the weak vibration signal is 0.1-5 Hz.
[0072] A2: Electrophysiological signals from the user's scalp are acquired via contact measurement using flexible dry electrodes integrated into the sleeping pad, and converted into a second electrical signal; this second electrical signal is the electroencephalogram (EEG) signal; the EEG signal includes... Wave, Wave, spread Waveform characteristic parameters;
[0073] Furthermore, the electrophysiological signal is converted into a second electrical signal through a signal conditioning circuit.
[0074] A3: The pressure sensor array integrated in the sleeping mat collects pressure distribution change signals of various parts of the user's body and converts them into a third electrical signal; the third electrical signal is used to characterize body movement data.
[0075] Furthermore, the specific steps in A3 include:
[0076] (1) When the user lies down on the sleeping mat, the real-time pressure acquisition process is started. Each sensor will undergo physical deformation due to the pressure of the corresponding part of the user's body. The pressure-sensitive material inside the sensor, such as piezoelectric ceramics and piezoresistive materials, will change its electrical properties with the pressure change. Among them, the piezoelectric material generates charge, and the resistance value of the piezoresistive material changes. This physical deformation is converted into a change in the electrical signal at the sensor output. At this time, the sensor array will continuously acquire the electrical signal of each sensor according to the preset sampling frequency. During the acquisition process, the sensor number and acquisition timestamp corresponding to each electrical signal are recorded synchronously to ensure that each electrical signal can be traced back to the specific body part and acquisition time.
[0077] (2) Preprocess the acquired raw electrical signals, including low-pass filtering and normalization;
[0078] (3) Based on the size of the sleeping pad and the typical contact areas of various parts of the user's body, determine the arrangement density and position of the sensor array, number each sensor and record its coordinate position in the sleeping pad, and establish a correspondence table of sensor number-body part-coordinate.
[0079] (4) After preprocessing, the processed electrical signals are matched with the body parts. According to the sensor number-body part-coordinate correspondence table, the preprocessed electrical signals output by each sensor are associated with their corresponding body parts to form the associated data of body part-pressure electrical signal-acquisition time.
[0080] (5) The electrical signals output by multiple sensors on the same body part are fused to obtain the comprehensive pressure electrical signal of that body part, ensuring that each body part corresponds to a stable and accurate electrical signal.
[0081] (6) The comprehensive pressure electrical signals of all body parts are integrated in the order of head-shoulder-back-hip-leg to form a complete third electrical signal that reflects the pressure distribution changes of each part of the user's body. This electrical signal contains the electrical signal information corresponding to the pressure of each body part and retains the time synchronization of the pressure changes of each part.
[0082] Real-time collection of users' physiological data through non-invasive sensing devices also includes:
[0083] A4: Bandpass filtering is applied to the first electrical signal to separate a first sub-signal containing heart rate variability signals and a second sub-signal containing respiratory signals. Envelope extraction and peak detection are performed on the first sub-signal to identify each heartbeat cycle and generate a set of heartbeat interval sequences. Outlier removal and interpolation resampling are then performed on the heartbeat interval sequences to obtain the heart rate variability time series signal. Bandpass filtering is a prior art in this field and is not an inventive solution of this application, so it will not be described in detail here.
[0084] Furthermore, envelope extraction and peak detection are performed on the first sub-signal to identify each cardiac cycle, generating a set of cardiac interval sequences, including:
[0085] (1) Envelope extraction includes: first, segmenting the preprocessed signal into multiple short segments at fixed time intervals, with the length of each short segment being based on the ability to completely contain the signal fluctuations caused by a heartbeat; for each segment, finding the maximum signal point, which reflects the highest amplitude of the signal within the segment; then, connecting the maximum points of all segments in chronological order to form a continuous curve, i.e., the envelope of the first sub-signal; the envelope can filter out minor fluctuations in the signal and highlight the main signal changes caused by the heartbeat, because the amplitude of the heartbeat signal is usually much greater than the amplitude of the non-heartbeat signal, and its maximum point will naturally form the main component of the envelope;
[0086] (2) After the envelope extraction is completed, the peak detection stage is entered, including: determining the peak detection threshold, which is set based on the signal characteristics of the envelope; after determining the peak detection threshold, the envelope is scanned point by point. When the amplitude of any point on the envelope exceeds the set peak detection threshold, and the amplitudes of the adjacent points before and after the point are all less than the amplitude of the point, the point is initially determined as a peak point, i.e., a candidate position of a heartbeat.
[0087] (3) For the initial detected peak points, calculate the time interval between two adjacent peak points. If this interval is within the normal heartbeat cycle range, then both points are confirmed to be valid heartbeat peaks. If the interval is too short or too long and deviates significantly from the normal range, then it is judged that there may be false peaks or missed detections, and further verification is required. For suspected false peak points, by comparing the change trend of the signal before and after, if the appearance of the point does not have an obvious signal rise and fall process, but is an isolated sudden increase, then it is judged to be a false peak caused by noise and removed. Among them, the heartbeat cycle of a normal human body has a relatively stable range, generally between 0.6 and 1.2 seconds.
[0088] (4) After peak verification, all valid heart rate peaks are obtained. The time position corresponding to each peak is the moment when a heartbeat occurs. These moments are arranged in chronological order, and then the time difference between two adjacent moments is calculated to form a heartbeat interval sequence. For example, the difference between the first heartbeat moment and the second heartbeat moment is the first heartbeat interval, the difference between the second heartbeat moment and the third heartbeat moment is the second heartbeat interval, and so on, to finally form a heartbeat interval sequence. The heartbeat interval sequence can reflect the pattern of heart rate changes.
[0089] A5: Bandpass filtering is performed on the second electrical signal to obtain a preprocessed second electrical signal, and EEG signal features are extracted from the preprocessed second electrical signal by segment extraction.
[0090] Furthermore, the specific steps in A5 include:
[0091] (1) The second electrical signal is bandpass filtered by a bandpass filter with a cutoff frequency of 0.5-30Hz to remove power frequency interference and baseline drift, and the preprocessed second electrical signal is obtained.
[0092] (2) The preprocessed second electrical signal is segmented into segments of 2 seconds each to obtain multiple segments of EEG signal;
[0093] (3) Extract time-domain and frequency-domain features from each EEG signal segment to form EEG signal features. The time-domain features include mean, variance, and peak value; the frequency-domain features include... Wave power, Wave power, Wave power and Wave power.
[0094] A6: Perform low-pass filtering on the third electrical signal to obtain a preprocessed third electrical signal, calculate the variance of the preprocessed third electrical signal within a continuous time window, and generate body motion data by combining it with a preset variance threshold.
[0095] Furthermore, the specific steps in A6 include:
[0096] (1) The third electrical signal is low-pass filtered by a low-pass filter with a cutoff frequency of 1Hz to remove high-frequency noise and obtain the pre-processed third electrical signal.
[0097] (2) Set the continuous time window to 5 seconds and calculate the variance of the preprocessed third electrical signal within each 5-second time window;
[0098] (3) A preset variance threshold is set. When the variance within a time window is greater than the preset variance threshold, it is determined that there is body movement within the time window and marked as 1. When the variance is less than or equal to the preset variance threshold, it is determined that there is no body movement and marked as 0. Body movement data is generated based on the marking results of all time windows. In this invention, the preset variance threshold is 0.05mA², where mA² is milliampere squared, which is the unit of measurement for the variance of current signal.
[0099] The step of determining in real time whether the user has reached a state of voluntary sleep based on the physiological data using a first algorithm model includes:
[0100] B1: Receives the obtained heart rate variability time-series signal, EEG signal features and body motion data, and maps them to a three-dimensional feature space to form a multimodal time-series feature matrix with a time step of T;
[0101] Furthermore, heart rate variability time-series signals are mapped to a space with time, heart rate interval, and frequency as dimensions; EEG signal features are mapped to a space with time, frequency band, and power spectral density as dimensions; and body motion data are mapped to a space with time, pressure variance, and spatial distribution as dimensions, forming a multimodal time-series feature matrix with a time step of T; where the time step T is 30-60 seconds, used to unify the time dimension scale of the three types of data.
[0102] Furthermore, mapping the heart rate variability time-series signal to a three-dimensional space of time-interval-frequency aims to expand the original one-dimensional time-series signal, which was based solely on time-interval, into a three-dimensional feature space that includes frequency domain features through multi-dimensional feature decomposition and quantization. This achieves a complete representation of the dynamic changes in the time domain and the rhythmic features in the frequency domain of the heart rate variability signal. The specific logic is as follows:
[0103] (1) The time starting point is the first effective heartbeat moment of the heart rate variability time sequence signal, and the time axis is the actual time when the heartbeat occurs.
[0104] (2) The time axis is segmented according to a fixed time window so that each heart rate variability time series signal is assigned a unique time coordinate, that is, the time window position or specific occurrence time corresponding to the heart rate variability time series signal is completed to complete the basic mapping of the time dimension.
[0105] (3) Precisely bind the original cardiac interval data to a defined time dimension to form a two-dimensional time-interval basis, including:
[0106] Extract the heartbeat interval value corresponding to each heartbeat from the heart rate variability time series signal, that is, the time difference between two adjacent effective heartbeat peaks;
[0107] By associating each heart rate interval value with its corresponding time coordinate, the time-domain characteristics of the heart rate variability signal are mapped to the two-dimensional space of time-heart rate interval, thus obtaining the two-dimensional time-time interval signal.
[0108] (4) Frequency domain analysis is performed on the two-dimensional time domain signal of time-cardiac interval to extract the rhythmic features of heart rate variability, such as the frequency components corresponding to the regulation of the sympathetic nerve and vagus nerve, and finally a three-dimensional space is formed. The frequency domain analysis is performed using fast Fourier transform, which is the existing technology in this field and is not an inventive solution of this application. It will not be elaborated here.
[0109] Furthermore, the features of the EEG signal are mapped to a three-dimensional space of time-frequency band-power spectral density. The core is to capture dynamic changes through time segmentation, decompose rhythm features according to frequency bands, and quantify the energy intensity of each frequency band using power spectral density. Ultimately, this achieves the transformation of the EEG signal from the original waveform to a multi-dimensional feature space. The specific steps include:
[0110] (1) Divide the continuous EEG signal into fixed time windows and preprocess the signal in each time window to ensure that the signal in each window can reflect both local features and dynamic changes in the time dimension. The length of the time window needs to be set in combination with the periodic characteristics of the EEG rhythm. Usually, a duration that can completely contain multiple EEG waveform cycles is selected.
[0111] (2) Based on the frequency range of the EEG signal and its corresponding physiological state, the preprocessed signal is decomposed into multiple characteristic frequency bands, including extremely low frequency band, low frequency band, mid frequency band, high frequency band, etc. Each frequency band corresponds to a specific brain activity state. For example, the extremely low frequency band corresponds to the deep sleep state, the mid frequency band corresponds to the transition state from wakefulness to sleep, and the high frequency band corresponds to the state of wakefulness and active thinking.
[0112] (3) By using bandpass filtering, the signals of each characteristic frequency band are extracted, so that the originally mixed EEG signals are decomposed into sub-signals of a single frequency band, and each sub-signal contains only the frequency components within that frequency band;
[0113] (4) For each frequency band sub-signal within each time window, calculate its power spectral density to quantify the energy intensity of the frequency band within that time window. Specifically, first, perform a Fourier transform on the sub-signal of a single frequency band to convert the time-domain signal into a frequency-domain signal, obtaining the complex representation of the signal at different frequency points; then, obtain the power value at each frequency point by calculating the square of the modulus of the complex number; finally, average the power values of all frequency points within each frequency band to obtain the average power spectral density of the frequency band within the current time window.
[0114] (5) The starting time of the time window is used as the coordinate of the time dimension, the frequency range of the characteristic frequency band is used as the coordinate of the frequency band dimension, and the calculated average power spectral density is used as the value of the power spectral density dimension. Each frequency band in each time window corresponds to a feature point in three-dimensional space. As the time window moves continuously, these feature points form a continuous trajectory in three-dimensional space, showing the frequency band energy distribution law of EEG signal changing with time.
[0115] Furthermore, the core of mapping body motion data to a three-dimensional space of time-pressure variance-spatial distribution is to capture the temporal characteristics of body motion through a time window, quantify the intensity of body motion using pressure variance, and characterize the location information of body motion using spatial distribution. Ultimately, this transforms body motion data from raw pressure signals into a multi-dimensional feature space. Specific steps include:
[0116] (1) Divide the continuously collected pressure sensor array signals into fixed time windows. The length of the time window needs to be set according to the possible duration of the body movement. Usually, the duration that can capture a complete body movement is selected.
[0117] (2) For each time window, extract the pressure value of each sensor in the pressure sensor array to form a pressure matrix within that window. The rows and columns of the pressure matrix correspond to the physical positions of the sensors on the sleeping mat, and the values in the matrix represent the pressure magnitude at the corresponding positions.
[0118] (3) Solve for the average value of all pressure values in the pressure matrix within the window, then calculate the square of the difference between each pressure value and the average value, and finally calculate the average of the squared values to obtain the pressure variance of the time window;
[0119] (4) Set a pressure change threshold and mark the locations of all sensors whose pressure values exceed the pressure change threshold in the pressure matrix of each time window; judge the spatial characteristics of body movement based on the distribution of these marked locations. For example, if the marked locations are concentrated in the left area of the sleeping mat, it indicates that the body movement occurs on the left side of the body; if the marked locations are distributed in strips, it indicates that the body movement may be caused by body displacement due to turning over.
[0120] (5) Using the start time of the time window as the coordinate of the time dimension, the calculated pressure variance as the value of the pressure variance dimension, and the spatial distribution characteristics of body motion as the coordinate of the spatial distribution dimension, the body motion data of each time window corresponds to a feature point in three-dimensional space. For example, within any second window, the time coordinate is the start time of that second, the pressure variance coordinate is the pressure variance value of that window, and the spatial distribution coordinate is the right-side region or small area. Through the continuous shift of time windows, these feature points form trajectories in three-dimensional space, showing the intensity and positional patterns of body motion changing with time.
[0121] B2: Input the multimodal temporal feature matrix into the first algorithm model to obtain comprehensive state features; the first algorithm model is either a multimodal temporal fusion model based on dynamic attention mechanism or a multimodal association fusion model based on graph neural network;
[0122] When it is a multimodal temporal fusion model based on dynamic attention mechanism, it includes a parallel heart rate variability signal encoding layer, an EEG signal encoding layer, and a body motion data encoding layer;
[0123] When it is a multimodal association fusion model based on graph neural networks, it includes a modal node construction module, an association edge weight calculation module, and a graph convolution feature fusion module;
[0124] B3: Input the comprehensive state features into the output layer of the first algorithm model, process the input comprehensive state features through the sigmoid function with temperature parameter, and output the probability value of the user being in a self-sleep state. When the probability value is greater than or equal to the preset probability threshold, it is determined that the user has reached a self-sleep state; otherwise, it is determined that the user has not reached a self-sleep state.
[0125] When the first algorithm model is a multimodal temporal fusion model based on a dynamic attention mechanism, the multimodal temporal feature matrix is input into the first algorithm model to obtain comprehensive state features, including:
[0126] C1: The heart rate variability signal coding layer adopts a bidirectional LSTM network to process the three-dimensional features of the heart rate variability time series signal, captures the long-term dependence of the inter-cardiac interval sequence through a gating mechanism, and outputs a heart rate feature vector. The LSTM network is a prior art in this field and is not an inventive solution of this application, so it will not be described in detail here.
[0127] C2: The EEG signal encoding layer adopts a structure combining a convolutional neural network and a Transformer encoder. First, the local spectral features of the EEG signal are extracted from the three-dimensional features of the EEG signal through three-layer 1D convolution. Then, the spatiotemporal correlation of the EEG rhythm is modeled through a multi-head self-attention mechanism to output the EEG feature vector. The convolutional neural network and the Transformer encoder are existing technologies in this field and are not the inventive solutions of this application. They will not be described in detail here.
[0128] C3: The motion data encoding layer adopts a temporal convolutional network, which captures the motion change patterns at different time scales by dilated convolution on the three-dimensional features of the motion data and outputs a motion feature vector. The temporal convolutional network is existing technology in this field and is not an inventive solution of this application, so it will not be described in detail here.
[0129] C4: The obtained heart rate feature vector, EEG feature vector, and body movement feature vector are input into the dynamic attention fusion layer of the first algorithm model. This dynamic attention fusion layer introduces prior knowledge of sleep states, including the distribution of physiological features during the wake-sleep transition, as attention weight initialization parameters. The weight allocation is dynamically adjusted by calculating the mutual information entropy of the heart rate feature vector, EEG feature vector, and body movement feature vector. After weighted fusion, a comprehensive state feature is generated. The distribution of physiological features during the wake-sleep transition is the joint distribution of the standard deviation of the heart rate variability signal, the power proportion of each frequency band of the EEG signal, and the body movement frequency. The frequency bands of the EEG signal include... Wave, Wave, spread Wave.
[0130] Specifically, the distribution of physiological characteristics during the wake-sleep transition phase is based on the standard deviation of heart rate variability signals and electroencephalogram (EEG) signals obtained from sleep monitoring data of 1000 healthy adults. The combined distribution of wave power ratio and body motion frequency.
[0131] When the first algorithm model is a multimodal correlation fusion model based on graph neural networks, the multimodal temporal feature matrix is input into the first algorithm model to obtain comprehensive state features, including:
[0132] D1: The modal node construction module divides the heart rate variability time-series signal into multiple subsequences according to the time step. The statistical characteristics of each subsequence constitute the internal characteristics of the heart rate modal node. The EEG signal characteristics are divided according to frequency bands. The power ratio and rhythm period of each frequency band constitute the internal characteristics of the EEG modal node. The body movement data are divided according to time windows. The number of body movements and the maximum amplitude within each time window constitute the internal characteristics of the body movement modal node. The statistical characteristics include mean, standard deviation, and peak value.
[0133] D2: The associated edge weight calculation module calculates the Pearson correlation coefficient between the heart rate modality node and the EEG modality node, calculates the mutual information value between the heart rate modality node and the body movement modality node, and calculates the normalized cross-correlation coefficient between the EEG modality node and the body movement modality node. The Pearson correlation coefficient, mutual information value, and normalized cross-correlation coefficient are weighted and summed to obtain the associated edge weight between each modality node. The calculation formulas for the Pearson correlation coefficient and mutual information value are existing technical content in this field and are not inventive solutions of this application, and will not be elaborated here.
[0134] D3: The graph convolutional feature fusion module adopts a graph attention network structure. It assigns weights to the neighboring nodes of each modality node through a multi-head attention mechanism. For each modality node, it updates its features by combining the features of its neighboring nodes with the assigned weights to obtain updated node features. Then, it concatenates and reduces the dimensionality of all updated node features to generate comprehensive state features. The weight values are determined based on the similarity between the weights of associated edges and the internal features of the nodes.
[0135] If it is determined that a state of spontaneous sleep has not been achieved, an active intervention procedure will be initiated. This active intervention procedure involves playing adjustment music, specifically including:
[0136] E1: Construct an adaptive music library; the adaptive music library contains three categories of music, namely... Wave-induced music, soothing classical music, and natural sound effects music;
[0137] E2: Based on the physiological characteristic distribution of the wake-sleep transition phase, when the standard deviation of the user's heart rate variability signal is less than a preset standard deviation threshold, the initial selection... Wave-induced music; when brain signals When the wave power ratio is greater than the preset power ratio threshold, soothing classical music is initially selected; when the body movement frequency is greater than the preset frequency threshold, natural sound effect music is initially selected.
[0138] E3: Play the initially selected music through the Bluetooth speaker integrated into the sleep mat, and set the initial volume and playback speed.
[0139] Furthermore, the active intervention program can also be combined with adaptive light environment regulation, specifically including:
[0140] (1) Construct a light environment parameter library; the light environment parameter library contains three types of parameter combinations: color temperature, illuminance, and light frequency. The color temperature range is 2700K - 4000K, the illuminance range is 5lux - 30lux, and the light frequency range is 0.5Hz - 2Hz;
[0141] (2) Based on the physiological characteristic distribution in the wake - sleep transition stage and the initial selection result of music intervention, determine the initial values of the light environment parameters; if the initially selected wave - induced music, match the parameter combination with a color temperature range of [2700K, 3000K), an illuminance range of [5lux, 10lux), and a light frequency range of [0.5Hz, 1Hz); if the initially selected soothing classical music, match the parameter combination with a color temperature range of [3000K, 3500K), an illuminance range of [10lux, 20lux), and a light frequency range of [1Hz, 1.5Hz); if the initially selected natural sound effect music, match the parameter combination with a color temperature range of [3500K, 4000K], an illuminance range of [20lux, 30lux], and a light frequency range of [1.5Hz, 2Hz);
[0142] (3) Output the light environment corresponding to the initial light environment parameters through the intelligent light source module integrated in the sleep pad, and during the intervention process, dynamically adjust the light environment parameters based on the physiological data feedback; when the increase rate of the standard deviation of the heart rate variability signal is less than 5%, the increase rate of the EEG signal wave power ratio is less than 8% or the decrease rate of the body movement frequency is less than 10%, adjust the light environment parameters according to the preset step size until the user enters the autonomous sleep state. In the present invention, the preset step size is set as: the color temperature is adjusted by ±100K each time, the illuminance is adjusted by ±2lux each time, and the light frequency is adjusted by ±0.1Hz each time.
[0143] The second algorithm model is a multi - modal sleep staging model based on deep federated learning, including:
[0144] F1: Construct a federated learning architecture between the local terminal and the cloud server; the local terminal is used for local data processing and model training; the cloud server is used for global model aggregation and parameter update; the local terminal is an edge computing device supporting the sleep pad;
[0145] F2: The local terminal segments the preprocessed heart rate variability time-series signal, EEG signal features, and body movement data according to a preset time length to form a local sleep segment dataset, and uses a differential privacy algorithm to perform privacy protection processing on the local sleep segment dataset. The differential privacy algorithm is existing technology in this field and is not an inventive solution of this application, so it will not be described in detail here.
[0146] F3: The local terminal uses an improved ResNet network as a local model and trains the model based on a local sleep fragment dataset with privacy protection processing to obtain the local model parameters.
[0147] F4: The local terminal encrypts and uploads the trained local model parameters to the cloud server. The cloud server performs weighted aggregation on the local model parameters uploaded by multiple local terminals to obtain the global model parameters.
[0148] F5: The cloud server encrypts and distributes the global model parameters to each local terminal. The local terminal updates its local model based on the global model parameters and repeats the process iteratively until the local model converges.
[0149] F6: After the local model converges, the local terminal inputs the real-time collected sleep segments into the updated local model, and outputs the probability of the user being in the awake stage, light sleep stage, deep sleep stage and REM sleep stage through the softmax function, and takes the stage with the highest probability as the current sleep stage. The softmax function is the prior art in this field and is not an inventive solution of this application, so it will not be described in detail here.
[0150] Furthermore, the second algorithm model can also be a multimodal sleep staging model based on an improved ResNet, including:
[0151] (1) Acquire sleep segments and use sequential splicing to fuse the temporal signal features of heart rate variability, EEG signal features and body movement data features of each sleep segment into a fused feature vector;
[0152] (2) Construct an improved ResNet network containing N residual blocks, each residual block containing n convolutional layers, and output a sleep feature vector by performing deep feature extraction on the fused feature vector;
[0153] (3) Use the softmax function to classify the sleep feature vector and output the probability that the user is in the awake period, light sleep period, deep sleep period and REM sleep period. The stage with the highest probability is taken as the current sleep stage.
[0154] Furthermore, each residual block of the improved ResNet network is equipped with an attention mechanism module, which is a channel attention module. This module enhances the contribution of effective feature channels by calculating the weights of each channel's features. Specifically, it includes:
[0155] (1) Perform global average pooling on the feature map output by the residual block to obtain the channel description vector;
[0156] (2) The channel description vector is reduced and increased in dimensionality by two fully connected layers. The first fully connected layer reduces the number of channels to 1 / 4 of the original number of channels, and the second fully connected layer restores the original number of channels.
[0157] (3) The sigmoid function is used to activate the output of the fully connected layer to obtain the attention weights of each channel;
[0158] (4) Multiply the attention weights and the feature maps output by the residual block element by channel to obtain the weighted feature maps, which are used as the final output of the residual block for subsequent deep feature extraction.
[0159] Furthermore, the second algorithm model can also be a sleep staging model based on the Transformer-ConvNeXt hybrid architecture, including:
[0160] (1) Acquire sleep segments and standardize each sleep segment to eliminate dimensional differences;
[0161] (2) Construct a Transformer-ConvNeXt hybrid feature extraction network, which includes a parallel temporal feature extraction branch and a spatial feature extraction branch; the temporal feature extraction branch adopts a Transformer encoder, which captures the dependence of each modality feature in the temporal dimension through a multi-head self-attention mechanism and outputs a temporal feature representation; the spatial feature extraction branch adopts a ConvNeXt network, which extracts the spatial correlation information of each modality feature in the feature dimension through depthwise separable convolution and batch normalization operations and outputs a spatial feature representation.
[0162] (3) The attention fusion mechanism is used to fuse the temporal feature representation and the spatial feature representation. The similarity matrix between the two feature representations is calculated, the fusion weights are assigned based on the similarity matrix, and the mixed feature vector is obtained by weighted summation.
[0163] (4) Construct a classifier. The classifier adopts a structure combining a fully connected layer and a dropout layer. Input the mixed feature vector into the classifier and output the probability of the user being awake, in light sleep, in deep sleep and in REM sleep through the softmax function. The stage with the highest probability is taken as the current sleep stage.
[0164] Example 2:
[0165] Please see Figure 3 Another embodiment of the present invention provides: a real-time sleep state monitoring system, comprising:
[0166] Data acquisition module, sleep state judgment module, active intervention and control module, sleep stage segmentation module, and state cycle monitoring module;
[0167] The data acquisition module is used to collect the user's heart rate variability signal, electroencephalogram (EEG) signal, and body movement data in real time;
[0168] The sleep state determination module is used to determine whether the user has reached a state of voluntary sleep based on the collected physiological data and the first algorithm model, providing a basis for decision-making on whether to initiate intervention.
[0169] The active intervention control module is used to initiate and dynamically adjust the active intervention program when the user has not reached a state of voluntary sleep, until it is determined that the user has entered a state of voluntary sleep.
[0170] The sleep stage segmentation module is used to determine the sleep stage in real time after the user enters a state of voluntary sleep, providing a basis for closed-loop monitoring.
[0171] The state cycle monitoring module is used for real-time sleep monitoring. When the user returns to the waking state from sleep, a re-judgment process is triggered.
[0172] The sleep state determination module includes: a feature extraction unit and a first algorithm processing unit;
[0173] The feature extraction unit is used to extract features from physiological data and output a feature vector as input to the first algorithm model.
[0174] The first algorithm processing unit is used to load the pre-trained first algorithm model, input the feature vector and output the judgment result, and then transmit the result to the active intervention control module.
[0175] The active intervention control module includes: an intervention initiation unit, a parameter adjustment unit, and an intervention termination unit;
[0176] The intervention initiation unit is used to receive the judgment result of the sleep state judgment module that the autonomous sleep state has not been reached, and to trigger the active intervention program;
[0177] The parameter adjustment unit is used to receive the latest physiological data from the data acquisition module in real time and dynamically adjust the parameters based on the feedback.
[0178] The intervention termination unit is used to continuously receive the latest results from the sleep state judgment module. When it receives the result that the sleep state has been reached, it stops the music playback and outputs an intervention completion signal to the sleep stage segmentation module.
[0179] The sleep stage segmentation module includes: a sequence feature construction unit and a second algorithm processing unit;
[0180] The sequence feature construction unit is used to receive continuously collected physiological data, construct time series features, and output sequence feature vectors.
[0181] The second algorithm processing unit is used to load the pre-trained second algorithm model, output real-time sleep stage labels, and pass the labels to the state cycle monitoring module.
[0182] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments under the guidance of the present invention without departing from the spirit and scope of the present invention. All of these variations are within the protection scope of the present invention.
[0183] If the technical solution disclosed herein involves personal information, the product using this technical solution has clearly informed the user of the personal information processing rules and obtained the user's voluntary consent before processing the personal information. If the technical solution disclosed herein involves sensitive personal information, the product using this technical solution has obtained the user's separate consent before processing the sensitive personal information, and also meets the requirement of "express consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set up to inform users that they have entered the scope of personal information collection and that personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed that they have agreed to the collection of their personal information; or on the personal information processing device, with clear signs / information informing users of the personal information processing rules, authorization is obtained from the individual through pop-up information or by asking the individual to upload their personal information; wherein, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.
Claims
1. A method for real-time monitoring of sleep state, characterized in that, include: The user's physiological data is collected in real time using non-invasive sensing devices. Based on the physiological data, the first algorithm model is used to determine in real time whether the user has reached a state of voluntary sleep. The physiological data includes heart rate variability signals, electroencephalogram (EEG) signals, and body movement data; If it is determined that the user has not reached a state of voluntary sleep, an active intervention program will be initiated, and the intervention parameters will be dynamically adjusted based on physiological data feedback during the intervention process until the user is determined to have entered a state of voluntary sleep. The dynamic adjustment intervention parameters include adjusting the volume, playback speed, or track of the music in real time based on physiological data feedback; After the user enters a sleep state, physiological data is continuously collected, and the sleep stages are segmented in real time using a second algorithm model; the sleep stages include wakefulness, light sleep, deep sleep, and REM sleep. If the sleep stage output by the second algorithm model is the waking period, then the autonomous sleep state judgment is re-executed; The second algorithm model is a multimodal sleep staging model based on deep federated learning; The step of determining in real time whether the user has reached a state of voluntary sleep based on the physiological data using a first algorithm model includes: The received heart rate variability time-series signal, EEG signal features and body motion data are mapped to a three-dimensional feature space to form a multimodal time-series feature matrix with a time step of T. The multimodal temporal feature matrix is input into the first algorithm model to obtain comprehensive state features; the first algorithm model is either a multimodal temporal fusion model based on dynamic attention mechanism or a multimodal association fusion model based on graph neural network; When it is a multimodal temporal fusion model based on dynamic attention mechanism, it includes a parallel heart rate variability signal encoding layer, an EEG signal encoding layer, and a body motion data encoding layer; When it is a multimodal association fusion model based on graph neural networks, it includes a modal node construction module, an association edge weight calculation module, and a graph convolution feature fusion module; The comprehensive state features are input into the output layer of the first algorithm model. The input comprehensive state features are processed by the sigmoid function with temperature parameters, and the probability value of the user being in a self-sleep state is output. When the probability value is greater than or equal to the preset probability threshold, it is determined that the user has reached a self-sleep state; otherwise, it is determined that the user has not reached a self-sleep state.
2. The method for real-time monitoring of sleep state as described in claim 1, characterized in that, Both the first and second algorithm models are invoked via cloud APIs; the non-invasive sensing device is a sleep mat integrating piezoelectric sensors, flexible dry electrodes, and pressure sensors, and the non-invasive sensing device uploads pre-processed physiological data to a cloud server for calculation via a wireless network and receives the returned judgment and staging results.
3. The method for real-time monitoring of sleep state as described in claim 2, characterized in that, Real-time collection of user physiological data through non-invasive sensing devices, including: The piezoelectric sensor integrated in the sleeping pad collects vibration signals caused by the user's heartbeat and breathing movements, and converts them into a first electrical signal through the piezoelectric effect; the first electrical signal contains mixed information of heart rate variability signal and respiratory signal. The sleep pad integrates flexible dry electrodes to collect electrophysiological signals from the user's scalp via contact measurement, and converts these signals into a second electrical signal; this second electrical signal is the electroencephalogram (EEG) signal; the EEG signal includes... Wave, Wave, spread Waveform characteristic parameters; The pressure sensor array integrated in the sleeping mat collects pressure distribution change signals of various parts of the user's body and converts them into a third electrical signal; the third electrical signal is used to characterize body movement data.
4. The method for real-time monitoring of sleep state as described in claim 3, characterized in that, Real-time collection of users' physiological data through non-invasive sensing devices also includes: The first electrical signal is bandpass filtered to separate the first sub-signal containing the heart rate variability signal and the second sub-signal containing the respiratory signal. The first sub-signal is envelope extracted and peak detected to identify each heartbeat cycle and generate a set of heartbeat interval sequences. The heartbeat interval sequences are then subjected to outlier removal and interpolation resampling to obtain the heart rate variability time series signal. The second electrical signal is bandpass filtered to obtain a preprocessed second electrical signal, and EEG signal features are extracted from the preprocessed second electrical signal by segment extraction. The third electrical signal is low-pass filtered to obtain a preprocessed third electrical signal. The variance of the preprocessed third electrical signal within a continuous time window is calculated, and combined with a preset variance threshold, body motion data is generated.
5. The method for real-time monitoring of sleep state as described in claim 4, characterized in that, When the first algorithm model is a multimodal temporal fusion model based on a dynamic attention mechanism, the multimodal temporal feature matrix is input into the first algorithm model to obtain comprehensive state features, including: The heart rate variability signal coding layer uses a bidirectional LSTM network to process the three-dimensional features of the heart rate variability time series signal, captures the dependency relationship of the inter-cardiac interval sequence through a gating mechanism, and outputs a heart rate feature vector. The EEG signal encoding layer adopts a structure combining convolutional neural network and Transformer encoder. First, the local spectral features of the EEG signal are extracted by three-dimensional features of the EEG signal through three-layer 1D convolution. Then, the spatiotemporal correlation of the EEG rhythm is modeled by multi-head self-attention mechanism, and the EEG feature vector is output. The motion data encoding layer adopts a temporal convolutional network, which captures the motion change patterns at different time scales by dilated convolution to obtain the three-dimensional features of the motion data and outputs the motion feature vector. The obtained heart rate feature vector, EEG feature vector, and body movement feature vector are input into the dynamic attention fusion layer of the first algorithm model. This dynamic attention fusion layer introduces prior knowledge of sleep states, including the distribution of physiological features during the wake-sleep transition, as attention weight initialization parameters. The weight allocation is dynamically adjusted by calculating the mutual information entropy of the heart rate feature vector, EEG feature vector, and body movement feature vector. After weighted fusion, a comprehensive state feature is generated. The distribution of physiological features during the wake-sleep transition is the joint distribution of the standard deviation of heart rate variability signal, the power proportion of each frequency band of the EEG signal, and the body movement frequency. The frequency bands of the EEG signal include... Wave, Wave, spread Wave.
6. The method for real-time monitoring of sleep state as described in claim 5, characterized in that, When the first algorithm model is a multimodal correlation fusion model based on graph neural networks, the multimodal temporal feature matrix is input into the first algorithm model to obtain comprehensive state features, including: The modal node construction module divides the heart rate variability time-series signal into multiple subsequences according to the time step. The statistical characteristics of each subsequence constitute the internal characteristics of the heart rate modal node. The EEG signal characteristics are divided according to frequency bands, and the power ratio and rhythm period of each frequency band constitute the internal characteristics of the EEG modal node. The body movement data are divided according to time windows, and the number of body movements and the maximum amplitude within each time window constitute the internal characteristics of the body movement modal node. The statistical characteristics include mean, standard deviation, and peak value. The associated edge weight calculation module calculates the Pearson correlation coefficient between the heart rate modality node and the EEG modality node, calculates the mutual information value between the heart rate modality node and the body movement modality node, and calculates the normalized cross-correlation coefficient between the EEG modality node and the body movement modality node. The Pearson correlation coefficient, mutual information value, and normalized cross-correlation coefficient are weighted and summed to obtain the associated edge weight between each modality node. The graph convolution feature fusion module adopts a graph attention network structure, and uses a multi-head attention mechanism to assign weights to the neighbor nodes of each modality node. For each modality node, the feature of the node is updated by combining the features of its neighbor nodes and the assigned weights, and the updated node features are obtained. Then, all the updated node features are concatenated and dimension-reduced to generate a comprehensive state feature. Among them, the weight value is comprehensively determined based on the similarity between the associated edge weight and the internal feature of the node.
7. The method for real-time monitoring of sleep state as described in claim 6, characterized in that, In the step of starting the active intervention program if it is determined that the autonomous sleep state has not been reached, the active intervention program is to play adjustment music, which specifically includes: Construct an adaptive music library; the adaptive music library contains three categories of music, namely... Wave-induced music, soothing classical music, and natural sound effects music; Based on the physiological characteristics distribution of the wake-sleep transition phase, when the standard deviation of the user's heart rate variability signal is less than a preset standard deviation threshold, the initial selection... Wave-induced music; when brain signals When the wave power ratio is greater than the preset power ratio threshold, soothing classical music is initially selected; when the body movement frequency is greater than the preset frequency threshold, natural sound effect music is initially selected. Playing the initially selected music through the Bluetooth speaker integrated in the sleep pad, and setting the initial volume and playing speed.
8. The method for real-time monitoring of sleep state as described in claim 7, characterized in that, The second algorithm model is a multi-modal sleep staging model based on deep federated learning, including: Constructing a federated learning architecture between the local terminal and the cloud server; the local terminal is used for local data processing and model training; the cloud server is used for global model aggregation and parameter update; the local terminal is an edge computing device supporting the sleep pad; The local terminal segments the preprocessed heart rate variability time series signal, EEG signal feature, and body movement data according to a preset time length to form a local sleep segment data set, and uses the differential privacy algorithm to perform privacy protection processing on the local sleep segment data set; Based on the local sleep segment data set after privacy protection processing, the local terminal uses an improved ResNet network as the local model and performs model training to obtain local model parameters; The local terminal encrypts and uploads the trained local model parameters to the cloud server, and the cloud server performs weighted aggregation on the local model parameters uploaded by multiple local terminals to obtain global model parameters; The cloud server encrypts and distributes the global model parameters to each local terminal, and the local terminal updates the local model based on the global model parameters and repeats iteratively until the local model converges; After the local model converges, the local terminal inputs the real-time collected sleep segment into the updated local model, outputs the probabilities of the user being in the wake period, light sleep period, deep sleep period, and rapid eye movement period through the softmax function, and takes the stage with the highest probability as the current sleep stage.
9. A real-time sleep state monitoring system, used to implement the real-time sleep state monitoring method according to any one of claims 1-8, characterized in that, Including: A data acquisition module, a sleep state judgment module, an active intervention control module, a sleep stage staging module, and a state loop monitoring module; The data acquisition module is used to collect the user's heart rate variability signal, EEG signal, and body movement data in real time; The sleep state judgment module is used to judge whether the user reaches the autonomous sleep state through the first algorithm model according to the collected physiological data; The active intervention control module is used to start and dynamically adjust the active intervention program until it is determined that the user enters the autonomous sleep state when the user does not reach the autonomous sleep state; The sleep stage staging module is used to judge the sleep stage in real time through the second algorithm model after the user enters the autonomous sleep state; The state loop monitoring module is used to perform real-time sleep monitoring, and when the user returns from sleep to the wake period, it triggers a re-judgment process.
Citation Information
Patent Citations
Music induction sleeping method and system based on electroencephalogram signal
CN107126615A