A pre-processing method based on high-pollution children's electroencephalogram data
By employing a preprocessing workflow that combines multi-channel voting, PCHIP interpolation repair, and adaptive Bayesian wavelet denoising, the problem of artifact handling in highly polluted children's EEG data was solved, achieving efficient data reconstruction and preservation of classification features, thus improving the accuracy of subsequent analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING UNIV OF POSTS & TELECOMM
- Filing Date
- 2026-05-06
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies for processing highly contaminated children's EEG data suffer from problems such as misjudgment of artifact detection, data loss, and inapplicability to adult EEG preprocessing methods. These issues make it difficult to effectively remove complex artifacts from children's EEG data, affecting the reliability of subsequent analysis.
A robust motion artifact detection method based on a multi-channel voting mechanism was adopted, combined with PCHIP interpolation repair and adaptive Bayesian wavelet denoising. A preprocessing workflow was designed, including bandpass filtering and independent component analysis, to process various artifacts in children's EEG data.
It significantly improved the processing efficiency and consistency of EEG data from children with high pollution levels. Through evaluation of frequency band retention rate and weighted signal-to-noise ratio, the accuracy of subsequent classification tasks reached 96.4% to 100%, effectively preserving the classification features in the EEG signals.
Smart Images

Figure CN122132690A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of electroencephalogram (EEG) signal processing technology, especially the field of preprocessing of children's EEG signals, specifically a preprocessing method based on highly polluted children's EEG data. Background Technology
[0002] Attention refers to a person's ability to direct and concentrate their mental activity on a specific object, and it is crucial for higher cognitive activities such as learning, decision-making, and social interaction. Electroencephalogram (EEG) signals contain rich physiological and pathological information about the human body, reflecting the functional state of the brain. Since the discovery of EEG signals, EEG analysis technology has become an important technique for studying the neural mechanisms of attention due to its high temporal resolution, and it also has unique advantages in research on children's cognitive development.
[0003] However, the acquisition and processing of children's EEG data faces significant challenges. Because children's nervous systems are not yet fully developed and their self-control is weak, they are prone to large-scale head movements, limb movements, and facial muscle tension during sustained attention tests. This results in two prominent interference signals in the acquired EEG signals, in addition to common artifacts from electrooculography (EOG) and electrocardiography (ECG): first, electrode-scalp impedance changes caused by head and body movements, forming long-term low-frequency drifts or step abrupt changes in motion artifacts (<5Hz); second, high-frequency random spike signals generated by involuntary facial and neck muscle movements, i.e., electromyography (EMG) artifacts (5-500Hz). Their frequency bands largely overlap with the effective frequency range of EEG signals (0.5-40Hz). Improper processing of these artifacts will directly affect the reliability of subsequent analysis.
[0004] Existing technologies for artifact removal from highly polluted children's EEG signals have the following shortcomings:
[0005] (1) Traditional single-channel artifact detection methods are prone to misjudgment. Existing methods are mostly based on the variance threshold or mutation point detection of single-channel signals to identify motion artifacts. However, the normal EEG rhythm of children fluctuates greatly, and pathological activities such as epileptic seizures can also cause a sudden increase in signal amplitude or variance. Single-channel detection is difficult to distinguish between artifacts and real EEG activity, which can easily lead to misjudgment or missed judgment.
[0006] (2) Deletion of bad segments or channels results in data loss. For heavily contaminated EEG data, existing technologies often use the method of directly removing bad segments or deleting related channels. Although this method is simple to operate, it has a particularly significant impact on acquisition devices with a limited number of channels (such as the 19-channel system commonly used in this field). Deleting a channel means the permanent loss of EEG information in that area, which cannot be recovered through subsequent processing.
[0007] (3) Adult EEG preprocessing methods are not suitable for children. Traditional preprocessing methods are mostly designed for adult data and often assume that artifacts are relatively simple, short-lived, or have fixed frequency band characteristics. However, motor artifacts in children's EEG data are long-lasting, and EMG artifacts have wide frequency bands. They are often superimposed with multiple artifacts such as EEG and ECG, presenting complex combinations. It is difficult to fully remove these complex and persistent artifact combinations using adult data processing strategies.
[0008] To address the aforementioned problems, this invention proposes a preprocessing method for highly polluted children's EEG data. Robust motion artifact detection based on a multi-channel voting mechanism overcomes the sensitivity of single-channel detection to transient noise through multi-channel joint decision-making, avoiding misjudgments. PCHIP interpolation restoration replaces traditional bad segment removal, automatically repairing damaged data while preserving the original signal variation trend, avoiding data loss caused by channel deletion. Combined with adaptive Bayesian wavelet denoising, considering the wide bandwidth and non-stationarity of children's EMG artifacts, an adaptive threshold is determined through a Bayesian framework, effectively suppressing EMG noise while preserving the effective components of the EEG. This invention aims to solve the preprocessing challenges of children's EEG data in high-noise environments, improve data quality, and promote in-depth research on children's attention.
[0009] The following prior art has been retrieved and compared with the present invention one by one.
[0010] The prior art CN109646022A, a children's attention assessment system and method, is compared with the technology of this invention as follows:
[0011] 1. The preprocessing procedure used in CN109646022A for children's EEG signals only involves average value filtering, Rheinda criterion for removing bad pixels, and Savitzky-Golay filtering. It only deals with bad pixels and does not address the complex processing of highly contaminated children's EEG data. Furthermore, the acquired EEG channels only focus on frontal EEG, which cannot cover the situation in multi-channel EEG data. In contrast, the data acquisition of this invention is based on 19 channels, and the distribution conforms to the internationally accepted 10-20 system standard electrode placement method. For various complex EEG artifacts, it proposes a complete preprocessing procedure that includes robust motion artifact removal, PCHIP interpolation repair, adaptive Bayesian wavelet denoising, independent component analysis, and bandpass filtering based on a multi-channel voting mechanism. This can more effectively and specifically process highly contaminated children's EEG data.
[0012] 2. CN109646022A focuses on classifying the attention values output by the device to achieve attention judgment, examining the intensity of attention as the attention state. In contrast, this invention focuses on processing severely interfered raw EEG signals into clean EEG signals, reducing data loss during artifact processing. The classification and recognition in this invention are only used for verification, and the verification method includes not only state classification but also objective indicators such as bandwidth retention rate and weighted signal-to-noise ratio. Therefore, the technical objectives of the two inventions do not overlap.
[0013] The prior art CN114010205A3D Attention Residual Deep Network Auxiliary Analysis Method for Childhood Epilepsy Syndrome is compared with the technology of this invention as follows:
[0014] 1. The EEG data processing workflow in CN114010205A involves first extracting EEG data during an epileptic seizure, then performing baseline correction, and finally using notch filters to remove 50Hz power line interference and the 0.5Hz to 70Hz frequency band to obtain clean EEG signals. Its baseline correction is based solely on polynomial fitting to determine the trend, without the complex process of motion artifact removal and PCHIP interpolation repair specific to the multi-channel voting mechanism. Its preprocessing workflow is also relatively simple. In contrast, this invention proposes a comprehensive preprocessing workflow for various complex EEG artifacts, including robust motion artifact removal, PCHIP interpolation repair, adaptive Bayesian wavelet denoising, independent component analysis, and bandpass filtering, specifically addressing multiple artifacts and reducing data loss in complex, highly contaminated EEG preprocessing scenarios.
[0015] 2. CN114010205A focuses on deep learning model architecture and classification tasks, with preprocessing as merely an auxiliary step. It does not provide a dedicated quantitative evaluation of the preprocessing effect and cannot handle highly contaminated artifacts. The core innovation of this invention lies in the preprocessing method itself, and it objectively and quantitatively evaluates the denoising effect using metrics such as bandwidth retention rate and weighted signal-to-noise ratio. The two inventions differ primarily in their main technical contributions. Summary of the Invention
[0016] To address the shortcomings of existing technologies in preprocessing highly contaminated pediatric EEG data, this invention provides a preprocessing method for such data. Specifically, considering the prevalence of numerous electromyographic artifacts and long-term motor artifacts in children's sustained attention tests, this invention proposes a robust motor artifact detection method based on a multi-channel voting mechanism. This method overcomes the sensitivity of single-channel detection to transient noise through multi-channel joint decision-making, automatically identifying time periods requiring restoration. Simultaneously, a comprehensive preprocessing workflow integrating PCHIP interpolation restoration, adaptive Bayesian wavelet denoising, bandpass filtering, and independent component analysis is designed. This method achieves end-to-end processing from raw data input to clean EEG signal output, enabling batch preprocessing of highly contaminated pediatric EEG data, significantly improving processing efficiency and result consistency. The effectiveness of this workflow is validated on real pediatric sustained task EEG data, demonstrating excellent performance in terms of bandwidth retention and weighted signal-to-noise ratio. In subsequent classification tasks, the average classification accuracy reaches 96.4%, with a maximum of 100%, effectively solving the preprocessing challenge of pediatric EEG data in high-noise environments.
[0017] This invention proposes a preprocessing method based on highly polluted children's electroencephalogram (EEG) data, comprising the following steps:
[0018] Step 1, Experimental Task Design: Based on the continuous operation test of audiovisual integration, three attention tasks were set up, namely visual attention task, auditory attention task and audiovisual integration task;
[0019] Step 2, EEG signal acquisition: EEG signals of children are acquired simultaneously with three attention tasks using an EEG acquisition device;
[0020] Step 3, EEG signal preprocessing: Preprocess the highly contaminated raw EEG signals obtained;
[0021] Step 4: Quantitative evaluation of preprocessing effect: Based on the preprocessed EEG signals, calculate the frequency band retention rate and weighted signal-to-noise ratio to quantitatively evaluate the preprocessing effect;
[0022] Step 5, Feature Extraction: Extract permutation entropy as a feature parameter to construct a multi-channel feature vector;
[0023] Step 6, Classification and Verification: Import the feature vector obtained in Step 5 into the classifier to identify and verify the attention task state.
[0024] Furthermore, the experimental task in step 1 includes: collecting three attention tasks using audiovisual integration continuous operation test software, each task lasting 12 minutes; requiring children to click on the target on the screen when they see or hear a specified target number; requiring children to sit comfortably and relax before the test; and giving a 5-minute rest time between each task for adjustment.
[0025] Furthermore, in step 2, the requirements for experimental subjects and equipment during EEG signal acquisition are as follows:
[0026] (1) Subjects: Children aged 6-12 years were selected as subjects. All subjects had normal vision or corrected vision and no history of attention deficit or related neurological diseases. Parents were informed of the detailed test procedure before the test.
[0027] (2) Experimental equipment: A multi-channel EEG acquisition instrument was used, with a sampling frequency of 512Hz and 19 channels. The electrode distribution conformed to the internationally accepted 10-20 system standard electrode placement method.
[0028] Furthermore, in step 3, the highly contaminated raw EEG signals are preprocessed, specifically including the following sub-steps:
[0029] Step 3.1, Motion artifact detection based on a multi-channel voting mechanism: Calculate the dynamic threshold of each channel signal, obtain the instantaneous change of the signal through first-order difference operation, and mark the starting point of motion artifacts when the number of channels exceeding the threshold reaches a preset proportion. Then, extend the marked interval in time to obtain the complete artifact time period marking; specifically including:
[0030] (1) Dynamic threshold calculation: For multi-channel EEG data matrix X∈R N×T Calculate the standard deviation of each channel along the time dimension, where N is the number of channels and T is the number of time points. Let the time series of the i-th EEG channel data be denoted as . Calculate the standard deviation of each channel along the time dimension. :
[0031] ;
[0032] The median of the standard deviations of all channels Using this as a benchmark, and referring to the parameter settings for abrupt slope detection in existing statistical threshold-based artifact detection methods, an empirical coefficient α = 3.5 is set to obtain the global motion threshold τ:
[0033] τ = α·median( );
[0034] (2) Abrupt change detection: Perform first-order difference operation on each channel along the time direction to obtain the instantaneous change of the signal:
[0035] ;
[0036] in This represents the instantaneous change of the i-th channel at time t; artifacts are identified through a multi-channel voting mechanism: for each time point t, the following is statistically satisfied. If the number of channels reaches 30% of the total number of channels, then time t is marked as the starting point of the motion artifact, that is:
[0037] ;
[0038] in This is an indicator function that takes the value 1 when the condition is true and 0 otherwise.
[0039] (3) Marking interval expansion: After obtaining the above-mentioned pseudo-trace starting point marking sequence Then, the isolated starting point is expanded into a complete time period. The expansion operation is defined as follows:
[0040] ;
[0041] Where V represents the logical OR operation, and L = 0.1 × f s , where f s The sampling frequency is defined as follows: if at least one artifact start point exists within the neighborhood [t-[L / 2], t+[L / 2]] of time t, i.e., M... init =1, then time t is marked as a point within the pseudotrace period; when tk<1 or tk>T, M init [tk] is filled with 0;
[0042] After the above extended operation, M[t]=1 indicates that time t is within the artifact period, and M[t]=0 indicates that it is not within the artifact period;
[0043] Step 3.2, PCHIP Interpolation Repair: Based on the artifact time period markers obtained in Step 3.1, the segmented cubic Hermite interpolation method is used to automatically repair the signal segments containing motion artifacts, reconstructing the damaged data while preserving the original signal change trend; specifically including:
[0044] (1) Definition of valid data points: Let the time series of the c-th channel be... t∈[1,T], that is, the c-th row vector of the data matrix X Based on the pseudo-trace period marker M[t] obtained in step 3.1, define the set of valid data points Ω={t|M[t]=0} and the set of pseudo-trace points Ω'={t|M[t]=1}; when |Ω|≥3 and Ω' is not empty, that is, when the valid data points are sufficient to support the interpolation calculation and there are pseudo-trace segments that need to be repaired, perform PCHIP interpolation repair.
[0045] (2) PCHIP interpolation principle and formula derivation: Piecewise cubic Hermite interpolation polynomial PCHIP is a shape-preserving interpolation method. It constructs a cubic polynomial on each subinterval so that the interpolation function maintains the given function value and derivative value at the nodes, while ensuring that the monotonicity of the overall curve is consistent with the original data.
[0046] For any interpolation interval [ , Let the function values at the two endpoints be respectively , The derivative values are respectively , The cubic Hermite interpolation polynomial has the following form:
[0047] ;
[0048] in For the normalization parameters, the four Hermite basis functions are as follows: , , , ;
[0049] (3) Signal reconstruction: Based on the above interpolation method, the original signal Repaired signal It is given by the following formula;
[0050] ;
[0051] in It is defined in the interval [t] i ,t i+1 cubic Hermite polynomial basis functions on ) For indicator functions, when (t i ,t i+1 The value is 1 if the condition is met, and 0 otherwise; n is the number of valid data points. The time coordinates corresponding to the valid data points;
[0052] Step 3.3, Adaptive Bayesian Wavelet Denoising: An adaptive Bayesian wavelet denoising method based on discrete wavelet transform is adopted, using the db5 wavelet basis for multi-scale decomposition of the signal. An adaptive threshold is determined through a Bayesian framework, and a soft thresholding rule is used to nonlinearly shrink the detail coefficients, suppressing electromyographic noise while preserving effective electroencephalogram (EEG) components; specifically including:
[0053] (1) Wavelet basis selection and discrete wavelet transform: The db5 wavelet basis is selected for the repair signal obtained in step 3.2. Perform discrete wavelet transform; the decomposition expression of discrete wavelet transform is:
[0054] ;
[0055] Where c J,k d is an approximation coefficient, representing the effective frequency band of EEG; j,k The detail factor includes electromyography artifacts; and ψ j,k [t] represents the scaling function and the wavelet function, respectively, and J is the maximum number of decomposition levels;
[0056] (2) Noise standard deviation estimation: The key to wavelet denoising is to set a reasonable threshold to distinguish between effective signals and noise; for the j-level detail coefficients It is necessary to estimate the standard deviation of the noise in this layer. The median estimation method is used to robustly estimate the noise level of the detail coefficients.
[0057] ;
[0058] Where 0.6745 is the median of the standard normal distribution. with standard deviation The ratio factor;
[0059] (3) Adaptive threshold calculation: A Bayesian framework is introduced, assuming that the detail coefficients follow a generalized Gaussian distribution. The adaptive threshold for each scale is determined by minimizing the Bayesian risk criterion. For the detail coefficients of the j-th layer, the Bayesian adaptive threshold is given by the following formula:
[0060] ;
[0061] in Here is the noise variance estimate for the detail coefficients of the j-th layer. The standard deviation estimate of the original noiseless signal of layer j is obtained by... calculate, Let be the variance of the noisy detail coefficients in the j-th layer;
[0062] (4) Soft threshold shrinkage processing: After obtaining the layered threshold, it is necessary to select an appropriate threshold function to process the detail coefficients; the soft threshold rule is used to perform nonlinear shrinkage of the detail coefficients;
[0063] ;
[0064] in These are the original detail coefficients. These are the detail coefficients after thresholding.
[0065] (5) Signal reconstruction: Reconstructing the detail coefficients after thresholding. Compared with the original approximation coefficient Combined, the denoised EEG signal was reconstructed using inverse discrete wavelet transform. :
[0066] ;
[0067] Step 3.4, Bandpass Filtering and Independent Component Analysis: Perform zero-phase bandpass filtering on the signal processed in Step 3.3, retaining the 0.5-40Hz frequency band range and removing baseline drift interference; perform independent component analysis on the filtered signal to identify and manually remove residual artifacts such as electrooculogram (EOG) and electrocardiogram (ECG), delete bad segments, and obtain a clean EEG signal.
[0068] Furthermore, step 4 involves a quantitative evaluation of the preprocessing effect, specifically including the following sub-steps:
[0069] Step 4.1, Band Retention Rate Calculation: Extract EEG signals before and after preprocessing, respectively. Obtain the power spectral density of each signal through power spectrum estimation, divide the signal into four frequency bands: δ, θ, α, and β. Calculate the power ratio of each frequency band after preprocessing to that before preprocessing to obtain the band retention rate of each frequency band; specifically including:
[0070] First, the power spectral density of the original signal and the denoised signal are integrated in the δ, θ, α, and β EEG bands, respectively, and then their ratio is calculated as the retention rate index.
[0071] For frequency band Its power spectral density integral is defined as:
[0072] ;
[0073] ;
[0074] in and These represent the power spectral densities of the original signal and the denoised signal, respectively. and These are the upper and lower frequency limits of frequency band b, respectively; and Let represent the power of the original signal and the denoised signal within frequency band b, respectively; the formula for calculating the frequency band retention rate is as follows:
[0075] ;
[0076] in This is the machine accuracy threshold, which is a very small value;
[0077] Step 4.2, Weighted Signal-to-Noise Ratio Calculation: Extract the denoised signal and noise components. The noise component is the difference between the original signal and the denoised signal. Obtain the power spectral density of both components through power spectral estimation. Calculate the signal-to-noise ratio for each frequency band, apply equal weights to the signal-to-noise ratio of each band, and average them. After logarithmic transformation, obtain the weighted signal-to-noise ratio. The specific calculation steps are as follows:
[0078] (1) Noise component extraction: First, the denoised signal and noise component are extracted; let the original acquired C-th channel EEG signal be... For ease of description, the final clean signal obtained after preprocessing in step 3 will still be denoted as... Then the noise component Defined as the difference between the original signal and the denoised signal:
[0079] ;
[0080] (2) Power spectral density estimation: Welch power spectral density estimation method is adopted. Welch method performs segmented windowing, overlap processing and periodogram averaging on the signal. Its calculation formula is:
[0081] ;
[0082] in Let M be the length of the i-th signal segment, K be the total number of segments, and w[n] be the window function. The window function energy normalization factor is used; the power spectral density of the denoised signal and the noise component are obtained using this method. and ;
[0083] (3) Frequency band division and signal-to-noise ratio calculation: Divide the EEG feature into four frequency bands: δ, θ, α, and β; for each frequency band b, calculate the signal-to-noise ratio within that frequency band;
[0084] ;
[0085] in Represents a very small positive number;
[0086] (4) Weighted signal-to-noise ratio calculation: Apply equal weights to the SNR of each frequency band. Where N is the number of frequency bands, the final weighted signal-to-noise ratio is obtained after logarithmic transformation;
[0087] ;
[0088] Step 4.3, Multi-channel comprehensive evaluation: Repeat steps 4.1 and 4.2 for all channels to obtain the bandwidth retention rate and weighted signal-to-noise ratio of each channel. The overall preprocessing effect is obtained by summing and averaging.
[0089] Furthermore, in step 5, the specific operation of feature extraction is as follows: the preprocessed EEG signal is segmented according to different attention tasks, each segment is framed using a sliding window, permutation entropy is selected as a feature parameter, permutation entropy is calculated for the EEG signal of each channel, and a multi-channel feature vector is constructed by combining all channels; specifically including:
[0090] (1) Data framing: The preprocessed EEG signal is segmented according to different attention tasks, and framing is performed with a sliding window length of 5 seconds and a step size of 2.5 seconds; the sampling frequency is 512Hz, and each frame contains 512×5=2560 data points; the frames are overlapped by sliding window.
[0091] (2) Permutation entropy calculation: Permutation entropy is a nonlinear method for measuring the complexity of a time series. It transforms a continuous signal into a symbol sequence by comparing the relative magnitudes of adjacent points and statistically analyzing the probability of each permutation pattern. Its calculation formula is as follows:
[0092] ;
[0093] Where p i Let m be the probability of the i-th permutation pattern, and let m be the embedding dimension, which ranges from 3 to 6.
[0094] (3) Feature vector construction: Calculate the permutation entropy of the EEG signal for each channel, and combine all 19 channels to form a 19-dimensional feature vector.
[0095] Furthermore, in step 6, the specific operations for classification identification and verification are as follows: the samples of each subject are randomly shuffled and divided into training set and test set according to the proportion; the features of the training set are standardized; a classifier is used for training and the classification performance is evaluated through five-fold cross-validation; the trained classifier model is applied to the test set, and the classification accuracy is calculated to verify the effectiveness of the preprocessing method for downstream classification tasks.
[0096] Compared with the prior art, the present invention has the following beneficial effects:
[0097] (1) The present invention overcomes the sensitivity of single-channel detection to transient noise by using a motion artifact detection method based on a multi-channel voting mechanism, and can automatically identify the time period that needs to be repaired, thus avoiding data loss caused by deleting channels in traditional methods;
[0098] (2) This invention effectively suppresses a large number of electromyographic artifacts and long-term motion artifacts mixed in children's EEG data by organically combining PCHIP interpolation repair and adaptive Bayesian wavelet denoising, and achieves high-quality signal reconstruction while preserving the original signal change trend.
[0099] (3) This invention uses the dual evaluation indicators of frequency band retention rate and weighted signal-to-noise ratio to quantitatively verify the preprocessing effect and provide an objective basis for subsequent analysis;
[0100] (4) The present invention was verified by downstream classification tasks. On a test set with a sample mean of 205, the average classification accuracy reached 96.4%, and the highest was 100%. This shows that the preprocessing method of the present invention effectively preserves the classification features in the EEG signal and significantly improves the accuracy and reliability of subsequent classification tasks. Attached Figure Description
[0101] Figure 1 This is a schematic diagram of highly contaminated children's electroencephalogram (EEG) data in this invention; Figure 2 This is a schematic diagram of the EEG data preprocessing workflow of the present invention; Figure 3 This is a comparison of the waveforms before and after full-time noise reduction of the Fp1 channel in this invention; Figure 4 This is a comparison diagram of the waveforms in the 135-140s interval of the entire channel before and after the processing in steps 3.1 to 3.3 of this invention; Figure 5 This is a comparison diagram of the waveforms in the 351-356s interval of the entire channel before and after the processing in steps 3.1 to 3.3 of the present invention; Figure 6 Comparison of EEG waveforms before and after ICA component removal in this invention (351-356s). Figure 7 This is a graph showing the calculation results of the retention rate of frequency band components of each rhythm wave in the entire channel of this invention; Figure 8 Box plots showing the frequency band retention rates of the δ, θ, α, and β rhythmic waves of this invention on different attention tasks; Figure 9 This is a graph showing the weighted signal-to-noise ratio calculation results for each channel in this invention; Figure 10 This is a comparison chart of the weighted signal-to-noise ratio of each subject under different tasks in this invention; Figure 11 This is a distribution diagram of the number of training data samples for the three attention tasks of this invention; Figure 12 This is a graph showing the classification accuracy results of the training data of each subject in this invention on five classifiers. Figure 13 The graph shows the classification accuracy results of each subject in this invention on the test set using the medium Gaussian SVM classifier. Detailed Implementation
[0102] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments, but the scope of protection of the present invention is not limited to the embodiments described.
[0103] This embodiment provides a preprocessing method based on highly polluted children's electroencephalogram (EEG) data, which specifically includes the following steps:
[0104] Step 1: Experimental task design;
[0105] This step involves designing experimental tasks to stimulate children's attention. The Audiovisual Integration Consistent Performance Test (IVA-CPT) software, manufactured by Braintrain, was used to set up three attention tasks: a visual attention task, an auditory attention task, and an integrated audiovisual task. Each task lasted 12 minutes, requiring children to tap the screen to target a specified number when they saw or heard it. A 5-minute rest period was provided between each task for adjustment.
[0106] Step 2: EEG signal acquisition;
[0107] This step was used to collect children's EEG signals while the experimental task was being conducted. The subjects were six children aged 6-12 years (4 boys and 2 girls), and all parents gave informed consent before the test. The data acquisition equipment used was a multi-channel EEG acquisition instrument manufactured by Nanjing Weisi Medical Technology Co., Ltd., with a sampling frequency of 512Hz, 19 channels, and electrode distribution conforming to the international 10-20 system standard. Specifically, the electrodes included Fp1 and Fp2 in the prefrontal cortex, F3, F4, and Fz in the frontal lobe, F7 and F8 at the frontotemporal junction, T3 and T4 in the temporal lobe, C3, C4, and Cz in the central region, P3, P4, and Pz in the parietal lobe, and O1 and O2 in the occipital lobe. Sufficient conductive gel was injected into the electrodes before acquisition to ensure that the resistance of all electrodes decreased to approximately 10kΩ.
[0108] Because children are prone to physical activity during the 36-minute test, the collected EEG signals are highly contaminated. For example... Figure 1As shown, the entire signal is a mixture of various artifacts. To facilitate the identification of typical forms of each artifact, several characteristic regions are highlighted in the figure with labeled boxes: Region A shows the high-frequency random spike characteristics (5-500Hz) of EMG artifacts, accompanied by rapid amplitude fluctuations; Region B shows the low-frequency drift (<5Hz) and step-like abrupt changes of motion artifacts; Region C shows the 50Hz power frequency noise and its harmonic components under electromagnetic interference. It should be noted that the labeled regions in the figure are only to highlight the typical forms of various artifacts. In the actual entire signal, EMG artifacts, motion artifacts, electromagnetic interference, and other physiological artifacts (such as EEG and ECG) always coexist and modulate each other, forming a complex mixed contamination signal. Traditional preprocessing methods are difficult to effectively separate these artifacts, and the comprehensive preprocessing workflow proposed in this invention is urgently needed for subsequent processing.
[0109] Step 3: Preprocessing of EEG signals from children with high levels of pollution;
[0110] This step preprocesses the raw EEG signal, including motion artifact detection and repair, electromyography artifact removal, filtering, and independent component analysis. Figure 2 It demonstrates the complete preprocessing workflow.
[0111] Step 3.1: Robust motion artifact detection based on multi-channel voting mechanism;
[0112] This sub-step is used to identify periods of motion artifacts in EEG signals. Because children are prone to head or body movements during testing, resulting in low-frequency drift or step-like abrupt changes in the signal, accurate localization is necessary. Traditional single-channel detection methods are sensitive to transient noise and easily misidentify physiological activities such as epileptic seizures as artifacts. This invention proposes a joint decision-making method based on a multi-channel voting mechanism, utilizing the spatial correlation of multi-channel signals to improve detection robustness.
[0113] (1) Dynamic threshold calculation: For multi-channel EEG data matrix X∈R N×T (N is the number of channels, T is the number of time points), let the time series of the i-th EEG channel data be denoted as . Calculate the standard deviation of each channel along the time dimension. :
[0114] ;
[0115] Because the amplitude of motion artifacts in children's EEG signals is usually much higher than that of normal EEG activity, and there are differences in artifact amplitude between different channels, the median of the standard deviation of all channels is used as the median ( Using this as a benchmark, the influence of individual abnormal channels can be eliminated, ensuring threshold robustness. This median reflects the statistical fluctuation benchmark of EEG signals during periods of non-severe artifact interference. In statistical signal processing, for approximately normally distributed data, the "3-sigma criterion" is commonly used as the preliminary threshold for anomaly detection, meaning data exceeding three standard deviations from the mean are considered abnormal. Referring to the parameter settings for mutation slope detection in existing artifact detection methods based on statistical thresholds, the empirical coefficient α is set within the range of 1.5 to 6.0; with α set to 3.5, the global motion threshold τ is obtained:
[0116] τ = α·median( );
[0117] (2) Abrupt change detection: Perform first-order difference operation on each channel along the time direction to obtain the instantaneous change of the signal. The difference operation can amplify the abrupt change characteristics of the signal, making the starting point of motion artifacts more prominent. Define the difference matrix. Its elements are:
[0118] ;
[0119] in This represents the instantaneous change of the i-th channel at time t. A marker sequence is introduced to record whether each time point is determined to be the starting point of an artifact. ,in This indicates that time t is identified as the starting point of the motion threshold. Indicates a non-starting point.
[0120] Artifacts are identified using a multi-channel voting mechanism: for each time point t, the statistical results satisfy... The number of channels is determined, and if this number reaches 30% of the total number of channels, then time t is marked as the starting point of the motion artifact, i.e.:
[0121] ;
[0122] in This is an indicator function that takes the value 1 when the condition is true and 0 otherwise.
[0123] Motion artifacts are caused by head or body movement. Due to the volumetric conduction effect, the scalp potential distribution exhibits spatial smoothness, and artifact signals are typically widely distributed across most or even all recording channels. In contrast, isolated abrupt changes in a single channel often originate from local electromyographic activity, electrode contact noise, or transient electrooculography interference. Such local noise usually only involves a single channel or a very small number of channels. Therefore, there is a significant spatial difference in the distribution between global motion artifacts and local interference.
[0124] Based on the aforementioned spatial distribution differences, a threshold channel ratio of 30% was set. This ratio is significantly lower than the actual proportion of channels affected in motion artifact events, ensuring high sensitivity for detecting genuine motion artifacts; on the other hand, it is significantly higher than the number of channels that may be involved in local noise, thus effectively suppressing false alarms from single channels. From a robust statistical perspective, the collapse point of the majority voting mechanism is 50%, and the 30% threshold is lower than the upper limit of the collapse point, ensuring robustness while retaining sufficient safety margin.
[0125] (3) Marking interval expansion: After obtaining the above-mentioned pseudo-trace starting point marking sequence Subsequently, since real motion artifacts are often continuous rather than abruptly occurring at a single point, it is necessary to extend the isolated starting point to a complete time interval. The extension operation is defined as follows:
[0126] ;
[0127] Where V represents the logical OR operation, and L = 0.1 × f s , where f s The sampling frequency is used. This operation means that if at least one artifact starting point (i.e., M) exists within the nearest interval [t-[L / 2], t+[L / 2]] of time t,... init If tk = 1), then time t is marked as a point within the pseudotrace period. When tk < 1 or tk > T, M init [tk] is filled with 0.
[0128] After the above extended operation, M[t]=1 indicates that time t is within the artifact time period, and M[t]=0 indicates that it is not within the artifact time period.
[0129] Compared with traditional single-channel detection methods, multi-channel voting mechanism has the following advantages: (1) Reduced false alarm rate: Single-channel detection is prone to misjudging local physiological activities such as epileptic seizures and electromyographic spikes as motion artifacts, while multi-channel joint decision requires a certain proportion of channels to be abnormal at the same time, which can effectively distinguish between global artifacts and local interference; (2) Improved detection rate: For motion artifacts with weak amplitude but wide spatial distribution, single-channel may miss detection due to excessively high threshold settings, while multi-channel voting can achieve accurate identification through complementary spatial information; (3) Resistance to channel failure: When individual channels generate abnormal noise due to poor electrode contact, single-channel detection will generate a large number of false alarms, while multi-channel voting can effectively suppress the influence of single-channel failure through median benchmark and proportion judgment mechanism.
[0130] Step 3.2, PCHIP interpolation repair;
[0131] This sub-step is used to automatically repair the motion artifacts identified in step 3.1. Motion artifacts can cause significant signal abrupt changes or data loss, requiring appropriate interpolation methods to reconstruct the damaged data while preserving the original signal characteristics. Considering the strong non-stationarity of children's EEG signals, which contain rich physiological rhythm changes and transient event characteristics, the choice of interpolation method must balance waveform fidelity and computational stability.
[0132] (1) Definition of valid data points: Let the time series of the c-th channel be... t∈[1,T] (i.e., the c-th row vector of the data matrix X) Based on the pseudo-trace period marker M[t] obtained in step 3.1, define the set of valid data points Ω={t|M[t]=0} and the set of pseudo-trace points Ω'={t|M[t]=1}. When |Ω|≥3 and Ω' is not empty, that is, when there are enough valid data points to support interpolation calculation (at least two sub-intervals are required, corresponding to three nodes) and there are pseudo-trace segments that need to be repaired, perform PCHIP interpolation repair.
[0133] (2) PCHIP interpolation principle and formula derivation: Piecewise cubic Hermite interpolation polynomial (PCHIP) is a shape-preserving interpolation method. It constructs a cubic polynomial on each subinterval so that the interpolation function maintains the given function value and derivative value at the nodes, while ensuring that the monotonicity of the overall curve is consistent with the original data.
[0134] For any interpolation interval [ , Let the function values at the two endpoints be respectively , The derivative values are respectively , The general form of a cubic Hermite interpolation polynomial is:
[0135] ;
[0136] in For the normalization parameters, the four Hermite basis functions are as follows: , , , .
[0137] (3) Signal reconstruction: Based on the above interpolation method, the original signal Repaired signal It is given by the following formula;
[0138] ;
[0139] in It is defined in the interval [t] i ,t i+1 cubic Hermite polynomial basis functions on ) For indicator functions, when (t i ,t i+1 The value is 1 if the condition is met, and 0 otherwise. n is the number of valid data points. Let be the time coordinates corresponding to the valid data points. This expression shows that within the artifact time period Ω', the repaired signal is piecewise spliced from Hermite interpolation polynomials between adjacent valid data points, ensuring the continuity and smoothness of the entire signal.
[0140] PCHIP interpolation combines the advantages of linear interpolation and cubic spline interpolation while avoiding their respective drawbacks: (1) Compared with linear interpolation that only uses endpoint function values, PCHIP introduces first-order derivative information, ensuring the continuous differentiability of the interpolation curve and avoiding the destruction of the smoothness of the EEG signal by the "sharp corner" phenomenon; (2) Compared with cubic spline interpolation that pursues the continuity of the second derivative, PCHIP adopts shape-preserving constraints, forcing the interpolation function to maintain the same monotonicity and concavity as the original data in each sub-interval, and will not introduce "overshoot" oscillations at signal mutation points, thereby avoiding the risk of distorting the original EEG morphology. (3) In view of the characteristics of children's EEG signals being strong and non-stationary, containing multiple rhythmic wave dynamic changes and transient events, PCHIP uses local adaptive interpolation to reconstruct using only the nearest effective data points. It can not only repair the artifact segment but also retain the monotonic direction of slow wave activity and the characteristic shape of peaks and troughs, and will not obscure important physiological information such as α spindle waves or β rhythm bursts due to excessive smoothing, thus achieving an effective balance between signal fidelity and artifact removal.
[0141] Step 3.3: Adaptive Bayesian wavelet denoising;
[0142] This sub-step is used to remove the signal repaired in step 3.2. Residual EMG artifacts. EMG artifacts are mainly caused by involuntary contractions of facial and neck muscles in children during testing, manifesting as high-frequency random spike signals (5-500Hz). Their frequency band overlaps to some extent with the effective frequency range of EEG (0.5-40Hz), making them difficult to separate effectively using traditional filtering methods. Wavelet transform, with its multi-resolution analysis capabilities, can separate signals from noise at different scales, providing an effective means for removing EMG artifacts.
[0143] (1) Wavelet basis selection and discrete wavelet transform: The db5 wavelet basis is selected for the repair signal. Discrete wavelet transform is performed. The db5 wavelet belongs to the Daubechies wavelet family, possessing compact support and a 5th-order vanishing moment, effectively matching the non-stationary characteristics of EEG signals. Its waveform morphology shows high similarity to the transient spike characteristics of EMG artifacts, allowing EMG noise energy to be concentrated into a few detail coefficients during decomposition, facilitating subsequent thresholding. Its decomposition expression is:
[0144] ;
[0145] Where c J,k d is an approximation coefficient, representing the effective frequency band of EEG; j,k The detail factor includes electromyography artifacts; and ψ j,k [t] represents the scaling function and wavelet function, respectively, and J is the maximum decomposition level. Through multi-scale decomposition, signal and noise are initially separated in different frequency bands.
[0146] (2) Noise Standard Deviation Estimation: The key to wavelet denoising lies in setting a reasonable threshold to distinguish between effective signals and noise. For the detail coefficients of layer j... It is necessary to estimate the standard deviation of the noise in this layer. Because electromyography artifacts are random and non-stationary, the median estimation method is used to robustly estimate the noise level of the detail coefficients.
[0147] ;
[0148] Where 0.6745 is the median of the standard normal distribution. ) and standard deviation The ratio factor is used, and this estimation method is insensitive to outliers, effectively avoiding interference from effective signal components in noise level estimation.
[0149] (3) Adaptive Threshold Calculation: Traditional wavelet denoising often uses a fixed threshold, but using the same threshold for all scales is difficult to adapt to the time-varying characteristics of electromyographic artifacts in children's EEG signals. This invention introduces a Bayesian framework, assuming that the detail coefficients follow a generalized Gaussian distribution, and determines the adaptive threshold for each scale by minimizing the Bayesian risk criterion. For the detail coefficients of the j-th layer, its Bayesian adaptive threshold is given by the following formula:
[0150] ;
[0151] in, The noise variance estimate of the detail coefficients of the j-th layer (from step (2)) (obtained by squaring) The standard deviation estimate of the original noiseless signal of layer j is obtained by... calculate, Let be the variance of the noisy detail coefficients in the j-th layer. Compared to a fixed threshold, the Bayesian adaptive threshold can dynamically adjust according to the noise level at each scale, and is more adaptable to the non-stationary changes in electromyography artifacts.
[0152] (4) Soft threshold shrinkage processing: After obtaining the layered thresholds, it is necessary to select an appropriate threshold function to process the detail coefficients. Threshold functions are mainly divided into two types: hard threshold and soft threshold. Hard threshold sets the coefficients below the threshold to zero, while the coefficients above the threshold remain unchanged, but this will cause discontinuous oscillation points in the reconstructed signal; soft threshold shrinks the coefficients above the threshold towards zero, ensuring the smoothness of the reconstructed signal. Considering the requirement for waveform continuity in EEG signal analysis, this invention uses the soft threshold rule to nonlinearly shrink the detail coefficients;
[0153] ;
[0154] in These are the original detail coefficients. These are the detail coefficients after thresholding.
[0155] (5) Signal reconstruction: Reconstructing the detail coefficients after thresholding. Compared with the original approximation coefficient Combined, the denoised EEG signal was reconstructed using inverse discrete wavelet transform. :
[0156] ;
[0157] Reconstructed signal While preserving the original effective components of EEG, the interference of EMG artifacts was significantly suppressed. The adaptive Bayesian wavelet denoising method described above can accurately remove the time-varying characteristics of EMG artifacts in children's EEG data, providing high-quality, clean signals for subsequent analysis.
[0158] Step 3.4: Bandpass filtering and independent component analysis;
[0159] This sub-step is used to remove residual physiological artifacts after wavelet denoising, including electrooculogram (EOG) and electrocardiogram (ECG) artifacts. First, the denoised signal obtained in step 3.3 is subjected to zero-phase bandpass filtering, preserving the 0.5-40Hz frequency band. Zero-phase filtering avoids waveform distortion caused by nonlinear phase distortion, ensuring the complete preservation of the temporal characteristics of the EEG signal (such as event-related potentials). Bandpass filtering simultaneously removes low-frequency baseline drift (<0.5Hz) and high-frequency environmental noise (>40Hz), providing a higher-quality input signal for subsequent independent component analysis.
[0160] After filtering, Independent Component Analysis (ICA) was performed using the EEGLAB toolbox. ICA is a signal processing method based on blind source separation. Its core idea is to decompose multi-channel EEG signals into statistically independent non-Gaussian source components by minimizing the mutual information between output components, based on the principle of information maximization.
[0161] ICA component characteristics of electrooculography (EOG) artifacts: EOG artifacts mainly include two categories: blinking artifacts and eye movement artifacts. In the ICA decomposition results, the independent components corresponding to EOG artifacts exhibit the following typical characteristics: (1) Topographic features: The energy distribution is concentrated in the prefrontal region (Fp1 and Fp2 channels), showing a spatial distribution pattern of high amplitude in the frontal region and gradual decay towards the occipital region; (2) Waveform characteristics: Blink artifacts are characterized by short-duration, large-amplitude biphasic spikes (lasting approximately 100-200ms) with steep waveforms; eye movement artifacts are characterized by slowly changing unidirectional ramps with a longer duration (500-1000ms). (3) Power spectrum characteristics: The energy is mainly concentrated in the low frequency band (<5Hz), which overlaps with the frequency band of EEG delta waves but the amplitude is significantly higher. By identifying the above characteristics, the artifacts of electrooculography can be quickly located and eliminated.
[0162] ICA component characteristics of ECG artifacts: ECG artifacts originate from the diffusion of cardiac electrical activity to scalp electrodes via volume conduction, particularly evident at the frontal and temporal lobe electrodes. Their ICA component exhibits the following characteristics: (1) Topographic features: The energy distribution is regular, usually showing a symmetrical distribution in the bilateral temporal lobes (T3, T4) or prefrontal lobes; (2) Waveform characteristics: It presents a periodic peak waveform with a frequency consistent with the heart rate (approximately 1-1.5 Hz). The waveform morphology is similar to the QRS complex of an electrocardiogram, exhibiting regular rhythmicity. (3) Temporal distribution characteristics: It persists throughout the recording process without significant changes in event correlation. The periodicity and regularity of the waveform can effectively distinguish ECG artifacts from EEG activity.
[0163] Artifact Removal and Effect Verification: After identifying the independent components corresponding to residual artifacts such as EEG and ECG, these components are removed from the ICA decomposition results, and the remaining components are used to reconstruct the EEG signal. After removal, the artifact removal effect needs to be verified: on the one hand, the time-domain waveform of the reconstructed signal is observed to confirm that EEG spikes and ECG periodic fluctuations have been effectively suppressed; on the other hand, the power spectrum is checked to ensure that the low-frequency energy has returned to normal levels.
[0164] Figure 3The waveform comparison of a subject's Fp1 channel before and after denoising is shown, clearly demonstrating that the signal baseline drift was corrected and high-frequency noise was suppressed after preprocessing. The comparison of denoising performance across the entire channel in two typical time periods (135-140s and 351-356s) is also presented. Figure 4 It mainly reflects the correction effect on baseline drift and motion artifacts. Figure 5 It reflects the comprehensive correction effect of power frequency noise, electromyography artifacts and motion artifacts. Figure 6 A waveform comparison before and after ICA artifact removal (351-356s) shows that ICA further removed residual electrooculography and electrocardiogram artifacts.
[0165] Step 4: Quantitative evaluation of pretreatment effects;
[0166] This step evaluates the preprocessing effect using two metrics: bandwidth retention rate and weighted signal-to-noise ratio.
[0167] Step 4.1, Band Retention Rate;
[0168] Band retention rate refers to the quantitative analysis of the degree of preservation of each rhythm wave by calculating the ratio of the power spectral density (PSD) of each band of EEG before and after denoising. In specific implementation, the power spectral density of the original signal and the denoised signal are first integrated in the EEG bands of δ (1-4 Hz), θ (4-8 Hz), α (8-13 Hz), and β (13-30 Hz), and then the ratio is calculated as the retention rate index.
[0169] For frequency band Its power spectral density integral is defined as:
[0170] ;
[0171] ;
[0172] in and These represent the power spectral densities of the original signal and the denoised signal, respectively. and These are the upper and lower frequency limits of frequency band b, respectively. and These represent the power of the original signal and the denoised signal within frequency band b, respectively. The formula for calculating the band retention rate is as follows:
[0173] ;
[0174] in This is the machine accuracy threshold, a very small value. When the original bandwidth power approaches zero, this indicator will automatically reset to zero to avoid numerical instability.
[0175] Figure 7 The heatmap shows the retention rate of each band of the rhythm wave across the entire channel. Figure 8 Box plots of band retention rates for six subjects across three tasks showed that most retention rates were concentrated between 0.85 and 1, indicating that the band components were basically preserved intact.
[0176] Step 4.2, Weighted Signal-to-Noise Ratio
[0177] Weighted signal-to-noise ratio (WSNR) is a method for evaluating the effectiveness of EEG signal preprocessing. It quantifies denoising quality through frequency domain band-based calculation. Compared to traditional SNR calculations that apply equal weights to different frequency bands, WSNR evaluates each band separately, providing a more balanced reflection of denoising performance across all frequency bands and avoiding the masking effect of high-frequency noise dominating the evaluation of low-frequency bands. The specific calculation steps are as follows:
[0178] (1) Noise component extraction: First, the denoised signal and noise component are extracted. Let the original acquired C-th channel EEG signal be... For ease of description, the final purified EEG signal obtained after all the preprocessing steps 3.1 to 3.4 (including motion artifact removal, wavelet denoising, bandpass filtering, and independent component analysis) will still be referred to as . Then the noise component Defined as the difference between the original signal and the denoised signal:
[0179] ;
[0180] (2) Power spectral density estimation: The Welch power spectral density estimation method is adopted. The Welch method can effectively reduce the variance of power spectral density estimation by segmenting and windowing the signal, overlapping processing, and periodogram averaging, and is suitable for the analysis of non-stationary EEG signals. Its calculation formula is as follows;
[0181] ;
[0182] in Let M be the length of the i-th signal segment, K be the total number of segments, and w[n] be the window function. This is the energy normalization factor for the window function. The power spectral density of the denoised signal and the noise component are obtained using this method. and .
[0183] (3) Frequency band division and signal-to-noise ratio calculation: Divide the frequency bands into four EEG characteristic bands: δ (1-4 Hz), θ (4-8 Hz), α (8-13 Hz), and β (13-30 Hz). For each frequency band b, calculate the signal-to-noise ratio within that band;
[0184] ;
[0185] in It represents a very small positive number, used to prevent division by zero errors caused by a denominator of zero, and to ensure numerical stability.
[0186] (4) Weighted signal-to-noise ratio calculation: Apply equal weights to the SNR of each frequency band. (N is the number of frequency bands), and the final weighted signal-to-noise ratio is obtained after logarithmic transformation;
[0187] ;
[0188] The equal-weighting strategy avoids the influence of human bias on the evaluation results and ensures that the four frequency bands contribute equally to the overall evaluation. Figure 9 The image shows the weighted signal-to-noise ratio (WSNR) calculation results for all 19 channels. The WSNR of all channels is summed and averaged to obtain the mean WSNR for each experimental task, which is then summarized in [image / data]. Figure 10 .from Figure 10 As can be seen, the WSNR of all subjects was generally greater than 20dB under each task, indicating that the denoising effect was good.
[0189] Step 5: Feature extraction;
[0190] This step is used to extract permutation entropy from the preprocessed EEG signal as a feature parameter, construct a multi-channel feature vector, and provide input for subsequent classification and recognition.
[0191] (1) Data framing: The preprocessed EEG signals were segmented according to different attention tasks, and framing was performed with a sliding window length of 5 seconds and a step size of 2.5 seconds. The sampling frequency was 512Hz, and each frame contained 512×5=2560 data points. By overlapping the sliding window for framing, the number of samples could be effectively increased, and the average total number of samples from all subjects was 690.
[0192] (2) Permutation entropy calculation: Permutation entropy is a nonlinear method for measuring the complexity of a time series. It transforms a continuous signal into a symbol sequence by comparing the relative magnitudes of adjacent points and statistically analyzing the probability of each permutation pattern. Its calculation formula is as follows:
[0193] ;
[0194] Where p i Let m be the probability of the i-th permutation pattern, m be the embedding dimension, and there are a total of There are several possible permutation patterns, and the value of m typically ranges from 3 to 6. If m is too small, there will be too few permutation patterns, which will not be able to fully characterize the dynamic features of the signal; if m is too large, the number of permutation patterns will increase dramatically, requiring a longer data length to obtain a stable probability estimate, while the frame window length of this invention is limited. Experiments have verified that this value can achieve a balance between feature stability and computational efficiency.
[0195] (3) Feature vector construction: Calculate the permutation entropy of the EEG signal for each channel, and combine all 19 channels to form a 19-dimensional feature vector. Figure 11 The distribution of the number of training data samples for the three tasks is shown.
[0196] Step 6: Classification, identification, and verification;
[0197] This step is used to verify the effectiveness of the preprocessing method of this invention through a downstream classification task. The samples from each subject are randomly shuffled and divided into training and test sets at a ratio of 70% and 30%, respectively, with an average of 205 test samples per subject (maximum 229, minimum 166). The 19-dimensional permutation entropy features of the training and test sets are then z-score standardized.
[0198] The training set was trained on five classifiers integrated in Matlab (Medium Gaussian SVM, Quadratic SVM, Medium Neural Network, Quadratic Discriminant, and SVM Kernel) and five-fold cross-validation was used. Figure 12 The training accuracy of 6 subjects on five classifiers.
[0199] from Figure 12 As can be seen, the Medium Gaussian SVM classifier performs best, with an average accuracy of 96% and a maximum of 99.6%. Selecting the Medium Gaussian SVM as the final classifier, the trained model was applied to the test set, and the classification accuracy results are as follows: Figure 13 As shown.
[0200] from Figure 13 As can be seen, the average classification accuracy on the test set was 96.4%, which is basically consistent with that on the training set. Subjects 2 and 3 achieved 100% accuracy, indicating that there were essentially no errors in the classification of the three tasks. Subject 4's accuracy was slightly lower (88.4%), which may be related to the fact that the intensity of motion artifacts in this subject exceeded the detection threshold, resulting in the false deletion of some valid signals. Overall, all six subjects achieved high classification accuracy on the test set, verifying the effectiveness of the preprocessing method of this invention.
[0201] The innovation of this invention lies in: (1) The multi-channel voting mechanism was applied for the first time to the detection of motion artifacts in children's EEG. By making joint decisions, the sensitivity of single-channel detection to transient noise was overcome, and the false judgment rate was significantly reduced. (2) A combined method of PCHIP interpolation and adaptive Bayesian wavelet denoising is proposed, which can efficiently remove motion artifacts and electromyographic artifacts while retaining effective frequency band information such as δ, θ, α, and β. (3) Construct an integrated preprocessing process, and use the frequency band retention rate and weighted signal-to-noise ratio to achieve quantitative evaluation of the preprocessing effect, thereby avoiding the subjectivity of traditional methods and improving scientific rigor.
[0202] Application Prospects: This invention can be applied to research on children's neurocognitive abilities and related fields. In research on children's attention development, it can effectively remove motion artifacts and obtain high-quality EEG data, providing a reliable basis for studying the evolution of attention characteristics in children of different ages. In the auxiliary diagnosis of ADHD, combined with the IVA-CPT experimental paradigm, which is highly consistent with clinical diagnostic standards, it can eliminate artifact interference during children's testing process and obtain pure EEG signals, providing technical support for comparing the differences in attention characteristics between normal children and children with ADHD and exploring EEG biomarkers for ADHD. In the evaluation of cognitive training effects, it can standardize the preprocessing of EEG data at different training stages, eliminate differences in acquisition conditions, and make longitudinal comparisons of training effects more accurate and reliable.
[0203] In summary, this invention effectively removes motion and electromyography artifacts from children's EEG data through a combination of multi-channel voting mechanism, PCHIP interpolation, adaptive wavelet denoising, and ICA, significantly improving signal quality. Bandwidth retention and weighted signal-to-noise ratio assessments show good preprocessing performance, and downstream classification task validation achieved an average accuracy of 96.4%, with a maximum of 100%, providing a reliable foundation for subsequent research on children's attention and ADHD-assisted diagnosis.
Claims
1. A preprocessing method based on highly polluted children's electroencephalogram (EEG) data, characterized in that, Includes the following steps: Step 1, Experimental Task Design: Based on the continuous operation test of audiovisual integration, three attention tasks were conducted, namely visual attention task, auditory attention task and audiovisual integration task; Step 2, EEG signal acquisition: EEG signals of children are acquired simultaneously with three attention tasks using an EEG acquisition device; Step 3, EEG signal preprocessing: Preprocess the highly contaminated raw EEG signals obtained; Step 4: Quantitative evaluation of preprocessing effect: Based on the preprocessed EEG signals, calculate the frequency band retention rate and weighted signal-to-noise ratio to quantitatively evaluate the preprocessing effect; Step 5, Feature Extraction: Extract permutation entropy as a feature parameter to construct a multi-channel feature vector; Step 6, Classification and Verification: Import the feature vector obtained in Step 5 into the classifier to identify and verify the attention task state.
2. The preprocessing method based on highly polluted children's EEG data according to claim 1, characterized in that, The experimental task in step 1 includes: Three attention tasks were collected using audiovisual integrated continuous operation testing software, with each task lasting 12 minutes. Children were required to click on the target on the screen when they saw or heard a designated target number. Before the test, children were required to sit in a comfortable position and remain relaxed. A 5-minute rest period was given between each task for adjustment.
3. The preprocessing method based on highly polluted children's EEG data according to claim 1, characterized in that, The requirements for experimental subjects and equipment during EEG signal acquisition in step 2 are as follows: (1) Subjects: Children aged 6-12 years were selected as subjects. All subjects had normal vision or corrected vision and no history of attention deficit or related neurological diseases. Parents were informed of the detailed test procedure before the test. (2) Experimental equipment: A multi-channel EEG acquisition instrument was selected with a sampling frequency of 512Hz and 19 channels. The electrode distribution conformed to the internationally accepted 10-20 system standard electrode placement method.
4. The preprocessing method based on highly polluted children's EEG data according to claim 1, characterized in that, The EEG signal preprocessing procedure in step 3 is as follows: Step 3.1, Robust Motion Artifact Detection Based on Multi-Channel Voting Mechanism: Calculate the dynamic threshold of each channel signal, obtain the instantaneous change of the signal through first-order difference operation, and mark the starting point of motion artifacts when the number of channels exceeding the threshold reaches a preset proportion. Then, extend the marked interval in time to obtain the complete artifact time period marking; specifically including: (1) Dynamic threshold calculation: For multi-channel EEG data matrix X∈R N×T Calculate the standard deviation of each channel along the time dimension, where N is the number of channels and T is the number of time points; let the time series of the i-th EEG channel data be denoted as . Calculate the standard deviation of each channel along the time dimension. : ; The median of the standard deviations of all channels Using this as a benchmark, and referring to the parameter settings for abrupt slope detection in existing statistical threshold-based artifact detection methods, an empirical coefficient α = 3.5 is set to obtain the global motion threshold τ: τ = α·median( ); (2) Abrupt change detection: Perform first-order difference operation on each channel along the time direction to obtain the instantaneous change of the signal: ; in This represents the instantaneous change of the i-th channel at time t; artifacts are identified through a multi-channel voting mechanism: for each time point t, the following is statistically satisfied. If the number of channels reaches 30% of the total number of channels, then time t is marked as the starting point of the motion artifact, that is: ; in This is an indicator function that takes the value 1 when the condition is true and 0 otherwise. (3) Marking interval expansion: After obtaining the above-mentioned pseudo-trace starting point marking sequence Then, the isolated starting point is expanded into a complete time period. The expansion operation is defined as follows: ; Where V represents the logical OR operation, and L = 0.1 × f s , where f s Let M be the sampling frequency and k be the offset index within the window. This operation means that if at least one artifact starting point exists within the neighboring interval [t-[L / 2], t+[L / 2]] at time t, i.e., M... init =1, then time t is marked as a point within the pseudotrace period; when tk<1 or tk>T, M init [tk] is filled with 0; After the above extended operation, M[t]=1 indicates that time t is within the artifact period, and M[t]=0 indicates that it is not within the artifact period; Step 3.2, PCHIP Interpolation Repair: Based on the artifact time period markers obtained in Step 3.1, the segmented cubic Hermite interpolation method is used to automatically repair the signal segments containing motion artifacts, reconstructing the damaged data while preserving the original signal change trend; specifically including: (1) Definition of valid data points: Let the time series of the c-th channel be... t∈[1,T], that is, the c-th row vector of the data matrix X Based on the pseudo-trace period marker M[t] obtained in step 3.1, define the set of valid data points Ω={t|M[t]=0} and the set of pseudo-trace points Ω'={t|M[t]=1}; when |Ω|≥3 and Ω' is not empty, that is, when the valid data points are sufficient to support the interpolation calculation and there are pseudo-trace segments that need to be repaired, perform PCHIP interpolation repair. (2) PCHIP interpolation principle and formula derivation: Piecewise cubic Hermite interpolation polynomial PCHIP is a shape-preserving interpolation method. It constructs a cubic polynomial on each subinterval so that the interpolation function maintains the given function value and derivative value at the nodes, while ensuring that the monotonicity of the overall curve is consistent with the original data. For any interpolation interval [ , Let the function values at the two endpoints be respectively , The derivative values are respectively , The cubic Hermite interpolation polynomial has the following form: ; in For the normalization parameters, the four Hermite basis functions are as follows: , , , ; (3) Signal reconstruction: Based on the above interpolation method, the original signal Repaired signal It is given by the following formula; ; in It is defined in the interval [t] i ,t i+1 cubic Hermite polynomial basis functions on ) For indicator functions, when (t i ,t i+1 The value is 1 if the condition is met, and 0 otherwise; n is the number of valid data points. The time coordinates corresponding to the valid data points; Step 3.3, Adaptive Bayesian Wavelet Denoising: An adaptive Bayesian wavelet denoising method based on discrete wavelet transform is adopted. The db5 wavelet basis is selected for multi-scale decomposition of the signal. An adaptive threshold is determined through a Bayesian framework, and a soft thresholding rule is used to nonlinearly shrink the detail coefficients, suppressing electromyographic noise while preserving effective electroencephalogram (EEG) components. Specifically, this includes: (1) Wavelet basis selection and discrete wavelet transform: The db5 wavelet basis is selected for the repair signal obtained in step 3.
2. Perform discrete wavelet transform; the decomposition expression of discrete wavelet transform is: ; Where c J,k d is an approximation coefficient, representing the effective frequency band of EEG; j,k The detail factor includes electromyography artifacts; and ψ j,k [t] represents the scaling function and the wavelet function, respectively, and J is the maximum number of decomposition levels; (2) Noise standard deviation estimation: The key to wavelet denoising is to set a reasonable threshold to distinguish between effective signals and noise; for the j-level detail coefficients It is necessary to estimate the standard deviation of the noise in this layer. The median estimation method is used to robustly estimate the noise level of the detail coefficients. ; Where 0.6745 is the median of the standard normal distribution. with standard deviation The ratio factor; (3) Adaptive threshold calculation: A Bayesian framework is introduced, assuming that the detail coefficients follow a generalized Gaussian distribution. The adaptive threshold for each scale is determined by minimizing the Bayesian risk criterion. For the detail coefficients of the j-th layer, the Bayesian adaptive threshold is given by the following formula: ; in Here is the noise variance estimate for the detail coefficients of the j-th layer. The standard deviation estimate of the original noiseless signal of layer j is obtained by... calculate, Let be the variance of the noisy detail coefficients in the j-th layer; (4) Soft threshold shrinkage processing: After obtaining the layered threshold, it is necessary to select an appropriate threshold function to process the detail coefficients; the soft threshold rule is used to perform nonlinear shrinkage of the detail coefficients; ; in These are the original detail coefficients. These are the detail coefficients after thresholding. (5) Signal reconstruction: Reconstructing the detail coefficients after thresholding. Compared with the original approximation coefficient Combined, the denoised EEG signal was reconstructed using inverse discrete wavelet transform. : ; Step 3.4, Bandpass Filtering and Independent Component Analysis: Perform zero-phase bandpass filtering on the signal processed in Step 3.3, retaining the 0.5-40Hz frequency band range and removing baseline drift interference; perform independent component analysis on the filtered signal to identify and manually remove residual artifacts from electrooculography and electrocardiography, delete bad segments, and obtain a clean EEG signal.
5. A preprocessing method based on highly polluted children's EEG data according to claim 4, characterized in that, Step 4 involves a quantitative evaluation of the preprocessing effect, which includes the following sub-steps: Step 4.1, Band Retention Rate Calculation: Extract EEG signals before and after preprocessing, respectively. Obtain the power spectral density of each signal through power spectrum estimation, divide the signal into four frequency bands: δ, θ, α, and β. Calculate the power ratio of each frequency band after preprocessing to that before preprocessing to obtain the band retention rate of each frequency band; specifically including: First, the power spectral density of the original signal and the denoised signal are integrated in the δ, θ, α, and β EEG bands, respectively, and then their ratio is calculated as the retention rate index. For frequency band The power spectral density of the original signal and the denoised signal were obtained using the Welch power spectral estimation method. and Then the original signal power within frequency band b and noise reduction signal power They are defined as follows: ; ; in For frequency, and These represent the power spectral densities of the original signal and the denoised signal, respectively. and These are the upper and lower frequency limits of frequency band b, respectively; and Let represent the power of the original signal and the denoised signal within frequency band b, respectively; the formula for calculating the frequency band retention rate is as follows: ; in This is the machine accuracy threshold, which is a very small value; Step 4.2, Weighted Signal-to-Noise Ratio Calculation: Extract the denoised signal and noise components. The noise component is the difference between the original signal and the denoised signal. Obtain the power spectral density of the two signals respectively through power spectral estimation. Calculate the signal-to-noise ratio of each frequency band according to the frequency band division. Apply equal weights to the signal-to-noise ratio of each frequency band and calculate the average. After logarithmic transformation, obtain the weighted signal-to-noise ratio. The specific calculation steps are as follows: (1) Noise component extraction: First, the denoised signal and noise component are extracted; let the original acquired C-th channel EEG signal be... For ease of description, the final clean signal obtained after preprocessing in step 3 will still be denoted as... Then the noise component Defined as the difference between the original signal and the denoised signal: ; (2) Power spectral density estimation: Welch power spectral density estimation method is adopted. Welch method performs segmented windowing, overlap processing and periodogram averaging on the signal. Its calculation formula is: ; in Let M be the length of the i-th signal segment, K be the total number of segments, and w[n] be the window function. The window function energy normalization factor is used; the power spectral density of the denoised signal and the noise component are obtained using this method. and ; (3) Frequency band division and signal-to-noise ratio calculation: Divide the EEG feature into four frequency bands: δ, θ, α, and β; for each frequency band b, calculate the signal-to-noise ratio within that frequency band; ; in Represents a very small positive number; (4) Weighted signal-to-noise ratio calculation: Apply equal weights to the SNR of each frequency band. Where N is the number of frequency bands, the final weighted signal-to-noise ratio is obtained after logarithmic transformation; ; Step 4.3, Multi-channel comprehensive evaluation: Repeat steps 4.1 and 4.2 for all channels to obtain the bandwidth retention rate and weighted signal-to-noise ratio of each channel. The overall preprocessing effect is obtained by summing and averaging.
6. The preprocessing method based on highly polluted children's EEG data according to claim 1, characterized in that, The specific operation of step 5 is as follows: The preprocessed EEG signal is segmented according to different attention tasks; each segment is framed using a sliding window; permutation entropy is selected as a feature parameter; permutation entropy is calculated for each channel of the EEG signal; and a multi-channel feature vector is constructed by combining all channels. Specifically, this includes: (1) Data framing: The preprocessed EEG signal is segmented according to different attention tasks, and framing is performed with a sliding window length of 5 seconds and a step size of 2.5 seconds; the sampling frequency is 512Hz, and each frame contains 512×5=2560 data points; the frames are overlapped by sliding window. (2) Permutation entropy calculation: Permutation entropy is a nonlinear method for measuring the complexity of a time series. It transforms a continuous signal into a symbol sequence by comparing the relative magnitudes of adjacent points and statistically analyzing the probability of each permutation pattern. Its calculation formula is as follows: ; Where p i Let m be the probability of the i-th permutation pattern, and let m be the embedding dimension, which ranges from 3 to 6. (3) Feature vector construction: Calculate the permutation entropy of the EEG signal for each channel, and combine all 19 channels to form a 19-dimensional feature vector.
7. The preprocessing method based on highly polluted children's EEG data according to claim 1, characterized in that, The specific operation of step 6 is as follows: randomly shuffle the samples of each subject and divide them into training set and test set according to the ratio; standardize the features of the training set; train the classifier and evaluate the classification performance through five-fold cross-validation; apply the trained classifier model to the test set and calculate the classification accuracy to verify the effectiveness of the preprocessing method for downstream classification tasks.