Multi-model fusion sleep staging algorithm based on electroencephalogram signals
By cascading convolutional neural networks trained on different databases and bidirectional long short-term memory network models, the problem of inefficient collaborative utilization of imperfect sleep staging algorithms in existing technologies is solved. This results in a highly efficient sleep staging system that improves accuracy and resource efficiency.
Patent Information
- Application Number
- CN202511056449.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-11-18
AI Technical Summary
Existing EEG sleep staging methods have shortcomings in terms of model generalization ability and stage segmentation accuracy, especially the imperfect collaborative utilization mechanism between models trained on different databases, which leads to unstable model performance in cross-database scenarios.
A multi-model fusion sleep staging algorithm based on EEG signals is adopted. By cascading convolutional neural networks trained on different databases and an improved bidirectional long short-term memory network model, the respective classification advantages are utilized, and a two-level discrimination strategy is adopted to reduce the risk of misjudgment and reduce the consumption of computing resources.
It improves the model's adaptability and generalization ability in different environments, reduces the computational resource requirements, is suitable for low-power devices and real-time EEG analysis systems, and enhances the accuracy and resource efficiency of sleep staging systems.
Smart Images

Figure CN120974403A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electroencephalogram (EEG) signal technology, and in particular to a multi-model fusion sleep staging algorithm based on EEG signals. Background Technology
[0002] Electroencephalography (EEG) signals have wide applications in the intersection of medicine and artificial intelligence, particularly in automated sleep staging tasks. By analyzing changes in nighttime brain activity, individuals can identify their sleep states. Automated sleep staging technology not only assists doctors in diagnosing sleep disorders but also serves various scenarios such as intelligent health monitoring and wearable devices. Current technologies generally employ deep learning methods, constructing neural network models to extract and classify features from EEG signals, thereby identifying different sleep stages such as wakefulness, light sleep, and deep sleep.
[0003] Most current mainstream methods rely on a single data source to train models, such as publicly available databases like Sleep-EDF, ISRUC, and SHHS. Researchers typically select a specific database as training and validation data, and train multi-classification models by constructing structures such as convolutional neural networks (CNNs), recurrent neural networks (RNNs), and temporal attention models (Transformers). After training, the model is directly applied to new EEG signal data for sleep stage discrimination.
[0004] However, due to differences in data sources, population characteristics, collection equipment, annotation standards, and sampling frequencies among different databases, models trained on a single database exhibit unstable performance in transfer applications. For example, models trained on some databases demonstrate strong coarse-level differentiation between "awake" and "sleep," but perform poorly in distinguishing subcategories such as "light sleep" and "deep sleep"; while other models excel in subcategories but are inaccurate in identifying the boundary between awake and sleep. This disparity severely limits the model's generalization ability in cross-database scenarios.
[0005] To improve the generality and accuracy of models, some studies have attempted to introduce ensemble learning strategies, such as model voting, multi-model fusion decision-making, or feature fusion. These methods generally require the introduction of a fusion module during the model training phase, or complex processing such as dynamic weighting and probability calculation of the outputs of multiple models to compensate for the shortcomings of a single model. However, these methods often have the following drawbacks: first, the system structure is complex, relying on the collaborative work of multiple sub-modules, making deployment difficult; second, the fusion strategy has many parameters, the debugging process is complex, and it is not easy to achieve stable end-to-end deployment; and third, the computational resource overhead is large, making it unsuitable for embedded or real-time systems.
[0006] In addition, some studies have improved model adaptability through transfer learning and joint training, but these methods rely heavily on preprocessing and label mapping, and have high requirements for the quality and quantity of annotations in the target database, limiting their practical application scenarios. Therefore, within the existing technological framework, achieving effective integration of multiple models to complement each other's strengths remains an unsolved technical challenge.
[0007] In summary, existing EEG sleep staging methods still have shortcomings in terms of model generalization ability and stage segmentation accuracy. In particular, the collaborative utilization mechanism between models trained on different databases is imperfect, which makes it impossible to fully leverage the discriminative advantages of each model at a specific stage. Based on this, we propose a multi-model fusion sleep staging algorithm based on EEG signals. Summary of the Invention
[0008] To address the problems existing in the prior art, this invention proposes a multi-model fusion sleep staging algorithm based on electroencephalogram (EEG) signals.
[0009] To achieve the above objectives, the present invention adopts the following technical solution:
[0010] A multi-model fusion sleep staging algorithm based on electroencephalogram (EEG) signals includes the following steps:
[0011] S1: Train on the Sleep-EDF database and use a convolutional neural network structure to obtain sleep algorithm model A; train on the ISRUC database and use an improved bidirectional long short-term memory network structure to obtain sleep algorithm model B. The training data is not limited to the Sleep-EDF database and the ISRUC database, and the database of the training data does not need to be specified.
[0012] S2: Input brainwave signals;
[0013] S3: After the EEG signal is input, it first undergoes preprocessing operations, which include signal segmentation, bandpass filtering, artifact removal and feature standardization to obtain structured EEG segments.
[0014] S4: Input each EEG segment from S3 into the sleep algorithm model A. If the sleep algorithm model A determines that the EEG segment is "awake", then the classification result is directly used as the final label output for the current EEG segment.
[0015] S5: If sleep algorithm model A determines that the EEG segment is "sleep", then the EEG segment will continue to be fed into sleep algorithm model B. Sleep algorithm model B outputs the classification result of the EEG segment, namely "light sleep" or "deep sleep", and outputs it as the final label.
[0016] Preferably, in step S3, the signal segmentation process uses a 30-second time window to slice the continuous EEG data.
[0017] Preferably, in S3, the bandpass filtering process uses a 0.5Hz–45Hz bandpass filter to remove low-frequency drift and high-frequency noise.
[0018] Preferably, in S3, the feature standardization processing includes standardization processing and feature transformation processing. Standardization processing involves performing Z-score standardization on each segment of the EEG signal to ensure consistency of the model input. Feature transformation processing is used when the model input requires a spectrogram or time-frequency graph, which can be transformed using short-time Fourier transform or continuous wavelet transform.
[0019] Preferably, in S4, the sleep algorithm model A is a deep neural network that has excellent binary classification ability for wakefulness-sleep stages.
[0020] Preferably, in step S5, the sleep algorithm model B has a strong ability to classify light sleep / deep sleep.
[0021] Compared with the prior art, the beneficial effects of the present invention are:
[0022] 1. This invention connects two deep learning models trained on different databases and makes full use of the high accuracy of sleep algorithm model A in coarse classification of awake sleep and the discrimination ability of sleep algorithm model B in the subdivision of light sleep / deep sleep, effectively making up for the performance shortcomings of a single model in a specific classification task.
[0023] 2. This invention adopts a two-level discrimination strategy. In the first stage, "awake" segments are excluded, and only "sleep" segments are entered into the sleep algorithm model B for refinement. This avoids the sleep algorithm model B from misclassifying "awake" data and causing confusion in the results. It reduces the risk of misjudgment from a structural perspective and improves the adaptability and generalization ability in different environments.
[0024] 3. The sleep algorithm model B in this invention is only invoked when the sleep algorithm model A determines that the sleep state is "sleep". This avoids multi-model processing of all EEG segments, thereby greatly reducing the amount of inference computation and memory usage. Compared with the integrated method of parallel inference of all models, this solution can save computing resources and is suitable for use in low-power devices, wearable devices and real-time EEG analysis systems.
[0025] 4. This invention does not require that the two models come from the same database or the same network structure. As long as they are trained and have the corresponding classification capabilities, they can be fused and used through the framework of this invention.
[0026] In summary, this invention outperforms existing single-model or traditional fusion methods in terms of accuracy, stability, resource efficiency, and system scalability. It can significantly improve the performance and practical value of EEG sleep staging systems and has significant application prospects and industrial transformation potential. Attached Figure Description
[0027] Figure 1 This is a flowchart of the multi-model fusion sleep staging algorithm based on electroencephalogram (EEG) signals proposed in this invention. Detailed Implementation
[0028] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0029] Reference Figure 1 A multi-model fusion sleep staging algorithm based on electroencephalogram (EEG) signals includes the following steps:
[0030] S1: Train on the Sleep-EDF database and use a convolutional neural network structure to obtain sleep algorithm model A; train on the ISRUC database and use an improved bidirectional long short-term memory network structure to obtain sleep algorithm model B. The training data is not limited to the Sleep-EDF database and the ISRUC database, and the database of the training data does not need to be specified.
[0031] S2: Input brainwave signals;
[0032] S3: After the EEG signal is input, it first undergoes preprocessing operations, which include signal segmentation, bandpass filtering, artifact removal and feature standardization to obtain structured EEG segments.
[0033] S4: Input each EEG segment from S3 into the sleep algorithm model A. The sleep algorithm model A is a deep neural network with excellent binary classification ability for wakefulness and sleep stages. If the sleep algorithm model A determines that the EEG segment is "awake", the classification result is directly used as the final label output for the current EEG segment.
[0034] S5: If sleep algorithm model A determines that the EEG segment is "sleep", then the EEG segment will continue to be input into sleep algorithm model B. Sleep algorithm model B has a strong ability to classify light sleep / deep sleep. Sleep algorithm model B outputs the classification result of the EEG segment, namely "light sleep" or "deep sleep", and outputs it as the final label.
[0035] In S3 of this embodiment, signal segmentation processing uses a 30-second time window to slice continuous EEG data. Bandpass filtering processing uses a 0.5Hz–45Hz bandpass filter to remove low-frequency drift and high-frequency noise. Feature standardization processing includes standardization processing and feature transformation processing. Standardization processing performs Z-score standardization on each segment of EEG signal to ensure model input consistency. Feature transformation processing can be performed using short-time Fourier transform or continuous wavelet transform when the model input requires a spectrogram or time-frequency graph.
[0036] As can be seen from the above, this embodiment outperforms existing single-model or traditional fusion methods in terms of accuracy, stability, resource efficiency, and system scalability. It can significantly improve the performance and practical value of the EEG sleep staging system and has important application prospects and industrial transformation potential.
[0037] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A multi-model fusion sleep staging algorithm based on electroencephalogram signals, characterized in that, The method comprises the following steps: S1: training on a Sleep-EDF database and adopting a convolutional neural network structure to obtain a sleep algorithm model A; S2: inputting an electroencephalogram signal; S3: after the electroencephalogram signal is input, the electroencephalogram signal is first subjected to a preprocessing operation, wherein the preprocessing operation comprises signal segmentation, band-pass filtering, artifact removal and feature standardization, and a structured electroencephalogram segment is obtained; S4: each electroencephalogram segment in S3 is input into the sleep algorithm model A, if the sleep algorithm model A determines that the electroencephalogram segment is "awake", the classification result is directly output as the final label of the current electroencephalogram segment; S5: if the sleep algorithm model A determines that the electroencephalogram segment is "sleep", the electroencephalogram segment will continue to be transmitted to the sleep algorithm model B, the sleep algorithm model B outputs the classification result of the electroencephalogram segment, i.e. "light sleep" or "deep sleep", and outputs the final label. In S3, the signal segmentation processing is to slice the continuous electroencephalogram data with 30 seconds as a time window.
2. The multi-model fusion sleep staging algorithm based on electroencephalogram signals according to claim 1, characterized in that, In S3, the band-pass filtering processing is to use a band-pass filter of 0.5Hz-45Hz to remove low-frequency drift and high-frequency noise. 3.The multi-model fusion sleep staging algorithm based on electroencephalogram signals of claim 1, wherein, In S3, the feature standardization processing comprises standardization processing and feature conversion processing, the standardization processing is to perform Z-score standardization processing on each electroencephalogram signal to ensure the consistency of model input, and the feature conversion processing is to use short-time Fourier transform or continuous wavelet transform for conversion when a frequency spectrum or a time-frequency diagram is required for model input.
4. The multi-model fusion sleep staging algorithm based on electroencephalogram signals according to claim 1, characterized in that, In S4, the sleep algorithm model A is a deep neural network, which has excellent awake / sleep stage two-classification ability.
5. The multi-model fusion sleep staging algorithm based on electroencephalogram signals according to claim 1, characterized in that, In S5, the sleep algorithm model B has strong light sleep / deep sleep fine classification ability. 6.The multi-model fusion sleep staging algorithm based on electroencephalogram signals of claim 1, wherein,