Search

CN-122004777-A - Sleep stage diagnosis method, sleep stage diagnosis device, sleep stage diagnosis system and storage medium

CN122004777ACN 122004777 ACN122004777 ACN 122004777ACN-122004777-A

Abstract

The application provides a sleep electroencephalogram staging method, device, equipment and storage medium, and relates to sleep electroencephalogram signal processing. The method comprises the steps of preprocessing an original signal, inputting data into a multi-scale feature extraction module, extracting delta wave features, alpha wave features and theta wave features in parallel by using wide and narrow kernel convolution branches, calibrating channel weights through self-adaptive residual channel attention, inputting the features into a parallel time sequence attention network, extracting time sequence dependence in epochs by adopting a bidirectional LSTM (link time structure) and time attention, capturing context information among epochs with different granularities by adopting layered attention on a second path, fusing the two paths of features through a dual-path sparse cross attention, obtaining time sequence characterization through time step dynamic difference through differential attention modeling, and outputting sleep stage results through a classification head. According to the application, through multi-scale feature extraction and multi-level time sequence attention modeling, the sleeping electroencephalogram characteristics are comprehensively captured, and accurate feature characterization is provided.

Inventors

  • LV JUN
  • LIAO WEIXIONG

Assignees

  • 广东工业大学

Dates

Publication Date
20260512
Application Date
20260323

Claims (7)

  1. 1. A sleep electroencephalogram staging method based on a multi-scale and dual-path attention mechanism, comprising: Step S1, preprocessing an original sleep brain electrical signal; s2, inputting electroencephalogram data to be classified into a multi-scale feature extraction module, and extracting multi-scale features of electroencephalogram signals in parallel through a wide-kernel convolution branch and a narrow-kernel convolution branch, wherein the wide-kernel convolution branch is used for capturing low-frequency delta frequency band features, and the narrow-kernel convolution branch is used for capturing alpha and theta frequency band features; s3, re-calibrating weights of the fused multi-scale features through the attention of the residual channel of the self-adaptive channel, and adaptively selecting the features with the most discrimination; s4, inputting the recalibrated characteristics into a parallel time sequence attention network, wherein the first path adopts a two-way long-short-term memory network and a time-level attention mechanism to extract time sequence dependency relationship in the epochs, and the second path adopts a compression and selection mechanism to capture context information among epochs with different thickness granularities; S5, carrying out interactive fusion on the two paths of features through the dual-path sparse cross attention, introducing extreme point information into the dual-path fusion, enhancing the theta wave capturing capability of the model, improving the accuracy of N1 class, and modeling the dynamic difference relation among time steps through a differential attention mechanism to obtain a time sequence representation with comprehensive context perception; and S6, inputting the time sequence representation to a classification head to obtain a sleep stage prediction result.
  2. 2. The sleep electroencephalogram staging method according to claim 1 is characterized in that in step S2, convolution layers with a convolution kernel size of 400 and a step length of 5 are adopted for wide-kernel convolution branches, corresponding to a 4-second time window, convolution layers with a convolution kernel size of 50 and a step length of 6 are adopted for narrow-kernel convolution branches, corresponding to a 0.5-second time window, each branch consists of three convolution layers and two maximum pooling layers, and after each convolution layer, batch normalization layers are connected and Gaussian error linear units are adopted as an activation function.
  3. 3. The sleep electroencephalogram classification method according to claim 1, wherein in step S4, the second path hierarchical attention mechanism remodels input features into a continuous segment sequence, performs packet compression on the segment sequence through a compression and selection module to generate compression keys and compression values, and selects a group which is most relevant to be reserved according to importance scores, so as to achieve capturing of context information among epochs with different thickness granularities.
  4. 4. The sleep electroencephalogram classification method according to claim 1, wherein in step S5, the dual-path sparse cross attention module comprises the steps of extracting multi-scale pooling features and extreme point features from input features in each branch, dynamically fusing learnable parameters to obtain keys and values, performing Top-K sparsification processing on similarity matrixes of the keys through query to generate attention weights with two different sparsities, and finally weighting and summing outputs of the two branches through a gating network.
  5. 5. The sleep electroencephalogram staging device based on the multi-scale characteristics and the dual-path attention mechanism is characterized by comprising a first processing module, a second processing module and a third processing module, wherein the first processing module is used for preprocessing acquired original electroencephalogram information; The second processing module is used for inputting the preprocessed electroencephalogram data into the multi-scale feature extraction module, and parallelly extracting multi-scale features of electroencephalogram signals through a wide-kernel convolution branch and a narrow-kernel convolution branch, wherein the wide-kernel convolution branch is used for capturing low-frequency delta frequency band features, and the narrow-kernel convolution branch is used for capturing alpha and theta frequency band features; the system comprises a first processing module, a second processing module, a third processing module, a fourth processing module and a third processing module, wherein the first processing module is used for carrying out weight recalibration on the fused multi-scale characteristics and adaptively selecting the characteristics with the most distinguishing degree; the fifth processing module is used for carrying out interactive fusion on the two paths of features through the dual-path sparse cross attention, and modeling a dynamic difference relation between time steps through a differential attention mechanism to obtain a time sequence representation with comprehensive context perception; And the sixth processing module is used for inputting the time sequence representation to the classification head to obtain a sleep stage prediction result.
  6. 6. A sleep electroencephalogram staging system based on a multi-scale feature and dual-path attention mechanism, comprising a memory and a processor, the memory having stored thereon a computer program for execution by the processor, the computer program when executed by the processor performing the sleep electroencephalogram staging method based on a multi-scale feature and dual-path attention mechanism as claimed in any one of claims 1 to 5.
  7. 7. A storage medium having stored thereon a computer program which, when run, performs the sleep electroencephalogram staging method based on a multi-scale feature and dual-path attention mechanism as claimed in any one of claims 1 to 5.

Description

Sleep stage diagnosis method, sleep stage diagnosis device, sleep stage diagnosis system and storage medium Technical Field The invention relates to the technical field of sleep electroencephalogram signal processing, in particular to a sleep electroencephalogram staging method, device, equipment and storage medium based on a multi-scale and dual-path attention mechanism. Background Sleep is a key physiological basis for maintaining human health, and sleep disorders impair immune, memory and other multi-system functions and are associated with various chronic disease risks, so that detection thereof in clinical practice is of great importance. However, manual diagnosis of EEG by experienced clinicians is time consuming and inefficient, especially in long term monitoring. Accordingly, a great deal of research is devoted to developing computer-aided diagnosis and automatic classification methods to improve the efficiency of sleep analysis. Existing EEG sleep stage methods can be broadly divided into two categories according to their processing logic, the first category being machine learning methods based on manual features whose construction is closely dependent on physiological knowledge of sleep for identifying different sleep stages. For example, zaman et al use a feature engineering block to extract 14 time domain features and 8 frequency domain features and 19 frequency domain derived features from the EEG signal, and then use a machine learning model to classify the features, enhancing model interpretability. Mai et al use nonlinear dimension reduction to reduce high dimension to two-dimensional power spectral density, utilize characteristic weighted Kernel Density Estimation (KDE), blend different physiological characteristics as weight into KDE, estimate probability density distribution of different sleep stages on two-dimensional plane, thus finish staging. However, the above method regards sleep as a classification problem of a series of independent static segments, and cannot effectively model sleep as a periodic rule inherent in a long time sequence and dynamic characteristics of continuous gradual change between stages, and cannot find feature patterns unknown or difficult to describe with prior knowledge. The other class relies on data-driven deep learning methods to automatically extract discriminative features from the EEG signal. For example, ATTNSLEEP, adopting a dual-path convolutional neural network architecture, and respectively capturing the low-frequency and high-frequency characteristics in the sleep waveform by designing convolutional kernels with different sizes. The perception capability of the model on the multi-scale sleep event is effectively enhanced. XSleepNet, FFTCN and MixSleepNet convert the time domain signal to the frequency domain for feature mining by integrating time-frequency analysis. This strategy helps the model more directly utilize sleep physiology. HybridDomainSleepNet adopts a three-branch architecture to respectively learn time, space and frequency spectrum characteristics, and a strategy of multi-domain characteristic fusion constructs a characteristic representation with more discrimination, so that the overall understanding and generalization capability of the model to the complex sleep mode is enhanced. Yulita et al applied long and short term memory units in combination with a deep belief network to sleep stage recognition modeling long periodic timing relationships of sleep stages. Zhao et al propose a multitasking deep learning framework that introduces an auxiliary task for sequence reconstruction. The model needs to learn how to reconstruct or represent the input time series data while completing the main task (sleep stage). The process forces the model to learn and retain richer and more discriminant time context characteristics, thereby indirectly and effectively enhancing the perceptibility of the staged master task to the dynamic transition rules among sleep stages. Eldele et al core innovation is a temporal context encoder that uses causal convolution to guarantee predictive causality and captures global timing correlations via an improved self-attention mechanism to directly characterize the macroscopic periodic pattern of sleep. Averbuch and He, both utilize wavelet theory to improve sleep stage performance, the former focuses on the fidelity of signal purification through a directional wavelet packet algorithm, and the latter focuses on enhancing the feature learning ability of the model through a dual-flow network of wavelet decomposition. Disclosure of Invention The invention aims to solve the problems in the prior art and provides a sleep electroencephalogram staging method, device, equipment and storage medium based on multi-scale characteristics and a dual-path attention mechanism so as to comprehensively capture the dynamic characteristics of sleep electroencephalogram signals and improve the accuracy and robustness of automatic sleep st