An Adaptive Sleep Staging Method and System Based on Key Brain Networks
By employing an effect brain network analysis with CNN and GCN, the method addresses the directional information flow in brain electrodes to enhance sleep stage classification accuracy and reduce redundancy, leading to more precise sleep phase recognition.
Patent Information
- Application Number
- CN202211459859.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-16
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-11-16
AI Technical Summary
The existing sleep staging methods ignore the causal relationship between EEG electrodes, resulting in the inaccurate classification of sleep staging, and the effect brain network has information redundancy, affecting the classification effect.
Adaptive sleep staging method based on effect brain network is adopted, data is obtained through multi-channel electroencephalogram acquisition equipment, node features and edge features are extracted after preprocessing, and a fully connected weighted directed graph is constructed. Combined with the adaptive sleep staging recognition model, temporal and spatial features are extracted using CNN and GCN, and temporal and spatial information are fused for sleep staging recognition.
It improves the accuracy of sleep staging, reduces the redundant information of the effect brain network, improves the classification effect of sleep staging, and can more accurately identify different sleep stages.
Smart Images

Figure CN115844326B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of digital health and digital medicine, and specifically provides an adaptive sleep staging method and system based on key brain networks. Background Art
[0002] The 21st century is the era of brain science. The exploration and research of the human brain have become an inevitable trend in the scientific development of this era. One-third of a person's life is spent in a sleeping state. High-quality sleep can improve our immune ability, promote metabolism, and enhance memory, and largely affects our quality of life. Sleep staging is the basis for sleep quality assessment and plays an important reference role in various sleep studies.
[0003] Sleep staging includes the rapid eye movement (REM) stage and the non-rapid eye movement (NREM) stage. In 1968, Rechtschaffen et al. first published a set of standard classification methods for sleep staging. NREM was successively subdivided into stages S1, S2, S3, and S4 according to the depth of sleep. Since stages S3 and S4 show relatively similar characteristics in many aspects, the American Academy of Sleep Medicine (AASM) modified the staging criteria proposed by R&K in 2007, merged S3 and S4 into one stage, and divided NREM into stages N1, N2, and N3.
[0004] The brain is a complex interconnected network that can generate complex and precise coordinated dynamics at multiple spatio-temporal scales. Through information interaction between brain regions, various complex functions are realized. The structure of the brain network is closely related to human cognitive functions and brain diseases, and this relationship is usually diverse and complex. The brain network is divided into structural brain network, functional brain network, and effective brain network according to the different action relationships between nodes. It models brain functions as complex networks, providing a powerful tool for mapping, tracking, and predicting patterns of brain states.
[0005] In recent years, in the field of sleep staging, people usually use structural brain networks, functional brain networks, or a combination of the two as features, and use graph neural networks for classification. However, the brain is a complex interconnected network with a directional information flow. Structural brain networks are mostly used to reflect the physiological functions of the brain, and functional brain networks can reflect whether there is a statistically significant functional relationship between nodes. Neither of them can reflect the directionality of information transmission between nodes. Currently, the above technologies all ignore the causal relationship between electroencephalogram (EEG) electrodes in the field of sleep staging effects. Therefore, the present invention introduces an effective brain network, and combining the causal relationship between EEG electrodes can make sleep staging classification more accurate.
[0006] Generally, the effective brain network obtained after feature extraction is a fully connected weighted directed graph, but it cannot reflect the specificity of the brain in different sleep stages, so it cannot achieve a good classification effect. Secondly, some studies have shown that when analyzing brain networks, sparsifying the network will bring great benefits to subsequent analysis. Finally, in neural network learning, generally speaking, the more parameters a model has, the stronger its expressive ability and the greater the amount of information it stores. However, this will bring the problem of information overload, causing reverse learning and decreasing the accuracy. Therefore, aiming at the information redundancy existing in the dynamic effective brain network, the present invention provides a key brain network for EEG-based sleep staging, which reduces the redundant information of the effective brain network, enhances the specificity of the effective brain network in different sleep stages, improves the classification effect, and can also map it back to the brain region in subsequent analysis to analyze and study the key functional areas of the brains of different subjects. Summary of the Invention
[0007] The first object of the present invention is to provide an adaptive sleep staging method based on a key brain network for non-disease diagnosis purposes in view of the deficiencies of the prior art.
[0008] An adaptive sleep staging method based on a key brain network for non-disease diagnosis purposes of the present invention adopts the following technical solutions:
[0009] Step S1: Collect scalp EEG signal data of a healthy subject in a sleep state through a multi-channel EEG acquisition device;
[0010] Step S2: Preprocess the collected EEG signal data to reduce the interference of artifacts;
[0011] Step S3: Extract node features and edge features from the EEG signal data preprocessed in Step S2, and construct a fully connected weighted directed graph, that is, a dynamic effective brain network; specifically:
[0012] S31: Extract node features;
[0013] S32: Extract edge features;
[0014] S33: Construct a dynamic effect brain network G from the above node features and edge features, that is, a fully connected weighted directed graph;
[0015] Step S4: Construct a key brain network that integrates spatio-temporal information
[0016] Step S5: Use an adaptive sleep staging recognition model to achieve sleep staging recognition of electroencephalogram signals
[0017] The adaptive sleep staging recognition model includes a CNN, a GCN, and a spatio-temporal feature fusion layer; the CNN is used to extract time features, and its input is the three key brain networks with context in step S4, and the output is time features; the GCN is used to extract spatial features, and its input is the three key brain networks with context in step S4, and the output is spatial features; the spatio-temporal feature fusion includes a residual module and two fully connected layers. The residual module calculates the residual according to the node features in the three key brain networks with context, and the two fully connected layers are used to fuse the time features, spatial features, and residuals to obtain a classification result.
[0018] The second object of the present invention is to provide an adaptive sleep staging system based on an effect brain network, including an electroencephalogram signal acquisition module, a data preprocessing module, a dynamic effect brain network construction module, a key brain network extraction module that integrates spatio-temporal information, and a classification recognition module.
[0019] The third object of the present invention is to provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed on a computer, the computer is made to execute the adaptive sleep staging method based on the effect brain network.
[0020] The fourth object of the present invention is to provide a computing device, including a memory and a processor. An executable code is stored in the memory, and when the processor executes the executable code, the adaptive sleep staging method based on the effect brain network is implemented.
[0021] The beneficial effects of the present invention are:
[0022] The present invention uses a different structural brain network or functional brain network from the previous ones to analyze sleep staging, but uses an effect brain network, that is, a directed graph. While considering the directionality of brain information interaction, the attention mechanism is used to select key edge features and node features of the directed graph, so that the adaptive sleep staging recognition model achieves a more accurate sleep staging recognition result. Description of the Drawings
[0023] Figure 1 It is a structural schematic diagram of the adaptive sleep staging system based on the effect brain network of the present invention;
[0024] Figure 2 This is the flowchart of the adaptive sleep staging method based on the effective brain network of the present invention;
[0025] Figure 3 This is the electroencephalogram (EEG) channel diagram of the specific implementation manner of the present invention. Specific implementation manner
[0026] The following further analyzes the present invention in conjunction with specific embodiments.
[0027] As shown in the appended Figure 1 The present invention proposes an adaptive sleep staging method based on a key brain network: First, collect the required EEG signals, perform preprocessing on the EEG data such as smoothing filtering, removing average reference, and frequency division filtering, then extract node features and edge features from the preprocessed data to construct a fully connected weighted directed graph, and then select key edge features from the fully connected weighted directed graph to construct a key brain network that fuses spatio-temporal information. Finally, input the key brain network constructed from a 30s segment of EEG and the key brain networks constructed from the previous and subsequent 30s of EEG into the adaptive sleep staging recognition model, use CNN to extract temporal features, GCN to extract spatial features, and perform feature fusion on the spatio-temporal features to identify the sleep stage.
[0028] Referring to the appended Figure 2 The specific implementation steps of the present invention are as follows:
[0029] Step S1: Collect scalp EEG signals of the sleep state of healthy subjects through a multi-channel EEG acquisition device. In this embodiment, a 12-electrode Neuroscan device is used to obtain EEG data, the sampling frequency is 512 Hz, the electrode cap uses the international 10 / 20 system electrode placement method, and the 12 electrodes are Fp1, Fp2, F3, F4, F7, F8, C3, C4, T7, T8, P3, and P4 respectively. The reference electrode is placed on the right earlobe, and the positions of the EEG channels are as Figure 3 shown.
[0030] Step S2: Preprocess the collected EEG data to reduce the interference of artifacts. The specific process includes:
[0031] 1) Smoothing filter: Use the classical mean smoothing filter. After testing, it is found that the mean value of the amplitude at the 95% quantile of the sleep EEG signal is approximately 30 μV. Therefore, 30 μV is used as the threshold. For signal points with an absolute value greater than the threshold, the signal mean of the previous and subsequent 5 s of the current signal point is used instead.
[0032] 2) Remove average reference: Calculate the average value of the EEG data of 12 channels after filtering, and subtract the average value of the signal values of all channels from the signal value of each channel to reduce the influence of single-point failures.
[0033] 3) Frequency division filtering: In this paper, a classical frequency band division method is adopted. Considering that "narrowband signals" are generally required for calculating brain connectivity, the beta band is further divided into high beta and low beta, denoted by beta1 and beta2 respectively. Also, considering that sleep staging may be related to sleep spindles, and the sleep stage where sleep spindles appear is also called sigma sleep. Therefore, the frequency bands finally divided by the FIR filter are: delta (0.5 - 4 Hz), theta (4 - 8 Hz), alpha (8 - 13 Hz), beta1 (13 - 22 Hz), beta2 (22 - 30 Hz), gamma (30 - 40 Hz), sigma (11 - 16 Hz).
[0034] Step S3: Extract node features and edge features from the preprocessed data, and construct a dynamic effect brain network, that is, a fully connected weighted directed graph.
[0035] For node features, multi-scale Kolmogorov-Sinai (KS) entropy is used for characterization. It is determined by identifying points on the trajectory in the phase space that are similar to each other and independent of time, and the divergence rate of these point pairs is used to obtain the value of KSE. Since the KS entropy value is inaccurate when calculating time series with slight noise. Therefore, based on the data preprocessing, a stationarity test is first performed. In the multi-scale method with a uniform time window, as the scale increases, the coarse-grained method will cause a large number of data points to be missing in the time series, while the fine-grained method, although it takes more time for calculation, can ensure the classification accuracy. To reduce the computational complexity of the time series, after the test passes, based on the preprocessing of the original time series, KSE is fine-grained based on the average value, and the KS entropy value is calculated after sequence reconstruction.
[0036] S311: Stationarity test
[0037] Given a time series {x(n): 1 ≤ n ≤ N}, where x(n) represents the EEG signal after the processing in step S2 at time n, and N represents the data length, that is, the total time * sampling frequency; then a unit root test is performed on the time series; if the test passes, step S312 is carried out; if the test fails, first perform a first-order difference processing, and then perform a unit root test on the time series after the first-order difference processing, and repeat the current operation until the test passes.
[0038] For the unit root test, the commonly used methods are the Augmented Dickey-Fuller (ADF) test or the Kwiatkowski-Phillips-Schmidt-Shin (KPSS) test. In this embodiment, the ADF test is adopted.
[0039] The first-order difference belongs to the prior art, so it will not be elaborated in detail.
[0040] S312: Fine-grain the time series that passes the inspection based on the average value to obtain the reconstructed time series;
[0041] The fine-graining based on the average value belongs to the prior art, so it will not be elaborated.
[0042] S313: Calculate the KS entropy value according to the reconstructed time series; specifically:
[0043] For a given embedding dimension m, m takes 3 in this embodiment:
[0044] (1) Segment the time series {x(n): 1 ≤ n ≤ N} to form (N - m + 1) vectors of length m:
[0045] {X i,m : 1 ≤ i ≤ (N - m + 1)}
[0046] X i,m = {x(i + k): 0 ≤ k ≤ m - 1} (1)
[0047] where X i,m represents the i-th electroencephalogram signal segment of length m;
[0048] (2) Segment the time series {x(n): 1 ≤ n ≤ N} to form (N - m) vectors of length (m + 1):
[0049] {X i,m+1 : 1 ≤ i ≤ (N - m)}
[0050] X i,m+1 = {x(i + k): 0 ≤ k ≤ m} (2)
[0051] where X i,m+1 represents the i-th electroencephalogram signal segment of length m + 1;
[0052] (3) Find the distance between X i,m and X j,m :
[0053]
[0054] (4) The probability that the vector X i,m whose distance from X j,m is less than r is:
[0055]
[0056] where B i is the distance i,m between X j,m and X The number of vectors less than r, where r is a preset value, generally 0.1 - 0.25 times the standard deviation;
[0057] (5) Take the average of the natural logarithms of the corresponding probabilities for i ≤ (N - m + 1) :
[0058]
[0059] (6) Repeat steps (3) - (5) to obtain:
[0060]
[0061] Limit the values of N, m, and r, and repeat the above steps until [Φ m (r) - Φ m+1 (r)] converges. This convergence value is the KS entropy value.
[0062]
[0063] S314: Construct the node feature matrix Node from the KS entropy values;
[0064] For edge features, Granger causality (GC) is used for measurement. Granger causality is not a causal relationship in the logical sense, but a test of the predictive ability of past values for future situations. In other words, the Granger causality test is to test whether a set of time series is the cause of another set of time series.
[0065] Calculating the causal value based on GC requires that the original signal to be processed must be a stationary time series. Non - stationary signals will show the phenomenon of spurious regression in causal regression. However, EEG has the characteristics of non - stationarity and non - linearity, so a stationarity test is required to ensure the stationarity of the EEG signal before calculating GC.
[0066] S321: Stationarity test
[0067] Given a time series {x(n): 1 ≤ n ≤ N}, where x(n) represents the EEG signal after being processed in step S2 at time n, and N represents the data length, that is, the total time * sampling frequency; then perform a unit root test on the time series; if the test passes, proceed to step S322; if the test fails, first perform a first - order difference processing, and then perform a unit root test on the time series after the first - order difference processing, and repeat the current operation until the test passes.
[0068] S322: Calculate the Granger causality (GC) matrix
[0069] (1) Calculate the test value F for pairwise EEG signal segments of all channels X→Y , and construct the F - test value matrix M; specifically:
[0070] For any two-channel EEG signal segments X and Y in the time series after passing the test, the following autoregressive model is established:
[0071]
[0072]
[0073] where X t is the predicted value at time t obtained from Y t-i and X t-j ; Y t is the predicted value at time t obtained from X t-i and Y t-j ; a 1i , a 2i , b 1j , b 2j are the weight coefficients of the variables; ε 1t and ε 2t represent the white noise of X and Y respectively; p and q represent the lag orders of X and Y respectively;
[0074] When testing whether X is the causal variable of Y, it is calculated using formula (9). When all of a 2i in formula (9) are 0, it means that only the past information of Y itself is used to predict the current value of Y. At this time, equation (9) is called the benchmark equation; when a 2i are not all 0, it means that the past information of Y and X is used to predict the current value of Y. At this time, equation (9) is the comparison equation. When taking "Y's Granger cause is not X" as the null hypothesis, the residual sum of squares RSS is calculated through the benchmark equation and the comparison equation, as shown in formula (10).
[0075]
[0076] where s is the sample size, y i is the sample true value, is the predicted value.
[0077] A statistic is constructed using the residual sum of squares as shown in formula (11). This statistic follows an F-distribution, and the null hypothesis is decided to be rejected or accepted through hypothesis testing.
[0078]
[0079] where RSS0 and RSS1 represent the residual sum of squares calculated from the benchmark equation and the comparison equation respectively.
[0080] (2) Perform maximization (MaxScaler) processing on the F-test value matrix M, that is, using the maximum value in the matrix as the reference standard, and all data are divided by the maximum value. The calculation formula is:
[0081] E = M - Max(M) (14)
[0082] Wherein, M is a (12*12) F-test value matrix, all data are greater than 0, and Max(M) is the maximum value in M. E is the matrix after maximum value scaling, and it is used as the GC matrix.
[0083] Step S33: Construct a dynamic effect brain network G from the above node features and edge features, that is, a fully connected weighted directed graph.
[0084] Step S4: Construct a key brain network that integrates spatio-temporal information
[0085] Step S41: Obtain an effect brain network {G i-1 , G i , G i+1} containing context in the dynamic effect brain network G, where i represents the i-th time window;
[0086] Step S42: Use spatial attention to capture valuable spatial information in the node features of the effect brain network {G i-1 , G i , G i+1} containing context;
[0087] In S3, the obtained dynamic effect brain network is a fully connected weighted directed graph, and the fully connected directed graph cannot reflect the specificity of the brain in different sleep stages, so a good classification effect cannot be achieved. Secondly, some studies have shown that when analyzing brain networks, sparsifying the network will bring great benefits to subsequent analysis. Finally, in neural network learning, generally speaking, the more parameters the model has, the stronger the expression ability of the model and the greater the amount of information stored in the model, but this will bring the problem of information overload, causing reverse learning and decreasing the accuracy. Therefore, before inputting into the model, it is necessary to extract the key effect brain network, reduce redundant information, and enhance the specificity of the effect brain network in different sleep stages, so as to achieve a better classification effect and, in subsequent analysis, map it back to the brain region to analyze and study the key functional areas of the brains of different subjects, providing new auxiliary biomarkers for sleep disorder diagnosis.
[0088] The attention mechanism in the neural network is a resource allocation scheme that, under limited computing power, allocates computing resources to more important tasks while solving the problem of information overload. It is often used to guide the network to focus on the most relevant parts, suppress irrelevant information features, reduce computational costs, and improve accuracy. For sleep, different brain regions have different effects on sleep stages, and sleep stages are dynamically changing. Therefore, in order to automatically extract such spatial changes, spatial attention is used to capture valuable spatial information in the context of sleep stages. Specifically:
[0089] P = V p ·σ((Node (l-1) Z1)Z2(Z3Node (l-1) ) T + b p ) (15)
[0090] Among them, V p , b p ∈ R N×N , These are all learnable parameters, and σ is the sigmoid activation function. is the input of the l-th layer neural network. P represents the spatial attention matrix, which is dynamically calculated from the input of the current layer.
[0091] Use softmax to normalize the spatial attention focus matrix P.
[0092] P' = softmax(P) (16)
[0093] Preferably, according to the classification result of step S5, backpropagation is performed on the neural network to update the model parameters, and then the spatial attention matrix P is dynamically adjusted.
[0094] Step S43: Combine the valuable spatial information P' in the node features obtained in step S42 with the GC matrix of the context, fuse the time information, and calculate the key edge features in the effective brain network.
[0095] Sleep is a process with slow changes, that is, sleep has continuity and continuous sleep has strong dependence in time. A normal person's sleep throughout the night generally goes through 4-5 cycles. There are often transition stages between two sleep stages. These transition stages are artificially defined and may carry some characteristics of both the previous and the following stages. The existence of these transition stages greatly increases the difficulty of sleep staging, but at the same time provides good data support for the study of sleep mechanisms. Therefore, in order to improve the accuracy of sleep staging and adaptively learn the sleep mechanism for staging, it is necessary to study the context environment of each 30s EEG segment. To utilize the context information, this paper also puts the signals of 30s before and after the current 30s EEG segment into the model, that is, {X i-1 ,X i ,X i+1}. For the edge features of the effective brain network, the same GC matrix is used. This GC matrix is weighted by the node feature learning spatial attention score matrix and then multiplied by the corresponding GC matrix of this segment respectively. The calculation formula is as follows:
[0096]
[0097] where i represents the i-th time window, and E' i is the key edge feature matrix of the core sub-network.
[0098] Step S44: According to the key edge features, select the connected node features, and then obtain the key brain network integrating spatio-temporal information.
[0099] Step S5: Use the adaptive sleep staging recognition model to realize the sleep staging recognition of EEG signals
[0100] The adaptive sleep staging recognition model includes CNN, GCN, and spatio-temporal feature fusion layer. CNN is used to extract time features, and its input is the set of key effective brain networks integrating context {G' i-1 ,G' i ,G' i+1}, and the output is time features. GCN is used to extract spatial features, and its input is the set of key effective brain networks integrating context {G' i-1 ,G' i ,G' i+1}, and the output is spatial features. Spatio-temporal feature fusion includes a residual module and two fully connected layers. The residual module calculates the residual according to the node features in the key effective brain network of the context, and the two fully connected layers are used to fuse the time features, spatial features, and residual to obtain the classification result.
[0101] Since the concept of GCN was proposed in 2016, GCNs have shown its advanced performance in graph structure data, which is different from CNN, and has been widely used. In fact, GCN has the same function as CNN, that is, a feature extractor, except that its object is graph data. GCN has cleverly designed a method to extract features from graph data, so that these features can be used to perform node classification, graph classification, and link prediction on graph data, and can also obtain graph embedding by the way, which shows that it has a wide range of uses. Therefore, people are now using their imagination to make GCN shine in various fields. The core parts of GCN are as follows.
[0102] Suppose there is a batch of graph data with N nodes. Each node has its own features. Let the features of these nodes form an N×D-dimensional matrix X. Then the relationship between the nodes will also form an N×N-dimensional matrix A, also called the adjacency matrix. X and A are the inputs of the model.
[0103] GCN is also a neural network layer, and the propagation method between its layers is:
[0104]
[0105] in, I is the identity matrix, yes The relationship between the degree matrix and the degree matrix is H is the feature of each layer. For the input layer, H is X, and σ is the nonlinear activation function.
[0106] The present invention uses the EEG signals of healthy subjects in the sleeping state to automatically divide sleep into stages, wherein the EEG electrodes are set according to the international 10-20 standard, with 12 channels and a sampling frequency of 512Hz. The structure of this classification model is as follows:
[0107]
[0108] Based on the above structure, the model performs sleep staging on healthy subjects and the results are as follows:
[0109]
[0110] Among them, W_F1(%) represents the classification accuracy rate of EEG data in the W stage of healthy subjects, N1_F1(%) represents the classification accuracy rate of EEG data in the N1 stage of healthy subjects, N2_F1(%) represents the classification accuracy rate of EEG data in the N2 stage of healthy subjects, N3_F1(%) represents the classification accuracy rate of EEG data in the N3 stage of healthy subjects, REM_F1(%) represents the classification accuracy rate of EEG data in the REM stage of healthy subjects, and F1(%) represents the average classification accuracy rate of EEG data in the five sleep stages of healthy subjects.
Claims
1. An adaptive sleep staging method based on key brain networks, characterized in that The method includes the following steps: Step S1: Collect scalp electroencephalogram (EEG) signal data of the subject during sleep using a multi-channel EEG acquisition device; Step S2: Preprocess the collected EEG signal data to reduce the interference of artifacts; Step S3: Extract node features and edge features from the EEG signal data preprocessed in Step S2, and construct a fully connected weighted directed graph, that is, a dynamic effect brain network; specifically: S31: Extract node features; including the following steps: S311: Stationarity test; S312: Fine-grain the time series that passes the test based on the average value to obtain the reconstructed time series; S313: Calculate the Kolmogorov-Smirnov (KS) entropy value according to the reconstructed time series; S314: Construct a node feature matrix Node from the above KS entropy values; S32: Extract edge features; including the following steps: S321: Stationarity test; S322: Calculate the Granger causality matrix for the time series that passes the test; S33: Construct a dynamic effect brain network G from the above node features and edge features, that is, a fully connected weighted directed graph; Step S4: Construct a key brain network that fuses spatio-temporal information; including the following steps: Step S41: Obtain the effect brain network containing context {G i-1 , G i , G i+1} in the dynamic effect brain network G, where i represents the i-th time window; Step S42: Use spatial attention to capture valuable spatial information in the node features of the effective brain network {G i-1 , G i , G i+1} containing context; specifically: To automatically extract such spatial changes, use spatial attention to capture valuable spatial information of node features in the sleep stage context; P = V p ·σ((Node (l-1) Z1)Z2(Z3Node (l-1) ) T + b p ) (15) Among them, V p , b p ∈R N×N , These are all learnable parameters, and σ is the sigmoid activation function; is the input of the l-th layer neural network; P represents the spatial attention matrix; Use softmax to normalize the spatial attention attention matrix P; P’ = softmax(P) (16) Step S43: Combine the valuable spatial information P' in the node features obtained in step S42 with the Granger causality matrix of the context, fuse the time information, and calculate the key edge feature E′ in the effective brain network i : where i represents the i-th time window; E j represents the Granger causality matrix corresponding to the j-th time window; Step S44: According to the key edge features, select the connected node features, and then obtain the key brain network that fuses spatio-temporal information; Step S5: Use an adaptive sleep staging recognition model to realize the sleep staging recognition of EEG signals; The adaptive sleep staging recognition model includes a Convolutional Neural Network (CNN), a Graph Convolutional Network (GCN), and a spatio-temporal feature fusion layer; the CNN is used to extract time features, and its input is the three key brain networks containing context in Step S4, and the output is time features; the GCN is used to extract spatial features, and its input is the three key brain networks containing context in Step S4, and the output is spatial features; the spatio-temporal feature fusion includes a residual module and two fully connected layers. The residual module calculates the residual according to the node features in the three key brain networks containing context, and the two fully connected layers are used to fuse the time features, spatial features, and residuals to obtain the classification result.
2. The method according to claim 1, characterized in that In Step S1, the sampling frequency is 512 Hz, and the electrode cap uses the international 10 / 20 system electrode placement method. The 12 electrodes are Fp1, Fp2, F3, F4, F7, F8, C3, C4, T7, T8, P3, and P4; the reference electrode is placed on the right earlobe.
3. The method according to claim 1, wherein In Step S2, the preprocessing of the EEG signal data includes a smoothing filter, a de-averaging reference, and frequency division filtering.
4. The method according to claim 3, wherein In Step S2, the frequency bands divided by the FIR filter for frequency division filtering are: delta (0.5 - 4 Hz), theta (4 - 8 Hz), alpha (8 - 13 Hz), beta1 (13 - 22 Hz), beta2 (22 - 30 Hz), gamma (30 - 40 Hz), sigma (11 - 16 Hz).
5. The method according to claim 1, wherein Specifically, Step S311 is: Given a time series {x(n): 1≤n≤N}, where x(n) represents the EEG signal after being processed in step S2 at time n, and N represents the data length, i.e., the total time * sampling frequency; then perform a unit root test on the time series; if the test passes, proceed to step S312; if the test fails, first perform a first-order difference process, and then perform a unit root test on the time series after the first-order difference process, repeating the current operation until the test passes.
6. The method according to claim 5, wherein The unit root test uses the Augmented Dickey - Fuller (ADF) test or the Kwiatkowski - Phillips - Schmidt - Shin (KPSS) test.
7. The method according to claim 1, wherein Step S313 is specifically: For a given embedding dimension m: (1) Segment the time series {x(n): 1≤n≤N} to form (N - m + 1) vectors of length m: {X i,m : 1 ≤ i ≤ (N - m + 1)} X i,m = {x(i + k): 0 ≤ k ≤ m - 1} (1) where X i,m represents the i-th EEG signal segment of length m; (2) Segment the time series {x(n): 1≤n≤N} to form (N - m) vectors of length (m + 1): {X i,m+1 : 1 ≤ i ≤ (N - m)} X i,m+1 = {x(i + k): 0 ≤ k ≤ m} (2) where X i,m+1 represents the i-th EEG signal segment of length m + 1; (3) Find X i,m and X j,m The distance between: (4) Vectors X with a distance less than r from X i,m The probability of j,m is: Among which B i is X i,m the distance between X j,m and X is the number of vectors less than r, where r is a preset value; (5) Take the average value of the natural logarithm of the corresponding probability where i ≤ (N - m + 1). : (6) Repeat steps (3) - (5) to obtain: Limit the values of N, m, and r, and repeat the above steps until [Φ m (r) - Φ m+1 (r)] converges; this convergence value is the KS entropy value; 8. The method according to claim 1, wherein Step S322 is specifically: (1) Calculate the test value F of the EEG signal segments of every two channels among all channels X→Y , and construct the F-test value matrix M; specifically: For any two-channel EEG signal segments X and Y in the time series after passing the test, establish the following autoregressive model: Among them, X t is the predicted value at time t obtained according to Y t-i and X t-j , Y t is the predicted value at time t obtained according to X t-i and Y t-j , a 1i , a 2i , b 1j , b 2j are the weight coefficients of the variables, ε 1t and ε 2t represent the white noises of X and Y respectively, and p and q represent the lag orders of X and Y respectively; When testing whether X is the causal variable of Y, it is calculated using formula (9). When all of the a 2i in formula (9) are 0, it means that only the past information of Y itself is used to predict the current value of Y. At this time, equation (9) is called the benchmark equation; when the a 2i are not all 0, it means that the past information of Y and X is used to predict the current value of Y. At this time, equation (9) is the comparison equation; when taking "Y's Granger cause is not X" as the null hypothesis, the residual sum of squares RSS is calculated through the benchmark equation and the comparison equation, as shown in formula (10); where s is the sample size, and y i is the true value of the sample, and is the predicted value; Use the sum of squared residuals to construct a statistic as in formula (11). This statistic follows an F - distribution, and a hypothesis test is used to decide whether to reject or accept the null hypothesis; where RSS0 and RSS1 respectively represent the sum of squared residuals calculated from the benchmark equation and the comparison equation; (2) Perform a maximization (MaxScaler) process on the F - test value matrix M, i.e., use the maximum value in the matrix as a reference standard, and divide all data by the maximum value to obtain the matrix E after maximum scaling, and use E as the Granger causality matrix: E = M - Max(M) (14) where M is a (12 * 12) F - test value matrix, all data are greater than 0, and Max(M) is the maximum value in M.
9. The method according to claim 1, wherein According to the classification result in step S5, perform backpropagation on the neural network in step S42 to update the model parameters, and then dynamically adjust the spatial attention matrix P.
10. An adaptive sleep staging system for implementing the method according to any one of claims 1-9, characterized in that It includes an EEG signal acquisition module, a data pre - processing module, a dynamic effect brain network construction module, a key brain network extraction module that fuses spatio - temporal information, and a classification and recognition module.
Citation Information
Patent Citations
Data augmentation method based on RBSAGAN
CN112668424A
Dynamic brain function network generation method, system and equipment
CN113274037A