Electroencephalogram feature enhancement method and device based on discrete wavelet transform, equipment and medium

By decomposing EEG signals using discrete wavelet transform and combining it with a consistency constraint loss function, the problems of feature destruction and unstable training effects in existing EEG data augmentation methods are solved, resulting in better model generalization ability and classification accuracy.

CN119917993BActive Publication Date: 2025-11-11SOUTH CHINA UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411775543.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-11-11
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

Existing EEG data augmentation methods may destroy the features of the original data during the augmentation process, rely on the similarity between the distribution of training data and test data, have unstable training effects, and are difficult to improve the generalization ability of the model on small datasets.

Method used

Discrete wavelet transform is used to decompose EEG signals, and features are extracted and enhanced from approximate and detail signals respectively. The model is optimized by consistency constraint loss function to generate diverse enhanced features and improve the model's generalization ability.

Benefits of technology

It effectively preserves the category-related information of the original data, generates diverse augmented samples, and improves the model's generalization performance and classification accuracy on different datasets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119917993B_ABST
    Figure CN119917993B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, device, and medium for enhancing EEG features based on discrete wavelet transform. The method includes: acquiring EEG data; preprocessing the EEG data to obtain EEG signals; performing discrete wavelet decomposition on the EEG signals to obtain approximate signals and detail signals; slicing the approximate signals and detail signals respectively, and extracting features to obtain detail signal features and approximate signal features; enhancing the detail signal features and concatenating them with the approximate signal features to obtain enhanced features; inputting the original features and enhanced features into a model respectively, and training the model; wherein, consistency constraints are used to ensure that the classification results of the original features and the classification results of the enhanced features are similar. This invention uses discrete wavelet transform to decompose the signal before enhancement, avoiding the destruction of category-related features during enhancement and improving the generalization ability of the model. This invention can be widely applied in the field of EEG.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electroencephalography (EEG), and more particularly to a method, apparatus, device, and medium for enhancing EEG features based on discrete wavelet transform. Background Technology

[0002] Brain-computer interfaces (BCIs) are a hot research area in artificial intelligence, enabling people to convert brain signals into computer commands for interacting with external devices without relying on traditional muscle or neural pathways, and thus have broad application prospects. Non-invasive EEG signals are a commonly used physiological electrical signal in BCIs, applicable to various scenarios such as emotion recognition, epilepsy diagnosis, and sleep analysis. Compared to invasive EEG signals, non-invasive EEG signals have advantages such as lower acquisition difficulty, no harm to subjects, and high acceptance, making them promising for applications in medical rehabilitation, emotion recognition, and other fields, and possessing significant research value.

[0003] With the development of deep learning, data-driven neural network models have achieved good performance on multiple EEG classification tasks. However, the application of deep learning in the field of EEG still faces some challenges. One of the most prominent issues is the lack of high-quality, large-scale datasets. Models trained on small datasets struggle to guarantee generalization ability. Firstly, EEG caps, the devices used to acquire EEG signals, can have various channel configurations, such as 32, 64, and 128 channels, leading to variations in training data and making it difficult to directly combine multiple datasets. Secondly, because signal annotation for some tasks, such as sleep stage diagnosis, requires specialized medical knowledge and can only be correctly annotated by doctors, the annotation cost for some EEG data is high. For these reasons, compared to fields like computer vision and natural language processing, the field of EEG has consistently lacked a large-scale, high-quality labeled dataset. In the absence of high-quality datasets, researchers in the field of EEG often use various data augmentation methods to improve the generalization ability of neural networks, ensuring that the model can handle diverse EEG data in real-world applications and avoiding performance degradation due to differences in the distribution of training data and real-world application data.

[0004] Existing EEG data augmentation methods all have certain shortcomings and require further optimization. Specifically, in the field of EEG signal classification, current data augmentation mainly falls into two categories: rule-based augmentation of the original signal and the addition of training samples based on Generative Adversarial Networks (GANs). Rule-based augmentation methods include adding random noise, temporal reversal, and bandpass filtering. These methods suffer from drawbacks, such as the need to adjust augmentation coefficients and the potential for modification of statistical features like mean and variance, and disruption of temporal characteristics, thus not necessarily yielding positive results in practical applications. GAN-based synthetic data methods primarily involve training a generative neural network, fitting the distribution of the training set data, sampling from the distribution to generate new synthetic data, and then using this synthetic data to train the classification model, thereby increasing the amount of training data and improving model performance. However, GAN-based data augmentation methods also have some limitations. First, GANs may exacerbate the imbalance problem when synthesizing data in training data with class imbalance. Second, GAN models synthesize new samples based on training data, and when the distribution of test samples differs significantly from that of training samples, the model's performance may be poor after training with the generated samples. Furthermore, GANs suffer from pattern collapse and other issues during training, making the training process unstable.

[0005] In summary, existing EEG data augmentation methods have problems such as potentially damaging the original data, relying on the similarity between the distribution of the original data and the test data, and unstable training effects, and there is room for improvement. Summary of the Invention

[0006] In order to at least partially solve one of the technical problems existing in the prior art, the present invention aims to provide a method, device, equipment and medium for enhancing EEG features based on discrete wavelet transform.

[0007] The first technical solution adopted in this invention is:

[0008] A method for enhancing EEG features based on discrete wavelet transform includes the following steps:

[0009] Acquire EEG data, preprocess the EEG data, and obtain EEG signals;

[0010] Discrete wavelet decomposition is performed on EEG signals to obtain approximate and detail signals;

[0011] The approximate signal and the detail signal are sliced ​​separately, and feature extraction is performed to obtain detail signal features and approximate signal features; the detail signal features and approximate signal features are then concatenated to obtain the original features;

[0012] After performing feature enhancement processing on the detailed signal features, they are concatenated with the approximate signal features to obtain the enhanced features;

[0013] The original features and augmented features are input into the model separately to train the model; consistency constraints are used to make the classification results of the original features and the classification results of the augmented features approximate each other.

[0014] Furthermore, the acquisition of EEG data and the preprocessing of the EEG data to obtain EEG signals include:

[0015] The EEG data is uniformly converted into segments with preset frequencies and preset durations, which are used as sample data;

[0016] Within each sample data, the signals of each channel are normalized according to the 95th percentile of the absolute value of the signal as the maximum value to obtain the EEG signal.

[0017] Furthermore, the step of performing discrete wavelet decomposition on the EEG signal to obtain approximate and detail signals includes:

[0018] The EEG signal is decomposed into approximate signal coefficients and detail signal coefficients by discrete wavelet transform;

[0019] Based on the corresponding coefficients, the approximate signal and the detail signal are reconstructed using wavelet transform inverse transform.

[0020] Furthermore, the step of slicing the approximate signal and the detail signal separately, and then extracting features to obtain detail signal features and approximate signal features, includes:

[0021] The approximate signal and the detail signal are sliced ​​in the sampling dimension, and the length of each slice is t sampling times. Two adjacent slices overlap by x samples.

[0022] After obtaining the slice data, the time sequence of each slice is fed into the feature extraction module to obtain the detail signal features H. d and approximate signal characteristics H a The feature extraction module consists of a short-time Fourier transform and a multilayer perceptron, and is used to extract features from time-series signals.

[0023] Furthermore, the step of performing feature enhancement processing on the detailed signal features and then concatenating them with the approximate signal features to obtain enhanced features includes:

[0024] detail signal features H d The input is processed by the feature enhancement module, which generates new enhanced detail signal features. These enhanced detail signal features are then concatenated with the approximate signal features to obtain the enhanced features.

[0025] The feature enhancement module operates as follows:

[0026] First, calculate the mean and variance of the features across each channel and time slice dimension;

[0027] After obtaining the mean and variance of each channel and time slice dimension, a Gaussian distribution is used to model the distribution of the mean and variance of each channel;

[0028] The distribution representing the mean and variance is adjusted using the parameter β, and then new mean and variance for each channel and time slice dimension are sampled from the new distribution.

[0029] The original features are renormalized using new mean and variance coefficients to synthesize more diverse data and obtain enhanced detail signal features, denoted as...

[0030] Furthermore, the step of inputting the original features and enhanced features into the model respectively to train the model includes:

[0031] The original signal features and the enhanced features are respectively fed into the encoder; the encoder is composed of N layers of LinearTransformers stacked end to end;

[0032] The encoder output is subjected to temporal average pooling and then fed into the classifier to obtain the classification result.

[0033] Furthermore, the total loss of the training model includes consistency loss and classification cross-entropy loss;

[0034] The consistency loss function is expressed as follows:

[0035]

[0036] In the formula, Θ(H l )and These represent the model outputs for the original features and the enhanced features, respectively, where Θ represents the model; p(x l (τ) represents the Softmax operation with a temperature coefficient, where the temperature coefficient τ controls the entropy of the predicted probability result; n is the number of EEG samples in each batch during model training; x l This represents the feature of a single sample, where l represents the index of the sample (the l-th sample).

[0037] The second technical solution adopted in this invention is:

[0038] A device for enhancing EEG features based on discrete wavelet transform, comprising:

[0039] The data acquisition module is used to acquire EEG data, preprocess the EEG data, and obtain EEG signals;

[0040] The signal decomposition module is used to perform discrete wavelet decomposition on EEG signals to obtain approximate and detail signals.

[0041] The feature extraction module is used to slice the approximate signal and the detail signal respectively, and then extract features to obtain the feature of the detail signal and the feature of the approximate signal.

[0042] The feature enhancement module is used to enhance the feature of detailed signal and then concatenate it with the feature of approximate signal to obtain enhanced features;

[0043] The model training module is used to input the original features and the enhanced features into the model to train the model; among them, consistency constraints are used to make the classification results of the original features and the classification results of the enhanced features approximate each other.

[0044] The third technical solution adopted in this invention is:

[0045] An electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement a discrete wavelet transform-based EEG feature enhancement method as described above.

[0046] The fourth technical solution adopted in this invention is:

[0047] A computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement an EEG feature enhancement method based on discrete wavelet transform as described above.

[0048] The fifth technical solution adopted in this invention is:

[0049] A computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned method for enhancing electroencephalogram (EEG) features based on discrete wavelet transform.

[0050] The beneficial effects of this invention are as follows: This invention uses discrete wavelet transform to decompose the signal before enhancement, avoiding the destruction of class-related features during enhancement. In the enhancement scheme, a scheme controlling statistical features is selected, amplifying the feature distribution to provide a larger feature sampling space and synthesizing more diverse enhanced sample data. Finally, a consistency constraint loss is introduced to fully guide the model to output prediction results consistent with the original features, more effectively improving the model's generalization ability. Attached Figure Description

[0051] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following description is provided with accompanying drawings of the relevant technical solutions in the embodiments of the present invention or the prior art. It should be understood that the accompanying drawings described below are only for the purpose of clearly illustrating some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0052] Figure 1 This is a schematic diagram representing electroencephalogram (EEG) data;

[0053] Figure 2 This is a schematic diagram illustrating an example of discrete wavelet transform decomposition of EEG data;

[0054] Figure 3 This is a schematic diagram of the Linear Transformer structure;

[0055] Figure 4 This is a schematic diagram of the overall structure of the model according to an embodiment of the present invention;

[0056] Figure 5 This is a flowchart illustrating the steps of an EEG feature enhancement method based on discrete wavelet transform in an embodiment of the present invention. Detailed Implementation

[0057] The embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention. The step numbers in the following embodiments are set only for ease of explanation, and there is no limitation on the order between the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.

[0058] In the description of this invention, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., are based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting this invention.

[0059] In the description of this invention, "several" means one or more, "more than" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.

[0060] In the description of this invention, unless otherwise explicitly defined, terms such as "set up," "install," and "connect" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.

[0061] Technical explanation:

[0062] (1) EEG signal data

[0063] like Figure 1 The image shows electroencephalogram (EEG) data. EEG data is typically acquired using an EEG cap, and the number of channels and sampling frequency are determined by the cap's hardware and parameter settings. The EEG signal is defined as X∈R. C×T Where C represents the number of channels and T represents the time frame. T is obtained by multiplying the sampling frequency by the sampling duration.

[0064] (2) Discrete wavelet transform and inverse discrete wavelet transform

[0065] See Figure 2 The Discrete Wavelet Transform (DWT) decomposes a time-series signal into approximate signal coefficients and detail signal coefficients from a frequency perspective. During the transform, the original signal is input to a high-pass filter and outputs detail signal coefficients, while it is input to a low-pass filter and outputs approximate signal coefficients. The bandpass range of the filter is determined by the wavelet basis class selected in the DWT and the sampling frequency of the input signal. The specific transform process can be expressed by the following formula:

[0066] C Al C Dl =DWT(X)

[0067] C Dl =h★X

[0068] CAl =g★X

[0069] Where X is the input signal, C Al C Dl These represent the approximate signal coefficients and the detail signal coefficients. h and g correspond to the high-pass filter and the low-pass filter, respectively.

[0070] The inverse wavelet transform can reconstruct the corresponding signal components from the signal coefficients. For example, the approximate signal coefficients correspond to the approximate time series signal, and the detail signal coefficients correspond to the detail time series signal. The specific formula is as follows:

[0071] X = IDWT(C Al C Dl )

[0072] =h′★C Dl +g′★C Al ,

[0073] X detail =IDWT(C Dl ,0)

[0074] =h′★C Dl ,

[0075] X appro =IDWR(0,C Al )

[0076] =g′★C Al ,

[0077] h′ and g′ correspond to symmetrical filters, a high-pass filter and a low-pass filter, respectively. X detail With X appro This represents the detailed signal and the approximate signal. As follows: Figure 2 This is an example of decomposing continuous EEG signals into detailed signals and approximate signals. Figure 2 In this diagram, Original Signal represents the original signal, Approx Signal represents the approximate signal, and Detail Signal represents the detailed signal. It's clear that the approximate signal more closely resembles the fluctuations of the original signal and contains its main information, while the detailed signal fluctuates at a higher frequency and may contain more noise.

[0078] (3) Linear attention layer (Linear Transformer)

[0079] The Transformer model uses a self-attention mechanism, and its computational complexity is typically quadratic with the input length, while the Linear Transformer's computational complexity is linear. The main difference between the Linear Transformer and the Transformer lies in the use of a linear attention mechanism, which reduces computational complexity through a low-rank matrix. Let... For the features input to the neural network, W K W V , This refers to the KVQ matrix in the attention mechanism. For a low-rank matrix, the calculation process for linear attention is as follows:

[0080]

[0081] The Linear Transformer mainly consists of a linear attention layer, a fully connected layer, and a normalization layer, as shown in the following structure. Figure 3 Because EEG signals have high temporal resolution and low signal-to-noise ratio, and the information contained in EEG data is relatively sparse compared to modalities such as text and images, using Linear Transformer to extract features from the data can still achieve results comparable to those of using Transformer alone. Therefore, using Linear Transformer as a neural network layer in EEG tasks can achieve a balance between accuracy and speed.

[0082] (4) Rule-based EEG data augmentation methods

[0083] Rule-based augmentation schemes for EEG time-series data commonly fall into two categories: time-domain data augmentation and frequency-domain data augmentation. In the time domain, common augmentation methods include randomly rearranging signal segments, randomly adding Gaussian noise, and randomly zeroing out portions of the signal. In the frequency domain, augmentation methods include randomly zeroing out high-frequency or low-frequency components. Depending on the dataset and the augmentation method used, these methods require multiple trials to adjust the model parameters.

[0084] Rule-based EEG data augmentation methods have two main drawbacks. First, they require adjustments to augmentation strategies and coefficients, as inappropriate methods and coefficients can lead to a decline in the model's classification performance. Second, these methods suffer from limitations such as altering statistical characteristics like the mean and variance, and disrupting temporal features. This results in a greater discrepancy between the model's performance on the training and testing sets, failing to meet the need to improve the model's generalization ability.

[0085] (5) Generative EEG data augmentation methods

[0086] Generative EEG data augmentation methods utilize Generative Adversarial Networks (GANs) to augment training samples. A GAN consists of two competing neural networks: a generator and a discriminator. These two sub-networks compete against each other during training to optimize the synthesized data. The generator aims to produce data that is as realistic as possible. It receives random noise as input and transforms it into data through the neural network, ideally indistinguishable from real data. The discriminator's task is to distinguish between the fake data generated by the generator and the real data in the actual dataset. It receives the input data and outputs a probability representing the likelihood that the input data is real. In the field of EEG, deep convolutional networks are often used as the network architecture for the generator and discriminator. The data generated by the generator is used to train a classification model, thereby improving the classification accuracy of the model.

[0087] The core of GAN-based data synthesis methods involves training a generative neural network, fitting the distribution of the training data, and sampling from that distribution to generate new synthetic data. However, this approach also has some limitations. First, GANs may exacerbate the imbalance problem when synthesizing data from imbalanced training data. During training, a larger number of classes will influence the learning of the generative model, causing it to favor generating data from a particular class. Second, since GAN models synthesize new samples based on training data, their performance may be poor when the distribution of test samples differs significantly from that of the training samples. Furthermore, GANs suffer from pattern collapse during training, leading to instability.

[0088] Currently, traditional data augmentation methods in the field of EEG have the drawbacks of altering statistical features and destroying original characteristics, while GAN-based methods suffer from training difficulties and cannot handle distribution shifts between the test and training sets. To address these issues, this invention proposes an EEG feature augmentation method based on discrete wavelet transform, which improves the model's robustness and enables better performance across individual tasks.

[0089] To avoid directly destroying the features of the original data and to preserve as much category-related information as possible, this invention designs a discrete wavelet decomposition module to decompose the original signal into approximate and detail signals, and then performs feature enhancement on the detail signals. In the feature enhancement module, the statistical data of the features is adjusted, and sampling is then performed from the new statistical features to obtain the enhanced detail signal features. The approximate signal features and the detail signal features are then combined to obtain the original signal features, and the approximate signal features are further combined with the enhanced detail signal features to obtain the enhanced features. A consistency loss is introduced to constrain the prediction results of the enhanced and original signal features, improving the model's generalization ability to different data.

[0090] Example 1

[0091] like Figure 4 and Figure 5 As shown, this embodiment provides a method for enhancing EEG features based on discrete wavelet transform, specifically including the following steps:

[0092] S1. Acquire EEG data, preprocess the EEG data, and obtain EEG signals.

[0093] In some embodiments, during the dataset preprocessing stage, the EEG data is uniformly converted into 200Hz, 10-second segments. Within each sample data, the EEG signals of each channel are normalized according to the 95th percentile of the absolute value of the signal as the maximum value.

[0094] S2. Perform discrete wavelet decomposition on the EEG signal to obtain approximate and detail signals.

[0095] See Figure 4 Within the model, the signal is first decomposed into approximate and detail signals using a discrete wavelet decomposition module. Specifically, the EEG time-series signal is first decomposed into approximate signal coefficients and detail signal coefficients using discrete wavelet transform. Based on the corresponding coefficients, the approximate and detail signals are reconstructed using inverse wavelet transform.

[0096] S3. Perform slicing operations on the approximate signal and the detail signal respectively, and extract features to obtain the feature of the detail signal and the feature of the approximate signal.

[0097] After obtaining the approximate signal and the detail signal, the two signals are sliced ​​separately, and features are extracted by Fourier transform and a fully connected network.

[0098] In one alternative implementation, step S3 includes the following steps:

[0099] S31. Obtain the approximate signal and the detail signal respectively. Slice the two signals along the sampling dimension, with each slice having a length of t sampling times. Two adjacent slices overlap by z samples. In this patent, t is 200 and z is 100. For the input signal X... detail ,X appro ∈R C×T It can be divided into S[i,(tz)(j-1):(tz)(j-1)+t], where i represents the channel and j represents the time series number of the slice.

[0100] S32. After obtaining the slice data, the time series data of each slice is fed into the feature extraction module. The feature extraction module consists of a short-time Fourier transform and a multilayer perceptron, which can extract features from the time series signal. The feature corresponding to the detail signal is H.d The approximate signal characteristics are H a .

[0101] S4. After performing feature enhancement processing on the detailed signal features, they are concatenated with the approximate signal features to obtain the enhanced features.

[0102] Detailed signal characteristics H d After being fed into the feature enhancement module, new enhanced detail signal features will be generated. By splicing the enhanced detail signal features with the approximate signal features, the enhanced features can be obtained.

[0103] Specifically, in the feature enhancement module, the mean and variance of the features are first calculated across each channel and time slice dimension, as shown in the following expression:

[0104]

[0105] B m D n C represents the batch dimension and the feature dimension. i ,P j Corresponding to channel dimension and time segment dimension.

[0106] After obtaining the mean and variance of each channel and time slice, a Gaussian distribution is used to model the distribution of the mean and variance of each channel. The specific calculation method is as follows:

[0107]

[0108] Next, the parameter β is used to adjust the distribution representing the mean and variance, and then new means and variances for each channel and time slice dimension are sampled from the new distribution. When β > 1, the space of the feature distribution can be expanded:

[0109]

[0110] The original features are renormalized using new mean and variance coefficients, thereby synthesizing more diverse data and improving the robustness of the model.

[0111]

[0112] That is, the enhanced detail signal characteristics.

[0113] S5. Input the original features and the enhanced features into the model respectively, and train the model; among them, use consistency constraints to make the classification results of the original features and the classification results of the enhanced features approximate each other.

[0114] The original signal features are obtained by combining approximate signal features and detail signal features, while the enhanced features are obtained by combining approximate signal features and enhanced detail signal features.

[0115] The original signal features and the enhanced features are respectively fed into the encoder. The encoder is composed of N layers of LinearTransformers stacked end to end; in this embodiment, the number of layers N=4 is selected.

[0116] The encoder output is subjected to temporal average pooling and then fed into a fully connected layer to obtain the classification result. The cross-entropy loss function is calculated based on the classification result of the original signal features predicted by the model and the signal's category label.

[0117] This embodiment also references related work, introducing a consistency loss to constrain the prediction results of enhanced features and original signal features, thereby improving the model's generalization ability to different data. The consistency loss function expression is as follows:

[0118]

[0119] In the formula, Θ(H l )and Θ represents the model output results for the original features and the enhanced features, respectively, where Θ represents the model. p(x l (τ) represents a Softmax operation with a temperature coefficient, where the temperature coefficient τ controls the entropy of the predicted probability result. In this embodiment, τ is selected as... A value of 0.5 or 1 controls the entropy of the enhanced feature prediction output to be smaller.

[0120] The final model training loss function is a weighted sum of the cross-entropy loss function and the consistency loss function.

[0121] Experimental Validation: The method of this invention was tested on the TUAB and TUEV EEG datasets. The TUAB dataset mainly classifies EEG data from normal individuals into those with abnormal EEG data. TUEV is a 6-category dataset for epilepsy monitoring and assessment, including spikes and sharp waves (SPSW), generalized periodic epileptiform discharges (GPED), periodic lateralized epileptiform discharges (PLED), eye movement (EYEM), artifacts (ARTF), and background (BCKG). The model achieved a balance accuracy of 80.01%, an AUC of 88.71%, and an AUROC of 88.56% on the TUAB dataset. On the TUEV dataset, the model achieved a balance accuracy of 49.78%, a kappa score of 54.38%, and an F1 score of 76.54%.

[0122] In summary, compared with the prior art, the present invention has the following advantages and beneficial effects:

[0123] (1) This invention addresses the shortcomings of current augmentation methods, which are greatly affected by differences in data distribution. By using discrete wavelet decomposition, feature enhancement, and consistency constraints, more diverse features are generated, enhancing the generalization ability of the model and achieving higher classification accuracy. Other data augmentation schemes directly enhance or generate the original signal, which may destroy class-related features or fail to balance the diversity of enhancement with the invariance of sample class, leading to class changes in the original signal when the enhancement is significant. This scheme decomposes the signal into contour signals, which are strongly correlated with class information, and detail signals, which are weakly correlated with class information. Data augmentation is performed on the detail signals, which can balance the diversity of enhancement with the class invariance of the enhanced samples, and can generate correct enhanced samples well, thus improving the generalization ability of the model.

[0124] (2) This invention uses discrete wavelet transform and inverse transform to decompose and reconstruct the EEG temporal signal. The EEG is decomposed into detail signals and approximate signals, and different feature extractors are used to mine features from these two different levels of signals. Existing EEG data is often extracted as a whole in terms of temporal sequence, which ignores the differences in information contained in the contour signals and approximate signals. Decomposing the signal and using different feature extractors helps the extractors focus on the unique information of each component, enabling more effective feature mining at different levels.

[0125] (3) This invention adjusts the mean and variance of the distribution of the EEG detail temporal signal features obtained from the decomposition to achieve feature enhancement. A Gaussian distribution is used to model the distribution of features of each EEG channel in the temporal dimension. By adjusting the statistical characteristics of the distribution's mean and variance, new detail signal features are synthesized, achieving feature data enhancement. Most existing temporal data augmentation methods rely on direct data augmentation in the data dimension, which may destroy the features of the original data or cause changes in the data distribution differences. However, data augmentation by manipulating the statistical distribution of features avoids these problems. Furthermore, adjustable distribution amplification parameters can further adjust the enhancement intensity to maximize the enhancement effect.

[0126] In summary, the advantages of this invention lie in addressing some of the current challenges in EEG data augmentation, proposing a data augmentation scheme that is easy to train and whose generalization is less affected by differences in data distribution. Considering that the signal contains both class-related and class-independent information, discrete wavelet transform is used to decompose the signal before augmentation, avoiding the destruction of class-related features. The augmentation scheme selects a method that controls statistical features, amplifying the feature distribution to provide a larger feature sampling space and synthesizing more diverse augmented sample data. Finally, a consistency constraint loss is introduced to fully guide the model to output consistent prediction results between the augmented features and the original features, more effectively improving the model's generalization ability. These three modules can significantly improve the model's EEG signal classification performance and promote the practical application of EEG classification algorithms.

[0127] Example 2

[0128] This embodiment provides a brainwave feature enhancement device based on discrete wavelet transform, including:

[0129] The data acquisition module is used to acquire EEG data, preprocess the EEG data, and obtain EEG signals;

[0130] The signal decomposition module is used to perform discrete wavelet decomposition on EEG signals to obtain approximate and detail signals.

[0131] The feature extraction module is used to slice the approximate signal and the detail signal respectively, and then extract features to obtain the feature of the detail signal and the feature of the approximate signal.

[0132] The feature enhancement module is used to enhance the feature of detailed signal and then concatenate it with the feature of approximate signal to obtain enhanced features;

[0133] The model training module is used to input the original features and the enhanced features into the model to train the model; among them, consistency constraints are used to make the classification results of the original features and the classification results of the enhanced features approximate each other.

[0134] Since this device is an EEG feature enhancement device based on discrete wavelet transform according to an embodiment of the present invention, and the principle of solving the problem by this device is similar to that of the method, the implementation of this device can refer to the implementation process of the above method embodiment, and the repeated parts will not be described again.

[0135] Example 3

[0136] This invention also provides an electronic device, which includes a processor and a memory. The memory stores at least one instruction, at least one program, a code set, or an instruction set. The at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to achieve the following: Figure 5This paper presents a method for enhancing EEG features based on discrete wavelet transform.

[0137] It is understood that the memory may include random access memory (RAM) or read-only memory. Optionally, the memory may include non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the various method embodiments described above, etc.; the stored data area may store data created according to the use of the server, etc.

[0138] A processor may include one or more processing cores. The processor connects to various parts of the server via various interfaces and lines, executing instructions, programs, code sets, or instruction sets stored in memory, and accessing data stored in memory to perform various server functions and process data. Optionally, the processor may be implemented using at least one of the following hardware forms: Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor may integrate one or more of the following: Central Processing Unit (CPU) and Modem. The CPU primarily handles the operating system and applications; the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor.

[0139] Since this electronic device is an electronic device corresponding to the EEG feature enhancement method based on discrete wavelet transform in this embodiment of the invention, and the principle of solving the problem by this electronic device is similar to that of this method, the implementation of this electronic device can refer to the implementation process of the above method embodiment, and the repeated parts will not be described again.

[0140] Example 4

[0141] This invention also provides a computer-readable storage medium storing at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to achieve the following: Figure 5 This paper presents a method for enhancing EEG features based on discrete wavelet transform.

[0142] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.

[0143] Since this storage medium is the storage medium corresponding to the EEG feature enhancement method based on discrete wavelet transform in the embodiments of the present invention, and the principle of solving the problem by this storage medium is similar to that of this method, the implementation of this storage medium can refer to the implementation process of the above method embodiments, and the repeated parts will not be described again.

[0144] Example 5

[0145] In some possible implementations, various aspects of the methods of the embodiments of the present invention can also be implemented as a program product comprising program code that, when run on a computer device, causes the computer device to perform the steps of a discrete wavelet transform-based EEG feature enhancement method according to various exemplary embodiments of this application as described above. The executable computer program code or "code" for performing the various embodiments can be written in high-level programming languages ​​such as C, C++, C#, Smalltalk, Java, JavaScript, Visual Basic, Structured Query Language (e.g., Transact-SQL), Perl, or in various other programming languages.

[0146] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0147] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0148] The above embodiments are merely illustrative of the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent changes or modifications made based on the essence of the content of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A method for enhancing EEG features based on discrete wavelet transform, characterized in that, Includes the following steps: Acquire EEG data, preprocess the EEG data, and obtain EEG signals; Discrete wavelet decomposition is performed on EEG signals to obtain approximate and detail signals; The approximate signal and the detail signal are sliced ​​separately, and feature extraction is performed to obtain the feature of the detail signal and the feature of the approximate signal. After performing feature enhancement processing on the detailed signal features, they are concatenated with the approximate signal features to obtain the enhanced features; The original features and augmented features are input into the model separately to train the model; a consistency constraint is used to make the classification results of the original features and the classification results of the augmented features approximate each other. The process of enhancing the detailed signal features and then concatenating them with the approximate signal features to obtain the enhanced features includes: detail signal features The input is processed by the feature enhancement module, which generates new enhanced detail signal features. These enhanced detail signal features are then concatenated with the approximate signal features to obtain the enhanced features. The feature enhancement module operates as follows: First, calculate the mean and variance of the features across each channel and time slice dimension; After obtaining the mean and variance of each channel and time slice dimension, a Gaussian distribution is used to model the distribution of the mean and variance of each channel; Use parameters Adjust the distribution representing the mean and variance, and then sample the new mean and variance of each channel and time slice dimension from the new distribution; The original features are renormalized using new mean and variance coefficients to synthesize more diverse data and obtain enhanced detail signal features, denoted as... ; The total loss of the training model includes consistency loss and classification cross-entropy loss; The consistency loss function is expressed as follows: In the formula, and These represent the model outputs for the original features and the enhanced features, respectively. Representative model; For temperature coefficient Operation, temperature coefficient Control the magnitude of the entropy of the predicted probability result; This represents the number of EEG samples in each batch during model training. Indicates the first Features of each sample.

2. The EEG feature enhancement method based on discrete wavelet transform according to claim 1, characterized in that, The acquisition of EEG data, including preprocessing the EEG data to obtain EEG signals, includes: The EEG data is uniformly converted into segments with preset frequencies and preset durations, which are used as sample data; Within each sample data, the signals of each channel are normalized according to the 95th percentile of the absolute value of the signal as the maximum value to obtain the EEG signal.

3. The EEG feature enhancement method based on discrete wavelet transform according to claim 1, characterized in that, The discrete wavelet decomposition of the EEG signal to obtain approximate and detail signals includes: The EEG signal is decomposed into approximate signal coefficients and detail signal coefficients by discrete wavelet transform; Based on the corresponding coefficients, the approximate signal and the detail signal are reconstructed using wavelet transform inverse transform.

4. The EEG feature enhancement method based on discrete wavelet transform according to claim 1, characterized in that, The step of slicing the approximate signal and the detail signal separately, and then extracting features to obtain detail signal features and approximate signal features, includes: The approximate signal and the detail signal are sliced ​​along the sampling dimension, with each slice having a length of [length missing]. At each sampling time point, two adjacent segments overlap. One sample; After obtaining the slice data, the time series of each slice is fed into the feature extraction module to obtain detail signal features. and approximate signal characteristics The feature extraction module consists of a short-time Fourier transform and a multilayer perceptron, and is used to extract features from time-series signals.

5. The EEG feature enhancement method based on discrete wavelet transform according to claim 1, characterized in that, The step of inputting the original features and enhanced features into the model separately to train the model includes: The original signal features and the enhanced features are respectively input into the encoder; the encoder, due to... It is composed of stacked LinearTransformers connected end to end; The encoder output is subjected to temporal average pooling and then fed into the classifier to obtain the classification result.

6. A device for enhancing electroencephalogram (EEG) features based on discrete wavelet transform, characterized in that, include: The data acquisition module is used to acquire EEG data, preprocess the EEG data, and obtain EEG signals; The signal decomposition module is used to perform discrete wavelet decomposition on EEG signals to obtain approximate and detail signals. The feature extraction module is used to slice the approximate signal and the detail signal respectively, and then extract features to obtain the feature of the detail signal and the feature of the approximate signal. The feature enhancement module is used to enhance the feature of detailed signal and then concatenate it with the feature of approximate signal to obtain enhanced features; The model training module is used to input the original features and augmented features into the model and train the model; in particular, consistency constraints are used to make the classification results of the original features and the classification results of the augmented features approximate each other. The process of enhancing the detailed signal features and then concatenating them with the approximate signal features to obtain the enhanced features includes: detail signal features The input is processed by the feature enhancement module, which generates new enhanced detail signal features. These enhanced detail signal features are then concatenated with the approximate signal features to obtain the enhanced features. The feature enhancement module operates as follows: First, calculate the mean and variance of the features across each channel and time slice dimension; After obtaining the mean and variance of each channel and time slice dimension, a Gaussian distribution is used to model the distribution of the mean and variance of each channel; Use parameters Adjust the distribution representing the mean and variance, and then sample the new mean and variance of each channel and time slice dimension from the new distribution; The original features are renormalized using new mean and variance coefficients to synthesize more diverse data and obtain enhanced detail signal features, denoted as... ; The total loss of the training model includes consistency loss and classification cross-entropy loss; The consistency loss function is expressed as follows: In the formula, and These represent the model outputs for the original features and the enhanced features, respectively. Representative model; For temperature coefficient Operation, temperature coefficient Control the magnitude of the entropy of the predicted probability result; This represents the number of EEG samples in each batch during model training. Indicates the first Features of each sample.

7. An electronic device, characterized in that, The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Generative adversarial network electroencephalogram data amplification method and system based on 2K standard classifier

    CN117312949A

  • Method and apparatus for determining heart rate variability using wavelet transformation

    US20120123232A1