A small sample eeg signal classification method for epilepsy monitoring

By combining binary and ternary classification networks with conditional weighted voting algorithms, the problem of small sample data in epilepsy monitoring was solved, improving the detection response speed during seizures and the classification accuracy during non-seizures, thus achieving more efficient epilepsy monitoring.

CN119441950BActive Publication Date: 2025-10-24NANJING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies for epilepsy monitoring suffer from small sample data issues, leading to unbalanced model training and insufficient classification accuracy. In particular, there is a significant response delay at the seizure boundary, which affects timely rescue.

Method used

A combination of binary and ternary classification networks, along with a conditional weighted voting algorithm, is used to extract EEG signal features through graph convolutional neural networks and attention mechanisms. The conditional weighted voting algorithm is then used to improve response speed and classification accuracy.

Benefits of technology

It improves the detection response speed during epileptic seizures and the classification accuracy during non-seizure periods, shortens the response time during seizures, and enhances the model's learning performance in small sample situations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441950B_ABST
    Figure CN119441950B_ABST
Patent Text Reader

Abstract

The application discloses a small sample electroencephalogram signal classification method for epilepsy monitoring, and belongs to the technical field of electroencephalogram signal processing and classification. The method specifically comprises the following steps: 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; acquiring epilepsy electroencephalogram signal samples; inputting the epilepsy electroencephalogram signal samples into the shared network layer; extracting features of the epilepsy electroencephalogram signal samples; capturing complex features of the epilepsy electroencephalogram signals; inputting the extracted complex features of the epilepsy electroencephalogram signals into the epilepsy four-classification fusion model; outputting electroencephalogram signal classification results; using a conditional weighted voting algorithm to perform weighted voting on the electroencephalogram signal classification results; and outputting voting results. The method considers the differences in data characteristics and data quantities in different periods, and combines the conditional weighted voting algorithm to make the model maintain good learning effect and speed in the case of small samples in the seizure period.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of electroencephalogram signal processing and classification, and particularly relates to a small sample electroencephalogram signal classification method for epilepsy monitoring. BACKGROUND

[0002] The electroencephalogram activity of epilepsy patients can be divided into four stages: pre-seizure stage, seizure stage, post-seizure stage and interictal stage. Among them, the core goal of seizure prediction is to accurately identify the characteristics of the pre-seizure stage from the electroencephalogram, and seizure detection focuses on extracting the characteristics of the seizure stage. Therefore, the epilepsy monitoring task that integrates seizure prediction and seizure detection is essentially a four-classification problem. Since the time of seizures is not fixed and each seizure lasts for a short time, compared with the other three periods, the seizure stage data available for training in the data set is less. If all non-seizure stage data is used together with the seizure stage data for training to achieve the four-classification task, the model training effect will be poor due to the imbalance of the training data. If the data amount of the pre-stage, inter-stage and post-stage is reduced to the same level as the seizure stage, since the sample characteristics of these stages are highly similar, the reduction of the sample number will affect the classification effect. To solve this problem, many researchers use oversampling technology. When slicing and sampling the original electroencephalogram signal, the number of seizure stage samples is expanded by using the method of partially overlapping adjacent samples, so that the number of samples of the seizure stage is relatively balanced with the samples of other stages. However, this method may lead to the same fragments being contained in different samples. If the samples containing the same fragments are respectively divided into the training set and the test set, the accuracy of the model will be artificially high, which will lead to the model performing poorly when encountering new, unseen data on the test set, and the learning effect of the model cannot be objectively evaluated. In addition, some researchers use a generative adversarial network (GAN) to expand the seizure stage data. Although this method can increase the number of seizure stage samples, data expansion will increase the training time and the consumption of computing resources. If the data expansion strategy is not properly selected, the model may also appear overfitting.

[0003] GCN is a network model that can extract the spatial features of topological graphs. Existing research has explored the spatial structure relationship of electroencephalogram signals based on graph convolution network (GCN). Some research based on GCN method explores the spatial structure relationship of electroencephalogram signals, and 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. Some researchers use the Pearson correlation matrix of the original electroencephalogram signal to construct the input graph of the graph neural network, in which the matrix coefficients simulate the spatial relationship in the electroencephalogram signal. Although these methods enhance the understanding of the topological structure between electrodes, a single indicator is difficult to comprehensively describe the complex brain network, thereby affecting the accuracy of the model.

[0004] In order to enable the model to be applied to the wearable device at the edge, the amount of calculation of the network model needs to be reduced, and some researchers adopt a voting mechanism to output the classification result with the most votes by majority voting on multiple consecutive classification results. However, the equal-weight voting method and the non-voting method have a problem of large response delay at the onset boundary position. Specifically, when the sampling window just enters the onset period range, the proportion of the onset period in the sample is small, and it is at a disadvantage in the equal-weight voting. Only when the proportion of the onset period in the sample is more than half, can it dominate in the voting. This leads to a large response delay of the network at the onset boundary, affecting the timely rescue of family members and doctors. SUMMARY

[0005] In view of the shortcomings of the prior art, the present application provides a small sample electroencephalogram classification method for epilepsy monitoring, which greatly improves the detection response speed of the seizure period and improves the classification accuracy of the non-seizure period by combining the two-classification and three-classification network and the conditional weighted voting algorithm.

[0006] To achieve the above object, the present application provides the following technical scheme:

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

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

[0009] Step S2: obtaining an epilepsy electroencephalogram sample, inputting the epilepsy electroencephalogram sample into the shared network layer, extracting features of the epilepsy electroencephalogram sample, and capturing complex features of the epilepsy electroencephalogram;

[0010] Step S3: inputting the extracted complex features of the epilepsy electroencephalogram into the epilepsy four-classification fusion model, and outputting an electroencephalogram classification result;

[0011] Step S4: using a conditional weighted voting algorithm to weight the electroencephalogram classification result, and outputting a voting result.

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

[0013] Step S201: obtaining an epilepsy electroencephalogram sample, constructing the epilepsy electroencephalogram sample into a graph structure, each node in the graph corresponding to an electrode channel, the relationship between the nodes in the graph being represented by an adjacency matrix, using a graph convolutional neural network for convolution operation, capturing the topological structure and mutual correlation between different channels in the epilepsy electroencephalogram, and obtaining a feature matrix of the epilepsy electroencephalogram;

[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. The specific steps for calculating the adjacency matrix are:

[0017] Step S2011: Set N epileptic EEG signal channels, each channel contains data of 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 t-th time point of the channel, 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 i-th 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, Pearson correlation coefficient and Euclidean distance between each pair of channels of the epileptic EEG signal, three adjacency matrices are constructed. The specific formula is:

[0022]

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

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

[0025] Step S2014: According to the three constructed adjacency matrices, a comprehensive adjacency matrix is calculated, and the specific formula is:

[0026]

[0027] wherein, A i ' j denotes the comprehensive adjacency matrix, κ1, κ2 and κ3 denote weight parameters, which can be adjusted through cross-validation or other methods;

[0028] Step S2015: The comprehensive adjacency matrix is normalized, and the specific formula is:

[0029]

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

[0031] Step S2016: A threshold τ is set, and the normalized comprehensive adjacency matrix is binarized or weighted, and the specific formula is:

[0032]

[0033] wherein, denotes the binarized adjacency matrix, denotes the weighted adjacency matrix, and ι denotes a weight.

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

[0035] Step S301: First, the complex features of the extracted epilepsy electroencephalogram are input into a binary classification subnetwork, an LSTM model is used to process the complex features of the epilepsy electroencephalogram, and finally a full connection layer is used for binary classification output.

[0036] Step S302: the binary classification output result is the seizure period and the non-seizure period, and when the binary classification output result is the seizure period, the output result is directly outputted;

[0037] Step S303: when the binary classification output result is the non-seizure period, the binary classification output result of the epilepsy electroencephalogram signal in the non-seizure period is inputted into the three-classification sub-network, the time sequence features are processed through the LSTM, and finally the three-classification output result is outputted through the full connection layer of the three-classification, the three-classification output result is the pre-seizure period, the interictal period and the post-seizure period.

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

[0039] Step S401: judging whether the single window output result y t of the binary classification sub-network at the time t is the seizure period, if yes, judging whether the single window reasoning results Z t-1 and Z t-2 at the time t-1 and t-2 are the pre-seizure period;

[0040] Step S402: if the times t-1 and t-2 are the pre-seizure period, setting the voting weight w t of the time t as: wherein, Pictal represents the probability that the single window output of the binary classification sub-network at the time t is the seizure period, and the voting weights w t-2 and w t-1 of the times t-2 and t-1 are both set as 1;

[0041] Step S403: when the single window output result y t of the binary classification sub-network at the time t is the non-seizure period, setting the weight values w t , w t-1 and w t-2 of the three windows at the times t, t-1 and t-2 as 1, and voting the output results y t-2 to y t of the binary classification sub-network;

[0042] Step S404: determining the final output r t of the binary classification sub-network according to the voting result, if the voting result r t is the seizure period, the final output of the epilepsy four-classification fusion model is also the seizure period, otherwise, the voting result o t of the three-classification model is taken as the final output of the model.

[0043] A small sample electroencephalogram signal classification system for epilepsy monitoring, used for implementing the small sample electroencephalogram signal classification method for epilepsy monitoring, comprising a model construction module, a feature extraction module, a classification module and a voting module.

[0044] The model construction module is configured to construct a four-class epilepsy fusion model, which comprises a shared network layer, a two-class sub-network layer and a three-class sub-network layer.

[0045] The feature extraction module is configured to acquire epilepsy electroencephalogram samples, extract features of the epilepsy electroencephalogram samples, and capture complex features of the epilepsy electroencephalogram.

[0046] The classification module is configured to input the extracted complex features of the epilepsy electroencephalogram into the four-class epilepsy fusion model, and output an electroencephalogram classification result.

[0047] The voting module is configured to perform weighted voting on the electroencephalogram classification result by using a conditional weighted voting algorithm, and output a voting result.

[0048] Specifically, the feature extraction module comprises a feature matrix extraction unit, an attention mechanism unit and a preliminary feature extraction unit.

[0049] The feature matrix extraction unit is configured to extract a feature matrix of the epilepsy electroencephalogram by using a graph convolutional neural network graph.

[0050] The attention mechanism unit is configured to dynamically adjust the weights of each channel in the epilepsy electroencephalogram by using an attention mechanism.

[0051] The preliminary feature extraction unit is configured to extract preliminary features of the epilepsy electroencephalogram by using a one-dimensional convolutional neural network.

[0052] Specifically, the classification module comprises a two-class unit and a three-class unit.

[0053] The two-class unit is configured to input the extracted complex features of the epilepsy electroencephalogram into a two-class sub-network, and obtain a two-class output result.

[0054] The three-class unit is configured to input the epilepsy electroencephalogram with a two-class output result of a non-seizure period into a three-class sub-network, and obtain a three-class output result.

[0055] Compared with the prior art, the present application has the following advantages:

[0056] 1. The present application proposes a small sample electroencephalogram classification method for epilepsy monitoring. The four-class epilepsy fusion model architecture considers the differences in data features and data quantities in different periods. By splitting the four-class task into two-class and three-class, the model can maintain good learning effect even in the case of small sample of seizure period.

[0057] 2. The application provides a small sample electroencephalogram signal classification method for epilepsy monitoring, compared with a traditional equal weight voting mechanism, the conditional weighted voting algorithm can make the window at t time occupy a dominant position in voting when the seizure period sample is just sampled, so as to improve the response speed of the model.

[0058] 3. The application provides a small sample electroencephalogram signal classification method for epilepsy monitoring, compared with a traditional single index graph construction method, the graph construction method of fusing Euclidean distance, Pearson correlation coefficient and Spearman correlation coefficient can more comprehensively reflect the complex relationship between different electrode channels of electroencephalogram signals, so that the network model can extract deeper data features. BRIEF DESCRIPTION OF DRAWINGS

[0059] Figure 1 A small sample electroencephalogram signal classification method for epilepsy monitoring is provided for the application, and a flowchart is shown in the figure;

[0060] Figure 2 A conditional voting flowchart is provided for the application;

[0061] Figure 3 A small sample electroencephalogram signal classification system architecture diagram for epilepsy monitoring is provided for the application. DETAILED DESCRIPTION

[0062] In order to make the technical means, creative features, purposes and effects realized by the application easy to understand, in the description of the application, it should be pointed out that the orientation or position relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" and the like is based on the orientation or position relationship shown in the drawings, and is only for the convenience of describing the application and simplifying the description, and therefore cannot be understood as indicating or implying that the devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the application. In addition, the terms "No. 1", "No. 2" and "No. 3" are only for the purpose of description, and cannot be understood as indicating or implying relative importance. The application will be further described below in conjunction with the specific embodiments.

[0063] Embodiment 1

[0064] Please refer to Figure 1 An embodiment provided by the application is a small sample electroencephalogram signal classification method for epilepsy monitoring, which comprises the following specific steps:

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

[0066] Step S2: Obtain the epilepsy electroencephalogram signal sample, input the epilepsy electroencephalogram signal sample to the shared network layer, and perform feature extraction on the epilepsy electroencephalogram signal sample to capture the complex features of the epilepsy electroencephalogram signal.

[0067] The specific steps of step S2 are:

[0068] Step S201: Obtain the epilepsy electroencephalogram signal sample, and construct the epilepsy electroencephalogram signal sample into a graph structure, where each node in the graph corresponds to an electrode channel, and the relationship between the nodes in the graph is represented by an adjacency matrix. A graph convolutional neural network is used for convolution operation to capture the topological structure and mutual correlation between different channels in the epilepsy electroencephalogram signal, and a feature matrix of the epilepsy electroencephalogram signal is obtained.

[0069] Step S202: Use an attention mechanism to dynamically adjust the weights of each channel in the epilepsy electroencephalogram signal to obtain an adjusted epilepsy electroencephalogram signal feature matrix.

[0070] Step S203: Input the adjusted epilepsy electroencephalogram signal feature matrix into a one-dimensional convolutional neural network (1D-CNN) to compress and extract the time series feature matrix, and obtain the preliminary features of the epilepsy electroencephalogram 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 the channels of the electroencephalogram signal, each node corresponds to an electrode channel, and the connection relationship between the nodes is represented by an adjacency matrix. The purpose of the graph convolutional neural network (GCN) is to perform convolution operation on this graph structure to capture the topological structure and mutual correlation between different channels in the electroencephalogram signal.

[0072] The channel attention mechanism is used to enhance the importance of certain channels in the electroencephalogram signal. In practical applications, different electrode channels have different contributions to the seizure. The channel attention mechanism can dynamically adjust the weights of each channel by learning the importance distribution of each channel to enhance the influence of electrode channels that are sensitive to seizures.

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

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

[0075] Step S2011: Set N epileptic EEG signal channels, each channel contains data of 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 t-th time point of the channel, 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 i-th 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, Pearson correlation coefficient and 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] wherein A i ' j denotes the comprehensive adjacency matrix, and κ1, κ2 and κ3 denote weight parameters, which can be adjusted through cross-validation or other methods;

[0085] Step S2015: Normalizing the comprehensive adjacency matrix, and the specific formula is:

[0086]

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

[0088] Step S2016: Setting a threshold τ, and binarizing or weighting the normalized comprehensive adjacency matrix, and the specific formula is:

[0089]

[0090] wherein, denotes the binarized adjacency matrix, denotes the weighted adjacency matrix, and ι denotes a weight, which can be adjusted through cross-validation or other methods.

[0091] Step S3: Inputting the extracted complex features of the epilepsy electroencephalogram into the epilepsy four-classification fusion model to output an electroencephalogram classification result;

[0092] The specific steps of step S3 are as follows:

[0093] Step S301: First, inputting the extracted complex features of the epilepsy electroencephalogram into a binary classification subnetwork, using an LSTM model to process the complex features of the epilepsy electroencephalogram, and finally outputting a binary classification result through a full connection layer;

[0094] Step S302: The binary classification output result is a seizure period and a non-seizure period, and when the binary classification output result is the seizure period, the result is directly outputted;

[0095] Step S303: When the binary classification output result is the non-seizure period, the epilepsy electroencephalogram with the binary classification output result of the non-seizure period is inputted into a three-classification subnetwork, the time sequence features are processed through an LSTM, and finally a three-classification full connection layer is outputted, and the three-classification output result is a pre-seizure period, an interictal period and a postictal period.

[0096] In this embodiment, due to the scarcity of onset period samples, directly using a four-classification model will lead to unbalanced training. Compared with the samples of three non-onset period classes, the characteristics of the onset period are obvious, and a small amount of data can be used to train the onset period and non-onset period to achieve a high classification accuracy. However, the characteristics of other periods are similar, and more data is needed to train 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 onset period and the non-onset period, and the three-classification subnetwork is used to distinguish between the pre-onset period, the inter-onset period and the post-onset period. When the two-classification subnetwork outputs the onset period, the result is directly output; when the two-classification subnetwork outputs the non-onset period, the three-classification result is output. In practical application, if the output result of the model is the pre-onset period, the patient is reminded to transfer to a safe environment in advance; if the output result of the model is the onset period, the patient's family is contacted automatically for help.

[0097] Step S4: using the conditional weighted voting algorithm to weight the classification results of the electroencephalogram signals, and outputting the voting results.

[0098] The specific steps of step S4 are as follows:

[0099] Step S401: judging whether the single window output result y t of the two-classification subnetwork at time t is the onset period, if yes, judging whether the single window reasoning results Z t-1 and Z t-2 at times t-1 and t-2 are both the pre-onset period;

[0100] Step S402: if times t-1 and t-2 are both the pre-onset period, setting the voting weight w t of time t as: wherein Pictal represents the probability that the single window output of the two-classification subnetwork at time t is the onset period, and the voting weights w t-2 and w t-1 of times t-2 and t-1 are both 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 in voting when the onset period sample is just sampled, that is, when the single window reasoning result of the two-classification subnetwork at time t is the onset period, the system will respond immediately without waiting for the reasoning result at time t-1 to be the onset period, which significantly shortens the response time of the onset period.

[0102] Step S403: when the single window output result y t of the two-classification subnetwork at time t is the non-onset period, setting the weight values w t , w t-1 and w t-2 of the three windows at times t, t-1 and t-2 to 1, and outputting the output result y t-2 of the two-classification subnetwork to yt voting;

[0103] Step S404: determining the final output r of the binary classification sub-network according to the voting result t If the voting result r t If the seizure period, the final output of the epilepsy four-classification fusion model is also the seizure period, otherwise, the voting result o t The final output of the model is taken as the final output of the model.

[0104] Embodiment 2

[0105] Please refer to Figure 2 Another embodiment provided by the present application is a small sample electroencephalogram classification system for epilepsy monitoring, comprising a model construction module, a feature extraction module, a classification module and a voting module.

[0106] The model construction module is configured to construct an epilepsy four-classification fusion model, comprising a shared network layer, a binary classification sub-network layer and a three-classification sub-network layer.

[0107] The feature extraction module is configured to obtain epilepsy electroencephalogram samples, extract features of the epilepsy electroencephalogram samples, and capture complex features of the epilepsy electroencephalogram.

[0108] The classification module is configured to input the extracted complex features of the epilepsy electroencephalogram into the epilepsy four-classification fusion model, and output an electroencephalogram classification result.

[0109] The voting module is configured to use a conditional weighted voting algorithm to perform weighted voting on the electroencephalogram classification result, and output a voting result.

[0110] The feature extraction module comprises a feature matrix extraction unit, an attention mechanism unit and a preliminary feature extraction unit.

[0111] The feature matrix extraction unit is configured to extract a feature matrix of the epilepsy electroencephalogram using a graph convolutional neural network.

[0112] The attention mechanism unit is configured to dynamically adjust the weights of each channel in the epilepsy electroencephalogram using an attention mechanism.

[0113] The preliminary feature extraction unit is configured to extract preliminary features of the epilepsy electroencephalogram using a one-dimensional convolutional neural network.

[0114] The classification module comprises a binary classification unit and a three-classification unit.

[0115] The binary classification unit is configured to input the extracted complex features of the epilepsy electroencephalogram into a binary classification sub-network, and obtain a binary classification output result.

[0116] The three-classification unit is configured to input the two-classification output result of the epilepsy electroencephalogram signal in a non-seizure stage into a three-classification sub-network to obtain a three-classification output result.

[0117] In addition, the part of the above technical solutions in the embodiments of the present application that is consistent with the implementation principle of the corresponding technical solutions in the prior art is not described in detail to avoid excessive repetition.

[0118] The specific embodiments described above further illustrate the objects, technical solutions, and advantages of the present application. It should be understood that the above description is merely a specific embodiment of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A small sample electroencephalogram signal classification method for epilepsy monitoring, characterized in that, The method comprises the following specific steps: Step S1: constructing an epilepsy four-classification fusion model, comprising: a shared network layer, a two-classification sub-network layer and a three-classification sub-network layer; Step S2: acquiring an epilepsy electroencephalogram signal sample, inputting the epilepsy electroencephalogram signal sample into the shared network layer, and performing feature extraction on the epilepsy electroencephalogram signal sample to capture complex features of the epilepsy electroencephalogram signal; Step S3: inputting the extracted complex features of the epilepsy electroencephalogram signal into the epilepsy four-classification fusion model, and outputting an electroencephalogram signal classification result; Step S4: performing weighted voting on the electroencephalogram signal classification result by using a conditional weighted voting algorithm, and outputting a voting result; The relationship between the nodes in the graph in step S201 is represented by an adjacency matrix, and the specific steps for calculating the adjacency matrix are as follows: Step S211: Set N epileptic EEG signal channels, each channel contains data of 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: calculating the Spearman correlation coefficient, Pearson correlation coefficient and Euclidean distance between each pair of channels of the epilepsy electroencephalogram signal, and the specific formula is as follows: , , , 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 t-th time point of the channel, 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 i-th 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, Pearson correlation coefficient and Euclidean distance between each pair of channels of the epilepsy electroencephalogram signal, three adjacency matrices are constructed, and the specific formula is as follows: , , , wherein, denotes the Spearman adjacency matrix, denotes the Pearson adjacency matrix, denotes the Euclidean adjacency matrix, denotes the absolute value function, exp() denotes the exponential function, denotes a tuning parameter, typically chosen according to the data distribution, The relationship between the nodes in the graph in step S201 is represented by an adjacency matrix, and the specific steps for calculating the adjacency matrix further comprise: Step S2014: calculating a comprehensive adjacency matrix according to the three constructed adjacency matrices, and the specific formula is as follows: , wherein, denotes the comprehensive adjacency matrix, , and denotes the weight parameter, which can be adjusted by cross-validation or other methods; Step S2015: performing normalization processing on the comprehensive adjacency matrix, and the specific formula is as follows: , wherein, represents a normalized comprehensive adjacency matrix, D represents a degree matrix, ; Step S2016: setting a threshold value The normalized integrated adjacency matrix is binarized or weighted, and the specific formula is: , , wherein, denotes the binarized adjacency matrix, denotes the weighted adjacency matrix, denotes the weight; The specific steps of step S3 are as follows: Step S301: first input the extracted complex features of the epilepsy electroencephalogram signal into the two-classification sub-network, use the LSTM model to process the complex features of the epilepsy electroencephalogram signal, and finally output the two-classification result through the full connection layer; Step S302: the two-classification output result is the epilepsy seizure period and the epilepsy non-seizure period, when the two-classification output result is the epilepsy seizure period, the result is directly outputted; Step S303: when the two-classification output result is the epilepsy non-seizure period, the epilepsy electroencephalogram signal with the two-classification output result of the epilepsy non-seizure period is inputted into the three-classification sub-network, the time sequence features are processed through the LSTM, and finally the three-classification output result is outputted through the three-classification full connection layer, and the three-classification output result is the epilepsy pre-seizure period, the interictal period and the postictal period.

2. The small sample EEG signal classification method for epilepsy monitoring according to claim 1, wherein, The specific steps of step S2 are as follows: Step S201: acquiring an epilepsy electroencephalogram signal sample, constructing the epilepsy electroencephalogram signal sample 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 for convolution operation to capture the topological structure and mutual correlation between different channels in the epilepsy electroencephalogram signal, and a feature matrix of the epilepsy electroencephalogram signal is obtained; Step S202: using an attention mechanism to dynamically adjust the weights of each channel in the epilepsy electroencephalogram signal, and obtaining an adjusted epilepsy electroencephalogram signal feature matrix; Step S203: inputting the adjusted epilepsy electroencephalogram signal feature matrix into a one-dimensional convolutional neural network to compress and extract the time sequence feature matrix, and obtaining preliminary features of the epilepsy electroencephalogram signal.

3. The small sample EEG signal classification method for epilepsy monitoring according to claim 2, wherein, The specific steps of step S4 are as follows: Step S401: judging the single-window output result y of the binary classification sub-network at time t t whether it is the onset period, if yes, judging whether the single-window reasoning results Z at time t-1 and t-2 are t-1 and Z t-2 both are pre-onset periods; Step S402: If both t-1 and t-2 moments are pre-ictal, the voting weight w t is set as: where Pictal represents the probability that the t moment binary classification sub-network single window output is ictal, and the voting weights w t-2 and w t-1 are both set to 1; Step S403: When the binary classification sub-network outputs results y t For non-onset period, the weight values w t , w t-1 and w t-2 of the three windows at time t, t-1 and t-2 are all set to 1, and the output results y t-2 to y t of the binary classification sub-network are voted. Step S404: determining the final output r of the binary classification sub-network according to the voting result t If the voting result r t For the onset period, the final output of the epilepsy four-classification fusion model is also the onset period, otherwise, the voting result o t will be the final output of the model.

4. A small sample EEG signal classification system for epilepsy monitoring, for implementing the small sample EEG signal classification method for epilepsy monitoring according to any one of claims 1-3, characterized in that, It comprises: a model construction module, a feature extraction module, a classification module and a voting module; The model construction module is configured to construct a four-class epilepsy fusion model, including a shared network layer, a two-class sub-network layer, and a three-class sub-network layer. The feature extraction module is configured to acquire an epilepsy electroencephalogram signal sample, extract features of the epilepsy electroencephalogram signal sample, and capture complex features of the epilepsy electroencephalogram signal. The classification module is configured to input the extracted complex features of the epilepsy electroencephalogram signal into the four-class epilepsy fusion model, and output an electroencephalogram signal classification result. The voting module is configured to perform weighted voting on the electroencephalogram signal classification result by using a conditional weighted voting algorithm, and output a voting result.

5. A small sample electroencephalogram signal classification system for epilepsy monitoring as claimed in claim 4, wherein, 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 is configured to extract a feature matrix of the epilepsy electroencephalogram signal by using a graph convolutional neural network graph. The attention mechanism unit is configured to dynamically adjust weights of each channel in the epilepsy electroencephalogram signal by using an attention mechanism. The preliminary feature extraction unit is configured to extract preliminary features of the epilepsy electroencephalogram signal by using a one-dimensional convolutional neural network.

6. A small sample electroencephalogram signal classification system for epilepsy monitoring as claimed in claim 5, wherein, The classification module includes a two-class unit and a three-class unit. The two-class unit is configured to input the extracted complex features of the epilepsy electroencephalogram signal into a two-class sub-network, and obtain a two-class output result. The three-class unit is configured to input the epilepsy electroencephalogram signal of which the two-class output result is a non-seizure period into a three-class sub-network, and obtain a three-class 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