Electroencephalogram signal preprocessing and feature extraction method and system
By monitoring the interference intensity in real time and using adaptive filters and sparse representation methods for noise reduction, combined with frequency domain conversion and characteristic value calculation, the limitations of EEG signal noise reduction and feature extraction in the existing technology are solved, and more efficient EEG signal classification is achieved.
Patent Information
- Application Number
- CN202411929418.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-25
AI Technical Summary
Existing EEG signal preprocessing and feature extraction technologies have limitations in noise reduction and feature extraction, especially in processing nonlinear signals and balancing power spectrum differences in different frequency domains, resulting in low accuracy and reliability of EEG signal classification.
By monitoring the interference intensity in real time and using adaptive filters and sparse representation methods for noise reduction, the signal is then converted from the time domain to the frequency domain, the signals in five frequency bands are extracted, the power spectral density and differential entropy eigenvalues are calculated, and these eigenvalues are input into the learning classification algorithm for training to obtain the classification model.
It improves the noise reduction effect of EEG signals and the accuracy of feature extraction, balances the power spectrum differences in different frequency domains, and enhances the accuracy and reliability of EEG signals classification.
Smart Images

Figure CN119837542A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electroencephalogram (EEG) signal processing, 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 Art
[0002] In the field of 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, which can suppress noise to a certain extent, but have limited effects on non-steady-state noise. Subsequently, a noise reduction method based on adaptive filters was proposed, which can dynamically adjust the filtering parameters according to the signal characteristics, improving the flexibility and efficiency of noise reduction. However, these methods still have limitations in processing complex EEG signals, especially in extracting distinguishing feature values.
[0003] Although existing EEG signal preprocessing and feature extraction technologies 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, which may result in the loss of important signal information during the noise reduction process. Secondly, existing feature extraction methods are not effective in balancing the differences in power spectra in different frequency domains, which affects the accuracy of subsequent classification. In addition, existing technologies lack effective strategies for real-time monitoring of interference components and dynamic threshold judgment, resulting in poor signal preprocessing effects in strong interference environments.
[0004] Therefore, the accuracy and reliability of current EEG signal classification are low. Summary of the invention
[0005] In view of the above existing problems, this application is proposed.
[0006] To solve the above technical problems, the present application provides the following technical solutions: a method for preprocessing and extracting features of electroencephalogram (EEG) signals, comprising: obtaining an original electroencephalogram (EEG) signal, and performing noise reduction processing on the original electroencephalogram (EEG) signal to obtain an EEG signal after noise reduction processing; mapping the EEG signal after noise reduction processing from the time domain to the frequency domain, and extracting signals of five frequency bands in the frequency domain respectively; calculating the power spectral density of the signal in each frequency band, and calculating the differential entropy eigenvalue of the signal in each frequency band according to the power spectral density; inputting at least all of the differential entropy eigenvalues as frequency domain eigenvalues 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 solution of the EEG signal preprocessing and feature extraction method described in the present application, the original EEG signal is subjected to noise reduction processing to obtain the EEG signal after noise reduction processing, 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 The total power of the EEG signal P total When the interference intensity index is greater than a set threshold, a sparse representation method is used to perform noise reduction processing on the original EEG signal to obtain a noise-reduced EEG signal.
[0008] As a preferred solution of the EEG signal preprocessing and feature extraction method described in the present application, a sparse representation method is used to perform noise reduction processing on the original EEG signal to obtain the EEG signal after noise reduction processing, including: decomposing the original EEG signal x into x=Dα, where D is a dictionary matrix and α is a sparse coefficient; solving the sparse coefficient by optimizing the objective function, and reconstructing the original EEG signal using the sparse coefficient α obtained by solving the solution to obtain the EEG signal after noise reduction processing.
[0009] As a preferred solution of the EEG signal preprocessing and feature extraction method described in the present application, the EEG signal after noise reduction is mapped from the time domain to the frequency domain, and signals of five frequency bands are respectively extracted in the frequency domain, including: mapping the EEG signal after noise reduction from the time domain to the frequency domain through fast Fourier transform to obtain the spectrum 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 spectrum data of each frequency band, wherein the five frequency bands are Delta, Theta, Alpha, Beta, and Gamma.
[0010] As a preferred solution of the EEG signal preprocessing and feature extraction method described in the present application, the power spectrum density of the signal in each frequency band is calculated, and the differential entropy eigenvalue of the signal in each frequency band is calculated according to the power spectrum density, including: the formula for calculating the power spectrum density is:
[0011]
[0012] Wherein, w[k] is a function based on adaptive frequency band division, X[k] is the spectrum data in the frequency band; the formula for calculating the differential entropy eigenvalue of each frequency band is:
[0013]
[0014] As a preferred solution of the EEG signal preprocessing and feature extraction method described in the present application, at least all of the differential entropy eigenvalues are input as frequency domain eigenvalues into a learning classification algorithm for training to obtain a classification model, including: extracting the power spectral density and the differential entropy eigenvalues of the Delta, Theta, Alpha, Beta and Gamma frequency bands, selecting the frequency bands and features most relevant to the target classification, and standardizing the features, using a labeled data set to train the initial model, wherein 70% of the data is used for training and 30% of the data is used for testing; using a neural network-based classifier, using an activation function, a loss function and an optimizer to train the initial model, 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.
[0015] Another object of the present application is to provide a system for an EEG signal preprocessing and feature extraction method, comprising: an EEG signal acquisition module, used to obtain original EEG signals, and perform noise reduction processing on the original EEG signals to obtain EEG signals after noise reduction processing; an interference monitoring and noise reduction module, used to map the EEG signals after noise reduction processing from the time domain to the frequency domain, and extract signals of five frequency bands in the frequency domain respectively; a frequency domain conversion and feature extraction module, used to calculate the power spectral density of the signal in each frequency band, and calculate the differential entropy eigenvalue of the signal in each frequency band according to the power spectral density; a classification model training and evaluation module, used to input at least all of the differential entropy eigenvalues as frequency domain eigenvalues into a learning classification algorithm for training to obtain a classification model; a result output module, used to classify 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 comprises a computer program, wherein when the computer program is executed by a processor, the steps of any one of the methods are implemented.
[0017] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of an electroencephalogram signal preprocessing and feature extraction method when executing the computer program.
[0018] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a method for preprocessing and extracting features of an electroencephalogram signal.
[0019] The beneficial effects of the present application are as follows: by performing noise reduction processing on the original EEG signal, the interference components can be removed; by converting the signal from the time domain to the frequency domain and extracting signals of different frequency bands, the EEG signal can be more comprehensively described by signals of different frequency bands; the differential entropy eigenvalue can reflect the change of 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 relationship between features, thereby achieving more accurate and reliable classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0021] Figure 1 A flowchart of an EEG signal preprocessing and feature extraction method provided for one embodiment of the present application.
[0022] Figure 2 A schematic diagram of a working module provided for an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0024] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present 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 term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0026] The present invention is described in detail with reference to the schematic diagram. When describing the embodiments of the present invention in detail, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the above schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.
[0027] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0028] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0029] In response to these problems, the present application proposes a method for EEG signal preprocessing and feature extraction, a system for EEG signal preprocessing and feature extraction, a computer program product, a computer device and a computer-readable storage medium, aiming to improve the accuracy and reliability of EEG signal analysis by performing efficient noise reduction through real-time monitoring of interference intensity, dynamic threshold judgment and sparse representation method, and balancing the power spectrum differences of EEG signals in different frequency domains through frequency domain conversion and eigenvalue calculation.
[0030] Therefore, the present application provides a method for preprocessing and feature extraction of EEG signals, which can extract the features of EEG signals in different frequency bands by introducing adaptive filters and dynamic threshold judgment mechanisms, improved fast Fourier transforms and frequency band division methods, thereby providing a rich data basis for subsequent classification, reducing errors, and improving classification accuracy and reliability.
[0031] Example 1, reference Figure 1 , which is the first embodiment of the present application, provides an EEG signal preprocessing and feature extraction method, comprising:
[0032] S1: obtaining an original EEG signal, and performing noise reduction processing on the original EEG signal to obtain an EEG signal after noise reduction processing;
[0033] Specifically, an EEG signal set is collected, the interference intensity is monitored in real time, and the original EEG signal is subjected to noise reduction processing according to the interference intensity.
[0034] Furthermore, the raw EEG signals, i.e., the EEG activities in the frontal 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 analyzing the changes in the EEG signals;
[0035] Adaptive filter is used to monitor the interference components in the original EEG signal in real time and obtain the interference intensity index, where the interference intensity index I is the interference signal power P noise The total power of the EEG signal P total When the interference intensity index is greater than a set threshold, a sparse representation method is used to perform noise reduction processing on the original EEG signal to obtain a noise-reduced EEG signal.
[0036] Specifically, an adaptive filter is used to monitor the interference components in the EEG signal in real time, and the interference intensity index I is defined as the interference signal power P noise The total power of the EEG signal P total Ratio of:
[0037]
[0038] Use dynamic threshold to judge interference intensity:
[0039] θ(t)=θ0+δ·sigmoid(t-t0),
[0040] Among them, θ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 of the threshold; the threshold changes over time, and when the indicator is greater than the set threshold, that is, S noise >θ(n), 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 a dictionary matrix and α is a sparse coefficient; the sparse coefficient is solved by optimizing the objective function, and the original EEG signal is reconstructed using the sparse coefficient α obtained to obtain the EEG signal after noise reduction.
[0042] It should be noted that the above-mentioned noise reduction processing includes using a sparse representation method to perform noise reduction, decomposing the EEG signal x into x=Dα, where D is a dictionary matrix, α is a sparse coefficient, and solving the sparse coefficient by optimizing the following objective function:
[0043]
[0044] Among them, λ and β are regularization parameters used to balance data fidelity and sparsity;
[0045] Adding time correlation constraints to the objective function makes the sparse coefficients of adjacent time points similar:
[0046]
[0047] Among them, γ is the time correlation regularization parameter. At the same time, the adaptive filter is improved, and the forgetting factor μ and the time-varying step size η(n) are introduced to improve the tracking ability of the interference signal:
[0048]
[0049] Where η0 is the initial step size and n is the number of iterations. The sparse coefficient α obtained is used to reconstruct the EEG signal to obtain the denoised signal.
[0050] S2: Mapping the EEG signal after the noise reduction process from the time domain to the frequency domain, and extracting signals of five frequency bands in the frequency domain;
[0051] Specifically, the EEG signal after noise reduction is mapped from the time domain to the frequency domain, and signals of five frequency bands are respectively extracted in the frequency domain.
[0052] The EEG signal after the noise reduction process is mapped from the time domain to the frequency domain through fast Fourier transform to obtain the spectrum 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 to extract the spectrum data of each frequency band. 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 through the improved fast Fourier transform. In order to adapt to the non-stationarity of the EEG signal, the 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], and the improved fast Fourier transform algorithm is used to calculate the spectrum X[k]:
[0054]
[0055] Where N is the number of sampling points, j is the imaginary unit, and k is the frequency index;
[0056] Get the spectrum representation of the EEG signal, divide the spectrum according to the predefined frequency band range, and for each frequency band Delta, Theta, Alpha, Beta, Gamma, calculate the frequency index range of each frequency band:
[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 is the actual frequency corresponding to the frequency index k; extract the spectrum data of 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 spectrum density of the signal in each frequency band, and calculate the differential entropy eigenvalue of the signal in each frequency band according to the power spectrum density;
[0069] Specifically, the power spectral density of the signal in each frequency band is calculated, and the differential entropy eigenvalue of each frequency band is calculated to balance the power spectrum differences of EEG in different frequency domains.
[0070] Furthermore, considering the individual differences of EEG signals, an adaptive method is used to determine the boundaries of each frequency band:
[0071]
[0072] Among them, f is the frequency, f0 is the center frequency, α1 and β1 are adjustment parameters. This function has a higher value near the center frequency and decreases rapidly when it is far away from the center frequency. A weighting mechanism is introduced to differentiate the contributions of different frequency points.
[0073] The band boundaries B can be determined by finding the local minimum of A(f):
[0074] B={f|A′(f)=0and A″(f)>0},
[0075] Computing the power spectral density involves, for each frequency band:
[0076]
[0077] Among them, X[k] is the spectrum data in the frequency band, and w[k] is a function based on adaptive frequency band division:
[0078]
[0079] A min is the minimum value of A(f) in the frequency band;
[0080] The above calculation of the differential entropy eigenvalue of each frequency band includes defining an improved differential entropy IDEIDE, taking into account the weighted spectrum characteristics:
[0081]
[0082] S4: at least input all of the above differential entropy eigenvalues as frequency domain eigenvalues into a learning classification algorithm for training to obtain a classification model;
[0083] Specifically, the differential entropy eigenvalue is used to reduce the error, and the extracted frequency domain eigenvalue is input into the learning classification algorithm for training and classification.
[0084] Extract the above power spectral density and the above differential entropy eigenvalues of Delta, Theta, Alpha, Beta and Gamma frequency bands, select the frequency bands and features most relevant to the target classification, and standardize the features. Use the labeled data set to train the initial model, where 70% of the data is used for training and 30% of the data is used for testing;
[0085] The above initial model is trained by using an activation function, a loss function and an optimizer through a neural network-based classifier, the cross entropy loss function is used to calculate the difference between the predicted value and the true value of the above initial model, and stochastic gradient descent is used as an optimizer to adjust the weight of the above initial model to obtain the above classification model that has been trained.
[0086] S5: Use the above classification model to classify the new EEG signal sample to obtain a classification result, wherein the above classification result is used for emotion analysis, and different categories correspond to different emotions.
[0087] Specifically, the classification results are analyzed and the effectiveness and reliability of the EEG signal preprocessing algorithm are evaluated.
[0088] Example 2 is an embodiment of the present application, which provides an EEG signal preprocessing and feature extraction method. In order to verify the beneficial effects of the present application, scientific demonstration is carried out through experiments.
[0089] In high-altitude and outdoor work scenarios, the industrial frequency magnetic field interference, corona interference, etc. will interfere with the EEG signals. We develop EEG preprocessing and feature extraction methods, explore the characteristics of EEG signals related to fatigue level, and extract the fatigue level characteristics in the frequency domain, laying the foundation for further research and development of fatigue quantification indicators.
[0090] The model is trained using activation functions, loss functions, and optimizers through a neural network-based classifier. For model evaluation, the cross entropy loss function is used to calculate the difference between the model's predicted value and the true value, and stochastic gradient descent is used as an optimizer to adjust the model's weights. After training, the classification model classifies new EEG signal samples;
[0091] The mathematical model can be expressed 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] Among them, σ is the activation function, W1, W2, W3 are weight matrices, b1, b2, b3 are bias vectors, is the predicted output of the model;
[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 is the true label of the i-th sample, is the predicted value of the model.
[0100] Extract the power spectral density and differential entropy eigenvalues of the Delta, Theta, Alpha, Beta, and Gamma frequency bands, select the frequency bands and features most relevant to the target classification, and standardize the features. Use the labeled data set to train the classification model, where 70% of the data is used for training and 30% of the data is used for testing.
[0101] The classification includes the "relaxed" state, the "focused" state, the "distracted" state, the "memory task" state, and so on, until all test samples are classified. For the samples in the test set, the classifier will give the following classification results:
[0102] Sample 1:
[0103] Eigenvector: {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 EEG activity pattern is more similar to a relaxed state, but there is still a 90% confidence level because the complexity of EEG signals and individual differences may lead to uncertainty in classification.
[0106] Sample 2:
[0107] Eigenvector: {0.45, 0.65, 0.95, 0.85, 0.55};
[0108] Classification results: Concentrated state, classification accuracy rate 85%.
[0109] Explanation: The differential entropy value of this sample shows that its EEG activity pattern is more similar to the state of concentration, but the classification accuracy is slightly lower, which may be due to the presence of some interference signals or noise in the sample data.
[0110] Sample 3:
[0111] Eigenvector: {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 of the relaxed state, so the classification accuracy is high.
[0114] Sample 4:
[0115] Eigenvector: {0.45, 0.65, 0.95, 0.85, 0.55};
[0116] Classification results: Concentrated state, classification accuracy 80%.
[0117] Explanation: The differential entropy value of this sample shows that its EEG activity pattern is more similar to the concentration state, but the classification accuracy is slightly lower, which may be due to noise in the sample data or individual differences.
[0118] The beneficial effects of this application are as follows: by real-time monitoring of interference intensity, non-steady-state noise in EEG signals, such as electromyographic interference, power line interference, etc., can be captured in time. Dynamic thresholds are used to judge interference intensity, adapting to signal changes at different times and environments, ensuring the real-time and effectiveness of noise reduction; by defining the ratio of interference signal power to total EEG signal power as an interference intensity index, the degree of interference can be accurately quantified, guiding subsequent noise reduction processing, and avoiding unnecessary modification of the signal.
[0119] The filter can learn and adapt to changes in signals and noise, improving the flexibility and efficiency of noise reduction; by real-time monitoring and defining interference intensity indicators, the filter can more accurately identify and remove interference components and maintain the original information of the EEG signal.
[0120] By decomposing EEG signals into dictionary matrices and sparse coefficients, the signal can be efficiently reconstructed, removing noise while retaining important signal features; the fidelity and sparsity of the data can be balanced during the denoising process, avoiding the problems of over-smoothing or over-sparseness and improving the accuracy of signal reconstruction; the sparse representation method reduces the signal dimension that needs to be processed, reduces the 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 are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
[0123] Embodiment 3, the third embodiment of the present invention, is different from the first two embodiments in that:
[0124] If the above functions are implemented in the form of 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 the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the above methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0125] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0126] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the above-mentioned program is printed, since the above-mentioned program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or processing in other suitable ways as necessary, and then stored in a computer memory.
[0127] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0128] Example 4, reference Figure 2 , is an embodiment of the present invention, a system of an EEG signal preprocessing and feature extraction method, comprising 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 obtain the original EEG signal and perform noise reduction processing on the original EEG signal to obtain the EEG signal after noise reduction processing;
[0130] The interference monitoring and noise reduction module is used to map the EEG signal after the noise reduction process from the time domain to the frequency domain, and extract signals of five frequency bands in the frequency domain.
[0131] The frequency domain conversion and feature extraction module is used to calculate the power spectrum density of the signal in each frequency band, and calculate the differential entropy eigenvalue of the signal in each frequency band according to the power spectrum density;
[0132] A classification model training and evaluation module, used to input at least all of the above differential entropy eigenvalues as frequency domain eigenvalues into a learning classification algorithm for training to obtain a classification model;
[0133] The result output module is used to classify new EEG signal samples using the above classification model to obtain classification results, wherein the above classification results are used for emotion analysis, and different categories correspond 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 are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for preprocessing and extracting features of electroencephalogram signals, characterized in that: include, Acquire an original EEG signal, and perform noise reduction processing on the original EEG signal to obtain an EEG signal after noise reduction processing; Mapping the EEG signal after the noise reduction process from the time domain to the frequency domain, and extracting signals of five frequency bands in the frequency domain respectively; Calculating the power spectral density of the signal in each frequency band, and calculating the differential entropy eigenvalue of the signal in each frequency band according to the power spectral density; At least all of the differential entropy eigenvalues are input as frequency domain eigenvalues into a learning classification algorithm for training to obtain a classification model; The classification model is used 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.
2. The method for preprocessing and extracting features of an electroencephalogram signal according to claim 1, characterized in that: Performing noise reduction processing on the original EEG signal to obtain a noise-reduced EEG signal includes: Adaptive filter is used to monitor the interference components in the original EEG signal in real time and obtain the interference intensity index, where the interference intensity index I is the interference signal power P noise The total power of the EEG signal P total The ratio of When the interference intensity index is greater than a set threshold, a sparse representation method is used to perform noise reduction processing on the original EEG signal to obtain a noise-reduced EEG signal.
3. A method for preprocessing and extracting features of electroencephalogram signals as claimed in claim 2, characterized in that: The original EEG signal is subjected to noise reduction processing by using a sparse representation method to obtain a noise-reduced EEG signal, including: Decomposing the original EEG signal x into x=Dα, where D is a dictionary matrix and α is a sparse coefficient; The sparse coefficient is solved by optimizing the objective function, and the original EEG signal is reconstructed using the sparse coefficient α obtained by the solution to obtain the EEG signal after noise reduction processing.
4. A method for preprocessing and extracting features of electroencephalogram signals as claimed in claim 3, characterized in that: The EEG signal after the noise reduction process is mapped from the time domain to the frequency domain, and signals of five frequency bands are respectively extracted in the frequency domain, including: The denoised EEG signal is mapped from the time domain to the frequency domain through fast Fourier transform to obtain the spectrum representation of the EEG signal, the spectrum is divided according to a predefined frequency band range, the frequency index range of each frequency band is calculated, and the spectrum data of each frequency band is extracted, wherein the five frequency bands are Delta, Theta, Alpha, Beta, and Gamma.
5. A method for preprocessing and extracting features of electroencephalogram signals as claimed in claim 4, characterized in that: Calculating the power spectrum density of the signal in each frequency band, and calculating the differential entropy eigenvalue of the signal in each frequency band according to the power spectrum density, including: The formula for calculating the power spectral density is: Wherein, w[k] is a function based on adaptive frequency band division, and X[k] is the spectrum data within the frequency band; The formula for calculating the differential entropy eigenvalue of each frequency band is:
6. A method for preprocessing and extracting features of electroencephalogram signals as claimed in claim 5, characterized in that: At least all of the differential entropy eigenvalues are input as frequency domain eigenvalues into a learning classification algorithm for training to obtain a classification model, including: Extract the power spectral density and the differential entropy eigenvalues of Delta, Theta, Alpha, Beta and Gamma frequency bands, select the frequency bands and features most relevant to the target classification, standardize the features, and train the initial model using a labeled data set, where 70% of the data is used for training and 30% of the data is used for testing; The initial model is trained using an activation function, a loss function and an optimizer through a neural network-based classifier, the cross entropy loss function is used to calculate the difference between the predicted value and the true value of the initial model, and stochastic gradient descent is used as an optimizer to adjust the weight of the initial model to obtain the trained classification model.
7. A system using the method for preprocessing and extracting features of an electroencephalogram signal according to any one of claims 1 to 6, characterized in that: include: The EEG signal acquisition module is used to obtain the original EEG signal and perform noise reduction processing on the original EEG signal to obtain the EEG signal after noise reduction processing; An interference monitoring and noise reduction module, used for mapping the noise-reduced EEG signal from the time domain to the frequency domain, and extracting signals of five frequency bands in the frequency domain; A frequency domain conversion and feature extraction module, used to calculate the power spectrum density of the signal of each frequency band, and calculate the differential entropy eigenvalue of the signal of each frequency band according to the power spectrum density; A classification model training and evaluation module, used for inputting at least all of the differential entropy eigenvalues as frequency domain eigenvalues into a learning classification algorithm for training to obtain a classification model; The result output module is used to classify 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.
8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Electroencephalogram signal denoising method based on width-depth echo state network
CN111860306A
Identification method and identification device
CN116965816A
Emotion recognition method, device and equipment based on long-time electroencephalogram signals and medium
CN117290776A
Regulation and control content generation method, system and equipment based on emotion recognition and medium
CN118152860A
Systems and methods associated with determination of user intensions involving aspects of brain computer interface (BCI), artificial reality, activity and / or state of a user's mind, brain or other interactions with an environment and / or other features
WO2024211637A1