Signal bad channel repair method and device for electrocorticography based on deep learning
By using a deep learning-based approach, the system adaptively identifies damaged channels and performs iterative denoising, solving the real-time and accuracy problems of traditional cortical EEG signal damage repair and improving the reliability and continuity of clinical monitoring systems.
Patent Information
- Application Number
- CN202511195036.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-08-26
AI Technical Summary
Traditional cortical EEG signal damage repair methods cannot achieve rapid and accurate real-time repair, resulting in poor reliability and continuity of clinical monitoring systems.
By employing a deep learning-based approach, spatial and temporal information of the ECoG electrode array is acquired. The U-Net noise predictor and Repaint strategy are used to adaptively identify damaged channels and perform iterative denoising to generate high-quality repair signals.
It enables real-time, high-quality reconstruction of damaged channels, automatically identifies multiple damage modes and selects the optimal repair strategy, significantly improving the reliability and continuity of the clinical monitoring system.
Smart Images

Figure CN120744324B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic digital data processing technology, and in particular to a method and apparatus for repairing bad channels in cortical electroencephalography (EEG) based on deep learning. Background Technology
[0002] Traditional cortical EEG signal damage repair methods are mostly based on threshold settings (such as standard deviation, mean drift, volatility, etc.) for damage detection. These methods cannot quickly and accurately achieve real-time repair of cortical EEG signal damage, resulting in poor reliability and continuity of clinical monitoring systems and hindering the real-time, high-quality reconstruction of cortical EEG signal damage.
[0003] Therefore, a method and device for repairing bad channels in cortical electroencephalography (EEG) based on deep learning was developed to solve the above problems. Summary of the Invention
[0004] This invention proposes a method and device for repairing bad signals in cortical electroencephalograms (EEGs) based on deep learning, in order to solve the problem that existing technologies cannot quickly and accurately achieve real-time repair of bad signals in EEGs.
[0005] The present invention achieves the above objectives through the following technical solutions:
[0006] This invention relates to a deep learning-based method for repairing bad channels in cortical electroencephalography (EEG) signals, comprising:
[0007] Acquire spatial and temporal information of each electrode in the ECoG electrode array, and the real-time raw ECoG signal;
[0008] Preprocess the raw ECoG signal;
[0009] The preprocessed ECoG signal is then used to identify the normal and damaged channels to obtain the identified signal.
[0010] The identified signal is input into a trained signal bad sector reconstruction model, which outputs a repaired ECoG signal. The signal bad sector reconstruction model is used to perform repeated iterative denoising on the input. The process of a single iterative denoising includes: encoding the spatial and temporal information of each electrode into independent numerical channels to obtain encoded information; inputting the encoded information as conditional information along with the identified signal into a U-Net noise predictor to output predicted noise; removing the predicted noise from the identified signal to obtain an initial denoised signal; and replacing the normal channel in the initial denoised signal with the noise value that the normal channel in the preprocessed original ECoG signal should have at the next time step based on the Repaint strategy.
[0011] Furthermore, the preprocessed ECoG signal is analyzed to identify normal and damaged channels, including:
[0012] Channel feature extraction of ECoG signals;
[0013] Identify normal and damaged channels based on the extracted channel features;
[0014] Generate binary masks for the normal channel and the damaged channel. The binary mask value for the normal channel is "1", and the binary mask value for the damaged channel is "0".
[0015] Furthermore, before inputting the identified signal into the trained signal bad sector reconstruction model, a process is included to obtain the model parameter configuration based on an adaptive mechanism. This process includes:
[0016] Damage pattern features are extracted based on the identified signals. These damage pattern features include damage ratio, spatial clustering, and temporal sequence.
[0017] The initial standard parameter configuration is selected based on the characteristics of the damage mode. The initial standard parameter configuration includes the total number of diffusion steps and the number of resampling steps.
[0018] Select an application scenario, and then perform adaptive fine-tuning on the standard parameter configuration based on the application scenario to obtain the model parameter configuration. The adaptive fine-tuning process includes forcibly selecting the number of resampling steps or forcibly adjusting the total number of diffusion steps.
[0019] Furthermore, one or more of the following algorithms—statistical feature analysis, signal quality assessment, and anomaly detection—are used to identify the normal and damaged channels of the preprocessed ECoG signal.
[0020] Furthermore, the process of single-iteration denoising includes:
[0021] Noise prediction: The identified signal at the current time t is input into the U-Net noise predictor that integrates spatiotemporal coding, and the network predicts the noise applied to the signal;
[0022] Preliminary denoising: Subtract the predicted noise from the identified signal to obtain the initial denoised signal.
[0023] Conditional forced replacement: Using a binary mask, the part of the initial denoised signal belonging to the normal channel is forcibly replaced with the noise value that the original normal channel ECoG signal should have at that moment, and the reconstructed signal is obtained.
[0024] Resampling optimization: The reconstructed signal is returned from time t-1 to time t and noise is reapplied to it, and then the previous three steps are repeated.
[0025] Furthermore, the U-Net noise predictor uses U-Net as the basic network architecture, which includes a symmetrical encoder and decoder, and fuses deep and shallow features through skip connections.
[0026] Furthermore, based on the spatial and temporal information of each electrode, coded information is obtained by encoding it into independent numerical channels, including:
[0027] Acquire spatial information, which includes the row and column coordinates of each ECoG electrode;
[0028] Acquire time information, which includes the time step of signal sampling for each electrode;
[0029] The spatial and temporal information of each electrode is encoded into independent numerical channels to obtain encoded information. This encoded information is used to splice or add the signal feature maps corresponding to the ECoG signal in multiple layers of U-Net, and is injected into the backbone network of U-Net as additional conditional information.
[0030] For example, for an 8x8 ECoG signal electrode array, we encode the row and column coordinates (spatial information) of each electrode and the time step of signal sampling (temporal information) into independent numerical channels.
[0031] Furthermore, the training method for the signal bad sector reconstruction model is as follows:
[0032] ECoG signal data from multiple scenarios were acquired, including resting-state ECoG signal data, task-based ECoG signal data, task-based ECoG signal data including ECoG signal data under motor imagery, sensory stimulation, cognitive task, and clinical pathology conditions. The ECoG signal data was multi-source and heterogeneous, and some data in the multi-scenario ECoG signal data were ECoG signal data of damaged channels under various damage modes.
[0033] Multi-scenario ECoG signal data are divided into training and validation sets;
[0034] The constructed bad channel reconstruction model is trained using a training set with the goal of minimizing reconstruction error, and then validated using a validation set to obtain the trained bad channel reconstruction model.
[0035] Furthermore, the preprocessing includes filtering and normalization.
[0036] This invention also provides a deep learning-based cortical electroencephalogram (EEG) signal bad sector repair device, comprising:
[0037] The acquisition module is used to acquire the spatial and temporal information of each electrode in the ECoG electrode array, as well as the real-time raw ECoG signal;
[0038] The preprocessing module is used to preprocess the raw ECoG signal;
[0039] The identification module is used to identify the normal and damaged channels of the preprocessed ECoG signal to obtain the identified signal;
[0040] The repair module is used to input the identified signal into a trained signal bad sector reconstruction model and output the repaired ECoG signal. The signal bad sector reconstruction model is used to perform repeated iterative denoising processing on the input. The process of a single iteration of denoising processing includes: encoding information into independent numerical channels based on the spatial and temporal information of each electrode; inputting the encoded information as conditional information along with the identified signal into a U-Net noise predictor to output predicted noise; removing the predicted noise from the identified signal to obtain the initial denoised signal; and replacing the normal channel in the initial denoised signal with the noise value that the normal channel in the preprocessed original ECoG signal should have at the next time step based on the Repaint strategy.
[0041] The beneficial effects of this invention are as follows:
[0042] The present invention proposes a method and device for repairing bad channels in cortical electroencephalography (ECO) signals based on deep learning, which can achieve real-time, high-quality reconstruction of damaged channels without the need for manual parameter preset. It can automatically identify multiple damage modes and adaptively select the optimal repair strategy, thereby quickly and accurately achieving real-time repair of bad channels in ECoG signals and significantly improving the reliability and continuity of clinical monitoring systems. Attached Figure Description
[0043] Figure 1 This is a flowchart of the method and device for repairing bad channels in cortical electroencephalography based on deep learning, as described in this application. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0045] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0046] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0047] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0048] like Figure 1 As shown, a method and apparatus for repairing bad channels in cortical electroencephalography (EEG) based on deep learning includes:
[0049] This invention relates to a deep learning-based method for repairing bad channels in cortical electroencephalography (EEG) signals, comprising:
[0050] S1: Acquire spatial and temporal information of each electrode in the ECoG electrode array, and the real-time raw ECoG signal;
[0051] S2: Preprocess the raw ECoG signal;
[0052] S3: Identify the normal and damaged channels of the preprocessed ECoG signal to obtain the identified signal;
[0053] S4: Input the identified signal into the trained bad channel reconstruction model and output the repaired ECoG signal. The bad channel reconstruction model is used to perform repeated iterative denoising on the input. The process of a single iterative denoising process includes: encoding the spatial and temporal information of each electrode into an independent numerical channel to obtain encoded information; inputting the encoded information as conditional information and the identified signal into the U-Net noise predictor to output predicted noise; removing the predicted noise from the identified signal to obtain the initial denoised signal; and replacing the normal channel in the initial denoised signal with the noise value that the normal channel in the preprocessed original ECoG signal should have at the next time step based on the Repaint strategy.
[0054] In one embodiment, identifying the normal and damaged channels of the preprocessed ECoG signal includes:
[0055] Channel feature extraction of ECoG signals;
[0056] Identify normal and damaged channels based on the extracted channel features;
[0057] Generate binary masks for the normal channel and the damaged channel. The binary mask value for the normal channel is "1", and the binary mask value for the damaged channel is "0".
[0058] The "binary mask" is a data matrix (or tensor) with the same spatial dimensions as the high-density ECoG electrode array. Each element in this matrix corresponds one-to-one with an electrode channel.
[0059] Numerical meaning: We agree that a value of "1" in the matrix represents a normal channel with good signal quality at that position; a value of "0" represents a damaged channel that needs to be repaired.
[0060] Generation: As stated in our response to Question 1, this mask is the direct output of the upstream "automatic identification" step. Channels determined to be "good" by the identification algorithm are marked with a 1 at the corresponding position in the mask; channels determined to be "bad" are marked with a 0.
[0061] In one embodiment, before inputting the identified signal into the trained signal bad sector reconstruction model, a process is further included to obtain model parameter configuration based on an adaptive mechanism. This process includes:
[0062] Damage pattern features are extracted based on the identified signals. These damage pattern features include damage ratio, spatial clustering, and temporal sequence.
[0063] The initial standard parameter configuration is selected based on the characteristics of the damage mode. The initial standard parameter configuration includes the total number of diffusion steps and the number of resampling steps.
[0064] Select an application scenario, and then perform adaptive fine-tuning on the standard parameter configuration based on the application scenario to obtain the model parameter configuration. The adaptive fine-tuning process includes forcibly selecting the number of resampling steps or forcibly adjusting the total number of diffusion steps.
[0065] The adaptive parameter selection mechanism in this application is a two-tier decision-making mechanism based on "damage mode characteristics" and "clinical application needs," and its working principle is as follows:
[0066] First layer: Initial selection of repair parameters based on "damage mode characteristics".
[0067] The system first quantifies the damage status of the current ECoG signal, extracting the aforementioned "damage mode features" (such as damage ratio, spatial clustering, etc.). Then, through a repair strategy lookup table or a lightweight decision model (such as a decision tree), these features are mapped to a set of initial repair model processing parameters.
[0068] Example rules:
[0069] If the damage rate is <15% and the spatial clustering is “dispersed”, then select a set of standard parameter configurations (e.g., total diffusion steps T=500, number of resampling steps j=1).
[0070] If the damage ratio is >40% OR the spatial clustering is “blocky”, then select a set of enhanced parameter configurations (e.g., total diffusion steps T=1000, resampling times j=3) because the repair of large-area continuous damage requires stronger model constraints and more refined iterations.
[0071] The second layer: dynamic fine-tuning of parameters based on "clinical application scenario requirements".
[0072] After obtaining the initial parameter configuration, the system will perform a final adaptive fine-tuning based on the "clinical application scenario requirements" set or preset by the operator. These requirements are mainly used to balance repair quality and processing speed.
[0073] Scenario 1: Postoperative epileptic focus localization analysis.
[0074] Requirements: To achieve the highest quality of restoration, it is essential to ensure that the restored signal retains the morphology of weak pathological signals such as spikes and sharp waves to the greatest extent possible, without being sensitive to processing speed.
[0075] Adaptive selection: Based on the parameters initially selected in the first layer, further increase the model complexity or the number of iterations. For example, force the selection of the number of resampling times j=max(j,3) to ensure the highest signal fidelity.
[0076] Scenario 2: Real-time brain-computer interface control.
[0077] Requirements: The goal is to achieve the fastest possible processing speed to ensure real-time response to control commands, while tolerating minor correction errors.
[0078] Adaptive selection: Based on the parameters initially selected in the first layer, priority is given to reducing computational load. For example, the system may select a lightweight / distillation version of the repair model, or force the total number of diffusion steps T=min(T,200) to meet real-time requirements.
[0079] Through the aforementioned dual-layer adaptive mechanism of "feature initial selection + scenario fine-tuning", the technical solution of this application can intelligently and autonomously select the optimal processing parameter configuration for the current specific signal conditions and application objectives, thereby achieving efficient, accurate and highly automated signal repair.
[0080] The aforementioned "damage mode characteristics" are derived from a combination of systematic summaries of clinical practice experience and quantitative analysis of simulation-generated data.
[0081] Source 1: Summarization and abstraction of clinical experience.
[0082] This is a summary of various signal artifacts and electrode malfunctions observed during long-term clinical ECoG monitoring. Clinicians and technicians can identify several typical damage patterns based on experience, such as:
[0083] Random single-channel failure: caused by poor contact of a single electrode or its own aging, manifested as a flat signal or high-frequency white noise.
[0084] Continuous multi-channel failure: Commonly occurs at the edge of the electrode array, caused by brain tissue deformation or incomplete dura mater coverage, resulting in the lifting of an entire row or column of electrodes and signal loss.
[0085] Regional block failure: Due to patient movement, fluid seepage between electrode pads and brain surface, etc., multiple electrodes in a local area simultaneously experience a decrease in signal quality.
[0086] Transient pulse interference and continuous power frequency interference.
[0087] Source 2: Quantification and characterization of simulation data.
[0088] After summarizing the aforementioned clinical experience, this application quantifies these patterns and defines calculable "damage pattern characteristics." These characteristics include damage ratio (the percentage of bad channels in the total channels), spatial clustering (whether bad channels are spatially dispersed or clustered), and temporal persistence (whether the interference is transient or the damage is continuous). Subsequently, these damage patterns are purposefully simulated on complete ECoG signal data to generate a large amount of diverse training and validation data.
[0089] Therefore, the "damage mode characteristics" are not only rooted in clinical practice, but have also been systematically quantified and expanded through engineering methods, forming a reliable basis for the selection of subsequent adaptive repair strategies.
[0090] In one embodiment, one or more of the following algorithms—statistical feature analysis, signal quality assessment, and anomaly detection—are used to identify the normal and damaged channels of the preprocessed ECoG signal.
[0091] Statistical feature analysis: Calculate the power spectral density, kurtosis, signal-to-noise ratio and other indicators of each channel signal, and set thresholds to identify channels with abnormally flat signals (broken lines) or excessive noise (poor contact).
[0092] Signal quality assessment: Using methods such as correlation analysis, the temporal correlation between each channel and its neighboring channel signals is calculated. Channels with significantly lower-than-average correlation can be marked as damaged.
[0093] Anomaly detection algorithm: Applying mature machine learning algorithms such as Isolation Forest, the signal features of each channel are used as input to automatically detect outliers and "bad channels".
[0094] Any one or a combination of the above methods can effectively identify the damaged channel and generate the binary mask required for subsequent repair steps.
[0095] In one embodiment, the process of a single iteration of denoising includes:
[0096] Noise prediction: The identified signal at the current time t is input into the U-Net noise predictor that integrates spatiotemporal coding, and the network predicts the noise applied to the signal;
[0097] Preliminary denoising: Subtract the predicted noise from the identified signal to obtain the initial denoised signal.
[0098] Conditional forced replacement: Using a binary mask, the part of the initial denoised signal belonging to the normal channel is forcibly replaced with the noise value that the original normal channel ECoG signal should have at that moment, and the reconstructed signal is obtained.
[0099] Resampling optimization: The reconstructed signal is returned from time t-1 to time t and noise is reapplied to it, and then the previous three steps are repeated.
[0100] In one embodiment, the U-Net noise predictor uses U-Net as the basic network architecture, which includes a symmetrical encoder and decoder, and fuses deep and shallow features through skip connections.
[0101] In one embodiment, encoded information is obtained by encoding the spatial and temporal information of each electrode into independent numerical channels, including:
[0102] Acquire spatial information, which includes the row and column coordinates of each ECoG electrode;
[0103] Acquire time information, which includes the time step of signal sampling for each electrode;
[0104] The spatial and temporal information of each electrode is encoded into independent numerical channels to obtain encoded information. This encoded information is used to splice or add the signal feature maps corresponding to the ECoG signal in multiple layers of U-Net, and is injected into the backbone network of U-Net as additional conditional information.
[0105] In each back-diffusion (denoising) step from t=T to 1:
[0106] Premise: After processing by the U-Net noise predictor, a preliminary denoising result x_generated(t-1) for the entire high-resolution signal (including the normal channel and the damaged channel) is obtained. At the same time, the noisy version of the normal channel signal x_known(t-1) that should exist at time t-1 can also be obtained based on the normal channel signal x_known(0).
[0107] Data fusion using a mask: Here, the binary mask m is used to perform the following fusion operation to generate the signal x_final(t-1) for the next iteration:
[0108] x_final(t-1)=m*x_known(t-1)+(1-m)*x_generated(t-1)
[0109] The asterisk (*) represents element-wise multiplication.
[0110] m*x_known(t-1): Since the mask m is 1 in the normal channel and 0 in the damaged channel, the result of this operation is to retain the true signal values of all known channels, while clearing the values of all damaged channels to zero.
[0111] (1-m)*x_generated(t-1): The (1-m) operation inverts the mask (normal channels are 0, and corrupted channels are 1). Therefore, the result of this operation is to retain all newly generated values on corrupted channels while discarding all generated values on normal channels.
[0112] Adding m*x_known(t-1) and (1-m)*x_generated(t-1) together achieves the most critical step of this application: in each iteration, the model's processing in the normal channel is forced to be covered by a real and reliable signal, and only the model's repair results for the damaged channel are adopted.
[0113] In summary, binary masking serves as a bridge connecting the "automatic identification" and "conditional repair" stages. By precisely and repeatedly selecting and replacing data during the iteration process, it effectively transforms the unconditional generative model into a high-performance conditional repair model that is strictly constrained by real data.
[0114] In one embodiment, the training method for the signal bad sector reconstruction model is as follows:
[0115] ECoG signal data from multiple scenarios were acquired, including resting-state ECoG signal data, task-based ECoG signal data, task-based ECoG signal data including ECoG signal data under motor imagery, sensory stimulation, cognitive task, and clinical pathology conditions. The ECoG signal data was multi-source and heterogeneous, and some data in the multi-scenario ECoG signal data were ECoG signal data of damaged channels under various damage modes.
[0116] Multi-scenario ECoG signal data are divided into training and validation sets;
[0117] The constructed bad channel reconstruction model is trained using a training set with the goal of minimizing reconstruction error, and then validated using a validation set to obtain the trained bad channel reconstruction model.
[0118] Resting-state ECoG signal data: This includes ECoG data in both open-eye and closed-eye resting states. This scenario data is used to allow the model to learn the brain's baseline activity rhythms, such as alpha waves and beta waves.
[0119] Task-oriented ECoG signal data includes: ECoG signal data in motor imagery state, such as imagining left / right hand grasping, stretching, etc., used to capture event-related desynchronization / synchronization and other features related to motor intention; ECoG signal data in sensory stimulus state, such as visual stimuli (flash) and auditory stimuli (pure tone), used to learn evoked potentials and other signal patterns locked with external events; and ECoG signal data in cognitive task state, such as mental arithmetic and short-term memory, used to cover the complex signal dynamics generated by higher-order cognitive activities.
[0120] Clinical pathological ECoG signal data: This data primarily comes from epilepsy patients, covering abnormal discharge signals such as spikes and sharp waves during interictal periods, as well as epileptic pattern signals such as rhythmic high-frequency oscillations during ictal periods. This is crucial for ensuring that the repair model does not distort or introduce artifacts when processing pathological signals.
[0121] Multi-source heterogeneous data: The training set also includes data from different subjects, different recording devices, and different time periods to enhance the model's robustness to individual and hardware differences.
[0122] By training with ECoG signal data from multiple scenarios, the signal bad sector reconstruction model of this application can learn the more fundamental and universal distribution patterns of ECoG signals, thereby achieving robust repair of various damaged signals.
[0123] In one embodiment, the preprocessing includes filtering and normalization.
[0124] In one embodiment, the present invention also provides a deep learning-based cortical electroencephalogram (EEG) signal bad sector repair device, comprising:
[0125] The acquisition module is used to acquire the spatial and temporal information of each electrode in the ECoG electrode array, as well as the real-time raw ECoG signal;
[0126] The preprocessing module is used to preprocess the raw ECoG signal;
[0127] The identification module is used to identify the normal and damaged channels of the preprocessed ECoG signal to obtain the identified signal;
[0128] The repair module is used to input the identified signal into a trained signal bad sector reconstruction model and output the repaired ECoG signal. The signal bad sector reconstruction model is used to perform repeated iterative denoising processing on the input. The process of a single iteration of denoising processing includes: encoding information into independent numerical channels based on the spatial and temporal information of each electrode; inputting the encoded information as conditional information along with the identified signal into a U-Net noise predictor to output predicted noise; removing the predicted noise from the identified signal to obtain the initial denoised signal; and replacing the normal channel in the initial denoised signal with the noise value that the normal channel in the preprocessed original ECoG signal should have at the next time step based on the Repaint strategy.
[0129] The present invention proposes a method and device for repairing bad channels in cortical electroencephalography (ECO) signals based on deep learning, which solves the problem of achieving real-time, high-quality reconstruction of damaged channels. The technical solution of this application does not require manual parameter preset, can automatically identify multiple damage modes and adaptively select the optimal repair strategy, and quickly and accurately achieve real-time repair of bad channels in ECoG signals, significantly improving the reliability and continuity of clinical monitoring systems.
[0130] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for repairing bad channels in cortical electroencephalography (EEG) signals based on deep learning, characterized in that, include: Acquire spatial and temporal information of each electrode in the ECoG electrode array, and the real-time raw ECoG signal; Preprocess the raw ECoG signal; The preprocessed ECoG signal is then used to identify the normal and damaged channels to obtain the identified signal. The identified signal is input into a trained signal bad sector reconstruction model, and the repaired ECoG signal is output. The signal bad sector reconstruction model is used to perform repeated iterative denoising on the input. The process of a single iterative denoising process includes: encoding the spatial and temporal information of each electrode into an independent numerical channel to obtain encoded information; inputting the encoded information as conditional information and the identified signal into a U-Net noise predictor to output predicted noise; removing the predicted noise from the identified signal to obtain an initial denoised signal; and replacing the normal channel in the initial denoised signal with the noise value that the normal channel in the preprocessed original ECoG signal should have at the next time step based on the Repaint strategy. Encoded information is obtained by encoding the spatial and temporal information of each electrode into independent numerical channels, including: Acquire spatial information, which includes the row and column coordinates of each ECoG electrode; Acquire time information, which includes the time step of signal sampling for each electrode; The spatial and temporal information of each electrode is encoded into independent numerical channels to obtain encoded information. This encoded information is used to splice or add the signal feature maps corresponding to the ECoG signal in multiple layers of U-Net, and is injected into the backbone network of U-Net as additional conditional information.
2. The method for repairing bad channels in cortical electroencephalography based on deep learning according to claim 1, characterized in that, Identify the normal and damaged channels of the preprocessed ECoG signal, including: Channel feature extraction of ECoG signals; Identify normal and damaged channels based on the extracted channel features; Generate binary masks for the normal channel and the damaged channel. The binary mask value for the normal channel is "1", and the binary mask value for the damaged channel is "0".
3. The method for repairing bad channels in cortical electroencephalography based on deep learning according to claim 1 or 2, characterized in that, Before inputting the identified signal into the trained signal bad sector reconstruction model, the process also includes obtaining model parameter configuration based on an adaptive mechanism. This process includes: Damage pattern features are extracted based on the identified signals. These damage pattern features include damage ratio, spatial clustering, and temporal sequence. The initial standard parameter configuration is selected based on the characteristics of the damage mode. The initial standard parameter configuration includes the total number of diffusion steps and the number of resampling steps. Select an application scenario, and then perform adaptive fine-tuning on the standard parameter configuration based on the application scenario to obtain the model parameter configuration. The adaptive fine-tuning process includes forcibly selecting the number of resampling steps or forcibly adjusting the total number of diffusion steps.
4. The method for repairing bad channels in cortical electroencephalography based on deep learning according to claim 1 or 2, characterized in that, One or more of the following algorithms are used to identify the normal and damaged channels of the preprocessed ECoG signal: statistical feature analysis, signal quality assessment, and anomaly detection.
5. The method for repairing bad channels in cortical electroencephalography based on deep learning according to claim 2, characterized in that, The process of single-iteration denoising includes: Noise prediction: The identified signal at the current time t is input into the U-Net noise predictor that integrates spatiotemporal coding, and the network predicts the noise applied to the signal; Preliminary denoising: Subtract the predicted noise from the identified signal to obtain the initial denoised signal; Conditional forced replacement: Using a binary mask, the part of the initial denoised signal belonging to the normal channel is forcibly replaced with the noise value that the original normal channel ECoG signal should have at that moment, and the reconstructed signal is obtained. Resampling optimization: The reconstructed signal is returned from time t-1 to time t and noise is reapplied to it, and then the previous three steps are repeated.
6. The method for repairing bad channels in cortical electroencephalography based on deep learning according to claim 1, characterized in that, The U-Net noise predictor uses U-Net as its basic network architecture, which includes a symmetrical encoder and decoder and fuses deep and shallow features through skip connections.
7. The method for repairing bad channels in cortical electroencephalography based on deep learning according to claim 1, characterized in that, The training method for the signal bad sector reconstruction model is as follows: ECoG signal data from multiple scenarios were acquired, including resting-state ECoG signal data, task-based ECoG signal data, task-based ECoG signal data including ECoG signal data under motor imagery, sensory stimulation, cognitive task, and clinical pathology conditions. The ECoG signal data was multi-source and heterogeneous, and some data in the multi-scenario ECoG signal data were ECoG signal data of damaged channels under various damage modes. Multi-scenario ECoG signal data are divided into training and validation sets; The constructed bad channel reconstruction model is trained using a training set with the goal of minimizing reconstruction error, and then validated using a validation set to obtain the trained bad channel reconstruction model.
8. The method for repairing bad channels in cortical electroencephalography based on deep learning according to claim 1, characterized in that, The preprocessing includes filtering and normalization.
9. A deep learning-based cortical electroencephalogram (EEG) signal bad sector repair device, characterized in that, include: The acquisition module is used to acquire the spatial and temporal information of each electrode in the ECoG electrode array, as well as the real-time raw ECoG signal; The preprocessing module is used to preprocess the raw ECoG signal; The identification module is used to identify the normal and damaged channels of the preprocessed ECoG signal to obtain the identified signal; The repair module is used to input the identified signal into the trained signal bad sector reconstruction model and output the repaired ECoG signal. The signal bad sector reconstruction model is used to perform repeated iterative denoising processing on the input. The process of a single iterative denoising process includes: encoding the spatial and temporal information of each electrode into an independent numerical channel to obtain encoded information; inputting the encoded information as conditional information and the identified signal into the U-Net noise predictor to output predicted noise; removing the predicted noise from the identified signal to obtain the initial denoised signal; and replacing the normal channel in the initial denoised signal with the noise value that the normal channel in the preprocessed original ECoG signal should have at the next time step based on the Repaint strategy. Encoded information is obtained by encoding the spatial and temporal information of each electrode into independent numerical channels, including: Acquire spatial information, which includes the row and column coordinates of each ECoG electrode; Acquire time information, which includes the time step of signal sampling for each electrode; The spatial and temporal information of each electrode is encoded into independent numerical channels to obtain encoded information. This encoded information is used to splice or add the signal feature maps corresponding to the ECoG signal in multiple layers of U-Net, and is injected into the backbone network of U-Net as additional conditional information.