A method for calculating quality of raw electroencephalogram data of event-related potentials based on trial level

CN118094150BActive Publication Date: 2026-08-11UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-26
Publication Date
2026-08-11

Smart Images

  • Figure CN118094150B_ABST
    Figure CN118094150B_ABST
Patent Text Reader

Abstract

This invention discloses a method for calculating the quality of raw event-related potential (ERP) EEG data based on trial levels, relating to instrument measurement technology, signal processing methods, and neuroscience applications. This invention proposes a robust, quantitative, objective, and generalizable quality assessment method for raw EEPROM data based on trial levels, enabling accurate quantification of EEPROM data quality and assisting researchers in controlling EEPROM data quality based on feedback quality indicators. This invention achieves quantitative quality assessment of raw EEPROM data, improving the efficiency of EEPROM data quality control for researchers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of instrument measurement technology, signal processing methods, and neuroscience applications, and to a method for calculating the quality of raw EEG data based on trial-level event-related potentials.

[0002] Research Background

[0003] Event-related potentials (ERPs) are a type of evoked electroencephalography (EEG) used non-invasively to detect brain functional activity. This technique directly records the electrophysiological activity of neuronal groups on the scalp, providing a wealth of important information about brain function. In the 1960s, scientists began recording EEG signals related to cognitive tasks, averaging time-locked EEG signals associated with specific stimuli to obtain a series of ERPs. This method provides information on the brain's neural activity in response to specific stimuli or events with millisecond-level temporal resolution. It is a unique tool for exploring the spatiotemporal dynamics of neural processes such as cognitive function, perception, attention, and memory, and has been widely used in medicine, psychology, education, computer science, and biomedical engineering. In ERP research, quality control of the signal data is crucial for ensuring the reliability of data analysis and interpretation. Quality assessment helps verify the quality of raw data and the effectiveness of preprocessing, and the evaluation indicators obtained from quality assessment can further guide subsequent data analysis strategies.

[0004] In recent years, with the continuous advancement of brain initiatives in various countries, large-scale, multi-center studies that are open, collaborative, and shared have gradually become a new research model for understanding and studying the brain. Against this backdrop, quality control of event-related potential signals is particularly important. Providing information on data quality assessment helps other researchers understand the reliability and applicability of the data, thereby promoting the sharing and collaboration of scientific research.

[0005] In practical research, traditional evaluation methods primarily rely on researchers' visual judgment. This approach is susceptible to subjective influence and fails to provide quantitative quality assessment indicators. Furthermore, manual judgment consumes significant time and effort when processing large datasets. Therefore, this invention provides a quantitative, trial-level-based method for evaluating the quality of raw event-related potential (ERP) data, suitable for automated computation, to address the aforementioned problems.

[0006] The existing method for assessing raw EEG data (Zhao, L., et al. (2022). "Quantitative signal quality assessment for large-scale continuous scalp EEG from a big data perspective." PhysiolMeas.) targets continuous raw EEG signals and is mainly applicable to the quality assessment of non-task-evoked EEG data such as resting state and sleep, but cannot be directly used for the quality assessment of evoked EEG data. This invention improves the theoretical basis of this technology, enabling it to perform quantitative quality assessment of evoked EEG data (raw event-related potential EEG data). Summary of the Invention

[0007] This invention proposes a robust, quantitative, objective, and generalizable quality assessment method for raw event-related potential (ERP) EEG data at the trial level. This method aims to accurately quantify the quality of EEP data and help researchers control the quality of EEP data based on feedback quality indicators.

[0008] The technical solution adopted by this invention to achieve the above objective is a method for assessing the quality of raw event-related potential (ERP) data based on trial levels, wherein the method includes:

[0009] (1) Using an EEG acquisition device, the EEG evoked potentials of the subjects were collected based on a specific evoked task to obtain continuous raw EEG data V containing event-related potentials (data dimension is n channels × t time points);

[0010] (2) Perform basic preprocessing on the data (including bad conduction detection, bandpass or notch filtering, artifact removal, bad conduction interpolation, REST rereference and bad segment labeling, etc.) to obtain the EEG signal V. inf (The data dimension consists of n channels × t time points);

[0011] (3) Based on the event labels (m) and data segment (epoch) length (k time points) of a specific evoked task, extract the EEG data segment V for a single trial of a specific event. epoch (The data segment dimension is 1×k time points, and the number of data segments is n×m);

[0012] (4) Four methods were used to evaluate the quality of EEG data for each trial data segment, and data segments with abnormal quality were marked with a mask (n×m).

[0013] (5) Based on the masking results of step (4), a series of quantitative indicators related to the quality of event-related potential EEG data are calculated at the trial level, and the quality of the raw EEG data is rated.

[0014] (6) Finally, based on the data segments corresponding to a specific event, after simple processing (baseline correction, threshold processing), the data is superimposed and averaged to obtain the event-related potential waveform of the event, so as to combine the quantitative results of quality assessment to perform quality control on the data.

[0015] Furthermore, in step (4), the four methods for assessing the quality of EEG data based on the trial level are as follows:

[0016] (4a) For each trial data segment V generated in step (3) epoch (The data segment has a dimension of 1×k time points). The system detects whether there is a constant signal (the signal remains unchanged) or a signal containing numerical or infinite values, and calculates the mask mask1 (with a dimension of n×m). The specific algorithm is as follows:

[0017] Use a standard deviation less than 10 -10 and absolute median difference less than 10 -10 The μV value is used to detect whether the data segment is a constant signal. The specific formula is as follows:

[0018]

[0019] Where SD is the standard deviation of a single trial data segment, MAD is the absolute median deviation of a single trial data segment, and NaN and Inf represent the non-digital values ​​and infinity values ​​present in the signal, respectively.

[0020] (4b) For each trial data segment V generated in step (3) epoch (Data segment dimension is 1×k time points), using absolute amplitude threshold and absolute rSD. zscore Threshold detection of data segments containing abnormal amplitude artifacts yields a mask mask2 (n×m in dimension), the specific algorithm of which is as follows:

[0021] Calculate the robust standard deviation rSD for each data segment in each trial. rSD is equal to 0.7413 times the interquartile range of the data. Then, calculate the robust standard deviation rSD of the z-score for the data segment. zscore The absolute amplitude or rSD zscore Data segments exceeding a specified threshold are considered to contain abnormal amplitude artifacts, as shown in the following formula:

[0022]

[0023] in,

[0024]

[0025] In the above formula, T amplitude T represents the absolute amplitude threshold. zSD Indicates absolute rSD zscore Threshold, rSD median It is the median rSD of all data segments in each subject's data. deviation The value is the interquartile range of the rSD across all data segments in each subject's data set. zscore It is the robustness standard deviation of the z-score for each data segment;

[0026] (4c) For each trial data segment V generated in step (3) epoch (The data segment dimension is 1×k time points). Based on the Christian Kothe method, the signal-to-noise ratio of each data segment is calculated to detect data segments severely contaminated by high-frequency noise interference, resulting in a mask mask3 (dimension n×m). The specific algorithm is as follows:

[0027] First, low-pass filtering is applied to continuous EEG data (before segmenting it into several data segments) to separate high-frequency and low-frequency signals. Based on the Christian Kothe method, the robust noise-to-signal ratio (rNSR) can be approximately calculated using the ratio of the absolute median difference of the high-frequency signal to the absolute median difference of the low-frequency signal in each data segment. Then, the z-score robust noise-to-signal ratio (rNSR) is calculated from this ratio. zscore rNSR or rNSR zscore Data segments exceeding the specified threshold are considered to have severe high-frequency noise interference, as specified in the following formula:

[0028]

[0029] in,

[0030]

[0031] In the above formula, T amplitude T represents the absolute amplitude threshold. zSD Indicates absolute rSD zscore Threshold, rNSR median It is the median rNSR of all data segments in each subject's data. deviation The value is the approximate standard deviation of the rNSR for all data segments in each subject's data set, and is equal to 1.4826 times the absolute median difference for all data segments in each subject's data set. zscore It is the robustness of the z-score for each data segment, as measured by the standard-to-noise ratio.

[0032] (4d) For each trial data segment V generated in step (3) epoch(The data segment dimension is 1×k time points). Based on Pearson correlation calculation, data segments with low correlation to other channels are used to obtain mask mask4 (dimension n×m). The specific algorithm is as follows:

[0033] Calculate the Pearson correlation between each trial data segment and other channels. Use the 98th percentile of the correlation coefficient between a data segment and other channel data segments as the correlation index for that data segment. Data segments with a correlation index below a specified threshold are considered to have low correlation with other channels. The specific formula is as follows:

[0034]

[0035] Among them, R chann The above-mentioned correlation indicators; T corr This is the correlation coefficient threshold (default is 0.6).

[0036] Furthermore, in step (5), the series of quantitative indicators calculated based on the mask at the trial level are as follows (in the following indicators, n is the number of data channels, and m is the number of data event labels):

[0037] 1) Overall radio of No Signal epochs (ONS): The proportion of bad segments detected by the method (4a) (including no-signal bad segments and constant-signal bad segments), calculated as follows:

[0038]

[0039] Where mask1(i,j) is the mask of the quality anomaly data segment obtained by using the detection of no / constant evaluation method;

[0040] 2) Overall ratio of high-amplitude epochs (OHA): The proportion of bad segments detected by the method (4b), calculated as follows:

[0041]

[0042] Where mask2(i,j) is the quality anomalous data segment mask obtained by using the method of detecting anomalous high-amplitude signals;

[0043] 3) Overall ratio of high-frequency noise epochs (OFN): The proportion of bad segments detected by the method (4c) (including bad segments with high noise-to-signal ratio), calculated as follows:

[0044]

[0045] In step 2, mask3(i,j) uses the quality anomaly data segment mask obtained by the detection frequency noise evaluation method.

[0046] 4) Overall ratio of low-correlation epochs (OLC): The proportion of bad segments detected by the method (4d), calculated as follows:

[0047]

[0048] Where mask4(i,j) is the mask of the quality anomalous data segment obtained by using the method of detecting low correlation signals;

[0049] 5) Overall Data Quality (ODQ): The proportion of data segments in all channels that were not detected as bad segments by the above methods, i.e., the proportion of good segments. The calculation formula is as follows:

[0050]

[0051] in,

[0052]

[0053] Where tempRatio represents the proportion of channels judged as bad segments out of all channels in a certain trial, and T is a threshold parameter (default is 0.1). The strictness of the quality assessment can be adjusted by adjusting T.

[0054] 6) Data Quality Rating: Based on the ODQ value, data quality is divided into four levels: "A", "B", "C", and "D", corresponding to excellent, good, poor, and very poor, respectively. The specific formula is as follows:

[0055]

[0056] 7) Bad channels (Index of bad channels, bad channels): When the proportion of bad segments in a channel exceeds a certain threshold (60% is recommended), it is judged as a bad channel.

[0057] 8) Number of Bad Channels (NBC): The number of bad channels detected;

[0058] 9) Overall ratio of bad channels (OBC): The proportion of bad channels detected. The range of OBC is 0 to 100%.

[0059] 10) Mean Absolute Value of all epochs (allMAV);

[0060] 11) Mean Absolute Value of Bad Epochs (badMAV);

[0061] 12) Mean Absolute Value of good epochs (goodMAV).

[0062] This invention enables objective and quantitative quality assessment of raw event-related potential data, thereby improving the efficiency of researchers in controlling the quality of EEG data. Attached Figure Description

[0063] Figure 1 This is an overall flowchart of the event-related potential raw data quality assessment method of the present invention;

[0064] Figure 2 This is a flowchart of the quality assessment process for trial levels in this invention;

[0065] Figure 3 This is a diagram illustrating the evaluation results of the detection of no / constant signals according to the present invention;

[0066] Figure 4 This is a diagram illustrating the evaluation results of the detection of abnormal high-amplitude signals according to the present invention;

[0067] Figure 5 This is a diagram showing the detection frequency noise evaluation results of the present invention;

[0068] Figure 6 This is a diagram illustrating the evaluation results of the detection of low-correlation signals according to the present invention;

[0069] Figure 7 This is a schematic diagram of the evaluation result report of the present invention;

[0070] Figure 8 This is a schematic diagram of the ERP overlay result of the present invention. Detailed Implementation

[0071] Figure 1 This is a flowchart of the method of the present invention, wherein the specific method steps are as follows:

[0072] (1) Using an EEG acquisition device, the EEG evoked potentials of the subjects were collected based on a specific evoked task to obtain continuous raw EEG data V containing event-related potentials (data dimension is n channels × t time points). The raw data contains artifacts such as eye movement, electromyography, and power frequency interference.

[0073] (2) Perform basic preprocessing on the data (including bad conduction detection, bandpass or notch filtering, artifact removal, bad conduction interpolation, REST rereference and bad segment labeling, etc.) to obtain the EEG signal V. inf (The data dimension consists of n channels × t time points);

[0074] (3) Based on the event labels (m) and data segment (epoch) length (k time points) of a specific evoked task, extract the EEG data segment V for a single trial of a specific event. epoch (The data segment dimension is 1×k time points, and the number of data segments is n×m). A schematic diagram of data segment extraction for a single trial is shown below. Figure 2 As shown, each data segment can be considered as a combination of relevant event potentials and random noise;

[0075] (4) Four methods were used to evaluate the quality of EEG data for each trial data segment, and data segments with abnormal quality were marked with a mask (n×m).

[0076] (5) Based on the masking results of step (4), a series of quantitative indicators related to the quality of event-related potential EEG data are calculated at the trial level, and the quality of the raw EEG data is rated.

[0077] (6) Finally, based on the data segments corresponding to a specific event, after simple processing (baseline correction, threshold processing), the data is superimposed and averaged to obtain the event-related potential waveform of the event, so as to combine the quantitative results of quality assessment to perform quality control on the data.

[0078] Figure 3 The flowchart above shows the process of using four quality assessment methods to assess the quality of EEG data for a single trial data segment in steps (3)-(5). Specifically, the four quality assessment methods are as follows.

[0079] Method 1 – Detecting No / Constant Signals

[0080] During the acquisition of EEG signals, equipment malfunctions, poor electrode connection to the scalp, or electrode detachment may occur, resulting in constant signals or outliers in the acquisition results. Constant signals or outliers can interfere with the correct interpretation and analysis of EEG signals. In some signal processing algorithms, non-numeric characters (NaN) and infinity values ​​(Inf) may even cause the algorithm to fail. Therefore, data segments containing no or constant signals are usually excluded before subsequent processing and analysis.

[0081] This invention addresses each trial data segment V generated in step (3). epoch (The data segment has a dimension of 1×k time points). The system detects whether there is a constant signal (the signal remains unchanged) or a signal containing NaN / Inf, and calculates the mask mask1 (with a dimension of n×m). The specific algorithm is as follows:

[0082] If the standard deviation or absolute median of the EEG signal is extremely small, the EEG signal is likely to be extremely weak or even constant. Therefore, a standard deviation of less than 10 can be used. -10 and absolute median difference less than 10 -10 The μV value is used to detect whether the data segment is a constant signal. The specific formula is as follows:

[0083]

[0084] Where SD is the standard deviation of a single trial data segment, MAD is the absolute median deviation of a single trial data segment, and NaN and Inf represent the non-digital values ​​and infinity values ​​present in the signal, respectively.

[0085] The evaluation results of this evaluation method are shown in the figure below. Figure 3 As shown, channels 5-10 of the second and third data segments of the extracted EEG are constant signals. The corresponding values ​​in the mask are set to 1, which means that the data segments are judged as bad segments with no / constant signals.

[0086] Method 2 – Detecting Abnormally High Amplitude Signals

[0087] During the acquisition of EEG signals, eye movements, blinking, or muscle movements in the subject can alter the local electric field distribution, thereby interfering with the scalp's electric field and generating larger amplitudes in specific channels. Additionally, equipment malfunctions or electromagnetic interference in the environment can also lead to abnormally high-amplitude signals. These abnormally high-amplitude signals, caused by technical or physiological interference, can mask brain signals and affect the accuracy of subsequent analysis.

[0088] This invention addresses each trial data segment V generated in step (3). epoch (Data segment dimension is 1×k time points), using absolute amplitude threshold and absolute rSD. zscore Threshold detection of data segments containing abnormal amplitude artifacts yields a mask mask2 (n×m in dimension), the specific algorithm of which is as follows:

[0089] Calculate the robust standard deviation rSD for each data segment in each trial. rSD is equal to 0.7413 times the interquartile range of the data. Then, calculate the robust standard deviation rSD of the z-score for the data segment. zscore The absolute amplitude or rSD zscoreData segments exceeding a specified threshold are considered to contain abnormal amplitude artifacts, as shown in the following formula:

[0090]

[0091] in,

[0092]

[0093] In the above formula, T amplitude T represents the absolute amplitude threshold. zSD Indicates absolute rSD zscore Threshold, rSD median It is the median rSD of all data segments in each subject's data. deviation The value is the interquartile range of the rSD across all data segments in each subject's data set. zscore This is the robust standard deviation of the z-score for each data segment. Under non-normal distributions, using the median and rSD is more interpretable than the mean and standard deviation.

[0094] This evaluation method involves an absolute amplitude threshold T. amplitude and absolute rSD zscore Threshold T zSD Two threshold parameters. If a data segment contains data with an absolute magnitude exceeding T... amplitude If the time point is specified, then the data segment is considered a high-amplitude bad segment. Based on previous research, this threshold is set to 150μV. If the rSD of a certain data segment... zscore Value exceeds T zSD If the data segment is high-bias bad, then the threshold is adjustable, and based on previous research, a value of 3 is recommended.

[0095] The evaluation results of this evaluation method are shown in the figure below. Figure 4 As shown, channels 5-10 and 30-35 of the extracted EEG show obvious high-amplitude signals. The corresponding values ​​in the mask are set to 1, which means that the data segment is judged as an abnormal high-amplitude signal bad segment.

[0096] Method 3 – Detecting Frequency Noise

[0097] Generally, EEG signals are stronger at lower frequencies and weaker at higher frequencies. However, during actual EEG acquisition, electromagnetic fields, power supply noise, abnormal electrode connections, or other environmental interference can generate high-frequency noise. This high-frequency noise cannot reflect actual brain activity and can affect the accuracy of EEG signal analysis.

[0098] This invention addresses each trial data segment V generated in step (3). epoch(The data segment dimension is 1×k time points). Based on the Christian Kothe method, the signal-to-noise ratio of each data segment is calculated to detect data segments severely contaminated by high-frequency noise interference, resulting in a mask mask3 (dimension n×m). The specific algorithm is as follows:

[0099] First, low-pass filtering is applied to continuous EEG data (before segmenting it into several data segments) to separate high-frequency and low-frequency signals. Based on the Christian Kothe method, the robust noise-to-signal ratio (rNSR) can be approximately calculated using the ratio of the absolute median difference of the high-frequency signal to the absolute median difference of the low-frequency signal in each data segment. Then, the z-score robust noise-to-signal ratio (rNSR) is calculated from this ratio. zscore rNSR or rNSR zscore Data segments exceeding the specified threshold are considered to have severe high-frequency noise interference, as specified in the following formula:

[0100]

[0101] in,

[0102]

[0103] In the above formula, T NSR T represents the rNSR threshold. zNSR Indicates absolute rNSR zscore Threshold, rNSR median It is the median rNSR of all data segments in each subject's data. deviation The value is the approximate standard deviation of the rNSR for all data segments in each subject's data set, and is equal to 1.4826 times the absolute median difference for all data segments in each subject's data set. zscore This is the robustness of the z-score for each data segment, representing the standard-to-noise ratio. Under non-normal distributions, using the median and approximate standard deviation is more interpretable than the mean and standard deviation.

[0104] The evaluation method involves the rNSR threshold T. NSR and absolute rNSR zscore Threshold T zNSR Two threshold parameters. If the rNSR of a certain data segment exceeds T... NSR If the rNSR of a data segment is high, then the segment is considered a bad segment with a high noise-to-signal-ratio (NRR) and should be set to 0.5. zscore Value exceeds T zNSR If the threshold is high, the data segment is considered a bad segment with a high z-noise ratio. This threshold is adjustable, and based on previous research, a value of 5 is recommended.

[0105] The evaluation results of this evaluation method are shown in the figure below. Figure 5As shown, several channels in the extracted EEG show obvious high-frequency signals. The corresponding values ​​in the mask are set to 1, which means that the data segment is judged as a bad segment of frequency noise signal.

[0106] Method 4 – Detecting low-correlation signals

[0107] Due to the volumetric conduction effect of EEG signals, EEG signals recorded by adjacent electrodes on the scalp generally exhibit a certain degree of similarity. During actual EEG acquisition, interference or abnormalities at some electrodes can reduce the correlation between the signals of the corresponding channels and other channels. Data segments with low correlation may lack the typical EEG signal characteristics of the trial task, affecting the overall consistency and interpretability of the data.

[0108] This invention addresses each trial data segment V generated in step (3). epoch (The data segment dimension is 1×k time points). Based on Pearson correlation calculation, data segments with low correlation to other channels are used to obtain mask mask4 (dimension n×m). The specific algorithm is as follows:

[0109] Calculate the Pearson correlation between each trial data segment and other channels. Use the 98th percentile of the correlation coefficient between a data segment and other channel data segments as the correlation index for that data segment. Data segments with a correlation index below a specified threshold are considered to have low correlation with other channels. The specific formula is as follows:

[0110]

[0111] Among them, R chann The above-mentioned correlation indicators; T corr This is the correlation coefficient threshold (default is 0.6).

[0112] The threshold parameter involved in this evaluation method is the maximum correlation threshold T. correlation If the correlation index of a data segment is lower than this threshold, then the data segment is a low-correlation bad segment. This threshold is adjustable, and based on previous research, a value of 0.6 is recommended.

[0113] The evaluation results of this evaluation method are shown in the figure below. Figure 6 As shown, in the third data segment of the EEG, several channels have significantly lower correlation with other channels. The corresponding values ​​in the mask are set to 1, indicating that the data segment is a bad segment with low correlation signal.

[0114] Specifically, in step (5), a series of quantitative indicators are calculated based on the mask at the trial level. The series of quantitative indicators calculated based on the mask at the trial level are as follows (in the following indicators, n is the number of data channels and m is the number of data event tags).

[0115] 1) Overall radio of No Signal epochs (ONS): The proportion of bad segments detected by the method (4a) (including no-signal bad segments and constant-signal bad segments). The range of ONS is 0 to 100%, and the calculation formula is as follows:

[0116]

[0117] Where mask1(i,j) is the mask of the quality anomaly data segment obtained by using the detection of no / constant evaluation method;

[0118] 2) Overall ratio of high-amplitude epochs (OHA): The proportion of bad segments detected by the method (4b). The range of OHA is 0-100%, and the calculation formula is as follows:

[0119]

[0120] Where mask2(i,j) is the quality anomalous data segment mask obtained by using the method of detecting anomalous high-amplitude signals;

[0121] 3) Overall ratio of high-frequency noise epochs (OFN): The proportion of bad segments detected by the method (4c) (including bad segments with high noise-to-signal ratio). OFN ranges from 0 to 100%, and is calculated using the following formula:

[0122]

[0123] Where mask3(i,j) is the mask of the quality anomaly data segment obtained by using the detection frequency noise evaluation method;

[0124] 4) Overall ratio of low-correlation epochs (OLC): The proportion of bad segments detected by the method (4d). The OLC ranges from 0 to 100%, and the calculation formula is as follows:

[0125]

[0126] Where mask4(i,j) is the mask of the quality anomalous data segment obtained by using the method of detecting low correlation signals;

[0127] 5) Overall Data Quality (ODQ): The proportion of data segments in all channels that were not detected as bad segments by the above methods, i.e., the proportion of good segments. The ODQ ranges from 0 to 100%, and the calculation formula is as follows:

[0128]

[0129] in,

[0130]

[0131] Where tempRatio represents the proportion of channels judged as bad segments out of all channels in a certain trial, and T is a threshold parameter (default is 0.1). The strictness of the quality assessment can be adjusted by adjusting T.

[0132] 6) Data Quality Rating: Based on the ODQ value, data quality is divided into four levels: "A", "B", "C", and "D", corresponding to excellent, good, poor, and very poor, respectively. Data with ODQ ≥ 90% is classified as "A", 90% > ODQ ≥ 80% is "B", 80% > ODQ ≥ 60% is "C", and ODQ < 60% is "D". The specific formula is as follows:

[0133]

[0134] 7) Bad channels (Index of bad channels, bad channels): When the proportion of bad segments in a channel exceeds a certain threshold (60% is recommended), it is judged as a bad channel.

[0135] 8) Number of Bad Channels (NBC): The number of bad channels detected;

[0136] 9) Overall ratio of bad channels (OBC): The proportion of bad channels detected. The range of OBC is 0 to 100%.

[0137] 10) Mean Absolute Value of all epochs (allMAV);

[0138] 11) Mean Absolute Value of Bad Epochs (badMAV);

[0139] 12) Mean Absolute Value of good epochs (goodMAV).

[0140] Figure 7 This is a schematic diagram of the evaluation result report obtained by evaluating preprocessed event-related potential EEG data according to the present invention. The report provides researchers with a series of quantitative indicators for quality assessment, which researchers can use to perform quality control on event-related potential data.

[0141] Figure 8 This is a schematic diagram of the event-related potential waveform obtained by superimposing and averaging the data segments in step (6) above. The obtained waveform can be used for subsequent analysis and research.

[0142] The evaluation method used in this invention is based on the following assumptions:

[0143] The raw EEG data is continuous and is a structure variable containing at least the data and sampling rate. The event marker label of the task to which the data belongs and the length of the data segment (epoch) are known. The raw evaluation data will not be changed during the quality assessment process. If the EEG data sampling rate is less than twice the power supply operating frequency, the frequency noise detection method will not be used.

[0144] A suggested procedure for preprocessing in step (2) of this invention is as follows:

[0145] 1) High-pass filtering is used to acquire EEG data in the corresponding frequency band, and notch filtering is used to remove power frequency interference; 2) EOG regression method is used to remove EOG artifacts; 3) ICA method based on MARA or ADJUST is used to remove residual artifacts; 4) Reference electrode normalization interpolation technique (RESIT) is used to interpolate bad leads and convert EEG data into REST reference; 5) Bad segments are marked based on z-scored standard deviation.

[0146] In practice, the above preprocessing methods and procedures are not unique, and the degree of preprocessing can be adjusted according to actual needs. For example, if bandpass filtering is used to preprocess the signal, the OFN index will be 0; if only high-pass filtering and notch filtering are used to preprocess the signal, the quality control score will be lower, indicating stricter quality control. Regardless of the procedure, users can design the preprocessing procedure according to their needs without affecting the subsequent quality control algorithm.

[0147] In practical implementation, the evaluation metrics and threshold parameters of the four data quality assessment methods involved in this invention do not need to be completely consistent with those described in this invention. For example, in method 4, random sampling consistency detection and data segments with low correlation to other channels can be used as the basis. Specifically, for each data segment, a subset of channels is randomly selected, and the signal of the data segment is estimated based on the signal of the data segment in the channel subset. Then, the Pearson correlation between the real signal and the estimated signal of the data segment is calculated as the correlation index of the data segment. Regardless of how the evaluation metrics and threshold parameters are set, as long as a bad segment mask based on the trial level for a certain abnormal data segment is obtained, it is acceptable.

Claims

1. A method for calculating the quality of raw EEG data based on trial-level event-related potentials, characterized in that, Includes the following steps: Step 1: Using an EEG acquisition device, collect the subject's EEG evoked potentials based on a specific evoked task to obtain continuous raw EEG data V containing event-related potentials. The data dimension is n channels × t time points. Step 2: Preprocess the data, including bad conduction detection, high-pass or notch filtering, artifact removal, bad conduction interpolation, REST rereference, and bad segment labeling, to obtain the EEG signal V. inf The data dimension is n channels × t time points; Step 3: Based on the event labels of m specific evoked tasks and the data segments of length k time points, extract the EEG data segment V for a single trial of a specific event. epoch The data segment dimension is 1×k time points, and the number of data segments is n×m; Step 4: EEG data quality for each trial data segment was evaluated using four methods, and data segments with abnormal quality were marked using a mask of dimension n×m; The method for assessing the quality of EEG data is as follows: Step 4a: For each trial data segment V generated in step 3 epoch The data segment has a dimension of 1×k time points. The system detects whether there is a continuously unchanged constant signal or a signal containing non-numerical or infinite values, and calculates a mask with a dimension of n×m. ; Step 4b: For each trial data segment V generated in step 3 epoch The data segment dimension is 1×k time points, using absolute amplitude threshold and absolute... Threshold detection of data segments containing anomalous amplitude artifacts yields a mask of dimension n×m. ; Step 4c: For each trial data segment V generated in step 3 epoch The data segment has a dimension of 1×k time points. The signal-to-noise ratio of each data segment is calculated based on the Christian Kothe method to detect data segments severely contaminated by high-frequency noise interference, resulting in a mask with a dimension of n×m. ; Step 4d: For each trial data segment V generated in step 3 epoch The data segment has a dimension of 1×k time points. Based on Pearson correlation calculation, data segments with low correlation to other channels are used to obtain a mask with a dimension of n×m. ; Step 5: Based on the mask labeling results of Step 4, calculate a series of quantitative indicators related to the quality of event-related potential EEG data at the trial level, and rate the quality of the raw EEG data; The following are a series of quantitative indicators calculated based on the trial level mask. Among the following indicators, The number of data channels. Number of event labels for the data: 1) Calculate the overall proportion of bad segments with no / constant signals. : ; in, This is a mask for the quality anomaly data segment obtained in step 2 using the detection of no / constant evaluation method; 2) Calculate the proportion of high-amplitude abnormal segments in the overall data. : ; in, This is a mask for the quality anomaly data segment obtained in step 2 using the method for evaluating abnormal high-amplitude signals. 3) Calculate the overall frequency noise bad segment ratio : ; in, This is a mask for the quality anomaly data segment obtained in step 2 using the detection frequency noise assessment method; 4) Calculate the proportion of bad segments with low overall correlation. : ; in, This is a mask for the quality anomaly data segment obtained in step 2 using the method for evaluating low-correlation signals. 5) Calculate overall data quality : ; in, ; in, This represents the proportion of channels that were judged as bad segments out of all channels in a given trial. The threshold parameter is adjusted by... The rigor of the quality assessment can be adjusted; 6) Calculate data quality rating Based on the ODQ value, data quality is divided into four levels: "A", "B", "C", and "D", corresponding to excellent, good, poor, and very poor, respectively. The specific formula is as follows: ; 7) Calculate and output bad conductors: When the proportion of bad segments in a channel exceeds a set threshold, it is judged as a bad conductor; 8) Calculate and output the number of bad conductors: the number of bad conductors detected; 9) Calculate and output the overall bad conduction rate (OBC): the proportion of bad conduction detected; 10) Calculate and output the mean of the absolute magnitude of all data segments; 11) Calculate and output the mean of the absolute magnitude of the bad segments; 12) Calculate and output the mean of the absolute amplitude of the good segment; Step 6: Finally, based on the data segments corresponding to a specific event, after baseline correction and threshold processing, the data is superimposed and averaged to obtain the event-related potential waveform of the event, which is then combined with the quantitative results of the quality assessment to perform quality control on the data.

2. The method for calculating the quality of raw EEG data based on trial-level event-related potentials according to claim 1, characterized in that, Mask in step 4a The body algorithm is as follows: Use a standard deviation less than 10 -10 and absolute median difference less than 10 -10 The μV value is used to detect whether the data segment is a constant signal. The specific formula is as follows: ; in, The standard deviation of a single trial data segment. The absolute median difference for a single trial data segment. and These represent the non-digital values ​​and infinity values ​​present in the signal, respectively.

3. The method for calculating the quality of raw EEG data based on trial-level event-related potentials according to claim 1, characterized in that, Mask in step 4b The specific algorithm is as follows: Calculate the robust standard deviation for each trial data segment. , It equals 0.7413 times the interquartile range of the data, and then the robustness standard deviation of the z-score for the data segment is calculated from this. The absolute amplitude or Data segments exceeding a specified threshold are considered to contain abnormal amplitude artifacts, as shown in the following formula: ; in, ; In the above formula, Indicates the absolute amplitude threshold. Indicates absolute Threshold, It is all data segments in each subject's data. the median of The value is the sum of all data segments in each subject's data. The interquartile difference, It is the robustness standard deviation of the z-score for each data segment.

4. The method for calculating the quality of raw EEG data based on trial-level event-related potentials according to claim 1, characterized in that, Mask in step 4c The specific algorithm is as follows: First, low-pass filtering is applied to continuous EEG data to separate high-frequency and low-frequency signals. Then, the high-frequency and low-frequency signals are segmented into several data segments. Based on the Christian Kothe method, the robust signal-to-noise ratio is calculated using the ratio of the absolute median difference of the high-frequency signal to the absolute median difference of the low-frequency signal in each data segment. Then, the z-score robustness noise-to-signal ratio is calculated from this. ,Will or Data segments exceeding the specified threshold are considered to have severe high-frequency noise interference, as specified in the following formula: ; in, ; In the above formula, express Threshold, Indicates absolute Threshold, It is all data segments in each subject's data. the median of The value is the sum of all data segments in each subject's data. The approximate standard deviation is equal to 1.4826 times the absolute median difference of all data segments in each subject's data. It is the z-score robustness of the standard-to-noise ratio for each data segment.

5. The method for calculating the quality of raw EEG data based on trial-level event-related potentials according to claim 1, characterized in that, Mask in step 4d The specific algorithm is as follows: Calculate the Pearson correlation between each trial data segment and other channels. Use the 98th percentile of the correlation coefficient between a data segment and other channel data segments as the correlation index for that data segment. Data segments with a correlation index below a specified threshold are considered to have low correlation with other channels. The specific formula is as follows: ; in, The above are the correlation indicators; This represents the threshold for the correlation coefficient.

Citation Information

Patent Citations

  • Group relationship quality evaluation and intervention method and system based on graph pairing task

    CN113327019A

  • Single-trial brain wave signal analysis method and system

    CN116383600A