Small sample electroencephalogram signal classification method for epilepsy monitoring

By constructing the epilepsy quad-categorized fusion model and using the condition-weighted voting algorithm, the problems of data imbalance and high similarity of sample characteristics in the existing technology are solved, the response speed and classification accuracy of the epilepsy monitoring model are improved, and overfitting is avoided and the problem of excessive resource consumption.

CN119441950AActive Publication Date: 2025-02-14NANJING UNIV

Patent Information

Application Number
CN202411575006.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-02-14
Estimated Expiration
2044-11-06

AI Technical Summary

Technical Problem

In the epilepsy monitoring, the model training effect is poor due to data imbalance and high sample feature similarity. Oversampling and GAN amplification data will lead to overfitting the model or excessive computing resources consumption, and the response delay is large. .

Method used

A small sample EEG signal classification method is proposed. By constructing a four-class fusion model of epilepsy, combining two-class and three-class networks, and using condition-weighted voting algorithms, the model's detection response speed during the seizure period and the classification accuracy during the non-seizure period is improved. .

Benefits of technology

It significantly improves the detection response speed during epilepsy period, improves the classification accuracy for non-epidemic periods, reduces the calculation amount of the model, and avoids resource consumption caused by overfitting and data amplification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441950A_ABST
    Figure CN119441950A_ABST
Patent Text Reader

Abstract

The invention discloses a small sample electroencephalogram signal classification method for epilepsy monitoring, and belongs to the technical field of electroencephalogram signal processing and classification, and the method specifically comprises the steps: constructing an epilepsy four-classification fusion model which comprises a shared network layer, a two-classification sub-network layer and a three-classification sub-network layer, obtaining an epilepsy electroencephalogram signal sample, and carrying out the classification of the epilepsy electroencephalogram signal sample; inputting an epilepsy electroencephalogram signal sample into a shared network layer, performing feature extraction on the epilepsy electroencephalogram signal sample, capturing complex features of an epilepsy electroencephalogram signal, inputting the extracted complex features of the epilepsy electroencephalogram signal into an epilepsy four-classification fusion model, and outputting an electroencephalogram signal classification result. Performing weighted voting on an electroencephalogram signal classification result by utilizing a conditional weighted voting algorithm, outputting a voting result, considering data feature differences and data volume differences in different periods, dividing a four-classification task into two-classification and three-classification, and combining with the conditional weighted voting algorithm to obtain an electroencephalogram signal classification result; therefore, the model can maintain better learning effect and speed under the condition of few small samples in the attack period.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of electroencephalogram (EEG) signal processing and classification, and specifically is a small sample electroencephalogram (EEG) signal classification method for epilepsy monitoring. Background Art

[0002] The EEG activity of epileptic patients can be divided into the following four stages: preictal, ictal, postictal, and interictal. Among them, the core goal of seizure prediction is to accurately identify the features of the preictal period from the EEG, while seizure detection focuses on extracting the features of the ictal period. Therefore, the epilepsy monitoring task that combines seizure prediction and seizure detection is essentially a four-classification problem. Since the time of epileptic seizures is not fixed and each seizure lasts for a short time, there are fewer ictal data available for training in the dataset compared with the other three periods. Using all non-ictal data together with ictal data for training to achieve the four-classification task will result in poor model training results due to the imbalance of training data. If the amount of data in the pre-ictal, interictal, and post-ictal periods is reduced to the same level as that in the ictal period, the reduction in the number of samples will affect the classification effect due to the high similarity of sample features in these periods. To solve this problem, many researchers have adopted oversampling technology. When slicing and sampling the original EEG signal, the number of ictal samples is amplified by partially overlapping adjacent samples to achieve a relative balance with the number of samples in other periods. However, this method may result in the inclusion of the same fragments between different samples. If samples containing the same fragments are divided into training sets and test sets respectively, the accuracy of the model will be artificially high, which will cause the model to perform poorly when encountering new, unseen data in the test set, and it will be impossible to objectively evaluate the learning effect of the model. In addition, some researchers have used generative adversarial networks (GANs) to amplify seizure data. Although this method can increase the number of seizure samples, data amplification will increase training time and consumption of computing resources. If the data amplification strategy is not chosen properly, it may also cause the model to overfit.

[0003] GCN is a network model that can extract spatial features of topological graphs. Existing studies have explored the spatial structural relationship of EEG signals based on graph convolutional networks (GCN). Some studies have explored the spatial structural relationship of EEG signals based on GCN methods. The proposed efficient GCN represents the connection relationship between nodes by calculating the geographical distance and spectral correlation between nodes as the edge features of the adjacency matrix. Other researchers use the Pearson correlation matrix of the original EEG signal to construct the input graph of the graph neural network, where the matrix coefficients simulate the spatial relationship in the EEG signal. Although these methods enhance the understanding of the topological structure between electrodes, it is difficult for a single indicator to fully describe the complex EEG network, which affects the accuracy of the model.

[0004] In order to enable the model to be applied to wearable devices at the edge, the computational complexity of the network model needs to be reduced. Some researchers have adopted a voting mechanism to conduct majority voting on multiple consecutive classification results and finally output the classification result with the most votes. However, this equal-weighted voting method and non-voting method will have the problem of large response delay at the boundary of the attack period. Specifically, when the sampling window just enters the attack period range, the proportion of the attack period in the sample is small, which is at a disadvantage in the equal-weighted voting. Only when the proportion of the attack period in the sample exceeds half can it dominate the voting. This results in a large response delay of the network at the boundary of the attack period, affecting the timely rescue of family members and doctors. Summary of the invention

[0005] In view of the shortcomings of the existing technology, the present invention proposes a small sample EEG signal classification method for epilepsy monitoring. This method greatly improves the detection response speed during the epileptic seizure period and improves the classification accuracy of the non-seizure period through the combination of binary and ternary classification networks and a conditional weighted voting algorithm.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A small sample electroencephalogram signal classification method for epilepsy monitoring includes the following specific steps:

[0008] Step S1: constructing an epilepsy four-classification fusion model, including: a shared network layer, a two-classification sub-network layer and a three-classification sub-network layer;

[0009] Step S2: Obtain epileptic EEG signal samples, input the epileptic EEG signal samples into the shared network layer, perform feature extraction on the epileptic EEG signal samples, and capture the complex features of the epileptic EEG signal;

[0010] Step S3: input the extracted complex features of epileptic EEG signals into the epilepsy four-classification fusion model, and output the EEG signal classification results;

[0011] Step S4: Use the conditional weighted voting algorithm to perform weighted voting on the EEG signal classification results and output the voting results.

[0012] Specifically, the specific steps of step S2 are:

[0013] Step S201: Obtain epileptic EEG signal samples, construct the epileptic EEG signal samples into a graph structure, each node in the graph corresponds to an electrode channel, the relationship between the nodes in the graph is represented by an adjacency matrix, and a graph convolutional neural network is used to perform a convolution operation to capture the topological structure and mutual correlation between different channels in the epileptic EEG signal, and obtain a feature matrix of the epileptic EEG signal;

[0014] Step S202: using the attention mechanism to dynamically adjust the weight of each channel in the epileptic EEG signal to obtain an adjusted epileptic EEG signal feature matrix;

[0015] Step S203: input the adjusted epileptic EEG signal feature matrix into a one-dimensional convolutional neural network, compress and extract the feature matrix of the time series, and obtain preliminary features of the epileptic EEG signal.

[0016] Specifically, the relationship between the nodes in the graph in step S201 is represented by an adjacency matrix, and the specific steps of calculating the adjacency matrix are:

[0017] Step S2011: Set N epileptic EEG signal channels, each channel contains data at T time points, and the epileptic EEG signal set is X, X = {x1, x2, ..., x N}, where x N Represents the time series data of the Nth channel of the epileptic EEG signal;

[0018] Step S2012: Calculate the Spearman correlation coefficient, Pearson correlation coefficient and Euclidean distance between each pair of channels of the epileptic EEG signal. The specific formula is:

[0019]

[0020] in, represents the Spearman correlation coefficient between each pair of channels of epileptic EEG signals, represents the Pearson correlation coefficient between each pair of channels of epileptic EEG signals, represents the Euclidean distance between each pair of channels of the epileptic EEG signal, t represents the data of the channel at the tth time point, T represents the total number of data at the time point in the channel, and x i [t] represents the data of the tth time point of the i-th channel of the epileptic EEG signal, x j [t] represents the data of the jth channel at the tth time point of the epileptic EEG signal, R(x i [t]) and R(x j [t]) represent x i [t] and x j The rank of [t], represents the average value of the data in the ith channel of the epileptic EEG signal, Represents the average value of the data in the jth channel of the epileptic EEG signal;

[0021] Step S2013: Based on the calculation results of the Spearman correlation coefficient, the Pearson correlation coefficient and the Euclidean distance between each pair of channels of the epileptic EEG signal, three adjacency matrices are constructed. The specific formula is:

[0022]

[0023] in, represents the Spearman adjacency matrix, represents the Pearson adjacency matrix, represents the Euclidean adjacency matrix, |·| represents the absolute value function, exp() represents the exponential function, and σ represents the adjustment parameter, which is usually selected according to the data distribution.

[0024] Specifically, the relationship between the nodes in the graph in step S201 is represented by an adjacency matrix, and the specific steps of calculating the adjacency matrix also include:

[0025] Step S2014: Calculate the comprehensive adjacency matrix based on the three constructed adjacency matrices. The specific formula is:

[0026]

[0027] Among them, A i ' j represents the comprehensive adjacency matrix, κ1, κ2, and κ3 represent weight parameters, which can be adjusted by cross-validation or other methods;

[0028] Step S2015: normalize the comprehensive adjacency matrix. The specific formula is:

[0029]

[0030] in, represents the normalized comprehensive adjacency matrix, D represents the degree matrix, and D ij =∑A i ' j ;

[0031] Step S2016: Set a threshold τ, and binarize or weight the normalized integrated adjacency matrix. The specific formula is:

[0032]

[0033] in, represents the adjacency matrix after binarization, represents the weighted adjacency matrix, and ι represents the weight.

[0034] Specifically, the specific steps of step S3 are:

[0035] Step S301: first, the complex features of the extracted epileptic EEG signals are input into the binary classification sub-network, the complex features of the epileptic EEG signals are processed using the LSTM model, and finally the binary classification output is performed through the fully connected layer;

[0036] Step S302: The binary classification output result is epileptic seizure period and epileptic non-seizure period. When the binary classification output result is epileptic seizure period, the result is directly output;

[0037] Step S303: When the binary classification output result is the non-seizure period of epilepsy, the epileptic EEG signal whose binary classification output result is the non-seizure period of epilepsy is input into the three-classification subnetwork, and the time series features are processed by LSTM, and finally output through the fully connected layer of the three-classification. The three-classification output results are the pre-seizure period, inter-seizure period and post-seizure period of epilepsy.

[0038] Specifically, the specific steps of step S4 are:

[0039] Step S401: Determine the single-window output result y of the binary classification sub-network at time t t Is it the onset period? If so, determine the single window inference results Z at time t-1 and t-2 t-1 and Z t-2 Whether they are all in the preictal stage;

[0040] Step S402: If both time t-1 and time t-2 are in the pre-ictal period, the voting weight w at time t is t Set to: Among them, Pictal represents the probability that the output of the single window of the binary classification subnetwork at time t is the onset period, and the voting weights w at time t-2 and t-1 are t-2 and w t-1 All are set to 1;

[0041] Step S403: When the binary classification sub-network outputs the result y in a single window at time t t When it is the non-attack period, the weight values ​​w of the three windows at time t, t-1 and t-2 are t 、w t-1 and w t-2 are all set to 1, and the output result y of the two-classification sub-network t-2 to y t Conduct voting;

[0042] Step S404: Determine the final output r of the binary classification sub-network according to the voting results t If the voting result is r t is the onset period, the final output of the epilepsy four-classification fusion model is also the onset period, otherwise, the voting result of the three-classification model is o t This will be the final output of the model.

[0043] A small sample EEG signal classification system for epilepsy monitoring, used to implement the small sample EEG signal classification method for epilepsy monitoring, comprising: a model building module, a feature extraction module, a classification module and a voting module;

[0044] The model building module is used to build an epilepsy four-classification fusion model, including: a shared network layer, a two-classification sub-network layer and a three-classification sub-network layer;

[0045] The feature extraction module is used to obtain epileptic EEG signal samples, perform feature extraction on the epileptic EEG signal samples, and capture the complex features of the epileptic EEG signal;

[0046] The classification module is used to input the extracted complex features of epileptic EEG signals into the epilepsy four-classification fusion model and output the EEG signal classification results;

[0047] The voting module is used to perform weighted voting on the EEG signal classification results using a conditional weighted voting algorithm and output the voting results.

[0048] Specifically, the feature extraction module includes: a feature matrix extraction unit, an attention mechanism unit and a preliminary feature extraction unit;

[0049] The feature matrix extraction unit uses a graph convolutional neural network to extract the feature matrix of the epileptic EEG signal;

[0050] The attention mechanism unit is used to dynamically adjust the weight of each channel in the epileptic EEG signal using the attention mechanism;

[0051] The preliminary feature extraction unit is used to extract preliminary features of epileptic EEG signals using a one-dimensional convolutional neural network.

[0052] Specifically, the classification module includes: a two-classification unit and a three-classification unit;

[0053] The binary classification unit is used to input the extracted complex features of the epileptic EEG signal into the binary classification subnetwork to obtain a binary classification output result;

[0054] The three-classification unit is used to input the epileptic EEG signal whose two-classification output result is the non-seizure period into the three-classification subnetwork to obtain the three-classification output result.

[0055] Compared with the prior art, the present invention has the following beneficial effects:

[0056] 1. The present invention proposes a small sample EEG signal classification method for epilepsy monitoring. The epilepsy four-classification fusion model architecture takes into account the differences in data features and data volume in different periods. By splitting the four-classification task into two-classification and three-classification, the model can maintain a good learning effect even in the case of a small sample with few seizures.

[0057] 2. The present invention proposes a small sample EEG signal classification method for epilepsy monitoring. Compared with the traditional equal-weighted voting mechanism, the conditional weighted voting algorithm can make the window at time t dominate the voting when the seizure sample is just sampled, thereby improving the response speed of the model.

[0058] 3. The present invention proposes a small sample EEG signal classification method for epilepsy monitoring. Compared with the traditional single-indicator graph construction method, the graph construction method that integrates Euclidean distance, Pearson correlation coefficient and Spearman correlation coefficient can more comprehensively reflect the complex relationship between different electrode channels of EEG signals, thereby enabling the network model to extract deeper data features. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 A flow chart of a small sample EEG signal classification method for epilepsy monitoring provided by the present invention;

[0060] Figure 2 Conditional voting flow chart provided for the present invention;

[0061] Figure 3 This is an architecture diagram of a small sample EEG signal classification system for epilepsy monitoring provided by the present invention. DETAILED DESCRIPTION

[0062] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, in the description of the present invention, it should be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside" and the like indicate the orientation or position relationship based on the orientation or position relationship shown in the accompanying drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "No. 1", "No. 2" and "No. 3" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. The present invention is further explained below in conjunction with specific embodiments.

[0063] Example 1

[0064] See also Figure 1 , an embodiment of the present invention provides: a small sample EEG signal classification method for epilepsy monitoring, comprising the following specific steps:

[0065] Step S1: constructing an epilepsy four-classification fusion model, including: a shared network layer, a two-classification sub-network layer and a three-classification sub-network layer;

[0066] Step S2: Obtain epileptic EEG signal samples, input the epileptic EEG signal samples into the shared network layer, perform feature extraction on the epileptic EEG signal samples, and capture the complex features of the epileptic EEG signal;

[0067] The specific steps of step S2 are:

[0068] Step S201: Obtain epileptic EEG signal samples, construct the epileptic EEG signal samples into a graph structure, each node in the graph corresponds to an electrode channel, the relationship between the nodes in the graph is represented by an adjacency matrix, and a graph convolutional neural network is used to perform a convolution operation to capture the topological structure and mutual correlation between different channels in the epileptic EEG signal, and obtain a feature matrix of the epileptic EEG signal;

[0069] Step S202: using the attention mechanism to dynamically adjust the weight of each channel in the epileptic EEG signal to obtain an adjusted epileptic EEG signal feature matrix;

[0070] Step S203: Input the adjusted epileptic EEG signal feature matrix into a one-dimensional convolutional neural network (1D-CNN), compress and extract the feature matrix of the time series, and obtain preliminary features of the epileptic EEG signal.

[0071] In this embodiment, the shared network layer is composed of a graph convolutional neural network (GCN), a channel attention mechanism, and a one-dimensional convolutional neural network (1D-CNN). In the graph convolutional neural network (GCN), the input data is a graph structure formed by EEG signal channels, each node corresponds to an electrode channel, and the connection relationship between nodes is represented by an adjacency matrix. The purpose of the graph convolutional neural network (GCN) is to perform convolution operations on this graph structure to capture the topological structure and mutual correlation between different channels in the EEG signal;

[0072] The channel attention mechanism is used to enhance the importance of specific channels in EEG signals. In practical applications, different electrode channels contribute differently to epileptic seizures. The channel attention mechanism can dynamically adjust the weights of each channel and enhance the influence of electrode channels that are sensitive to epileptic seizures by learning the importance distribution of each channel.

[0073] The shared network layer also includes a one-dimensional convolutional neural network (1D-CNN). The main purpose of one-dimensional convolution is to capture the local pattern of EEG signals in the time dimension. Through 1D-CNN, the model can extract short-term dynamic patterns in EEG signals, especially the mutation characteristics before and after epileptic seizures.

[0074] In step S201, the relationship between the nodes in the graph is represented by an adjacency matrix. The specific steps for calculating the adjacency matrix are:

[0075] Step S2011: Set N epileptic EEG signal channels, each channel contains data at T time points, and the epileptic EEG signal set is X, X = {x1, x2, ..., x N}, where x N Represents the time series data of the Nth channel of the epileptic EEG signal;

[0076] Step S2012: Calculate the Spearman correlation coefficient, Pearson correlation coefficient and Euclidean distance between each pair of channels of the epileptic EEG signal. The specific formula is:

[0077]

[0078] in, represents the Spearman correlation coefficient between each pair of channels of epileptic EEG signals, represents the Pearson correlation coefficient between each pair of channels of epileptic EEG signals, represents the Euclidean distance between each pair of channels of the epileptic EEG signal, t represents the data of the channel at the tth time point, T represents the total number of data at the time point in the channel, and x i [t] represents the data of the tth time point of the i-th channel of the epileptic EEG signal, x j [t] represents the data of the jth channel at the tth time point of the epileptic EEG signal, R(x i [t]) and R(x j [t]) represent x i [t] and x j The rank of [t], represents the average value of the data in the ith channel of the epileptic EEG signal, represents the average value of the data in the jth channel of the epileptic EEG signal;

[0079] Step S2013: Based on the calculation results of the Spearman correlation coefficient, the Pearson correlation coefficient and the Euclidean distance between each pair of channels of the epileptic EEG signal, three adjacency matrices are constructed. The specific formula is:

[0080]

[0081] in, represents the Spearman adjacency matrix, represents the Pearson adjacency matrix, represents the Euclidean adjacency matrix, |·| represents the absolute value function, exp() represents the exponential function, and σ represents the adjustment parameter, which is usually selected according to the data distribution;

[0082] Step S2014: Calculate the comprehensive adjacency matrix based on the three constructed adjacency matrices. The specific formula is:

[0083]

[0084] Among them, A i ' j represents the comprehensive adjacency matrix, κ1, κ2, and κ3 represent weight parameters, which can be adjusted by cross-validation or other methods;

[0085] Step S2015: normalize the comprehensive adjacency matrix. The specific formula is:

[0086]

[0087] in, represents the normalized comprehensive adjacency matrix, D represents the degree matrix, and D ij =∑A i ' j ;

[0088] Step S2016: Set a threshold τ, and binarize or weight the normalized integrated adjacency matrix. The specific formula is:

[0089]

[0090] in, represents the adjacency matrix after binarization, represents the weighted adjacency matrix, ι represents the weight, which can be adjusted by cross-validation or other methods.

[0091] Step S3: input the extracted complex features of epileptic EEG signals into the epilepsy four-classification fusion model, and output the EEG signal classification results;

[0092] The specific steps of step S3 are:

[0093] Step S301: first, the complex features of the extracted epileptic EEG signals are input into the binary classification sub-network, the complex features of the epileptic EEG signals are processed using the LSTM model, and finally the binary classification output is performed through the fully connected layer;

[0094] Step S302: The binary classification output result is epileptic seizure period and epileptic non-seizure period. When the binary classification output result is epileptic seizure period, the result is directly output;

[0095] Step S303: When the binary classification output result is the non-seizure period of epilepsy, the epileptic EEG signal whose binary classification output result is the non-seizure period of epilepsy is input into the three-classification subnetwork, and the time series features are processed by LSTM, and finally output through the fully connected layer of the three-classification. The three-classification output results are the pre-seizure period, inter-seizure period and post-seizure period of epilepsy.

[0096] In this embodiment, due to the scarcity of samples during the attack period, directly using a four-classification model will lead to unbalanced training. Compared with the three non-attack period category samples, the characteristics of the attack period are obvious, and a small amount of data training can achieve a high accuracy classification effect for the attack period and the non-attack period. The characteristics of other periods are similar, and more data are required for training to achieve a suitable classification accuracy. Therefore, we split the four-classification task into two-classification and three-classification: the two-classification subnetwork is used to distinguish between the attack period and the non-attack period, and the three-classification subnetwork distinguishes between the pre-attack period, the interval period, and the late period. When the two-classification is the attack period, the result is output directly; when it is the non-attack period, the three-classification result is output. In actual applications, if the output result of the model is the pre-attack period, the patient is reminded to move to a safe environment in advance; if it is the attack period, the patient's family is automatically contacted for help.

[0097] Step S4: Use the conditional weighted voting algorithm to perform weighted voting on the EEG signal classification results and output the voting results.

[0098] The specific steps of step S4 are:

[0099] Step S401: Determine the single-window output result y of the binary classification sub-network at time t t Is it the onset period? If so, determine the single window inference results Z at time t-1 and t-2 t-1 and Z t-2 Whether they are all in the preictal stage;

[0100] Step S402: If both time t-1 and time t-2 are in the pre-ictal period, the voting weight w at time t is t Set to: Among them, Pictal represents the probability that the output of the single window of the binary classification subnetwork at time t is the onset period, and the voting weights w at time t-2 and t-1 are t-2 and w t-1 All are set to 1;

[0101] Compared with the traditional equal-weight voting mechanism, the conditional weighted voting algorithm can make the window at time t dominate the voting when the sample of the attack period is just sampled. That is, when the single-window reasoning result of the binary classification subnetwork at time t is the attack period, the system will respond immediately without waiting for the reasoning result at time t-1 to also be the attack period, which significantly shortens the response time of the attack period.

[0102] Step S403: When the binary classification sub-network outputs the result y in a single window at time t t When it is the non-attack period, the weight values ​​w of the three windows at time t, t-1 and t-2 are t 、w t-1 and w t-2 are all set to 1, and the output result y of the two-classification sub-network t-2 to yt Conduct voting;

[0103] Step S404: Determine the final output r of the binary classification sub-network according to the voting results t If the voting result is r t is the onset period, the final output of the epilepsy four-classification fusion model is also the onset period, otherwise, the voting result of the three-classification model is o t This will be the final output of the model.

[0104] Example 2

[0105] See also Figure 2 ,Another embodiment provided by the present invention: A small sample EEG signal classification system for epilepsy monitoring, comprising: a model building module, a feature extraction module, a classification module and a voting module;

[0106] The model building module is used to build an epilepsy four-classification fusion model, including: a shared network layer, a two-classification sub-network layer and a three-classification sub-network layer;

[0107] The feature extraction module is used to obtain epileptic EEG signal samples, perform feature extraction on the epileptic EEG signal samples, and capture the complex features of the epileptic EEG signal;

[0108] The classification module is used to input the extracted complex features of epileptic EEG signals into the epilepsy four-classification fusion model and output the EEG signal classification results;

[0109] The voting module is used to perform weighted voting on the EEG signal classification results using a conditional weighted voting algorithm and output the voting results.

[0110] Feature extraction module, including: feature matrix extraction unit, attention mechanism unit and preliminary feature extraction unit;

[0111] The feature matrix extraction unit uses a graph convolutional neural network to extract the feature matrix of the epileptic EEG signal;

[0112] The attention mechanism unit is used to dynamically adjust the weight of each channel in the epileptic EEG signal using the attention mechanism;

[0113] The preliminary feature extraction unit is used to extract preliminary features of epileptic EEG signals using a one-dimensional convolutional neural network.

[0114] Classification module, including: two-classification unit and three-classification unit;

[0115] The binary classification unit is used to input the extracted complex features of the epileptic EEG signal into the binary classification subnetwork to obtain a binary classification output result;

[0116] The three-classification unit is used to input the epileptic EEG signal whose two-classification output result is the non-seizure period into the three-classification subnetwork to obtain the three-classification output result.

[0117] In addition, the parts of the above-mentioned technical solutions provided in the embodiments of the present application that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive redundancy.

[0118] The specific implementation modes as described above further describe the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation mode of the present invention and is not intended to limit the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A small sample EEG signal classification method for epilepsy monitoring, characterized in that: The specific steps include: Step S1: constructing an epilepsy four-classification fusion model, including: a shared network layer, a two-classification sub-network layer and a three-classification sub-network layer; Step S2: Obtain epileptic EEG signal samples, input the epileptic EEG signal samples into the shared network layer, perform feature extraction on the epileptic EEG signal samples, and capture the complex features of the epileptic EEG signal; Step S3: input the extracted complex features of epileptic EEG signals into the epilepsy four-classification fusion model, and output the EEG signal classification results; Step S4: Use the conditional weighted voting algorithm to perform weighted voting on the EEG signal classification results and output the voting results.

2. A small sample EEG signal classification method for epilepsy monitoring as claimed in claim 1, characterized in that: The specific steps of step S2 are: Step S201: Obtain epileptic EEG signal samples, construct the epileptic EEG signal samples into a graph structure, each node in the graph corresponds to an electrode channel, the relationship between the nodes in the graph is represented by an adjacency matrix, and a graph convolutional neural network is used to perform a convolution operation to capture the topological structure and mutual correlation between different channels in the epileptic EEG signal, and obtain a feature matrix of the epileptic EEG signal; Step S202: using the attention mechanism to dynamically adjust the weight of each channel in the epileptic EEG signal to obtain an adjusted epileptic EEG signal feature matrix; Step S203: input the adjusted epileptic EEG signal feature matrix into a one-dimensional convolutional neural network, compress and extract the feature matrix of the time series, and obtain preliminary features of the epileptic EEG signal.

3. A small sample EEG signal classification method for epilepsy monitoring as claimed in claim 2, characterized in that: In step S201, the relationship between the nodes in the graph is represented by an adjacency matrix. The specific steps for calculating the adjacency matrix are: Step S2011: Set N epileptic EEG signal channels, each channel contains data at T time points, and the epileptic EEG signal set is X, X = {x1, x2, ..., x N }, where x N Represents the time series data of the Nth channel of the epileptic EEG signal; Step S2012: Calculate the Spearman correlation coefficient, Pearson correlation coefficient and Euclidean distance between each pair of channels of the epileptic EEG signal. The specific formula is: in, represents the Spearman correlation coefficient between each pair of channels of epileptic EEG signals, represents the Pearson correlation coefficient between each pair of channels of epileptic EEG signals, represents the Euclidean distance between each pair of channels of the epileptic EEG signal, t represents the data of the channel at the tth time point, T represents the total number of data at the time point in the channel, and x i [t] represents the data of the tth time point of the i-th channel of the epileptic EEG signal, x j [t] represents the data of the jth channel at the tth time point of the epileptic EEG signal, R(x i [t]) and R(x j [t]) represent x i [t] and x j The rank of [t], represents the average value of the data in the ith channel of the epileptic EEG signal, Represents the average value of the data in the jth channel of the epileptic EEG signal; Step S2013: Based on the calculation results of the Spearman correlation coefficient, the Pearson correlation coefficient and the Euclidean distance between each pair of channels of the epileptic EEG signal, three adjacency matrices are constructed. The specific formula is: in, represents the Spearman adjacency matrix, represents the Pearson adjacency matrix, represents the Euclidean adjacency matrix, |·| represents the absolute value function, exp() represents the exponential function, and σ represents the adjustment parameter, which is usually selected according to the data distribution.

4. A small sample EEG signal classification method for epilepsy monitoring as claimed in claim 3, characterized in that: In step S201, the relationship between the nodes in the graph is represented by an adjacency matrix, and the specific steps of calculating the adjacency matrix include: Step S2014: Calculate the comprehensive adjacency matrix based on the three constructed adjacency matrices. The specific formula is: Among them, A i ' j represents the comprehensive adjacency matrix, κ1, κ2, and κ3 represent weight parameters, which can be adjusted by cross-validation or other methods; Step S2015: normalize the comprehensive adjacency matrix. The specific formula is: in, represents the normalized comprehensive adjacency matrix, D represents the degree matrix, and D ij =∑A i ' j ; Step S2016: Set a threshold τ, and binarize or weight the normalized integrated adjacency matrix. The specific formula is: in, represents the adjacency matrix after binarization, represents the weighted adjacency matrix, and ι represents the weight.

5. A small sample EEG signal classification method for epilepsy monitoring as claimed in claim 4, characterized in that: The specific steps of step S3 are: Step S301: first, the complex features of the extracted epileptic EEG signals are input into the binary classification sub-network, the complex features of the epileptic EEG signals are processed using the LSTM model, and finally the binary classification output is performed through the fully connected layer; Step S302: The binary classification output result is epileptic seizure period and epileptic non-seizure period. When the binary classification output result is epileptic seizure period, the result is directly output; Step S303: When the binary classification output result is the non-seizure period of epilepsy, the epileptic EEG signal whose binary classification output result is the non-seizure period of epilepsy is input into the three-classification subnetwork, and the time series features are processed by LSTM, and finally output through the fully connected layer of the three-classification. The three-classification output results are the pre-seizure period, inter-seizure period and post-seizure period of epilepsy.

6. A small sample EEG signal classification method for epilepsy monitoring as claimed in claim 5, characterized in that: The specific steps of step S4 are: Step S401: Determine the single-window output result y of the binary classification sub-network at time t t Is it the onset period? If so, determine the single window inference results Z at time t-1 and t-2 t-1 and Z t-2 Whether they are all in the preictal stage; Step S402: If both time t-1 and time t-2 are in the pre-ictal period, the voting weight w at time t is t Set to: Among them, Pictal represents the probability that the output of the single window of the binary classification subnetwork at time t is the onset period, and the voting weights w at time t-2 and t-1 are t-2 and w t-1 All are set to 1; Step S403: When the binary classification sub-network outputs the result y in a single window at time t t When it is the non-attack period, the weight values ​​w of the three windows at time t, t-1 and t-2 are t 、w t-1 and w t-2 are all set to 1, and the output result y of the two-classification sub-network t-2 to y t Conduct voting; Step S404: Determine the final output r of the binary classification sub-network according to the voting results t If the voting result is r t is the onset period, the final output of the epilepsy four-classification fusion model is also the onset period, otherwise, the voting result of the three-classification model is o t This will be the final output of the model.

7. A small sample EEG signal classification system for epilepsy monitoring, used to implement a small sample EEG signal classification method for epilepsy monitoring according to any one of claims 1 to 6, characterized in that: include: Model building module, feature extraction module, classification module and voting module; The model building module is used to build a four-classification fusion model of epilepsy, including: a shared network layer, a two-classification sub-network layer and a three-classification sub-network layer; The feature extraction module is used to obtain epileptic EEG signal samples, perform feature extraction on the epileptic EEG signal samples, and capture the complex features of the epileptic EEG signal; The classification module is used to input the extracted complex features of epileptic EEG signals into the epilepsy four-classification fusion model and output the EEG signal classification results; The voting module is used to perform weighted voting on the EEG signal classification results using a conditional weighted voting algorithm and output the voting results.

8. The small sample EEG signal classification system for epilepsy monitoring according to claim 7, characterized in that: The feature extraction module includes: a feature matrix extraction unit, an attention mechanism unit and a preliminary feature extraction unit; The feature matrix extraction unit uses a graph convolutional neural network to extract the feature matrix of the epileptic EEG signal; The attention mechanism unit is used to dynamically adjust the weight of each channel in the epileptic EEG signal using the attention mechanism; The preliminary feature extraction unit is used to extract preliminary features of epileptic EEG signals using a one-dimensional convolutional neural network.

9. A small sample EEG signal classification system for epilepsy monitoring as claimed in claim 8, characterized in that: The classification module includes: a two-classification unit and a three-classification unit; The binary classification unit is used to input the extracted complex features of the epileptic EEG signal into the binary classification subnetwork to obtain a binary classification output result; The three-classification unit is used to input the epileptic EEG signal whose two-classification output result is the non-seizure period into the three-classification subnetwork to obtain the three-classification output result.

Citation Information

Patent Citations

  • Epilepsy detection method based on adaptive weighted feature fusion of deep network stack model

    CN110289081A

  • Epilepsy electroencephalogram recognition system based on hierarchical graph convolutional neural network, terminal and storage medium

    CN111657935A

  • Epilepsy detection system based on linear graph convolutional neural network

    CN112294337A

  • Epilepsy classification detection system and method based on three-dimensional quaternion graph convolutional neural network

    CN114224300A

  • Electroencephalogram sleep staging method and device, electronic equipment and storage medium

    CN115358260A

Cited By

  • Epilepsy detection method combining double variational graph auto-encoder and adversarial learning

    CN121075686A