A method and system for extracting frequency domain features of electroencephalogram signals
By using adaptive noise filtering and frequency domain feature extraction optimization methods, combined with dimensionality reduction and convolutional neural networks, the problems of noise removal and feature extraction in EEG signal processing are solved, achieving efficient and accurate signal classification.
Patent Information
- Application Number
- CN202411929419.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2044-12-25
AI Technical Summary
Existing EEG signal processing methods struggle to balance noise removal and signal integrity. Traditional frequency domain feature extraction methods are unable to capture complex signal features, and classification models cannot be dynamically adjusted, resulting in poor processing efficiency and hindering practical applications.
An adaptive noise filtering algorithm is used to remove noise, frequency domain features are extracted through frequency domain transformation and frequency band division, and classification is performed by combining dimensionality reduction technology and convolutional neural network, and the model parameters are dynamically adjusted.
It effectively removes noise from EEG signals, retains key feature information, improves feature expression ability and classification accuracy, and achieves real-time signal processing and efficient classification.
Smart Images

Figure CN119745397B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of biomedical signal processing, in particular to an electroencephalogram (EEG) frequency domain feature extraction optimization method, an EEG frequency domain feature extraction optimization method system, a computer device and a computer readable storage medium. BACKGROUND
[0002] EEG (electroencephalogram) is a signal recording the electrical activity of cortical neurons, and is widely used in neuroscience research, clinical diagnosis and BCI (brain-computer interface) systems. However, the complexity of EEG signals and their susceptibility to external interference make accurate signal processing and feature extraction a key problem. In traditional EEG signal processing, noise interference, incomplete feature extraction and insufficient adaptability of classification models are more prominent.
[0003] At present, common EEG signal preprocessing methods mostly rely on simple filters to remove noise, such as removing electromyographic artifacts and eye movement artifacts. However, these methods often have difficulty in balancing noise removal and signal integrity, which may result in the loss of some valid signals. In terms of feature extraction, frequency domain feature extraction mostly obtains the frequency component information of the signal through techniques such as FFT (fast Fourier transform), however, traditional methods such as FFT have deficiencies in processing nonlinear signals, and are difficult to fully capture the characteristics of complex signals. In addition, existing classification models are usually static models, which cannot dynamically adjust parameters according to new input data, affecting the processing efficiency in real-time applications.
[0004] Therefore, the current EEG signal processing efficiency is poor, which affects the practical application of EEG signals. SUMMARY
[0005] In view of the above problems, the present application is proposed.
[0006] Therefore, the technical problem solved by the present application is that the current EEG signal processing efficiency is poor, which affects the practical application of EEG signals.
[0007] To solve the above technical problems, the present application provides the following technical solutions: an EEG frequency domain feature extraction optimization method, comprising:
[0008] acquiring 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 to record the potential change of at least one cortical position;
[0009] using an adaptive noise filtering algorithm to remove noise from the collected time domain signal to obtain a processed time domain signal;
[0010] The processed time domain signal is subjected to frequency spectrum analysis through a frequency domain conversion algorithm to generate a frequency domain signal;
[0011] The frequency domain signal is divided into frequency bands according to different frequency ranges to obtain a plurality of decomposed signals of the frequency bands;
[0012] Frequency domain features are extracted from the decomposed signals, and the extracted frequency domain features are summarized to generate an initial feature set;
[0013] A dimension reduction technique is applied to the initial feature set for dimension reduction processing to obtain an optimized feature set;
[0014] A machine learning model suitable for a classification task is used 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.
[0015] As a preferred scheme of the method for extracting and optimizing frequency domain features of electroencephalogram signals, an adaptive noise filtering algorithm is used to remove noise from the collected time domain signal to obtain a processed time domain signal, including: the time domain signal is segmented according to a time window length L1 to obtain a segmented time domain signal; when eye movement artifacts are extracted in the segmented time domain signal, a band-stop filter is applied to remove noise of 0.1-3Hz; when electromyographic noise is extracted in the segmented time domain signal, a low-pass filter is applied to remove noise above 20Hz; the band-stop filter and the low-pass filter are simultaneously and in parallel processed for each segment of the time domain signal, and finally the processed time domain signal is output.
[0016] As a preferred scheme of the method for extracting and optimizing frequency domain features of electroencephalogram signals, the processed time domain signal is subjected to frequency spectrum analysis through a frequency domain conversion algorithm to generate a frequency domain signal, including: the time domain signal subjected to noise processing is segmented according to a window length L2, and an overlap of M% is set between each segment of the signal; a Kaiser window function is applied to each segment of the signal, and a fast Fourier transform is used to convert the time domain signal into an initial frequency domain signal, extract frequency components, amplitudes and phase information in the initial frequency domain signal, and obtain a frequency spectrum result; the frequency spectrum results of adjacent segments of the initial frequency domain signal are subjected to weighted processing, the frequency spectrum results of each segment of the signal are accumulated, and the frequency domain signal is generated.
[0017] As a preferred scheme of the brain electrical signal frequency domain feature extraction optimization method, wherein the frequency domain signal is divided into frequency bands according to different frequency ranges, and a plurality of frequency band decomposition signals are obtained, including: extracting frequency energy features by power spectral density analysis, calculating the power spectral density value of each frequency point, forming the frequency 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, decomposing the frequency components in each frequency band, extracting frequency detail information of different scales, performing frequency spectrum energy distribution weighted smoothing processing on the frequency domain signal of each frequency band, and generating the decomposition signal of each frequency band containing multi-resolution analysis and power spectral density features.
[0018] As a preferred scheme of the brain electrical signal frequency domain feature extraction optimization method, wherein the frequency domain features are extracted from the decomposition signal, and the extracted frequency domain features are summarized to generate an initial feature set, including: calculating the amplitude and phase of each frequency point in each frequency band to form a frequency spectrum distribution; calculating the differential entropy of the frequency spectrum information of each frequency point according to the frequency 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 entropy of all frequency points in each frequency band in index order to form a differential entropy feature matrix of each frequency band; merging the differential entropy feature matrices of each frequency band one by one to generate the initial feature set of the frequency domain.
[0019] As a preferred scheme of the brain electrical signal frequency domain feature extraction optimization method, wherein the initial feature set is processed by dimension reduction to obtain an optimized feature set, including: performing principal component analysis on the initial feature set, calculating the variance value of each feature, pre-setting a first threshold T1, retaining features with variance values exceeding T1, calculating the feature contribution of the features selected by principal component analysis, pre-setting a second threshold T2, assigning weight values to features with contribution exceeding T2, performing cross-correlation analysis on the feature set after feature weight assignment, pre-setting a third threshold T3, and removing redundant features with correlation exceeding T3 to obtain the optimized feature set.
[0020] As a preferred scheme of the brain electrical signal frequency domain feature extraction optimization method, the optimized feature set is classified using a machine learning model suitable for a 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 convolutional layer of each layer, the convolutional operation extracts local features, and the pooling layer reduces the dimension of the feature map output by convolution to retain main features and reduce the amount of calculation; in the forward propagation process, the data in the feature set passes through each layer network in turn to generate a classification prediction result; in the backward propagation process, a loss function between a predicted value and an actual value is calculated, and the network weight is adjusted through a gradient descent algorithm; an incremental learning algorithm is used, and for each input of new brain electrical signal data, the convolutional neural network model adjusts the weight parameters according to the new input data; after the forward propagation and the backward propagation are completed, the convolutional neural network model generates a classification result of the brain electrical signal according to the activation value of the final output layer, wherein the classification result includes emotion state recognition, cognitive state evaluation and attention level monitoring.
[0021] Another object of the present application is to provide a brain electrical signal frequency domain feature extraction optimization system, comprising: a signal acquisition module for acquiring a time domain signal, wherein the time domain signal is a raw signal containing time domain brain electrical data and interference obtained by recording the potential change of at least one cortical position through an electrode device to collect brain electrical signals; a noise filtering module for removing noise from the collected time domain signal through an adaptive noise filtering algorithm to obtain a processed time domain signal; a frequency domain conversion module for performing frequency 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 for dividing the frequency domain signal into frequency bands according to different frequency ranges to obtain a plurality of decomposed signals; a feature extraction module for extracting frequency domain features from the decomposed signals, and generating an initial feature set by summarizing the extracted frequency domain features; a feature dimension reduction module for performing dimension reduction processing on the initial feature set through a dimension reduction technique to obtain an optimized feature set; and a classification optimization module for classifying the optimized feature set using a machine learning model suitable for a classification task to obtain a classified feature set, wherein the classified feature set is used for emotion analysis, and different categories correspond to different emotions.
[0022] A computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the brain electrical signal frequency domain feature extraction optimization method as described above when executing the computer program.
[0023] A computer readable storage medium, having stored thereon a computer program, the computer program being executed by a processor to implement the steps of the method for optimizing frequency domain feature extraction of electroencephalogram signals as described above.
[0024] The method for optimizing frequency domain feature extraction of electroencephalogram signals provided by the present application effectively removes low-frequency artifacts and high-frequency noise in the electroencephalogram signals through adaptive noise filtering technology, ensuring the integrity of the signals. By refining the electroencephalogram signals in different frequency bands, the key feature information of each frequency band is retained, avoiding the loss of complex signal components in conventional feature extraction. At the same time, the nonlinear features of the signals are deeply extracted, improving the expression ability of the features. Combined with dimension reduction technology, redundant features are further eliminated, generating an optimized feature set. Finally, a machine learning model of a classification task is used to classify the optimized feature set, realizing real-time classification of new electroencephalogram signal data. The scheme of the present application greatly improves the efficiency of electroencephalogram signal processing, ensures that the processed electroencephalogram signals have high accuracy, and the processed electroencephalogram signals can be directly used for subsequent applications. BRIEF DESCRIPTION OF DRAWINGS
[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0026] Figure 1 The overall flowchart of the method for optimizing frequency domain feature extraction of electroencephalogram signals provided by an embodiment of the present application. DETAILED DESCRIPTION
[0027] It should be noted that the embodiments and features in the present application can be combined with each other without conflict. The present application will be described in detail below with reference to the drawings and in combination with the embodiments.
[0028] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.
[0029] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, it will be apparent to one skilled in the art that the present application can be practiced without the specific details set forth in this description. In other instances, well-known methods, procedures, components, and circuits have not been described in detail so as not to unnecessarily obscure aspects of the present application.
[0030] Embodiment 1
[0031] Referring to Figure 1 For an embodiment of the present application, an EEG frequency domain feature extraction optimization method is provided, comprising:
[0032] Obtaining a time domain signal, wherein the time domain signal is an original signal containing time domain EEG data and interference, which is obtained by recording potential changes at at least one cortical position through an electrode device;
[0033] Specifically, the EEG signal is collected by an electrode device, and the potential changes at at least one position are recorded to obtain an original signal containing time domain EEG data and interference, and the original signal is a time domain signal;
[0034] The collected time domain signal is subjected to noise processing, and an adaptive noise filtering algorithm is used to obtain a processed time domain signal;
[0035] The processed time domain signal is subjected to frequency spectrum analysis through a frequency domain conversion algorithm to generate a complete frequency domain signal;
[0036] The frequency domain signal is divided into frequency bands according to different frequency ranges to generate decomposition signals of each frequency band;
[0037] Frequency domain features are extracted from the decomposition signals, and the extracted feature information is summarized to generate an initial feature set;
[0038] Dimension reduction technology is applied 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 a classification task, and the machine learning model dynamically adjusts classification parameters through an incremental learning algorithm.
[0040] The low-frequency artifacts and high-frequency noise in the electroencephalogram signal are effectively removed by the adaptive noise filtering technology, ensuring the integrity of the signal. By refining the electroencephalogram signal in different frequency bands, the key feature information of each frequency band is retained, avoiding the loss of complex signal components in conventional feature extraction. At the same time, the nonlinear features of the signal are deeply extracted, improving the expression ability of the features. Combined with dimension reduction technology, redundant features are further eliminated, generating an optimized feature set. Finally, a convolutional neural network model is used to classify the optimized feature set, realizing real-time processing and classification of new electroencephalogram signal data, greatly improving the adaptability and accuracy of the classification model. The present application has significant advantages in tasks such as emotional state recognition, cognitive state analysis, and attention level monitoring of electroencephalogram signals, effectively solving the imperfect processing problem in the prior art. The present application greatly improves the efficiency of electroencephalogram signal processing, ensures that the processed electroencephalogram signal has high accuracy, and 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 by time window length L1 to obtain a segmented time domain signal; when eye movement artifacts are extracted in the segmented time domain signal, a band-stop filter is applied to remove noise at 0.1-3 Hz; when electromyographic noise is extracted in the segmented time domain signal, a low-pass filter is applied to remove noise above 20 Hz; the band-stop filter and the low-pass filter are used to simultaneously and in parallel process each segment of the time domain signal, and finally output the processed time domain signal.
[0042] Specifically, obtaining the processed time domain signal includes segmenting the collected time domain signal by time window length L1;
[0043] Low-frequency eye movement artifacts are detected by extreme value change, and high-frequency electromyographic noise is detected by change rate;
[0044] When eye movement artifacts are detected, a band-stop filter is applied to dynamically adjust the center frequency and bandwidth to remove low-frequency noise at 0.1-3 Hz;
[0045] When electromyographic noise is detected, a low-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 low-pass filter are used to simultaneously and in parallel process each segment of the signal, and finally output the processed time domain signal.
[0047] The processed time domain signal is subjected to a frequency domain conversion algorithm for spectral analysis to generate a frequency domain signal, including: segmenting the noise-processed time domain signal according to a window length L2, with an overlap of M% between each segment; applying a Kaiser window function to each segment of the signal, and using fast Fourier transform to convert the time domain signal into an initial frequency domain signal, extract the frequency component, amplitude and phase information in the initial frequency domain signal to obtain a spectral result; performing weighted processing on the spectral results of the adjacent segments of the initial frequency domain signal, and accumulating the spectral results of each segment of the signal to generate the frequency domain signal.
[0048] Specifically, the frequency domain conversion algorithm includes segmenting the noise-processed time domain signal according to a window length L2, with an overlap of M% between each segment;
[0049] A Kaiser window function is applied to each segment of the signal, and the parameter β of the Kaiser window is dynamically set according to the energy distribution characteristics and the frequency variation rate of the signal. For a signal with a wide energy distribution, a higher β value is set, and for a signal with energy concentrated in a narrow frequency band, a lower β value is set. After applying the window function to each segment, fast Fourier transform is used to convert the time domain signal into a frequency domain signal, and the frequency component and its corresponding amplitude and phase information in the signal are extracted;
[0050] The spectral results of adjacent segments of the signal are subjected to weighted processing to smooth the transition between segments;
[0051] The spectral results of each segment of the signal are accumulated to generate a complete frequency domain signal.
[0052] L1 is used for noise detection and processing, and the setting of the segment length is based on the characteristics of low-frequency eye movement artifacts and high-frequency muscle noise in the electroencephalogram signal. The low-frequency artifacts in the electroencephalogram signal are usually in the range of 0.1-3 Hz, in order to capture the periodic changes of these low-frequency noise, L1 is preferably 1 second. This segment length can capture sufficient signal changes without losing low-frequency information, especially for 0.5 Hz noise, it can cover half a period. At the same time, the segment length of 1 second also has sufficient response speed for the detection of high-frequency noise above 20 Hz. 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 electroencephalogram signal and the balance between the time and frequency resolution of the frequency domain conversion. In the process of fast Fourier transform (FFT), the setting of L2 directly affects the accuracy of the spectral analysis. Preferably, L2 is set to 200 milliseconds. This segment length can provide sufficient frequency resolution for spectral 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 overlap processing between segmented signals, and the overlap ratio is preferably 50%. Setting an overlap of 50% can achieve smooth transition of the spectrum between each segment of the signal, reduce the boundary effect between segments, and avoid spectrum jump. In addition, an overlap ratio of 50% can ensure that each segment of the signal can capture sufficient frequency components, and actual signal processing verification shows that this overlap ratio can achieve the best spectral smoothing effect without increasing the computational complexity. Therefore, an overlap ratio of M%=50% can ensure the smoothness and accuracy of the signal in the frequency domain conversion, and is a technically preferred overlap setting.
[0055] At the same time, in order to reduce the boundary effect, L2 is processed in cooperation with an overlap ratio of M%=50% to ensure smooth transition of the signal between segments and avoid signal spectrum jump. Therefore, the setting of L2=200 milliseconds is based on the technical requirements of the frequency domain conversion, and can find the optimal balance between the time resolution and the frequency resolution of the signal.
[0056] The above frequency domain signal is divided into frequency bands according to different frequency ranges to obtain a plurality of decomposed signals of the frequency bands, including: extracting frequency energy features by power spectral density analysis, calculating power spectral density values of each frequency point, and forming spectral energy distributions of the frequency bands, wherein the divided frequency bands include one or more of Delta, Theta, Alpha, Beta, and Gamma bands; applying a multi-resolution analysis technique to decompose frequency components in each frequency band and extract frequency detail information of different scales, and performing spectral energy distribution weighted smoothing processing on the above frequency domain signal of each frequency band to generate the above decomposed signal of each frequency band containing multi-resolution analysis and power spectral density features.
[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 frequency energy features by power spectral density analysis, calculating power spectral density values of each frequency point, and forming spectral energy distributions of the frequency bands.
[0059] The frequency components in each frequency band are decomposed by using multi-resolution analysis technique to extract frequency details in different scales.
[0060] The decomposed signals in each frequency band are weighted and smoothed to process the spectral difference between adjacent frequency bands.
[0061] The decomposed signals in each frequency band are weighted and smoothed to process the spectral difference between adjacent frequency bands.
[0062] The power spectral density is represented as,
[0063] ,
[0064] where, is the power spectral density of frequency point , is the complex amplitude of frequency point , is the total number of frequency points for normalization.
[0065] The multi-resolution analysis is represented as,
[0066] ,
[0067] where, is the multi-resolution signal component at level , is the power spectral density value at frequency point from the previous step of power spectral density analysis as input, is the wavelet basis function using different scales to analyze the local characteristics of the signal, is the time interval representing the time step of the signal.
[0068] The weighted spectral smoothing is represented as,
[0069] ,
[0070] ,
[0071] where, is the smoothed signal after weighting, combining the decomposed signals in different scales, is the weight value representing the weight distribution of the signal in different scales, is the signal component at level from the previous step of multi-resolution analysis, is the energy of the th frequency band, is the total energy sum of all frequency bands. The total number of frequency bands. Indicates the first The center frequency of each frequency band This indicates the target center frequency, which is set according to application requirements and is usually the main frequency band of interest. This is an adjustment parameter representing the frequency offset, used to control the weight attenuation rate of frequency bands that are far from the target frequency.
[0072] The generated frequency band decomposed signals, including multi-resolution analysis and power spectral density characteristics, are represented as follows:
[0073] ,
[0074] in, This represents the final decomposed signal, which includes the combined result of all frequency bands. Indicates the first Weighted smoothed signals for each frequency band.
[0075] Frequency domain features are extracted from the decomposed signal described above. The extracted frequency domain features are then summarized to generate an initial feature set, including: calculating the amplitude and phase of each frequency point within each frequency band to form a spectral distribution; calculating the differential entropy of the spectral information at each frequency point based on the spectral distribution, wherein the differential entropy is calculated point-by-point using the probability density function of each frequency point to extract nonlinear features reflecting the complexity of the signal; arranging the differential entropy of all frequency points within each frequency band in index order to form a differential entropy feature matrix for each frequency band; and merging the differential entropy feature matrices of each frequency band one by one to generate the initial feature set in the frequency domain.
[0076] Specifically, extracting frequency domain features includes calculating the amplitude and phase at each frequency point within each frequency band to form a spectral distribution;
[0077] The differential entropy is calculated for the spectral information at each frequency point. The differential entropy is calculated point by point through the probability density function at each frequency point to extract the nonlinear features that reflect the complexity of the signal.
[0078] Arrange the differential entropy values of all frequency points within each frequency band in index order to form the differential entropy feature matrix of that frequency band;
[0079] The differential entropy feature matrices of each frequency band are merged one by one to generate an initial feature set in the frequency domain.
[0080] The calculation of amplitude and phase is expressed as follows:
[0081] ,
[0082] in, Indicates the first The spectral signal of each frequency band at frequency At, represents the amplitude of the first frequency band at the frequency represents the amplitude of the first frequency band at the frequency represents the amplitude of the first frequency band at the frequency represents the phase of the first frequency band at the frequency represents the phase of the first frequency band at the frequency represents the phase of the first frequency band at the frequency
[0083] The differential entropy is represented as
[0084] ,
[0085] wherein, represents the differential entropy of the first frequency band at the frequency represents the differential entropy of the first frequency band at the frequency represents the differential entropy of the first frequency band at the frequency represents the probability density function of the amplitude of the first frequency band at the frequency represents the probability density function of the amplitude of the first frequency band at the frequency represents the probability density function of the amplitude of the first frequency band at the frequency
[0086] The differential entropy feature matrix is represented as
[0087] ,
[0088] wherein, represents the differential entropy feature matrix of the first frequency band, containing the differential entropy values of all frequency points of the frequency band. The initial feature set in the frequency domain is represented as
[0089]
[0090] , wherein,
[0091] represents the initial feature set after merging all frequency bands, containing the differential entropy features of each frequency band. The dimension reduction technique is applied to the initial feature set to obtain an optimized feature set, including: 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, calculating the feature contribution of the features selected by the principal component analysis, presetting a second threshold T2, assigning weight values to features with contribution exceeding T2, performing cross-correlation analysis on the feature set after the feature weight assignment, presetting a third threshold T3, and removing redundant features with correlation exceeding T3 to obtain the optimized feature set.
[0092] Specifically, the application of the dimension reduction technique 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 dimension of the initial feature set by PCA to retain high-variance features.
[0093] Specifically, the application of the dimension reduction technique 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 dimension of the initial feature set by PCA to retain high-variance features.
[0094] The feature contribution degree of the features screened by principal component analysis is calculated, a second threshold T2 is preset, and the features with a contribution degree exceeding T2 are assigned a weight value. The assignment of the weight is based on the influence of the features on the classification of the signals, and the feature contribution and the weight adjustment are ensured to be performed synchronously.
[0095] The feature set after the assignment of the feature weights is subjected to cross-correlation analysis, a third threshold T3 is preset, and redundant features with a correlation exceeding T3 are removed. This process optimizes the final feature set by reducing the influence of highly correlated or redundant features.
[0096] The principal component analysis includes that the covariance matrix is represented as:
[0097] ,
[0098] wherein C represents a feature covariance matrix, represents the linear correlation between the features, represents the total number of electroencephalogram signals, represents the transpose matrix of the initial feature set, represents the number of features, and represents the number of frequency domain features extracted from each sample.
[0099] The PCA step performs eigenvalue decomposition on the covariance matrix to obtain eigenvalues and corresponding eigenvectors , which are represented as:
[0100] ,
[0101] wherein represents the eigenvector, represents the direction of the th principal component, represents the eigenvalue, and represents the variance of the th principal component.
[0102] The selection of the feature variance is represented as:
[0103] ,
[0104] wherein represents logical derivation.
[0105] The feature matrix after dimension reduction is represented as:
[0106] ,
[0107] wherein represents the feature matrix after dimension reduction, represents the optimized feature matrix obtained by PCA, represents a matrix containing the first feature vectors, and retains The eigenvector corresponding to the largest eigenvalue.
[0108] The feature contribution degree calculation is expressed as,
[0109] ,
[0110] wherein, represents the contribution degree of the feature to the classification result, Sclass represents the influence of the feature on the classification result, represents the eigenvalue of the feature .
[0111] The weight distribution is expressed as,
[0112] ,
[0113] wherein, represents the weight of the feature , represents the contribution degree of the feature , represents the sum of the contribution degrees of all the retained features, ensuring weight normalization.
[0114] The feature screening is expressed as,
[0115] .
[0116] The cross-correlation analysis is expressed as,
[0117] ,
[0118] wherein, represents the correlation coefficient between the features and , used to measure the linear correlation between two features, represents the covariance between the features and , represents the variance of the feature , represents the variance of the feature .
[0119] The redundant feature elimination is expressed as,
[0120] .
[0121] The optimized feature set is classified using a machine learning model suitable for a 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 convolutional layers, pooling layers and fully connected layers; when the input feature set passes through each convolutional layer, the convolutional operation extracts local features, and the pooling layer reduces the dimension of the feature map output by convolution to retain main features and reduce computational complexity; 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, a loss function between the predicted value and the actual value is calculated, and the network weight is adjusted through the gradient descent algorithm; an incremental learning algorithm is used, and for each input of new electroencephalogram data, the convolutional neural network model locally adjusts the weight parameters according to the new input data; after completing the forward propagation and the 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 emotion state recognition, cognitive state evaluation and attention level monitoring.
[0122] Specifically, classifying the optimized feature set includes inputting the optimized feature set into a convolutional neural network model, and the convolutional neural network model is composed of multiple convolutional layers, pooling layers and fully connected layers.
[0123] When the input feature set passes through each convolutional layer, the convolutional operation extracts local features, and the pooling layer reduces the dimension of the feature map output by convolution to retain main features and reduce computational complexity.
[0124] 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. The convolutional layer extracts patterns in the input features through a weight filter, and the pooling layer selects features according to the maximum value or average value in the feature map, compresses the dimension of the input features layer by layer, and enhances the expression of the features.
[0125] In the backward propagation process, a loss function between the predicted value and the actual value is calculated, and the network weight is adjusted through the gradient descent algorithm. The error propagates from the output layer to each hidden layer, and the convolution kernel weight of each layer is updated based on the error gradient to adjust the model parameters to improve the classification accuracy.
[0126] An incremental learning algorithm is used, and for each input of new electroencephalogram data, the convolutional neural network model locally adjusts the weight parameters according to the new data. Through incremental updating, the convolutional neural network model can effectively adapt to the new input signal without completely retraining the model.
[0127] After completing the forward propagation and the 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, and the classification result includes emotion state recognition, cognitive state evaluation and attention level monitoring.
[0128] Embodiment 2
[0129] For an embodiment of the present application, a frequency domain feature extraction optimization system of electroencephalogram is provided, comprising:
[0130] a signal acquisition module, a noise filtering module, a frequency domain conversion module, a frequency band division module, a feature extraction module, a feature dimension reduction module, and a classification optimization module;
[0131] The signal acquisition module is configured to acquire a time domain signal, wherein the time domain signal is obtained by collecting electroencephalogram through an electrode device, recording potential changes of at least one cortical position, and obtaining original signals containing time domain electroencephalogram data and interference.
[0132] The noise filtering module is configured to remove noise from the collected time domain signal by using an adaptive noise filtering algorithm to obtain a processed time domain signal.
[0133] The frequency domain conversion module is configured to perform frequency spectrum analysis on the processed time domain signal by using a frequency domain conversion algorithm to generate a frequency domain signal.
[0134] The frequency band division module is configured to divide the frequency domain signal into frequency bands according to different frequency ranges to obtain a plurality of decomposed signals.
[0135] The feature extraction module is configured to extract frequency domain features from the decomposed signals, and to generate an initial feature set by summarizing the extracted frequency domain features.
[0136] The feature dimension reduction module is configured to apply a dimension reduction technique to the initial feature set to obtain an optimized feature set.
[0137] The classification optimization module is configured to use a machine learning model suitable for a classification task 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.
[0138] Embodiment 3
[0139] An embodiment of the present application is different from the first two embodiments in that:
[0140] If the above functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or parts of the present application that make contributions to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods according to the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0141] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a list of executable instructions for implementing logic functions, which can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus or device, such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, apparatus or device and execute the instructions, or in conjunction with such instruction execution system, apparatus or device. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transport a program for use by or in connection with an instruction execution system, apparatus or device or in conjunction with such instruction execution system, apparatus or device.
[0142] More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection having one or more wires (electrical devices), a portable computer diskette (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CD ROM). In addition, the computer-readable medium can even be paper or other suitable medium on which the aforementioned program can be printed, because the aforementioned program can be electronically obtained, for example, by optical scanning of the paper or other medium, followed by editing, interpreting or otherwise processing, if necessary, in other suitable ways, to be stored in the computer memory.
[0143] It should be understood that portions of the application can be implemented in hardware, software, firmware, or combinations thereof. In the embodiments described above, the various steps or methods can be implemented, in part, or in whole, by software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, and in another embodiment, any of the following techniques, which are well known in the art, can be used to implement the application: a hybrid of the techniques mentioned above; a combination of one or more of the techniques mentioned above; a combination of one or more of the techniques mentioned above with other logic gates or other circuit elements; or a combination of one or more of the techniques mentioned above with one or more other logic circuits and / or other circuit elements. Examples of such circuit elements include logic gates, flip-flops, registers, arithmetic logic, and the like.
[0144] Example 4
[0145] For an embodiment of the present application, an EEG signal frequency domain feature extraction optimization method is provided. In order to verify the beneficial effects of the present application, a simulation experiment is carried out for scientific demonstration.
[0146] A public EEG signal dataset is used, containing EEG data under emotional state and cognitive task, and the data is derived from 50 subjects, each of whom collected 500 sets of EEG signals under different task conditions.
[0147] The EEG signals in the dataset are collected by 32 electrodes, with a sampling frequency of 500 Hz and a time window of 2 seconds.
[0148] The experiment is carried out in a simulated real environment, with common interference factors added, including: electromyographic noise (40-100 Hz) from head muscle activity. Eye movement artifacts (0.1-3 Hz) are generated by blinking or moving the line of sight. Power noise (50 Hz) is electromagnetic interference introduced by the device. To ensure the noise interference effect in a real environment, the above noise is superimposed on the EEG signal for processing.
[0149] The traditional method uses a band-stop filter to remove 50 Hz power noise, and a low-pass filter to remove electromyographic 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).
[0150] 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 algorithm are used to extract features, and a convolutional neural network (CNN) is used as the classification model, which is dynamically adjusted by an incremental learning algorithm.
[0151] The eye movement artifacts and electromyographic noise added in the real electroencephalogram signal are respectively processed, the traditional method uses band-stop and low-pass filter, and the adaptive noise filtering is adopted in the application to automatically adjust the filter parameter to process the noise. The signal-to-noise ratio improvement effect of the two methods under different noise levels (low noise 10-20 dB, medium noise 5-10 dB, high noise 0-5 dB) is compared.
[0152] The frequency domain features of the traditional method are extracted by FFT, and the key nonlinear features of the signal in different frequency bands are extracted by the multi-scale decomposition combined with the differential entropy algorithm. For different emotional task signals, the error after feature reconstruction is compared to evaluate the integrity of the extracted features.
[0153] Through the SVM and CNN classification models, the extracted feature sets are classified respectively to evaluate the classification accuracy of the two methods. The test classification tasks include emotional state classification and cognitive task classification.
[0154] The experimental results are shown in Table 1.
[0155] Table 1 Comparison of experimental results
[0156]
[0157] 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 adaptively adjusted, resulting in more residual noise signals. The adaptive noise filtering algorithm of the application can dynamically adjust the filter parameters in real time according to the characteristics of the noise, effectively remove different types of noise, and retain more effective signals. This is a key technical improvement point for the significant improvement of signal-to-noise ratio under various noise levels.
[0158] The traditional method uses FFT, although it can quickly calculate the frequency spectrum of the signal, but it is not sufficient for the extraction of nonlinear features in the electroencephalogram signal, resulting in the extracted frequency domain features easily losing key information. The application uses multi-scale decomposition technology to divide the signal into different frequency bands, extracts the detailed features in each frequency band, and further uses the differential entropy algorithm to capture the nonlinear features of the signal, which significantly improves the integrity of the feature extraction. This method not only retains key signal information, but also reduces the feature reconstruction error, especially in medium and high noise environments.
[0159] The traditional SVM model is a static model, which lacks adaptability when facing different task classifications. In contrast, the CNN used in the present application extracts features layer by layer through multi-layer convolution and pooling operations, and combines with an incremental learning algorithm, so that the model can automatically adjust parameters when processing new data, thereby enhancing the classification accuracy. When classifying emotional states and cognitive tasks, the classification accuracy of the present application is always superior to that of the traditional method. In particular, in the case of high noise level, the classification accuracy of the traditional method decreases significantly, while the present application ensures the continuous adaptability of the model to new data through dynamic parameter adjustment.
[0160] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not limiting. Although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the present application, which should be covered in the scope of the claims of the present application.
Claims
1. A frequency domain feature extraction optimization method for electroencephalogram signals, characterized in that, The method comprises the following steps: acquiring a time domain signal, wherein the time domain signal is an original signal containing time domain electroencephalogram data and interference obtained by recording potential changes of at least one cortical position through an electrode device; performing noise removal processing on the acquired time domain signal by using an adaptive noise filtering algorithm to obtain a processed time domain signal; performing frequency spectrum analysis on the processed time domain signal by using a frequency domain conversion algorithm to generate a frequency domain signal; wherein the time domain signal after noise processing is segmented according to a window length L2, an overlap of M% is set between each segment of signal; a Kaiser window function is applied to each segment of signal, and a fast Fourier transform is used to convert the time domain signal into an initial frequency domain signal, frequency components, amplitude and phase information in the initial frequency domain signal are extracted, and a spectrum result is obtained; the spectrum results of adjacent segments of the initial frequency domain signal are weighted and processed, and the spectrum results of each segment of signal are accumulated to generate the frequency domain signal; dividing the frequency domain signal into frequency bands according to different frequency ranges to obtain decomposition signals of multiple frequency bands; wherein frequency energy characteristics are extracted by power spectrum density analysis, power spectrum density values of each frequency point are calculated, and spectrum energy distributions of each frequency band are formed, wherein the divided frequency bands include one or more of Delta, Theta, Alpha, Beta and Gamma bands; multi-resolution analysis technology is applied to decompose frequency components in each frequency band, extract frequency detail information of different scales, and perform spectrum energy distribution weighted smoothing processing on the frequency domain signal of each frequency band to generate the decomposition signal of each frequency band containing multi-resolution analysis and power spectrum density characteristics; extracting frequency domain features from the decomposition signal, and generating an initial feature set by summarizing the extracted frequency domain features; wherein amplitude and phase of each frequency point are calculated in each frequency band to form a spectrum distribution; differential entropy of the spectrum information of each frequency point is calculated according to the spectrum distribution, wherein the differential entropy is calculated point by point through the probability density function of each frequency point to extract nonlinear characteristics reflecting signal complexity; the differential entropy of all frequency points in each frequency band is arranged in index order to form a differential entropy feature matrix of each frequency band; the differential entropy feature matrices of each frequency band are combined one by one to generate the initial feature set of the frequency domain; performing dimension reduction processing on the initial feature set by using dimension reduction technology to obtain an optimized feature set; wherein principal component analysis is performed on the initial feature set, variance values of each feature are calculated, a first threshold T1 is preset, features with variance values exceeding T1 are retained, feature contribution degree calculation is performed on the features selected by principal component analysis, a second threshold T2 is preset, features with contribution degrees exceeding T2 are assigned weight values, cross-correlation analysis is performed on the feature set after feature weight assignment, a third threshold T3 is preset, redundant features with correlation exceeding T3 are removed, and the optimized feature set is obtained. The optimized feature set is classified using a machine learning model suitable for a classification task to obtain a classified feature set, wherein the classified feature set is used for emotion analysis, and different categories correspond to different emotions.
2. The method of claim 1, wherein, An adaptive noise filtering algorithm is used to remove noise from the collected time domain signal to obtain a processed time domain signal, including: The time domain signal is segmented 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 at 0.1-3Hz; When electromyographic noise is extracted from the segmented time domain signal, a low-pass filter is applied to remove noise above 20Hz; The band-stop filter and the low-pass filter are used to simultaneously and in parallel process each segment of the time domain signal, and finally output the processed time domain signal.
3. The method of claim 1, wherein, The optimized feature set is classified using a machine learning model suitable for a classification task to obtain a classified feature set, including: The optimized feature set is input into a convolutional neural network model, wherein the convolutional neural network model is composed of convolutional layers, pooling layers and fully connected layers; When the input feature set passes through each convolutional layer, the convolutional operation extracts local features, and the pooling layer reduces the dimension of the feature map output by convolution to retain main features and reduce computational complexity; During the forward propagation process, the data in the feature set pass through each layer of the network in turn to generate a classification prediction result; During the backward propagation process, a loss function between the predicted value and the actual value is calculated, and the network weights are adjusted through a gradient descent algorithm; An incremental learning algorithm is used to locally adjust the weight parameters of the convolutional neural network model based on newly input data for each input of new electroencephalogram data; After completing the forward propagation and backward propagation, the convolutional neural network model generates a classification result of the electroencephalogram signal based on the activation value of the final output layer, wherein the classification result includes emotion state recognition, cognitive state evaluation and attention level monitoring.
4. A system employing the frequency domain feature extraction optimization method of the electroencephalogram signal according to any one of claims 1 to 3, characterized in that, It includes: A signal acquisition module for acquiring a time domain signal, wherein the time domain signal is an original signal containing time domain electroencephalogram data and interference obtained by recording potential changes at at least one cortical position through an electrode device; A noise filtering module for removing noise from the collected time domain signal using an adaptive noise filtering algorithm to obtain a processed time domain signal; A frequency domain conversion module for performing frequency spectrum analysis on the processed time domain signal through a frequency domain conversion algorithm to generate a frequency domain signal; wherein the noise-processed time domain signal is segmented according to a window length L2, and an overlap of M% is set between each segment of the signal; a Kaiser window function is applied to each segment of the signal, and a fast Fourier transform is used to convert the time domain signal into an initial frequency domain signal to extract frequency components, amplitudes and phase information in the initial frequency domain signal to obtain a frequency spectrum result; the frequency spectrum results of adjacent segments of the initial frequency domain signal are weighted and processed, and the frequency spectrum results of each segment of the signal are accumulated to generate the frequency domain signal; The frequency band division module is configured to divide the frequency domain signal into bands according to different frequency ranges to obtain a plurality of decomposed signals of the bands; wherein, frequency energy features are extracted by power spectral density analysis, power spectral density values of each frequency point are calculated, and spectral energy distributions of the bands are formed, wherein, the divided bands include one or more of Delta, Theta, Alpha, Beta, and Gamma bands; a multi-resolution analysis technique is applied to decompose frequency components in each band, extract frequency detail information of different scales, and perform spectral energy distribution weighted smoothing processing on the frequency domain signal of each band to generate the decomposed signal of each band containing multi-resolution analysis and power spectral density features; The feature extraction module is configured to extract frequency domain features from the decomposed signal, and generate an initial feature set by summarizing the extracted frequency domain features; wherein, amplitudes and phases of each frequency point are calculated to form a spectral distribution in each band; differential entropy of the spectral information of each frequency point is calculated according to the spectral distribution, wherein, the differential entropy is calculated point by point by a probability density function of each frequency point to extract nonlinear features reflecting signal complexity; differential entropy of all frequency points in each band is arranged in index order to form a differential entropy feature matrix of each band; and the differential entropy feature matrices of each band are combined one by one to generate the initial feature set of the frequency domain. The feature dimension reduction module is configured to apply a dimension reduction technique to perform dimension reduction processing on the initial feature set to obtain an optimized feature set; wherein, principal component analysis is performed on the initial feature set, variance values of each feature are calculated, a first threshold T1 is preset, features with variance values exceeding T1 are retained, feature contribution degrees of the features selected by the principal component analysis are calculated, a second threshold T2 is preset, features with contribution degrees exceeding T2 are assigned weight values, cross-correlation analysis is performed on the feature set after the feature weight assignment, a third threshold T3 is preset, redundant features with correlation exceeding T3 are removed, and the optimized feature set is obtained. The classification optimization module is configured to use a machine learning model suitable for a classification task 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. 5.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-6 when the computer program is executed by the processor. The processor executes the computer program to implement the steps of the frequency domain feature extraction optimization method of the electroencephalogram signal in any one of claims 1 to 3.
6. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the frequency domain feature extraction optimization method of the electroencephalogram signal in any one of claims 1 to 3.
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