Electroencephalogram signal processing method, device and storage medium

By constructing a shared feature extraction module and a physiological frequency band denoising module, combined with an adaptive denoising optimization mechanism guided by analysis tasks, the problem of artifact interference in EEG signals was solved, achieving better artifact removal and analysis task performance.

CN122286263APending Publication Date: 2026-06-26BEIJING UNIV OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING UNIV OF TECH
Filing Date
2026-04-23
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

EEG signals are susceptible to interference from physiological artifacts such as electrooculography, electromyography, and electrocardiography. Existing technologies tend to suppress or distort key neural patterns during the noise reduction process, and the analysis results cannot provide feedback to guide artifact removal, resulting in poor robustness and generalization.

Method used

A shared feature extraction module, a physiological frequency band denoising module, and an analysis task processing module are constructed. Through an adaptive denoising optimization mechanism guided by the analysis task, a joint loss function is constructed for end-to-end training to optimize module parameters and achieve mutual reinforcement between artifact removal and analysis tasks.

Benefits of technology

It achieves better artifact removal and improved analysis task performance, solves the problems of error propagation and feature loss, and is suitable for EEG analysis tasks such as emotion recognition, epilepsy detection, and sleep classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122286263A_ABST
    Figure CN122286263A_ABST
Patent Text Reader

Abstract

This invention relates to the field of electroencephalogram (EEG) signal processing, and discloses an EEG signal processing method, device, and storage medium. The method includes: extracting features from the original EEG signal containing artifacts using a shared feature extraction module; then denoising the extracted shared latent features using a physiological frequency band denoising module to obtain a denoised EEG signal; processing the denoised EEG signal using an analysis task processing module to obtain an initial model composed of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module; performing end-to-end training of the initial model using a joint loss function constructed through an analysis task-guided adaptive denoising optimization mechanism, updating the module parameters of each module, and obtaining a converged post-processing model; finally, inputting the artifact-containing EEG signal into the processing model to obtain the denoised EEG signal and analysis prediction results. The method provided by this technical solution can achieve better artifact removal effects and analysis task performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electroencephalogram (EEG) signal processing, and more particularly to an EEG signal processing method, device, and storage medium. Background Technology

[0002] Electroencephalography (EEG), with its high temporal resolution, non-invasiveness, and ability to directly reflect neural activity, has become a fundamental technique in neural engineering for various analytical tasks (such as emotion recognition, epilepsy detection, and sleep classification). However, EEG signals are highly susceptible to interference from physiological artifacts such as electrooculography (EOG), electromyography (EMG), and electrocardiography (ECG). These artifacts overlap with the spectral and temporal characteristics of neural activity relevant to the analytical task, severely degrading the quality of the EEG signal and consequently affecting the performance and reliability of the analytical task.

[0003] In EEG analysis tasks, traditional machine learning methods have long dominated. These methods follow a two-stage process combining manual feature engineering and model classification. They require manually constructing a feature space from the time, frequency, or time-frequency domains of EEG signals, and then using classic classification models to complete the task. Their performance is highly dependent on the quality of the hand-designed features; if the features cannot fully capture task-related neural patterns, the processing effect will significantly decrease. In contrast, the performance of deep learning-based EEG signal analysis models heavily depends on the quality of the input signal. However, EEG signals are highly susceptible to interference from physiological artifacts such as electrooculography (EOG), electromyography (EMG), and electrocardiography (ECG). Current processing methods often rely on filtering techniques to suppress physiological artifacts or on reference channels or manual artifact annotation. However, this approach inevitably discards effective neural information overlapping with the artifact spectrum or makes real-time online adaptation difficult.

[0004] In existing technologies, EEG artifact removal and analysis tasks typically involve first removing artifacts using denoising methods, and then inputting the denoised EEG signals into the analysis task model. This approach has two main problems: First, the artifact removal process aims to preserve the fidelity of general signals, which can easily suppress or distort subtle neural patterns that are critical to the analysis task during the denoising process.

[0005] Secondly, the results of the analysis task cannot provide feedback to guide the artifact removal process, leading to error propagation and feature loss. As a result, the model has poor robustness and generalization in real noisy scenarios. Summary of the Invention

[0006] This invention provides a method, device, and storage medium for processing electroencephalogram (EEG) signals to solve at least one of the above-mentioned problems.

[0007] In a first aspect, embodiments of the present invention provide a method for processing electroencephalogram (EEG) signals, comprising: acquiring an original EEG signal containing artifacts; firstly extracting features from the original EEG signal using a pre-constructed shared feature extraction module, and then denoising the extracted shared latent features using a pre-constructed physiological frequency band denoising module to obtain a denoised EEG signal; processing the denoised EEG signal using a pre-constructed analysis task processing module to obtain an initial model composed of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module; constructing a joint loss function through an analysis task-guided adaptive denoising optimization mechanism to perform end-to-end training on the initial model to update the module parameters of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module, thereby obtaining a converged processing model; and inputting the EEG signal containing artifacts to be processed into the processing model to obtain the denoised EEG signal and the corresponding analysis and prediction results.

[0008] The EEG signal processing method provided in this embodiment of the invention guides artifact removal optimization by analyzing task results. Artifact removal can also provide a high-quality signal basis for the analysis task, realizing mutual reinforcement between the two tasks. This solves the problems of error propagation and feature loss in traditional cascade methods, achieving better artifact removal results and analysis task performance.

[0009] Optionally, the shared feature extraction module is constructed through the following steps: constructing a first convolutional layer, a first batch of normalized layers, and a first GELU activation function; constructing a second convolutional layer, a second batch of normalized layers, and a second GELU activation function; based on the first convolutional layer, the first batch of normalized layers, the first GELU activation function, the second convolutional layer, the second batch of normalized layers, and the second GELU activation function, jointly extracting features by convolutional channels and the time dimension while preserving the coarse temporal structure of the signal, thus obtaining the shared feature extraction backbone network to construct the shared feature extraction module.

[0010] Optionally, the physiological frequency band denoising module is constructed through the following steps: applying a convolutional projection layer to the shared latent features for projection processing to refine the local temporal patterns of the shared latent features, resulting in processed shared latent features; introducing a physiological frequency band perceptual neural oscillation encoder to incorporate the prior EEG physiological frequency into the position encoding, constructing a position encoding matrix; modulating the position encoding matrix based on pre-acquired learnable modulation parameters, and combining the processed shared latent features with the modulated position encoding matrix after obtaining the modulated position encoding matrix to obtain the encoding representation formula; inputting the encoding representation formula into a Transformer encoder for long-range time dependency modeling to obtain denoised latent features; optimizing the denoised latent features based on the channel gate mechanism, and then reconstructing the denoised latent features back into the signal space through an encoder composed of transposed convolutional layers to obtain the reconstructed signal to construct the physiological frequency band denoising module.

[0011] Optionally, the steps of performing feature extraction and denoising on the original EEG signal through a pre-built shared feature extraction module and a physiological frequency band denoising module to obtain the denoised EEG signal include: performing two-layer feature extraction on the original EEG signal containing artifacts through the shared feature extraction module to obtain shared latent features; and performing residual superposition of the reconstructed signal and the original input signal of the original EEG signal containing artifacts to obtain the denoised EEG signal.

[0012] Optionally, the encoding representation formula is: ; in, For raw EEG signals containing artifacts, and For learnable modulation parameters, This is the position encoding matrix; The denoised EEG signal is calculated based on the following formula: ; in, For the noise-reduced EEG signal, Denoising path for Convolution-Transformer To rebuild the decoder, To share latent features, The EEG signal contains artifacts.

[0013] Optionally, the analysis task processing module is constructed through the following steps: applying a convolutional projection layer to the denoised EEG signal for projection processing to refine the local temporal pattern of the denoised EEG signal, thereby obtaining the processed denoised EEG signal; by introducing a spatiotemporal hierarchical attention fusion mechanism, performing time-dependent modeling, adaptive channel recalibration, and spatiotemporal cross-attention fusion sequentially on the processed denoised EEG signal, thereby obtaining temporal features, channel calibration features, and spatiotemporal fusion features; after global average pooling of the spatiotemporal fusion features, inputting them into a lightweight task processing head composed of a nonlinear projection layer, Dropout regularization, and a linear decision layer, classifying the spatiotemporal fusion features to obtain the analysis task prediction results, thereby constructing the analysis task processing module.

[0014] Optionally, the temporal features, channel calibration features, and spatiotemporal fusion features are calculated based on the following formula: ; ; ; in, For time characteristics, For channel calibration features, As a feature of spatiotemporal fusion, For the location coding matrix constructed based on EEG physiological frequencies, For linear rectified functions, For the noise-reduced EEG signal, For global average pooling, Activate Sigmoid For Hadama accumulation, For trainable projection matrices, For spatiotemporal cross-attention functions, For learnable residual scaling parameters, , For time-domain query tensors, For channel-aware key-value tensors.

[0015] Optionally, the initial model is constructed based on the following steps: the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module are connected sequentially, wherein the output of the shared feature extraction module is connected to the input of the physiological frequency band denoising module, and the output of the physiological frequency band denoising module is connected to the input of the analysis task processing module; the input of the shared feature extraction module is used as the input of the model, and the output of the analysis task processing module is used as the output of the model to output the prediction results of the analysis task, thereby constructing the initial model.

[0016] Optionally, the joint loss function is constructed based on the following steps: obtaining clean EEG signals, corresponding analysis task labels, and the number of analysis task categories from the raw EEG signals containing artifacts; calculating the weighted cross-entropy analysis task loss parameter based on the analysis task prediction results of the initial model, the analysis task labels, and the pre-acquired category weights; calculating the prediction distribution entropy based on the prediction probability distribution of the analysis task prediction results; calculating the sample confidence score using the prediction distribution entropy and the logarithm of the number of analysis task categories; calculating the mean square error between the denoised EEG signal and the clean EEG signal, multiplying the mean square error by the sample confidence score as a weight value to obtain the root mean square denoising loss parameter modulated based on the sample confidence score; and calculating the weighted sum of the analysis task loss parameter and the root mean square denoising loss parameter based on the pre-acquired loss weight coefficients to construct the joint loss function.

[0017] Optionally, the task loss parameters are obtained based on the following formula: ; in, For category weights, For indicator functions, For predicting probabilities, The number of samples in each training batch To analyze task loss parameters; The sample confidence level is obtained based on the following formula: ; in, To predict distribution entropy, To analyze the logarithm of the number of task categories, For sample confidence level; The root mean square denoising loss parameter is obtained based on the following formula: ; in, For the mean squared error loss of a single sample, The root mean square denoising loss parameter; The joint loss function is: ; in, This is the loss weighting coefficient.

[0018] Optionally, the steps of constructing a joint loss function through an analysis task-guided adaptive denoising optimization mechanism to train the initial model end-to-end, thereby updating the module parameters of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module to obtain the converged processing model, include: calculating the gradients of the module parameters of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module based on the joint loss function; and iteratively updating the module parameters of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module using the gradient backpropagation algorithm based on the gradient of each module parameter until the joint loss function converges, thus obtaining the converged processing model.

[0019] Optionally, the module parameters of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module are the shared encoder parameters, denoising decoder parameters, and analysis task processing parameters of the initial model, respectively.

[0020] Optionally, the raw EEG signals containing artifacts may include emotion recognition data, epilepsy detection data, sleep classification data, or motor imagery data.

[0021] In a second aspect, embodiments of the present invention provide an electronic device, including: a processor and a memory, wherein the memory stores instructions; the processor invokes the instructions in the memory to cause the processor to execute the electroencephalogram (EEG) signal processing method of any of the foregoing embodiments of the first aspect of the present invention.

[0022] The processor of the electronic device provided in this embodiment of the invention executes the EEG signal processing method of any of the foregoing embodiments of the first aspect of the invention by calling instructions in the memory. This enables the optimization of artifact removal by analyzing task results. Artifact removal can also provide a high-quality signal basis for the analysis task, achieving mutual reinforcement between the two tasks. This solves the problems of error propagation and feature loss in traditional cascade methods, and achieves better artifact removal effect and analysis task performance.

[0023] Thirdly, embodiments of the present invention provide a computer-readable storage medium storing instructions that, when executed by a processor, implement the electroencephalogram (EEG) signal processing method of any of the foregoing embodiments of the first aspect of the present invention.

[0024] The instructions stored in the computer-readable storage medium provided in the embodiments of the present invention can be called by a processor and executed by the EEG signal processing method of any of the foregoing embodiments of the first aspect of the present invention. This enables the optimization of artifact removal based on the results of the analysis task. Artifact removal can also provide a high-quality signal basis for the analysis task, achieving mutual reinforcement between the two tasks. This solves the problems of error propagation and feature loss in traditional cascade methods, and achieves better artifact removal effect and analysis task performance. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0026] Figure 1 This is a flowchart of one embodiment of the electroencephalogram (EEG) signal processing method of the present invention; Figure 2 This is a flowchart illustrating the construction of a shared feature extraction module in one embodiment of the EEG signal processing method of the present invention; Figure 3 This is a flowchart of step S120 in one embodiment of the EEG signal processing method of the present invention; Figure 4 This is a flowchart illustrating the construction of a physiological frequency band noise reduction module in one embodiment of the EEG signal processing method of the present invention; Figure 5 This is a flowchart illustrating the construction and analysis task processing module in one embodiment of the EEG signal processing method of the present invention; Figure 6 This is a flowchart of step S140 in one embodiment of the EEG signal processing method of the present invention; Figure 7This is a flowchart illustrating the construction of a joint loss function in one embodiment of the EEG signal processing method of the present invention; Figure 8 This is a flowchart of one embodiment of the electroencephalogram signal processing method of the present invention; Figure 9a This is a signal-to-noise ratio comparison diagram of artifact removal effect under different input signal-to-noise ratios in a specific embodiment of the EEG signal processing method of the present invention. Figure 9b This is a comparison chart of correlation coefficients of artifact removal performance under different input signal-to-noise ratios in a specific embodiment of the EEG signal processing method of the present invention. Figure 9c This is a comparison of the mean square error of artifact removal performance under different input signal-to-noise ratios in a specific embodiment of the EEG signal processing method of the present invention. Figure 9d This is a comparison chart of the accuracy of emotion recognition under different input signal-to-noise ratios in one embodiment of the EEG signal processing method of the present invention; Figure 10a This is a signal-to-noise ratio comparison diagram of artifact removal effect under different input signal-to-noise ratios in one embodiment of the EEG signal processing method of the present invention on the DREAMER dataset; Figure 10b This is a comparison of correlation coefficients of artifact removal performance under different input signal-to-noise ratios in one embodiment of the EEG signal processing method of the present invention; Figure 10c This is a comparison of the mean square error of artifact removal performance under different input signal-to-noise ratios in one embodiment of the EEG signal processing method of the present invention in the DREAMER dataset. Figure 10d This is a comparison chart of the accuracy of emotion recognition under different input signal-to-noise ratios in one embodiment of the EEG signal processing method of the present invention; Figure 11a This is a signal-to-noise ratio comparison diagram of artifact removal effect under different input signal-to-noise ratios in one embodiment of the EEG signal processing method of the present invention on the AMIGOS dataset; Figure 11b This is a comparison of correlation coefficients of artifact removal performance under different input signal-to-noise ratios in an embodiment of the EEG signal processing method of the present invention. Figure 11c This is a comparison of the mean square error of artifact removal performance under different input signal-to-noise ratios in an embodiment of the EEG signal processing method of the present invention. Figure 11dThis is a comparison chart of the accuracy of emotion recognition under different input signal-to-noise ratios in one embodiment of the EEG signal processing method of the present invention. Figure 12a This is a signal-to-noise ratio comparison diagram of artifact removal effect under different input signal-to-noise ratios in an embodiment of the EEG signal processing method of the present invention; Figure 12b This is a comparison chart of correlation coefficients of artifact removal performance under different input signal-to-noise ratios in the SEED dataset, representing one embodiment of the EEG signal processing method of the present invention. Figure 12c This is a comparison chart of the mean square error of artifact removal performance under different input signal-to-noise ratios in the SEED dataset, according to one embodiment of the EEG signal processing method of the present invention. Figure 12d This is a comparison chart of the accuracy of emotion recognition under different input signal-to-noise ratios in one embodiment of the EEG signal processing method of the present invention. Figure 13 This is a structural block diagram of one embodiment of the electronic device of the present invention. Detailed Implementation

[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0028] It should be noted that all directional indications in the embodiments of the present invention, such as up, down, left, right, front, back, etc., are only used to explain the relative positional relationship and movement of the components in a specific posture as shown in the attached figure. If the specific posture changes, the directional indication will also change accordingly.

[0029] Furthermore, the use of terms such as "first" and "second" in this invention is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. When the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed by this invention.

[0030] For ease of understanding, the EEG signal processing method of the present invention will be described below, such as... Figure 1As shown, the EEG signal processing method in this embodiment of the invention includes steps S110 to S140.

[0031] In step S110, the raw EEG signal containing artifacts is acquired.

[0032] In this embodiment, when acquiring EEG signals containing artifacts... Subsequently, corresponding clean EEG signals were acquired simultaneously. and analysis task tags .

[0033] in, For batch size, For the number of brainwave channels, The length of each EEG segment To analyze the number of task categories.

[0034] The specific steps are as follows: Raw EEG signals containing artifacts were collected. Subsequently, the original EEG signals containing artifacts were first resampled and preliminarily removed to obtain high-quality, clean EEG signals. For example, The clean EEG signal, after being verified, was used as the benchmark true value for subsequent quantitative evaluation of noise suppression effectiveness and signal fidelity.

[0035] Simultaneously, auxiliary physiological modal signals recorded synchronously are extracted. The electrooculogram (EOG) signals are recorded as vertical EOG components (VEOG) and horizontal EOG components (HEOG), and the electromyogram (EMG) signals are recorded as EMG. The pre-acquired EEGdenoiseNet dataset (a publicly available dataset) is used as the benchmark dataset. Artifact templates are extracted from this dataset (e.g., in this embodiment, 3400 EOG signal segments and 5598 EMG signal segments with a duration of 2 seconds and normalized) to simulate complex and realistic artifact interference scenarios.

[0036] The EEG data containing physiological artifacts was then constructed using a linear superposition method, including the following steps: Artifact superposition of electrooculogram (EOG) signals: Considering the strong influence of EOG artifacts on prefrontal EEG activity, EOG artifacts are superimposed only on the frontal lobe channels. A contamination model is constructed based on a real head model, and the vertical and horizontal EOG components are superimposed onto the clean EEG signal. The mathematical formula is as follows: ; in, For the first The first subject Clean EEG signals from each electrode , For the first The channel specificity coefficient of each electrode, and , It was obtained by linear regression calculation between the measured EEG artifacts and the corresponding EEG signal amplitude.

[0037] At the same time, random masking is applied to each channel to simulate spatial heterogeneous electrooculography artifacts.

[0038] EMG artifact superposition: An additive process is used to model EMG artifacts, superimposing EMG signal noise onto each EEG channel. The mathematical formula is as follows: ; in, For the first The channel-specific scaling factor of each electrode is used to determine the contribution of EMG artifacts at that electrode. Random sampling within a preset range reflects the spatial heterogeneity distribution of EMG artifacts at various locations on the scalp, and the additive linear model follows the conventional mixture assumption of EMG artifacts in EEG analysis.

[0039] To enhance noise diversity, this application embodiment introduces artifact signals from the EEGdenoiseNet dataset. For each EEG signal channel, a certain proportion of noise segments from EMG and EOS signals are randomly selected and superimposed, with the noise from EOS signals specifically superimposed on the frontal lobe channel.

[0040] To evaluate the model's performance under different noise conditions, seven discrete SNR levels (e.g., -3dB, -2dB, -1dB, 0dB, 1dB, 2dB, 3dB) were set, and precise control of SNR (decibels) was achieved through an energy normalization scaling process.

[0041] First, a sliding window root mean square (RMS) analysis was used to estimate the energy distribution of clean EEG signals and compound noise.

[0042] Secondly, the target decibel value is converted to a linear scale, and the channel-specific scaling factor is calculated.

[0043] Then, the scaling factor is applied to adjust the total noise energy to ensure that all noisy EEG segments maintain the preset noise-to-signal energy ratio.

[0044] Finally, the scaled composite noise is superimposed onto the clean EEG signal to obtain the noisy EEG signal used for final evaluation. The mathematical definition of decibel value is: ; in, For clean EEG signals, The Each sampling point Noisy EEG signals The Each sampling point This refers to the total number of sampling points for a single-channel, single-segment signal, as described in this embodiment. .

[0045] In step S120, the original EEG signal is first extracted using a pre-built shared feature extraction module, and then the extracted shared latent features are denoised using a pre-built physiological frequency band denoising module to obtain the denoised EEG signal.

[0046] like Figure 2 As shown, in some optional embodiments, the shared feature extraction module is constructed through the following steps: Step S1201: Construct the first convolutional layer, the first batch of normalized layers, and the first GELU activation function.

[0047] Step S1202: Construct the second convolutional layer, the second batch normalization layer, and the second GELU activation function.

[0048] Step S1203: Based on the first convolutional layer, the first batch of normalized layers, the first GELU activation function, the second convolutional layer, the second batch of normalized layers, and the second GELU activation function, the features are extracted by combining the convolutional channels and the time dimension to preserve the coarse temporal structure of the signal, thus obtaining a shared feature extraction backbone network to construct a shared feature extraction module.

[0049] like Figure 3 As shown, in some optional embodiments, step S120 includes steps S121 to S122.

[0050] In step S121, the original EEG signal containing artifacts is processed by a shared feature extraction module to perform two-layer feature extraction to obtain shared latent features.

[0051] In step S122, the reconstructed signal is superimposed with the original input signal of the original EEG signal containing artifacts to obtain the denoised EEG signal.

[0052] In this embodiment, a shared feature extraction backbone network is applied to the input signal. Perform feature transformation to obtain shared latent features. .

[0053] The backbone network consists of two lightweight convolutional operations (Conv+BN+GELU) that jointly extract features from the channel and temporal dimensions, initially suppressing high-frequency perturbations while preserving the coarse temporal structure of the signal.

[0054] In step S130, the denoised EEG signal is processed by a pre-built analysis task processing module to obtain an initial model consisting of a shared feature extraction module, a physiological frequency band denoising module, and an analysis task processing module.

[0055] like Figure 4 As shown, in some optional embodiments, the physiological frequency band denoising module is constructed through the following steps: Step S1301A: Apply a convolutional projection layer to the shared latent features to perform projection processing, thereby refining the local temporal patterns of the shared latent features and obtaining the processed shared latent features.

[0056] Step S1302A: By introducing a physiological frequency band sensing neural oscillation encoder, the prior electroencephalographic frequency of the brain is incorporated into the position coding to construct a position coding matrix.

[0057] Step S1303A: Based on the pre-acquired learnable modulation parameters, the position coding matrix is ​​modulated. After obtaining the modulated position coding matrix, the processed shared latent features are combined with the modulated position coding matrix to obtain the coding representation formula.

[0058] Step S1304A: Input the encoded representation formula into the Transformer encoder to perform long-range time dependency modeling and obtain the denoised latent features.

[0059] Step S1305A: After optimizing the latent denoising features based on the channel gate mechanism, the latent denoising features are reconstructed back into the signal space by an encoder composed of transposed convolutional layers to obtain the reconstructed signal for constructing the physiological frequency band denoising module.

[0060] In this embodiment, The input physiological band sensory neural oscillation encoder (PBNOE) enhances the temporal correlation of features through positional encoding based on the frequency band characteristics of EEG signals. The encoding formula is as follows: ; in, , , The effective frequency range of EEG signals, = 128 is the total dimension of the location encoding.

[0061] Learnable modulation parameters , Obtain the encoded representation Then, the positional encoding is input into the Transformer framework to capture long-term dependencies.

[0062] Subsequently, a convolutional-transformer hybrid architecture was used for artifact separation and suppression to obtain denoised latent features. .

[0063] For example, local temporal patterns are first refined through convolutional projection layers, then long-range temporal dependencies are captured by the Transformer encoder, and finally the transition of temporal dimension features is stabilized through channel gating mechanisms.

[0064] Simultaneously, a denoising decoder is constructed based on a residual connection strategy. The denoised latent features are reconstructed into a signal space output through a transposed convolutional layer. For example, the denoised EEG signal can be obtained using the following formula. : ; in, Denoising path for Convolution-Transformer To reconstruct the decoder, this embodiment uses residual design to focus the network on estimating noise components rather than reproducing the entire signal.

[0065] like Figure 5 As shown, in some optional embodiments, the analysis task processing module is constructed through the following steps: Step S1301B: Apply a convolutional projection layer to the denoised EEG signal for projection processing to refine the local temporal pattern of the denoised EEG signal, thereby obtaining the processed denoised EEG signal.

[0066] Step S1302B: By introducing a spatiotemporal hierarchical attention fusion mechanism, the processed denoised EEG signal is sequentially subjected to time-dependent modeling, adaptive channel recalibration, and spatiotemporal cross-attention fusion to obtain time features, channel calibration features, and spatiotemporal fusion features.

[0067] Step S1303B: After global average pooling of the spatiotemporal fusion features, input a lightweight task processing head consisting of a nonlinear projection layer, Dropout regularization, and a linear decision layer to classify the spatiotemporal fusion features and obtain the analysis task prediction results to construct the analysis task processing module.

[0068] Specifically, the encoding formula is as follows: ; in, For raw EEG signals containing artifacts, and For learnable modulation parameters, This is the position encoding matrix; The denoised EEG signal is calculated based on the following formula: ; in, For the noise-reduced EEG signal, Denoising path for Convolution-Transformer To rebuild the decoder, To share latent features, The EEG signal contains artifacts.

[0069] The temporal characteristics, channel calibration characteristics, and spatiotemporal fusion characteristics are calculated based on the following formula: ; ; ; in, For time characteristics, For channel calibration features, As a feature of spatiotemporal fusion, For the location coding matrix constructed based on EEG physiological frequencies, For linear rectified functions, For the noise-reduced EEG signal, For global average pooling, Activate Sigmoid For Hadama accumulation, , For trainable projection matrices, For spatiotemporal cross-attention functions, For learnable residual scaling parameters, , For time-domain query tensors, , For channel-aware key-value tensors.

[0070] In this embodiment, the denoised EEG signal Emotion discrimination features are extracted using a spatiotemporal hierarchical attention fusion mechanism (T-SHAF).

[0071] For example, by first modeling the temporal dependency using a Transformer encoder, we obtain: ; Then, by enhancing the weights of emotion-related channels through an adaptive channel calibration mechanism, we obtain: ; Finally, by fusing temporal and channel features through spatiotemporal cross-attention, we obtain: ; Among them, a lightweight fully connected classifier is used to perform spatiotemporal fusion features. Perform emotion classification to obtain predicted labels. The classification process is as follows: ; in, It includes a nonlinear projection layer, Dropout regularization, and a linear decision layer. Simultaneously, an adaptive denoising loss guided by emotion recognition is calculated using a joint loss function.

[0072] Specifically, the module parameters of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module are the shared encoder parameters, denoising decoder parameters, and analysis task processing parameters of the initial model, respectively.

[0073] Raw EEG signals containing artifacts include emotion recognition data, epilepsy detection data, sleep classification data, or motor imagery data.

[0074] In step S140, a joint loss function is constructed by analyzing the task-guided adaptive denoising optimization mechanism to train the initial model end-to-end, thereby updating the module parameters of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module, and obtaining the converged processing model.

[0075] In some optional embodiments, the initial model is constructed based on the following steps: The shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module are connected sequentially.

[0076] The output of the shared feature extraction module is connected to the input of the physiological frequency band denoising module, and the output of the physiological frequency band denoising module is connected to the input of the analysis task processing module. The input of the shared feature extraction module is used as the model input, and the output of the analysis task processing module is used as the model output to output the analysis task prediction results, thus constructing the initial model.

[0077] like Figure 6 As shown, step S140 further includes steps S141 to S142.

[0078] In step S141, the gradients of the module parameters of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module are calculated based on the joint loss function.

[0079] In step S142, based on the gradient of each module parameter, the module parameters of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module are iteratively updated using the gradient backpropagation algorithm until the joint loss function converges, thus obtaining the converged processing model.

[0080] In this embodiment, as Figure 7 As shown, the joint loss function is constructed based on the following steps: Step S1401: Obtain clean EEG signals, corresponding analysis task labels, and the number of analysis task categories from the raw EEG signals containing artifacts.

[0081] Step S1402: Based on the analysis task prediction results of the initial model, the analysis task labels, and the pre-acquired category weights, calculate the analysis task loss parameter of weighted cross-entropy.

[0082] Step S1403: Calculate the prediction distribution entropy based on the prediction probability distribution of the analysis task prediction results.

[0083] Step S1404: Calculate the sample confidence by predicting the distribution entropy and analyzing the logarithm of the number of task categories.

[0084] Step S1405: Calculate the mean square error between the denoised EEG signal and the clean EEG signal, multiply the mean square error by the sample confidence as a weight value to obtain the root mean square denoising loss parameter based on sample confidence modulation.

[0085] Step S1406: Based on the pre-acquired loss weight coefficients, calculate the weighted sum of the analysis task loss parameters and the root mean square denoising loss parameters to construct a joint loss function.

[0086] Specifically, the task loss parameters are obtained based on the following formula: ; in, For category weights, For indicator functions, For predicting probabilities, The number of samples in each training batch To analyze the parameters of task loss.

[0087] The sample confidence level is obtained based on the following formula: ; in, To predict distribution entropy, To analyze the logarithm of the number of task categories, The confidence level of the sample.

[0088] The root mean square denoising loss parameter is obtained based on the following formula: ; in, For the mean squared error loss of a single sample, is the root mean square denoising loss parameter.

[0089] The joint loss function is: ; in, This is the loss weighting coefficient.

[0090] like Figure 8 As shown, in this embodiment, when calculating confidence and optimizing loss, the sample-specific confidence is calculated based on the probability distribution output by the classifier: Update model parameters using gradient backpropagation. ( These parameters are the shared encoder, denoising decoder, and emotion recognition module parameters of the processing model, respectively, until iterative training reaches convergence.

[0091] Finally, the final result is output through a convergent processing model, yielding a clean EEG signal after removing EMG artifacts. and sentiment prediction tags It completes the end-to-end collaborative task of artifact removal and emotion recognition.

[0092] In step S150, the EEG signal containing artifacts to be processed is input into the processing model to obtain the denoised EEG signal and the corresponding analysis and prediction results.

[0093] like Figures 9a to 9d , Figures 10a to 10d , Figures 11a to 11d ,as well as Figures 12a to 12d As shown in this embodiment, to compare the EEG signal processing method of this application embodiment with existing processing methods, four indicators—signal-to-noise ratio, correlation coefficient, mean square error, and emotion recognition accuracy—were selected for quantitative analysis in the prediction results. A higher signal-to-noise ratio and a lower mean square error indicate better artifact removal; a correlation coefficient closer to 1 indicates stronger waveform consistency between the denoised signal and the clean signal; and higher accuracy indicates better performance in the emotion recognition task.

[0094] from Figures 9a to 9d , Figures 10a to 10d , Figures 11a to 11d ,as well as Figures 12a to 12d As the results show, on the DEAP dataset, the EEG signal processing method of this application embodiment exhibits significant advantages under different input signal-to-noise ratio conditions.

[0095] In terms of SNR, the EEG signal processing method of this application embodiment always maintains the optimal or second-best value, especially in low signal-to-noise ratio (e.g., -3dB) scenarios, where its advantages are even more prominent.

[0096] In terms of the CC (Pearson correlation coefficient) index, the correlation coefficient of the EEG signal processing method in this application embodiment is close to 100%, which is significantly higher than other methods in most cases, demonstrating stronger waveform consistency.

[0097] Regarding the mean squared error (MSE) metric, the EEG signal processing methods of this application exhibit low MSE levels, indicating more thorough artifact suppression. In terms of emotion recognition accuracy, the proposed method also significantly outperforms other baseline methods.

[0098] The EEG signal processing method according to the embodiments of this application employs an analysis task-guided adaptive denoising mechanism that can effectively suppress artifacts while actively preserving key emotion discrimination features. At the same time, the spatiotemporal attention mechanism fully utilizes the channel correlation and temporal dynamics of EEG signals, enabling the EEG signal processing method of the embodiments of this application to maintain stable performance output even in complex noise environments.

[0099] As can be seen from the above, the EEG signal processing method of this application can achieve synergistic optimization of EEG denoising and analysis tasks, and has the following beneficial effects compared with existing methods: (1) Breaking the decoupled design of artifact removal and analysis tasks, a general collaborative architecture with closed-loop feedback is constructed, which can be flexibly adapted to various EEG analysis tasks such as emotion recognition, epilepsy detection, and sleep classification. The results of the analysis task guide the optimization of artifact removal, and artifact removal provides a high-quality signal foundation for the analysis task, realizing mutual reinforcement between the two tasks and solving the problems of error propagation and feature loss in traditional cascade methods.

[0100] (2) Integrating the prior of EEG physiological frequency into the location coding makes the model more in line with the neurophysiological characteristics of EEG. While removing artifacts, it accurately preserves the neural oscillation features related to various analysis tasks, thereby improving the physiological interpretability of learning features.

[0101] (3) By using the spatiotemporal hierarchical attention fusion mechanism, spatiotemporal modeling is decoupled into three stages: time dependence, channel recalibration, and cross-attention fusion, so as to achieve the collaborative capture of long-term time dependence and channel-specific spatial relationship and improve the accuracy of feature extraction for different analysis tasks.

[0102] (4) Validated on multiple public EEG datasets for different analysis tasks, compared with existing advanced artifact removal and analysis task processing methods, it can achieve better artifact removal effect and analysis task performance under different signal-to-noise ratios (-3dB~3dB), and is suitable for a variety of real-world noisy scenarios.

[0103] The EEG signal processing method provided in this embodiment of the invention includes: acquiring raw EEG signals containing artifacts; firstly, extracting features from the raw EEG signals using a pre-constructed shared feature extraction module, and then denoising the extracted shared latent features using a pre-constructed physiological frequency band denoising module to obtain denoised EEG signals; processing the denoised EEG signals using a pre-constructed analysis task processing module to obtain an initial model composed of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module; constructing a joint loss function through an analysis task-guided adaptive denoising optimization mechanism to perform end-to-end training on the initial model to update the module parameters of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module, thereby obtaining a converged processing model; and inputting the EEG signals containing artifacts to be processed into the processing model to obtain denoised EEG signals and corresponding analysis and prediction results.

[0104] The EEG signal processing method provided in this embodiment of the invention guides artifact removal optimization by analyzing task results. Artifact removal can also provide a high-quality signal basis for the analysis task, realizing mutual reinforcement between the two tasks. This solves the problems of error propagation and feature loss in traditional cascade methods, achieving better artifact removal results and analysis task performance.

[0105] In addition to the above method embodiments, the present invention also provides, for example, Figure 13 An electronic device is shown, comprising a processor 201 and a memory 202, wherein the memory 202 stores instructions. The processor 201 is capable of calling the instructions in the memory 202 to execute the electroencephalogram (EEG) signal processing method of any of the above embodiments of the present invention.

[0106] The EEG signal processing method of the above embodiments of the present invention includes: acquiring raw EEG signals containing artifacts; firstly extracting features from the raw EEG signals using a pre-constructed shared feature extraction module, and then denoising the extracted shared latent features using a pre-constructed physiological frequency band denoising module to obtain denoised EEG signals; processing the denoised EEG signals using a pre-constructed analysis task processing module to obtain an initial model composed of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module; constructing a joint loss function through an analysis task-guided adaptive denoising optimization mechanism to perform end-to-end training on the initial model to update the module parameters of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module, thereby obtaining a converged processing model; and inputting the EEG signals containing artifacts to be processed into the processing model to obtain denoised EEG signals and corresponding analysis and prediction results.

[0107] The electronic device provided in this embodiment of the invention implements the above-described EEG signal processing method, which can guide artifact removal optimization by analyzing task results. Artifact removal can also provide a high-quality signal basis for the analysis task, realizing mutual reinforcement between the two tasks, solving the error propagation and feature loss problems of traditional cascade methods, and achieving better artifact removal effect and analysis task performance.

[0108] Furthermore, the electronic device provided in the embodiments of the present invention may also include a communication interface 203 and a bus 204, wherein the processor 201, the memory 202 and the communication interface 203 are electrically connected through the bus 204.

[0109] The memory 202 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 203 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 204 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 13 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0110] Processor 201 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 201 or by instructions in software form. The processor 201 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 202. The processor 201 reads the information in memory 202 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.

[0111] This invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of the above-described electroencephalogram (EEG) signal processing method.

[0112] The computer-readable storage medium provided in this embodiment of the invention stores data and computer-executable instructions for the above-described EEG signal processing method. The EEG signal processing method of the above embodiment includes: acquiring an original EEG signal containing artifacts; firstly extracting features from the original EEG signal using a pre-constructed shared feature extraction module, and then denoising the extracted shared latent features using a pre-constructed physiological frequency band denoising module to obtain a denoised EEG signal; processing the denoised EEG signal using a pre-constructed analysis task processing module to obtain an initial model composed of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module; constructing a joint loss function through an analysis task-guided adaptive denoising optimization mechanism to perform end-to-end training on the initial model to update the module parameters of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module, thereby obtaining a converged processing model; and inputting the EEG signal containing artifacts to be processed into the processing model to obtain the denoised EEG signal and the corresponding analysis and prediction results.

[0113] The instructions stored in the computer-readable storage medium provided in this embodiment of the invention can be called by a processor and executed by the EEG signal processing method of the above embodiments of the invention. This enables the optimization of artifact removal based on the results of the analysis task. Artifact removal can also provide a high-quality signal basis for the analysis task, achieving mutual reinforcement between the two tasks. This solves the problems of error propagation and feature loss in traditional cascade methods, and achieves better artifact removal effect and analysis task performance.

[0114] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0115] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0116] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method of processing electroencephalographic signals, characterized by, The method includes: Obtain raw EEG signals containing artifacts; The original EEG signal is first extracted using a pre-built shared feature extraction module, and then the extracted shared latent features are denoised using a pre-built physiological frequency band denoising module to obtain a denoised EEG signal. The denoised EEG signal is processed by a pre-built analysis task processing module to obtain an initial model consisting of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module. By constructing a joint loss function through an analysis task-guided adaptive denoising optimization mechanism, the initial model is trained end-to-end to update the module parameters of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module, thereby obtaining a converged processing model. The EEG signal containing artifacts to be processed is input into the processing model to obtain the denoised EEG signal and the corresponding analysis and prediction results.

2. The electroencephalographic signal processing method of claim 1, wherein, The shared feature extraction module is constructed through the following steps: Construct the first convolutional layer, the first batch of normalized layers, and the first GELU activation function; Construct a second convolutional layer, a second batch normalization layer, and a second GELU activation function; Based on the first convolutional layer, the first batch of normalized layers, the first GELU activation function, the second convolutional layer, the second batch of normalized layers, and the second GELU activation function, features are extracted by combining the convolutional channels and the time dimension to preserve the coarse temporal structure of the signal, thereby obtaining a shared feature extraction backbone network to construct the shared feature extraction module.

3. The electroencephalographic signal processing method of claim 1, wherein, The physiological frequency band noise reduction module is constructed through the following steps: A convolutional projection layer is applied to the shared latent features to perform projection processing, thereby refining the local temporal patterns of the shared latent features and obtaining the processed shared latent features; By introducing a physiological frequency band sensing neural oscillation encoder, the prior brain electrophysiological frequency is incorporated into the position coding to construct a position coding matrix; Based on the pre-acquired learnable modulation parameters, the position coding matrix is ​​modulated. After obtaining the modulated position coding matrix, the processed shared latent features are combined with the modulated position coding matrix to obtain the coding representation formula. The encoded representation formula is input into the Transformer encoder for long-range time dependency modeling to obtain denoised latent features. After optimizing the denoising latent features based on the channel gate mechanism, the denoising latent features are reconstructed back into the signal space by an encoder composed of transposed convolutional layers to obtain the reconstructed signal for constructing the physiological frequency band denoising module.

4. The electroencephalographic signal processing method of claim 3, wherein, The steps for obtaining a denoised EEG signal by performing feature extraction and denoising processing on the original EEG signal through a pre-built shared feature extraction module and a physiological frequency band denoising module include: The shared latent features are obtained by performing two-layer feature extraction processing on the original EEG signal containing artifacts through the shared feature extraction module. The reconstructed signal is superimposed with the original input signal of the original EEG signal containing artifacts by residual addition to obtain the denoised EEG signal.

5. The electroencephalographic signal processing method of claim 4, wherein, The encoding representation formula is as follows: ; wherein, is the original electroencephalogram signal with artifacts, and is the learnable modulation parameter, is the position encoding matrix; The denoised EEG signal is calculated based on the following formula: ; wherein, is the denoised electroencephalogram signal, is a convolution-Transformer denoising path, is a reconstruction decoder, is the shared latent feature, is the electroencephalogram signal with artifacts.

6. The electroencephalographic signal processing method of claim 1, wherein, The analysis task processing module is constructed through the following steps: A convolutional projection layer is applied to the denoised EEG signal to refine the local temporal pattern of the denoised EEG signal, thereby obtaining the processed denoised EEG signal. By introducing a spatiotemporal hierarchical attention fusion mechanism, the processed denoised EEG signal is sequentially subjected to time-dependent modeling, adaptive channel recalibration, and spatiotemporal cross-attention fusion to obtain time features, channel calibration features, and spatiotemporal fusion features. After global average pooling of the spatiotemporal fusion features, the input is a lightweight task processing head consisting of a nonlinear projection layer, Dropout regularization, and a linear decision layer. The spatiotemporal fusion features are then classified to obtain the analysis task prediction results, thereby constructing the analysis task processing module.

7. The electroencephalographic signal processing method of claim 6, wherein, The time feature, the channel calibration feature, and the spatiotemporal fusion feature are calculated based on the following formula: ; ; ; in, For the time feature, For the channel calibration features, For the spatiotemporal fusion feature, For the location coding matrix constructed based on EEG physiological frequencies, For linear rectified functions, The denoised EEG signal, For global average pooling, Activate Sigmoid For Hadama accumulation, For trainable projection matrices, For spatiotemporal cross-attention functions, For learnable residual scaling parameters, , For time-domain query tensors, For channel-aware key-value tensors.

8. The EEG signal processing method according to claim 1, characterized in that, The initial model is constructed based on the following steps: The shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module are connected in sequence, wherein the output of the shared feature extraction module is connected to the input of the physiological frequency band denoising module, and the output of the physiological frequency band denoising module is connected to the input of the analysis task processing module. The initial model is constructed by using the input of the shared feature extraction module as the input of the model and the output of the analysis task processing module as the output of the model to output the analysis task prediction results.

9. The EEG signal processing method according to claim 8, characterized in that, The joint loss function is constructed based on the following steps: Using the raw EEG signal containing artifacts, obtain clean EEG signals, corresponding analysis task labels, and the number of analysis task categories; Based on the analysis task prediction results of the initial model, the analysis task labels, and the pre-acquired category weights, the analysis task loss parameter of weighted cross-entropy is calculated; Based on the prediction probability distribution of the prediction results of the analysis task, calculate the prediction distribution entropy; The sample confidence level is calculated using the predicted distribution entropy and the logarithm of the number of analysis task categories. The mean square error between the denoised EEG signal and the clean EEG signal is calculated, and the sample confidence score is multiplied by the mean square error as a weight value to obtain the root mean square denoising loss parameter based on sample confidence score modulation. Based on the pre-acquired loss weight coefficients, the weighted sum of the analysis task loss parameters and the root mean square denoising loss parameters is calculated to construct a joint loss function.

10. The EEG signal processing method according to claim 9, characterized in that, The loss parameters for the analysis task are obtained based on the following formula: ; in, For category weights, For indicator functions, For predicting probabilities, The number of samples in each training batch The loss parameters for the analysis task; The sample confidence level is obtained based on the following formula: ; in, To predict distribution entropy, The logarithm of the number of analysis task categories, The confidence level of the sample; The root mean square denoising loss parameter is obtained based on the following formula: ; in, For the mean squared error loss of a single sample, The root mean square denoising loss parameter; The joint loss function is: ; in, The loss weighting coefficient is denoted as .

11. The EEG signal processing method according to claim 1, characterized in that, The steps of constructing a joint loss function through an analysis task-guided adaptive denoising optimization mechanism to perform end-to-end training on the initial model, thereby updating the module parameters of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module, and obtaining the converged processing model include: Based on the joint loss function, the gradients of the module parameters of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module are calculated; Based on the gradient of each module parameter, the module parameters of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module are iteratively updated using the gradient backpropagation algorithm until the joint loss function converges, thus obtaining the converged processing model.

12. The EEG signal processing method according to claim 1, characterized in that, The module parameters of the shared feature extraction module, the physiological frequency band denoising module, and the analysis task processing module are the shared encoder parameters, denoising decoder parameters, and analysis task processing parameters of the initial model, respectively.

13. The EEG signal processing method according to claim 1, characterized in that, The raw EEG signals containing artifacts include emotion recognition data, epilepsy detection data, sleep classification data, or motor imagery data.

14. An electronic device, characterized in that, The electronic device includes: a processor and a memory, wherein the memory stores instructions; The processor invokes the instructions in the memory to cause the electronic device to implement the EEG signal processing method as described in any one of claims 1 to 13.

15. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the EEG signal processing method as described in any one of claims 1 to 13.