Method and system for extracting and optimizing frequency domain features of electroencephalogram signals
Through adaptive noise filtering, frequency domain conversion and multi-resolution analysis technology, combined with dimensionality reduction and convolutional neural network models, the problems of noise interference and feature extraction in EEG signal processing are solved, and efficient EEG signal processing and classification are achieved.
Patent Information
- Application Number
- CN202411929419.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-25
AI Technical Summary
The existing EEG signal processing technology has problems such as noise interference, incomplete feature extraction and insufficient adaptability of classification models, resulting in low processing efficiency and affecting practical applications.
Adaptive noise filtering algorithm is used to remove noise, frequency domain features are extracted through frequency domain conversion and multi-resolution analysis technology, and classified processing is performed by combining dimensionality reduction technology and convolutional neural network model.
It effectively removes noise in EEG signals, preserves signal integrity, extracts nonlinear features of the signal, improves the feature expression ability, enhances the adaptability and accuracy of the classification model, and significantly improves the EEG signal processing efficiency.
Smart Images

Figure CN119745397A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of biomedical signal processing, and specifically to a method for optimizing frequency domain feature extraction of electroencephalogram signals, a system for the method, a computer device, and a computer-readable storage medium. Background Art
[0002] Electroencephalogram (EEG) signals are signals that record the electrical activity of neurons in the cerebral cortex and are widely used in neuroscience research, clinical diagnosis, and brain-computing interface (BCI) systems. However, the complexity of EEG signals and their susceptibility to external interference make accurate signal processing and feature extraction key issues. In traditional EEG signal processing, problems such as noise interference, incomplete feature extraction, and insufficient adaptability of classification models are more prominent.
[0003] At present, most common EEG signal preprocessing methods rely on simple filters to remove noise, such as removing electromyographic artifacts and eye movement artifacts. However, these methods often find it difficult to balance noise removal and signal integrity, which may lead to the loss of some valid signals. In terms of feature extraction, frequency domain feature extraction mostly uses techniques such as fast Fourier transform (FFT) to obtain the frequency component information of the signal. However, traditional methods such as FFT have shortcomings when processing nonlinear signals and it is difficult to fully capture the characteristics of complex signals. In addition, existing classification models are usually static models that cannot dynamically adjust parameters according to new input data, which affects the processing efficiency in real-time applications.
[0004] Therefore, the current processing efficiency of EEG signals is relatively poor, which affects the practical application of EEG signals. Summary of the invention
[0005] In view of the above-mentioned problems, the present invention is proposed.
[0006] Therefore, the technical problem solved by the present invention is that the current processing efficiency of EEG signals is relatively poor, which affects the practical application of EEG signals.
[0007] In order to solve the above technical problems, the present invention provides the following technical solutions: a method for optimizing frequency domain feature extraction of EEG signals, comprising:
[0008] Acquire a time domain signal, wherein the time domain signal is an original signal including time domain EEG data and interference obtained by collecting EEG signals through an electrode device and recording potential changes at at least one cortical position;
[0009] Adopting an adaptive noise filtering algorithm to remove noise from the collected time domain signal to obtain a processed time domain signal;
[0010] Performing spectrum analysis on the processed time domain signal through a frequency domain conversion algorithm to generate a frequency domain signal;
[0011] Dividing the frequency domain signal into frequency bands according to different frequency ranges to obtain decomposed signals of multiple frequency bands;
[0012] Extracting frequency domain features from the decomposed signal, and aggregating the extracted frequency domain features to generate an initial feature set;
[0013] Applying dimensionality reduction technology to reduce the dimensionality of the initial feature set to obtain an optimized feature set;
[0014] The optimized feature set is classified using a machine learning model suitable for classification tasks to obtain a classified feature set, wherein the classified feature set is used for sentiment analysis, and different categories correspond to different sentiments.
[0015] As a preferred solution of the frequency domain feature extraction optimization method of the EEG signal described in the present invention, an adaptive noise filtering algorithm is used to remove noise from the collected time domain signal to obtain a processed time domain signal, including: segmenting the time domain signal according to the time window length L1 to obtain a segmented time domain signal; when eye movement artifacts are extracted from the segmented time domain signal, a band-stop filter is applied to remove noise of 0.1-3Hz; when myoelectric noise is extracted from the segmented time domain signal, a high-pass filter is applied to remove noise above 20Hz; the band-stop filter and the high-pass filter are used to simultaneously and parallelly process each segment of the time domain signal, and finally the processed time domain signal is output.
[0016] As a preferred solution of the frequency domain feature extraction optimization method of the electroencephalogram signal described in the present invention, the processed time domain signal is subjected to spectral analysis through a frequency domain conversion algorithm to generate a frequency domain signal, including: segmenting the time domain signal after noise processing according to a window length L2, and setting an overlap of M% between each signal segment; applying a Kaiser window function to each signal segment, and using a fast Fourier transform to convert the time domain signal into an initial frequency domain signal, extracting the frequency components, amplitude and phase information in the initial frequency domain signal, and obtaining a spectral result; performing weighted processing on the spectral results of the initial frequency domain signals of adjacent segments, accumulating the spectral results of each signal segment, and generating the frequency domain signal.
[0017] As a preferred solution of the frequency domain feature extraction optimization method of the EEG signal described in the present invention, the frequency domain signal is divided into frequency bands according to different frequency ranges to obtain decomposed signals of multiple frequency bands, including: extracting frequency energy characteristics through power spectral density analysis, calculating the power spectral density value of each frequency point, and forming the spectral energy distribution of each frequency band, wherein the divided frequency bands include one or more of Delta, Theta, Alpha, Beta and Gamma bands; applying multi-resolution analysis technology to decompose the frequency components in each frequency band, extracting frequency detail information of different scales, performing weighted smoothing processing on the spectral energy distribution of the frequency domain signal of each frequency band, and generating the decomposed signal of each frequency band including multi-resolution analysis and power spectral density characteristics.
[0018] As a preferred solution of the frequency domain feature extraction optimization method of the EEG signal described in the present invention, frequency domain features are extracted from the decomposed signal, and the extracted frequency domain features are summarized to generate an initial feature set, including: in each frequency band, the amplitude and phase of each frequency point are calculated to form a spectrum distribution; according to the spectrum distribution, the differential entropy is calculated for the spectrum information of each frequency point, wherein the differential entropy is calculated point by point through the probability density function of each frequency point to extract the nonlinear features reflecting the complexity of the signal; the differential entropies of all frequency points in each frequency band are arranged in index order to form a differential entropy feature matrix for each frequency band; the differential entropy feature matrices of each frequency band are merged one by one to generate the initial feature set in the frequency domain.
[0019] As a preferred solution of the frequency domain feature extraction optimization method of the EEG signal described in the present invention, the dimension reduction technology is applied to reduce the dimension of the initial feature set to obtain the optimized feature set, including: performing principal component analysis on the initial feature set, calculating the variance value of each feature, presetting the first threshold T1, retaining features with variance values exceeding T1, calculating feature contribution of features screened out by principal component analysis, presetting the second threshold T2, assigning weight values to features with contribution exceeding T2, performing cross-correlation analysis on the feature set after feature weight assignment, presetting the third threshold T3, eliminating redundant features with correlation exceeding T3, and obtaining the optimized feature set.
[0020] As a preferred solution of the frequency domain feature extraction optimization method of the electroencephalogram signal described in the present invention, the optimized feature set is classified using a machine learning model suitable for classification tasks to obtain a classified feature set, including: inputting the optimized feature set into a convolutional neural network model, wherein the convolutional neural network model is composed of a convolutional layer, a pooling layer and a fully connected layer; when the input feature set passes through the convolutional layer of each layer, the convolution operation extracts local features, and the pooling layer reduces the dimension of the feature map output by the convolution to retain the main features and reduce the amount of calculation; in the forward propagation process, the data in the feature set passes through each layer of the network in turn to generate a classification prediction result; in the backward propagation process, the loss function between the predicted value and the actual value is calculated, and the network weight is adjusted by the gradient descent algorithm; using an incremental learning algorithm, for each new electroencephalogram signal data input, the convolutional neural network model locally adjusts the weight parameters according to the newly input data; after completing the forward propagation and backward propagation, the convolutional neural network model generates a classification result of the electroencephalogram signal according to the activation value of the final output layer, wherein the classification result includes emotional state recognition, cognitive state assessment and attention level monitoring.
[0021] Another object of the present invention is to provide a frequency domain feature extraction and optimization system for EEG signals, comprising: a signal acquisition module for acquiring time domain signals, wherein the time domain signals are obtained by collecting EEG signals through electrode equipment and recording the potential changes of at least one cortical position to obtain an original signal containing time domain EEG data and interference; a noise filtering module for using an adaptive noise filtering algorithm to remove noise from the collected time domain signals to obtain processed time domain signals; a frequency domain conversion module for performing spectrum analysis on the processed time domain signals through a frequency domain conversion algorithm to generate frequency domain signals; a frequency band A division module is used to divide the frequency domain signal into frequency bands according to different frequency ranges to obtain decomposed signals of multiple frequency bands; a feature extraction module is used to extract frequency domain features from the decomposed signal, and summarize the extracted frequency domain features to generate an initial feature set; a feature dimension reduction module is used to apply dimension reduction technology to reduce the dimension of the initial feature set to obtain an optimized feature set; a classification optimization module is used to classify the optimized feature set using a machine learning model suitable for classification tasks to obtain a classified feature set, wherein the classified feature set is used for sentiment analysis, and different categories correspond to different emotions.
[0022] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned method for optimizing frequency domain feature extraction of electroencephalogram signals when executing the computer program.
[0023] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the above-mentioned method for optimizing frequency domain feature extraction of electroencephalogram signals.
[0024] Beneficial effects of the present invention: The frequency domain feature extraction optimization method of the EEG signal provided by the present invention effectively removes low-frequency artifacts and high-frequency noise in the EEG signal through adaptive noise filtering technology, thereby ensuring the integrity of the signal. By refining the EEG signal in different frequency bands, the key feature information of each frequency band is retained, and the complex signal components that may be lost in conventional feature extraction are avoided. At the same time, the nonlinear features of the signal are deeply extracted to improve the expressive ability of the features. Combined with the dimensionality reduction technology, redundant features are further eliminated to generate an optimized feature set. Finally, the optimized feature set is classified using the machine learning model of the classification task, thereby realizing real-time classification of new EEG signal data. The scheme of the present application greatly improves the efficiency of EEG signal processing, ensures that the accuracy of the processed EEG signal is high, and the processed EEG signal can be directly used for subsequent applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0026] Figure 1 An overall flow chart of a method for optimizing frequency domain feature extraction of EEG signals provided in one embodiment of the present application. DETAILED DESCRIPTION
[0027] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0028] 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.
[0029] 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.
[0030] Example 1
[0031] Reference Figure 1 , as an embodiment of the present application, provides a frequency domain feature extraction optimization method for EEG signals, comprising:
[0032] Acquire a time domain signal, wherein the time domain signal is an original signal containing time domain EEG data and interference obtained by collecting EEG signals through an electrode device and recording the potential changes of at least one cortical position; use an adaptive noise filtering algorithm to remove noise from the collected time domain signal to obtain a processed time domain signal; perform spectrum analysis on the processed time domain signal through a frequency domain conversion algorithm to generate a frequency domain signal; divide the frequency domain signal into frequency bands according to different frequency ranges to obtain decomposed signals of multiple frequency bands; extract frequency domain features from the decomposed signal, and summarize the extracted frequency domain features to generate an initial feature set; use dimensionality reduction technology to reduce the dimensionality of the initial feature set to obtain an optimized feature set; use a machine learning model suitable for classification tasks to classify the optimized feature set to obtain a classified feature set, wherein the classified feature set is used for emotion analysis, and different categories correspond to different emotions.
[0033] Specifically, an electroencephalogram signal is collected by an electrode device, and a potential change of at least one position is recorded to obtain an original signal including time-domain electroencephalogram data and interference, where the original signal is a time-domain signal;
[0034] Perform noise processing on the collected time domain signal and adopt an adaptive noise filtering algorithm to obtain a processed time domain signal;
[0035] The processed time domain signal is subjected to spectrum analysis through a frequency domain conversion algorithm to generate a complete frequency domain signal;
[0036] Divide the frequency domain signal into frequency bands according to different frequency ranges to generate decomposed signals of each frequency band;
[0037] Extract frequency domain features from the decomposed signal, and aggregate the extracted feature information to generate an initial feature set;
[0038] Apply dimensionality reduction techniques to the initial feature set to generate an optimized feature set;
[0039] The optimized feature set is classified using a machine learning model suitable for classification tasks, and the machine learning model dynamically adjusts the classification parameters through an incremental learning algorithm.
[0040] The low-frequency artifacts and high-frequency noise in the EEG signal are effectively removed by adaptive noise filtering technology, ensuring the integrity of the signal. By refining the EEG signal in different frequency bands, the key feature information of each frequency band is retained, avoiding the complex signal components that may be lost in conventional feature extraction. At the same time, the nonlinear features of the signal are deeply extracted to improve the expressive ability of the features. Combined with the dimensionality reduction technology, the redundant features are further eliminated and the optimized feature set is generated. Finally, the optimized feature set is classified using the convolutional neural network model, which realizes the real-time processing and classification of the new EEG signal data, greatly improving the adaptability and accuracy of the classification model. The present invention shows significant advantages in tasks such as emotional state recognition, cognitive state analysis, and attention level monitoring of EEG signals, and effectively solves the problem of imperfect processing in the prior art. The scheme of the present application greatly improves the efficiency of EEG signal processing, ensures that the accuracy of the processed EEG signal is high, and the processed EEG signal can be directly used for subsequent applications.
[0041] An adaptive noise filtering algorithm is used to remove noise from the collected time domain signal to obtain a processed time domain signal, including: segmenting the time domain signal according to a time window length L1 to obtain a segmented time domain signal; when eye movement artifacts are extracted from the segmented time domain signal, a band-stop filter is applied to remove noise of 0.1-3 Hz; when electromyographic noise is extracted from the segmented time domain signal, a high-pass filter is applied to remove noise above 20 Hz; each segment of the time domain signal is processed in parallel using the band-stop filter and the high-pass filter, and finally the processed time domain signal is output.
[0042] Specifically, obtaining the processed time domain signal includes segmenting the collected time domain signal according to the time window length L1;
[0043] The eye movement artifacts in the low frequency band are detected by the extreme value changes, and the myoelectric noise in the high frequency band is detected by the change rate.
[0044] When eye movement artifacts were detected, a band-stop filter was applied, dynamically adjusting the center frequency and bandwidth to remove low-frequency noise of 0.1-3 Hz;
[0045] When EMG noise is detected, a high-pass filter is applied to dynamically adjust the cutoff frequency to remove high-frequency noise above 20 Hz;
[0046] The band-stop filter and the high-pass filter process each signal in parallel and finally output the processed time domain signal.
[0047] The processed time domain signal is subjected to spectrum analysis through a frequency domain conversion algorithm to generate a frequency domain signal, including: segmenting the noise-processed time domain signal according to a window length L2, and setting an overlap of M% between each signal segment; applying a Kaiser window function to each signal segment, and using a fast Fourier transform to convert the time domain signal into an initial frequency domain signal, extracting the frequency component, amplitude and phase information in the initial frequency domain signal, and obtaining a spectrum result; performing weighted processing on the spectrum results of the initial frequency domain signal of adjacent segments, accumulating the spectrum results of each signal segment, and generating the frequency domain signal.
[0048] Specifically, the frequency domain conversion algorithm includes segmenting the noise-processed time domain signal according to the window length L2, and setting an overlap of M% between each signal segment;
[0049] A Kaiser window function is applied to each segment of the signal. The parameter β of the Kaiser window is dynamically set according to the energy distribution characteristics and frequency change rate of the signal. For signals with a wide energy distribution, a higher β value is set, and for signals with energy concentrated in a narrow frequency band, a lower β value is set. After applying the window function to each segment, the time domain signal is converted into a frequency domain signal using a fast Fourier transform to extract the frequency components in the signal and their corresponding amplitude and phase information;
[0050] The spectrum results of adjacent segmented signals are weighted to smooth the transition between segments;
[0051] The spectrum results of each signal segment are accumulated to generate a complete frequency domain signal.
[0052] L1 is used for noise detection and processing, and the segment length is set based on the characteristics of low-frequency eye movement artifacts and high-frequency electromyographic noise in EEG signals. Low-frequency artifacts in EEG signals are usually in the range of 0.1-3Hz. In order to capture the periodic changes of these low-frequency noises, L1 is preferably 1 second. At this time, the segment length can capture sufficient signal changes without losing low-frequency information, especially for 0.5Hz noise, it can cover half a cycle. At the same time, the segment length of 1 second also has sufficient response speed for high-frequency noise detection above 20Hz. Therefore, L1 = 1 second is not only suitable for the detection of low-frequency eye movement artifacts, but also can ensure the processing effect of high-frequency noise.
[0053] L2 is used for frequency domain conversion of the signal after noise processing. The setting of the segment length L2 is mainly based on the processing requirements of the EEG signal and the balance between the time and frequency resolution of the frequency domain conversion. In the fast Fourier transform (FFT) process, the setting of L2 directly affects the accuracy of the spectrum analysis. It is preferred to set L2 to 200 milliseconds. This segment length can provide sufficient frequency resolution for spectrum analysis without affecting the time resolution of the signal. Through a 200 millisecond window, the frequency components of the signal can be captured, and the amplitude and phase information of each frequency component can be accurately extracted.
[0054] M% is used for overlapping processing between segmented signals, and the overlapping ratio is preferably 50%. Setting a 50% overlapping processing can achieve a smooth transition of the spectrum between each segment signal, reduce the boundary effect between segments, and avoid spectrum hopping. In addition, a 50% overlap rate can ensure that each signal can capture enough frequency components, and after actual signal processing verification, this overlap ratio can achieve the best spectrum smoothing effect without increasing too much computational complexity. Therefore, an overlapping ratio of M% = 50% can ensure the smoothness and accuracy of the signal in the frequency domain conversion, and is a technically preferred overlapping setting.
[0055] At the same time, in order to reduce the boundary effect, L2 is processed with an overlap ratio of M% = 50% to ensure smooth transition of the signal between each segment and avoid signal spectrum jump. Therefore, the setting of L2 = 200 milliseconds is based on the technical requirements of frequency domain conversion and can find the optimal balance between the time resolution and frequency resolution of the signal.
[0056] The frequency domain signal is divided into frequency bands according to different frequency ranges to obtain decomposed signals of multiple frequency bands, including: extracting frequency energy characteristics through power spectral density analysis, calculating the power spectral density value of each frequency point, and forming the spectrum energy distribution of each frequency band, wherein the divided frequency bands include one or more of Delta, Theta, Alpha, Beta and Gamma bands; applying multi-resolution analysis technology to decompose the frequency components in each frequency band, extracting frequency detail information of different scales, performing weighted smoothing processing on the spectrum energy distribution of the frequency domain signal of each frequency band, and generating the decomposed signal of each frequency band including multi-resolution analysis and power spectral density characteristics.
[0057] Specifically, the divided frequency bands include Delta, Theta, Alpha, Beta and Gamma bands;
[0058] Generating the decomposed signal of each frequency band includes extracting the frequency energy characteristics through power spectrum density analysis, calculating the power spectrum density value of each frequency point, and forming the spectrum energy distribution of each frequency band;
[0059] Apply multi-resolution analysis technology to decompose the frequency components in each frequency band and extract frequency details of different scales;
[0060] Perform weighted spectrum smoothing on the decomposed signal of each frequency band, weight adjacent segmented signals, and process the spectrum differences between adjacent frequency bands;
[0061] Finally, the decomposed signals of each frequency band including multi-resolution analysis and power spectral density characteristics are generated.
[0062] The power spectral density is expressed as,
[0063]
[0064] Among them, P(f i ) represents the frequency point f i The power spectral density, X(f i ) represents the frequency point f i The complex amplitude of , N represents the total number of frequency points, which is used for normalization.
[0065] The multi-resolution analysis is expressed as,
[0066]
[0067] Among them, S j (t) represents the multi-resolution signal component at level j, representing the wavelet coefficients at this level, P(f k ) represents the frequency point f obtained from the power spectrum density analysis in the previous step k The power spectral density value at , as input, represents the wavelet basis function, uses j of different scales to analyze the local characteristics of the signal, Δt represents the time interval, and represents the time step of the signal.
[0068] The weighted spectrum smoothing process is expressed as,
[0069]
[0070] Among them, S w (t) represents the weighted smoothed signal, which combines the decomposed signals of different scales, W j Represents the weight value, which represents the weight distribution of signals at different scales, S j (t) represents the j-th level signal component obtained from the previous multi-resolution analysis, E j represents the energy of the jth frequency band, represents the total energy of all frequency bands, N is the total number of frequency bands, and f j represents the center frequency of the jth frequency band, f centerIt represents the target center frequency, which is set according to the application requirements and is usually the main frequency band of interest. λ represents the adjustment parameter of the frequency offset, which is used to control the weight attenuation speed of the frequency band far from the target frequency.
[0071] The generated decomposed signals of each frequency band including multi-resolution analysis and power spectrum density characteristics are expressed as:
[0072]
[0073] Among them, S final (t) represents the final decomposition signal, which contains the comprehensive results of all frequency bands. represents the weighted smoothed signal of the bth frequency band.
[0074] Extracting frequency domain features from the above decomposed signal, and aggregating the extracted frequency domain features to generate an initial feature set, including: calculating the amplitude and phase of each frequency point in each frequency band to form a spectrum distribution; calculating the differential entropy of the spectrum information of each frequency point according to the above spectrum distribution, wherein the differential entropy is calculated point by point through the probability density function of each frequency point to extract nonlinear features reflecting the complexity of the signal; arranging the differential entropies of all frequency points in each frequency band in index order to form a differential entropy feature matrix of each frequency band; merging the above differential entropy feature matrices of each frequency band one by one to generate the above initial feature set in the frequency domain.
[0075] Specifically, extracting frequency domain features includes calculating the amplitude and phase of each frequency point in each frequency band to form a spectrum distribution;
[0076] The differential entropy is calculated for the spectrum information of each frequency point, and the differential entropy is calculated point by point through the probability density function of each frequency point to extract the nonlinear characteristics reflecting the complexity of the signal;
[0077] The differential entropy values of all frequency points in each frequency band are arranged in index order to form the differential entropy feature matrix of the frequency band;
[0078] The differential entropy feature matrices of each frequency band are merged one by one to generate the initial feature set in the frequency domain.
[0079] The calculation of amplitude and phase is expressed as,
[0080]
[0081] Among them, S final,j (f) represents the spectrum signal of the jth frequency band at frequency f, A j (f) represents the amplitude of the jth frequency band at frequency f, θ j (f) represents the phase of the jth frequency band at frequency f.
[0082] The differential entropy is expressed as,
[0083] H j (f) = -∫P(A j (f))logP(A j (f))dA j (f)
[0084] Among them, H j (f) represents the differential entropy of the jth frequency band at frequency f, P(A j (f)) represents the probability density function of the amplitude of the jth frequency band at frequency f.
[0085] The differential entropy feature matrix is expressed as,
[0086]
[0087] Among them, H j Represents the differential entropy feature matrix of the jth frequency band, which contains the differential entropy values of all frequency points in the band.
[0088] The initial feature set in the frequency domain is expressed as,
[0089]
[0090] Among them, H total Represents the initial feature set after merging all frequency bands, including the differential entropy features of each frequency band.
[0091] The dimensionality reduction technology is applied to perform dimensionality reduction processing on the above-mentioned initial feature set to obtain an optimized feature set, including: performing principal component analysis on the above-mentioned initial feature set, calculating the variance value of each feature, presetting a first threshold value T1, retaining features with variance values exceeding T1, calculating feature contribution of features screened out by principal component analysis, presetting a second threshold value T2, assigning weight values to features with contributions exceeding T2, performing cross-correlation analysis on the feature set after feature weight assignment, presetting a third threshold value T3, eliminating redundant features with correlations exceeding T3, and obtaining an optimized feature set.
[0092] Specifically, the application of dimensionality reduction technology includes performing principal component analysis on the initial feature set, calculating the variance value of each feature, presetting a first threshold T1, retaining features with variance values exceeding T1, and reducing the dimensionality of the initial feature set through PCA to reduce the data dimension and retain high variance features.
[0093] The feature contribution of the features selected by principal component analysis is calculated, and a second threshold T2 is preset. Weight values are assigned to features whose contribution exceeds T2. The weight allocation is based on the impact of the features on signal classification to ensure that feature contribution and weight adjustment are carried out simultaneously.
[0094] A cross-correlation analysis is performed on the feature set after feature weight assignment, and a third threshold T3 is preset to eliminate redundant features whose correlation exceeds T3. This process optimizes the final feature set by reducing the impact of highly correlated or redundant features.
[0095] Principal component analysis includes, the covariance matrix is expressed as:
[0096]
[0097] Among them, C represents the feature covariance matrix, which represents the linear correlation between features, and N represents the total number of EEG signals. represents the transposed matrix of the initial feature set, M represents the number of features, and represents the number of frequency domain features extracted from each sample.
[0098] The PCA step performs eigenvalue decomposition through the covariance matrix C to obtain the eigenvalue λ i and the corresponding eigenvector v i , expressed as:
[0099] Cv i =λ i v i ,
[0100] Among them, v i represents the eigenvector, represents the direction of the i-th principal component, and λ i represents the eigenvalue and represents the variance of the i-th principal component.
[0101] Feature variance selection is expressed as:
[0102] λ i >T1 Keep the feature vector v i ,
[0103] in, Indicates logical deduction.
[0104] The feature matrix after dimensionality reduction is expressed as:
[0105] H PCA =H total V K ,
[0106] Among them, H PCA represents the feature matrix after dimensionality reduction, represents the optimized feature matrix obtained by PCA, V K Represents a matrix containing the first K eigenvectors, retaining the eigenvectors corresponding to the K largest eigenvalues.
[0107] The feature contribution calculation is expressed as,
[0108]
[0109] Among them, g i represents the contribution of feature i, Sclass represents the impact of the feature on the classification result, and h i represents the eigenvalue of feature i.
[0110] The weight distribution is expressed as,
[0111]
[0112] Among them, w i represents the weight of feature i, g i represents the contribution of feature i, Represents the sum of the contributions of all K retained features, ensuring weight normalization.
[0113] Feature screening is expressed as,
[0114] w i >T2 Retain feature h i .
[0115] The cross-correlation analysis is expressed as,
[0116]
[0117] Among them, ρ(h i ,h j ) represents the feature h i and h j The correlation coefficient between two features is used to measure the linear correlation between two features. i ,h j ) represents the feature h i and h j The covariance between Var(h i ) represents the feature h i The variance of Var(h j ) represents the feature h j The variance of .
[0118] Redundant feature removal is expressed as,
[0119] ρ(h i ,h j )>T3 Eliminate h j .
[0120] The optimized feature set is classified using a machine learning model suitable for classification tasks to obtain a classified feature set, including: inputting the optimized feature set into a convolutional neural network model, wherein the convolutional neural network model is composed of a convolutional layer, a pooling layer, and a fully connected layer; when the input feature set passes through the convolutional layer of each layer, the convolution operation extracts local features, and the pooling layer reduces the dimension of the feature map output by the convolution to retain the main features and reduce the amount of calculation; in the forward propagation process, the data in the feature set passes through each layer of the network in turn to generate a classification prediction result; in the backward propagation process, the loss function between the predicted value and the actual value is calculated, and the network weight is adjusted by the gradient descent algorithm; using an incremental learning algorithm, for each new EEG signal data input, the convolutional neural network model locally adjusts the weight parameters according to the newly input data; after completing the forward propagation and backward propagation, the convolutional neural network model generates the classification result of the EEG signal according to the activation value of the final output layer, wherein the classification result includes emotional state recognition, cognitive state assessment, and attention level monitoring.
[0121] Specifically, classifying the optimized feature set includes inputting the optimized feature set into a convolutional neural network model, the convolutional neural network model consisting of multiple convolutional layers, pooling layers, and fully connected layers;
[0122] When the input feature set passes through each convolution layer, the convolution operation extracts local features, and the pooling layer reduces the dimension of the feature map output by the convolution to retain the main features and reduce the amount of calculation;
[0123] During the forward propagation process, the data in the feature set passes through each layer of the network in turn to generate classification prediction results. The convolution layer extracts the pattern in the input features through the weight filter, and the pooling layer selects features based on the maximum or average value in the feature map, compressing the input feature dimensions layer by layer while enhancing the expression of the features.
[0124] In the back propagation process, the loss function between the predicted value and the actual value is calculated, and the network weights are adjusted through the gradient descent algorithm. The error is gradually propagated from the output layer to each hidden layer, and the convolution kernel weights of each layer are updated based on the error gradient, and the model parameters are adjusted to improve the classification accuracy.
[0125] Using an incremental learning algorithm, the convolutional neural network model locally adjusts the weight parameters according to the new EEG signal data each time it is input. Through incremental updates, the convolutional neural network model can effectively adapt to the new input signals without having to completely retrain the model.
[0126] After completing forward propagation and back propagation, the convolutional neural network model generates classification results of EEG signals based on the activation value of the final output layer. The classification results include emotional state recognition, cognitive state assessment, and attention level monitoring.
[0127] Example 2
[0128] As an embodiment of the present application, a frequency domain feature extraction optimization system for EEG signals is provided, comprising:
[0129] Signal acquisition module, noise filtering module, frequency domain conversion module, frequency band division module, feature extraction module, feature dimension reduction module and classification optimization module;
[0130] The signal acquisition module is used to obtain a time domain signal, wherein the time domain signal is an original signal including time domain EEG data and interference obtained by collecting EEG signals through an electrode device and recording the potential change of at least one cortical position;
[0131] The noise filtering module is used to use an adaptive noise filtering algorithm to remove noise from the collected time domain signal to obtain a processed time domain signal;
[0132] The frequency domain conversion module is used to perform spectrum analysis on the above processed time domain signal through a frequency domain conversion algorithm to generate a frequency domain signal;
[0133] The frequency band division module is used to divide the above frequency domain signal into frequency bands according to different frequency ranges to obtain decomposed signals of multiple frequency bands;
[0134] The feature extraction module is used to extract frequency domain features from the above decomposed signal, and summarize the extracted frequency domain features to generate an initial feature set;
[0135] The feature dimension reduction module is used to apply the dimension reduction technology to reduce the dimension of the initial feature set to obtain an optimized feature set;
[0136] The classification optimization module is used to classify the above-mentioned optimized feature set using a machine learning model suitable for the classification task to obtain a classified feature set, wherein the classified feature set is used for sentiment analysis, and different categories correspond to different sentiments.
[0137] Example 3
[0138] An embodiment of the present application is different from the previous two embodiments in that:
[0139] 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.
[0140] 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.
[0141] 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.
[0142] 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.
[0143] Example 4
[0144] As an embodiment of the present application, a frequency domain feature extraction optimization method for EEG signals is provided. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through simulation experiments.
[0145] A public EEG signal dataset was used, which included EEG data under emotional states and cognitive tasks. The data came from 50 subjects, and each subject collected 500 sets of EEG signals under different task conditions.
[0146] The EEG signals in the dataset were collected with 32 electrodes, a sampling frequency of 500 Hz, and a time window of 2 seconds.
[0147] The experiment was conducted in a simulated real-life environment, with common interference factors added, including: myoelectric noise (40-100Hz) from head muscle activity. Eye movement artifacts (0.1-3Hz) due to blinking or line of sight movement. Power supply noise (50Hz) is electromagnetic interference introduced by the device. To ensure the noise interference effect in a real environment, the above noises are superimposed on the EEG signal for processing.
[0148] The traditional method uses a band-stop filter to remove 50Hz power supply noise and a high-pass filter to remove myoelectric noise and eye movement artifacts. When extracting frequency domain features, FFT technology is used, and the classification model is a static support vector machine (SVM).
[0149] The method of the present application uses an adaptive noise filtering algorithm to dynamically adjust the filter parameters to remove low-frequency eye movement artifacts and high-frequency electromyographic noise; multi-scale decomposition and differential entropy algorithms are used to extract features, and a convolutional neural network (CNN) is used as the classification model, which is dynamically adjusted through an incremental learning algorithm.
[0150] The eye movement artifacts and myoelectric noise added to the real EEG signal are processed separately. The traditional method uses band-stop and high-pass filters, while this application uses adaptive noise filtering to automatically adjust the filter parameters to process the noise. The two methods are compared in terms of signal-to-noise ratio improvement effects at different noise levels (low noise 10-20dB, medium noise 5-10dB, high noise 0-5dB).
[0151] The traditional method extracts frequency domain features through FFT, while this application extracts key nonlinear features of signals in different frequency bands through multi-scale decomposition combined with differential entropy algorithm. For different emotional task signals, the error after feature reconstruction is compared to evaluate the integrity of the extracted features.
[0152] The extracted feature sets were classified by SVM and CNN classification models respectively to evaluate the classification accuracy of the two methods. The test classification tasks included emotional state classification and cognitive task classification.
[0153] The experimental results are shown in Table 1.
[0154] Table 1 Comparison of experimental results
[0155]
[0156] The fixed filter in the traditional method can only process noise in a fixed frequency range. Especially in high noise conditions, the filter cannot be adjusted adaptively, resulting in more residual noise signals. However, the adaptive noise filtering algorithm of the present application can dynamically adjust the filter parameters according to the characteristics of the noise in real time, effectively remove different types of noise, and retain more effective signals. This is a key technical improvement point that significantly improves the signal-to-noise ratio at various noise levels.
[0157] The traditional method uses FFT, which can quickly calculate the spectrum of the signal, but the nonlinear features in the EEG signal are not fully extracted, resulting in the loss of key information in the extracted frequency domain features. This application divides the signal into different frequency bands through multi-scale decomposition technology, extracts the detailed features in each frequency band, and further uses the differential entropy algorithm to capture the nonlinear characteristics of the signal, which significantly improves the integrity of feature extraction. This method can not only retain key signal information, but also reduce feature reconstruction errors, especially in medium and high noise environments.
[0158] The traditional SVM model is a static model and lacks adaptability when facing different task classifications. In contrast, the CNN used in this application extracts features layer by layer through multi-layer convolution and pooling operations, and combines incremental learning algorithms to enable the model to automatically adjust parameters when processing new data and enhance classification accuracy. When classifying emotional states and cognitive tasks, the classification accuracy of this application is always better than that of traditional methods, especially in the case of high noise levels, the classification accuracy of traditional methods drops significantly, and this application ensures the continuous adaptability of the model to new data through dynamic parameter adjustment.
[0159] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. 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 frequency domain feature extraction optimization method for EEG signals, characterized in that: include: Acquire a time domain signal, wherein the time domain signal is an original signal including time domain EEG data and interference obtained by collecting EEG signals through an electrode device and recording potential changes at at least one cortical position; Adopting an adaptive noise filtering algorithm to remove noise from the collected time domain signal to obtain a processed time domain signal; Performing spectrum analysis on the processed time domain signal through a frequency domain conversion algorithm to generate a frequency domain signal; Dividing the frequency domain signal into frequency bands according to different frequency ranges to obtain decomposed signals of multiple frequency bands; Extracting frequency domain features from the decomposed signal, and aggregating the extracted frequency domain features to generate an initial feature set; Applying dimensionality reduction technology to reduce the dimensionality of the initial feature set to obtain an optimized feature set; The optimized feature set is classified using a machine learning model suitable for classification tasks to obtain a classified feature set, wherein the classified feature set is used for sentiment analysis, and different categories correspond to different sentiments.
2. The method for extracting and optimizing frequency domain features of EEG signals according to claim 1, characterized in that: Adopting an adaptive noise filtering algorithm to remove noise from the collected time domain signal to obtain a processed time domain signal, including: Segmenting the time domain signal according to the time window length L1 to obtain segmented time domain signals; When eye movement artifacts were extracted from the segmented time domain signal, a band-stop filter was applied to remove the 0.1-3 Hz noise; When the electromyographic noise is extracted from the segmented time domain signal, a high-pass filter is applied to remove the noise above 20 Hz; The band-stop filter and the high-pass filter are used to process each time domain signal simultaneously and in parallel, and finally the processed time domain signal is output.
3. The method for extracting and optimizing frequency domain features of EEG signals as claimed in claim 2, characterized in that: The processed time domain signal is subjected to spectrum analysis by a frequency domain conversion algorithm to generate a frequency domain signal, including: The noise-processed time domain signal is segmented according to the window length L2, and an overlap of M% is set between each segment of the signal; Applying a Kaiser window function to each signal segment, and using a fast Fourier transform to convert the time domain signal into an initial frequency domain signal, extracting the frequency component, amplitude and phase information in the initial frequency domain signal, and obtaining a spectrum result; The frequency spectrum results of the initial frequency domain signals of adjacent segments are weighted, and the frequency spectrum results of each segment of the signal are accumulated to generate the frequency domain signal.
4. The method for extracting and optimizing frequency domain features of EEG signals as claimed in claim 3, characterized in that: The frequency domain signal is divided into frequency bands according to different frequency ranges to obtain decomposed signals of multiple frequency bands, including: Extract frequency energy characteristics through power spectrum density analysis, calculate the power spectrum density value of each frequency point, and form the spectrum energy distribution of each frequency band, wherein the divided frequency bands include one or more of Delta, Theta, Alpha, Beta and Gamma frequency bands; Multi-resolution analysis technology is applied to decompose the frequency components in each frequency band, extract frequency detail information of different scales, perform weighted smoothing processing on the spectral energy distribution of the frequency domain signal in each frequency band, and generate the decomposed signal of each frequency band containing multi-resolution analysis and power spectral density characteristics.
5. The method for optimizing frequency domain feature extraction of EEG signals as claimed in claim 4, characterized in that: Extracting frequency domain features from the decomposed signal, and aggregating the extracted frequency domain features to generate an initial feature set, including: In each frequency band, the amplitude and phase of each frequency point are calculated to form a spectrum distribution; According to the spectrum distribution, differential entropy is calculated for the spectrum information of each frequency point, wherein the differential entropy is calculated point by point through the probability density function of each frequency point to extract nonlinear features reflecting the complexity of the signal; The differential entropies of all frequency points in each frequency band are arranged in index order to form a differential entropy feature matrix for each frequency band; The differential entropy feature matrices of each frequency band are merged one by one to generate the initial feature set in the frequency domain.
6. The method for optimizing frequency domain feature extraction of EEG signals as claimed in claim 5, characterized in that: Applying dimensionality reduction technology to reduce the dimension of the initial feature set to obtain an optimized feature set, including: Perform principal component analysis on the initial feature set, calculate the variance value of each feature, preset a first threshold value T1, retain features with variance values exceeding T1, calculate feature contribution of features screened out by principal component analysis, preset a second threshold value T2, assign weight values to features with contributions exceeding T2, perform cross-correlation analysis on the feature set after feature weight assignment, preset a third threshold value T3, eliminate redundant features with correlations exceeding T3, and obtain an optimized feature set.
7. The method for optimizing frequency domain feature extraction of EEG signals as claimed in claim 6, characterized in that: The optimized feature set is classified using a machine learning model suitable for the classification task to obtain a classified feature set, including: Inputting the optimized feature set into a convolutional neural network model, wherein the convolutional neural network model is composed of a convolutional layer, a pooling layer, and a fully connected layer; When the input feature set passes through the convolution layer of each layer, the convolution operation extracts local features, and the pooling layer reduces the dimension of the feature map output by the convolution to retain the main features and reduce the amount of calculation; In the forward propagation process, the data in the feature set passes through each layer of the network in turn to generate classification prediction results; During the back propagation process, the loss function between the predicted value and the actual value is calculated, and the network weights are adjusted through the gradient descent algorithm; Adopting an incremental learning algorithm, for each new EEG signal data input, the convolutional neural network model locally adjusts the weight parameters according to the new input data; After completing forward propagation and back propagation, the convolutional neural network model generates a classification result of the EEG signal according to the activation value of the final output layer, wherein the classification result includes emotion state recognition, cognitive state assessment and attention level monitoring.
8. A system using the frequency domain feature extraction optimization method of EEG signals according to any one of claims 1 to 7, characterized in that: include: A signal acquisition module, used to acquire a time domain signal, wherein the time domain signal is an original signal including time domain EEG data and interference obtained by collecting EEG signals through an electrode device and recording the potential change of at least one cortical position; A noise filtering module, used to use an adaptive noise filtering algorithm to remove noise from the collected time domain signal to obtain a processed time domain signal; A frequency domain conversion module, used to perform spectrum analysis on the processed time domain signal through a frequency domain conversion algorithm to generate a frequency domain signal; A frequency band division module, used to divide the frequency domain signal into frequency bands according to different frequency ranges to obtain decomposed signals of multiple frequency bands; A feature extraction module, used to extract frequency domain features from the decomposed signal, and aggregate the extracted frequency domain features to generate an initial feature set; A feature dimension reduction module, used to apply a dimension reduction technique to reduce the dimension of the initial feature set to obtain an optimized feature set; The classification optimization module is used to classify the optimized feature set using a machine learning model suitable for the classification task to obtain a classified feature set, wherein the classified feature set is used for sentiment analysis, and different categories correspond to different sentiments.
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 for optimizing frequency domain feature extraction of electroencephalogram signals according to any one of claims 1 to 7 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 for optimizing frequency domain feature extraction of EEG signals according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Intelligent noise reduction method, system and equipment for electroencephalogram signals and medium
CN117860273A
Personality analysis method and device based on multi-feature electroencephalogram signals and medium
CN118557196A
Electroencephalogram emotion recognition method and system based on multiple tasks and attention mechanism
CN118576206A
Method and apparatus for determining the cerebral state of a patient with fast response
US20030055355A1
Epilepsy brain wave state detection method based on machine learning
WO2020061971A1
Cited By
Anesthesia depth monitoring system based on electroencephalogram signals
CN120021948A
Multi-dimensional eye movement feature extraction method, device and equipment
CN120093234A
Multi-model fusion processing and automatic switching method and system
CN120448763A
Magnetoencephalogram quality evaluation method based on multi-band characteristics
CN120616542A
Pulse signal adaptive filtering method and system based on multi-band signal entropy
CN120768440A