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

A lightweight classification model was constructed by using a one-dimensional convolutional neural network and gated recurrent units. By combining channel selection and fixed-point quantization techniques, the computational complexity and resource requirements of multi-channel EEG signal processing in resource-constrained scenarios were solved, and efficient EEG signal classification was achieved.

CN120078430BActive Publication Date: 2026-02-06BEIJING SONGGUO BRAIN MACHINE TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing deep learning models have high computational complexity and resource requirements in multi-channel EEG signal processing, making them difficult to adapt to resource-constrained application scenarios, especially in fields such as epilepsy prediction and emotion detection. There is a need for a method that can reduce computational complexity and resource requirements while maintaining high prediction accuracy.

Method used

A lightweight classification model is constructed using a one-dimensional convolutional neural network (1DCNN) and a gated recurrent unit (GRU). Combined with channel selection algorithm and fixed-point quantization technology, multi-channel EEG data is processed through bandpass filtering and data standardization to reduce the input dimension and the number of model parameters, making it suitable for resource-constrained devices.

Benefits of technology

While maintaining high classification accuracy, it significantly reduces model complexity and storage requirements, making it suitable for resource-constrained devices, improving computational efficiency, and suitable for real-time monitoring and analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120078430B_ABST
    Figure CN120078430B_ABST
Patent Text Reader

Abstract

The application discloses a kind of multi-channel electroencephalogram signal classification method and system for resource-constrained scene, belong to resource-constrained computing, electroencephalogram signal processing, deep learning technical field, method includes: first to multi-channel original electroencephalogram data is preprocessed, then multi-channel electroencephalogram data selection is carried out, then based on 1DCNN and GRU constructs lightweight classification model, the selected multi-channel electroencephalogram data is extracted and the corresponding classification task is carried out, finally the learnable parameter obtained by training classification model on MATLAB platform is stored, and its parameter is fixed-point quantization, further reduce the storage requirement of model, improve calculation efficiency;The application also provides system, equipment and medium, for realizing the method;The application keeps high prediction accuracy while significantly reducing model complexity, reduces resources and space occupation, and is more suitable for resource-constrained devices.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of resource-constrained computing, electroencephalogram signal processing and deep learning, and specifically relates to a multi-channel electroencephalogram signal classification method and system for resource-constrained scenarios. BACKGROUND

[0002] In modern neuroscience research and clinical applications, multi-channel electroencephalogram signal processing technology is increasingly attracting attention. As a method that can reflect the electrical activity of the brain in real time, electroencephalogram (EEG) is widely used in epilepsy prediction, emotion detection, sleep classification and other fields. Multi-channel electroencephalogram signal processing technology has shown broad application potential in many fields. In the aspect of epilepsy prediction, this technology can effectively predict the onset of epilepsy in patients by analyzing specific patterns and features in electroencephalogram signals, and can take relevant treatment measures to intervene in the disease onset of patients at the first time. Emotion detection is also one of its important applications. Through real-time monitoring and analysis of electroencephalogram signals, individual emotional changes can be accurately captured, bringing new breakthroughs in mental health assessment, emotion regulation intervention and human-computer interaction. In addition, in sleep classification research, multi-channel electroencephalogram signal processing helps to accurately divide different sleep stages, providing 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 electroencephalogram signal-based classification. Deep learning models can automatically learn effective features from massive data, thereby achieving higher prediction accuracy and a wider range of applications. Many researchers have explored deep learning-based classification methods, which have shown excellent performance in experiments.

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

[0005] Yuan Zhang et al. disclosed a seizure prediction method 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.), designed a feature extractor based on wavelet packet decomposition and CSP, extracted features in time and frequency domain respectively, then used a shallow CNN to classify the interictal and preictal states. Tsiouri 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.), first introduced long short-term memory (LSTM) network into the seizure prediction using electroencephalogram signals, this study extracted extensive features before classification, including time domain, frequency domain features and electroencephalogram signal channel interdependence and graph theory features, tested the prediction performance of the network under different preictal windows.

[0006] Although the above studies achieved very excellent classification performance in the seizure prediction classification task based on electroencephalogram signals, since they rely 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-limited devices. SUMMARY

[0007] In order to overcome the shortcomings of the prior art, the purpose of the present application is to provide a multi-channel electroencephalogram signal classification method and system for resource-constrained scenarios, which extracts the spatial and temporal features of multi-channel electroencephalogram signals by combining one-dimensional convolution and shallow network of gated recurrent unit, reduces the input data dimension through a channel selection algorithm based on the maximum information quantity of minimum inter-channel redundancy and the maximum subject electroencephalogram data classification accuracy criterion, and finally reduces the resource demand through the fixed-point quantization of network learning parameters, while maintaining high prediction accuracy, significantly reduces the model complexity, reduces the resource and space occupation, and makes it more suitable for resource-constrained devices.

[0008] In order to achieve the above purpose, the technical scheme adopted by the present application is:

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

[0010] Step 1, preprocessing the multi-channel raw electroencephalogram data;

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

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

[0013] Data standardization: standardizing the filtered multi-channel electroencephalogram data to speed up model training and improve performance;

[0014] Step 2, channel selection of the multi-channel electroencephalogram data after step 1 preprocessing, reducing the model input dimension and reducing the model parameter quantity to adapt to the resource-constrained application scenario while maintaining the classification accuracy;

[0015] Step 3, constructing a lightweight classification model based on one-dimensional convolutional neural network (1DCNN) and gated recurrent unit (GRU), and combining spatial and temporal features, to extract features and perform corresponding classification tasks on the multi-channel electroencephalogram data selected in step 2;

[0016] Step 4, training the lightweight classification model constructed in step 3 on the MATLAB platform to obtain learnable parameters, which are stored in the form of 32-bit floating-point numbers conforming to IEEE 754 standard, and are fixed-point quantized to adapt to resource-constrained scenarios, further reducing the storage demand of the model and improving the calculation efficiency. The maximum absolute value of the parameter value is obtained through statistical analysis of the learnable parameters, so as to determine the required integer number of bits. Then, by gradually reducing the decimal places, the decimal places are determined until the model performance decreases significantly.

[0017] The step 1 comprises:

[0018] The original electroencephalogram data is filtered by a Butterworth band-pass filter to filter out low-frequency drift and high-frequency noise, and then the filtered multi-channel electroencephalogram data is segmented by selecting a time window and a step according to the actual classification task, and the segmented data is further processed by Z-score normalization, and the mathematical expression is as follows:

[0019]

[0020] Wherein, x is a sample value in the segmented data, μ and σ represent the mean and standard deviation of the samples in the segmented data, respectively.

[0021] The step 2 comprises:

[0022] First, the entropy-variance product of each channel electroencephalogram signal is calculated to evaluate the information amount of the channel, the variance reflects the fluctuation degree of the signal, and the entropy reflects the uncertainty of the signal, the channel with higher product value has higher information amount, and the entropy-variance product of channel i is calculated as follows:

[0023]

[0024] Wherein, wherein X ik is the kth sample data value of channel i, is the sample mean of channel i, m is the sample number of channel i, and p ik is the probability distribution of the kth sample in channel i.

[0025] Then, the average correlation coefficient between all electroencephalogram signal channels is calculated, the channel with higher average correlation has more redundant information with other channels, when the electroencephalogram data contains n channels and each channel contains m samples, the covariance matrix is calculated first, and the formula is as follows:

[0026]

[0027] Wherein, C ij represents the covariance between channel i and channel j, X ik and X jk are the values of the kth sample of channel i and channel j, and are the means of channel i and channel j, respectively.

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

[0029]

[0030] where, and is the square root of the diagonal element of the covariance matrix, representing the standard deviation of the corresponding channel;

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

[0032]

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

[0034] Finally, for the entropy-variance product and the average correlation coefficient of the n channels calculated according to the above formula, first, for channel i, the two indicators are respectively Min-Max normalized, and their numerical range is scaled to the interval [0, 1], so that they have comparability, the normalized value of the average correlation of channel i meanCorrNorm i and the normalized value of the entropy-variance product MulNorm i The calculation formula is as follows:

[0035]

[0036] where, min and max represent the minimum and maximum of the average correlation and the entropy-variance product of the n channels; then use the weighted linear combination method to calculate a comprehensive score of each channel based on the normalized information quantity indicator of channel i and the inverted average correlation indicator, and the correlation coefficient is given a negative weight; The calculation formula of the comprehensive score Score i of channel i is:

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

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

[0039] where, weightMul and weightmeanCorr are the weights of the entropy-variance product and the average correlation indicator, respectively, which are adjusted according to different emphases, but weightMul + weightmeanCorr = 1 is required;

[0040] According to the last different channel comprehensive score, the n channels are sorted in descending order, and then the training data set is constructed by increasing the number of channels one by one from the first channel, and is sent into the prediction network to search for the optimal channel combination based on the "prediction accuracy".

[0041] The step 3 comprises:

[0042] Firstly, the spatial features of the electroencephalogram signal are extracted using a 1DCNN network, and the 1DCNN network comprises an input layer, a one-dimensional convolution layer, a batch normalization layer, a maximum pooling layer, an activation function and a Flatten layer.

[0043] The input layer is used for receiving the preprocessed electroencephalogram data.

[0044] The one-dimensional convolution layer is used for performing convolution operation on the multi-channel electroencephalogram signal to extract local spatial features between different channels, and the one-dimensional convolution layer comprises a plurality of convolution kernels, and the size and step length of the convolution kernel are adjusted according to the characteristics of the specific task and the data set.

[0045] The batch normalization layer is used for accelerating the model convergence and improving the generalization ability of the model.

[0046] The window size and step length of the maximum pooling layer also need to be selected according to the size of the feature map, so as to reduce the dimension of the feature map and extract significant features.

[0047] The activation function is ReLU, which introduces nonlinearity to enable the model to learn more complex features.

[0048] The Flatten layer is used for flattening the multi-dimensional feature map into a one-dimensional vector.

[0049] Then, the time features of the electroencephalogram signal are extracted using a GRU unit to capture the long-term dependence 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 data set to prevent overfitting.

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

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

[0052] Firstly, statistical analysis is performed on all the learnable parameters of the model to determine the maximum absolute value of the parameter value, and then the required integer number of bits is determined according to the maximum absolute value of the learnable parameter, and then an initial decimal number of bits is selected, and the performance of the quantized model is evaluated by gradually reducing the decimal number of bits, and the performance of the model before and after quantization is compared on the validation set until the model performance decreases significantly, so as to determine a decimal number of bits that balances the performance and resources.

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

[0054] A preprocessing module, which pre-processes the multi-channel raw electroencephalogram data, including band-pass filtering and data standardization; the band-pass filtering: filtering the multi-channel raw electroencephalogram data by using a band-pass filter to filter out low-frequency drift and high-frequency noise; the data standardization: standardizing the filtered multi-channel electroencephalogram data to accelerate model training and improve performance;

[0055] A channel selection module, which selects channels for the pre-processed multi-channel electroencephalogram data, reduces the input dimension of the model under the premise of maintaining classification accuracy, and reduces the parameter quantity of the model to adapt to resource-constrained application scenarios;

[0056] A network building module, which builds a lightweight classification model based on a one-dimensional convolutional neural network (1DCNN) and a gated recurrent unit (GRU), and extracts features and performs corresponding classification tasks for the selected multi-channel electroencephalogram data in combination with the space-time features;

[0057] A model quantization module, which stores the learnable parameters of the lightweight classification model obtained by training 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 the parameters to adapt to resource-constrained scenarios, further reduce the storage requirements of the model, and improve the calculation efficiency; the maximum absolute value of the parameter values is obtained through statistical analysis of the model parameters, so as to determine the required integer number of bits; then the decimal number of bits is gradually reduced until the performance of the model decreases significantly, and the decimal number of bits is determined.

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

[0059] A memory for storing a computer program implementing the multi-channel electroencephalogram signal classification method for resource-constrained scenarios;

[0060] A processor for implementing the multi-channel electroencephalogram signal classification method for resource-constrained scenarios when executing the computer program.

[0061] A computer-readable storage medium storing a computer program, the computer program being executed by a processor to implement the steps of the multi-channel electroencephalogram signal classification method for resource-constrained scenarios.

[0062] Compared with the prior art, the beneficial effects of the present application are:

[0063] 1.The application innovatively proposes a channel information evaluation method combining the inter-channel average correlation based on the covariance matrix and the entropy-variance product, and a multi-channel electroencephalogram data channel selection algorithm maximizing the classification accuracy of the subject's electroencephalogram data, which maintains high classification performance while effectively reducing the number of channels.

[0064] 2.The application uses a 1DCNN-GRU network to effectively extract spatial and temporal features of electroencephalogram data without the complexity of traditional feature extraction, thereby maintaining high classification accuracy in a very shallow network.

[0065] 3.The application uses a method of fixed-point quantization of the learning parameters of the prediction network to further reduce the storage resources required by the model parameters while ensuring classification performance.

[0066] In summary, the application proposes an effective multi-channel electroencephalogram signal classification processing method for resource-constrained devices, which reduces the number of network parameters, computation and storage resources while maintaining high classification accuracy. BRIEF DESCRIPTION OF DRAWINGS

[0067] Figure 1 The overall flowchart of the method of the application.

[0068] Figure 2 The flowchart of the channel selection algorithm of the application.

[0069] Figure 3 The structure diagram of the lightweight classification model of the application.

[0070] Figure 4 The flowchart of the fixed-point quantization method of the model parameters of the application.

[0071] Figure 5 The illustration of the four periods of electroencephalogram of epilepsy patients and classification tasks of the application.

[0072] Figure 6 The detailed configuration diagram of the classification model in the seizure prediction task based on multi-channel electroencephalogram signals of the application.

[0073] Figure 7 The schematic diagram of channel selection in the CHB-MIT public data set of epilepsy electroencephalogram of the application using the 22nd patient data as an example.

[0074] Figure 8 The classification performance diagram of the application on the CHB-MIT public data set of epilepsy electroencephalogram. DETAILED DESCRIPTION

[0075] The application will be described in detail below with reference to the accompanying drawings.

[0076] A multi-channel electroencephalogram signal classification method for resource-constrained scenarios, the overall processing flow is as shown in Figure 1 The method comprises the following steps:

[0077] Step 1, preprocessing the multi-channel raw electroencephalogram data;

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

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

[0080] Data standardization: standardizing the filtered multi-channel electroencephalogram data to speed up model training and improve performance;

[0081] Step 2, the application proposes a channel selection algorithm combining the inter-channel average correlation based on the covariance matrix and the variance-entropy product method, the algorithm flow chart is as shown in Figure 2 The algorithm takes into account the correlation between channels and the characteristics of the signal itself to balance information evaluation and redundancy analysis, and selects channels for the multi-channel electroencephalogram data after step 1 preprocessing, reduces the model input dimension under the premise of maintaining classification accuracy, and reduces the model parameter quantity to adapt to the resource-constrained application scenario;

[0082] Step 3, the application proposes a lightweight classification model mainly composed of one-dimensional convolutional neural network (1DCNN) and gated recurrent unit (GRU), the overall model construction is as shown in Figure 3 The lightweight classification model is constructed based on one-dimensional convolutional neural network (1DCNN) and gated recurrent unit (GRU), and combines temporal and spatial features to extract features from the multi-channel electroencephalogram data selected in step 2 and perform the corresponding classification task;

[0083] Step 4, the lightweight classification model constructed in step 3 is trained on the MATLAB platform to obtain learnable parameters, the learnable parameters are stored in the form of 32-bit floating-point numbers conforming to IEEE 754 standard, and are fixed-point quantized to adapt to the resource-constrained scenario, further reduce the storage requirement of the model and improve the calculation efficiency, the maximum absolute value of the parameter value is obtained through statistical analysis of the learnable parameters, thereby determining the required integer number of bits, then the decimal number of bits is gradually reduced until the model performance decreases significantly to determine the decimal number of bits, the processing flow is as shown in Figure 4 .

[0084] The step 1 comprises:

[0085] The noise and artifacts of the original EEG data will affect the subsequent classification performance. In order to reduce the influence of these artifacts on feature extraction, corresponding filtering processing is needed. The original electroencephalogram data is filtered by using a Butterworth band-pass filter to filter the low-frequency drift and high-frequency noise in the corresponding frequency band. Then, according to the actual classification task, the filtered multi-channel electroencephalogram data is segmented and sliced by selecting a time window and a step length. After slicing, the sliced data is further processed by using Z-score normalization. Because the electroencephalogram signal of the subject is different due to different individual conditions such as gender, age, etc., there is a large individual difference. Therefore, the EEG data of different patients needs to be normalized. The mathematical expression is:

[0086]

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

[0088] The step 2 comprises:

[0089] First, the entropy-variance product of each channel electroencephalogram signal is calculated to evaluate the information amount of the channel. The variance reflects the fluctuation degree of the signal, and the entropy reflects the uncertainty of the signal. The channel with a higher product value has a higher information amount. For the entropy-variance product of channel i, the calculation formula is as follows:

[0090]

[0091] Wherein, X ik is the kth sample data value of channel i, is the sample mean of channel i, m is the sample number of channel i, and p ik is the probability distribution of the kth sample in channel i.

[0092] Then, the average correlation coefficient between all electroencephalogram signal channels is calculated. The channel with higher average correlation has more redundant information with other channels. When the electroencephalogram data contains n channels, each channel contains m samples. First, the covariance matrix is calculated, and the formula is as follows:

[0093]

[0094] Wherein, C ij represents the covariance between channel i and channel j, X ik and X jk are the values of the kth sample of channel i and channel j, and are the means of channel i and channel j, respectively.

[0095] Then, the correlation coefficient matrix R is calculated by dividing each element of the covariance matrix by the product of the standard deviations of the corresponding channels ij represents the correlation coefficient between channel i and channel j, and the formula is as follows:

[0096]

[0097] where, and is the square root of the diagonal element of the covariance matrix, representing the standard deviation of the corresponding channel;

[0098] Then, for each channel i, the average correlation coefficient MeanCorr i with all other channels is calculated, excluding the correlation of the channel itself:

[0099]

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

[0101] Finally, the entropy-variance product and the average correlation coefficient of the n channels calculated according to the above formula are comprehensively scored. In order to make the two indicators comparable, Min-Max normalization is performed on the two indicators of channel i respectively, scaling their numerical ranges to the interval [0, 1], so that they have comparability. The normalized value of the average correlation of channel i meanCorrNorm i and the normalized value of the entropy-variance product MulNorm i The calculation formula is as follows:

[0102]

[0103] where min and max represent the minimum and maximum values of the average correlation and the entropy-variance product of the n channels respectively; then, using a weighted linear combination, the normalized information quantity indicator of channel i and the inverted average correlation indicator (the lower the correlation, the higher the priority) are calculated to obtain a comprehensive score for each channel. Here, since the strategy of selecting low correlation channels is required, the correlation coefficient is given a negative weight; the calculation formula of the comprehensive score Score i of channel i is as follows:

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

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

[0106] wherein weightMul and weightmeanCorr are the weights of the entropy variance product and the mean correlation indicator respectively, the weights are adjusted according to different emphases, but weightMul + weightmeanCorr = 1 is required;

[0107] According to the comprehensive scores of the last different channels, the n channels are sorted in descending order, and then the training data set is constructed by increasing the number of channels one by one from the first channel, which is sent into the prediction network to search for the optimal channel combination based on the prediction accuracy.

[0108] The step 3 comprises:

[0109] The 1DCNN-GRU classification model detailed settings comprise:

[0110] Firstly, the spatial features of the electroencephalogram signal are extracted using the 1DCNN network, and the 1DCNN network comprises: an input layer, a one-dimensional convolution layer, a batch normalization layer, a maximum pooling layer, an activation function and a Flatten layer.

[0111] The input layer is used for receiving the preprocessed electroencephalogram data.

[0112] The one-dimensional convolution layer performs convolution operation on the multi-channel electroencephalogram signal to extract local spatial features between different channels, and the layer comprises a plurality of convolution kernels, the size and step length of the convolution kernel are adjusted according to the characteristics of the specific task and the data set.

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

[0114] The window size and step length 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.

[0115] The activation function is ReLU, which introduces nonlinearity to enable the model to learn more complex features.

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

[0117] Then the time features of the electroencephalogram signal are extracted using the GRU unit to capture the long-term dependence 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 data set to prevent overfitting.

[0118] Finally, a fully connected layer and a softmax classifier are used to output the probability of each class to complete the classification task.

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

[0120] like Figure 5 As shown, firstly, statistical analysis is performed on all learnable parameters of the model to determine the maximum absolute value of the parameter values. Based on the maximum absolute value of the learnable parameters, the required number of integer digits is determined. Then, an initial number of decimal places is selected. By gradually reducing the number of decimal places and evaluating the performance of quantized models with different numbers 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. In this way, a number of decimal places that balances performance and resources is determined.

[0121] A multi-channel EEG signal classification system for resource-constrained scenarios includes:

[0122] The preprocessing module preprocesses the multi-channel raw EEG data, including bandpass filtering and data standardization. Bandpass filtering: The multi-channel raw EEG data is filtered using a bandpass filter to remove low-frequency drift and high-frequency noise. Data standardization: The filtered multi-channel EEG data is standardized to accelerate model training and improve performance, which is used to implement step 1 of a multi-channel EEG signal classification method for resource-constrained scenarios.

[0123] The channel selection module performs channel selection on the preprocessed multi-channel EEG data, reducing the model input dimension and the number of model parameters to adapt to resource-constrained application scenarios while maintaining classification accuracy. This is used to implement step 2 of a multi-channel EEG signal classification method for resource-constrained scenarios.

[0124] The network construction module builds a lightweight classification model based on a one-dimensional convolutional neural network (1DCNN) and a gated recurrent unit (GRU), and combines spatiotemporal features to perform feature extraction and corresponding classification tasks on the selected multi-channel EEG data, which is used to realize step 3 of a multi-channel EEG signal classification method for resource-constrained scenarios.

[0125] The model quantization module stores the learnable parameters obtained from training the lightweight classification model on the MATLAB platform in 32-bit floating-point format conforming to the IEEE 754 standard, and performs fixed-point quantization on the parameters to adapt to resource-constrained scenarios, further reducing the model's storage requirements and improving computational efficiency. By statistically analyzing the model parameters, the maximum absolute value of the parameter values ​​is obtained, thereby determining the required number of integer digits. Then, the number of decimal digits is gradually reduced until the model performance significantly decreases, thus determining the number of decimal digits. This 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 includes:

[0127] memory for storing a computer program for implementing the method for multi-channel electroencephalogram signal classification in a resource-limited scenario;

[0128] processor for implementing the method for multi-channel electroencephalogram signal classification in a resource-limited scenario when the computer program is executed.

[0129] A computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the method for multi-channel electroencephalogram signal classification in a resource-limited scenario.

[0130] Simulation experiment

[0131] Experimental verification is performed on an epilepsy seizure prediction task based on multi-channel electroencephalogram signals.

[0132] The epilepsy seizure prediction task based on multi-channel electroencephalogram signals is taken as an example for illustration. The electroencephalogram signals of epilepsy patients are mainly divided into four periods, namely, pre-seizure period, interictal period, seizure period and post-seizure period. The interictal period refers to the EEG signal between two seizures, i.e., normal signal; the pre-seizure period refers to the abnormal EEG signal before the seizure; the seizure period refers to the EEG signal during the seizure; and the post-seizure period refers to the EEG signal after the seizure and before the interictal period. For example, Figure 5 For the epilepsy seizure prediction task, it is a classification task for the interictal period and the pre-seizure period, while for the epilepsy seizure detection task, it is a binary classification task for the interictal period and the seizure period. Compared with epilepsy detection, epilepsy prediction is more difficult, because the electroencephalogram signals in the pre-seizure period and the interictal period are more similar than those in the seizure period, and because the pre-seizure period of different patients has strong specificity and great complexity, it is more difficult to classify, and the accuracy, sensitivity and specificity of classification are more stringent than 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 Boston Children's Hospital, which is composed of scalp electroencephalogram records of pediatric subjects with intractable 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 in the present application are as follows: Figure 6The total number of parameters of the model is 5.8k, and the required memory occupation is 23.2KB. After channel selection and quantization processing, the required memory resources of the parameters are only 7.25KB.

[0134] In order to comprehensively and objectively evaluate the performance of the proposed seizure prediction model, multiple evaluation indicators are adopted in this embodiment, including sensitivity (Sensitivity), specificity (Specificity) and accuracy (Accuracy). These indicators can measure the performance of the model on the test data set from different angles. The mathematical expression for calculating them is:

[0135]

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

Claims

1. A multi-channel electroencephalogram signal classification method for resource-constrained scenarios, characterized in that, The method comprises the following steps: Step 1: preprocessing multi-channel raw electroencephalogram data; The preprocessing comprises band-pass filtering and data standardization; Band-pass filtering: filtering the multi-channel raw electroencephalogram data by using a band-pass filter to filter out low-frequency drift and high-frequency noise; Data standardization: standardizing the filtered multi-channel electroencephalogram data to accelerate model training and improve performance; Step 2: selecting channels of the multi-channel electroencephalogram data preprocessed in step 1 to reduce the input dimension of the model and the number of model parameters under the premise of maintaining classification accuracy to adapt to resource-constrained application scenarios; Step 3: constructing a lightweight classification model based on a one-dimensional convolutional neural network (1DCNN) and a gated recurrent unit (GRU), and combining the spatial and temporal features to extract features from the multi-channel electroencephalogram data selected in step 2 and perform the corresponding classification task; Step 4: training the lightweight classification model constructed in step 3 on the MATLAB platform to obtain learnable parameters, storing the learnable parameters in the form of 32-bit floating-point numbers conforming to the IEEE 754 standard, and performing fixed-point quantization to adapt to resource-constrained scenarios, further reducing the storage requirements of the model and improving the calculation efficiency, and determining the number of integer bits by statistically analyzing the learnable parameters to obtain the maximum absolute value of the parameter value, and then gradually reducing the number of decimal places until the performance of the model decreases significantly to determine the number of decimal places.

2. The multi-channel electroencephalogram signal classification method for resource-constrained scenarios according to claim 1, characterized in that, The step 1 comprises: Using a Butterworth band-pass filter on the raw electroencephalogram data to filter the corresponding frequency band, filter out low-frequency drift and high-frequency noise, and then selecting a time window and a step for the filtered multi-channel electroencephalogram data to perform slicing processing, and then using Z-score normalization to further process the sliced data, the mathematical expression is: , Wherein, x is a sample value in the sliced data, μ and σ represent the mean and standard deviation of the samples in the slice, respectively.

3. The multi-channel electroencephalogram signal classification method for resource-limited scenarios according to claim 1, characterized in that, The step 2 comprises: First, calculate the entropy-variance product of each channel electroencephalogram signal to evaluate the information amount of the channel, the variance reflects the fluctuation degree of the signal, and the entropy reflects the uncertainty of the signal, the channel with a higher product value has a higher information amount, and the entropy-variance product of channel i is calculated as follows: i = 1, 2,..., n; j = 1, 2,..., n wherein, is the kth sample data value for channel i, is the sample mean for channel i, m is the number of samples for channel i, is the probability distribution of the kth sample in channel i; Then, calculate the average correlation coefficient between all electroencephalogram signal channels, the channel with higher average correlation has more redundant information with other channels, when the electroencephalogram data contains n channels and each channel contains m samples, first calculate the covariance matrix, the formula is as follows: , i = 1, 2,..., n; j = 1, 2,..., n; wherein, represents the covariance between channel i and channel j, and is the value of channel i and channel j at the kth sample, and is the mean of channel i and channel j, respectively; Then, the correlation coefficient matrix is calculated by dividing each element of the covariance matrix by the product of the standard deviations of the corresponding channels, denotes the correlation coefficient between channel i and channel j, and is given by the formula , i = 1, 2,..., n; j = 1, 2,..., n wherein and are square roots of the diagonal elements of the covariance matrix, representing the standard deviation of the respective channel; Again for each channel i, calculate its average correlation coefficient with all other channels excluding the correlation of the channel itself: , i = 1, 2,..., n; j = 1, 2,..., n; wherein, is the correlation coefficient between channels i and j, and n is the total number of channels, is meant to exclude the correlation of channel i with itself; Finally, the two indicators of the n channels calculated according to the above formula are comprehensively scored, and the Min-Max normalization processing is performed on the two indicators of the channel i respectively, so that the numerical value range of each is scaled to the interval [0, 1], so that they have comparability, and the calculation formula of the average correlation normalization value of the channel i and the entropy-variance product normalization value is as follows: , , where min and max represent the minimum and maximum of the average correlation and the entropy variance product of n channels, respectively; then a comprehensive score of each channel is calculated using a weighted linear combination of the information quantity index of the normalized channel i and the inverted average correlation index, with the correlation coefficient being given a negative weight; the calculation formula of the comprehensive score of channel i is: ; ; wherein and are the weights of the entropy variance product and average correlation index, respectively, which are adjusted according to the focus, but with the requirement ; According to the comprehensive score of different channels, sort the n channels in descending order, and then increase the number of channels one by one to construct a training data set, and input it into the prediction network to search for the optimal channel combination based on the prediction accuracy.

4. The multi-channel electroencephalogram signal classification method for resource-constrained scenarios according to claim 1, characterized in that, The step 3 comprises: First, use a one-dimensional convolutional neural network (1DCNN) to extract spatial features of the electroencephalogram signal, the one-dimensional convolutional neural network (1DCNN) comprises: an input layer, a one-dimensional convolutional layer, a batch normalization layer, a maximum pooling layer, an activation function and a Flatten layer; The input layer is used for receiving pre-processed electroencephalogram data; The one-dimensional convolution layer is used for performing convolution operation on the multi-channel electroencephalogram signal to extract local spatial features between different channels, 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 is used for accelerating model convergence and improving model generalization ability; The max pooling layer is used for reducing the dimension of the feature map and extracting significant features, and the window size and step length of the max pooling layer also need to be selected according to the size of the feature map; The activation function is ReLU, which introduces nonlinearity and enables the model to learn more complex features; The Flatten layer is used to flatten the multi-dimensional feature map into a one-dimensional vector; Then, the gated recurrent unit (GRU) is used to extract the time features of the electroencephalogram signal and capture the long-term dependencies in the time series; the number of hidden units and the dropout rate of the GRU should be selected according to the complexity of the task and the size of the data set to prevent overfitting; Finally, a fully connected layer and a softmax classifier are used to output the probability of each class and complete the classification task.

5. The multi-channel electroencephalogram signal classification method for resource-constrained scenarios according to claim 1, characterized in that, The fixed-point quantization in step 4 includes: First, statistical analysis is performed on all the learnable parameters of the model to determine the maximum absolute value of the parameter values, and then the required integer number of bits is determined according to the maximum absolute value of the learnable parameters; then an initial number of decimal places is selected, and the performance of the quantized model is evaluated by gradually reducing the number of decimal places; the performance of the model before and after quantization is compared on the validation set until the model performance decreases significantly, thereby determining a number of decimal places that balances performance and resources.

6. A multi-channel electroencephalogram signal classification system for resource-constrained scenarios based on the method of any one of claims 1-5, characterized in that, It includes: The preprocessing module is used to preprocess the multi-channel raw electroencephalogram data, including band-pass filtering and data standardization; Band-pass filtering: a band-pass filter is used to filter the multi-channel raw electroencephalogram data to remove low-frequency drift and high-frequency noise; data standardization: the filtered multi-channel electroencephalogram data is standardized to speed up model training and improve performance; The channel selection module is used to select channels for the pre-processed multi-channel electroencephalogram data to reduce the input dimension of the model and reduce the number of model parameters to adapt to resource-constrained application scenarios while maintaining classification accuracy; The network building module is used to build a lightweight classification model based on one-dimensional convolutional neural network (1DCNN) and gated recurrent unit (GRU), and to extract features and perform corresponding classification tasks on the selected multi-channel electroencephalogram data by combining spatial and temporal features; The model quantization module is used to store 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 to perform fixed-point quantization on the parameters to adapt to resource-constrained scenarios, further reduce the storage requirements of the model, and improve the computing efficiency; the maximum absolute value of the parameter values is obtained by statistical analysis of the model parameters, thereby determining the required integer number of bits; then the number of decimal places is gradually reduced until the model performance decreases significantly to determine the number of decimal places.

7. A multi-channel electroencephalogram signal classification device for resource-constrained scenarios, characterized in that, It includes: Memory: for storing a computer program for implementing a multi-channel electroencephalogram signal classification method for a resource-constrained scenario according to any one of claims 1-5; Processor: for implementing a multi-channel electroencephalogram signal classification method for a resource-constrained scenario according to any one of claims 1-5 when the computer program is executed.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the multi-channel electroencephalogram signal classification method for a resource-constrained scenario according to any one of claims 1-5.

Citation Information

Patent Citations

  • 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