A motor imagery electroencephalogram signal denoising method, device, medium and product

CN122262492BActive Publication Date: 2026-08-18INST OF WENZHOU ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610737924.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-27
Publication Date
2026-08-18
Estimated Expiration
2046-05-27

AI Technical Summary

Technical Problem

[0004]本申请的目的是提供一种运动想象脑电信号去噪方法、设备、介质及产品,解决了传统脑电去噪方法在信号保真性、频谱保真性、空间结构保持及泛化能力等方面存在的问题

Benefits of technology

本申请提供了一种运动想象脑电信号去噪方法、设备、介质及产品,通过多尺度自适应增强模块在不同尺度上对输入信号进行特征提取以及级联增强,有效兼顾全局抑制与局部保真的平衡;通过频域动态增强模块对多尺度自适应增强特征中的全局频率结构和局部谱畸变进行联合建模,充分表征伪影引起的全局频谱结构变化与局部谱畸变,在有效抑制伪影的同时,保持原始脑电信号的频域节律分布与时域波形结构;通过伪影表征交互注意融合重建模块使伪影表征能够显式参与脑电恢复过程,降低伪影信息向恢复路径的泄漏,增强网络对有效脑电成分与伪影成分的区分能力;本申请采用脑电去噪模型进行脑电去噪,解决了传统脑电去噪方法在信号保真性、频谱保真性、空间结构保持及泛化能力等方面存在的问题,且采用深度学习模型的去噪方法效率高。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122262492B_ABST
    Figure CN122262492B_ABST
Patent Text Reader

Abstract

The application discloses a motor imagery electroencephalogram signal denoising method and device, medium and product, relates to the technical field of deep learning and biomedical signal processing, and the method comprises the following steps: acquiring a target electroencephalogram signal containing artifacts; inputting the target electroencephalogram signal containing artifacts into a trained electroencephalogram denoising model to obtain a final denoised electroencephalogram signal; wherein the electroencephalogram denoising model comprises an electroencephalogram denoising branch, an artifact prediction branch and an artifact representation interaction attention fusion reconstruction module; the electroencephalogram denoising branch comprises a multi-scale self-adaptive enhancement module, a frequency domain dynamic enhancement module and a feature extraction module. The application solves the problems of traditional electroencephalogram denoising methods in signal fidelity, spectral fidelity, spatial structure preservation and generalization ability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of deep learning and biomedical signal processing technology, and in particular to a method, device, medium and product for denoising motor imagery EEG signals. Background Technology

[0002] Electroencephalography (EEG) signals are a comprehensive reflection of the electrical activity of a group of neurons in the brain. They are acquired through electrodes on the scalp and can reflect the synchronization and desynchronization activities of neurons in the cerebral cortex in real time. They have wide application value in the fields of brain-computer interface (BCI), diagnosis of neurological diseases, and cognitive science research.

[0003] However, EEG signals are highly susceptible to interference from various physiological artifacts during actual acquisition. At the neurophysiological level, artifacts mainly originate from electrooculography (EOG), electromyography (EMG), electrocardiography (ECG), and power line interference. These artifacts enhance signal non-stationarity and mask effective neural components. Traditional denoising methods each have limitations: bandpass filtering cannot suppress band overlap artifacts; independent component analysis relies on human experience, is computationally complex, and difficult to automate; wavelet transform lacks adaptability; and denoising methods based on general deep learning (such as CNN, RNN, etc.) suffer from insufficient signal fidelity, poor spectral fidelity, poor preservation of spatial structure, and limited generalization ability. Summary of the Invention

[0004] The purpose of this application is to provide a method, device, medium, and product for denoising motor imagery EEG signals, which solves the problems of traditional EEG denoising methods in terms of signal fidelity, spectral fidelity, spatial structure preservation, and generalization ability.

[0005] To achieve the above objectives, this application provides the following solution.

[0006] In a first aspect, this application provides a method for denoising motor imagery EEG signals, including: Acquire target EEG signals containing artifacts; The target EEG signal containing artifacts is input into the trained EEG denoising model to obtain the final denoised EEG signal. The EEG denoising model includes an EEG denoising branch, an artifact prediction branch, and an artifact representation interactive attention fusion and reconstruction module. The EEG denoising branch includes a multi-scale adaptive enhancement module, a frequency domain dynamic enhancement module, and a feature extraction module. The multi-scale adaptive enhancement module is used to extract features from the input signal at different scales and perform cascaded enhancement to obtain multi-scale adaptive enhancement features. The frequency domain dynamic enhancement module is used to jointly model the global frequency structure and local spectral distortion in the multi-scale adaptive enhancement features to obtain frequency domain dynamic enhancement features. The feature extraction module is used to extract features from the frequency domain dynamic enhancement features to obtain EEG denoising features. The artifact prediction branch includes a multi-scale adaptive enhancement module and a feature extraction module; the artifact prediction branch outputs artifact prediction features. The artifact representation interactive attention fusion reconstruction module is used to interactively constrain the EEG denoising features and artifact prediction features to reconstruct the final denoised EEG signal.

[0007] Secondly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to implement the steps of the above-described method for denoising motor imagery EEG signals.

[0008] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method for denoising motor imagery EEG signals.

[0009] Fourthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method for denoising motor imagery EEG signals.

[0010] According to the specific embodiments provided in this application, this application has the following technical effects: This application provides a method, device, medium, and product for denoising motor imagery EEG signals. It utilizes a multi-scale adaptive enhancement module to extract features from the input signal at different scales and perform cascaded enhancement, effectively balancing global suppression and local fidelity. A frequency-domain dynamic enhancement module jointly models the global frequency structure and local spectral distortion in the multi-scale adaptive enhancement features, fully characterizing the global spectral structure changes and local spectral distortions caused by artifacts. This effectively suppresses artifacts while maintaining the frequency-domain rhythmic distribution and temporal waveform structure of the original EEG signal. An artifact representation interactive attention fusion reconstruction module enables artifact representations to explicitly participate in the EEG recovery process, reducing the leakage of artifact information into the recovery path and enhancing the network's ability to distinguish between valid EEG components and artifact components. This application employs an EEG denoising model, solving the problems of traditional EEG denoising methods in terms of signal fidelity, spectral fidelity, spatial structure preservation, and generalization ability. Furthermore, the denoising method using a deep learning model is highly efficient. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly described below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort: Figure 1 This is an application environment diagram of a method for denoising motor imagery EEG signals according to an embodiment of this application; Figure 2 A flowchart illustrating a method for denoising motor imagery EEG signals according to an embodiment of this application; Figure 3 This is a schematic diagram of an EEG denoising model provided in an embodiment of this application; Figure 4 This is a schematic diagram of a multi-scale adaptive enhancement module provided in an embodiment of this application; Figure 5 This is a schematic diagram of a local adaptive layer provided in an embodiment of this application; Figure 6 This is a schematic diagram of a frequency domain dynamic enhancement module provided in an embodiment of this application; Figure 7 This is a schematic diagram of an artifact representation interactive attention fusion reconstruction module provided in an embodiment of this application; wherein, Figure 7 (a) in the diagram is a schematic diagram of a branch interaction unit; Figure 7 (b) in the diagram is a schematic diagram of the fusion reconstruction unit; Figure 8 This is a schematic diagram illustrating the denoising performance of different models under different artifacts according to an embodiment of this application; wherein, Figure 8 (a) in the figure is a schematic diagram of the denoising performance of different models under electromyography artifacts. Figure 8 (b) in the figure is a schematic diagram of the denoising performance of different models under electrooculography artifacts. Figure 8 (c) in the figure is a schematic diagram of the denoising performance of different models under ECG artifacts; Figure 9 This is a visualization diagram of the denoising result provided in an embodiment of this application; wherein, Figure 9 (a) in the diagram is a visualization of the denoising results at a signal-to-noise ratio of -5 dB. Figure 9 (b) in the diagram is a visualization of the denoising results at a signal-to-noise ratio of 0 dB. Figure 9 (c) in the figure is a visualization of the denoising results at a signal-to-noise ratio of 5 dB; Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0012] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0013] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0014] The method for denoising motor imagery EEG signals provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be set up independently, integrated into server 104, or placed in the cloud or on another server. Terminal 102 can send the target EEG signal containing artifacts to server 104. After receiving the target EEG signal containing artifacts, server 104 inputs it into a trained EEG denoising model to obtain the final denoised EEG signal. Server 104 can then feed back the obtained final denoised EEG signal containing artifacts to terminal 102. Furthermore, in some embodiments, the motor imagery EEG signal denoising method can also be implemented independently by server 104 or terminal 102. For example, terminal 102 can directly denoise the target EEG signal containing artifacts, or server 104 can obtain the target EEG signal containing artifacts from the data storage system and denoise it.

[0015] The terminal 102 can be, but is not limited to, various desktop computers and laptops. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers, or it can be a cloud server.

[0016] In one exemplary embodiment, such as Figure 2 As shown, a method for denoising motor imagery EEG signals is provided. This method is executed by a computer device, specifically a terminal or server, or both. In this embodiment, the method is applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps 201 to 202.

[0017] Step 201: Obtain the target EEG signal containing artifacts.

[0018] Step 202: Input the target EEG signal containing artifacts into the trained EEG denoising model to obtain the final denoised EEG signal.

[0019] By implementing steps 201 to 202 above, EEG denoising is performed using an EEG denoising model, which solves the problems of traditional EEG denoising methods in terms of signal fidelity, spectrum fidelity, spatial structure preservation, and generalization ability. Furthermore, the denoising method using a deep learning model is highly efficient.

[0020] Before inputting the target EEG signal containing artifacts into the trained EEG denoising model, the motor imagery EEG signal denoising method further includes the following steps S1 to S4.

[0021] S1, Obtain the dataset; the dataset includes several samples of EEG signals with artifacts and the clean EEG signal corresponding to each sample of EEG signals with artifacts. Clean EEG signal refers to EEG signal without added artifact signals.

[0022] S2, input the EEG signal containing artifacts from the sample into the EEG denoising model to obtain the denoised signal of the sample.

[0023] S3, calculate the loss function value based on the denoised sample signal and the clean EEG signal.

[0024] S4. Determine whether the iteration stopping condition has been met. If not, update the model parameters of the EEG denoising model using the loss function value and return to the step of "inputting the sample EEG signal containing artifacts into the EEG denoising model". If yes, stop the iteration and obtain the trained EEG denoising model (also known as the cascaded multi-scale adaptive frequency domain interactive fusion denoising model).

[0025] Step S1 above, obtaining the dataset, specifically includes: obtaining several pure EEG signals and artifact signals; the artifact signals include electrooculography (EOG) signals, electromyography (EMG) signals and electrocardiography (ECG) signals; mixing each pure EEG signal with at least one artifact signal to obtain sample EEG signals containing artifacts.

[0026] During the training phase: Using publicly available artifact and EEG datasets, experimental sample pairs were created by combining EEG signals containing artifacts with their corresponding clean EEG signals. Specifically, clean EEG segments were mixed with different types of artifact segments, and the degree of contamination under different signal-to-noise ratio conditions was controlled by adjusting the mixing intensity, resulting in experimental samples ranging from mild to severe interference. The clean EEG signal and the EEG signal with the added artifact segment constituted one experimental sample pair (training sample pair). These experimental sample pairs were input into the EEG denoising model, which outputs denoised sample signals. The loss function value was calculated based on the denoised sample signals and the clean EEG signals. The parameters of the entire network were optimized using a multi-task loss function to obtain the trained EEG denoising model.

[0027] Design of experiments and evaluation metrics. To fully verify the performance of the proposed EEG artifact denoising method under different artifact types, different contamination intensities, and real-world task scenarios, this application designed three types of experiments on public datasets: artifact-dependent experiments, artifact-independent experiments, and classification verification experiments in real-world task scenarios.

[0028] The clean EEG signals used in the experiments were mainly derived from the EEGdenoiseNet and BCIC IV 2a datasets. EOG and EMG signals were from the EEGdenoiseNet dataset, and ECG signals were from the MIT-BIH Arrhythmia dataset. To construct EEG signals with artifacts, this application mixed clean EEG signals with different types of artifact signal fragments, and controlled the degree of contamination under different signal-to-noise ratio conditions by adjusting the mixing intensity, so that the experimental samples could cover various situations from mild to severe interference. To ensure the reliability of the experimental results, all samples in the dataset were divided into training, validation, and test sets. The training set was used for model parameter learning, the validation set was used for model selection and parameter tuning, and the test set was used for final performance evaluation.

[0029] 1) Artifact-Dependent Experiment: This experiment primarily evaluates the model's ability to target and remove artifacts of a single type. In this setting, the EEG signals containing artifacts in both the training and test sets are constructed from the same type of artifact; that is, separate denoising tasks are established for EOG, EMG, and ECG artifacts. This experiment clearly reflects the model's ability to fit the statistical characteristics of different artifacts and facilitates the analysis of performance differences under different contamination forms. Since EOG artifacts typically exhibit low-frequency drift, EMG artifacts are more often characterized by mid-to-high frequency burst noise, and ECG artifacts have a relatively obvious periodic structure, this experimental setup effectively tests the model's adaptability to artifacts with different spectral characteristics.

[0030] 2) Artifact-Independent Experiment: Considering that multiple artifacts often exist simultaneously during actual EEG acquisition, the experimental results under a single artifact condition are insufficient to fully reflect the model's generalization ability. Therefore, this application further includes an artifact-independent experiment. In this experiment, during the training phase, sample EEG signals containing artifacts are simultaneously introduced, constructed from three types of artifacts: EOG, EMG, and ECG. This allows the model to learn the degradation patterns of multiple artifacts within a unified framework. During the testing phase, the model is evaluated under different artifact conditions to examine its stability and robustness when artifact types change. Compared to the artifact-dependent experiment, this setup is closer to real-world applications in open scenarios and better reflects the model's comprehensive ability to handle complex multi-source artifacts.

[0031] 3) Real-world dataset classification validation experiment: To further illustrate the application value of the denoising method in actual brain-computer interface tasks, this application designed a classification validation experiment on the BCIC IV 2a motor imagery dataset. Specifically, artifacts were first added to clean EEG signal segments to construct noisy data, and the EEG denoising model was trained using the artifact-containing EEG signals and their corresponding clean EEG signals from the training set. After the model training was completed, the artifact-containing EEG signals from the test set were denoised, and then the denoised EEG signals were input into the subsequent classification model for recognition. By comparing the performance differences of the data before and after denoising in downstream classification tasks, the actual effect of the proposed method on improving EEG quality can be verified from an application perspective, and it can be verified whether it can provide more reliable signal input for subsequent motor imagery recognition.

[0032] To quantitatively evaluate the model's performance in EEG denoising, this application uses three metrics—relative root mean square error (RRMSE), correlation coefficient (CC), and signal-to-noise ratio (SNR)—to evaluate the denoising results. Let the clean EEG signal be... The model outputs a denoised sample signal. For lengths of The sequence is defined as follows: 1) Relative root mean square error: (1); in, This indicates the residual noise level.

[0033] The root mean square operator is defined as follows: (2); in, For any length discrete sequences, Indicates its first Each sampling point takes a value. This represents the number of sampling points in the sequence.

[0034] 2) Correlation coefficient: (3); in, This indicates the degree of linear correlation between the denoised signal and the clean EEG signal. For covariance operators; For variance operators; and These represent the variances of the two sequences, used to normalize the correlation.

[0035] 3) Signal-to-noise ratio: (4); in, Signal-to-noise ratio expressed in decibels; and These represent the pure EEG signal and the denoised sample signal at the _____th ... Amplitude at each sampling point; numerator term Represents the energy of the reference signal, denominator term This represents the residual energy after noise reduction.

[0036] In summary, RRMSE evaluates denoising performance from the perspective of error magnitude, CC reflects structural fidelity from the perspective of waveform consistency, and SNR measures the residual noise level from the perspective of energy ratio.

[0037] Constructing an EEG denoising model, such as... Figure 3 As shown. The EEG denoising model includes an EEG denoising branch, an artifact prediction branch, and an artifact representation interactive attention fusion and reconstruction module.

[0038] The EEG denoising branch includes a multi-scale adaptive enhancement module, a frequency-domain dynamic enhancement module, and a feature extraction module. The multi-scale adaptive enhancement module (ECMA) extracts features from the input signal at different scales and performs cascaded enhancement to obtain multi-scale adaptive enhancement features. The frequency-domain dynamic enhancement module (FDEM) jointly models the global frequency structure and local spectral distortion in the multi-scale adaptive enhancement features to obtain frequency-domain dynamic enhancement features. The feature extraction module extracts features from the frequency-domain dynamic enhancement features to obtain the denoised EEG features. The artifact prediction branch includes the multi-scale adaptive enhancement module and the feature extraction module; the artifact prediction branch outputs artifact prediction features. The artifact representation interactive attention fusion reconstruction module interacts with the EEG denoising features and artifact prediction features to reconstruct the final denoised EEG signal.

[0039] This application employs a unified modeling approach for EEG denoising across three levels: time-frequency feature representation, multi-scale feature enhancement, and branch-interaction fusion. It explicitly introduces frequency domain structural information and artifact representation constraints, progressively improving the model's ability to suppress complex artifacts and preserve effective EEG details. Compared to traditional EEG denoising methods, this application better balances signal fidelity and artifact removal rate, significantly enhancing the robustness and transferability of EEG signal decoding tasks. Through a multi-scale adaptive frequency domain interaction fusion method, it effectively removes artifacts that are difficult to handle with traditional methods, such as distortion artifacts or spectral drift artifacts, while preserving as many effective EEG components as possible, providing higher-quality input signals with clearer discriminative information for subsequent related tasks.

[0040] The multi-scale adaptive enhancement module is used to: first establish stable contextual constraints over a larger scope, and then complete local structural repair within a smaller scope, thereby improving the model's adaptability to various types of artifacts and the fidelity of the denoising results. The above-mentioned sample containing artifact-laden EEG signals is then processed as follows: Figure 4 The multi-scale adaptive enhancement module is shown. It includes a mapping unit, a three-level cascaded Local Adaptive Module (LAM), and a one-dimensional convolution and residual linking unit.

[0041] The mapping unit is used to extract features from the input signal at different scales, resulting in three feature groups at different scales. Each feature group includes main features and context features.

[0042] The mapping unit divides the input signal into principal features and context features. Let the input signal be... ,in For batch size, For the number of channels, For sequence length, Let be the set of real numbers. The mapping unit is... Convolution, ECMA first through Convolution completes channel mapping and expansion, and divides the features into three groups of main features and their corresponding context features along the channel dimension: (5); in, Indicates the first The input main features of each scale branch This represents the contextual features used to construct local adaptive parameters. This partitioning method allows each scale branch to maintain independent feature representation while establishing cross-scale connections through contextual propagation, providing conditions for subsequent progressive enhancement.

[0043] The three sets of main features and their corresponding contextual feature components enter a three-level cascaded local adaptive unit, which consists of three local adaptive layers (i.e., ...). Figure 4The first LAM, second LAM, and third LAM in the text represent Large LAM, Medium LAM, and Small LAM, respectively. Each local adaptive layer processes the feature set at the corresponding scale. The local adaptive layer is used for: fusing the main feature and context features at the same scale using local adaptive convolution to obtain local adaptive convolutional features; extracting features from the context features using channel-wise convolution to obtain channel-wise convolutional features; extracting features from the main feature using spatiotemporal convolution to obtain spatiotemporal convolutional features; concatenating the local adaptive convolutional features, channel-wise convolutional features, and spatiotemporal convolutional features to obtain local adaptive concatenated features; normalizing the local adaptive concatenated features to obtain the enhanced features at the current scale; passing the enhanced features at the current scale through a convolutional layer to obtain the enhanced context information at the current scale; before the next local adaptive layer processes the feature set at the next scale, concatenating the enhanced context information at the current scale with the context features in the feature set at the next scale to obtain the context concatenated features corresponding to the next scale; using the context concatenated features corresponding to the next scale and the main feature at the next scale as input to the next local adaptive layer; and concatenating the enhanced features at the current scale output by the three local adaptive layers to obtain multi-scale concatenated features.

[0044] like Figure 5 As shown, for any local adaptive layer, assuming its inputs are the main features and the corresponding context features, its local adaptive convolution (Local Adaptive Conv) can be expressed as: (6); in, This is a locally adaptive convolutional feature; Indicates the basic convolution kernel parameters; This represents the adaptive parameters obtained by context information modulation.

[0045] In position Output at It can be represented as: (7); in, The convolution parameters, which vary with time position, are obtained by modulating the context features. For the input feature map at location The value at; The size of the convolution kernel is denoted by . Because this modulation varies with location, the model is able to generate stronger suppression in strong pseudofilm segments, while preserving details as much as possible in relatively clean segments or segments containing key rhythmic information.

[0046] To balance feature representation capability and computational efficiency, the local adaptive layer does not rely solely on a single local adaptive convolution. Instead, it fuses the local adaptive convolution with the outputs of two regular convolutions (channel-wise convolution (DW Conv) and temporal convolution (Temporal Conv)) to obtain richer feature representations. This fusion can be expressed as: (8); (9); in, This is a local adaptive splicing feature; Spatiotemporal convolution features; For channel-wise convolutional features; This indicates channel concatenation (Concat); Enhanced features at the current scale; This indicates a normalization operation; To enhance the contextual information at the current scale, it is necessary to pass it on to the next scale.

[0047] In terms of multi-scale augmentation, ECMA employs a three-level cascaded structure to construct a progressive multi-scale learning process. Unlike parallel multi-scale approaches, cascaded connections enable the broader context acquired at the previous scale to be progressively transferred to the next scale, thus forming an augmentation path that is coarse-to-fine and from large to small. Its computational process can be represented as follows: (10); (11); (12); in, These are the enhanced features and enhanced context information output by the local adaptive layers of the first LAM, second LAM, and third LAM, respectively.

[0048] One-dimensional convolutional and residual linking units are used to fuse the input signals of the multi-scale concatenated features and the multi-scale adaptive enhancement module to obtain multi-scale adaptive enhancement features. After completing the three-level cascaded enhancement, ECMA concatenates the main outputs of each scale and passes them through one-dimensional convolutional and residual linking units (the convolutional layers in the one-dimensional convolutional and residual linking units are...). Convolution yields the final output: (13); in, This is a learnable channel scaling factor used to control the injection strength of the enhanced branches into the trunk features.

[0049] The ECMA output, after multi-scale adaptive enhancement, is input into the frequency domain dynamic enhancement module. This module jointly models the global frequency structure and local spectral distortion of the input signal, thereby providing a more stable and discriminative feature representation for subsequent multi-scale enhancement and branch interactions. For example... Figure 6 As shown, the frequency domain dynamic enhancement module includes a Fast Fourier Transform (FFT) unit, a splitting and splicing unit, a frequency position encoding unit, a frequency domain adaptive enhancement unit, and an Inverse Fast Fourier Transform (IFFT) unit.

[0050] The Fast Fourier Transform (FFT) unit maps multi-scale adaptive enhancement features from the time domain to the frequency domain, obtaining frequency domain features. Specifically, the FFT is used to map the input features from the time domain to the frequency domain. Let the time-domain features (multi-scale adaptive enhancement features) input to the FDEM module be... By mapping it to the complex space of the frequency domain using the Fast Fourier Transform, the complex form of the frequency domain features is obtained. : (14); in, Represents the Fast Fourier Transform operator; and To adaptively enhance the height and width of the feature map at multiple scales; Represents partial derivatives; The base is the natural number; The imaginary unit; Pi; This represents the position coordinates of the multi-scale adaptive enhancement feature in the temporal space; Indicates the corresponding frequency domain coordinates; For position Multi-scale adaptive enhancement features at the location.

[0051] The splitting and splicing unit is used to split the frequency domain features into real and imaginary parts and splice them in the channel dimension to obtain joint frequency domain features. Specifically, the frequency domain features are split into real and imaginary features, and the real and imaginary features are spliced ​​in the channel dimension to obtain joint frequency domain features.

[0052] Since frequency domain features are in complex form, directly performing subsequent convolution operations would be difficult to integrate with the real-value computation process in the backbone network. Therefore, frequency domain features are split into real and imaginary features: (15); in, Features of the real part; This is a feature of the imaginary part; and These represent taking the real part and taking the imaginary part, respectively.

[0053] The two are concatenated along the channel dimension to obtain the joint frequency domain feature. : (16); in, This indicates channel-dimensional splicing.

[0054] The frequency location coding unit is used to locally model the joint frequency domain features using depth convolution and inject them into the joint frequency domain features in the form of residuals to obtain enhanced frequency domain features.

[0055] After obtaining the joint frequency domain features, they are fed into the frequency location coding unit to enhance the network's ability to distinguish different frequency locations. Specifically, depthwise convolution is used to locally model the joint frequency domain features, and the model is injected into the joint frequency domain features as residuals to obtain the enhanced frequency domain features. : (17); in, Indicates a depthwise convolution operation; This refers to the deep convolutional features output by locally modeling the joint frequency domain features using deep convolution.

[0056] The frequency domain adaptive enhancement unit is used to: apply pointwise convolution mapping to the enhanced frequency domain features, and obtain the dynamic weight coefficients corresponding to each convolution kernel at each frequency domain coordinate of the enhanced frequency domain features through the Softmax function; for each frequency domain coordinate in the enhanced frequency domain features, the dynamic weight coefficients corresponding to each convolution kernel are weighted and summed with the output of the convolution layer to obtain the frequency domain modulation features at each frequency domain coordinate.

[0057] Building upon frequency location encoding, to enable the model to adaptively adjust the enhancement method based on the feature responses of different frequency regions, a frequency adaptive enhancement unit is further introduced into the module. Specifically, a pointwise convolution is applied to the enhanced frequency domain features (…). Figure 6 The PW Conv mapping in the PW Conv is used to obtain the frequency domain coordinates through the Softmax function. The dynamic weight coefficients corresponding to each convolution kernel can be calculated as follows: (18); in, Frequency domain coordinates The dynamic weight coefficients corresponding to each convolution kernel; This represents a pointwise convolution operation; Represents frequency domain coordinates The corresponding dynamic weight vector, Frequency domain coordinates The first, second and third The dynamic weight coefficients corresponding to each convolutional kernel; This indicates the number of convolutional kernel groups. Through this step, the network can adaptively generate the response weights of each convolutional kernel based on the local spectral features at different frequency locations.

[0058] Let frequency domain coordinates The frequency domain modulation characteristics at that point are Then it can be expressed as: (19); in, Represents the coordinates in the frequency domain First The dynamic weight coefficients of each convolutional kernel; Indicates the first The network can learn the convolution kernel parameters. The weight coefficients corresponding to different frequency positions are not the same, so the network can adaptively select a more suitable convolution response form based on the differences in local spectral characteristics.

[0059] The inverse fast Fourier transform (IFT) unit maps the frequency-domain modulation features at all frequency-domain coordinates from the frequency domain to the time domain, obtaining the frequency-domain dynamic enhancement features. After frequency-domain modulation, the IFT unit maps the features back to the time domain, obtaining the frequency-domain dynamic enhancement features. ;in, This represents the inverse fast Fourier transform operator; This is a frequency domain dynamic enhancement feature, i.e., an enhanced time domain representation.

[0060] The features after frequency adaptive enhancement are fed into the feature extraction module, which includes a first extraction unit, a convolutional layer, and a second extraction unit. Both the first and second extraction units include a batch normalization (BN) layer, a ReLU layer, and a regularization layer (i.e., a Drop layer) connected in sequence.

[0061] like Figure 7As shown, the artifact representation interactive attention fusion reconstruction module includes a branch interaction unit, an attention layer, a normalization unit, and a fusion reconstruction unit. This module aims to further improve the model's efficiency in utilizing artifact information and enhance the targeting of the reconstruction process, thereby achieving a more stable balance between artifact suppression and detail preservation. It includes a branch interaction unit and a fusion reconstruction unit. The branch interaction unit enables the EEG denoising branch and the artifact prediction branch to perform joint modeling in the same feature space. During the recovery process, the EEG denoising branch can explicitly perceive artifact-related patterns, thus more effectively preserving valid EEG components. The artifact prediction branch further highlights interference-related structural representations, providing clearer artifact cues for subsequent reconstruction. The fusion reconstruction unit unifies and integrates different recovery paths at the signal level.

[0062] The branch interaction unit is used to: expand the dimensions of the EEG denoising features and artifact prediction features to obtain expanded EEG denoising features and expanded artifact prediction features; concatenate the expanded EEG denoising features and expanded artifact prediction features, and obtain a joint interaction representation through convolutional mapping, normalization and nonlinear activation; and use the joint interaction representation to modulate the EEG denoising features and artifact prediction features element-wise to obtain updated EEG denoising features and updated artifact prediction features.

[0063] EEG denoising features and artifact prediction features first enter the branch interaction unit. Let the EEG denoising features output by the EEG denoising branch be represented as follows: The artifact prediction features output by the artifact prediction branch are represented as follows: To establish a correlation between the two types of features in a unified space, the two feature paths are first expanded in dimension, and then concatenated on the newly added dimension. Subsequently, convolutional mapping, normalization, and non-linear activation are applied. Figure 7 The ELU in the model obtains a joint interaction representation, namely: (20); in, For joint interactive representation; This indicates a dimension expansion operation; Indicates a splicing operation; Represents a convolutional mapping; Indicates batch normalization; This represents a nonlinear activation function. After the above processing, the EEG denoising branch and the artifact prediction branch complete joint modeling in the same feature space, resulting in interactive features that simultaneously contain effective EEG information and artifact constraint information.

[0064] After obtaining the joint interaction representation, this feature is further used to modulate the two branches element by element to obtain the updated EEG denoising features. and updated artifact prediction features : (twenty one); in, This indicates element-wise multiplication.

[0065] The attention layer is used to perform attention operations on the updated EEG denoising features and the updated artifact prediction features, respectively, to obtain EEG attention features and artifact attention features.

[0066] The normalization unit is used to normalize the EEG attention features and artifact attention features respectively, resulting in normalized EEG features and normalized artifact features. The normalization unit consists of two normalization units, with the last normalization unit connected sequentially to a Drop layer (regularization layer) and a Fully Connected (FC) layer.

[0067] The fusion reconstruction unit is used to: generate a coarse recovery result with artifact removal based on the input signal of the EEG denoising model and the normalized artifact features; generate a fusion mask based on the input signal of the EEG denoising model, the normalized EEG features, and the coarse recovery result with artifact removal; and use the fusion mask as a weighting coefficient to perform gated weighting on the normalized EEG features and the coarse recovery result with artifact removal to obtain the final denoised EEG signal.

[0068] Let the target contain artifact-laden EEG signals as The normalized EEG characteristics are The normalized artifact features are First, an auxiliary recovery path based on artifact cancellation is constructed using the normalized artifact features: (twenty two); in, This represents the coarse recovery result after artifact removal, i.e., the coarse recovery result obtained after removing predicted artifacts from the input containing artifacts. This pathway usually has a more direct inhibitory effect on segments with strong artifacts, while the normalized EEG features... It has a greater advantage in terms of overall waveform consistency and effective rhythm maintenance.

[0069] To combine the advantages of both recovery paths, the fusion reconstruction unit first concatenates the input features and then generates a fusion mask through feature enhancement and convolutional mapping. The formula for calculating the fusion mask is as follows: (twenty three); in, Indicates the fusion mask; This represents the fusion weight generation function; Indicates the convolution operation; This represents a multi-scale adaptive enhancement mapping; This represents feature concatenation. Through this process, the module can adaptively evaluate the importance of different recovery paths based on the current features, thereby generating more reasonable fusion coefficients.

[0070] Finally, the denoised signal of the sample is obtained using a gated weighting method: (twenty four); in, Denoise the sample signal.

[0071] The loss function value is calculated based on the denoised signal and the clean EEG signal of the sample, and the model parameters are optimized and updated.

[0072] During the training phase, experimental samples were used to train the input EEG denoising model end-to-end. A multi-scale adaptive enhancement module captured information from receptive fields of different sizes, performing local detail restoration and overall trend de-identification. A frequency-domain dynamic enhancement module, through frequency position encoding and specific location enhancement, further strengthened the local connections between different frequency positions and their neighborhoods while preserving the original overall spectral structure, allowing for a more complete expression of differences between closely spaced frequency components. An artifact representation interaction-attention fusion reconstruction module, through feature interaction, attention enhancement, and adaptive fusion at the signal layer between the artifact prediction branch and the EEG denoising branch, enabled artifact representations to explicitly participate in the EEG recovery process, achieving a more stable balance between artifact suppression and detail preservation. The network parameters were optimized using a multi-task loss function, and the best-performing offline training model was saved as the final trained EEG denoising model.

[0073] In the inference phase: the trained EEG denoising model obtained in the training phase is used to perform real-time inference on the EEG signal containing artifacts to be denoised. It goes through frequency domain dynamic enhancement, multi-scale adaptive enhancement, bi-branch interactive constraint and adaptive fusion reconstruction in sequence, and outputs the final denoised EEG signal.

[0074] The model quality is verified below: In this embodiment, the EEG denoising model of this application is compared with a variety of typical comparative models, including RNN, 1D-ResCNN, Novel CNN, DeepSeparator, DARTS and EEGIFNet. The overall denoising performance of different methods on the test set is shown in Table 1.

[0075] Table 1 Overall denoising performance of different methods on the test set

[0076] As shown in Table 1, the proposed method achieves optimal results in all three metrics: CC, RRMSE, and SNR. Specifically, CC reaches 0.955, RRMSE decreases to 0.303, and SNR increases to 11.875, indicating that the method demonstrates superior overall performance in improving signal correlation, reducing reconstruction errors, and enhancing artifact suppression. Compared to other comparative methods, the proposed method does not only excel in one single metric but maintains superior performance across all three metrics, demonstrating a more reasonable balance between artifact suppression and effective preservation of EEG details.

[0077] The results of the comparison methods show that while some methods perform well on one metric, they have significant shortcomings in other metrics. For example, some methods achieve low RRMSE, but the corresponding improvements in CC and SNR are limited, indicating that although they reduce numerical errors, their comprehensive processing capabilities for waveform structure and noise suppression are still insufficient. Other methods achieve relatively high SNR, but low CC, suggesting that while enhancing artifact removal capabilities, they also negatively impact the effective EEG components. In contrast, the method proposed in this application demonstrates a more balanced performance across all three metrics, indicating stronger overall recovery capabilities.

[0078] The overall results show that the proposed method exhibits greater stability across the three metrics. RRMSE reflects the relative error magnitude between the output and the clean EEG signal; a smaller value indicates lower residual error. CC measures the consistency between the output waveform and the reference waveform; a value closer to 1 indicates better structural fidelity. SNR characterizes the ratio of reference signal energy to residual error energy; a larger value indicates more effective noise suppression. Considering the trends of these three metrics, the proposed method maintains high waveform correlation while reducing residual error, demonstrating a balanced effect between artifact suppression and detail preservation.

[0079] To further analyze the model's adaptability to different artifact types, this embodiment statistically analyzes the denoising results of each method under EMG, ECG, and EOG artifact conditions, as shown in Table 2. Since different artifacts exhibit significant differences in temporal morphology and frequency domain distribution, their requirements for the denoising model also differ. EMG artifacts typically manifest as broadband high-frequency burst interference, easily destroying the local texture and short-term details of the signal; EOG artifacts mainly exhibit low-frequency drift and gradual changes, having a greater impact on baseline stability; ECG artifacts have strong periodicity, and their frequency band distribution overlaps with some effective EEG components, thus making them more prone to artifact residue or false suppression of effective components. Therefore, the differences in denoising performance among different artifact types can directly reflect the model's adaptability to different degradation patterns.

[0080] Table 2. Comparison of denoising performance of different methods under different artifact types.

[0081] As shown in Table 2, the method proposed in this application achieved superior experimental results under all three types of artifact conditions. Under EMG conditions, the proposed method achieved CC, RRMSE, and SNR of 0.958, 0.299, and 10.618, respectively, all superior to the other comparative methods, indicating that the method has a strong ability to suppress high-frequency burst interference while effectively preserving local waveform details. Under ECG conditions, the proposed method achieved results of 0.979, 0.207, and 14.789, respectively, again showing the best performance in all three indicators, indicating strong recovery ability even when periodic artifacts and effective EEG components are superimposed. Under EOG conditions, the proposed method achieved results of 0.972, 0.229, and 13.786, respectively, still superior to all comparative methods, indicating that the method also has a good suppression effect on low-frequency drift and slowly varying perturbations. The results under the three types of artifacts show that the proposed method does not only excel in one type of artifact, but maintains a relatively stable performance advantage under different artifact conditions, demonstrating strong cross-artifact adaptability.

[0082] Further comparison of the baseline methods reveals significant differences in performance fluctuations across the three types of artifacts. For example, DARTS achieves an SNR of 8.865 under EOG conditions, demonstrating some low-frequency artifact suppression capability, but it still lags behind the proposed method under EMG and ECG conditions. Novel CNN achieves a CC of 0.921 and an RRMSE of 0.398 under ECG conditions, showing relatively stable overall performance, but it does not surpass the proposed method under any of the three artifact types. In contrast, FCNN, SCNN, and RNN methods exhibit significant performance fluctuations under different artifact types, indicating greater sensitivity to changes in artifact type. The proposed method, in comparison, shows smaller fluctuations in its metrics across the three artifact types, demonstrating not only better denoising capabilities but also stronger stability when facing different degradation patterns.

[0083] Based on Table 2, to more intuitively reflect the overall performance of each method under different artifact conditions, the experimental results corresponding to the three types of artifacts were further averaged, resulting in Table 3. Unlike Table 2, which focuses on analyzing the specific differences between different artifact types, Table 3 mainly reflects the average performance of the model under cross-artifact conditions, thus providing a more comprehensive evaluation of the overall denoising capability of the methods.

[0084] Table 3. Comparison of average denoising performance of different methods under three types of artifacts.

[0085] As shown in Table 3, the proposed method maintains optimal performance under the average of the three types of artifacts, with average CC, RRMSE, and SNR reaching 0.967, 0.245, and 13.064, respectively. Compared with the Novel CNN method, the average CC is improved by 0.057, the average RRMSE is reduced by 0.144, and the average SNR is improved by 2.884; compared with the suboptimal method EEGIFNet, the average CC is improved by 0.019, the average RRMSE is improved by 0.046, and the average SNR is improved by 1.391. These results indicate that the performance advantage of the proposed method does not stem from a specific adaptation to a particular type of artifact, but rather from its strong recovery ability under different artifact conditions. Furthermore, the higher average CC and lower average RRMSE also demonstrate that while enhancing artifact suppression capabilities, the model can still maintain good waveform consistency between the output signal and the clean EEG signal.

[0086] As can be seen from Tables 2 and 3, the method proposed in this application not only achieves good denoising results under the three typical artifact types of EMG, ECG, and EOG, but also maintains a significant overall advantage under the average meaning of the three artifact types. This indicates that the method can adapt well to the degradation characteristics under different artifact types, exhibits stronger robustness and generalization ability under cross-artifact conditions, and provides a foundation for subsequent performance analysis under different pollution intensities.

[0087] Figure 8 The denoising performance of different models under various artifacts is presented. Overall, as the signal-to-noise ratio of the input signal decreases and the degree of contamination gradually increases, the performance of each method declines to varying degrees, which is consistent with the general pattern of EEG denoising tasks. However, compared with methods such as FCNN, SCNN, 1D-ResCNN, RNN, Novel CNN, DeepSeparator, and EEGIFNet, the method in this application maintains a more stable trend across different contamination intensity ranges, demonstrating stronger robustness.

[0088] Depend on Figure 8 As can be seen in (a) of the paper, under EMG artifact interference conditions, with increasing contamination, the CC of all methods generally decreases, RRMSE gradually increases, and SNR decreases. However, the method in this application maintains high CC and SNR throughout the entire signal-to-noise ratio range, while keeping RRMSE at a low level, indicating that it can effectively balance noise suppression and effective EEG information preservation under EMG contamination conditions. Figure 8 As can be seen from (b) above, the advantages of the method in this application are more obvious under the condition of electrooculography artifacts, especially in the low SNR range, where it can still maintain high correlation and low reconstruction error, indicating that it has good recovery ability for strong amplitude perturbations caused by electrooculography. Figure 8 As shown in (c), under ECG artifact conditions, the method of this application also exhibits good overall performance. With changes in contamination level, the fluctuations of its various indicators are relatively small, and no significant performance drop occurs, indicating that the model has good adaptability under different types of artifacts. Compared with other models, some methods, although achieving relatively good results within a certain indicator or contamination range, generally suffer from a rapid performance decline with increasing contamination, especially under low SNR conditions, where residual noise, waveform distortion, or loss of effective information are common. In contrast, the method of this application maintains superior recovery performance under different contamination intensities, indicating that it can better adjust the feature extraction and signal reconstruction process according to changes in contamination level, achieving a better trade-off between strong noise suppression and effective signal fidelity, thus demonstrating stronger stability and generalization ability.

[0089] To further and more intuitively verify the EEG denoising effect of the proposed method under complex artifact conditions, this application selected representative test samples and compared the denoising results under signal-to-noise ratios of -5 dB, 0 dB, and 5 dB. Figure 9 As shown. EEG signals contaminated by mixing artifacts (i.e., Figure 9 Noisy EEG signals exhibit significant amplitude fluctuations, local spike interference, and waveform distortion, especially under low signal-to-noise ratio (SNR) conditions, where effective waveform patterns in the original EEG are more easily submerged by noise. After processing using the method described in this application, the overall waveform trend of the denoised EEG signal maintains a high degree of consistency with the clean EEG signal, key peak and trough positions are well recovered, and abnormal large fluctuations are significantly suppressed. As the SNR increases from -5 dB to 0 dB and 5 dB, the fit between the denoised EEG signal waveform and the clean EEG signal further improves, indicating that the method described in this application has good robustness under different noise intensities. In the time domain, the method described in this application can recover the main waveform trend of the original EEG, ensuring that the output signal is consistent with the clean reference signal at key peak and trough positions; in the time-frequency domain, it can effectively suppress abnormal energy accumulation, reduce abnormal spectral diffusion caused by artifacts, and preserve the effective frequency band structure related to EEG rhythms relatively completely. The results demonstrate that the proposed method not only has advantages in quantitative indicators, but also exhibits better recovery quality in terms of visual interpretability, further verifying the effectiveness of the proposed model in suppressing complex artifacts and maintaining signal authenticity.

[0090] The relevant EEG preprocessing methods have the following main shortcomings: (1) The temporal reconstruction path is singular, and it is difficult to take into account both artifact residue and detail damage. Most existing methods rely on a single reconstruction path to directly recover the signal containing artifacts. They lack explicit modeling and constraints on the artifact representation, which easily leads to artifact residue or excessive smoothing of effective EEG components, thus destroying the temporal waveform structure and frequency rhythm distribution of the original signal; (2) Insufficient frequency domain representation capability makes it difficult to characterize spectral structure distortion. Existing methods mainly rely on temporal convolution for feature extraction, which makes it difficult to fully characterize spectral structure distortion caused by artifacts. They are also not adaptable to non-stationary artifacts, resulting in the suppression of some effective EEG rhythms during preprocessing. (3) Insufficient ability to maintain spatial structure, which disrupts the topological relationship of EEG signals. Traditional methods do not fully consider the spatial correlation between different lead electrodes. Simply processing each channel independently can easily destroy the spatial topological structure of EEG signals, resulting in the network being unable to effectively utilize the collaborative discrimination information between channels; (4) Limited generalization ability across subjects, making it difficult to adapt to complex open scenarios. Most methods perform well under closed laboratory conditions, but their performance degrades significantly when faced with open scenarios with mixed interference from multiple sources of artifacts. Their generalization ability across subjects and datasets is limited, making it difficult to meet the robustness requirements in actual clinical applications.

[0091] To overcome the aforementioned shortcomings, this application proposes a method for EEG signal denoising based on cascaded multi-scale adaptive frequency domain interactive fusion. This method first utilizes a multi-scale adaptive enhancement module to perform artifact suppression and local structure repair at different scales using a three-level progressive local adaptive convolution. Then, a frequency domain dynamic enhancement module explicitly maps the time-domain signal to the frequency domain space, extracting global frequency structure features and performing dynamic enhancement. Next, a branch interaction unit establishes an interactive constraint mechanism between the EEG denoising branch and the artifact prediction branch, enabling explicit guidance of the EEG recovery process by artifact representation. Finally, a fusion reconstruction unit adaptively weights and fuses different recovery paths to output the final denoised EEG signal.

[0092] The beneficial effects of this application are mainly reflected in: 1. Spectral fidelity and structure preservation: The time-domain signal is explicitly mapped to the frequency domain space through the frequency domain dynamic enhancement module. The closed-loop processing link of Fourier transform real-virtual separation and frequency dynamic enhancement is used to fully characterize the global spectral structure changes and local spectral distortions caused by artifacts. While effectively suppressing artifacts, the frequency domain rhythm distribution and time domain waveform structure of the original EEG signal are preserved. 2. Multi-scale progressive enhancement: Through the three-level cascaded structure of the multi-scale adaptive enhancement module, progressive multi-scale feature enhancement from large to small and from coarse to fine is achieved. It models long-term degradation trends at large scales and repairs local structures at small scales, effectively balancing global suppression and local fidelity. 3. Two-branch interaction constraint: By establishing a feature interaction mechanism between the EEG denoising branch and the artifact prediction branch through branch interaction units, artifact representation can be explicitly involved in the EEG recovery process, reducing the leakage of artifact information to the recovery path and enhancing the network's ability to distinguish between effective EEG components and artifact components. 4. Adaptive Fusion Reconstruction: The fusion reconstruction unit adaptively selects a more reliable recovery path based on the degree of contamination in different time segments, achieving a more stable balance between artifact suppression intensity and waveform fidelity; 5. Strong generalization ability and robustness: The method achieves superior performance to existing methods under various artifact conditions such as electromyography, electrocardiography, and electrooculography, and exhibits strong robustness under different contamination intensities, verifying the adaptability of the method to complex open scenarios.

[0093] This application also provides an application scenario in which the above-mentioned method for denoising motor imagery EEG signals is applied. Specifically, the method for denoising motor imagery EEG signals provided in this embodiment can be applied in a rehabilitation training scenario. The rehabilitation training scenario includes a content production stage, an EEG denoising link, and a rehabilitation training stage. The target EEG signal containing artifacts enters the EEG denoising link from the content production stage, and through human-machine collaboration, obtains the corresponding final denoised EEG signal, which then enters the downstream rehabilitation training stage. The method for denoising motor imagery EEG signals provided in this embodiment belongs to the machine labeling stage in the EEG denoising link. Specifically, in the EEG denoising process targeting the target EEG signal containing artifacts, the target EEG signal containing artifacts can be input into a trained EEG denoising model to obtain the final denoised EEG signal. That is, the target EEG signal containing artifacts is labeled based on a collaborative method of machine labeling and human labeling, i.e., corresponding denoised EEG signal tags are added to the target EEG signal containing artifacts.

[0094] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 10As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores EEG signal denoising data. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a method for denoising motor imagery EEG signals.

[0095] Figure 10 The structures shown are merely block diagrams of some structures related to the present application and do not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements. In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0096] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0097] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0098] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with relevant regulations and be authorized by the owner of the corresponding device.

[0099] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0100] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0101] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0102] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for denoising motor imagery electroencephalogram signals, characterized in that, The method for denoising motor imagery EEG signals includes: Acquire target EEG signals containing artifacts; The target EEG signal containing artifacts is input into the trained EEG denoising model to obtain the final denoised EEG signal. The EEG denoising model includes an EEG denoising branch, an artifact prediction branch, and an artifact representation interactive attention fusion and reconstruction module. The EEG denoising branch includes a multi-scale adaptive enhancement module, a frequency domain dynamic enhancement module, and a feature extraction module. The multi-scale adaptive enhancement module is used to extract features from the input signal at different scales and perform cascaded enhancement to obtain multi-scale adaptive enhanced features. The frequency domain dynamic enhancement module is used to: map the multi-scale adaptive enhanced features from the time domain to the frequency domain, decompose the frequency domain features into real and imaginary parts, and concatenate them in the channel dimension to obtain joint frequency domain features; perform local modeling on the joint frequency domain features, and fuse them in the form of residuals to obtain the enhanced frequency domain features. ; in, Indicates a depthwise convolution operation; The deep convolutional features are output by locally modeling the joint frequency domain features using deep convolution. For the enhanced frequency domain features; The system combines frequency domain features. The enhanced frequency domain features are then mapped through pointwise convolution and the Softmax function to obtain the dynamic weight coefficients of each convolution kernel at each frequency domain coordinate. These dynamic weight coefficients are then weighted and summed with the output of the convolutional layer to obtain the frequency domain modulation features at each frequency domain coordinate. The frequency domain modulation features at all frequency domain coordinates are mapped from the frequency domain to the time domain to obtain the frequency domain dynamic enhancement features. A feature extraction module is used to extract features from the frequency domain dynamic enhancement features to obtain EEG denoising features. The artifact prediction branch outputs artifact prediction features. The artifact representation interactive attention fusion reconstruction module is used to interactively constrain the EEG denoising features and artifact prediction features to reconstruct the final denoised EEG signal.

2. The method for denoising motor imagery EEG signals according to claim 1, characterized in that, The multi-scale adaptive enhancement module includes a mapping unit, a three-level cascaded local adaptive unit, and a one-dimensional convolution and residual linking unit; The mapping unit is used to extract features from the input signal at different scales, resulting in three feature groups at different scales. Each feature group includes main features and context features. The three-level cascaded local adaptive unit comprises three local adaptive layers. Each local adaptive layer processes feature groups at a corresponding scale. The local adaptive layers are used for: fusing the main features and context features at the same scale using local adaptive convolution to obtain local adaptive convolutional features; extracting features from the context features using channel-wise convolution to obtain channel-wise convolutional features; extracting features from the main features using spatiotemporal convolution to obtain spatiotemporal convolutional features; concatenating the local adaptive convolutional features, channel-wise convolutional features, and spatiotemporal convolutional features to obtain local adaptive concatenated features; and normalizing the local adaptive concatenated features to obtain the enhanced features at the current scale. The augmented features at the current scale are passed through a convolutional layer to obtain the augmented context information at the current scale. Before processing the feature group of the next scale in the next local adaptive layer, the enhanced context information of the current scale is concatenated with the context features in the feature group of the next scale to obtain the context concatenated features corresponding to the next scale. The context concatenation features corresponding to the next scale and the main features of the next scale are used as inputs to the next local adaptive layer; the enhanced features of the current scale output by the three local adaptive layers are concatenated to obtain multi-scale concatenated features; The one-dimensional convolution and residual linking unit is used to process the multi-scale splicing features using one-dimensional convolution, and then injects the multi-scale splicing features processed by one-dimensional convolution into the input signal of the multi-scale adaptive enhancement module in the form of residuals, so as to obtain the multi-scale adaptive enhancement features.

3. The method for denoising motor imagery EEG signals according to claim 1, characterized in that, The artifact representation interaction attention fusion reconstruction module includes a branch interaction unit, an attention layer, a normalization unit, and a fusion reconstruction unit; The branch interaction unit is used to: expand the dimensions of EEG denoising features and artifact prediction features to obtain expanded EEG denoising features and expanded artifact prediction features. The extended EEG denoising features and extended artifact prediction features are concatenated and then subjected to convolutional mapping, normalization and nonlinear activation to obtain a joint interactive representation. The joint interactive representation is then used to modulate the EEG denoising features and artifact prediction features element-wise to obtain updated EEG denoising features and updated artifact prediction features. The attention layer is used to perform attention operations on the updated EEG denoising features and the updated artifact prediction features, respectively, to obtain EEG attention features and artifact attention features. The normalization unit is used to normalize the EEG attention features and artifact attention features respectively, so as to obtain the normalized EEG features and the normalized artifact features. The fusion reconstruction unit is used to: generate a coarse recovery result with artifact removal based on the input signal of the EEG denoising model and the normalized artifact features; generate a fusion mask based on the input signal of the EEG denoising model, the normalized EEG features, and the coarse recovery result with artifact removal; and use the fusion mask as a weighting coefficient to perform gated weighting on the normalized EEG features and the coarse recovery result with artifact removal to obtain the final denoised EEG signal.

4. The method for denoising motor imagery EEG signals according to claim 3, characterized in that, The formula for calculating the fusion mask is as follows: ; in, Indicates the fusion mask; This represents the fusion weight generation function; Indicates the convolution operation; This represents a multi-scale adaptive enhancement mapping; Indicates feature splicing; The images show the input signal of the EEG denoising model, the normalized EEG features, and the coarse recovery results after artifact removal, respectively.

5. The method for denoising motor imagery EEG signals according to claim 1, characterized in that, Before inputting the target artifact-laden EEG signal into the trained EEG denoising model, the method further includes: Obtain the dataset; the dataset includes several samples of EEG signals with artifacts and the clean EEG signal corresponding to each sample of EEG signals with artifacts. The artifact-containing EEG signals of the sample are input into the EEG denoising model to obtain the sample denoised signal; The loss function value is calculated based on the denoised signal and the clean EEG signal of the sample; Determine whether the iteration stopping condition has been met. If not, update the model parameters of the EEG denoising model using the loss function value and return to the step of "inputting the sample EEG signal containing artifacts into the EEG denoising model". If yes, stop the iteration and obtain the trained EEG denoising model.

6. The method for denoising motor imagery EEG signals according to claim 5, characterized in that, Obtaining the dataset specifically includes: Acquire several pure EEG signals and artifact signals; the artifact signals include electrooculogram (EOG) signals, electromyogram (EMG) signals, and electrocardiogram (ECG) signals. Each pure EEG signal is mixed with at least one artifact signal to obtain a sample containing artifact EEG signals.

7. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that the processor executes the computer program to implement the method for denoising motor imagery EEG signals according to any one of claims 1-6.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for denoising motor imagery EEG signals as described in any one of claims 1-6.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the method for denoising motor imagery EEG signals as described in any one of claims 1-6.

Citation Information

Patent Citations

  • EEG Signal Mixed Noise Processing Method, Equipment and Storage Medium

    AU2020103949A4

  • Double-branch fusion deep learning electroencephalogram noise reduction method and device and medium

    CN115836867A