Multi-feature-domain semi-supervised multi-artifact detection method based on channel shielding

By using a channel-masking multi-feature-domain semi-supervised network, the problems of multi-artifact detection bias and noise interference in EEG artifact detection are solved, achieving high-precision and robust multi-artifact detection.

CN121117828APending Publication Date: 2025-12-12HANGZHOU DIANZI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511078136.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-01
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

Existing EEG artifact detection methods mainly suffer from problems such as good detection performance for specific types of artifacts but large model bias when detecting multiple artifacts, supervised learning methods requiring a large amount of labeled data and being susceptible to noise interference, and the inability of AE networks to determine feature importance.

Method used

A multi-feature domain semi-supervised network based on channel masking is adopted. Through channel correlation analysis and label masking, multi-feature domain features are extracted by combining AE network and CNN network. The multi-classification loss function is used to optimize the model decision boundary and reduce noise label interference.

Benefits of technology

It improves the accuracy and robustness of multi-artifact detection, enhances the model's generalization ability in complex environments, and reduces the impact of noisy labels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121117828A_ABST
    Figure CN121117828A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-feature-domain semi-supervised multi-artifact detection method based on channel shielding. The method comprises the following steps: firstly, carrying out channel correlation analysis on different artifacts, recalibrating data, and marking a non-artifact channel as a shielding type; the method comprises the following steps: extracting reconstruction features from EEG data by utilizing the advantages of an AE network in the aspect of feature reconstruction, and enhancing feature representation related to artifacts by utilizing an attention mechanism; frequency domain information in the PSD is extracted in combination with a CNN network, so that construction of multiple feature domains is realized, capture of complementary information is facilitated, and the robustness of the model is improved; and finally, a label shunting mechanism in a multi-classification loss function is utilized to further reduce the influence of noise labels on training, so that the detection generalization and robustness in a complex environment are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the interdisciplinary field of biomedical signal processing and artificial intelligence, specifically relating to a multi-feature domain semi-supervised multi-artifact detection method based on channel shielding. Background Technology

[0002] Electroencephalography (EEG), as an important physiological signal reflecting brain neural activity, has wide applications in brain-computer interfaces, clinical diagnosis, and cognitive science research. However, during EEG acquisition, not only are there synchronous firings of neuronal groups in the cerebral cortex, but the signal is also subject to interference from other bioelectrical signals, leading to artifacts. These artifacts not only severely mask real brain electrical activity but may also mislead subsequent data analysis and model training. For example, some artifacts resemble waveforms during certain disease episodes, thus affecting research related to those diseases.

[0003] To address the aforementioned issues, current research has proposed various EEG artifact detection methods, ranging from unsupervised learning methods such as filtering algorithms and blind source separation (BSS) to supervised learning methods combining LSTM and SVM. With the development of deep learning, models such as convolutional neural networks (CNN) and autoencoders (AE) have been widely applied in EEG artifact detection, significantly improving detection efficiency and accuracy.

[0004] Despite the significant progress made in the detection of certain types of artifacts, the following issues remain:

[0005] 1. Existing methods mainly focus on detecting specific types of artifacts or simply detecting the presence or absence of artifacts, such as multi-label binary classification or single-label multi-class classification for blinking artifacts. Furthermore, in reality, different artifacts may appear simultaneously within a time period, leading to biases in model detection.

[0006] 2. Supervised learning methods require a large amount of high-quality training data with manual annotation. However, in practical applications, it is difficult and time-consuming to obtain a large amount of professionally labeled data. At the same time, the labeling of data is prone to errors, which affects the overall performance of the model.

[0007] 3. As an unsupervised network, the AE network achieves the effect of unsupervised learning by extracting abstract features and using these features to reconstruct data. Therefore, it has the problem of being unable to determine the importance of features.

[0008] To address the aforementioned issues, this paper proposes a multi-artifact detection method based on a channel-masking, multi-feature-domain semi-supervised network. This method effectively learns information from the data while reducing the impact of noise labels on the network, thereby improving the accuracy of artifact detection. Summary of the Invention

[0009] This invention addresses the problem that existing deep learning-based artifact detection methods require a large amount of labeled data and are susceptible to noise interference, by providing a multi-feature domain semi-supervised multi-artifact detection method based on channel shielding.

[0010] To achieve the above objectives, the technical solution of the present invention mainly includes the following steps:

[0011] Collect EEG data from real BECTS patients and preprocess the raw input signals.

[0012] Channel correlation analysis is performed on the preprocessed data. Based on the analysis results, channels are divided and relevant features are extracted. Then, channel labels are masked.

[0013] The spectrum, energy spectrum, and power spectrum of the preprocessed data are extracted, and the corresponding frequency domain features are obtained. At the same time, the characteristic differences and performance indicators of the frequency domain features of the spectrum, energy spectrum, and power spectrum are analyzed. The frequency domain data with the most obvious differences and the best performance indicators are selected and frequency bands are divided.

[0014] The model uses an AE network to extract spatiotemporal domain reconstruction features from the channel-label-masked data and introduces a channel attention mechanism to enhance the model's spatiotemporal domain features and generalization ability. Simultaneously, a CNN network is used to further extract deeper features from selected frequency domain data. These extracted deeper features are then concatenated with the spatiotemporal domain features to obtain the final multi-feature domain features.

[0015] The final multi-feature domain features are input into the classifier, which is then mapped to the classification space by two fully connected layers and an activation function to generate the final detection result.

[0016] The model, consisting of an AE network, a channel attention mechanism, a CNN network, and a classifier, was trained using a designed multi-classification loss function.

[0017] The multi-class loss function employs a label splitting mechanism to process different labels separately, while combining an adaptive weight adjustment strategy to further optimize the model's decision boundary, ensuring that the model can effectively suppress interference from noisy labels during training and enhance its ability to identify the true category.

[0018] In one possible implementation, the preprocessing mainly includes: processing with bandpass filtering and power frequency filtering, slicing the EEG data according to artifact classification, and annotating the slices with a slice duration of 1 second to obtain labeled data. The slice annotations include blink artifacts, chewing artifacts, temporal region EMG, frontal region EMG, global abnormalities, and normal EEG signals; and downsampling the sampling frequency of all labeled data using linear interpolation.

[0019] In one possible implementation, the channel label shielding is specifically implemented as follows:

[0020] Based on the downsampled labeled data, cross-relationship graphs are extracted for different categories.

[0021] Based on the cross-correlation diagrams of each category, the channels are divided into artifact-related channels and other channels. Relevant features are extracted for artifact-related channels and other channels, including the maximum cross-correlation number, the cross-correlation number at zero delay, mutual information value, and average cross-correlation number. This analysis reveals the characteristic differences between artifact-related channels and other channels.

[0022] Based on the feature difference results, a label masking strategy is constructed. The specific strategy rules are as follows: the channels related to artifacts are labeled normally and multi-hot encoding is used to avoid redundancy caused by multiple labels; other channels are masked and labeled with the same label as a special type of label.

[0023] In one possible implementation, frequency domain data is selected and frequency bands are divided, specifically as follows:

[0024] The spectrum, energy spectrum, and power spectrum were extracted from different artifacts. The spectrum and energy spectrum were extracted using Fast Fourier Transform, and the power spectrum was calculated using the Welch method.

[0025] Extract frequency domain features of the spectrum, energy spectrum, and power spectrum, including peak frequency, spectral entropy, and centroid frequency.

[0026] The power spectrum PSD with the most significant differences was used as the frequency domain data for subsequent analysis. The PSD energy map was plotted, and the frequency bands of the power spectrum PSD data were divided into 5 parts according to the energy intensity of the artifact-related channel and other channels: [0-4]Hz, (4-8]Hz, (8-13]Hz, (13-30]Hz, and (30-70]Hz.

[0027] In one possible implementation, multi-feature domain feature extraction is specifically implemented as follows:

[0028] For the data that has been masked by labels, the AE network is used to extract and reconstruct features. 3×3 convolutional kernels are used to extract information from adjacent channels. Dropout layers are set (dropout rate of 0.25). Bidirectional long short-term memory network (BLSTM) is added to both the encoder and decoder parts of the AE network.

[0029] The mean squared error function (MSE) is used as the loss function for the AE network.

[0030] The reconstructed features extracted by the AE network are used as input to construct a channel attention mechanism, which consists of point convolution, channel attention, and spatial attention connected in series. The specific process is as follows:

[0031] The reconstructed features X from the input are first processed through two 1×1 point convolutions to optimize the representation.

[0032] Subsequently, channel-dimensional average pooling followed by channel-dimensional max pooling is applied, and then spatial-dimensional average pooling followed by spatial-dimensional max pooling is used to highlight relevant feature representations. Specifically:

[0033] The input feature X, optimized by point convolution, is subjected to global average pooling and global max pooling along the channel dimension, and then channel attention weights are generated using the sigmoid function. These channel attention weights are then multiplied channel-by-channel with the optimized input feature X to obtain the enhanced feature.

[0034] The enhanced features are further subjected to global average pooling and global max pooling in the spatial dimension, and spatial attention weights are generated using the sigmoid function. The spatial attention weights are then multiplied channel-by-channel with the enhanced features to obtain the spatiotemporal domain features.

[0035] A CNN network with a kernel size of 3×3 was used to extract features from the PSD data after the frequency bands were divided. Similarly, a dropout layer was set (with a dropout rate of 0.25). The deep features of the extracted frequency domain data were concatenated with the spatiotemporal domain features to obtain the final multi-feature domain features.

[0036] In one possible implementation, the process of constructing the multi-class loss function is as follows:

[0037] Set the boundary margin of the loss function and scaling factor And set the filtering threshold according to the probability distribution of the blocking labels;

[0038] The predicted classification results Perform tag-based traffic splitting, by comparing with filtering thresholds. The data was compared and divided into two categories, with smoothing applied to the portions below the filtering threshold:

[0039]

[0040] in Represents the true label, Dynamic weights are used to improve the model's generalization and robustness.

[0041]

[0042] in The number of training rounds for the model.

[0043] Calculate the label results after smoothing. Intraclass residual and inter-class surplus :

[0044]

[0045]

[0046] Inter-class similarity bias Intra-class similarity bias .

[0047] Finally, calculate the final loss value. Calculation:

[0048]

[0049] in For intermediate terms in the calculation:

[0050]

[0051] Inter-class residuals Intraclass residual ; This represents the cross-entropy loss.

[0052] In one possible implementation, the model training is specifically implemented as follows:

[0053] The data is divided into training, validation, and test sets. The training and validation sets are input into the constructed neural network model. MSE is used as the loss function of the AE network, and multi-class loss function is used as the loss function of the classifier. The model's learning of reconstructed features and classification detection is adjusted respectively. The learning ability of the model is continuously improved through the loss function, thereby obtaining the detection results of EEG signal segments. The recognition results of the EEG signal segments include the recognition results of five types of artifact signal segments and normal EEG signal segments.

[0054] Four basic parameters are statistically analyzed: true positive, true negative, false positive, and false negative. Precision, accuracy, recall, and F1 score are then calculated based on these four parameters.

[0055] Based on the four basic parameters obtained, an objective function is constructed. The weight coefficients and bias terms of the fully connected layers in the neural network are iteratively adjusted through the gradient backpropagation algorithm until the preset optimization termination condition is met, and finally a multi-artifact detection model with the optimal classification decision surface is generated.

[0056] In one possible implementation, the optimization termination condition is implemented using the following methods: 1. Fixed-period termination strategy: Set a maximum training period threshold, and automatically terminate the optimization process when the cumulative number of backpropagation iterations reaches the threshold; 2. Early termination strategy: Set a sliding window period M, and trigger early stopping when the relative improvement rate of the validation set F1 value does not exceed 1% within M consecutive training periods. Simultaneously configure a fixed-period threshold and a dynamic early stopping mechanism, prioritizing the execution of the dynamic early stopping condition, and executing the fixed-period termination strategy when the early stopping condition is not triggered.

[0057] Compared with the prior art, the present invention has the following beneficial effects:

[0058] This invention addresses the shortcomings of existing deep learning-based artifact detection methods, which require high data quality and are susceptible to noise. It proposes a semi-supervised multi-feature domain multi-artifact detection method based on channel masking. First, by analyzing the channel correlation of different artifacts, the data is relabeled, and non-artifact channels are marked as masked. Then, leveraging the advantages of the EEG network in feature reconstruction, reconstructed features are extracted from the EEG data, and an attention mechanism is used to enhance the representation of artifact-related features. Next, a CNN network is combined to extract frequency domain information from the PSD, thus constructing multiple feature domains. This helps capture complementary information and improves the model's robustness. Finally, the label splitting mechanism in the multi-class loss function further reduces the impact of noisy labels on training, effectively improving detection generalization and robustness in complex environments. Attached Figure Description

[0059] To more clearly illustrate the technical solutions in the embodiments of this application 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 this application. For those skilled in the art, other embodiments can be obtained based on these drawings.

[0060] Figure 1 This is a flowchart illustrating the EEG multi-artifact detection method of the present invention.

[0061] Figure 2 This is a performance evaluation diagram for the actual application of the present invention.

[0062] Figure 3 This is a diagram illustrating the effect of artifact recognition in an embodiment of the present invention. Detailed Implementation

[0063] 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 based on this application are within the scope of protection of this application.

[0064] This invention designs a multi-feature domain fusion semi-supervised learning network based on a channel masking mechanism for the detection and classification of five common physiological artifacts in electroencephalogram (EEG) signals. The method analyzes the channel correlation of different artifacts and designs a channel masking strategy to reduce interference from noise signals. Simultaneously, an attention mechanism is introduced into the autoencoder, and information from the spatiotemporal and frequency domains is fused to construct a robust multi-artifact detection model, addressing the problem of model training being susceptible to noise data interference.

[0065] This invention analyzes the channel correlations and characteristics of different artifact data, focusing on the features exhibited between artifact channels, and constructs a preprocessing method for channel label masking to reduce the impact of noise labels. To obtain multi-dimensional features, this invention compares the feature differences and performance indicators of three common frequency domain feature analysis methods, ultimately selecting power spectral density (PSD) as the frequency domain feature. Feature extraction is performed in both the spatiotemporal and frequency domains of the network, and the analysis results from channel correlation are incorporated to enable the network to learn information between adjacent channels, thereby uncovering deeper features. Finally, the proposed multi-class classification loss function based on a label-based diversion mechanism is used for classification calculation, further reducing the impact of noise labels while improving the model's robustness and generalization.

[0066] like Figure 1 As shown, the general implementation steps for multiple artifact detection methods have been described in detail within the scope of this invention. Specifically, the technical solution of this invention mainly includes the following steps:

[0067] Step 1: Collect EEG data from real BECTS patients and preprocess the input raw signals. Preprocessing mainly includes: using bandpass filtering and power frequency filtering, downsampling the data, and slicing the EEG data according to artifact classification, with a slice duration of 1 second.

[0068] Step 2: Perform channel correlation analysis on the preprocessed data, divide the channels according to the analysis results and extract relevant features, and then perform channel label masking.

[0069] Step 3: Extract the spectrum, energy spectrum, and power spectrum of the preprocessed data and obtain the corresponding frequency domain features. At the same time, analyze the characteristic differences and performance indicators of the frequency domain features of the spectrum, energy spectrum, and power spectrum, select the frequency domain data with the most obvious differences, and divide the frequency bands.

[0070] Step 4: Use the AE network to extract the spatiotemporal domain reconstruction features of the data after channel label masking, and introduce a channel attention mechanism to enhance the spatiotemporal domain features and generalization ability of the model; at the same time, use the CNN network to further extract the deep features of the selected frequency domain data.

[0071] The extracted deep features are concatenated with the spatiotemporal features to obtain the final multi-feature domain features.

[0072] The final multi-feature domain features are input into the classifier, which is then mapped to the classification space by two fully connected layers and an activation function to generate the final detection result.

[0073] Step 5: Train the model consisting of the AE network, channel attention mechanism, CNN network and classifier using the designed multi-class loss function.

[0074] The multi-class loss function employs a label splitting mechanism to process different labels separately, while combining an adaptive weight adjustment strategy to further optimize the model's decision boundary, ensuring that the model can effectively suppress interference from noisy labels during training and enhance its ability to identify the true category.

[0075] Step 6: Apply the loss function proposed in Step 5 and implement multi-artifact detection of EEG signals on test data.

[0076] The specific implementation of step 1 is as follows:

[0077] Step 1-1: Obtain real EEG patient data, including 18 children with BECTS syndrome, aged between 7 and 13 years. Collect 21-channel EEG data conforming to the international 10-20 system, with a sampling frequency of 1000Hz;

[0078] Steps 1-2: Use 50Hz power frequency filtering and 1-70Hz bandpass filtering to remove high-frequency signals and power interference signals, while retaining useful physiological signals;

[0079] Steps 1-3: Slice the processed signals and label them in 1-second slices, mainly labeling blink artifacts, chewing artifacts, temporal electromyography, frontal electromyography, global abnormalities, and normal EEG signals.

[0080] Steps 1-4: To reduce information redundancy and improve model training speed, use linear interpolation to downsample the sampling frequency of all slices from 1000Hz to 128Hz, and save the downsampled data for use in subsequent steps.

[0081] In one possible implementation, the preprocessing mainly includes: processing with bandpass filtering and power frequency filtering, slicing the EEG data according to artifact classification, and annotating the slices with a slice duration of 1 second to obtain labeled data. The slice annotations include blink artifacts, chewing artifacts, temporal region EMG, frontal region EMG, global abnormalities, and normal EEG signals; and downsampling the sampling frequency of all labeled data using linear interpolation.

[0082] In one possible implementation, step 2 is specifically implemented as follows:

[0083] Step 2-1: The input data is the labeled data artifact signal downsampled to 128Hz. Cross-correlation diagrams are extracted for different classifications to analyze the correlation between channels. The formula for the cross-correlation coefficient is:

[0084]

[0085] in and It is the signal at time n. and is the mean of the signal, and N is the number of samples.

[0086] Step 2-2: Based on the cross-correlation diagrams of each category, the channels are divided into artifact-related channels and other channels. Relevant features are extracted for artifact-related channels and other channels, including the maximum cross-correlation number, the cross-correlation number at zero delay, mutual information value, and average cross-correlation number. This analysis reveals the characteristic differences between artifact-related channels and other channels.

[0087] The largest cross-correlation coefficient is:

[0088] Indicates signal and In time delay The cross-correlation coefficients under the following conditions This indicates taking all delays. The maximum value among the cross-correlation coefficients.

[0089] The cross-correlation coefficient with zero delay is:

[0090] The method is the same as for calculating cross-correlation coefficients, but only cross-correlation coefficients with zero delay are calculated.

[0091] Mutual information value:

[0092] in It is a joint probability distribution. and It is a marginal probability distribution.

[0093] The average cross-correlation coefficient is:

[0094] Among them 2 +1 indicates the total amount of latency considered.

[0095] Step 2-3: Analyze the feature difference results in Step 2-2 and construct a label masking strategy. The specific strategy rules are as follows: label the channels related to artifacts normally and use multi-hot encoding to avoid redundancy caused by multiple labels; mask other channels and label them with the same label as a special type of label.

[0096] In one possible implementation, step 3 is specifically implemented as follows:

[0097] Step 3-1: Using the same input data as in Step 2-1, extract the spectrum, energy spectrum, and power spectrum for different artifacts. The spectrum and energy spectrum are extracted using Fast Fourier Transform; the power spectrum is calculated using the Welch method.

[0098] Step 3-2: Extract the frequency domain features of the spectrum, energy spectrum, and power spectrum, including peak frequency, spectral entropy, and centroid frequency.

[0099] Step 3-3: Use the power spectrum PSD with the most obvious differences as frequency domain data for subsequent analysis, draw the PSD energy map, and divide the frequency band of the power spectrum PSD data into 5 parts according to the energy intensity of the artifact-related channel and other channels: [0-4]Hz, (4-8]Hz, (8-13]Hz, (13-30]Hz, (30-70]Hz.

[0100] In one possible implementation, step 4 is specifically implemented as follows:

[0101] Step 4-1: For the data that has been masked by labels, use the AE network to extract and reconstruct features, use 3×3 convolutional kernels to extract information from adjacent channels, set a dropout layer (dropout rate of 0.25), and add bidirectional long short-term memory (BLSTM) networks to both the encoder and decoder parts of the AE network. At the same time, use the mean squared error function (MSE) as the loss function of the AE network.

[0102] Step 4-2: Using the reconstructed features extracted by the AE network in Step 4-1 as input, construct a channel attention mechanism. This mechanism consists of point convolution, channel attention, and spatial attention connected in series. The specific process is as follows:

[0103] The reconstructed features X from the input are first processed through two 1×1 point convolutions to optimize the representation.

[0104] Subsequently, channel-dimensional average pooling followed by channel-dimensional max pooling is applied, and then spatial-dimensional average pooling followed by spatial-dimensional max pooling is used to highlight relevant feature representations. Specifically:

[0105] The input feature X, optimized by point convolution, is subjected to global average pooling and global max pooling along the channel dimension, and then channel attention weights are generated using the sigmoid function. These channel attention weights are then multiplied channel-by-channel with the optimized input feature X to obtain the enhanced feature.

[0106] The enhanced features are further subjected to global average pooling and global max pooling in the spatial dimension, and spatial attention weights are generated using the sigmoid function. The spatial attention weights are then multiplied channel-by-channel with the enhanced features to obtain the spatiotemporal domain features.

[0107] Step 4-3: Use a CNN network with a kernel size of 3×3 to extract features from the PSD data after dividing the frequency bands. Similarly, set a Dropout layer (dropout rate of 0.25) and concatenate the deep features of the extracted frequency domain data with the spatiotemporal domain features to obtain the final multi-feature domain features.

[0108] Step 4-4: Input the concatenated final multi-feature domain features into the classifier, which consists of two fully connected layers and The activation function maps it to the classification space to generate the final detection result.

[0109] In one possible implementation, step 5 is specifically implemented as follows:

[0110] Step 5-1: Set the boundary margin of the loss function. and scaling factor Based on the probability distribution (0.33, 0.33, 0.33) corresponding to the blocking labels, the filtering threshold is set to... ;

[0111] Step 5-2: Constructing the multi-class loss function. The specific process is as follows:

[0112] The predicted classification results Perform tag-based traffic splitting, by comparing with filtering thresholds. The data was compared and divided into two categories, with smoothing applied to the portions below the filtering threshold:

[0113]

[0114] in Represents the true label, Dynamic weights are used to improve the model's generalization and robustness.

[0115]

[0116] in The number of training rounds for the model.

[0117] Step 5-3: Calculate the smoothed label results Intraclass residual and inter-class surplus :

[0118]

[0119]

[0120] Inter-class similarity bias Intra-class similarity bias .

[0121] Finally, calculate the final loss value. Calculation:

[0122]

[0123] in For intermediate terms in the calculation:

[0124]

[0125] Inter-class residuals Intraclass residual ; This represents the cross-entropy loss.

[0126] In one possible implementation, step 6 is specifically implemented as follows:

[0127] Step 6-1: Divide the data into training set, validation set, and test set in a 6:2:2 ratio. Input the training set and validation set into the constructed neural network model. Use MSE as the loss function of the AE network and multi-class loss function as the loss function of the classifier to adjust the model's learning of reconstructed features and classification detection respectively. Continuously improve the model's learning ability through the loss function to obtain the detection results of EEG signal segments. The recognition results of the EEG signal segments include the recognition results of five types of artifact signal segments and normal EEG signal segments.

[0128] Step 6-2: Calculate four basic parameters: true positive, true negative, false positive, and false negative. Then, calculate precision, accuracy, recall, and F1 score based on these four parameters.

[0129] Step 6-3: Construct the objective function based on the four basic parameters obtained, and iteratively adjust the weight coefficients and bias terms of the fully connected layers in the neural network through the gradient backpropagation algorithm until the preset optimization termination condition is met, and finally generate a multi-artifact detection model with the optimal classification decision surface.

[0130] In one possible implementation, the optimization termination condition is implemented using the following methods: 1. Fixed-period termination strategy: Set a maximum training period threshold of 50 training periods. The optimization process is automatically terminated when the cumulative number of backpropagation iterations reaches the threshold. 2. Early termination strategy: Set a sliding window period M (M=3). Early termination is triggered when the relative improvement rate of the validation set F1 value does not exceed 1% within M consecutive training periods. Simultaneously configure the fixed-period threshold and the dynamic early termination mechanism, prioritizing the dynamic early termination condition. If the early termination condition is not triggered, a 50-period forced termination strategy is implemented.

[0131] Figure 2 This is a performance evaluation diagram for the practical application of the present invention.

[0132] The test data came from real patient EEG data in hospitals, and was compared with several mainstream detection algorithms. The specific experimental results are as follows:

[0133] The experimental data sampling frequency was 1000Hz, and the data was divided according to the artifact category. Parameters such as data input length and sampling frequency were adjusted according to experimental requirements. The EEG general compact convolutional neural network proposed by Vernon J et al. in 2018 achieved a recall of 76.35% and an F1 score of 85.93% on the dataset; the neonatal artifact detection method based on multi-task multi-channel proposed by Tim Hermans et al. in 2023 achieved a recall of 77.61% and an F1 score of 84.87% on the dataset; the artifact detection method based on the early exit paradigm proposed by Lorena Qendro et al. in 2021 achieved a recall of 79.77% and an F1 score of 86.43% on the dataset; the present invention achieved a recall of 86.32% and an F1 score of 90.99% on the dataset. Figure 3The image shown is an example of artifact detection performance in an embodiment of the present invention. By mining the potential information between different feature domains, the performance of the artifact classification network is significantly improved. The introduction of a channel masking method, combined with a multi-classification loss function, effectively improves the artifact detection performance in complex noise environments. The present invention has superior performance compared to current multi-artifact detection models on real data.

[0134] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0135] The various embodiments in this specification are described in a related manner. Each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other.

[0136] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

Claims

1. A semi-supervised multi-artifact detection method based on channel shielding and multiple feature domains, characterized in that, Includes the following steps: Collect EEG data from real BECTS patients and preprocess the raw input signals; Channel correlation analysis is performed on the preprocessed data. Based on the analysis results, channels are divided and relevant features are extracted. Then, channel labeling is performed. Extract the spectrum, energy spectrum, and power spectrum of the preprocessed data and obtain the corresponding frequency domain features. At the same time, analyze the feature differences and performance indicators of the frequency domain features of the spectrum, energy spectrum, and power spectrum, and select the frequency domain data with the most obvious differences and the best performance indicators for frequency band division. The spatiotemporal domain reconstruction features of the data after channel label masking are extracted using an AE network, and a channel attention mechanism is introduced to enhance the spatiotemporal domain features and generalization ability of the model. At the same time, a CNN network is used to further extract the deep features of the selected frequency domain data. The extracted deep features are concatenated with the spatiotemporal domain features to obtain the final multi-feature domain features. The final multi-feature domain features are input into the classifier, which is then mapped to the classification space by two fully connected layers and an activation function to generate the final detection result. The model consisting of an AE network, a channel attention mechanism, a CNN network, and a classifier was trained using a designed multi-class loss function. The multi-class loss function employs a label splitting mechanism to process different labels separately, while combining an adaptive weight adjustment strategy to further optimize the model's decision boundary.

2. The method for semi-supervised multi-feature domain artifact detection based on channel shielding according to claim 1, characterized in that, Preprocessing mainly includes: using bandpass filtering and power frequency filtering to process the EEG data into slices according to artifact classification, and labeling the slices with a slice duration of 1 second to obtain labeled data. The slice labels include blink artifacts, chewing artifacts, temporal region electromyography, frontal region electromyography, global abnormalities, and normal EEG signals; and using linear interpolation to downsample the sampling frequency of all labeled data.

3. The method for semi-supervised multi-feature domain artifact detection based on channel shielding according to claim 1, characterized in that, The specific implementation of the channel label blocking is as follows: Based on the downsampled labeled data, cross-relationship graphs were extracted for different categories. Based on the cross-correlation diagrams of each category, the channels are divided into artifact-related channels and other channels. The relevant features of artifact-related channels and other channels are extracted, including the maximum cross-correlation number, the cross-correlation number at 0 time delay, the mutual information value, and the average cross-correlation number. The feature differences between artifact-related channels and other channels are analyzed from this. Based on the feature difference results, a label masking strategy is constructed. The specific strategy rules are as follows: the channels related to artifacts are labeled normally and multi-hot encoding is used to avoid redundancy caused by multiple labels; other channels are masked and labeled with the same label as a special type of label.

4. The method for semi-supervised multi-feature domain artifact detection based on channel shielding according to claim 3, characterized in that, Selecting frequency domain data and dividing it into frequency bands is implemented as follows: Spectrum, energy spectrum, and power spectrum were extracted from different artifacts, with the spectrum and energy spectrum extracted using Fast Fourier Transform. The power spectrum was calculated using the Welch method. Extract frequency domain features of the spectrum, energy spectrum, and power spectrum, including peak frequency, spectral entropy, and centroid frequency; The power spectrum PSD with the most significant differences was used as the frequency domain data for subsequent analysis. The PSD energy map was plotted, and the frequency bands of the power spectrum PSD data were divided into 5 parts according to the energy intensity of the artifact-related channel and other channels: [0-4]Hz, (4-8]Hz, (8-13]Hz, (13-30]Hz, and (30-70]Hz.

5. The method for semi-supervised multi-feature domain artifact detection based on channel shielding according to claim 4, characterized in that, The specific implementation of multi-feature domain feature extraction is as follows: For data that has been masked by labels, the AE network is used to extract and reconstruct features. 3×3 convolutional kernels are used to extract information from adjacent channels. A dropout layer is set up, and bidirectional long short-term memory networks are added to both the encoder and decoder parts of the AE network. Simultaneously, the mean squared error function is used as the loss function for the AE network; The reconstructed features extracted by the AE network are used as input to construct a channel attention mechanism, which consists of point convolution, channel attention, and spatial attention connected in series. The specific process is as follows: The reconstructed features X from the input are first processed through two 1×1 point convolutions to optimize the representation. Subsequently, channel-dimensional average pooling followed by channel-dimensional max pooling is applied, and then spatial-dimensional average pooling followed by spatial-dimensional max pooling is applied to highlight relevant feature representations; specifically: The input feature X optimized by point convolution is subjected to global average pooling and global max pooling in the channel dimension, and channel attention weights are generated by the sigmoid function. The channel attention weights are multiplied with the input feature X optimized by point convolution channel by channel to obtain the enhanced feature. The enhanced features are further subjected to global average pooling and global max pooling in the spatial dimension, and spatial attention weights are generated by the sigmoid function. The spatial attention weights are multiplied with the enhanced features channel by channel to obtain the spatiotemporal features. A CNN network with a kernel size of 3×3 is used to extract features from the PSD data after the frequency bands are divided. Similarly, a Dropout layer is set to concatenate the deep features of the extracted frequency domain data with the spatiotemporal domain features to obtain the final multi-feature domain features.

6. A multi-feature domain semi-supervised multi-artifact detection method based on channel shielding according to claim 1 or 5, characterized in that, The process of constructing the multi-class loss function is as follows: Set the boundary margin of the loss function and scaling factor And set the filtering threshold according to the probability distribution of the blocking labels; The predicted classification results Perform tag-based traffic splitting, by comparing with filtering thresholds. The data was compared and divided into two categories, with smoothing applied to the portions below the filtering threshold: ; in Represents the true label, Dynamic weights are used to improve the model's generalization and robustness. ; in Training epochs for the model; Calculate the label results after smoothing. Intraclass residual and inter-class surplus : ; ; Inter-class similarity bias Intra-class similarity bias Finally, calculate the final loss value. Calculation: ; in For intermediate terms in the calculation: ; Inter-class residuals Intraclass Residual This represents the cross-entropy loss.

7. The method for semi-supervised multi-feature domain artifact detection based on channel shielding according to claim 6, characterized in that, The specific implementation of model training is as follows: The data is divided into training set, validation set and test set. The training set and validation set are input into the constructed neural network model. MSE is used as the loss function of the AE network and multi-class loss function is used as the loss function of the classifier. The model's learning of reconstructed features and classification detection is adjusted respectively. The learning ability of the model is continuously improved through the loss function, thereby obtaining the detection results of EEG signal segments. The recognition results of the EEG signal segments include the recognition results of five types of artifact signal segments and normal EEG signal segments. The statistics are based on four basic parameters, which include true yang, true yin, false yang, and false yin. It calculates accuracy, precision, recall, and F1 score based on four basic parameters; Based on the four basic parameters obtained, an objective function is constructed. The weight coefficients and bias terms of the fully connected layers in the neural network are iteratively adjusted through the gradient backpropagation algorithm until the preset optimization termination condition is met, and finally a multi-artifact detection model with the optimal classification decision surface is generated.

8. The method for semi-supervised multi-feature domain artifact detection based on channel shielding according to claim 7, characterized in that, The implementation method of the optimization termination condition is as follows:

1. Fixed period termination strategy: Set a maximum training period threshold, and automatically terminate the optimization process when the cumulative number of backpropagation iterations reaches the threshold; 2. Early termination strategy: Set the sliding window period M. When the relative improvement rate of the F1 value on the validation set does not exceed 1% within M consecutive training periods, early termination is triggered. Simultaneously configure a fixed periodic threshold and a dynamic early stop mechanism, prioritizing the execution of dynamic early stop conditions, and executing the fixed periodic termination strategy when the early stop conditions are not triggered.