Sleep staging method based on double-branch residual time domain convolutional network
By using the double-branch residual time domain convolution network and attention mechanism to process the multi-segment EEG signal in the sleep staging technology, the problems of large individual differences and limited local pattern representation ability are solved, and more efficient sleep staging is achieved.
Patent Information
- Application Number
- CN202510067937.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-04-25
AI Technical Summary
The existing sleep staging technology faces the problem of large individual differences and limited model ability to characterize local patterns of sleep EEG.
Using the sleep stage method based on the double-branch residual time domain convolution network, the single-channel EEG signal is divided into multiple subband signals by non-complete reconstruction filter groups, and different attention mechanisms are introduced into the double-branch residual structure, combining the time domain convolution network to capture the front-to-back dependence relationship between features.
This method can more comprehensively perceive feature information at different scales, capture complex patterns in sleep EEG, and improve the performance of sleep staging models.
Smart Images

Figure CN119889665A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of sleep electroencephalogram signal processing, and in particular to a sleep staging method based on a dual-branch residual time-domain convolutional network. Background Art
[0002] Sleep staging is a key link in the analysis and evaluation of sleep quality in the medical field, and is of great significance for the diagnosis and treatment of sleep-related diseases. Since EEG signals can reflect the electrical activity of the brain in different sleep stages, they are an important signal basis for sleep staging. However, the frequency components of sleep EEG are complex and easily interfered by noise, artifacts, etc., so effective signal preprocessing is crucial. The preprocessing of EEG signals includes operations such as filtering and denoising, which can not only provide high-quality data for sleep staging, but also effectively reduce the computational cost of the model.
[0003] At present, with the widespread application of deep learning technology in sleep staging tasks, methods such as CNN networks, hybrid deep learning models, and graph neural networks have been able to effectively capture the temporal or spatial characteristics of sleep signals, thereby achieving efficient sleep staging. However, the structure of deep networks is becoming increasingly complex, and problems such as gradient vanishing and network degradation frequently occur. With the help of residual connection strategies, such problems can be effectively alleviated; some studies have introduced the Transformer architecture to enable the network to capture long-distance dependencies in time series, thereby improving the accuracy and efficiency of sleep staging; other studies have used time-frequency analysis to convert signals into two-dimensional matrices, and combined them with models such as convolutional networks for staging, and have achieved positive results. These methods have significantly improved the performance of sleep staging models, especially when processing complex EEG signals. However, sleep staging technology still faces challenges, such as large individual differences among subjects and limited ability of the model to represent local patterns of sleep EEG. Summary of the invention
[0004] Based on the above problems existing in the prior art, the purpose of an embodiment of the present invention is to provide a sleep staging method based on a dual-branch residual time-domain convolutional network. A single-channel EEG signal is divided into multiple sub-band signals using a non-complete reconstruction filter group as the input of the sleep staging network model. Multi-scale EEG local features are extracted by using convolution kernels of different sizes, and different attention mechanisms are introduced in the two residual branches to extract the correlation between multi-subband signal channels, so that the network can focus on key feature information. In addition, based on the residual structure, the time-domain convolutional network is further used to capture the front-to-back dependencies between features in the input sequence, thereby improving the sleep staging performance.
[0005] To achieve the above object, the technical solution adopted by the present invention is: a sleep staging method based on a dual-branch residual time domain convolutional network, comprising:
[0006] S1, obtain single-channel sleep EEG data as the initial data set;
[0007] S2, using a filter bank to process the initial data set and generate a multi-subband signal as the target data set;
[0008] S3, construct a dual-branch residual time domain convolutional network as a sleep staging network model;
[0009] S4, sending the target data set into the constructed network model to complete the sleep stage discrimination.
[0010] Furthermore, in S2, the filter group is a non-completely reconstructed filter group, which is constructed by a low-pass prototype filter through corresponding cosine modulation, and is used to divide the EEG signal into frequency bands to generate multiple sub-band signals; the decomposed sub-band signals can ensure that the information of the sleep EEG signal in different frequency bands can be effectively represented while reducing aliasing distortion.
[0011] Furthermore, in S3, the sleep staging network model includes a convolutional pooling module, a multi-scale residual attention module, a time domain convolution module and a classification module.
[0012] Furthermore, the multi-scale residual attention module adopts a two-branch residual network structure, each branch is composed of three residual blocks and one attention block stacked together; among them, the attention block in residual branch 1 adopts an effective additional attention mechanism, and the attention block in residual branch 2 adopts a multi-head attention mechanism.
[0013] Furthermore, the effective additional attention mechanism helps the model capture temporal dependencies in long sequences by encoding the relevance of contextual information of the input sequence.
[0014] Furthermore, the multi-head attention mechanism calculates the outputs of multiple attention heads in parallel, so that the constructed residual network obtains the feature information of the EEG sequence from multiple subspaces to enhance the model's ability to capture complex patterns.
[0015] Furthermore, the time domain convolution module can further extract the previous and next dependencies in the feature sequence, and each time domain convolution block contains two dilated causal convolution layers, so that the network obtains a larger receptive field in the time domain than the conventional convolution layer; wherein the output of the dilated causal convolution layer only depends on the current and previous elements in the input sequence to ensure the causal dependency of the feature sequence in time.
[0016] The beneficial effects of the present invention are:
[0017] 1. The sleep staging method based on a dual-branch residual time-domain convolutional network provided by the present invention uses a multi-subband signal generated by a single-channel EEG signal as the network input. By constructing a dual-branch residual time-domain convolutional network, it can more comprehensively perceive feature information of different scales and capture complex patterns in sleep EEG.
[0018] 2. The present invention introduces an effective attention mechanism and a multi-head attention mechanism in the two branches respectively, and weights the features of different channels to enhance the attention to key channels. It also uses a time domain convolutional network to convolve the aforementioned learned EEG features to capture their before-and-after dependencies, thereby improving the performance of the sleep staging model. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0020] In the figure:
[0021] Figure 1 This is a flowchart of a sleep staging method based on a dual-branch residual time-domain convolutional network in the present invention.
[0022] Figure 2 This is an amplitude-frequency response curve of the analysis filter bank used in the present invention.
[0023] Figure 3 It is a schematic diagram of the structure of the sleep staging network model constructed in the present invention.
[0024] Figure 4 It is a structural schematic diagram of the convolutional pooling module in the present invention.
[0025] Figure 5 Schematic diagram of the structure of the residual block in the present invention.
[0026] Figure 6 It is a structural schematic diagram of the EAA module in the present invention.
[0027] Figure 7 It is a structural schematic diagram of the MHA module in the present invention.
[0028] Figure 8 It is a schematic diagram of the structure of the TCN module in the present invention. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0030] An embodiment of the present invention provides a sleep staging method based on a dual-branch residual time-domain convolutional network, including: obtaining single-channel sleep EEG data as an initial data set; using a filter group to process the sleep EEG to generate a multi-subband signal as a target data set; constructing a dual-branch residual time-domain convolutional network as a sleep staging network model; and sending the target data set into the constructed network model to complete sleep staging discrimination. The sleep staging method based on a dual-branch residual time-domain convolutional network of the present invention uses the multi-subband signal generated by the single-channel EEG signal as the network input, so that the constructed dual-branch residual time-domain convolutional network can more comprehensively perceive feature information of different scales. The present invention introduces an effective attention mechanism and a multi-head attention mechanism in the two branches respectively, and further enhances the focus on key channels by weighting the features of different channels, and uses the time-domain convolutional network to convolve the aforementioned learned EEG features to capture their front-end dependencies, thereby improving the performance of the sleep staging model.
[0031] The following is a detailed description of the implementation details of a sleep staging method based on a dual-branch residual time domain convolutional network in this embodiment. The following content is only for the convenience of understanding the implementation details provided, and is not necessary for the implementation of this solution. The specific process of this embodiment is as follows Figure 1 shown.
[0032] Step S1, obtaining sleep EEG data as an initial data set.
[0033] Specifically, sleep EEG data refers to the electroencephalogram data recorded during an individual's sleep. The Fpz-Cz channel EEG data of 20 subjects in the public Sleep-EDF dataset were used, with a sampling frequency of 100 Hz and a signal length of 30 seconds per segment. The sleep staging experiment of the proposed method was conducted on the sleep EEG data of WAKE, N1, N2, N3 and REM stages.
[0034] Step S2: Processing the initial data set with a filter bank to generate a multi-subband signal as a target data set.
[0035] The filter bank used is a non-complete reconstruction filter bank, which has linear phase characteristics, higher stopband attenuation and lower overall distortion. The key task of designing the filter bank is to minimize the aliasing distortion of the signal by optimizing the analysis filter and synthesis filter parameters. In view of the fact that the present invention only involves decomposing the signal into multiple sub-bands, only the analysis filter bank in the optimized design filter bank is used.
[0036] Specifically, the steps of using a filter bank to process the initial data set and generate a multi-subband signal as the target data set are as follows:
[0037] Step S21, given a low-pass prototype filter h(n), obtain an analysis and synthesis filter bank with linear phase characteristics by performing corresponding cosine modulation on it to ensure that the non-complete reconstruction filter bank used has no phase distortion. The impulse responses of the analysis filter bank and the synthesis filter bank with linear phase characteristics are:
[0038]
[0039] The impulse response formulas of the analysis filter bank and the synthesis filter bank are obtained, where h(n) is the impulse response of the prototype filter, N is the length of h(n), M is the number of filter bank channels, and n and k are natural numbers.
[0040] Step S22, determining the impulse response h(n) of the prototype filter.
[0041] Step S221: The prototype filter must meet the following conditions: ① G(z) = H 2 (z) is a 2M-band filter; ②H(z) has a higher stop-band attenuation to remove amplitude and aliasing distortion.
[0042] Assuming H(z) is the spectral factor of G(z), then:
[0043]
[0044] The expression of the system function G(z) of the 2Mth band filter is obtained, where H(z) is the Z-transform of h(n).
[0045] Step S222, in the present invention, N is selected as an even number, that is, N=2(mM+m1). Define h as a vector consisting of the first mM+m1 coefficients of h(n), and the prototype filter H(z) can be expressed as:
[0046]
[0047] The expression of the prototype filter H(z) is obtained, where h = [h(0) h(1) … h(mM+m1-1)] t , I is the identity matrix, J is a matrix whose sub-diagonal elements are all 1 and the remaining elements are all 0, and the dimensions of I and J are both (mM+m1)×(mM+m1), where m and m1 are natural numbers.
[0048] Step S223, substitute the prototype filter H(z) into G(z) to obtain the expression of the 2M-th band filter G(z):
[0049]
[0050] The expression of the filter G(z) is obtained, where U(z) is:
[0051]
[0052] The formula for U(z) is obtained; where the matrix S n is a constant matrix. When k+l=n, S n The element [S n ] k,l =1 in the case of , and 0 in other cases.
[0053] g(n) is the impulse response of G(z), g(n) is:
[0054]
[0055] Get the g(n) impulse response formula;
[0056] Step S224, substitute formula U(z) into G(z) to obtain G(z):
[0057]
[0058] The formula of the 2M-band filter G(z) is obtained (here G(z) is derived);
[0059] Step S225, from the system function G(z) of the 2M-band filter and its impulse response g(n), h must satisfy the following constraints:
[0060]
[0061] Get the constraint formula that h needs to satisfy;
[0062] When the filter h(n) satisfies the constraints, the error of the system mainly comes from the aliasing error because its output has no amplitude distortion and phase distortion. In practical applications, the aliasing error cannot be completely removed, but it can be minimized by designing h(n) with high stopband attenuation, that is, minimum, where ω S is the stopband edge frequency of h(n), H(e jω ) is the frequency response of h(n).
[0063] Step S226, the integral formula can be converted into a quadratic form h t ph, so the optimization of h can be transformed into an optimization problem that satisfies the above constraints on h:
[0064]
[0065] The optimization problem formula is obtained; among them,
[0066] Where K is the number of stopbands, β i is its associated weight, ω i,1 and ω i,2 are the boundary frequencies of these stopbands.
[0067] Step S227, with the help of the fmincon function in MATLAB, under the constraint condition of h, the optimization problem formula about h is solved to determine the optimal solution h, thereby obtaining the prototype filter h(n).
[0068] Step S23, by using the impulse response formula of the analysis filter bank to perform cosine modulation on the optimized h(n), the final analysis filter bank parameter h is obtained. k (n), its amplitude-frequency response is as follows Figure 2 shown.
[0069] Since the present invention decomposes the EEG signal into three frequency bands, the specific parameters are set as follows when designing the filter bank: M = 3, m = 20, m1 = 0, K = 1, β1 = 1, w 1,1 =4 / 15π,w 1,2 =π.
[0070] The analysis filter bank parameters h after optimization design are used. k (n) Filter the original EEG signal to generate three-channel sub-band signals as the target data set. The decomposed sub-band signals can effectively represent the information of the sleep EEG signal in different frequency bands while reducing aliasing distortion.
[0071] Step S3, constructing a dual-branch residual time domain convolutional network as a sleep staging network model.
[0072] Specifically, the sleep staging network model consists of a convolutional pooling module, a multi-scale residual attention module, a temporal convolution module and a classification module. Its structure is as follows: Figure 3 shown.
[0073] Specifically, the convolutional pooling module consists of a 1D convolutional layer, batch normalization, an activation function, and a maximum pooling layer. Its structure is as follows: Figure 4 As shown in the figure, the convolution kernel size of the 1D convolution layer is 7, the step size is 2, the boundary padding value is 3, and the number of convolution kernels is 16; the maximum pooling layer window size is 2. This module is mainly used to extract shallow features of the signal and adjust the output size.
[0074] The multi-scale residual attention module adopts a two-branch residual network structure, each branch is composed of three residual blocks and one attention block stacked together. The structure of the residual block is as follows: Figure 5As shown in the figure, the residual block is constructed by adding the outputs of the residual mapping and the identity mapping paths to solve the gradient vanishing problem that may occur as the network depth increases, and it helps to alleviate network degradation and reduce the difficulty of learning the identity mapping, thereby improving the network training speed. The calculation formula of the residual block is:
[0075] x'=ReLu[F(x)+x]
[0076] Among them, F(x) represents the residual mapping of the input x, which is composed of a 1D convolution layer, batch normalization, activation function, 1D convolution layer and batch normalization in sequence; x represents the identity mapping, which is composed of a convolution layer with a kernel size of 1 and a stride of 1, which is used to adjust the number of channels of the input x; x' is the output of the residual block.
[0077] In addition, the two residual branches adopt a multi-scale kernel strategy to capture the information of different frequency components in the signal. Specifically, residual branch 1 uses a larger convolution kernel to capture the information of the low-frequency band, while residual branch 2 uses a smaller convolution kernel to capture the information of the high-frequency band. Figure 3 As shown in the figure, the convolution kernel sizes of residual block 1-1, residual block 1-2 and residual block 1-3 in residual branch 1 are 400, 200 and 100 respectively, and the number of convolution kernels of each block is 16, 32 and 64 respectively; while in residual branch 2, the convolution kernel sizes of residual block 2-1, residual block 2-2 and residual block 2-3 are 100, 50 and 25 respectively, and the number of kernels is 16, 32 and 64 respectively.
[0078] After the residual structure of residual branch 1, the Efficient Additive Attention (EAA) module is introduced to learn the context information of the input sequence to help the model capture the temporal dependencies across longer distances in long sequences. Its structure is as follows: Figure 6 As shown in Figure 2. In the commonly used additive attention mechanism, the weight of the relevance of the contextual information of the input sequence is usually encoded based on the interaction of the query matrix Q, the key matrix K, and the value matrix V. In the EAA mechanism, linear element-wise multiplication is used instead of quadratic matrix multiplication, and the relationship between the embedded vectors is learned only through the linear interaction between the matrices Q and K to reduce the computational complexity. The query matrix Q in EAA is EAA and key matrix K EAA It can be obtained by linearly mapping the input, and its calculation formula is:
[0079]
[0080] in, Q EAA and K EAAThe linear mapping matrix of x1 is the output of residual blocks 1-3. Then the calculation formula of EAA is:
[0081] EAA(Q EAA ,K EAA )=Q EAA +T(K EAA *q)
[0082] Where T represents a linear transformation, Q EAA The weighted result is:
[0083] Q EAA The weight, w r is a learnable parameter and d is the dimension of the embedding vector.
[0084] Therefore, the output of residual branch 1 is:
[0085] EAA(x1')=EAA(Q EAA ,K EAA )
[0086] After the residual structure of residual branch 2, the multi-head attention (MHA) mechanism is introduced to enable the constructed residual network to obtain the feature information of EEG sequences from multiple subspaces, thereby enhancing the model's ability to capture complex patterns. Figure 7 As shown in Figure 2. Different from the EAA mechanism, MHA, as a dot-product attention mechanism, can enhance the diversity of network feature representation by dividing the input features into j attention heads and independently applying the self-attention mechanism in each head, while improving the generalization ability of the network model. The query matrix Q in MHA is MHA , key matrix K MHA , value matrix V MHA It can be obtained by linearly mapping the input, and its calculation formula is:
[0087]
[0088] Among them, x2 is the output of residual block 2-3; Q MHA , K MHA and V MHA It can be obtained by linearly mapping the input x'2, and The matrix Q MHA , K MHA and V MHA The corresponding linear mapping matrix. Then the calculation formula of the self-attention mechanism in each head is:
[0089]
[0090] Among them, d k is the key matrix K MHA The query matrix Q MHA and key matrix K MHA Interact via dot product operations and divide by a scaling factor To avoid the gradient vanishing problem caused by excessive dot product results. Then, the obtained weights are normalized by the SoftMax function, and the final output result is the logarithm matrix V MHA The weighted sum of .
[0091] The calculation formula of MHA is as follows:
[0092] MHA(Q MHA ,K MHA ,V MHA )=Concat(head1,head2,...,head j )
[0093] Among them, head j =Attention(Q MHA,j ,K MHA,j ,V MHA,j ), is the calculation result of the jth attention head.
[0094] Therefore, the output of residual branch 2 is:
[0095] MHA(x'2)=MHA(Q MHA ,K MHA ,V MHA )
[0096] Therefore, the output y of the multi-scale residual attention module is obtained by concatenating the outputs of the two residual branches:
[0097] y=Concat[EAA(x1'),MHA(x'2)]
[0098] Subsequently, a temporal convolutional network (TCN) module is introduced after the multi-branch residual attention module to extract the previous and next dependencies in the sleep feature sequence. TCN is a convolutional neural network that can effectively process long time series data, mainly composed of several temporal convolution blocks. Each temporal convolution block contains multiple dilated causal convolution layers, the output of which depends only on the current and previous elements in the input sequence to ensure that the sequence has a causal dependency in time. To ensure that the length of the input and output sequences is consistent, zero padding is performed on the left side of the input sequence. In addition, by introducing a dilation factor, the dilated causal convolution layer can obtain a larger receptive field than a conventional convolution layer while using fewer convolution layers, thereby effectively capturing the long-term dependencies in the feature sequence.
[0099] The time domain convolution module used in the present invention is composed of four time domain convolution blocks, each of which contains two dilated causal convolution layers. The specific structure is as follows: Figure 8 As shown in the figure. In the four time-domain convolution blocks, the convolution kernel size used in the dilated causal convolution layer is 3; the number of convolution kernels is 32, 64, 128, and 64 respectively; the dilation factors are 1, 2, 4, and 8. After each dilated causal convolution layer, weight normalization, activation function, and dropout operation are added in sequence, and the dropout value is set to 0.3. The weight normalization operation helps to speed up the network convergence, the activation function introduces nonlinear features, and the dropout operation effectively avoids the occurrence of overfitting. The time-domain convolution block uses a residual connection method, and the 1D convolution kernel size used is 1 to alleviate problems such as gradient disappearance in deep network training.
[0100] Therefore, the output of the first time domain convolution block is:
[0101] TCN (1) (y) = O (y) + y
[0102] Among them, y is the input of the first time domain convolution module, that is, the output of the multi-branch residual attention module; O(y) represents a combination of a series of processing steps, that is, two passes Figure 8 Dilated causal convolution, weight normalization, activation function, and dropout operation shown.
[0103] Therefore, the output of the entire time domain convolution module is:
[0104] u=TCN (4) (TCN (3) (TCN (2) (TCN (1) (y))))
[0105] Among them, TCN (2)、TCN (3) 、TCN (4) They are the outputs of the 2nd, 3rd, and 4th time domain convolution blocks respectively.
[0106] Finally, the classifier module includes an average pooling layer, a fully connected layer, and a softmax layer. The average pooling layer is used to reduce the dimension of the feature u extracted by the TCN module; the fully connected layer flattens the reduced-dimensional features and maps them to a low-dimensional space; the softmax layer maps the low-dimensional features into the probability values of each sleep stage, thereby obtaining the final sleep stage recognition result.
[0107] Step S4, sending the target data set to the constructed network model to complete the sleep stage discrimination.
[0108] Specifically, the specific steps of sending the target data set into the sleep staging network model to complete the sleep staging discrimination include:
[0109] Step S41, divide the target data set into a training set, a validation set and a test set in a ratio of 7:2:1.
[0110] Step S42: input the training set into the sleep staging network model for model training.
[0111] Specifically, the batch value set during model training is 64, the training cycle is set to 100, and the sleep staging network model uses the cross entropy function as the loss function during training, and uses the Adam function to optimize the parameters of the network model to reduce random errors. The learning rate is set to 1e-3. The calculation formula of the cross entropy loss function is:
[0112]
[0113] Among them, a is the output of the time domain convolutional network after passing through the softmax layer; b is the sleep stage label, and L is the number of categories, where L = 5.
[0114] Step S43, inputting the validation set into the trained sleep staging network model to determine the optimal model parameters.
[0115] Specifically, the validation set is sent to the trained sleep staging network model for model evaluation, and the optimal model weight parameters are determined based on the staging performance of the trained model on the validation set.
[0116] Step S44: input the test set into the sleep stage network model with determined parameters to obtain the sleep stage recognition result.
[0117] To verify the performance of this algorithm, the same data set is used to compare it with other algorithms. The results are shown in Table 1.
[0118] Table 1 Comparison of sleep staging performance of the present invention with other algorithms
[0119]
[0120] The embodiment of the present invention provides a sleep staging method based on a dual-branch residual time-domain convolutional network, which obtains sleep EEG data as an initial data set; uses a filter group to process the sleep EEG to generate a multi-subband signal as a target data set; constructs a dual-branch residual time-domain convolutional network as a sleep staging network model; and sends the target data set to the constructed network model to complete sleep staging discrimination. The multi-subband signal generated by a single-channel EEG signal is used as the network input, and by constructing a dual-branch residual time-domain convolutional network, it is possible to more comprehensively perceive feature information of different scales and capture complex patterns in sleep EEG. In addition, an effective attention mechanism and a multi-head attention mechanism are introduced in the two branches respectively, and the focus on key channels is enhanced by weighting different channel features, and the time-domain convolutional network is used to convolve the aforementioned learned EEG features to capture their front-end dependencies, thereby improving the performance of the sleep staging model.
[0121] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0122] The above is only an embodiment of the present invention. The common sense such as the known specific structure and characteristics in the scheme is not described in detail here. The ordinary technicians in the relevant field know all the common technical knowledge in the technical field of the invention before the application date or priority date, can obtain all the existing technologies in the field, and have the ability to apply the conventional experimental means before that date. The ordinary technicians in the relevant field can improve and implement this scheme in combination with their own abilities under the enlightenment given by this application. Some typical known structures or known methods should not become obstacles for ordinary technicians in the relevant field to implement this application. It should be pointed out that for those skilled in the art, without departing from the structure of the present invention, several deformations and improvements can be made, which should also be regarded as the protection scope of the present invention, which will not affect the effect of the implementation of the present invention and the practicality of the patent. The protection scope required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.
[0123] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A sleep staging method based on a dual-branch residual time-domain convolutional network, characterized in that: include: S1, obtain single-channel sleep EEG data as the initial data set; S2, using a filter bank to process the initial data set and generate a multi-subband signal as the target data set; S3, construct a dual-branch residual time domain convolutional network as a sleep staging network model; S4, sending the target data set into the constructed network model to complete the sleep stage discrimination.
2. According to claim 1, a sleep staging method based on a dual-branch residual time domain convolutional network is characterized in that: In S2, the filter group is a non-completely reconstructed filter group, which is constructed by a low-pass prototype filter through corresponding cosine modulation, and is used to divide the EEG signal into frequency bands to generate multiple sub-band signals; the decomposed sub-band signals can ensure that the information of the sleep EEG signal in different frequency bands can be effectively represented while reducing aliasing distortion.
3. The sleep staging method based on a dual-branch residual time-domain convolutional network according to claim 1, characterized in that: In S3, the sleep staging network model includes a convolutional pooling module, a multi-scale residual attention module, a time domain convolution module and a classification module.
4. The sleep staging method based on a dual-branch residual time-domain convolutional network according to claim 3 is characterized in that: The multi-scale residual attention module adopts a two-branch residual network structure, each branch is composed of three residual blocks and one attention block stacked together; among them, the attention block in residual branch 1 adopts an effective additional attention mechanism, and the attention block in residual branch 2 adopts a multi-head attention mechanism.
5. The sleep staging method based on a dual-branch residual time-domain convolutional network according to claim 4, characterized in that: The effective additional attention mechanism helps the model capture temporal dependencies in long sequences by encoding the relevance of contextual information of the input sequence.
6. The sleep staging method based on a dual-branch residual time-domain convolutional network according to claim 4, characterized in that: The multi-head attention mechanism calculates the outputs of multiple attention heads in parallel, so that the constructed residual network obtains the feature information of the EEG sequence from multiple subspaces to enhance the model's ability to capture complex patterns.
7. The sleep staging method based on a dual-branch residual time-domain convolutional network according to claim 3, characterized in that: The time domain convolution module can further extract the previous and next dependencies in the feature sequence; each time domain convolution block contains two dilated causal convolution layers, so that the network obtains a larger receptive field in the time domain than the conventional convolution layer; wherein the output of the dilated causal convolution layer only depends on the current and previous elements in the input sequence to ensure the causal dependency of the feature sequence in time.
Citation Information
Patent Citations
Single-channel electroencephalogram signal sleep staging method based on multiple scales and multiple attention
CN116763324A
Sleep staging model construction method based on multi-scale time residual shrinkage network
CN118000664A
Quadrature mirror filter banks and method
US5436940A