A method and system for electroencephalogram signal preprocessing and feature extraction
By combining adaptive filters and sparse representation methods with frequency domain analysis, the problems of signal information loss and insufficient classification accuracy in existing EEG signal processing technologies are solved, achieving more efficient signal denoising and classification.
Patent Information
- Application Number
- CN202411929418.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2044-12-25
AI Technical Summary
Existing EEG signal preprocessing and feature extraction techniques ignore nonlinear features during noise reduction, resulting in signal information loss. Furthermore, they lack effective strategies for real-time monitoring of interference components and dynamic threshold judgment, affecting classification accuracy and reliability.
An adaptive filter is used to monitor interference components in real time, noise reduction is performed using a sparse representation method, and the signal is mapped from the time domain to the frequency domain. The power spectral density and differential entropy feature values of the signal in five frequency bands are extracted, and a learning classification algorithm is used for training. The threshold is dynamically adjusted to improve classification accuracy.
It achieves efficient noise reduction of EEG signals, preserves important signal features, improves the accuracy and reliability of classification, adapts to power spectrum differences in different frequency domains, and enhances the real-time performance and effectiveness of signal analysis.
Smart Images

Figure CN119837542B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electroencephalogram (EEG) signal processing technology, and in particular to an EEG signal preprocessing and feature extraction method, a system for the EEG signal preprocessing and feature extraction method, a computer program product, a computer device, and a computer-readable storage medium. Background Technology
[0002] In the field of electroencephalogram (EEG) signal processing, the development of related technologies has evolved from simple time-domain analysis to complex frequency-domain analysis and feature extraction. Early EEG signal preprocessing methods mainly relied on traditional filtering techniques, such as bandpass filters and notch filters. These methods could suppress noise to some extent, but their effectiveness in handling non-stationary noise was limited. Subsequently, denoising methods based on adaptive filters were proposed, which can dynamically adjust filtering parameters according to signal characteristics, improving the flexibility and efficiency of denoising. However, these methods still have limitations when processing complex EEG signals, especially in extracting discriminative feature values.
[0003] While existing EEG signal preprocessing and feature extraction techniques have made progress in some aspects, they still have shortcomings in practical applications. First, traditional preprocessing methods often ignore the nonlinear characteristics of EEG signals, potentially leading to the loss of important signal information during noise reduction. Second, existing feature extraction methods are ineffective at balancing power spectrum differences across different frequency domains, affecting the accuracy of subsequent classification. Furthermore, current technologies lack effective strategies for real-time monitoring of interference components and dynamic threshold determination, resulting in poor signal preprocessing performance in environments with strong interference.
[0004] Therefore, the accuracy and reliability of current EEG signal classification are relatively low. Summary of the Invention
[0005] In view of the aforementioned existing problems, this application is hereby filed.
[0006] To address the aforementioned technical problems, this application provides the following technical solution: a method for preprocessing and extracting features from electroencephalogram (EEG) signals, comprising: acquiring raw EEG signals and performing noise reduction processing on the raw EEG signals to obtain noise-reduced EEG signals; mapping the noise-reduced EEG signals from the time domain to the frequency domain, and extracting signals from five frequency bands in the frequency domain; calculating the power spectral density of the signal in each frequency band, and calculating the differential entropy feature value of the signal in each frequency band based on the power spectral density; inputting at least all of the differential entropy feature values as frequency domain feature values into a learning classification algorithm for training to obtain a classification model; and using the classification model to classify new EEG signal samples to obtain classification results, wherein the classification results are used for emotion analysis, and different categories correspond to different emotions.
[0007] As a preferred embodiment of the EEG signal preprocessing and feature extraction method described in this application, the original EEG signal is denoised to obtain a denoised EEG signal, including: using an adaptive filter to monitor the interference components in the original EEG signal in real time and obtaining an interference intensity index, wherein the interference intensity index I is the interference signal power P. noise With the total power P of the EEG signal total The ratio of the interference intensity index to the original EEG signal is used to reduce noise when the interference intensity index is greater than the set threshold. The original EEG signal is then denoised using a sparse representation method to obtain the denoised EEG signal.
[0008] As a preferred embodiment of the EEG signal preprocessing and feature extraction method described in this application, the original EEG signal is denoised using a sparse representation method to obtain a denoised EEG signal, comprising: decomposing the original EEG signal x into x = Dα, where D is a dictionary matrix and α is a sparse coefficient; solving for the sparse coefficient by optimizing the objective function; and reconstructing the original EEG signal using the solved sparse coefficient α to obtain the denoised EEG signal.
[0009] As a preferred embodiment of the EEG signal preprocessing and feature extraction method described in this application, the noise-reduced EEG signal is mapped from the time domain to the frequency domain, and signals of five frequency bands are extracted from the frequency domain. This includes: mapping the noise-reduced EEG signal from the time domain to the frequency domain through Fast Fourier Transform to obtain the spectral representation of the EEG signal; dividing the spectrum according to a predefined frequency band range; calculating the frequency index range of each frequency band; and extracting the spectral data of each frequency band. The five frequency bands are Delta, Theta, Alpha, Beta, and Gamma.
[0010] As a preferred embodiment of the EEG signal preprocessing and feature extraction method described in this application, the power spectral density of the signal in each frequency band is calculated, and the differential entropy feature value of the signal in each frequency band is calculated based on the power spectral density, including: the formula for calculating the power spectral density is:
[0011]
[0012] Where w[k] is a function based on adaptive frequency band division, and X[k] is the spectral data within the frequency band; the formula for calculating the differential entropy characteristic value of each frequency band is:
[0013]
[0014] As a preferred embodiment of the EEG signal preprocessing and feature extraction method described in this application, at least all the differential entropy feature values are input as frequency domain feature values into a learning classification algorithm for training to obtain a classification model. This includes: extracting the power spectral density and differential entropy feature values of the Delta, Theta, Alpha, Beta, and Gamma frequency bands; selecting the frequency bands and features most relevant to the target classification; standardizing the features; training an initial model using a labeled dataset, with 70% of the data used for training and 30% for testing; training the initial model using a neural network-based classifier, employing activation functions, loss functions, and optimizers; calculating the difference between the predicted and true values of the initial model using a cross-entropy loss function; and using stochastic gradient descent as an optimizer to adjust the weights of the initial model, thus obtaining the trained classification model.
[0015] Another objective of this application is to provide a system for preprocessing and extracting features from electroencephalogram (EEG) signals, comprising: an EEG signal acquisition module for acquiring raw EEG signals and performing noise reduction processing on the raw EEG signals to obtain noise-reduced EEG signals; an interference monitoring and noise reduction module for mapping the noise-reduced EEG signals from the time domain to the frequency domain and extracting signals from five frequency bands in the frequency domain; a frequency domain conversion and feature extraction module for calculating the power spectral density of the signal in each frequency band and calculating the differential entropy feature value of the signal in each frequency band based on the power spectral density; a classification model training and evaluation module for inputting at least all of the differential entropy feature values as frequency domain feature values into a learning classification algorithm for training to obtain a classification model; and a result output module for classifying new EEG signal samples using the classification model to obtain classification results, wherein the classification results are used for emotion analysis, and different categories correspond to different emotions.
[0016] A computer program product includes a computer program that, when executed by a processor, implements the steps of any of the methods.
[0017] A computer device includes a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of a method for electroencephalogram (EEG) signal preprocessing and feature extraction.
[0018] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a method for electroencephalogram (EEG) signal preprocessing and feature extraction.
[0019] The beneficial effects of this application are as follows: By denoising the original EEG signal, interference components can be removed. By converting the signal from the time domain to the frequency domain and extracting signals from different frequency bands, the EEG signal can be described more comprehensively using signals from different frequency bands. The differential entropy feature value can reflect the changes in the signal and can be used to identify and distinguish the activity state of the brain. The learning classification algorithm can automatically learn and extract the complex relationships between features, thereby achieving more accurate and reliable classification. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:
[0021] Figure 1 This is a schematic flowchart of a method for preprocessing and extracting EEG signals according to an embodiment of this application.
[0022] Figure 2 This is a schematic diagram of a working module provided for one embodiment of this application. Detailed Implementation
[0023] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0024] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0025] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0026] This invention is described in detail with reference to the schematic diagrams. When detailing the embodiments of this invention, for ease of explanation, the cross-sectional views illustrating the device structure may be partially enlarged, not adhering to the usual scale. Furthermore, the above schematic diagrams are merely examples and should not be construed as limiting the scope of protection of this invention. In actual fabrication, the three-dimensional spatial dimensions of length, width, and depth should be included.
[0027] Furthermore, in the description of this invention, it should be noted that the terms "upper," "lower," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are used solely for the convenience of describing the invention and for 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 limitations on the invention. In addition, the terms "first," "second," or "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0028] Unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joining" in this invention should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integrated connections; similarly, they can refer to electrical connections or direct connections, indirect connections through an intermediate medium, or internal connections between two components. Those skilled in the art can understand the specific meaning of these terms in this invention based on the specific circumstances.
[0029] To address these issues, this application proposes a method for EEG signal preprocessing and feature extraction, a system for the method, a computer program product, a computer device, and a computer-readable storage medium. The aim is to improve the accuracy and reliability of EEG signal analysis by achieving efficient noise reduction through real-time monitoring of interference intensity, dynamic threshold judgment, and sparse representation methods, and by balancing the power spectrum differences of EEG signals in different frequency domains through frequency domain transformation and eigenvalue calculation.
[0030] Therefore, this application provides a method for EEG signal preprocessing and feature extraction, which can extract features of EEG signals in different frequency bands by introducing adaptive filters and dynamic threshold judgment mechanisms, improved fast Fourier transform and frequency band division methods, providing a rich data foundation for subsequent classification, reducing errors, and improving the accuracy and reliability of classification.
[0031] Example 1, referring to Figure 1 This is the first embodiment of the present application, which provides a method for preprocessing and extracting features from electroencephalogram (EEG) signals, including:
[0032] S1: Acquire the raw EEG signal and perform noise reduction processing on the raw EEG signal to obtain the noise-reduced EEG signal;
[0033] Specifically, the system collects EEG signal sets, monitors the interference intensity in real time, and performs noise reduction processing on the original EEG signals based on the interference intensity.
[0034] Furthermore, the raw EEG signals, namely the EEG activity in the prefrontal and occipital regions; the acquisition time of each EEG signal sample; the location, status, and calibration information of the dry electrodes; and the physiological parameters used to assist in the analysis of changes in the EEG signals;
[0035] An adaptive filter was used to monitor the interference components in the original EEG signal in real time, and the interference intensity index was obtained. Here, the interference intensity index I represents the interference signal power P. noise With the total power P of the EEG signal total The ratio of the above interference intensity index to the set threshold is used to denoise the original EEG signal using a sparse representation method to obtain the denoised EEG signal.
[0036] Specifically, an adaptive filter is used to monitor interference components in the EEG signal in real time, and the interference intensity index I is defined as the interference signal power P. noise With the total power P of the EEG signal total The ratio:
[0037]
[0038] Using dynamic thresholds to determine interference intensity:
[0039] θ(t)=θ0+δ·sigmoid(t-t0),
[0040] Where θ0 is the initial threshold, δ is the threshold adjustment parameter, t is the current time point, t0 is the reference time point, and the sigmoid function is used to smooth the change in the threshold; the threshold changes with time, and when the index is greater than the set threshold, i.e., S... noise If the value is greater than θ(n), then the interference intensity is considered to be large, and noise reduction processing is required.
[0041] The original EEG signal x is decomposed into x = Dα, where D is the dictionary matrix and α is the sparse coefficient. The sparse coefficient is solved by optimizing the objective function, and the original EEG signal is reconstructed using the solved sparse coefficient α to obtain the denoised EEG signal.
[0042] It should be noted that the above-mentioned noise reduction process includes using a sparse representation method to reduce noise, decomposing the EEG signal x into x = Dα, where D is the dictionary matrix and α is the sparse coefficient. The sparse coefficient is solved by optimizing the following objective function:
[0043]
[0044] Where λ and β are regularization parameters used to balance data fidelity and sparsity;
[0045] Add time-dependent constraints to the objective function to make the sparse coefficients at adjacent time points similar:
[0046]
[0047] Where γ is the time-correlation regularization parameter, and the adaptive filter is improved by introducing a forgetting factor μ and a time-varying step size η(n) to enhance the tracking capability of interference signals:
[0048]
[0049] Where η0 is the initial step size and n is the number of iterations. The EEG signal is reconstructed using the obtained sparse coefficients α to obtain the denoised signal.
[0050] S2: Map the EEG signal after the above noise reduction process from the time domain to the frequency domain, and extract the signals of five frequency bands in the frequency domain respectively;
[0051] Specifically, the noise-reduced EEG signal is mapped from the time domain to the frequency domain, and signals from five frequency bands are extracted in the frequency domain.
[0052] The EEG signal after noise reduction is mapped from the time domain to the frequency domain by Fast Fourier Transform to obtain the spectral representation of the EEG signal. The spectrum is divided according to the predefined frequency band range, and the frequency index range of each frequency band is calculated. The spectral data of each frequency band is extracted. The five frequency bands are Delta, Theta, Alpha, Beta, and Gamma.
[0053] Furthermore, the EEG signal is mapped from the time domain to the frequency domain using an improved Fast Fourier Transform (FFT). To adapt to the non-stationarity of the EEG signal, a time window w[n] is introduced to improve the FFT. The EEG signal x(t) is sampled to obtain the discrete-time signal x[n]. The spectrum X[k] is then calculated using the improved FFT algorithm.
[0054]
[0055] Where N is the number of sampling points, j is the imaginary unit, and k is the frequency index;
[0056] The spectral representation of the EEG signal is obtained, and the spectrum is divided according to a predefined frequency band range. For each frequency band, Delta, Theta, Alpha, Beta, and Gamma, the frequency index range of each band is calculated.
[0057] Index Δ ={k|1≤f k≤4}
[0058] Index θ ={k|4<f k ≤8}
[0059] Index A ={k|8<f k ≤13}
[0060] Index B ={k|13<f k ≤30}
[0061] Index Γ ={k|30<f k ≤50},
[0062] Among them, f k It is the actual frequency corresponding to the frequency index k; extract the spectrum data for each frequency band:
[0063] X Δ =X[Index Δ ]
[0064] X θ =X[Index θ ]
[0065] X A =X[Index A ]
[0066] X B =X[Index B ]
[0067] X Γ =X[Index Γ ].
[0068] S3: Calculate the power spectral density of the signal in each frequency band, and calculate the differential entropy characteristic value of the signal in each frequency band based on the power spectral density.
[0069] Specifically, the power spectral density of the signal in each frequency band is calculated, as well as the differential entropy characteristic value of each frequency band, to balance the power spectral differences of EEG in different frequency domains.
[0070] Furthermore, considering individual differences in EEG signals, an adaptive method is used to determine the boundaries of each frequency band:
[0071]
[0072] Where f is the frequency, f0 is the center frequency, and α1 and β1 are adjustment parameters. This function has a higher value near the center frequency and decreases rapidly when it is far from the center frequency. A weighting mechanism is introduced to differentiate the contribution of different frequency points.
[0073] The frequency band boundary B can be determined by finding a local minimum of A(f):
[0074] B={f|A′(f)=0and A″(f)>0},
[0075] Calculating the power spectral density involves, for each frequency band:
[0076]
[0077] Where X[k] represents the spectral data within the frequency band, and w[k] is a function based on adaptive frequency band partitioning:
[0078]
[0079] A min It is the minimum value of A(f) in the frequency band;
[0080] The above calculation of the differential entropy feature value for each frequency band includes defining an improved differential entropy IDE, considering weighted spectral features:
[0081]
[0082] S4: At least all the above differential entropy feature values are input as frequency domain feature values into the learning classification algorithm for training to obtain a classification model;
[0083] Specifically, by utilizing differential entropy feature values to reduce errors, the extracted frequency domain feature values are input into the learning classification algorithm for training and classification.
[0084] The power spectral density and differential entropy feature values of the Delta, Theta, Alpha, Beta and Gamma bands are extracted. The frequency bands and features most relevant to the target classification are selected and the features are standardized. The initial model is trained using a labeled dataset, with 70% of the data used for training and 30% for testing.
[0085] The initial model is trained using a neural network-based classifier with activation functions, loss functions, and an optimizer. The difference between the predicted and true values of the initial model is calculated using the cross-entropy loss function, and stochastic gradient descent is used as the optimizer to adjust the weights of the initial model, resulting in the trained classification model.
[0086] S5: The above classification model is used to classify the new EEG signal samples to obtain the classification results. The classification results are used for emotion analysis, and different categories correspond to different emotions.
[0087] Specifically, the classification results are analyzed to evaluate the effectiveness and reliability of the EEG signal preprocessing algorithm.
[0088] Example 2 is an embodiment of this application, which provides a method for EEG signal preprocessing and feature extraction. In order to verify the beneficial effects of this application, scientific demonstration is carried out through experiments.
[0089] In high-altitude and outdoor work scenarios, the resulting power frequency magnetic field interference and corona interference will interfere with EEG signals. To develop EEG preprocessing and feature extraction methods, we can explore the features of EEG signals related to fatigue levels and extract fatigue level features in the frequency domain, laying the foundation for further research and development of fatigue quantification indicators.
[0090] A neural network-based classifier is used to train a model using activation functions, loss functions, and an optimizer. Model evaluation involves calculating the difference between the model's predictions and the true values using the cross-entropy loss function, and adjusting the model's weights using stochastic gradient descent as the optimizer. After training, the classification model is used to classify new EEG signal samples.
[0091] The mathematical model can be represented as:
[0092] Input layer: X = [x1, x2, x3, x4, x5]
[0093] Hidden layer 1: h1 = σ(W1·X + b1)
[0094] Hidden layer 2: h2 = σ(W2·h1 + b2)
[0095] Output layer:
[0096] Where σ is the activation function, W1, W2, W3 are weight matrices, and b1, b2, b3 are bias vectors. It is the model's predicted output;
[0097] During training, the weights and biases are updated to minimize the cross-entropy loss function:
[0098]
[0099] Where N is the size of the dataset, y i It is the true label of the i-th sample. These are the model's predicted values.
[0100] Power spectral density and differential entropy features of Delta, Theta, Alpha, Beta and Gamma bands are extracted. The frequency bands and features most relevant to the target classification are selected and the features are standardized. The classification model is trained using a labeled dataset, with 70% of the data used for training and 30% for testing.
[0101] The classification includes "relaxed" state, "focused" state, "distracted" state, "memory task" state, and so on, until all test samples have been classified. For samples in the test set, the classifier will provide the following classification results:
[0102] Sample 1:
[0103] Feature vector: {0.85, 0.55, 1.05, 0.95, 0.75} (differential entropy value);
[0104] Classification results: Relaxed state, classification accuracy 90%.
[0105] Explanation: The differential entropy value of this sample indicates that its brain activity pattern is more similar to that of a relaxed state, but there is still a 90% confidence level because the complexity of brain signals and individual differences may lead to uncertainty in classification.
[0106] Sample 2:
[0107] Feature vector: {0.45, 0.65, 0.95, 0.85, 0.55};
[0108] Classification results: Focused state, classification accuracy 85%.
[0109] Explanation: The differential entropy value of this sample indicates that its brain activity pattern is more similar to a state of focus, but the classification accuracy is slightly lower, possibly due to some interference signals or noise in the sample data.
[0110] Sample 3:
[0111] Feature vector: {0.95, 0.85, 1.05, 0.95, 0.75};
[0112] Classification results: Relaxed state, classification accuracy 95%.
[0113] Explanation: The differential entropy value of this sample is highly consistent with the model in the relaxed state, thus resulting in a high classification accuracy.
[0114] Sample 4:
[0115] Feature vector: {0.45, 0.65, 0.95, 0.85, 0.55};
[0116] Classification results: Focused state, classification accuracy 80%.
[0117] Explanation: The differential entropy value of this sample indicates that its brain activity pattern is more similar to a state of focus, but the classification accuracy is slightly lower, possibly due to noise in the sample data or individual differences.
[0118] The beneficial effects of this application are as follows: By monitoring the interference intensity in real time, non-steady-state noise in EEG signals, such as electromyography interference and power line interference, can be captured in a timely manner. A dynamic threshold is used to determine the interference intensity, adapting to signal changes in different times and environments, ensuring the real-time nature and effectiveness of noise reduction. By defining the ratio of the interference signal power to the total power of the EEG signal as an interference intensity index, the degree of interference is accurately quantified, guiding subsequent noise reduction processing and avoiding unnecessary modifications to the signal.
[0119] The filter can learn and adapt to changes in signal and noise, improving the flexibility and efficiency of noise reduction; by monitoring and defining interference intensity indicators in real time, the filter can more accurately identify and remove interference components, preserving the original information of the EEG signal.
[0120] By decomposing EEG signals into a dictionary matrix and sparse coefficients, the signal is efficiently reconstructed, removing noise while preserving important signal features. During the denoising process, the fidelity and sparsity of the data can be balanced, avoiding the problems of excessive smoothing or excessive sparsity, and improving the accuracy of signal reconstruction. The sparse representation method reduces the dimensionality of the signal to be processed, reduces computational complexity, and makes the denoising process more efficient.
[0121] This method significantly improves the accuracy and reliability of EEG signal processing, thus providing strong technical support for the analysis of EEG signals in various application scenarios.
[0122] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
[0123] Example 3, the third embodiment of the present invention, differs from the previous two embodiments in that:
[0124] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0125] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0126] More specific examples (a non-exhaustive list) of computer-readable media include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the aforementioned program can be printed, because the aforementioned program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or, if necessary, processing in other suitable ways, and then stored in computer memory.
[0127] 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.
[0128] Example 4, refer to Figure 2 As an embodiment of the present invention, a system for preprocessing and feature extraction of electroencephalogram (EEG) signals includes an EEG signal acquisition module, an interference monitoring and noise reduction module, a frequency domain conversion and feature extraction module, a classification model training and evaluation module, and a result output module.
[0129] The EEG signal acquisition module is used to acquire raw EEG signals and perform noise reduction processing on the raw EEG signals to obtain noise-reduced EEG signals.
[0130] The interference monitoring and noise reduction module is used to map the noise-reduced EEG signal from the time domain to the frequency domain, and extract the signals of five frequency bands in the frequency domain.
[0131] The frequency domain transformation and feature extraction module is used to calculate the power spectral density of the signal in each frequency band, and to calculate the differential entropy feature value of the signal in each frequency band based on the power spectral density.
[0132] The classification model training and evaluation module is used to input at least all of the above differential entropy feature values as frequency domain feature values into the learning classification algorithm for training, so as to obtain the classification model.
[0133] The results output module is used to classify new EEG signal samples using the above classification model to obtain classification results. These classification results are used for emotion analysis, with different categories corresponding to different emotions.
[0134] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for electroencephalogram signal preprocessing and feature extraction, characterized in that: Comprising, The original electroencephalogram signal is acquired, and noise reduction processing is performed on the original electroencephalogram signal to obtain a noise-reduced electroencephalogram signal, specifically including: using an adaptive filter to monitor interference components in the original electroencephalogram signal in real time and to acquire an interference intensity index, wherein the interference intensity index is a ratio of interference signal power to total electroencephalogram signal power; when the interference intensity index is greater than a set threshold, using a sparse representation method to perform noise reduction processing on the original electroencephalogram signal to obtain a noise-reduced electroencephalogram signal; decomposing the original electroencephalogram signal into wherein is a dictionary matrix, and is a sparse coefficient; solving the sparse coefficient by optimizing an objective function, and reconstructing the original electroencephalogram signal by using the solved sparse coefficient to obtain the noise-reduced electroencephalogram signal. is the interference signal power and the total electroencephalogram signal power is the ratio When the interference intensity index is greater than a set threshold, the original electroencephalogram signal is subjected to noise reduction processing by using a sparse representation method to obtain a noise-reduced electroencephalogram signal. is decomposed into wherein is a dictionary matrix, is a sparse coefficient; the sparse coefficient is solved by optimizing an objective function, and the original electroencephalogram signal is reconstructed by using the solved sparse coefficient to obtain the noise-reduced electroencephalogram signal. mapping the brain electrical signal after the noise reduction processing from time domain to frequency domain, and taking out the signals of five frequency bands respectively on the frequency domain, specifically comprising: mapping the brain electrical signal after the noise reduction processing from time domain to frequency domain through fast Fourier transform, obtaining the frequency spectrum representation of the brain electrical signal, dividing the frequency spectrum according to the predefined frequency band range, and calculating the frequency index range of each frequency band, extracting the frequency spectrum data of each frequency band, wherein the five frequency bands are Delta, Theta, Alpha, Beta and Gamma respectively; calculating the power spectrum density of the signal of each frequency band, and calculating the differential entropy feature value of the signal of each frequency band according to the power spectrum density; at least all the differential entropy feature values are input into the learning classification algorithm as frequency domain feature values for training to obtain a classification model; adopting the classification model to classify new brain electrical signal samples to obtain a classification result, wherein the classification result is used for emotion analysis, and different categories correspond to different emotions.
2. The electroencephalogram signal preprocessing and feature extraction method of claim 1, wherein, calculating the power spectrum density of the signal of each frequency band, and calculating the differential entropy feature value of the signal of each frequency band according to the power spectrum density, comprising: the formula for calculating the power spectrum density is: , wherein, is a function based on adaptive band division, is the frequency spectrum data within the band; the formula for calculating the differential entropy feature value of each frequency band is: 。 3. The electroencephalogram signal pre-processing and feature extraction method of claim 2, wherein, at least all the differential entropy feature values are input into the learning classification algorithm as frequency domain feature values for training to obtain a classification model, comprising: extracting the power spectrum density and the differential entropy feature value of the Delta, Theta, Alpha, Beta and Gamma frequency bands, selecting the frequency band and the feature most related to the target classification, and standardizing the feature, training an initial model using a labeled data set, wherein 70% of the data is used for training and 30% of the data is used for testing; training the initial model using an activation function, a loss function and an optimizer through a neural network-based classifier, using a cross-entropy loss function to calculate the difference between the predicted value and the true value of the initial model, and using stochastic gradient descent as an optimizer to adjust the weight of the initial model to obtain the trained classification model.
4. A system for EEG signal pre-processing and feature extraction using any one of the methods according to claims 1 to 3, characterized in that, Comprising: The electroencephalogram signal collection module is used for acquiring an original electroencephalogram signal, and performing noise reduction processing on the original electroencephalogram signal to obtain a noise-reduced electroencephalogram signal, and specifically comprises: using an adaptive filter to monitor interference components in the original electroencephalogram signal in real time, and acquiring an interference intensity index, wherein the interference intensity index is a ratio of interference signal power to total electroencephalogram signal power; when the interference intensity index is greater than a set threshold, using a sparse representation method to perform noise reduction processing on the original electroencephalogram signal to obtain a noise-reduced electroencephalogram signal; decomposing the original electroencephalogram signal into wherein is a dictionary matrix, and is a sparse coefficient; solving the sparse coefficient by optimizing an objective function, and reconstructing the original electroencephalogram signal by using the solved sparse coefficient to obtain the noise-reduced electroencephalogram signal. an interference monitoring and noise reduction module for mapping the brain electrical signal after the noise reduction processing from time domain to frequency domain, and taking out the signals of five frequency bands respectively on the frequency domain, specifically comprising: mapping the brain electrical signal after the noise reduction processing from time domain to frequency domain through fast Fourier transform, obtaining the frequency spectrum representation of the brain electrical signal, dividing the frequency spectrum according to the predefined frequency band range, and calculating the frequency index range of each frequency band, extracting the frequency spectrum data of each frequency band, wherein the five frequency bands are Delta, Theta, Alpha, Beta and Gamma respectively; a frequency domain conversion and feature extraction module for calculating the power spectrum density of the signal of each frequency band, and calculating the differential entropy feature value of the signal of each frequency band according to the power spectrum density; a classification model training and evaluation module for inputting at least all the differential entropy feature values into the learning classification algorithm as frequency domain feature values for training to obtain a classification model; An output module is configured to classify a new electroencephalogram signal sample by using the classification model to obtain a classification result, wherein the classification result is used for emotion analysis, and different categories correspond to different emotions.
5. A computer program product comprising a computer program, characterized in that, The computer program, when executed by a processor, implements the steps of the method of any one of claims 1 to 3. 6.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-5 when the computer program is executed by the processor. The processor, when executing the computer program, implements the steps of the method of any one of claims 1 to 3.
7. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by a processor, implements the steps of the method of any one of claims 1 to 3. The computer program, when executed by a processor, implements the steps of the method of any one of claims 1 to 3.
Citation Information
Patent Citations
Electroencephalogram signal denoising method based on width-depth echo state network
CN111860306A
Emotion recognition method, device and equipment based on long-time electroencephalogram signals and medium
CN117290776A