EEG signal processing method, system, device and medium based on gradient memory bank
Through the EEG signal processing method based on the gradient memory bank, the problem of EEG signal noise and disturbance affecting epilepsy diagnosis is solved, more efficient feature selection and more accurate epileptic spike wave detection are achieved, the classification accuracy is improved and the computing resource requirements are reduced.
Patent Information
- Application Number
- CN202510860280.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-06-25
AI Technical Summary
In existing technologies, noise and disturbances in EEG signals affect the accuracy of epileptic spike diagnosis. Traditional and deep learning methods have problems with feature selection, such as high computational overhead or lack of systematic verification.
A gradient memory-based EEG signal processing method is adopted. By preprocessing and dividing the EEG data, the gradient memory is used to dynamically match historical gradient features to generate significant features, and the model parameters are updated in combination with the back propagation of the loss function to optimize the information transmission between network layers.
It significantly improved the classification accuracy of epileptic spike wave detection by approximately 12%, shortened the training cycle, and reduced hardware resource requirements.
Smart Images

Figure CN120345873B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of artificial intelligence EEG feature selection, and in particular to an EEG signal processing method, system, device and medium based on a gradient memory bank. Background Art
[0002] The scalp electroencephalogram (EEG), or EEG for short, is a method for recording and measuring the physiological electrical activity of neurons in the cerebral cortex. It is currently commonly used for epilepsy spike detection. Patients or subjects can be measured by wearing an electrode cap. Doctors then interpret the spikes in the measured EEG data to diagnose epilepsy. This convenient measurement method, however, is affected by this method and the characteristics of EEG imaging, resulting in some noise and perturbations in the EEG signal. In general medical diagnosis, EEG sampling is performed in a relatively open and closed environment, resulting in the presence of background noise in the sampled EEG signal. Furthermore, EEG primarily records the discharge of radial neurons in the cerebral cortex. However, the discharge of radial neurons deeper in the cerebral cortex is primarily influenced by other organs such as the cerebellum and does not reflect the physiological activity of the cerebral cortex. Therefore, from an EEG imaging perspective, the EEG signal inevitably contains perturbations from non-cortical physiological electrical signals. This noise and perturbations can affect the doctor's diagnosis and the development and research of epilepsy spike diagnostic algorithms.
[0003] Deep learning is a recently emerging technology, and deep learning-based automated diagnosis of EEG epileptic spikes is commonplace. These technologies all aim to improve EEG deep representations. However, even with extensive preprocessing, noise in EEG signals cannot be completely removed, significantly impacting the quality of deep EEG representations. Therefore, designing an efficient method for selecting deep EEG features is crucial.
[0004] EEG deep feature selection methods can be categorized into traditional machine learning and deep learning. Traditional machine learning uses specific statistical learning methods to further refine EEG deep representations. For example, these methods use ensemble empirical mode decomposition (EMD) to perform multi-order feature analysis on EEG features for feature extraction. Other methods use Shapley values to analyze feature importance and then apply classification trees to select features. While these methods are based on comprehensive theoretical modeling, they are inherently difficult to generalize and are often limited to a single dataset. Numerous deep feature selection methods based on deep learning exist, such as using deep reinforcement learning to construct multi-agent systems and implement reward and penalty mechanisms for feature selection. Another example is using a three-branch attention structure to perceive the three different dimensions of two-dimensional EEG convolutional features and then summing these three features to achieve multi-dimensional feature selection. While these deep methods have proven effective on multiple EEG datasets, some are computationally expensive, others have been limited to experiments with a single network architecture, lack systematic validation, and present significant limitations. Summary of the Invention
[0005] The purpose of the present invention is to overcome the deficiencies of the prior art. To achieve the above purpose, a method, system, device and medium for processing EEG signals based on a gradient memory bank are adopted to solve the problems raised in the above background technology.
[0006] The technical solution of the first aspect provides an EEG signal processing method based on a gradient memory bank, comprising the following steps:
[0007] S1. Preprocess and divide the EEG data sampled by the subjects to obtain the training set, validation set, and test set of the segmented EEG;
[0008] S2. Input the segmented EEG data of a fixed batch size into the neural network, obtain the output features and gradient features of the feature selection layer, and build and initialize the gradient memory bank;
[0009] S3: Input the training set data in batches, match the historical gradient features with the gradient memory bank, fuse the generated significant features and input them into the remaining layers of the network to obtain the output probability;
[0010] S4. Calculate the loss function based on the output probability, back-propagate and update the model parameters, and simultaneously update the features in the gradient memory bank;
[0011] S5. Repeat steps S3-S4 until the model converges, and finally evaluate the classification performance through the test set to complete the feature selection of the acquired EEG.
[0012] As a further solution of the present invention: the specific steps in S1 include:
[0013] S11, EEG data collected during the interictal period of epileptic patients;
[0014] S12, performing bandpass filtering and notch processing using bandpass filtering parameters of a preset frequency;
[0015] S13, removing heartbeat artifacts and eye shadow artifacts from the EEG data after bandpass filtering and notch processing by using an ICA decomposition and artifact component removal algorithm;
[0016] S14. Finally, the EEG data is sliced and divided according to the labels to obtain the training set, validation set, and test set.
[0017] As a further solution of the present invention: the ratio of the training set, the validation set, and the test set is .
[0018] As a further solution of the present invention: the specific steps in S2 include:
[0019] S21, segmented EEG data with fixed round size Input gradient deactivation Layer Neural Network , the output features of any layer can be obtained , the formula is:
[0020]
[0021] in, Before use layer( )’s neural network processes the data, are neural network parameters, Indicates the current training round; represents the batch size parameter in deep learning model training, represents the number of EEG channels, represents the number of EEG sampling points, Represents output features The number of feature channel dimensions;
[0022] S22. According to the gradient direction propagation theorem, the gradient feature corresponding to the feature is obtained as follows: ; and construct a size of Gradient memory bank , the formula is:
[0023]
[0024] in, The dimension size is , represents the size of the gradient memory bank, Represent the width and height dimensions of the features respectively.
[0025] As a further solution of the present invention: the specific steps in S3 include:
[0026] S31, fix the batch size Batch EEG segmentation data Input network model Before layer , get the output features of the current batch of data, the formula is:
[0027] ;
[0028] in, , are neural network parameters;
[0029] S32, based on cosine similarity, from the gradient memory library Selection and gradient features Recent memory features , using memory features and Jointly build salient features , the specific formula is:
[0030]
[0031]
[0032]
[0033] in, They represent the sequence number of a gradient in a single batch and the sequence number of the current historical round, express Each gradient and memory bank The cosine similarity distance calculated for each gradient in , Represents the gradient memory from which Select the subscript of the gradient that is closest to you, Remaining operation;
[0034] S33, the distinctive features Input to subsequent neural network The final output probability is obtained .
[0035] As a further solution of the present invention: the specific steps in S4 include:
[0036] S41. Construct a cross entropy loss function based on the final output probability, then use the loss function to perform gradient backpropagation to update the model parameters, and retain the optimal model parameters based on the validation set;
[0037] S42. Obtain the gradient corresponding to the feature selection layer of the neural network and update the gradient feature library.
[0038] As a further solution of the present invention: the specific steps in S5 include:
[0039] Repeat steps S3 and S4 until the model's loss function is lower than a preset threshold and converges, then stop training and use the test set to test the model performance;
[0040] According to the tested model, feature selection is performed on the acquired EEG and the results are output.
[0041] The technical solution of the second aspect provides a processing system including an EEG signal processing method based on a gradient memory bank as described in any one of the above items, including:
[0042] A preprocessing module is used to perform preprocessing and data division on the EEG data sampled by the subjects;
[0043] Gradient memory library management module, used to build and update the gradient memory library;
[0044] Feature optimization module, used to generate significant features and control their transmission in the neural network;
[0045] Model training module, used to optimize network parameters through back-propagation;
[0046] The test evaluation module is used to evaluate the classification performance of the test set and complete the feature selection of the acquired EEG.
[0047] The technical solution of the third aspect provides a device, further comprising:
[0048] at least one processor;
[0049] at least one memory for storing at least one program;
[0050] When the at least one program is executed by the at least one processor, the at least one processor implements the EEG signal processing method based on the gradient memory bank as described in any one of the above items.
[0051] The technical solution of the fourth aspect provides a storage medium storing processor-executable instructions, which, when executed by the processor, are used to implement an EEG signal processing method based on a gradient memory bank as described in any one of the above items.
[0052] Compared with the prior art, the present invention has the following technical effects:
[0053] Using the above technical solution, the raw EEG data is preprocessed and divided, and the gradient memory bank is initialized using fixed batch data. During model training, historical gradient features are dynamically matched to generate significant features to optimize information transmission between network layers. The model parameters and the gradient memory bank are synchronously updated in combination with the back propagation of the loss function, and finally the spike detection performance is optimized through iterative convergence.
[0054] By filtering historically optimal features from a gradient memory library to construct significant features, the system effectively enhances the neural network's ability to capture key features of epileptic spikes, improving classification accuracy by approximately 12%. Dynamically updating the gradient memory library using a first-in-first-out principle avoids redundant feature storage, shortens training cycles, and significantly reduces system hardware resource requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings:
[0056] Figure 1 This is a schematic diagram of the steps of the deep EEG feature selection method disclosed in the embodiment of this application;
[0057] Figure 2 This is an example of EEG slice data of the embodiment disclosed in this application;
[0058] Figure 3 This is a schematic diagram of the feature selection layer process of the embodiment disclosed in this application;
[0059] Figure 4 A schematic diagram of the gradient memory bank selection process according to the embodiment disclosed in this application;
[0060] Figure 5 This is a schematic diagram of the gradient memory library update process according to the embodiment disclosed in this application. DETAILED DESCRIPTION
[0061] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0062] Please refer to Figure 1 In an embodiment of the present invention, a method for processing EEG signals based on a gradient memory bank includes the following steps:
[0063] S1. Preprocess and segment the EEG data sampled from the subjects to obtain the training set, validation set, and test set of the segmented EEG. The specific steps include:
[0064] S11, EEG data collected during the interictal period of epileptic patients;
[0065] In a specific embodiment, by continuously collecting interictal EEG data of epileptic patients under different types of conditions for subsequent research;
[0066] S12, performing bandpass filtering and notch processing using bandpass filtering parameters of a preset frequency;
[0067] For example, the signal data collected from the EEG task sampling is band-pass filtered using a band-pass filter parameter of 1Hz~70Hz;
[0068] Use 60Hz notch filter parameters for notch filtering;
[0069] S13, removing heartbeat artifacts and eye shadow artifacts from the EEG data after bandpass filtering and notch processing by using an ICA decomposition and artifact component removal algorithm;
[0070] For example, based on the reference electrocardiogram (ECG) and electrooculogram (EOG) channels, the bandpass filtered data is decomposed and the artifact vector removal algorithm is used to process the heartbeat artifact and eye movement artifact;
[0071] Perform normalization on the data after artifact removal to obtain preprocessed EEG data;
[0072] In the above steps, the parameters used can be changed according to actual conditions.
[0073] S14. Finally, the EEG data is sliced and divided according to the labels to obtain the training set, validation set, and test set.
[0074] Specifically, the ratio of training set, validation set, and test set is .
[0075] like Figure 2 As shown, the figure shows an example of EEG slice data;
[0076] The specific data division of the preprocessed EEG data is as follows: the preprocessed EEG data is sliced 500ms before and after the time point of the event, and each marked point is sliced to obtain a 16×250-dimensional data. , where 16 represents 16 EEG channels, and 250 represents the total number of segment sampling points in 1 second, 500ms before and after, at a sampling rate of 250Hz.
[0077] The total number of , , The training set , validation set and test set , which are used to train the model, test the model training effect to select the optimal model, and test and verify the deep EEG spike feature selection model based on the gradient memory bank after training to judge the training effect of the neural network.
[0078] S2. Input the segmented EEG data of a fixed batch size into the neural network, obtain the output features and gradient features of the feature selection layer, and construct and initialize the gradient memory bank. The specific steps include:
[0079] S21, segmented EEG data with fixed round size Input gradient deactivation Layer Neural Network , the output features of any layer can be obtained , the formula is:
[0080] ;
[0081] in, Before use layer( )’s neural network processes the data, are neural network parameters, Indicates the current training round; represents the batch size parameter in deep learning model training, represents the number of EEG channels, represents the number of EEG sampling points, Represents output features The number of feature channel dimensions;
[0082] S22. According to the gradient direction propagation theorem, the gradient feature corresponding to the feature is obtained as follows: ; and construct a size of Gradient memory bank , the formula is:
[0083] ;
[0084] in The dimension size is , represents the size of the gradient memory bank, Represent the width and height dimensions of the features respectively.
[0085] In the specific implementation steps, set b=64, c=16, t=250, q=8, =32, w=32, h=8. The main neural network model is based on the SpikeNet network model (Development of Expert-Level Automated Detection of Epileptiform Discharges During Electroencephalogram Interpretation) to extract features from EEG signals. The SpikeNet network consists of 11 layers. The 7th layer of SpikeNet is selected as the neural network feature selection layer. The output feature shape is the same as the gradient shape, which can be expressed as and . Gradient feature library Initialized to an array of all zeros.
[0086] S3. Input the training set data in batches, match the historical gradient features with the gradient memory bank, fuse the generated significant features and input them into the remaining layers of the network to obtain the output probability. The specific steps include:
[0087] S31, fix the batch size Batch EEG segmentation data Input network model Before layer , get the output features of the current batch of data, the formula is:
[0088] ;
[0089] in, , are neural network parameters;
[0090] Specifically, the seventh layer of SpikeNet is selected as the feature selection layer, and the EEG segmentation data obtained after data preprocessing in step S1 is The batches are fed into the first 7 layers of SpikeNet, and the output size is Features ;
[0091] The process can be expressed as:
[0092] ;
[0093] S32, based on cosine similarity, from the gradient memory library Selection and gradient features Recent memory features , using memory features and Jointly build salient features , the specific formula is:
[0094]
[0095]
[0096]
[0097] in, express Each gradient and memory bank The cosine similarity distance calculated for each gradient in , Represents the gradient memory from which Select the subscript of the gradient that is closest to you, Remaining operation;
[0098] Specifically, such as Figure 3 As shown in the figure, it is a schematic diagram of the feature selection layer process. The cosine similarity measurement method is used to find the memory feature that is most similar to the gradient feature of the feature selection layer in the previous round from the gradient memory library, and the memory feature is used together with the output feature to construct a significant feature. The specific steps are:
[0099] Based on the cosine similarity, calculate the gradient obtained in S31 With gradient memory The closest feature .
[0100]
[0101]
[0102] ]
[0103] in, Respectively represent the sequence number of a gradient in a single batch and the sequence number of the current historical round, st represents each gradient and memory bank The cosine similarity calculated for each gradient in has the dimension 12, Indicates the feature number selected from the feature memory based on the cosine similarity, a total of 64, Indicates selecting the K gradient subscripts with the greatest similarity from the feature memory library. Indicates the remainder operation. Then based on and The specific steps to construct significant features are as follows:
[0104]
[0105] First, the nearest gradient features selected from the gradient storage library are calculated in the batch dimension. The average of the gradient features of the j-1th round after attenuation by multiplying the attenuation coefficient γ element by element is taken, and multiplied by the momentum coefficient m and 1-m respectively to obtain the feature statistics .in represents the average pooling operation;
[0106] In this embodiment, the momentum coefficient m is taken as 0.1, and the attenuation coefficient Take 0.9.
[0107]
[0108]
[0109]
[0110] in, express The corresponding subscript of the longitudinal feature in the feature, in this embodiment, , represents batch normalization, Represents an activation function that converts the feature statistics Multiply the features element by element, normalize each element through a batch normalization operation and a Sigmoid function, and finally calculate the channel dimension element by element in the time and space dimensions. The channel with the largest amount of information is normalized to .
[0111]
[0112] The output features are added to the gradient enhancement features element by element to obtain the salient features .in, Size is , is Pooling along the batch dimension The vector whose dimensions are taken.
[0113] S33, the distinctive features Input to subsequent neural network The final output probability is obtained .
[0114] Specifically, such as Figure 4 As shown in the figure, it is a schematic diagram of the gradient memory library selection process, which will Input to subsequent neural network The final output features are obtained The formula is:
[0115]
[0116] Then, the output feature input is fed into the classifier to obtain the spike classification probability of the final output of the SpikeNet model. , the formula is:
[0117]
[0118] in, is an activation function, is a fully connected neural network layer.
[0119] S4. Based on the output probability, that is, the spike classification prediction result Calculate the loss function, backpropagate to update the model parameters, and synchronously update the features in the gradient memory bank. The specific steps include:
[0120] Specifically, based on the output spike classification prediction results, a loss function is constructed, and the model parameters are updated through back propagation to obtain new gradient features; based on the new gradient features, the gradient memory library is updated, such as Figure 5 As shown, the figure is a schematic diagram of the gradient memory library update process;
[0121] S41. Construct a cross entropy loss function based on the final output probability, then use the loss function to perform gradient backpropagation to update the model parameters, and retain the optimal model parameters based on the validation set;
[0122] Specifically, based on the spike classification prediction results, the binary cross entropy loss function of the model can be constructed for backpropagation to update the model parameters to achieve the purpose of training the model. The cross entropy loss function is as follows:
[0123]
[0124] in, represents the mean of the loss function of all segmented EEG data on the model, is the zero-dimensional true label for each segmented EEG data, represents the zero-dimensional true label of the j-th segmented EEG data, 0 means there is no spike in the segmented EEG data, 1 means there is a spike in the segmented EEG data, represents the total number of slices of all EEG data in the training set, Represents the predicted probability of the EEG task classification corresponding to the j-th segment EEG data.
[0125]
[0126] The model parameters are updated for N rounds. At the end of the training, the deep EEG spike feature selection model based on the gradient memory bank after training is tested on the validation set. Test verification is carried out to verify the training effect. If the effect does not meet the preset requirements, the training set will be used to continue training until the training effect meets the preset requirements, and the loss function is retained. Minimum model parameters ,in and In the validation set The labels of the data slices and the predicted probabilities of the model.
[0127] S42. Obtain the gradient corresponding to the feature selection layer of the neural network and update the gradient feature library.
[0128] Get the gradient corresponding to the feature selection layer of the neural network and update the gradient memory library The specific steps are:
[0129] The gradient memory is a queue data structure that follows the first-in-last-out principle and stores the gradient features extracted from the 7th layer of SpikeNet in the j-1th round. Fill in the gradient memory bank and multiply all features stored in the gradient memory bank by the attenuation coefficient to complete the update.
[0130]
[0131] S5. Repeat steps S3-S4 until the model converges. Finally, the classification performance is evaluated using the test set to complete feature selection of the acquired EEG. The specific steps include:
[0132] Repeat steps S3 and S4 until the model's loss function is lower than a preset threshold and converges, then stop training and use the test set to test the model performance;
[0133] According to the tested model, feature selection is performed on the acquired EEG and the results are output.
[0134] Repeat steps S3 and S4. When the model loss function is below a certain threshold, that is, convergence, stop training and use the test set to test the model performance. The specific steps are:
[0135] when hour,
[0136] in, The parameters saved for the final model, ε It is a fixed threshold constant, and its value is generally set to 0.001.
[0137] In summary, through steps S1 to S5, the deep EEG spike feature selection method based on a gradient memory bank enhances the features of segmented EEG data, suppressing a large amount of background noise in the EEG data while fully utilizing historical model training information. In this embodiment, the proposed feature enhancement method was applied to an advanced temporal spike detection model, improving the model's accuracy from 90.78% to 93.58%, a 2.80% improvement. Simultaneously, the F1-score also increased from 89.75% to 90.79%, a 1.04% improvement.
[0138] The technical solution of the second aspect provides a processing system including an EEG signal processing method based on a gradient memory bank as described in any one of the above items, including:
[0139] A preprocessing module is used to perform preprocessing and data division on the EEG data sampled by the subjects;
[0140] Gradient memory library management module, used to build and update the gradient memory library;
[0141] Feature optimization module, used to generate significant features and control their transmission in the neural network;
[0142] Model training module, used to optimize network parameters through back-propagation;
[0143] The test evaluation module is used to evaluate the classification performance of the test set and complete the feature selection of the acquired EEG.
[0144] The technical solution of the third aspect provides a device:
[0145] at least one processor;
[0146] at least one memory for storing at least one program;
[0147] When the at least one program is executed by the at least one processor, the at least one processor implements the above-mentioned method for processing electroencephalogram signals based on a gradient memory bank.
[0148] The contents of the above method embodiments are all applicable to the present device embodiments. The functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0149] The technical solution of the fourth aspect provides a storage medium, which stores processor-executable instructions. When the processor executes the processor, the processor-executable instructions are used to implement the above-mentioned EEG signal processing method based on the gradient memory bank.
[0150] When these stored instructions are read and executed by a processor (such as the processor in the aforementioned device), they precisely guide the processor through a series of operations, ultimately achieving the complete process and functionality of a gradient memory-based EEG signal processing method as described above. In other words, the storage medium is the carrier for the code that stores the EEG signal processing method. When the code is executed by the processor, the functionality of the method is realized in hardware.
[0151] Although the embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations may be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents, and all should be included within the scope of protection of the present invention.
Claims
1. A method for processing electroencephalogram (EEG) signals based on a gradient memory bank, characterized in that: The following steps are involved: S1. Preprocess and divide the EEG data sampled by the subjects to obtain the training set, validation set, and test set of the segmented EEG; S2. Input the segmented EEG data of a fixed batch size into the neural network, obtain the output features and gradient features of the layer to be feature selected, and construct and initialize the gradient memory bank, where the layer to be feature selected is any layer of the neural network; S3: Input the training set data in batches, match the historical gradient features with the gradient memory bank, fuse the generated significant features and input them into the remaining layers of the network to obtain the output probability; The gradient memory bank is constructed by inputting segmented EEG data of a fixed round size into a neural network, obtaining the output features of any layer, and then obtaining the gradient features corresponding to the output features; The salient features are constructed by inputting fixed batch size of EEG segmented data into the network model, obtaining the output features of the current batch of data, and combining them with the memory features closest to the gradient features selected from the gradient memory bank; S4. Calculate the loss function based on the output probability, back-propagate and update the model parameters, and simultaneously update the features in the gradient memory bank; S5. Repeat steps S3-S4 until the model converges, and finally evaluate the classification performance through the test set to complete the feature selection of the acquired EEG.
2. The method for processing electroencephalogram signals based on a gradient memory bank according to claim 1, characterized in that: The specific steps in S1 include: S11, EEG data collected during the interictal period of epileptic patients; S12, performing bandpass filtering and notch processing using bandpass filtering parameters of a preset frequency; S13, removing heartbeat artifacts and eye shadow artifacts from the EEG data after bandpass filtering and notch processing by using an ICA decomposition and artifact component removal algorithm; S14. Finally, the EEG data is sliced and divided according to the labels to obtain the training set, validation set, and test set.
3. The method for processing EEG signals based on a gradient memory bank according to claim 2, characterized in that: The ratio of the training set, validation set, and test set is .
4. The method for processing EEG signals based on a gradient memory bank according to claim 3, characterized in that: The specific steps in S2 include: S21. Fixed batch size of segmented EEG data Input gradient deactivation Layer Neural Network , the output features of any layer can be obtained , the formula is: in, Before use layer( )’s neural network processes the data, are neural network parameters, Indicates the current training round; represents the batch size parameter in deep learning model training, represents the number of EEG channels, represents the number of EEG sampling points, Represents output features The number of feature channel dimensions; S22. According to the gradient direction propagation theorem, the gradient feature corresponding to the feature is obtained as follows: ; and construct a size of Gradient memory bank , the formula is: in The dimension size is , represents the size of the gradient memory bank, Represent the width and height dimensions of the features respectively.
5. The method for processing electroencephalogram signals based on a gradient memory bank according to claim 4, characterized in that: The specific steps in S3 include: S31, fix the batch size Batch EEG segmentation data Input network model Before layer , get the output features of the current batch of data, the formula is: in, , are neural network parameters; S32, based on cosine similarity, from the gradient memory library Selection and gradient features Recent memory features , using memory features and Jointly build salient features , the specific formula is: in, They represent the sequence number of a gradient in a single batch and the sequence number of the current historical round, express Each gradient and memory bank The cosine similarity distance calculated for each gradient in , Represents the gradient memory from which Select the subscript of the gradient that is closest to you, Indicates the remainder operation; S33, the distinctive features Input to subsequent neural network The final output probability is obtained .
6. The method for processing EEG signals based on a gradient memory bank according to claim 1, characterized in that: The specific steps in S4 include: S41. Construct a cross entropy loss function based on the final output probability, then use the loss function to perform gradient backpropagation to update the model parameters, and retain the optimal model parameters based on the validation set; S42. Obtain the gradient corresponding to the feature selection layer of the neural network and update the gradient feature library.
7. The method for processing EEG signals based on a gradient memory bank according to claim 1, characterized in that: The specific steps in S5 include: Repeat steps S3 and S4 until the model's loss function is lower than a preset threshold and converges, then stop training and use the test set to test the model performance; According to the tested model, feature selection is performed on the acquired EEG and the results are output.
8. A processing system comprising the EEG signal processing method based on a gradient memory bank according to any one of claims 1 to 7, characterized in that: include: A preprocessing module is used to perform preprocessing and data division on the EEG data sampled by the subjects; Gradient memory library management module, used to build and update the gradient memory library; Feature optimization module, used to generate significant features and control their transmission in the neural network; Model training module, used to optimize network parameters through back-propagation; The test evaluation module is used to evaluate the classification performance of the test set and complete the feature selection of the acquired EEG.
9. A computing device, characterized in that: Also includes: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the EEG signal processing method based on the gradient memory bank as described in any one of claims 1 to 7.
10. A storage medium storing instructions executable by a processor, characterized in that: The processor-executable instructions, when executed by the processor, are used to implement the EEG signal processing method based on a gradient memory bank as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Combined detection method of electroencephalogram epilepsy sharp and spike wave discharge based on long short term memory network (LSTM) multi-channels
CN111150393A
Emotion electroencephalogram recognition method of class-level informed discriminator against resistance domain adaptation network
CN117493849A