Multi-channel electroencephalogram signal classification method and system for resource-constrained scene

By combining the shallow network of one-dimensional convolution and gated cyclic units, multi-channel EEG signal feature extraction, and using channel selection algorithm and fixed-point quantization technology, the calculation complexity and power consumption problems of multi-channel EEG signal processing in resource-constrained devices are solved, achieving efficient prediction accuracy and low resource occupation.

CN120078430AActive Publication Date: 2025-06-03BEIJING SONGGUO BRAIN MACHINE TECHNOLOGY CO LTD

Patent Information

Application Number
CN202510250234.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-06-03
Estimated Expiration
2045-03-04

AI Technical Summary

Technical Problem

In the multi-channel EEG signal processing, it is difficult to significantly reduce the computational complexity and power consumption while ensuring processing accuracy, and it is difficult to adapt to the application scenarios of resource-constrained devices.

Method used

A shallow network of one-dimensional convolution and gated cyclic units is used to extract the spatial and temporal features of multi-channel EEG signals, and the input data dimension is reduced through a channel selection algorithm based on the redundancy and information between channels, and finally the resource demand is reduced through fixed-point quantization.

Benefits of technology

While maintaining high prediction accuracy, it significantly reduces model complexity and resource utilization, making it more suitable for resource-constrained devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120078430A_ABST
    Figure CN120078430A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-channel electroencephalogram signal classification method and system oriented to a resource-constrained scene, and belongs to the technical field of resource-constrained calculation, electroencephalogram signal processing and deep learning, and the method comprises the following steps: preprocessing multi-channel original electroencephalogram data, then selecting the multi-channel electroencephalogram data, constructing a lightweight classification model based on 1DCNN and GRU, and classifying the multi-channel electroencephalogram data into a multi-channel electroencephalogram signal; performing feature extraction and corresponding classification tasks on the selected multi-channel electroencephalogram data, finally storing learnable parameters obtained by training a classification model on an MATLAB platform, and performing fixed-point quantification on the parameters, thereby further reducing the storage requirements of the model and improving the calculation efficiency; the invention further provides a system, equipment and a medium which are used for implementing the method. According to the method, the model complexity is remarkably reduced while high prediction accuracy is kept, resource and space occupation is reduced, and the method is more suitable for resource-limited equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical fields of resource-constrained computing, electroencephalogram (EEG) signal processing, and deep learning, and particularly relates to a multi-channel EEG signal classification method and system for resource-constrained scenarios. Background Art

[0002] In modern neuroscience research and clinical applications, multi-channel EEG signal processing technology has been attracting increasing attention. Electroencephalogram (EEG), as a method capable of reflecting the electrical activity of the brain in real time, is widely used in multiple fields such as epilepsy prediction, emotion detection, and sleep classification. Multi-channel EEG signal processing technology has shown broad application potential in multiple fields. In terms of epilepsy prediction, this technology can effectively predict before a patient has an epileptic seizure by analyzing specific patterns and features in EEG signals, and relevant treatment measures can be taken immediately to intervene in the patient's disease attack. Emotion detection is also one of its important applications. By real-time monitoring and analyzing EEG signals, individual emotion changes can be accurately captured, bringing new breakthroughs to fields such as mental health assessment, emotion regulation intervention, and human-computer interaction. In addition, in sleep classification research, multi-channel EEG signal processing helps to accurately divide different sleep stages, providing a scientific basis for the diagnosis and treatment of sleep disorders.

[0003] With the continuous progress of artificial intelligence technology, deep learning methods have gradually emerged in the field of EEG signal-based classification. Deep learning models can automatically learn effective features from a large amount of data, thereby achieving higher prediction accuracy and a wider application range. Many researchers have explored deep learning-based classification methods, and these methods have shown excellent performance in experiments.

[0004] Although in many current studies, deep learning algorithms have achieved remarkable results in epilepsy prediction accuracy, with the development of wearable devices and mobile medical technologies, the demand for lightweight multi-channel EEG signal processing methods for resource-constrained application scenarios is increasing day by day. Such methods not only need to significantly reduce computational complexity and power consumption on the premise of ensuring processing accuracy, but also need to be able to effectively extract important features in EEG signals to meet the requirements of real-time monitoring and analysis.

[0005] Yuan Zhang et al. disclosed a method for epileptic seizure prediction based on common spatial pattern (CSP) and CNN (Yuan Zhang, Yao Guo, Po Yang, Wei Chen, and Benny Lo. "Epilepsy Seizure Prediction on EEG Using Common Spatial Pattern and Convolutional Neural Network.", IEEE journal of biomedical and health informatics 24.2 (2019): 465 - 474.). They designed a feature extractor based on wavelet packet decomposition and CSP to extract features in the time domain and frequency domain respectively, and then used a shallow CNN to classify the interictal and pre - seizure states. Kostas M. Tsiouris et al. disclosed "A Long Short - Term Memory Deep Learning Network for the Prediction of Epileptic Seizures Using EEG Signals" (Kostas M. Tsiouris, Vasileios C. Pezoulas, Michalis Zervakis, Spiros Konitsiotis, Dimitrios D. Koutsouris, and Dimitrios Fotiadis. "A Long Short - Term Memory Deep Learning Network for the Prediction of Epileptic Seizures Using EEG Signals", Computers in Biology and Medicine 99 (2018): 24 - 37.). They first introduced the long short - term memory (LSTM) network into epileptic seizure prediction using electroencephalogram (EEG) signals. This study extracted a wide range of features before classification, including time - domain, frequency - domain features, as well as EEG signal channel correlations and graph - theoretic features, and tested the prediction performance of the network under different pre - seizure windows.

[0006] Although the above studies have achieved excellent classification performance in the epileptic prediction and classification tasks based on EEG signals, due to their reliance on complex deep - learning models, these models require a large amount of computing resources and storage space when processing multi - channel data, which is contrary to the application scenario requirements of resource - constrained devices. Summary of the Invention

[0007] To overcome the shortcomings of the above-mentioned existing technologies, the purpose of the present invention is to provide a multi-channel electroencephalogram (EEG) signal classification method and system for resource-constrained scenarios. By combining a shallow network of one-dimensional convolution and gated recurrent unit to extract the spatial and temporal features of multi-channel EEG signals, and through a channel selection algorithm based on the criteria of minimizing inter-channel redundancy and maximizing the information content and classification accuracy of the subject's EEG data, the dimension of the input data is reduced. Finally, by performing fixed-point quantization on the network learning parameters, the resource requirements are reduced. While maintaining a high prediction accuracy, the model complexity is significantly reduced, the resource and space occupancy are reduced, making it more suitable for resource-constrained devices.

[0008] To achieve the above purpose, the technical solution adopted by the present invention is as follows:

[0009] A multi-channel EEG signal classification method for resource-constrained scenarios, comprising the following steps:

[0010] Step 1, preprocess the multi-channel raw EEG data;

[0011] The preprocessing includes band-pass filtering and data standardization;

[0012] Band-pass filtering: Use a band-pass filter to filter the multi-channel raw EEG data to remove low-frequency drift and high-frequency noise;

[0013] Data standardization: Perform standardization processing on the filtered multi-channel EEG data to accelerate model training and improve performance;

[0014] Step 2, perform channel selection on the multi-channel EEG data preprocessed in Step 1, reduce the model input dimension while maintaining the classification accuracy, and reduce the model parameter quantity to adapt to the resource-constrained application scenario;

[0015] Step 3, construct a lightweight classification model based on a one-dimensional convolutional neural network (1DCNN) and a gated recurrent unit (GRU), and combine spatio-temporal features to perform feature extraction and corresponding classification tasks on the multi-channel EEG data selected in Step 2;

[0016] Step 4, train the lightweight classification model constructed in Step 3 on the MATLAB platform to obtain learnable parameters. The learnable parameters are stored in the form of 32-bit floating-point numbers conforming to the IEEE 754 standard, and perform fixed-point quantization on them to adapt to the resource-constrained scenario, further reduce the storage requirements of the model, improve the calculation efficiency. By statistically analyzing the learnable parameters, the maximum absolute value of the parameter values is obtained, so as to determine the required number of integer bits, and then by gradually reducing the number of decimal bits until the model performance shows a significant decline to determine the number of decimal bits.

[0017] The said Step 1 includes:

[0018] The original EEG data is filtered in the corresponding frequency band using a Butterworth band-pass filter to remove low-frequency drift and high-frequency noise. Then, according to the actual classification task, the filtered multi-channel EEG data is segmented and sliced by selecting a time window and a step size. After the slicing process, Z-score normalization is used to further process the sliced data. The mathematical expression is as follows:

[0019]

[0020] where \(x\) is the sample value in a slice of data, and \(\mu\) and \(\sigma\) represent the mean and standard deviation of the samples in this slice, respectively.

[0021] Step 2 includes:

[0022] First, calculate the entropy-variance product of the EEG signal for each channel to evaluate the information content of the channel. The variance reflects the degree of signal fluctuation, and the entropy reflects the uncertainty of the signal. Channels with higher product values have higher information content. For the entropy-variance product of channel \(i\), the calculation formula is as follows:

[0023]

[0024] where \(X\) ik is the \(k\)-th sample data value of channel \(i\), is the sample mean of channel \(i\), \(m\) is the number of samples in channel \(i\), and \(p\) ik is the probability distribution of the \(k\)-th sample in channel \(i\);

[0025] Next, calculate the average correlation coefficient between all EEG signal channels. Channels with higher average correlation have more redundant information with other channels. When the EEG data contains \(n\) channels and each channel contains \(m\) samples, first calculate the covariance matrix. The formula is as follows:

[0026]

[0027] where \(C\) ij represents the covariance between channel \(i\) and channel \(j\), \(X\) ik and \(X\) jk are the values of the \(k\)-th sample of channel \(i\) and channel \(j\), and are the means of channel \(i\) and channel \(j\) respectively;

[0028] Then, calculate the correlation coefficient matrix by dividing each element of the covariance matrix by the product of the standard deviations of the corresponding channels. \(R\) ij represents the correlation coefficient between channel \(i\) and channel \(j\). The formula is as follows:

[0029]

[0030] Among them, and are the square roots of the diagonal elements of the covariance matrix, representing the standard deviations of the corresponding channels;

[0031] Then, for each channel i, calculate its average correlation coefficient MeanCorr with all other channels i , excluding the correlation of the channel itself:

[0032]

[0033] Among them, R ij is the correlation coefficient between channels i and j, n is the total number of channels, and i≠j means excluding the correlation of channel i itself;

[0034] Finally, for the entropy-variance product sum and average correlation coefficient of the n channels calculated according to the above formula, comprehensive scoring is performed. First, Min-Max normalization processing is performed on these two indicators of channel i respectively, and their numerical ranges are scaled to the interval [0,1] to make them comparable. The normalized value meanCorrNorm of the average correlation of channel i i and the normalized value MulNorm of the entropy-variance product i are calculated as follows:

[0035]

[0036] Among them, min and max represent the minimum and maximum values of the average correlation and entropy-variance product among the n channels respectively; then, the normalized information quantity index of channel i and the inverted average correlation index are calculated using a weighted linear combination method to obtain a comprehensive score for each channel, and its correlation coefficient is given a negative weight; for the comprehensive score Score i of channel i, the calculation formula is:

[0037] Score i = weightMul×MulNorm i - weightmeanCorr×meanCorrNorm i ;

[0038] i = 1, 2,..., n;

[0039] Among them, weightMul and weightmeanCorr are the weights of the entropy-variance product and average correlation index respectively, and the values of the weights are adjusted according to different emphases, but it is required that weightMul + weightmeanCorr = 1;

[0040] According to the comprehensive scores of the last different channels, sort these n channels in descending order. Then, starting from the first channel, gradually increase the number of channels to construct a training dataset and feed it into the prediction network. Search and select the optimal channel combination based on the "prediction accuracy".

[0041] Step 3 described above includes:

[0042] First, use a 1DCNN network to extract the spatial features of the EEG signals. The 1DCNN network includes: an input layer, a one-dimensional convolutional layer, a batch normalization layer, a max pooling layer, an activation function, and a Flatten layer;

[0043] The input layer is used to receive the preprocessed EEG data;

[0044] The one-dimensional convolutional layer performs convolutional operations on the multi-channel EEG signals to extract the local spatial features between different channels. This layer contains multiple convolutional kernels, and the size and stride of the convolutional kernels are adjusted according to the specific task and the characteristics of the dataset;

[0045] The batch normalization layer accelerates the model convergence and improves the model generalization ability;

[0046] The max pooling layer, whose window size and stride also need to be selected according to the size of the feature map, reduces the dimension of the feature map and extracts the significant features;

[0047] The activation function is ReLU, which introduces non-linearity to enable the model to learn more complex features;

[0048] The Flatten layer flattens the multi-dimensional feature map into a one-dimensional vector;

[0049] Then use GRU units to extract the temporal features of the EEG signals and capture the long-term dependencies in the time series; the number of hidden units and the dropout rate of the GRU units should be selected according to the complexity of the task and the size of the dataset to prevent overfitting;

[0050] Finally, use a fully connected layer and a softmax classifier to output the probabilities of each class and complete the classification task.

[0051] The fixed-point quantization described in step 4 includes:

[0052] First, perform statistical analysis on all the learnable parameters of the model to determine the maximum absolute value of the parameter values. According to the maximum absolute value of the learnable parameters, determine the required number of integer bits. Then select an initial number of fractional bits, and gradually reduce the number of fractional bits and evaluate the performance of the quantized models with different numbers of fractional bits. Compare the performance of the model before and after quantization on the validation set until the model performance shows a significant decline, so as to determine a number of fractional bits that balances performance and resources.

[0053] A multi-channel electroencephalogram (EEG) signal classification system for resource-constrained scenarios, comprising:

[0054] A preprocessing module that preprocesses multi-channel raw EEG data, including band-pass filtering and data normalization; Band-pass filtering: Use a band-pass filter to filter the multi-channel raw EEG data to remove low-frequency drift and high-frequency noise; Data normalization: Perform normalization processing on the filtered multi-channel EEG data to accelerate model training and improve performance;

[0055] A channel selection module that selects channels from the preprocessed multi-channel EEG data, reduces the input dimension of the model while maintaining classification accuracy, and reduces the number of model parameters to adapt to resource-constrained application scenarios;

[0056] A network construction module that constructs a lightweight classification model based on a one-dimensional convolutional neural network (1DCNN) and a gated recurrent unit (GRU), combines spatio-temporal features, and performs feature extraction and corresponding classification tasks on the selected multi-channel EEG data;

[0057] A model quantization module that stores the learnable parameters obtained by training the lightweight classification model on the MATLAB platform in the form of 32-bit floating-point numbers conforming to the IEEE 754 standard, and performs fixed-point quantization on its parameters to adapt to resource-constrained scenarios, further reducing the storage requirements of the model and improving computational efficiency. By statistically analyzing the model parameters, the maximum absolute value of the parameter values is obtained to determine the required number of integer bits, and then the number of decimal bits is gradually reduced until the model performance significantly degrades to determine the number of decimal bits.

[0058] A multi-channel EEG signal classification device for resource-constrained scenarios, comprising:

[0059] A memory: used to store a computer program for implementing the multi-channel EEG signal classification method for resource-constrained scenarios described above;

[0060] A processor: used to implement the multi-channel EEG signal classification method for resource-constrained scenarios when executing the computer program.

[0061] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the multi-channel EEG signal classification method for resource-constrained scenarios described above are implemented.

[0062] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0063] 1. The present invention innovatively proposes a multi-channel EEG data channel selection algorithm that combines the inter-channel average correlation based on the covariance matrix and the channel information amount evaluation of the entropy-variance product, and takes maximizing the classification accuracy of the subject's EEG data as the criterion, maintaining high classification performance while effectively reducing the number of channels. It reduces the input dimension of the classification network, and reduces the number of network parameters and the amount of computation.

[0064] 2. The present invention uses a 1DCNN-GRU network to effectively extract spatial and temporal features of EEG data on the premise of omitting the feature extraction of traditional algorithms with high complexity, so as to maintain high classification accuracy in a very shallow network.

[0065] 3. The present invention adopts a method of fixed-point quantization of the learning parameters of the prediction network to further reduce the storage resources required for model parameters on the premise of ensuring classification performance.

[0066] In summary, the present invention proposes an effective multi-channel EEG signal classification processing method for resource-constrained devices, which maintains high classification accuracy while reducing the number of network parameters, the amount of computation, and storage resources. Brief Description of the Drawings

[0067] Figure 1 It is the overall flowchart of the method described in the present invention.

[0068] Figure 2 It is the flowchart of the channel selection algorithm of the present invention.

[0069] Figure 3 It is the schematic diagram of the lightweight classification model structure of the present invention.

[0070] Figure 4 It is the flowchart of the method for fixed-point quantization of model parameters of the present invention.

[0071] Figure 5 It is the diagram showing the four periods of the electroencephalogram of epilepsy patients and the classification task description of the present invention.

[0072] Figure 6 It is the detailed configuration diagram of the classification model in the epilepsy seizure prediction task based on multi-channel EEG signals of the present invention.

[0073] Figure 7 It is the schematic diagram of channel selection taking the data of the 22nd patient as an example in the epilepsy electroencephalogram CHB-MIT public dataset of the present invention.

[0074] Figure 8 It is the classification performance diagram of the present invention on the epilepsy electroencephalogram CHB-MIT public dataset. Detailed Embodiments

[0075] The following describes the present invention in detail with reference to the accompanying drawings.

[0076] A multi-channel electroencephalogram (EEG) signal classification method for resource-constrained scenarios. The overall processing flow is as Figure 1 shown and includes the following steps:

[0077] Step 1: Preprocess the multi-channel raw EEG data;

[0078] The preprocessing includes band-pass filtering and data normalization;

[0079] Band-pass filtering: Use a band-pass filter to filter the multi-channel raw EEG data to remove low-frequency drift and high-frequency noise;

[0080] Data normalization: Normalize the filtered multi-channel EEG data to accelerate model training and improve performance;

[0081] Step 2: The present invention proposes a channel selection algorithm that combines the average inter-channel correlation based on the covariance matrix and the variance-entropy product method. The algorithm flow chart is as Figure 2 shown. By comprehensively considering the inter-channel correlation and the characteristics of the signal itself, it takes into account both information quantity evaluation and redundancy analysis, selects channels from the multi-channel EEG data preprocessed in Step 1, reduces the model input dimension while maintaining the classification accuracy, and reduces the model parameter quantity to adapt to resource-constrained application scenarios;

[0082] Step 3: The present invention proposes a lightweight classification model mainly composed of a one-dimensional convolutional neural network (1DCNN) and a gated recurrent unit (GRU). The overall model construction is as Figure 3 shown. Based on the one-dimensional convolutional neural network (1DCNN) and the gated recurrent unit (GRU), a lightweight classification model is constructed, and combined with spatio-temporal features, feature extraction and corresponding classification tasks are performed on the multi-channel EEG data selected in Step 2;

[0083] Step 4: Train the lightweight classification model constructed in Step 3 on the MATLAB platform to obtain learnable parameters. The learnable parameters are stored in the form of 32-bit floating-point numbers conforming to the IEEE 754 standard, and perform fixed-point quantization on them to adapt to resource-constrained scenarios, further reduce the storage requirements of the model and improve the calculation efficiency. By statistically analyzing the learnable parameters, the maximum absolute value of the parameter values is obtained, so as to determine the required number of integer bits, and then by gradually reducing the number of decimal bits until the model performance shows a significant decline to determine the number of decimal bits. The processing flow is as Figure 4 shown.

[0084] The said Step 1 includes:

[0085] Noise and artifacts in the original EEG data can affect subsequent classification performance. To reduce the impact of these artifacts on feature extraction, corresponding filtering processing is required. The original EEG data is filtered in the corresponding frequency band using a Butterworth band-pass filter to remove low-frequency drift and high-frequency noise. Then, according to the actual classification task, time windows and step sizes are selected to segment and slice the filtered multi-channel EEG data. After slicing, Z-score normalization is used to further process the sliced data. This is because there are significant individual differences in the EEG signals of subjects, such as gender, age, etc. Therefore, it is necessary to normalize the EEG data of different patients. The mathematical expression is:

[0086]

[0087] where x is the sample value in a sliced data, and μ and σ represent the mean and standard deviation of the samples in this slice, respectively.

[0088] Step 2 includes:

[0089] First, calculate the entropy-variance product of the EEG signals of each channel to evaluate the information content of the channel. The variance reflects the degree of signal fluctuation, and the entropy reflects the uncertainty of the signal. Channels with higher product values have higher information content. For the entropy-variance product of channel i, the calculation formula is as follows:

[0090]

[0091] where X ik is the k-th sample data value of channel i, is the sample mean of channel i, m is the number of samples of channel i, and p ik is the probability distribution of the k-th sample in channel i;

[0092] Next, calculate the average correlation coefficient between all EEG signal channels. Channels with higher average correlation have more redundant information with other channels. When the EEG data contains n channels and each channel contains m samples, first calculate the covariance matrix. The formula is as follows:

[0093]

[0094] where C ij represents the covariance between channel i and channel j, X ik and X jk are the values of the k-th sample of channel i and channel j, and are the means of channel i and channel j, respectively;

[0095] Then, calculate the correlation coefficient matrix \(R\) by dividing each element of the covariance matrix by the product of the standard deviations of the corresponding channels. ij The correlation coefficient \(R_{ij}\) between channel \(i\) and channel \(j\) is given by the following formula:

[0096]

[0097] where and are the square roots of the diagonal elements of the covariance matrix, representing the standard deviations of the corresponding channels;

[0098] Next, for each channel \(i\), calculate its average correlation coefficient MeanCorr with all other channels i , excluding the correlation with itself:

[0099]

[0100] where \(R_{ij}\) ij is the correlation coefficient between channel \(i\) and \(j\), \(n\) is the total number of channels, and \(i\neq j\) means excluding the correlation of channel \(i\) with itself;

[0101] Finally, for the entropy - variance product and average correlation coefficient of the \(n\) channels calculated according to the above formula, a comprehensive score is made. For the comparability of these two indicators, first, the two indicators of channel \(i\) are respectively subjected to Min - Max normalization processing, scaling their numerical ranges to the interval \([0, 1]\) to make them comparable. The normalized value meanCorrNorm of the average correlation of channel \(i\) i and the normalized value MulNorm of the entropy - variance product i are calculated as follows:

[0102]

[0103] where min and max represent the minimum and maximum values of the average correlation and entropy - variance product among the \(n\) channels respectively; then, a weighted linear combination is used to calculate a comprehensive score for each channel by combining the normalized information quantity index of channel \(i\) and the inverted average correlation index (the lower the correlation, the higher the priority). Here, due to the need to select channels with low correlation, the correlation coefficient is given a negative weight; for the comprehensive score Score of channel \(i\) i is calculated as:

[0104] Score i = weightMul×MulNorm i - weightmeanCorr×meanCorrNorm i ;

[0105] i = 1, 2, ..., n;

[0106] Among them, weightMul and weightmeanCorr are the weights of the entropy variance product and the average correlation index respectively. The weights are adjusted according to different emphases, but it is required that weightMul + weightmeanCorr = 1;

[0107] According to the comprehensive scores of different channels at the end, these n channels are sorted in descending order. Then, starting from the first channel, the number of channels is gradually increased to construct a training dataset, which is fed into the prediction network, and the optimal channel combination is searched and selected based on the "prediction accuracy".

[0108] Step 3 includes:

[0109] The detailed settings of the 1DCNN-GRU classification model include:

[0110] First, use the 1DCNN network to extract the spatial features of the EEG signals. The 1DCNN network includes: an input layer, a one-dimensional convolutional layer, a batch normalization layer, a max pooling layer, an activation function, and a Flatten layer;

[0111] The input layer is used to receive the preprocessed EEG data;

[0112] The one-dimensional convolutional layer performs convolutional operations on multi-channel EEG signals to extract local spatial features between different channels. This layer contains multiple convolutional kernels, and the size and stride of the convolutional kernels are adjusted according to the specific tasks and the characteristics of the dataset;

[0113] The batch normalization layer accelerates the model convergence and improves the model generalization ability;

[0114] The max pooling layer also needs to select the window size and stride according to the size of the feature map to reduce the dimension of the feature map and extract significant features;

[0115] The activation function is ReLU, which introduces non-linearity so that the model can learn more complex features;

[0116] The Flatten layer flattens the multi-dimensional feature map into a one-dimensional vector;

[0117] Then use the GRU unit to extract the temporal features of the EEG signals and capture the long-term dependencies in the time series; the number of hidden units and the dropout rate of the GRU unit should be selected according to the complexity of the task and the size of the dataset to prevent overfitting;

[0118] Finally, use a fully connected layer and a softmax classifier to output the probabilities of each category to complete the classification task.

[0119] The fixed-point quantization described in step 4 includes:

[0120] As Figure 5 shown, first, perform statistical analysis on all learnable parameters of the model to determine the maximum absolute value of the parameter values. According to the maximum absolute value of the learnable parameters, determine the required number of integer bits. Then, select an initial number of decimal bits, gradually reduce the number of decimal bits, and evaluate the performance of the quantization models with different numbers of decimal bits. Compare the performance of the model before and after quantization on the validation set until the model performance shows a significant decline, thereby determining a number of decimal bits that balances performance and resources.

[0121] A multi-channel electroencephalogram (EEG) signal classification system for resource-constrained scenarios, including:

[0122] A preprocessing module that preprocesses multi-channel raw EEG data, including band-pass filtering and data normalization; Band-pass filtering: Use a band-pass filter to filter the multi-channel raw EEG data to remove low-frequency drift and high-frequency noise; Data normalization: Perform normalization processing on the filtered multi-channel EEG data to accelerate model training and improve performance, and is used to implement step 1 of a multi-channel EEG signal classification method for resource-constrained scenarios;

[0123] A channel selection module that selects channels from the preprocessed multi-channel EEG data, reduces the model input dimension while maintaining classification accuracy, and reduces the model parameter quantity to adapt to resource-constrained application scenarios, and is used to implement step 2 of a multi-channel EEG signal classification method for resource-constrained scenarios;

[0124] A network construction module that constructs a lightweight classification model based on a one-dimensional convolutional neural network (1DCNN) and a gated recurrent unit (GRU), combines spatio-temporal features, and performs feature extraction and corresponding classification tasks on the selected multi-channel EEG data, and is used to implement step 3 of a multi-channel EEG signal classification method for resource-constrained scenarios;

[0125] A model quantization module that stores the learnable parameters obtained by training the lightweight classification model on the MATLAB platform in the form of 32-bit floating-point numbers that conform to the IEEE 754 standard, and performs fixed-point quantization on its parameters to adapt to resource-constrained scenarios, further reducing the storage requirements of the model and improving the calculation efficiency. By performing statistical analysis on the model parameters to obtain the maximum absolute value of the parameter values, the required number of integer bits is determined, and then the number of decimal bits is gradually reduced until the model performance shows a significant decline to determine the number of decimal bits, and is used to implement step 4 of a multi-channel EEG signal classification method for resource-constrained scenarios.

[0126] A multi-channel EEG signal classification device for resource-constrained scenarios, including:

[0127] Memory: used to store a computer program for implementing the multi-channel electroencephalogram signal classification method for resource-constrained scenarios as described above;

[0128] Processor: used to implement the multi-channel electroencephalogram signal classification method for resource-constrained scenarios when executing the computer program.

[0129] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the multi-channel electroencephalogram signal classification method for resource-constrained scenarios as described above are implemented.

[0130] Simulation experiment

[0131] Experimental verification is carried out on the epilepsy seizure prediction task based on multi-channel electroencephalogram signals:

[0132] Taking the epilepsy seizure prediction task based on multi-channel electroencephalogram signals as an example for illustration. The electroencephalogram signals of epilepsy patients are mainly divided into 4 periods, namely the pre-ictal period, the inter-ictal period, the ictal period, and the post-ictal period. The inter-ictal period refers to the EEG signals between two epilepsy seizures, that is, normal signals; the pre-ictal period refers to the EEG signals with abnormal changes before epilepsy seizures; the ictal period refers to the EEG signals during epilepsy seizures; the post-ictal period refers to the EEG signals transitioning from the end of epilepsy seizures to the inter-ictal period. As Figure 5 , for the epilepsy seizure prediction task, it is a classification task for the inter-ictal period and the pre-ictal period, while for the epilepsy seizure detection task, it is a binary classification task for the inter-ictal period and the ictal period. Compared with epilepsy detection, epilepsy prediction is more difficult because the electroencephalogram signals in the pre-ictal period and the inter-ictal period are more similar to those in the ictal period, and due to the strong specificity and large complexity of the pre-ictal conditions of different patients, it is more difficult to perform the classification task, and the classification accuracy, sensitivity, and specificity will be more stringent than those of epilepsy detection.

[0133] CHB-MIT (Guttag and John, “CHB-MIT Scalp EEG Database (version 1.0.0),” PhysioNet, 2010, dOI: 10.13026 / C2K01R. [Online]. Available: https: / / doi.org / 10.13026 / C2K01R.) is a public electroencephalogram dataset collected by Children's Hospital Boston in the United States, consisting of scalp electroencephalogram recordings of pediatric subjects with intractable epilepsy seizures. Taking the 18-channel electroencephalogram data without channel selection in the CHB-MIT dataset as an example, the detailed parameter settings of the model proposed by the present invention are as Figure 6As shown. The total number of parameters of this model is 5.8k, and the required memory occupancy is 23.2KB. After channel selection and quantization processing, the memory resources required for the parameters are only 7.25KB.

[0134] To comprehensively and objectively evaluate the performance of the proposed seizure prediction model, this embodiment uses multiple evaluation metrics, including Sensitivity, Specificity, and Accuracy. These metrics can measure the performance of the model on the test dataset from different perspectives. The mathematical expressions for their calculation are as follows:

[0135]

[0136] Figure 7 This is a schematic diagram of the result of channel selection using the data of the 22nd patient in this dataset as an example. The results show that after reducing the number of channels from 18 to 15, the performance actually increases, demonstrating the advantages and effectiveness of the channel selection method proposed in the present invention. Figure 8 This is the prediction performance of the model proposed in the present invention on the CHB-MIT dataset. The classification model proposed in the present invention is used to perform the classification task of pre-seizure and interictal periods on the data of 23 patients. The experimental results show that the average sensitivity reaches 94.58%, the average accuracy reaches 93.47%, and the average specificity reaches 90.92%. The experimental results show that the 1DCNN-GRU deep network model proposed in the present invention can effectively predict seizures in EEG data. Since this model has fewer parameters and a relatively simple network architecture, it is more suitable for implementing real-time and low-power hardware circuits. This will significantly promote the clinical application of portable seizure prediction devices in epilepsy patients.

Claims

1. A multi-channel EEG signal classification method for resource-constrained scenarios, characterized in that: The following steps are involved: Step 1, preprocessing the multi-channel raw EEG data; The preprocessing includes bandpass filtering and data normalization; Bandpass filtering: Use a bandpass filter to filter the multi-channel raw EEG data to remove low-frequency drift and high-frequency noise; Data normalization: Normalize the filtered multi-channel EEG data to accelerate model training and improve performance; Step 2: Select channels for the multi-channel EEG data preprocessed in step 1, reduce the model input dimension while maintaining classification accuracy, and reduce the number of model parameters to adapt to resource-constrained application scenarios; Step 3: A lightweight classification model is constructed based on a one-dimensional convolutional neural network (1DCNN) and a gated recurrent unit (GRU), and the multi-channel EEG data selected in step 2 is subjected to feature extraction and corresponding classification tasks in combination with spatiotemporal features; Step 4: Train the lightweight classification model constructed in step 3 on the MATLAB platform to obtain learnable parameters. The learnable parameters are stored in the form of 32-bit floating-point numbers that comply with the IEEE 754 standard and are fixed-point quantized to adapt to resource-constrained scenarios, further reduce the storage requirements of the model, and improve computing efficiency. The maximum absolute value of the parameter value is obtained by statistical analysis of the learnable parameters to determine the required number of integer digits, and then the number of decimal places is determined by gradually reducing the number of decimal places until the model performance is significantly reduced.

2. According to the multi-channel EEG signal classification method for resource-constrained scenarios according to claim 1, it is characterized in that: The step 1 comprises: The original EEG data is filtered in the corresponding frequency band using a Butterworth bandpass filter to remove low-frequency drift and high-frequency noise. Then, the time window and step size are selected for segmentation and slicing of the filtered multi-channel EEG data according to the actual classification task. After slicing, the Z-score normalization is used to further process the slice data. The mathematical expression is: Among them, x is a sample value in a slice of data, μ and σ represent the mean and standard deviation of the samples in this slice respectively.

3. According to the multi-channel EEG signal classification method for resource-constrained scenarios according to claim 1, it is characterized in that: The step 2 comprises: First, the entropy-variance product of each channel EEG signal is calculated to evaluate the information content of the channel. The variance reflects the degree of signal fluctuation, and the entropy reflects the uncertainty of the signal. Channels with higher product values ​​have higher information content. For the entropy-variance product of channel i, the calculation formula is as follows: Among them, X ik is the kth sample data value of channel i, is the sample mean of channel i, m is the number of samples of channel i, p ik is the probability distribution of the kth sample in channel i; Next, the average correlation coefficient between all EEG signal channels is calculated. The channels with higher average correlation have more redundant information with other channels. When the EEG data contains n channels and each channel contains m samples, the covariance matrix is ​​calculated first. The formula is as follows: Among them, C ij represents the covariance between channel i and channel j, X ik and X jk is the value of the kth sample of channel i and channel j, and The mean of channel i and channel j respectively; Then, the correlation coefficient matrix, R, is calculated by dividing each element of the covariance matrix by the product of the standard deviation of the corresponding channel. ij It represents the correlation coefficient between channel i and channel j. The formula is as follows: in, and is the square root of the diagonal elements of the covariance matrix, representing the standard deviation of the corresponding channel; Then for each channel i, calculate the average correlation coefficient MeanCDorr with all other channels i , excluding the channel's own correlation: Among them, R ij is the correlation coefficient between channels i and j, n is the total number of channels, and i≠j means excluding the correlation of channel i itself; Finally, the entropy-variance product and the average correlation coefficient of the n channels calculated according to the above formula are comprehensively scored. The two indicators of channel i are first subjected to Min-Max normalization processing, and their numerical ranges are scaled to the interval [0,1] to make them comparable. The average correlation normalization value meanCorrNorm of channel i is i Sum entropy-variance product normalization value MulNorm i The calculation formula is as follows: Among them, min and max represent the minimum and maximum values ​​of the product of the average correlation and entropy variance in n channels respectively; then, the normalized information index of channel i and the inverted average correlation index are calculated using a weighted linear combination method to obtain a comprehensive score for each channel, and its correlation coefficient is given a negative weight; for the comprehensive score of channel i, Score i The calculation formula is: Score i =weightMul×MulNorm i -weightmeanCorr×meanCorrNorm i ; i=1,2,...,n; Among them, weightMul and weightmeanCorr are the weights of the entropy variance product and the average correlation index respectively. The weights are adjusted according to different emphases, but weightMul+weightmeanCorr=1; According to the final comprehensive scores of different channels, these n channels are sorted in descending order, and then starting from the first channel, the number of channels is increased one by one to construct a training data set, which is sent to the prediction network, and the best performing channel combination is searched and selected based on "prediction accuracy".

4. A multi-channel EEG signal classification method for resource-constrained scenarios according to claim 1, characterized in that: The step 3 comprises: First, the 1DCNN network is used to extract the spatial features of the EEG signal. The 1DCNN network includes: input layer, one-dimensional convolution layer, batch normalization layer, maximum pooling layer, activation function and Flatten layer; The input layer is used to receive the preprocessed EEG data; The one-dimensional convolution layer performs convolution operation on the multi-channel EEG signal to extract local spatial features between different channels. The layer contains multiple convolution kernels, and the size and step length of the convolution kernel are adjusted according to the characteristics of the specific task and data set; The batch normalization layer accelerates model convergence and improves model generalization ability; The window size and step size of the maximum pooling layer also need to be selected according to the size of the feature map to reduce the dimension of the feature map and extract significant features; The activation function is ReLU, which introduces nonlinearity and enables the model to learn more complex features; The Flatten layer flattens the multi-dimensional feature map into a one-dimensional vector; Then, the GRU unit is used to extract the temporal features of the EEG signal and capture the long-term dependencies in the time series. The number of hidden units and the dropout rate of the GRU unit should be selected according to the complexity of the task and the size of the dataset to prevent overfitting. Finally, a fully connected layer and softmax classifier are used to output the probability of each category to complete the classification task.

5. A multi-channel EEG signal classification method for resource-constrained scenarios according to claim 1, characterized in that: The fixed-point quantization in step 4 includes: First, a statistical analysis is performed on all learnable parameters of the model to determine the maximum absolute value of the parameter value. Based on the maximum absolute value of the learnable parameter, the required number of integer digits is determined. Then an initial number of decimal places is selected, and the performance of quantized models with different decimal places is evaluated by gradually reducing the number of decimal places. The performance of the models before and after quantization on the validation set is compared until the model performance shows a significant decline, thereby determining a number of decimal places that strikes a balance between performance and resources.

6. A multi-channel EEG signal classification system for resource-constrained scenarios based on the method according to any one of claims 1 to 5, characterized in that: include: The preprocessing module preprocesses the multi-channel raw EEG data, including bandpass filtering and data normalization; Bandpass filtering: Use bandpass filters to filter multi-channel raw EEG data to remove low-frequency drift and high-frequency noise; Data standardization: Standardize the filtered multi-channel EEG data to accelerate model training and improve performance; The channel selection module selects channels for preprocessed multi-channel EEG data, reduces the model input dimension while maintaining classification accuracy, and reduces the number of model parameters to adapt to resource-constrained application scenarios; The network building module builds a lightweight classification model based on the one-dimensional convolutional neural network (1DCNN) and the gated recurrent unit (GRU), and combines the spatiotemporal features to perform feature extraction and corresponding classification tasks on the selected multi-channel EEG data; The model quantization module stores the learnable parameters of the lightweight classification model trained on the MATLAB platform in the form of 32-bit floating-point numbers that comply with the IEEE 754 standard, and performs fixed-point quantization on its parameters to adapt to resource-constrained scenarios, further reduce the storage requirements of the model, and improve computing efficiency. The maximum absolute value of the parameter value is obtained by statistical analysis of the model parameters to determine the required number of integer digits, and then the number of decimal places is determined by gradually reducing the number of decimal places until the model performance shows a significant decline.

7. A multi-channel EEG signal classification device for resource-constrained scenarios, characterized in that: include: Memory: used for storing a computer program for implementing a multi-channel EEG signal classification method for resource-constrained scenarios as described in any one of claims 1 to 5; Processor: used to implement the multi-channel EEG signal classification method for resource-constrained scenarios as described in any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of a multi-channel EEG signal classification method for resource-constrained scenarios as described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Self-adaptive recognition method orienting epilepsy electroencephalogram transfer environment

    CN104523269A

  • Electroencephalogram signal classification method based on model uncertainty learning

    CN114841216A

  • Efficient epilepsy detection method and system of multi-scale lightweight network system

    CN117679047A

  • Knowledge distillation-based lightweight method for pedestrian re-identification in video scene and method thereof

    CN118351415A

  • Electroencephalogram analysis system, visibility evaluation system, electroencephalogram analysis method, and program

    JP2020028430A

Cited By

  • Brain-computer interface classification system and method based on FPGA acceleration

    CN121658992A