EEG signal quality real-time evaluation method and equipment
By constructing a real-time evaluation method of EEG signal quality based on deep learning, combining time-frequency and space feature fusion and model compression, the shortcomings of signal quality evaluation in the existing technology are solved, and accurate and real-time monitoring of EEG signal quality and user feedback are achieved.
Patent Information
- Application Number
- CN202510363012.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-08-01
AI Technical Summary
The existing EEG signal quality evaluation method has limited ability to distinguish artifacts, lacks consideration of time-varying characteristics, is insufficient sensitivity, is difficult to apply to real-time analysis, lacks standardization and robustness, and is difficult to adapt to complex interference.
Build a real-time evaluation method of EEG signal quality based on deep learning, and realize end-to-end signal quality evaluation through time-frequency and space feature fusion and deep learning algorithms, combined with attention mechanisms, and support real-time monitoring and user feedback through model compression and cross-platform deployment.
It realizes accurate and real-time evaluation of EEG signal quality, reduces artifact interference, improves classification accuracy, supports real-time data acquisition and analysis, and improves operational convenience and data quality monitoring.
Smart Images

Figure CN120408483A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical devices, and particularly to a method and device for real-time evaluation of EEG signal quality. Background Art
[0002] Electroencephalogram (EEG) is a method of recording brain activity using electrophysiological indicators. When the brain is active, it is formed by the summation of postsynaptic potentials synchronously generated by a large number of neurons. It records the electrical wave changes during brain activity and is the overall reflection of the electrophysiological activities of brain nerve cells on the cerebral cortex or the scalp surface.
[0003] Existing EEG quality evaluation methods mainly include: Root Mean Square (RMS) analysis, artifact quantification method, Relative Power Spectral Density (RPSD) method. However, these methods have the following deficiencies: 1. Limited ability to distinguish artifacts: Traditional methods (such as RMS, artifact quantification method) often cannot accurately distinguish physiological artifacts (such as electrooculogram, electromyogram) from environmental noise (such as power frequency interference, electrode detachment, etc.), which may lead to misjudgment.
[0004] 2. Lack of consideration for time-varying characteristics: EEG signals have obvious time-dynamic characteristics, while some quality evaluation methods (such as RMS, RPSD) are mainly based on global statistical features and are difficult to reflect the quality changes of signals in different time windows.
[0005] 3. Insufficient sensitivity to signals in different frequency bands: EEG signals include multiple frequency bands such as δ (0.5–4 Hz), θ (4–8 Hz), α (8–13 Hz), β (13–30 Hz), γ (>30 Hz), etc. Some methods (such as RMS) do not evaluate signals in different frequency bands separately, which may lead to insensitivity to noise or artifacts in specific frequency bands.
[0006] 4. Lack of standardization and universality: The signal quality thresholds and evaluation criteria adopted in different studies are inconsistent, making it difficult to compare the results between different experiments.
[0007] 5. Difficulty in applying to real-time EEG analysis: Many traditional methods rely on data calculation with a long time window (such as RPSD requires a long time window to calculate the power spectral density), and are not suitable for real-time signal quality monitoring and dynamic adjustment.
[0008] 6. Insufficient robustness to complex interference: Existing methods have poor adaptability to non-stationary noise (such as sudden artifacts, short-term electromyogram interference) and are difficult to accurately evaluate the quality of short-term EEG segments. Summary of the Invention
[0009] The object of the present invention is to provide a method and device for real-time evaluation of EEG signal quality, which can evaluate the signal quality during the acquisition process of EEG devices in real time, construct a real-time display interface for signal quality visualization, and establish a user feedback mechanism to prompt users to adjust the device or operation. The object of the present invention is achieved by the following technical solutions: A method for real-time evaluation of EEG signal quality includes the following steps: Step 1: Construct an EEG signal quality evaluation database based on the public EEG database, label the EEG signal quality according to the signal quality grade standard, and divide the EEG signal quality grade according to the score; Step 2: Extract features from the above EEG signal quality evaluation database to construct a spatio-temporal-frequency feature set of EEG signal quality; it includes time-domain feature extraction, frequency-domain feature extraction, and spatial feature extraction, and perform spatio-temporal-frequency feature fusion to obtain a spatio-temporal-frequency feature fusion map; Step 3: Use the above spatio-temporal-frequency feature fusion map as the input to construct a real-time evaluation model for EEG signal quality based on a deep learning algorithm; Step 4: Perform model deployment and real-time evaluation; it includes model compression and optimization, cross-platform model export, model loading and running; Step 5: Model output and feedback; construct a real-time display interface for real-time visualization and a user feedback mechanism.
[0010] Preferably, in step 1, the EEG signal quality is labeled according to the following signal quality grade standard, and the EEG signal quality grade is divided according to the score, and the specific steps are as follows: (1) EEG signal amplitude; the amplitude is set as A, and the evaluation value is set as B; when the amplitude is between 0.2 mV and 2 mV, the evaluation value is higher, and when the signal amplitude is less than 0.2 mV, the evaluation value is lower; The evaluation value is calculated as follows: B = A / 2; (2) EEG signal power frequency ratio; C represents the signal power frequency ratio, D represents the evaluation value; The evaluation value is calculated as follows: D = C / 50; (3) α-band PSD ratio; E represents the α-band PSD ratio, F represents the evaluation value; The evaluation value is calculated as follows: F = E / 10; (4) According to the score, divide the EEG signal quality level; EEG signal quality score The calculation formula is as follows: ; The EEG signal quality level division standard is based on the score for division, specifically: 80 - 100, the EEG signal quality is level one; 50 - 80, is level two; 30 - 50, is level three; 0 - 30, is level four.
[0011] Preferably, the time - domain feature extraction in step 2 specifically includes the following steps: (1) Data pre - processing: Divide the original EEG signal into sliding windows of length T, and the window step size is selected according to the analysis requirements to capture the short - time features of the time series; (2) Variational auto - encoder modeling: Use VAE to input the signal into the encoder , and the encoder maps the signal into the latent space z: , where represents the mean and standard deviation of the signal; (3) The decoder generates a trend graph: The decoder reconstructs the signal based on the latent vector z and separates the principal component and the dynamic component: , where is the reconstructed signal; (4) Generate a time - series feature graph: Plot the separated principal component and dynamic component with different scales and colors to represent the main change trend and fluctuation intensity of the signal.
[0012] Preferably, the frequency - domain feature extraction in step 2 specifically includes the following steps: (1) Frequency decomposition: Use TFAWT to perform frequency - domain decomposition on the signal to obtain the time - frequency representation of the signal: ; where is the Morlet wavelet kernel with a central frequency of f; (2) Adaptive frequency - band weighting: Calculate the weights for different frequency bands to represent the contribution of each frequency band to the overall signal: ; (3) Generate the "two-dimensional density field map": Superimpose the weights of each frequency band in the form of a density field, and use color and transparency to represent the frequency band intensity and duration respectively; The specific operation is to plot the frequency band distribution as a two-dimensional density field, and the concentrated area represents the strong frequency domain signal, and the transparency represents the sparsity of the signal.
[0013] Preferably, the spatial feature extraction in step 2 specifically includes the following steps: (1) Construct an EEG spatial map: Generate a node map G=(V,E) based on the EEG electrode positions, where each node is an electrode position, and the edge weights are represented by Pearson correlation coefficients or mutual information; (2) Graph embedding extraction: Use a graph convolutional network to extract spatial graph features, and the formula is: ; where is the layer graph feature, A is the adjacency matrix, D is the degree matrix, is the activation function; ] (3) GAN generative adversarial learning: Train the generator G and discriminator D to generate an enhanced representation of the EEG spatial connection graph; (4) Generate the "spatial vector field map": Represent the generated spatial map in the form of a vector field, where the regions with strong connection intensities have dense and thicker vectors, and the color represents the direction; The finally generated vector field map shows the strength and direction of brain region connections.
[0014] Preferably, the spatio-temporal-frequency feature fusion in step 2 specifically includes the following steps: (1) Multi-scale generation: Rescale the time-domain, frequency-domain, and spatial images to different scales to obtain multi-scale features; (2) Channel fusion: Fuse the images of different scales in the RGB channel manner, such as superimposing the time-domain feature map, frequency-domain feature map, and spatial feature map.
[0015] (3) Spatio-temporal-frequency feature fusion map: Generate the final spatio-temporal-frequency feature fusion map after fusing the multi-scale images.
[0016] Preferably, the construction of the EEG signal quality real-time evaluation model based on the deep learning algorithm in step 3 specifically includes the following steps: (1) Deep model selection: Use deep learning algorithms such as ResNet-50 and Inception-v3 to process three-channel images to capture the cross-domain relationships of features; (2) Loss function and optimization: Select a multi-task loss function, and define weights according to the contributions of time-domain, frequency-domain, and spatial features respectively, such as: ; (3) Attention mechanism: The structure of the model incorporates an attention mechanism, such as the Self-Attention module, which automatically focuses on important feature regions representing signal quality in the image; (4) Model training and evaluation.
[0017] Preferably, the model training and evaluation specifically include the following steps: ① Data segmentation: Divide the dataset into a training set, a validation set, and a test set in a ratio of 8:1:1; ② Data augmentation: Use data augmentation methods such as random cropping, translation, and rotation to enhance the robustness of the model; ③ Training strategy: Use the AdamW optimizer to train at a low learning rate and gradually adjust the learning rate; ④ Model evaluation: Use metrics such as accuracy, recall, and F1-score to evaluate the model performance and ensure accurate recognition of various signal levels.
[0018] Preferably, the model deployment and real-time evaluation in step 4 specifically include the following steps: (1) Model compression and optimization: First, optimize the model weights through a quantization tool, then further optimize the model structure by deleting redundant or low-weight neurons, and finally generate pseudo-labels using a large model and retrain through a lightweight network to reduce the model size; (2) Cross-platform model export: Export the model as a cross-platform compatible file and integrate it into different hardware devices, and then select an appropriate framework according to the operating environment; (3) Model loading and running: Load the optimized model into the device and then use a low-latency inference framework; Preferably, the model output and feedback in step 5 specifically include the following steps: (1) Real-time visualization: Build a real-time display interface and use color coding for signal quality; (2) User feedback mechanism: Prompt the user to adjust the device or operation.
[0019] An EEG signal quality real-time evaluation device includes a biosignal collector, electrodes, lead wires, and a computer. Place the electrodes at the corresponding positions of the acquisition object, connect each electrode to the corresponding channel of the biosignal collector using lead wires, and transmit the acquired signals to the computer through the biosignal collector, and perform evaluation using the above EEG signal quality real-time evaluation method.
[0020] Compared with the closest prior art, the technical solution provided by the present invention has the following beneficial effects: 1. By introducing the joint analysis of time domain, frequency domain, and spatial features to construct a time-frequency-space feature fusion map, the present invention significantly improves the comprehensiveness and robustness of EEG signal quality assessment, effectively reduces the influence of artifact interference on signal analysis, and achieves more accurate signal quality assessment; 2. By adopting deep learning algorithms such as ResNet-50 and combining attention mechanisms and multi-task loss functions, the present invention realizes the end-to-end automated processing of EEG signal quality assessment, improves the classification accuracy and sensitivity to low-quality signals, and enhances the generalization ability and stability of the assessment model; 3. Through model compression and optimization, cross-platform model export, and low-latency inference frameworks, the present invention successfully realizes the real-time monitoring ability of EEG signal quality assessment, enabling signal quality feedback to be completed within milliseconds, effectively supporting real-time data acquisition and analysis scenarios; 4. The present invention constructs a real-time display interface and a user feedback mechanism. By color-coding the signal quality status and prompting the user to adjust device settings, it significantly improves the operation convenience of EEG devices and the quality of data acquisition, providing users with an intuitive and efficient signal quality monitoring means; 5. Based on the concept of edge computing, the present invention designs a signal quality assessment process, trains and assigns optimal weights with high diagnostic accuracy based on cloud-based hardware resources, and performs inference at the edge computing end to ensure the lightweight of the model and real-time assessment under low computing resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 is a flowchart of a method for real-time assessment of EEG signal quality according to the present invention; Figure 2 is an architecture diagram of a signal quality assessment model in Embodiment 2 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0022] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention. Please refer to Figure 1-2 .
[0023] Embodiment 1 As Figure 1 shown, a method for real-time assessment of EEG signal quality includes the following steps: Step 1: Construct an EEG signal quality assessment database based on an EEG public database, including annotating the EEG signal quality according to the following signal quality level criteria: (1)Amplitude of EEG signal. The amplitude is set as , and the evaluation value is set as . When the amplitude is between 0.2 mV and 2 mV, the evaluation value is relatively high. When the signal amplitude is less than 0.2 mV, the evaluation value is relatively small. The calculation formula is as follows: ; (2)Power frequency ratio of EEG signal. represents the signal power frequency ratio, represents the evaluation value, and the calculation formula is as follows: ; 3)PSD ratio of α band. represents the PSD ratio of the α band, represents the evaluation value, and the calculation formula is as follows: ; (4)According to score, divide the EEG signal quality level. The calculation formula for the EEG signal quality score is as follows: , and the EEG signal quality level division standard is divided according to the score of score. The specific division is shown in the following table: Table 1 EEG signal quality level division standard Note: The higher the level, the worse the signal quality. The signal quality level division can be customized according to different usage scenarios or users.
[0024] Step 2: Extract features from the above EEG signal quality evaluation database to construct a time-frequency-space feature set of EEG signal quality. By introducing the joint analysis of time domain, frequency domain, and space features, a time-frequency-space feature fusion graph is constructed, which significantly improves the comprehensiveness and robustness of EEG signal quality evaluation, effectively reduces the influence of artifact interference on signal analysis, and realizes more accurate signal quality evaluation. Specifically as follows: (1)Time domain feature extraction: ①Data preprocessing: Divide the original EEG signal into sliding windows of length T. The window step size can be selected according to the analysis requirements to capture the short-time features of the time series; ②Variational autoencoder modeling: Use VAE to input the signal into the encoder , and the encoder maps the signal into the latent space z: ; Among them, represents the mean and standard deviation of the signal.
[0025] ③ The decoder generates a trend graph: The decoder reconstructs the signal based on the latent vector z and separates the principal component and the dynamic component: ; wherein, is the reconstructed signal.
[0026] ④ Generate the "temporal feature graph": The separated principal component and dynamic component are respectively plotted with different scales and colors to represent the main change trend and fluctuation intensity of the signal. The dynamic component can be superimposed on the principal component as a heat map to make the time-domain image more expressive.
[0027] (2)Frequency domain feature extraction: ① Frequency decomposition: Use TFAWT to perform frequency domain decomposition on the signal to obtain the time-frequency representation of the signal: ; wherein, is the Morlet wavelet kernel with a central frequency of f.
[0028] ② Adaptive frequency band weighting: Calculate the weights for different frequency bands (Delta, Theta, Alpha, Beta, Gamma) to represent the contribution of each frequency band to the overall signal: ; ③ Generate the "two-dimensional density field graph": Superimpose the weights of each frequency band in the form of a density field, and use color and transparency to represent the frequency band intensity and duration respectively. The specific operation is to plot the frequency band distribution as a two-dimensional density field. The more concentrated area represents a stronger frequency domain signal, and the transparency represents the sparsity of the signal.
[0029] (3)Spatial feature extraction: ① Construct an EEG spatial graph: Generate a node graph G=(V,E) based on the EEG electrode positions. Each node is an electrode position, and the edge weights are represented by the Pearson correlation coefficient or mutual information.
[0030] ② Graph embedding extraction: Use a graph convolutional network to extract the spatial graph features, and the formula is: ; where is the graph feature of the th layer, A is the adjacency matrix, D is the degree matrix, is the activation function.
[0031] ③ GAN generative adversarial learning: Train the generator G and discriminator D to generate an enhanced representation of the EEG spatial connection graph to make it more representative.
[0032] ④Generate the "Spatial Vector Field Map": Represent the generated spatial map in the form of a vector field. The vectors in the regions with strong connections are dense and thick, and the color represents the direction. The finally generated vector field map can clearly display the strength and direction of the connections in the brain regions.
[0033] (4)Time-Frequency-Spatial Feature Fusion: ①Multi-scale Generation: Resize the time-domain, frequency-domain, and spatial images to different scales (such as 1x, 0.5x, 0.25x) respectively to obtain multi-scale features.
[0034] ②Channel Fusion: Fuse the images at different scales in the RGB channel manner, such as superimposing the time-domain feature map (R) with the frequency-domain feature map (G) and the spatial feature map (B).
[0035] ③Time-Frequency-Spatial Feature Fusion Map: Generate the final time-frequency-spatial feature fusion map after fusing the multi-scale images to enhance the complementarity between features.
[0036] Step 3: Use the above time-frequency-spatial feature fusion feature map as the input, and build a real-time EEG signal quality evaluation model based on deep learning algorithms. By adopting deep learning algorithms such as ResNet-50, and combining the attention mechanism and multi-task loss function, the end-to-end automated processing of EEG signal quality evaluation is realized, improving the classification accuracy and the sensitivity to low-quality signals, and enhancing the generalization ability and stability of the evaluation model. Specifically as follows: (1)Deep Model Selection: Use deep learning algorithms such as ResNet-50 and Inception-v3 to process three-channel images to capture the cross-domain relationships of features.
[0037] (2)Loss Function and Optimization: Select a multi-task loss function, and define weights according to the contributions of time-domain, frequency-domain, and spatial features respectively, such as: ; (3)Attention Mechanism: Add the attention mechanism to the structure of the model, such as the Self-Attention module, to automatically focus on the important feature regions representing signal quality in the image.
[0038] (4)Model Training and Evaluation: ①Data Splitting: Divide the dataset into a training set, a validation set, and a test set in the ratio of 8:1:1.
[0039] ②Data Augmentation: Use data augmentation methods such as random cropping, translation, and rotation to enhance the robustness of the model.
[0040] ③Training Strategy: Use the AdamW optimizer to train at a relatively low learning rate (such as 10-4), and gradually adjust the learning rate.
[0041] ④ Model evaluation: Evaluate the model performance using metrics such as accuracy, recall, and F1-score to ensure accurate identification of various signal levels.
[0042] Step 4: Perform model deployment and real-time evaluation. Through model compression and optimization, cross-platform model export, and low-latency inference frameworks, the real-time monitoring ability of EEG signal quality assessment has been successfully achieved, enabling signal quality feedback to be completed within milliseconds, effectively supporting real-time data acquisition and analysis scenarios. Specifically as follows: (1)Model compression and optimization: ① Reduce the model weights from 32-bit floating-point numbers to 16-bit or 8-bit (e.g., using quantization tools in TensorFlow Lite or PyTorch) to reduce computational overhead and storage requirements.
[0043] ② Further optimize the model structure by deleting redundant or low-weight neurons.
[0044] ③ Generate pseudo-labels with a large model and retrain through a lightweight network to reduce the model size.
[0045] (2)Cross-platform model export: ① Export the model in the ONNX (Open Neural Network Exchange) format as a cross-platform compatible file for easy integration into different hardware devices.
[0046] ② Select an appropriate framework according to the running environment, such as TensorFlow Lite, PyTorch Mobile, or NVIDIA TensorRT.
[0047] (3)Model loading and running ① Load the optimized model into the device (e.g., run on a mobile device through TensorFlow Lite).
[0048] ② Use a low-latency inference framework, such as NVIDIA TensorRT (for GPUs) or EdgeTPU (for edge devices).
[0049] Step 5: Model output and feedback. A real-time display interface and user feedback mechanism have been built. By color-coding the signal quality status and prompting the user to adjust device settings, the operation convenience of the EEG device and the data acquisition quality have been significantly improved, providing users with an intuitive and efficient signal quality monitoring means. Specifically as follows: (1)Real-time visualization: Build a real-time display interface and color-code the signal quality (e.g., green represents high quality, yellow represents medium, and red represents low quality).
[0050] (2)User feedback mechanism: Prompt the user to adjust the device or operation: ① Too many artifacts: Suggest the user to relax muscles or reduce movement. ② Connection problem: Suggest the user to check the electrodes or re-wear them.
[0051] Example 2 For the real-time EEG signal quality evaluation method of the present invention, a real-time EEG signal quality evaluation model is constructed based on a deep learning algorithm, and a lightweight intelligent signal evaluation framework based on adaptive knowledge distillation can also be used to construct a signal quality evaluation model. Specifically as follows: Train the optimal weights on the cloud and perform inference on edge devices (EEG devices). Based on adaptive knowledge distillation, transfer the signal quality knowledge from the cloud-based deep neural network model (teacher model) to the edge-based lightweight model (student model). The student model effectively acquires and deeply understands the knowledge representation of the teacher model by dynamically adjusting the distillation temperature.
[0052] To ensure different levels of data privacy requirements, different model update strategies are adopted: ① No special data privacy requirements. Transmit the EEG signals collected by the EEG device to the cloud for training based on Internet of Things technology, and update the model parameters of the EEG device. ② Low data privacy requirements. Based on federated learning technology, train and update the model on the EEG device, upload the parameters to the cloud for integrated training, and then further update the device model according to the cloud model knowledge. ③ High data privacy requirements. Adopt timed offline update of model parameters.
[0053] This framework has the following advantages: (1)Design the signal quality evaluation process based on the concept of edge computing; based on the hardware resources of the cloud, train and allocate the optimal weights with high diagnostic accuracy; perform inference at the edge computing end to ensure the lightweight of the model and real-time evaluation under low computing resources.
[0054] (2)Use knowledge distillation to transfer the signal evaluation knowledge from the teacher model to the student model, realizing the knowledge transfer from the cloud-based deep neural network model to the lightweight edge model.
[0055] (3)Adaptive adjustment of distillation temperature; effectively guide the student model to learn the knowledge of the teacher model, enabling the student model to better understand and generalize complex knowledge representations, and thus obtaining better signal evaluation results.
[0056] The above is only the preferred implementation manner of the present invention. The protection scope of the present invention is not limited to the above embodiments. All technical solutions falling within the concept of the present invention belong to the protection scope of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, several improvements and refinements made without departing from the principle of the present invention should be regarded as within the protection scope of the present invention.
Claims
1. A real-time evaluation method for EEG signal quality, characterized in that, It includes the following steps: Step 1: Construct an EEG signal quality assessment database based on the public EEG database, annotate the quality of EEG signals based on the signal quality grade standard, and divide the quality grade of EEG signals according to the score; Step 2: Extract features from the above EEG signal quality assessment database to construct a time-frequency-space feature set of EEG signal quality; it includes time-domain feature extraction, frequency-domain feature extraction, and spatial feature extraction, and performs time-frequency-space feature fusion to obtain a time-frequency-space feature fusion map; Step 3: Use the above time-frequency-space feature fusion feature map as input and construct a real-time EEG signal quality assessment model based on deep learning algorithms; Step 4: Perform model deployment and real-time evaluation; it includes model compression and optimization, cross-platform model export, model loading and running; Step 5: Model output and feedback; construct a real-time display interface for real-time visualization and user feedback mechanism.
2. The real-time EEG signal quality evaluation method according to claim 1, characterized in that: In step 1, the EEG signal quality is labeled based on the following signal quality level criteria. According to the scores, the EEG signal quality levels are divided. The specific steps are as follows: (1) EEG signal amplitude; the amplitude is set to , and the evaluation value is set to ; when the amplitude is between 0.2 mV and 2 mV, the evaluation value is higher, and when the signal amplitude is less than 0.2 mV, the evaluation value is smaller; Evaluation value The calculation formula is as follows: ; (2)Power frequency ratio of EEG signal; Represents the signal power frequency ratio, Represents the evaluation value; Evaluation value The calculation formula is as follows: ; (3)α-band PSD ratio; represents the α-band PSD ratio, represents the evaluation value; Evaluation value The calculation formula is as follows: ; (4) According to the scoring, divide the EEG signal quality level; EEG signal quality score The calculation formula is as follows: The classification standard of EEG signal quality level is based on scoring, specifically as follows: 80 - 100, the EEG signal quality is level one; 50 - 80, is level two; 30 - 50, is level three; 0 - 30, is level four.
3. The real-time EEG signal quality evaluation method according to claim 1, characterized in that: The time-domain feature extraction in Step 2 specifically includes the following steps: (1)Data preprocessing: The original EEG signals are divided into sliding windows of length T, and the window step size is selected according to the analysis requirements to capture the short-term features of the time series; (2) Variational Autoencoder Modeling: Use VAE to input the signal into the encoder , and the encoder maps the signal into the latent space z: , where represents the mean and standard deviation of the signal; (3) The decoder generates a trend graph: The decoder reconstructs the signal based on the latent vector z and separates the principal component and the dynamic component: , where is the reconstructed signal; (4) Generate a time-series feature map: Plot the separated principal components and dynamic components with different proportions and colors to represent the main change trend and fluctuation intensity of the signal.
4. The real-time EEG signal quality evaluation method according to claim 1, characterized in that: The frequency-domain feature extraction in Step 2 specifically includes the following steps: (1) Frequency decomposition: Use TFAWT to perform frequency-domain decomposition on the signal to obtain the time-frequency representation of the signal: ; Among them, is a Morlet wavelet kernel with a central frequency of f; (2) Adaptive frequency band weighting: Calculate the weights for different frequency bands to represent the contribution of each frequency band to the overall signal: ; (3) Generate a "two-dimensional density field map": Superimpose the weights of each frequency band in the form of a density field, and use color and transparency to represent the frequency band intensity and duration respectively; the specific operation is to plot the frequency band distribution as a two-dimensional density field, and the concentrated area represents the strong frequency-domain signal, and the transparency represents the sparseness of the signal.
5. The real-time EEG signal quality evaluation method according to claim 1, characterized in that: The spatial feature extraction in Step 2 specifically includes the following steps: (1) Construct an EEG spatial map: Generate a node map G=(V,E) based on the EEG electrode positions, where each node is an electrode position, and the edge weights are represented by Pearson correlation coefficients or mutual information; (2) Graph embedding extraction: Use a graph convolutional network to extract spatial graph features, and the formula is: ; Among them is the layer graph feature, A is the adjacency matrix, D is the degree matrix, is the activation function; (3) GAN generative adversarial learning: Train the generator G and discriminator D to generate an enhanced representation of the EEG spatial connection map; (4) Generate a "spatial vector field map": Represent the generated spatial map in the form of a vector field, where the areas with strong connection intensities have dense and thicker vectors, and the color represents the direction; the finally generated vector field map shows the strength and direction of brain region connections.
6. The real-time EEG signal quality evaluation method according to claim 1, wherein: The time-frequency-space feature fusion in Step 2 specifically includes the following steps: (1) Multi-scale generation: Scale the time-domain, frequency-domain, and spatial images to different scales to obtain multi-scale features; (2) Channel fusion: Fuse the images of different scales in the RGB channel manner, such as superimposing the time-domain feature map, frequency-domain feature map, and spatial feature map; (3) Time-frequency-space feature fusion map: Generate the final time-frequency-space feature fusion map after fusing the multi-scale images.
7. The real-time EEG signal quality assessment method according to claim 1, wherein: The construction of the real-time EEG signal quality assessment model based on deep learning algorithms in Step 3 specifically includes the following steps: (1) Deep model selection: Use deep learning algorithms such as ResNet-50 and Inception-v3 to process three-channel images to capture the cross-domain relationships of features; (2)Loss function and optimization: Select a multi-task loss function and define weights according to the contributions of time-domain, frequency-domain, and spatial features respectively, such as: ; (3) Attention mechanism: The structure of the model incorporates an attention mechanism, such as the Self-Attention module, to automatically focus on important feature regions in the image that represent signal quality. (4) Model training and evaluation; The model training and evaluation specifically include the following steps: ① Data segmentation: The dataset is divided into a training set, a validation set, and a test set in a ratio of 8:1:
1. ② Data augmentation: Data augmentation methods such as random cropping, translation, and rotation are used to enhance the robustness of the model. ③ Training strategy: The AdamW optimizer is used to train the model at a low learning rate and gradually adjust the learning rate. ④ Model evaluation: Metrics such as accuracy, recall, and F1-score are used to evaluate the model performance to ensure accurate identification of various signal levels.
8. The real-time EEG signal quality evaluation method according to claim 1, characterized in that: The model deployment and real-time evaluation in step 4 specifically include the following steps: (1) Model compression and optimization: First, optimize the model weights through a quantization tool, then further optimize the model structure by deleting redundant or low-weight neurons. Finally, generate pseudo-labels using a large model and retrain through a lightweight network to reduce the model size. (2) Cross-platform model export: Export the model as a cross-platform compatible file and integrate it into different hardware devices, and then select an appropriate framework according to the operating environment. (3) Model loading and running: Load the optimized model into the device and then use a low-latency inference framework.
9. The real-time EEG signal quality evaluation method according to claim 1, characterized in that: The model output and feedback in step 5 specifically include the following steps: (1) Real-time visualization: Build a real-time display interface and use color coding for signal quality. (2) User feedback mechanism: Prompt the user to adjust the device or operation.
10. A real-time EEG signal quality evaluation device, characterized in that: It includes a bio-signal collector, electrodes, lead wires, and a computer; Place the electrodes at the corresponding positions of the acquisition object, connect each electrode to the corresponding channel of the bio-signal collector using lead wires, transmit the acquired signals to the computer through the bio-signal collector, and evaluate using the above EEG signal quality real-time evaluation method.
Citation Information
Cited By
EEG signal feature extraction method and system, storage medium and terminal
CN121997032A
EEG signal feature extraction method, system, storage medium and terminal
CN121997032B
