Sleep staging method and system based on adaptive trigger time characteristics

Through the sleep staging method based on adaptive triggering time features, a flexible triggering mechanism and time passage function are used to identify sporadic events. Combined with feature extraction models and pre-training models, the problem of the inability to effectively identify sporadic events in existing technologies is solved, and the accuracy of sleep stage classification and feature extraction capabilities are improved.

CN120345861BActive Publication Date: 2025-09-30XINGZHI (BEIJING) SCIENCE & TECHNOLOGY RESEARCH INSTITUTE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510451904.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-11
Publication Date
2025-09-30
Estimated Expiration
2045-04-11

AI Technical Summary

Technical Problem

Existing methods cannot effectively identify and extract incidental events during sleep when extracting multimodal signal features, which affects the accuracy of sleep stage classification.

Method used

A sleep staging method based on adaptive trigger time features is adopted. Physiological monitoring signals are acquired in real time through wearable devices. A flexible trigger mechanism and time passage function are used to identify occasional events. The event is then analyzed in combination with a feature extraction model and a pre-trained sleep stage classification model.

Benefits of technology

The accuracy of sleep stage classification has been improved, which can more comprehensively reflect the physiological state, especially capture the characteristic changes of each sleep stage in plateau environments, and improve the accuracy and responsiveness of feature extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120345861B_ABST
    Figure CN120345861B_ABST
Patent Text Reader

Abstract

The present invention discloses a sleep staging method and system based on adaptive trigger time features, which belongs to the technical field of plateau sleep stage staging. It solves the problem that existing methods cannot effectively identify and extract incidental events in sleep when extracting multimodal signal features. The method includes judging whether a physiological monitoring signal is an incidental event-related signal based on a preset incidental event judgment mechanism, calculating the incidental event value within a single group of time windows using the incidental event judgment mechanism, identifying and extracting incidental events using a feature extraction model, analyzing and processing the feature fusion results using a sleep stage staging model, and outputting a sleep staging result. The present invention introduces an incidental event judgment mechanism with a time decay function to screen event data and extract features from PPG signals and event data. These features are input into the sleep stage staging model to predict sleep stages, and at the same time, combined with a dynamically adjusted trigger threshold, the accuracy of feature extraction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of plateau sleep stage classification, and in particular relates to a sleep staging method and system based on adaptive triggering time characteristics. Background Art

[0002] Sleep occupies one-third of our lives, and its quality is directly related to physical health and daily life. Good sleep management primarily requires accurate sleep scoring and diagnosis. Sleep monitoring is crucial for sleep quality assessment. Traditional polysomnography (PSG) is widely used in sleep research and clinical diagnosis due to its comprehensiveness, accuracy, and standardization. However, collecting sleep monitoring data using PSG requires patients to wear multiple electrode sensors, which may cause discomfort.

[0003] Different sleep stages are typically accompanied by varying degrees of physical activity. Accelerometers on wrist-worn wearable devices monitor changes in body acceleration to monitor stationary, light, and intense activity in real time. Occasional large movements are often associated with arousal or REM sleep, which can disrupt deep or light sleep and cause transitions between sleep stages. Therefore, accurately detecting and analyzing these occasional events is crucial for comprehensively assessing sleep quality.

[0004] Chinese patent CN118436312A discloses an automatic sleep staging method based on multi-feature fusion. The method includes: providing physiological signals, including electroencephalogram (EEG), electrooculogram (EOG), and electromyography (EMG); segmenting the physiological signals to generate a set of physiological segmented signal segments; extracting multimodal signal features to obtain multimodal signal features of the physiological segmented signals, and fusing the multimodal signal features of adjacent physiological segmented signal segments across adjacent samples; selecting features from the physiological signal fusion feature set using a pre-built feature selection support vector machine to generate a physiological signal selection feature set after feature selection; identifying and classifying the physiological signal selection feature set using a pre-built sleep stage recognition support vector machine, and outputting the sleep stage category of the physiological signal. However, existing methods cannot effectively identify and extract incidental events during sleep when extracting multimodal signal features, which affects the accuracy of sleep stage classification. To address the above issues, we propose a sleep staging method and system based on adaptive trigger time features. Summary of the Invention

[0005] The purpose of the present invention is to address the shortcomings of the existing technology and provide a sleep staging method and system based on adaptive trigger time characteristics, which solves the problem that the existing methods cannot effectively identify and extract occasional events during sleep when extracting multimodal signal features.

[0006] The present invention is implemented as follows: a sleep staging method based on adaptive triggering time characteristics, the sleep staging method based on adaptive triggering time characteristics includes:

[0007] First, the wearable device is used to obtain real-time time-series physiological monitoring signals, including heart rate data and acceleration data. The acceleration data records the three-axis acceleration of x, y, and z axes, and the physiological monitoring signals are normalized.

[0008] Loading the normalized physiological monitoring signal, performing fusion preprocessing on the physiological monitoring signal, traversing the physiological monitoring signal, and determining whether the physiological monitoring signal is an accidental event-related signal based on a preset accidental event judgment mechanism;

[0009] If the physiological monitoring signal is an incidental event-related signal, the physiological monitoring signal is placed in the incidental event set, and the incidental event judgment mechanism is used to calculate the incidental event value within a single group of time windows. When the incidental event value within a single group of time windows exceeds the preset accumulation threshold θ pool When , the flexible trigger mechanism is triggered;

[0010] Taking the occasional event set and physiological monitoring signals within a single time window as input, the feature extraction model is executed. The feature extraction model identifies and extracts the occasional events and obtains the feature fusion result.

[0011] Load the feature fusion results, analyze and process them based on the pre-trained sleep stage classification model, and output the sleep stage classification results.

[0012] Preferably, the incidental event judgment mechanism is a flexible trigger mechanism, in which a threshold value θ of the fusion acceleration is defined. acc and the incidental event integration threshold θ pool , when the fusion acceleration F acc Exceeding the acceleration threshold θ acc , it means that an accidental event occurred.

[0013] Preferably, the method for determining whether a physiological monitoring signal is an incidental event-related signal based on a preset incidental event determination mechanism includes:

[0014] Traverse the acceleration data in the physiological monitoring signal and identify the fused acceleration F in the acceleration data acc ;

[0015] The accidental event judgment mechanism is based on the threshold θ of the fusion acceleration acc Draw the acceleration square wave function and use it to identify sporadic events in physiological monitoring signals. The acceleration square wave function is expressed as:

[0016]

[0017] Among them, when the acceleration square wave function is 1, it is judged that the fused acceleration corresponds to an accidental event, and when the acceleration square wave function is 0, it is judged that the fused acceleration corresponds to a non-accidental event;

[0018] At least one set of incidental event correlation signals is loaded, and the incidental event correlation signals are stored in an event integration space.

[0019] Preferably, the method for calculating the accidental event value within a single group of time windows using an accidental event judgment mechanism includes:

[0020] Traverse the incidental event correlation signals in the event integration space, identify the square wave of the fused acceleration corresponding to the incidental event correlation signals, and integrate the square wave of the fused acceleration;

[0021] The formula for integrating the square wave of fused acceleration is:

[0022]

[0023] Among them, S acc represents the square wave of the fused acceleration signal, Indicates the integration of the fused acceleration square wave from t0 to t1;

[0024] When the integral value of the acceleration square wave does not reach the threshold value θ pool When , the integral value in the event integral space is passed using the time passage function;

[0025] When the incidental event value in a single time window exceeds the preset accumulation threshold θ pool When , the flexible trigger mechanism is triggered, the gate unit is turned on, and the feature extraction model is entered.

[0026] Preferably, when the time lapse function is used to cause the integral value in the event integral space to decay, the time lapse function uses an exponential decay model to realize the decay of the integral over time. The expression of the time lapse function is as follows:

[0027]

[0028] in, represents the integral at time t, I0 is the initial integral value in the event integral space, λ is the decay rate, which controls the decay speed of the integral value over time, t represents the current time, ti represents the time when the incidental event occurs, and N is the total number of incidental events that occurred before the current time.

[0029] Preferably, the feature extraction model consists of a FusedAccelExtractor model and a HeartRateExtractor model, the FusedAccelExtractor model is used for extracting concentrated acceleration features of incidental events, and the HeartRateExtractor model is used for extracting heart rate features from physiological monitoring signals;

[0030] The FusedAccelExtractor model includes a temporal convolutional network module, a Bi-GRU, and a multi-head attention mechanism. The temporal convolutional network module is used to enhance the local correlation of the signal, and the Bi-GRU is used to capture the forward and backward dependencies of the time series. Finally, the multi-head attention mechanism is used to extract global features.

[0031] The HeartRateExtractor model consists of a temporal convolutional network module and a Transformer. The temporal convolutional network module is used to enhance local features. The Transformer processes the convolved features through a self-attention mechanism to capture the relationship between time steps. After feature extraction, the features in the heart rate and acceleration signals are fused through a feature fusion network, FeatureFusionNetwork.

[0032] Preferably, the method for analyzing and processing feature fusion results based on a pre-trained sleep stage classification model includes:

[0033] Use the long short-term memory network as the sleep stage classification model and load the feature fusion results;

[0034] The extracted feature fusion results are input into the sleep stage classification model. The long short-term memory network automatically learns the long-term and short-term dependencies in the time series through the gating mechanism and memory units.

[0035] A fully connected layer maps the hidden states of the long short-term memory network to different sleep stage categories and outputs the sleep stage results.

[0036] When evaluating the performance of the sleep stage classification model, confusion matrix, kappa statistic, precision, recall rate, and F1 score were used. The confusion matrix shows the performance of the sleep stage classification model as shown in the following formula:

[0037]

[0038] The Kappa statistic is used to measure the consistency between the model prediction and the actual observation, and considering the influence of accidental consistency, the consistency formula between the prediction and the actual observation is as follows:

[0039]

[0040] Among them, the confusion matrix shows that the performance of the sleep stage classification model includes true positives, false positives, false negatives, and true negatives.

[0041] Preferably, when the feature extraction model is iteratively trained using the training set and the test set, the incidental event set and the physiological monitoring signal are divided into the training set and the test set at an 8:2 ratio. When the feature extraction model is optimized, the parameters that need to be adjusted include the threshold θ of the fusion acceleration. acc and the incidental event integration threshold θ pool , learning rate lr, decay rate λ in the time elapsed function, and dropout ratio in the model.

[0042] On the other hand, the present invention also provides a sleep staging system based on adaptive triggering time characteristics, which includes:

[0043] The signal acquisition module acquires real-time, sequential physiological monitoring signals from wearable devices. These signals include heart rate data and acceleration data. The acceleration data records the three-axis accelerations of x, y, and z, and normalizes the physiological monitoring signals.

[0044] The flexible trigger mechanism module loads the normalized physiological monitoring signal, performs fusion preprocessing on the physiological monitoring signal, traverses the physiological monitoring signal, and determines whether the physiological monitoring signal is an incidental event-related signal based on the preset incidental event judgment mechanism. If the physiological monitoring signal is an incidental event-related signal, the physiological monitoring signal is placed in the incidental event set, and the incidental event judgment mechanism is used to calculate the incidental event value within a single group of time windows. When the incidental event value within a single group of time windows exceeds the preset accumulation threshold θ pool When , the flexible trigger mechanism is triggered;

[0045] The feature fusion module takes the set of incidental events within a single time window and the physiological monitoring signal as input and executes the feature extraction model. The feature extraction model identifies and extracts incidental events to obtain the feature fusion result.

[0046] The sleep staging module is used to load the feature fusion results, analyze and process the feature fusion results based on the pre-trained sleep stage classification model, and output the sleep staging results.

[0047] Preferably, the flexible trigger mechanism module includes:

[0048] A preprocessing unit is used to load the normalized physiological monitoring signal and perform fusion preprocessing on the physiological monitoring signal;

[0049] An event judgment unit is used to traverse the physiological monitoring signal and judge whether the physiological monitoring signal is an incidental event-related signal based on a preset incidental event judgment mechanism. If the physiological monitoring signal is an incidental event-related signal, the physiological monitoring signal is placed in the incidental event set;

[0050] The mechanism trigger unit uses the accidental event judgment mechanism to calculate the accidental event value within a single time window. When the accidental event value within a single time window exceeds the preset accumulation threshold θ pool , the flexible trigger mechanism is triggered.

[0051] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0052] This invention introduces an episodic event detection mechanism with a time-decay function to filter event data and extract features from both PPG signals and event data. These features are then fed into a sleep staging model for sleep stage prediction. Combined with a dynamically adjusted trigger threshold, this method effectively captures episodic events and improves feature extraction accuracy. This method, when processing acceleration data, can provide a more comprehensive reflection of physiological status.

[0053] This paper proposes a sporadic event detection mechanism based on a flexible trigger mechanism, enabling rapid identification and extraction of sporadic events. This flexible trigger mechanism can flexibly respond to signal mutations and rapidly initiate feature extraction to capture detailed information about sporadic events. This mechanism monitors signal changes in real time and immediately triggers feature extraction when significant mutations are detected, avoiding the interference of redundant information in traditional methods and ensuring the concentrated extraction of key features. Furthermore, to address the complex temporal changes of signals, a time-lapse function is introduced. This function gradually adjusts the trigger threshold over time, ensuring effective detection and capture of sporadic event characteristics even in areas with sparse data distribution.

[0054] In the present invention, the integral value in the event integral space is passed through the time passage function to prevent false triggering and ensure that the incidental event judgment mechanism can maintain sensitivity to continuous or frequent major events, further improving the feature extraction capability and response capability of the present invention to incidental events. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 The figure shows a schematic diagram of the implementation flow of the sleep staging method based on the adaptive triggering time feature provided by the present invention.

[0056] Figure 2 The figure shows a schematic diagram of the implementation flow of a method for determining whether a physiological monitoring signal is an incidental event-related signal based on a preset incidental event judgment mechanism.

[0057] Figure 3 The model architecture diagram of the sleep staging method based on adaptive trigger time features is shown.

[0058] Figure 4 The figure shows a schematic diagram of the implementation process of the method for calculating the accidental event value within a single group of time windows using the accidental event judgment mechanism.

[0059] Figure 5 The figure shows the kernel density estimation diagram of the time domain and frequency domain feature data of the PCA dimensionality reduction of the incidental event set data.

[0060] Figure 6 A schematic diagram of the implementation flow of the method for analyzing and processing feature fusion results based on a pre-trained sleep stage classification model is shown.

[0061] Figure 7 Shows the confusion matrix heatmap of different methods on the dataset.

[0062] Figure 8 An F1score plot showing comparisons of existing sleep stage classification methods.

[0063] Figure 9 It is a structural diagram of the sleep staging system based on adaptive triggering time characteristics provided by the present invention. DETAILED DESCRIPTION

[0064] Unless otherwise defined, all technical and scientific terms used herein have the same meanings as commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of the application are only for the purpose of describing specific embodiments and are not intended to limit this application. The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of this application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0065] When extracting multimodal signal features, existing methods cannot effectively identify and extract incidental events in sleep, and their impact on the overall signal is small. Traditional methods often find it difficult to effectively capture and extract these important local features, resulting in insufficient integrity and accuracy of signal features. To address the above problems, we propose a sleep staging method and system based on adaptive trigger time features. When implementing the sleep staging method based on adaptive trigger time features, the method first determines whether the physiological monitoring signal is an incidental event-related signal based on a preset incidental event judgment mechanism. Then, when the incidental event value in a single time window exceeds a preset accumulation threshold θ, the system generates an error. poolWhen the sleep state is reached, the flexible trigger mechanism is triggered. The feature extraction model then identifies and extracts incidental events, obtaining a feature fusion result. Finally, the feature fusion result is analyzed and processed based on the pre-trained sleep stage classification model, and the sleep stage result is output. The present invention introduces an incidental event judgment mechanism with a time decay function to filter event data and extract features from the PPG signal and event data. These features are input into the sleep stage classification model for sleep stage prediction. Combined with a dynamically adjusted trigger threshold, incidental events are effectively captured, improving the accuracy of feature extraction. This method can provide a more comprehensive reflection of physiological status when processing acceleration data.

[0066] It should be noted that the sleep staging method based on adaptive trigger time features provided in the embodiments of the present invention can be used to classify sleep stages in the high altitude environment. The high altitude environment has a significant impact on human physiological state, including sleep quality. The sleep staging method based on adaptive trigger time features can more accurately capture the characteristic changes of each sleep stage in the high altitude environment, thereby improving the accuracy of staging.

[0067] The embodiment of the present invention provides a sleep staging method based on adaptive triggering time characteristics. Figure 1 The figure shows a schematic diagram of the implementation process of the sleep staging method based on the adaptive trigger time feature. The sleep staging method based on the adaptive trigger time feature specifically includes:

[0068] S10, first, obtain real-time time-series physiological monitoring signals through the wearable device, including heart rate data and acceleration data, where the acceleration data records the three-axis acceleration of x, y, and z axes, and normalize the physiological monitoring signals;

[0069] In this embodiment, wearable devices include but are not limited to smart watches, sports bracelets, heart rate belts, and medical equipment-grade wearable devices. Because heart rate data and acceleration data come from different sensors and the timestamps may have deviations, time synchronization processing is required. Time synchronization processing in this application is a method of time alignment processing for signals. Physiological monitoring signals include but are not limited to heart rate monitoring signals, acceleration signals, blood oxygen saturation signals, blood pressure signals, body temperature signals, and respiratory rate signals.

[0070] S20, loading the normalized physiological monitoring signal, performing fusion preprocessing on the physiological monitoring signal, and traversing the physiological monitoring signal;

[0071] S30, determining whether the physiological monitoring signal is an incidental event-related signal based on a preset incidental event determination mechanism;

[0072] S40, if the physiological monitoring signal is an incidental event-related signal, the physiological monitoring signal is placed in the incidental event set, and the incidental event judgment mechanism is used to calculate the incidental event value within a single group of time windows. When the incidental event value within a single group of time windows exceeds a preset accumulation threshold θ pool When , the flexible trigger mechanism is triggered;

[0073] If the physiological monitoring signal is a non-incidental event-related signal, the current physiological monitoring signal is retained, and the incidental event judgment mechanism is not used for calculation and processing of the current physiological monitoring signal.

[0074] S50, taking the occasional event set within a single time window and the physiological monitoring signal as input, executing a feature extraction model, the feature extraction model identifies and extracts the occasional events, and obtains a feature fusion result;

[0075] S60, loading the feature fusion result, analyzing and processing the feature fusion result based on the pre-trained sleep stage classification model, and outputting the sleep stage classification result.

[0076] In an embodiment of the present invention, an incidental event judgment mechanism with a time decay function is used to screen event data, and then features are extracted from the PPG signal and event data. These features are input into the sleep stage classification model for sleep stage prediction. Combined with dynamic adjustment of the trigger threshold, incidental events are effectively captured, the accuracy of feature extraction is improved, and a more comprehensive reflection of physiological status is provided when processing acceleration data.

[0077] It should be noted that the incidental event judgment mechanism is a flexible trigger mechanism, which defines the threshold value θ of the fusion acceleration. acc and the incidental event integration threshold θ pool , when the number of incidental events in a time window accumulates to the incidental event integral threshold θ pool When the flexible trigger mechanism is triggered, the gate unit opens and enters the feature extraction model. When the fusion acceleration F acc Exceeding the acceleration threshold θ acc , it means that an accidental event occurred.

[0078] In the embodiment of the present invention, a sporadic event judgment mechanism based on a flexible trigger mechanism is proposed, which can quickly identify and extract sporadic events. The flexible trigger mechanism can flexibly respond to signal mutations and quickly start the feature extraction process to capture the detailed information of sporadic events. This mechanism monitors the changes in the signal in real time. When a significant mutation reaches the sporadic event integral threshold θ poolWhen the signal is detected, feature extraction is immediately triggered, avoiding the interference of redundant information in traditional methods and ensuring that key features are extracted in a concentrated manner. In addition, to cope with the complex changes in the signal in the time dimension, a time lapse function is introduced. The integral value in the square wave box is passed through the time lapse function to prevent false triggering and ensure that the model remains sensitive to continuous or frequent major events. It ensures that the characteristic information of occasional events can be effectively detected and captured even in areas with sparse data distribution.

[0079] The embodiment of the present invention provides a method for determining whether a physiological monitoring signal is an incidental event-related signal based on a preset incidental event determination mechanism. Figure 2 The following is a schematic diagram of a method for determining whether a physiological monitoring signal is an incidental event-related signal based on a preset incidental event determination mechanism. The method for determining whether a physiological monitoring signal is an incidental event-related signal based on a preset incidental event determination mechanism specifically includes:

[0080] S101, traverse the acceleration data in the physiological monitoring signal and identify the fused acceleration F in the acceleration data acc ;

[0081] S102, the accidental event judgment mechanism is based on the threshold value θ of the fusion acceleration acc Draw the acceleration square wave function and use it to identify sporadic events in physiological monitoring signals. The acceleration square wave function is expressed as:

[0082]

[0083] Among them, when the acceleration square wave function is 1, it is judged that the fused acceleration corresponds to an accidental event, and when the acceleration square wave function is 0, it is judged that the fused acceleration corresponds to a non-accidental event;

[0084] S103: Load at least one group of incidental event correlation signals, and store the incidental event correlation signals in an event integration space.

[0085] In this embodiment, a square wave box can be used to describe the event integration space, such as Figure 3 As shown, we visualize it as a square wave box. Its integral formula is shown in formula (2). The corresponding square wave function is drawn according to the fusion acceleration threshold to extract the sporadic signal. Then the square wave function and the sporadic acceleration signal are input into the square wave box together. Figure 3 The model architecture diagram of the sleep staging method based on adaptive trigger time characteristics is shown. Figure 3As can be seen in the figure, when the logic of the sleep staging method based on adaptive trigger time features is triggered, the three-axis acceleration physiological signals are first fused and preprocessed. A corresponding square wave function is drawn according to the fused acceleration threshold to extract sporadic signals. The square wave function and the sporadic acceleration signal are then input into the square wave box together. The square wave function is then integrated, and a certain proportion of redundant information is passed through the time elapsed function. When the square wave function in the square wave box accumulates to a threshold, the switch is triggered, completing the identification and extraction of sporadic events. The heart rate data and sporadic event data are input into their respective feature extraction models and then into the sleep stage staging model for sleep staging.

[0086] The embodiment of the present invention provides a method for calculating the accidental event value within a single group of time windows using an accidental event judgment mechanism. Figure 4 The following is a schematic diagram of the implementation process of a method for calculating the accidental event value within a single time window using an accidental event judgment mechanism. The method for calculating the accidental event value within a single time window using an accidental event judgment mechanism specifically includes:

[0087] S201, traversing the incidental event correlation signals in the event integration space, identifying the square wave of the fused acceleration corresponding to the incidental event correlation signals, and integrating the square wave of the fused acceleration;

[0088] The formula for integrating the square wave of fused acceleration is:

[0089]

[0090] Among them, S acc represents the square wave of the fused acceleration signal, Indicates the integration of the fused acceleration square wave from t0 to t1;

[0091] S202, when the integral value of the square wave of acceleration does not reach the threshold value θ pool When , the integral value in the event integral space is passed using the time passage function;

[0092] In this embodiment, when the time lapse function is used to decay the integral value in the event integral space, the time lapse function uses an exponential decay model to realize the decay of the integral over time. The expression of the time lapse function is as follows:

[0093]

[0094] in, represents the integral at time t, I0 is the initial integral value in the event integral space, λ is the decay rate, which controls the decay speed of the integral value over time, t represents the current time, ti represents the time when the incidental event occurs, and N is the total number of incidental events that occurred before the current time.

[0095] S203, when the value of the incidental event in a single time window exceeds the preset accumulation threshold θ pool When , the flexible trigger mechanism is triggered, the gate unit is turned on, and the feature extraction model is entered.

[0096] In an embodiment of the present invention, a time-lapse function is used to pass the integral value in the event integration space, so as to prevent false triggering and ensure that the incidental event judgment mechanism can maintain sensitivity to continuous or frequent major events, further improving the feature extraction capability and response capability of the present invention to incidental events.

[0097] In this embodiment, to improve data quality and reliability, we performed a series of preprocessing operations on the physiological monitoring signal data. Because heart rate data and acceleration data come from different sensors and their timestamps may differ, time synchronization is required to align all data onto a unified timeline. First, using the start time of the polysomnography (PSG) as a reference, all data is converted to the number of seconds since the start of the PSG. Heart rate and acceleration data are synchronized through linear interpolation. Then, a code processing algorithm is used to convert acceleration along the x, y, and z axes into activity counts. A reasonable threshold is defined, and fused acceleration values ​​that do not exceed the range are treated as interference from occasional events and replaced with a zero matrix.

[0098] In addition, before the incidental event set containing acceleration data is input into the feature extraction model, the time domain and frequency domain features of the acceleration data are extracted. The time domain features are directly calculated from the time series data, and the frequency domain features are calculated by fast Fourier transform (FFT). Then, PCA (Principal Component Analysis) is used to map the high-dimensional features to two dimensions. The distribution of the incidental event set data in the two-dimensional space after dimensionality reduction is shown in the figure below. Figure 5 As shown, Figure 5 The kernel density estimation diagram of the PCA dimension reduction time domain and frequency domain feature data of the incidental event set data is shown. It should be noted that Figure 5The following plots show kernel density estimates of time-domain and frequency-domain feature data from six subjects after PCA dimensionality reduction. PC1 represents the first principal component after PCA, and PC2 represents the second principal component after PCA. The color intensity indicates the density of points in that region, with darker colors indicating a greater concentration of data points. PC1 and PC2 together explain the majority of the variance in the data. These two principal components capture the key information of the original high-dimensional data and project it into a two-dimensional space. The distribution of the data in this two-dimensional space exhibits several high-density regions, where a large number of data points cluster, corresponding to characteristics of different sleep stages or states. Low-density regions contain dispersed data points, corresponding to transitional stages or less frequent states in the sleep data. The pronounced peaks in the figure indicate clustering in the data, corresponding to different sleep stages, such as light sleep (N1, N2), deep sleep (N3), or rapid eye movement (REM) sleep. The extraction of time-domain and frequency-domain features provides important support for subsequent deep learning feature extraction models.

[0099] like Figure 3 As shown, the feature extraction model consists of a FusedAccelExtractor model and a HeartRateExtractor model. The FusedAccelExtractor model is used for extracting concentrated acceleration features of incidental events, and the HeartRateExtractor model is used for extracting heart rate features from physiological monitoring signals.

[0100] The FusedAccelExtractor model includes a temporal convolutional network (TCN) module, a Bi-GRU, and a multi-head attention mechanism. The TCN module is used to enhance the local correlation of the signal, and the Bi-GRU is used to capture the forward and backward dependencies of the time series. Finally, the multi-head attention mechanism is used to extract global features.

[0101] The HeartRateExtractor model consists of a temporal convolutional network module and a Transformer. The temporal convolutional network module is used to enhance local features. The Transformer processes the convolved features through a self-attention mechanism to capture the relationship between time steps. After feature extraction, the features in the heart rate and acceleration signals are fused through a feature fusion network, FeatureFusionNetwork.

[0102] In the embodiment of the present invention, the feature extraction model parameters are shown in Table 1.

[0103] Table 1 Feature extraction model parameters

[0104]

[0105]

[0106] In this embodiment of the present invention, a long short-term memory network is used as a sleep stage classification model. Because time series signals have long-term dependencies and complex temporal dynamics, traditional classification methods struggle to capture these complex temporal relationships. Therefore, a long short-term memory network (LSTM) is used to process the fused sensor feature data. First, the extracted fused acceleration and heart rate data are input into the LSTM network. The LSTM automatically learns the long-term and short-term dependencies in the time series through a gating mechanism and memory units. Finally, a fully connected layer maps the hidden states of the LSTM to different sleep stage categories. The structural parameters of the sleep stage classification model are shown in Table 2.

[0107] Table 2 Structural parameters of the sleep stage classification model

[0108]

[0109] In an embodiment of the present invention, when the sleep stage classification model is iteratively trained using a training set and a test set, the incidental event set and the physiological monitoring signal are divided into a training set and a test set at a ratio of 8:2. When optimizing the sleep stage classification model, the parameters that need to be adjusted include the threshold of the fusion acceleration and the incidental event integration threshold, the learning rate lr, the decay rate in the time elapsed function, and the dropout ratio in the model.

[0110] When optimizing and adjusting parameters of the sleep stage classification model, first, define a reasonable search range for each hyperparameter to be optimized. Set the fusion acceleration threshold θ acc The integration threshold θ is 0.8 to 1.2 and the infrequent event pool The range of λ was 10 to 40, the learning rate was 1e-4 to 1e-1, the decay rate λ was 0.1 to 0.9, and the dropout ratio was 0.2 to 0.5. Different parameter combinations were then trained and validated. For each parameter combination, the model was trained on the training set and evaluated on the validation set. Finally, the best performing parameter combination was selected based on the performance metrics on the validation set. The sleep staging experimental results for different model parameter combinations are shown in Table 3.

[0111] Table 3

[0112] TABLE II: Results of Sleep Staging Experiments with Different ModelParameter Combinations

[0113]

[0114] In Table 3, data set 9 achieved the highest accuracy. The pooling size was moderate, and the learning rate was 1e-3, ensuring training stability. A decay rate of 0.6, lambda, effectively captured temporal feature changes, and moderate dropout reduced the risk of overfitting. This parameter set also achieved the best results in accuracy, precision, recall, F1 score, and kappa coefficient, demonstrating the model's excellent performance in prediction and class balance. Therefore, this parameter set was selected for subsequent model training and experimental validation.

[0115] It should be noted that the training and test data sets were obtained from data from all subjects undergoing polysomnography and sleep laboratory recordings from the previous week. The data included heart rate data (bpm) and acceleration data, which recorded acceleration in the x, y, and z axes (unit: g). Sleep stage annotation was based on the polysomnography equipment and was divided into rapid eye movement (REM) and non-rapid eye movement (NREM) sleep cycles. The depth of NREM sleep varies between different NREM cycles (N1, N2, N3) and within the same cycle.

[0116] The embodiment of the present invention provides a method for analyzing and processing feature fusion results based on a pre-trained sleep stage classification model. Figure 6 The figure shows a flowchart of a method for analyzing and processing feature fusion results based on a pre-trained sleep stage classification model. The method for analyzing and processing feature fusion results based on a pre-trained sleep stage classification model specifically includes:

[0117] S301, using the long short-term memory network as the sleep stage classification model, loading the feature fusion results;

[0118] S302, the extracted feature fusion results are input into the sleep stage classification model, and the long short-term memory network automatically learns the long-term and short-term dependencies in the time series through the gating mechanism and memory units;

[0119] S303, mapping the hidden states of the long short-term memory network to different sleep stage categories through a fully connected layer, and outputting the sleep staging result;

[0120] When evaluating the performance of the sleep stage classification model, confusion matrix, kappa statistic, precision, recall rate, and F1 score were used. The confusion matrix shows the performance of the sleep stage classification model as shown in the following formula:

[0121]

[0122] The Kappa statistic is used to measure the consistency between the model prediction and the actual observation, and considering the influence of accidental consistency, the consistency formula between the prediction and the actual observation is as follows:

[0123]

[0124] Among them, the confusion matrix shows that the performance of the sleep stage classification model includes true positives, false positives, false negatives, and true negatives.

[0125] In this example, we compared the performance of different methods on the same dataset to evaluate their effectiveness in handling specific tasks. The dataset used included all subjects. Each method was trained and evaluated on the same dataset to ensure fairness in the results. We first selected traditional methods, including logistic regression, k-nearest neighbors, random forest, neural network, and MLP. The comparison results are shown in Table 4.

[0126] Table 4 Performance of different methods on the dataset

[0127] TABLE IV:Performance of Different Methods on the Dataset

[0128]

[0129] Table 4 shows the performance of various methods on the same dataset (physiological monitoring signals) to evaluate their effectiveness in handling specific tasks. The results show that the Soft Trigger method performed best in all indicators, with accuracy, precision, recall, and F1 score all reaching 0.974, and the Kappa coefficient was 0.948. In comparison, other traditional methods such as logistic regression, k-NN, and random forest performed well, but failed to surpass the overall performance of Soft Trigger. In particular, the F1 score of k-Nearest neighbors reached 0.931, but it was still slightly inferior to Soft Trigger. The SoftTrigger method proposed in this paper showed obvious advantages in balancing precision and recall, and achieved better performance when processing complex datasets. Furthermore, the confusion matrix heat map of different methods on the dataset was drawn, as shown below. Figure 7 As shown in the figure, the confusion matrix heat map of different methods on the dataset is shown. The F1 score graph of different methods for sleep stage classification on the dataset is compared as shown in the figure. Figure 8 FIG. 4 shows an F1score graph for comparison of existing sleep stage classification methods. Figure 8The F1 scores of different sleep staging methods across three sleep stages (Wake, REM, and NREM) are presented. The Soft Trigger method achieves high F1 scores across all stages, with a particularly strong performance in NREM, demonstrating its superior classification and generalization capabilities when handling complex sleep staging tasks. In comparison, traditional methods such as logistic regression and k-nearest neighbor perform poorly. Random forests and MLP, while competitive, still lag behind deep learning models. The Soft Trigger method, in particular, demonstrates greater potential in practical applications.

[0130] The Soft Trigger method, through its flexible triggering mechanism, effectively captures time series characteristics and ensures balanced model processing across all categories. This approach not only improves overall accuracy but also demonstrates greater robustness in datasets with imbalanced categories. Therefore, the Soft Trigger method strikes a good balance between performance and computational efficiency, ensuring high practicality even when applied to complex datasets. This approach provides new insights and directions for future time series data processing.

[0131] The embodiment of the present invention provides a sleep staging system based on adaptive triggering time characteristics. Figure 9 The figure shows a schematic diagram of the implementation process of a sleep staging system based on adaptive triggering time features. The sleep staging system based on adaptive triggering time features specifically includes:

[0132] The signal acquisition module 100 acquires real-time, sequential physiological monitoring signals from the wearable device. The physiological monitoring signals include heart rate data and acceleration data. The acceleration data records the three-axis acceleration of x, y, and z axes, and normalizes the physiological monitoring signals.

[0133] The flexible trigger mechanism module 200 loads the normalized physiological monitoring signal, performs fusion preprocessing on the physiological monitoring signal, traverses the physiological monitoring signal, and determines whether the physiological monitoring signal is an incidental event-related signal based on a preset incidental event judgment mechanism. If the physiological monitoring signal is an incidental event-related signal, the physiological monitoring signal is placed in the incidental event set, and the incidental event judgment mechanism is used to calculate the incidental event value within a single group time window. When the incidental event value within the single group time window exceeds a preset accumulation threshold θ pool When , the flexible trigger mechanism is triggered;

[0134] The feature fusion module 300 takes the set of incidental events within a single time window and the physiological monitoring signal as input and executes a feature extraction model. The feature extraction model identifies and extracts incidental events to obtain a feature fusion result.

[0135] The sleep staging module 400 is used to load the feature fusion result, analyze and process the feature fusion result based on the pre-trained sleep stage classification model, and output the sleep staging result.

[0136] In this embodiment, the flexible trigger mechanism module 200 includes:

[0137] The pre-processing unit 210 is used to load the normalized physiological monitoring signal and perform fusion pre-processing on the physiological monitoring signal;

[0138] An event determination unit 220 is configured to traverse the physiological monitoring signal and determine whether the physiological monitoring signal is an incidental event-related signal based on a preset incidental event determination mechanism. If the physiological monitoring signal is an incidental event-related signal, the physiological monitoring signal is placed in an incidental event set.

[0139] The mechanism trigger unit 230 uses the accidental event judgment mechanism to calculate the accidental event value in a single group of time windows. When the accidental event value in a single group of time windows exceeds the preset accumulation threshold θ pool , the flexible trigger mechanism is triggered.

[0140] In summary, the present invention provides a sleep staging method and system based on adaptive trigger time features. This method introduces an incidental event judgment mechanism with a time decay function to filter event data and extract features from the PPG signal and event data. These features are input into the sleep stage staging model for sleep stage prediction. Combined with a dynamically adjusted trigger threshold, this effectively captures incidental events and improves the accuracy of feature extraction. This method can provide a more comprehensive reflection of physiological states when processing acceleration data. This overcomes the problem that existing methods, when extracting multimodal signal features, are unable to effectively identify and extract incidental events during sleep, thus affecting the accuracy of sleep stage staging.

[0141] It should be noted that for the aforementioned embodiments, for the sake of simplicity, those skilled in the art should be aware that the present invention is not limited by the order of the actions described, as certain steps may be performed in other orders or simultaneously according to the present invention. Furthermore, those skilled in the art should also be aware that the embodiments described in this specification are preferred embodiments, and the actions and modules involved are not necessarily required for the present invention.

[0142] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the system, device, and method embodiments described above are merely illustrative. For example, the division of the above units is merely a logical functional division. In actual implementation, other division methods may be used, such as combining or integrating multiple units or components into another system, or ignoring or not performing some features.

Claims

1. A sleep staging method based on adaptive trigger time characteristics, used in the field of plateau sleep stage staging technology, characterized by: Sleep staging methods based on adaptive trigger time features include: First, wearable devices are used to obtain real-time, time-series physiological monitoring signals, including heart rate data and acceleration data. The acceleration data records the three-axis acceleration of x, y, and z, and the physiological monitoring signals are normalized. Loading the normalized physiological monitoring signal, performing fusion preprocessing on the physiological monitoring signal, traversing the physiological monitoring signal, and determining whether the physiological monitoring signal is an accidental event-related signal based on a preset accidental event judgment mechanism; If the physiological monitoring signal is an incidental event-related signal, the physiological monitoring signal is placed in the incidental event set, and the incidental event judgment mechanism is used to calculate the incidental event value within a single group of time windows. When the incidental event value within a single group of time windows exceeds the preset accumulation threshold When , the flexible trigger mechanism is triggered; Taking the occasional event set and physiological monitoring signals within a single time window as input, the feature extraction model is executed. The feature extraction model identifies and extracts the occasional events and obtains the feature fusion result. Load the feature fusion results, analyze and process them based on the pre-trained sleep stage classification model, and output the sleep stage classification results; The incidental event judgment mechanism is a flexible trigger mechanism, which defines the threshold of the fusion acceleration. and incidental event integration threshold , when the fusion acceleration Exceeding the acceleration threshold When it represents an accidental event; The method for calculating the accidental event value within a single group of time windows using the accidental event judgment mechanism includes: Traverse the incidental event correlation signals in the event integration space, identify the square wave of the fused acceleration corresponding to the incidental event correlation signals, and integrate the square wave of the fused acceleration; The formula for integrating the square wave of fused acceleration is: (2) in, represents the square wave of the fused acceleration signal, Indicates the integration of the fused acceleration square wave from t0 to t1; When the integral value of the acceleration square wave does not reach the threshold When , the integral value in the event integral space is passed using the time passage function; When the value of incidental events in a single time window exceeds the preset accumulation threshold When , the flexible trigger mechanism is triggered, the gate control unit is turned on, and the feature extraction model is entered; The feature extraction model consists of a FusedAccelExtractor model and a HeartRateExtractor model. The FusedAccelExtractor model is used to extract concentrated acceleration features from incidental events, and the HeartRateExtractor model is used to extract heart rate features from physiological monitoring signals. The FusedAccelExtractor model includes a temporal convolutional network module, a Bi-GRU, and a multi-head attention mechanism. The temporal convolutional network module is used to enhance the local correlation of the signal, and the Bi-GRU is used to capture the forward and backward dependencies of the time series. Finally, the multi-head attention mechanism is used to extract global features. The HeartRateExtractor model consists of a temporal convolutional network module and a Transformer. The temporal convolutional network module is used to enhance local features. The Transformer processes the convolved features through a self-attention mechanism to capture the relationship between time steps. After feature extraction, the features of the heart rate and acceleration signals are fused through a feature fusion network. The method for analyzing and processing feature fusion results based on the pre-trained sleep stage classification model includes: Use the long short-term memory network as the sleep stage classification model and load the feature fusion results; The extracted feature fusion results are input into the sleep stage classification model. The long short-term memory network automatically learns the long-term and short-term dependencies in the time series through the gating mechanism and memory units. A fully connected layer maps the hidden states of the long short-term memory network to different sleep stage categories and outputs the sleep stage results. When evaluating the performance of the sleep stage classification model, confusion matrix, kappa statistic, precision, recall rate, and F1 score were used. The confusion matrix shows the performance of the sleep stage classification model as shown in the following formula: (4) The Kappa statistic is used to measure the consistency between the model prediction and the actual observation, and considering the influence of accidental consistency, the consistency formula between the prediction and the actual observation is as follows: (5) Among them, the confusion matrix shows that the performance of the sleep stage classification model includes true positives, false positives, false negatives, and true negatives.

2. The sleep staging method based on adaptive triggering time characteristics according to claim 1, characterized in that: The method for determining whether a physiological monitoring signal is an incidental event-related signal based on a preset incidental event determination mechanism includes: Traverse the acceleration data in the physiological monitoring signal and identify the fused acceleration in the acceleration data ; The mechanism for judging incidental events is based on the threshold of fused acceleration. Draw the acceleration square wave function and use it to identify sporadic events in physiological monitoring signals. The acceleration square wave function is expressed as: (1) Among them, when the acceleration square wave function is 1, it is judged that the fused acceleration corresponds to an accidental event, and when the acceleration square wave function is 0, it is judged that the fused acceleration corresponds to a non-accidental event; At least one set of incidental event correlation signals is loaded, and the incidental event correlation signals are stored in an event integration space.

3. The sleep staging method based on adaptive triggering time characteristics according to claim 2, characterized in that: When the time lapse function is used to pass the integral value in the event integral space, the time lapse function uses an exponential decay model to realize the decay of the integral system over time. The expression of the time lapse function is as follows: (3) in, represents the integral at time t, is the initial integral value in the event integration space, is the decay rate, which controls the decay speed of the integral value over time. t represents the current time, ti represents the time when the incident occurs, and N is the total number of incidents that occurred before the current time.

4. The sleep staging method based on adaptive triggering time characteristics according to claim 2, characterized in that: When using the training set and test set to iteratively train the sleep stage classification model, the incidental event set and physiological monitoring signals are divided into the training set and test set at an 8:2 ratio. When optimizing the feature extraction model, the parameters that need to be adjusted include the threshold of the fusion acceleration. and incidental event integration threshold , learning rate lr, the decay rate in the time elapsed function , the dropout ratio in the model.

5. A sleep staging system based on adaptive triggering time characteristics, for implementing the sleep staging method based on adaptive triggering time characteristics according to any one of claims 1 to 4, characterized in that: It includes: The signal acquisition module acquires real-time, sequential physiological monitoring signals from wearable devices. These signals include heart rate data and acceleration data. The acceleration data records the three-axis accelerations of x, y, and z, and normalizes the physiological monitoring signals. The flexible trigger mechanism module loads the normalized physiological monitoring signal, pre-processes the fusion of the physiological monitoring signal, traverses the physiological monitoring signal, and judges whether the physiological monitoring signal is an incidental event-related signal based on the preset incidental event judgment mechanism. If the physiological monitoring signal is an incidental event-related signal, the physiological monitoring signal is placed in the incidental event set, and the incidental event judgment mechanism is used to calculate the incidental event value in a single group of time windows. When the incidental event value in a single group of time windows exceeds the preset accumulation threshold When , the flexible trigger mechanism is triggered; The feature fusion module takes the set of incidental events within a single time window and the physiological monitoring signal as input and executes the feature extraction model. The feature extraction model identifies and extracts incidental events to obtain the feature fusion result. The sleep staging module is used to load the feature fusion results, analyze and process the feature fusion results based on the pre-trained sleep stage classification model, and output the sleep staging results.

6. The sleep staging system based on adaptive triggering time characteristics according to claim 5, characterized in that: The flexible trigger mechanism module includes: A preprocessing unit is used to load the normalized physiological monitoring signal and perform fusion preprocessing on the physiological monitoring signal; An event judgment unit is used to traverse the physiological monitoring signal and judge whether the physiological monitoring signal is an incidental event-related signal based on a preset incidental event judgment mechanism. If the physiological monitoring signal is an incidental event-related signal, the physiological monitoring signal is placed in the incidental event set; The mechanism trigger unit uses the accidental event judgment mechanism to calculate the accidental event value within a single time window. When the accidental event value within a single time window exceeds the preset accumulation threshold , the flexible trigger mechanism is triggered.

Citation Information

Patent Citations

  • Automatic sleep staging method based on multi-feature fusion

    CN118436312A

  • Sleep staging detection method and wearable sleep staging detection device

    CN107890339A

  • Sleep monitoring method, device and system and storage medium

    CN113679339A