A hybrid expert-based classification method for ictal and interictal epilepsy based on intracranial EEG.

CN122548445APending Publication Date: 2026-08-11TIANJIN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-15
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0003]在实施本发明的过程中,发现相关技术中至少存在以下问题:在对颅内脑电信号进行特征提取时,通常难以充分提取颅内脑电信号包含的多维信息,进而导致分类模型的识别精度不足;同时,相关技术的分类器结构难以兼顾不同模式颅内脑电信号的分类能力,对差异化特征的拟合效果较差,进一步限制了分类结果的准确性,难以满足临床辅助诊断对分类精度的需求

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122548445A_ABST
    Figure CN122548445A_ABST
Patent Text Reader

Abstract

This invention provides a hybrid expert-based method for classifying epileptic seizures and interictal periods based on intracranial EEG, applicable to the fields of artificial intelligence and biomedical signal processing. The method includes: decoupling the target intracranial EEG signal into multiple frequency band components; extracting frequency domain feature vectors by performing spatial filtering on each frequency band component; fusing the frequency domain feature vectors with the temporal feature vectors extracted from the target intracranial EEG signal through cross-channel spatial filtering to obtain a fused feature vector including multi-frequency band spectral spatial information and original temporal information; determining the matching degree between each expert network and the fused feature vector through a gating network of a hybrid expert classifier, and identifying multiple target expert networks from among the multiple expert networks to process the fused feature vector; and determining the epileptic seizure classification result to assist user judgment based on the aggregated features obtained by aggregating the intermediate features output by each target expert network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and biomedical signal processing technology, and more specifically to a hybrid expert-based method for classifying the epileptic seizure and interictal periods of intracranial EEG. Background Technology

[0002] In the auxiliary diagnosis of neurodevelopmental disorders, intracranial electroencephalogram (EEG) signals are an important basis for determining the state of an epileptic seizure. Currently, deep learning methods are typically used to classify the ictal and interictal phases of epilepsy based on intracranial EEG signals.

[0003] In the process of implementing this invention, it was found that at least the following problems exist in the related technologies: when extracting features from intracranial electroencephalogram (EEG) signals, it is usually difficult to fully extract the multidimensional information contained in the intracranial EEG signals, which leads to insufficient recognition accuracy of the classification model; at the same time, the classifier structure of the related technologies is difficult to take into account the classification ability of intracranial EEG signals of different modes, and the fitting effect on differential features is poor, which further limits the accuracy of the classification results and makes it difficult to meet the requirements of clinical auxiliary diagnosis for classification accuracy. Summary of the Invention

[0004] In view of the above problems, the present invention provides a method for classifying the epileptic seizure phase and interictal phase based on hybrid experts' intracranial EEG.

[0005] According to a first aspect of the present invention, a method for classifying epileptic seizures and interictal periods based on hybrid expert classifiers is provided, comprising: decoupling a target intracranial EEG signal into multiple frequency band components; extracting a frequency domain feature vector by performing spatial filtering on each frequency band component, wherein the target intracranial EEG signal is obtained by preprocessing an original intracranial EEG signal; fusing the frequency domain feature vector with a temporal feature vector extracted by cross-channel spatial filtering of the target intracranial EEG signal to obtain a fused feature vector including multi-frequency band spectral spatial information and original temporal information; determining the matching degree between each expert network and the fused feature vector through a gating network of a hybrid expert classifier, and determining multiple target expert networks from the multiple expert networks for processing the fused feature vector; and determining an epileptic seizure classification result for assisting user judgment based on an aggregated feature obtained by aggregating intermediate features output by each of the target expert networks, wherein the epileptic seizure classification result indicates whether the target intracranial EEG signal corresponds to an epileptic seizure or an interictal period.

[0006] According to an embodiment of the present invention, the above-described method of decoupling the target intracranial EEG signal into multiple frequency band components and extracting frequency domain feature vectors by performing spatial filtering on each frequency band component includes: using a frequency domain spectral spatial embedding module to perform multi-level discrete wavelet decomposition of each channel in a tree structure; for each level of decomposition, convolving and downsampling the input signal using a low-pass filter and a high-pass filter respectively to obtain frequency band components including approximate components and detail components; concatenating the frequency band components of each channel along the channel dimension to obtain a spectral feature tensor; and using a frequency domain encoder in a dual-stream spatiotemporal encoder to perform spatial filtering on each frequency band component in the above spectral feature tensor to obtain the above-mentioned frequency domain feature vector.

[0007] According to an embodiment of the present invention, the frequency domain encoder includes a grouped convolutional layer, which includes multiple sub-convolutional layers corresponding to each frequency band. The step of spatially filtering each frequency band component in the spectral feature tensor to obtain the frequency domain feature vector includes: inputting the spectral feature tensor into the grouped convolutional layer; using each of the sub-convolutional layers to spatially filter the frequency band components of the corresponding frequency band in the spectral feature tensor, and outputting a spatially filtered feature map of the frequency band; performing norm aggregation along the time dimension on the spatially filtered feature maps of each frequency band to obtain a feature vector for each frequency band; and concatenating the feature vectors of all frequency bands along the feature dimension to obtain the frequency domain feature vector.

[0008] According to an embodiment of the present invention, the above-mentioned feature fusion of the frequency domain feature vector and the time domain feature vector obtained by cross-channel spatial filtering of the target intracranial EEG signal to obtain a fused feature vector including multi-band spectral spatial information and original time domain information includes: using the time domain encoder in the dual-stream spatiotemporal encoder, processing the target intracranial EEG signal through the full-channel hybrid convolutional layer in the time domain encoder to extract the global spatial dependency relationship and temporal waveform features between channels to obtain a time domain intermediate feature map; performing norm aggregation on the time domain intermediate feature map along the time dimension to obtain the time domain feature vector; and concatenating the frequency domain feature vector and the time domain feature vector to obtain the fused feature vector.

[0009] According to an embodiment of the present invention, the gating network is a linear mapping layer; the gating network, which uses a hybrid expert classifier to determine the matching degree between each expert network and the fused feature vector, and determines multiple target expert networks from multiple expert networks for processing the fused feature vector, includes: inputting the fused feature vector into the gating network; mapping the fused feature vector into a gating score vector using the gating network; the gating score vector including a gating score characterizing the matching degree between the fused feature vector and each of the expert networks; selecting a predetermined number of target expert networks from the multiple expert networks based on the multiple gating scores, wherein the gating scores of the target expert networks are higher than those of other expert networks; and inputting the fused feature vector into each of the target expert networks to perform feature transformation on the fused feature vector using each of the target expert networks to obtain intermediate features.

[0010] According to an embodiment of the present invention, the above-mentioned determination of the epileptic seizure classification result for assisting user judgment based on the aggregated features obtained by aggregating the intermediate features output by each of the above-mentioned target expert networks includes: obtaining target gating scores to characterize the matching degree between the above-mentioned fused feature vector and each of the above-mentioned target expert networks; normalizing the multiple above-mentioned target gating scores to obtain the aggregated weights corresponding to each of the above-mentioned target expert networks; using the multiple above-mentioned aggregated weights to perform weighted aggregation on the intermediate features output by each of the above-mentioned target expert networks to obtain aggregated features; and classifying based on the above-mentioned aggregated features to obtain the above-mentioned classification result.

[0011] According to an embodiment of the present invention, the above method further includes: using a data preprocessing module to sequentially perform bad channel removal, bandpass filtering and notch filtering, and bipolar reference transformation on the original intracranial electroencephalogram (EEG) signal to obtain a denoised and rereferenced intracranial EEG signal; slicing the denoised and rereferenced intracranial EEG signal into sliding window slices according to a preset time window, and standardizing each slice; resampling the standardized slices to a preset uniform sampling rate to obtain the target intracranial EEG signal.

[0012] According to an embodiment of the present invention, the above method further includes: inputting the original intracranial electroencephalogram (EEG) signal into a classification model to obtain the above-mentioned epileptic seizure classification result, wherein the classification model includes a data preprocessing module, a frequency domain spectral spatial embedding module, a dual-stream spatiotemporal encoder, and a hybrid expert classifier.

[0013] According to an embodiment of the present invention, the above classification model is trained in the following manner: the intracranial electroencephalogram (EEG) signal of the sample is input into the initial classification model to obtain the epileptic seizure classification result of the sample; based on the difference between the epileptic seizure classification result of the sample and the label corresponding to the intracranial EEG signal of the sample, and the regularization loss of the initial classification model, the parameters of the initial classification model are adjusted in multiple rounds to obtain the classification model, wherein the regularization loss is determined according to the weight matrix in the parameters; for the target adjustment round, if the weight matrix does not meet the numerical constraints, the weight matrix is ​​scaled using a preset scaling factor until the numerical constraints are met.

[0014] According to an embodiment of the present invention, the above-mentioned sample intracranial EEG signal includes training sample intracranial EEG signal and verification sample intracranial EEG signal; the above method further includes: dividing the original sample intracranial EEG signal into multiple consecutive original sample intracranial EEG signals in chronological order; dividing the original sample intracranial EEG signal into sample signal segments according to a preset number of divisions, and using each sample signal segment as a training signal segment or a verification signal segment, wherein there is a time gap between the training signal segment and the verification signal; merging multiple verification signal segments located at the same division position to obtain the verification sample intracranial EEG signal, and merging multiple training signal segments located at the same division position to obtain the training sample intracranial EEG signal.

[0015] A second aspect of the present invention provides a hybrid expert-based intracranial EEG classification device for epileptic seizure phase and interictal period, comprising: an extraction module for decoupling a target intracranial EEG signal into multiple frequency band components, and extracting a frequency domain feature vector by performing spatial filtering on each frequency band component, wherein the target intracranial EEG signal is obtained by preprocessing the original intracranial EEG signal; a fusion module for fusing the frequency domain feature vector and a temporal feature vector obtained by cross-channel spatial filtering of the target intracranial EEG signal to obtain a fused feature vector including multi-frequency band spectral spatial information and original temporal information; a matching module for determining the matching degree between each expert network and the fused feature vector through a gating network of a hybrid expert classifier, and determining multiple target expert networks from the multiple expert networks for processing the fused feature vector; and a determination module for determining an epileptic seizure classification result for assisting user judgment based on aggregated features obtained by aggregating intermediate features output by each of the target expert networks, wherein the epileptic seizure classification result indicates whether the target intracranial EEG signal corresponds to an epileptic seizure phase or an interictal period.

[0016] A third aspect of the present invention provides an electronic device comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.

[0017] A fourth aspect of the present invention also provides a computer-readable storage medium having a computer program or instructions stored thereon, wherein the computer program or instructions, when executed by a processor, implement the steps of the above-described method.

[0018] A fifth aspect of the present invention also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method. Attached Figure Description

[0019] The above-mentioned contents, as well as other objects, features and advantages of the present invention, will become clearer from the following description of embodiments of the present invention with reference to the accompanying drawings.

[0020] Figure 1 The diagram illustrates an application scenario of the hybrid expert-based intracranial EEG epilepsy ictal phase and interictal phase classification method according to an embodiment of the present invention.

[0021] Figure 2 A flowchart of a hybrid expert-based method for classifying the epileptic seizure and interictal phases based on intracranial EEG data according to an embodiment of the present invention is shown.

[0022] Figure 3 A schematic diagram of the structure of a classification model according to an embodiment of the present invention is shown.

[0023] Figure 4 A structural block diagram of a hybrid expert-based intracranial EEG epilepsy seizure and interictal phase classification device according to an embodiment of the present invention is shown.

[0024] Figure 5 A block diagram of an electronic device suitable for implementing a hybrid expert-based intracranial EEG method for classifying epileptic seizure and interictal periods according to an embodiment of the present invention is shown. Detailed Implementation

[0025] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the invention. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the invention for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.

[0026] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0027] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0028] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).

[0029] In the technical solution of this invention, the user information (including but not limited to user personal information, user image information, user device information, such as location information) and data (including but not limited to data used for analysis, stored data, and displayed data) involved are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, application, and application of related data all comply with relevant laws, regulations, and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entry points for users to choose to authorize or refuse.

[0030] In scenarios involving automated decision-making using personal information, the methods, devices, and systems provided in this invention offer users corresponding entry points for choosing to agree to or reject the automated decision-making results. If the user chooses to reject, the process proceeds to the expert decision-making stage. Here, "automated decision-making" refers to the activity of automatically analyzing and evaluating an individual's behavioral habits, interests, or economic, health, and credit status through computer programs, and then making a decision. Here, "expert decision-making" refers to the activity of making decisions by personnel who specialize in a particular field, possess specialized experience, knowledge, and skills, and have reached a certain level of professional expertise.

[0031] Epilepsy is one of the most common chronic neurological disorders worldwide, affecting approximately 50 million people. It is characterized by recurrent, unpredictable seizures. Seizures are caused by abnormal synchronous discharges of neurons in the brain, involving transient changes in motor, sensory, autonomic, and cognitive functions, severely impacting quality of life. Long-term, recurrent seizures can lead to cognitive decline and even sudden epileptic death. Approximately 60% of epilepsy cases are focal epilepsy, and the localization of the epileptogenic zone is crucial for treatment planning. Although seizures can be effectively controlled in about 70% of cases with antiepileptic drugs (AEDs), about 30% (approximately 15 million people) are defined as drug-resistant epilepsy (DRE), meaning they cannot achieve seizure-free status even with two or more appropriate AED regimens.

[0032] For patients with diabetic retinopathy (DRE), surgical intervention is the most effective treatment for achieving long-term seizure freedom. The core goal is to precisely locate and remove the epipileptogenic zone (EZ). Preoperative assessment is a comprehensive, multimodal, and multidisciplinary process, including long-term video electroencephalography (EEG) monitoring, high-resolution magnetic resonance imaging (MRI), positron emission tomography (PET), single-photon emission computed tomography (SPECT), magnetoencephalography (MEG), and neuropsychological evaluation. When non-invasive assessment cannot clearly identify the epipileptogenic zone, invasive assessment—intracranial electroencephalography (iEEG) monitoring—is required.

[0033] Intracranial electroencephalography (iEEG) is the "gold standard" method for recording brain electrical activity by directly implanting electrodes into the brain. Compared with scalp EEG, it has significant advantages: (1) high signal-to-noise ratio - the signal amplitude reaches hundreds of microvolts to several millivolts, which is much higher than the 10-100 microvolt range of scalp EEG; (2) high spatial resolution - it can accurately locate the discharge initiation area; (3) wide bandwidth response - it can record components that are not visible in scalp EEG, such as high frequency oscillations (HFOs). iEEG monitoring is mainly divided into two categories: subdural electrode recording (Electrocorticography, ECoG) and stereotactic electroencephalography (SEEG). The latter is widely used worldwide due to its advantages of being minimally invasive and capable of detecting deep structures.

[0034] iEEG monitoring typically requires continuous 24-hour recording for several days to several weeks, generating hundreds to thousands of gigabytes of raw data per subject. Clinicians must then precisely annotate ictal segments, identify the zone of onset (SOZ), and analyze the propagation pathway. This process is extremely time-consuming, labor-intensive, and exhibits significant inter-rater variability, necessitating automated analysis methods.

[0035] Electroencephalogram (EEG) activity is categorized by frequency into Delta (0.5–4 Hz), Theta (4–8 Hz), Alpha (8–13 Hz), Beta (13–30 Hz), and Gamma (30–100+ Hz), with each band reflecting the functional state of neural networks at different scales. During an epileptic seizure, iEEG signals exhibit characteristic patterns such as Low Voltage Fast Activity (LVFA), rhythmic spikes or spike-and-slow-wave complexes, and DC offset accompanied by high-frequency oscillations. High heterogeneity exists among different subjects and seizure types, making the automatic differentiation between seizure and interictal periods extremely challenging. Traditional signal analysis methods (Fast Fourier Transform, Power Spectral Density, Wavelet Transform, Empirical Mode Decomposition, etc.) rely on manual feature engineering, and feature selection is highly dependent on the researcher's domain knowledge, resulting in limited generalization ability when dealing with high-dimensional, multi-channel iEEG data.

[0036] With breakthroughs in deep learning technology, various network architectures have been introduced into EEG signal analysis, replacing the traditional "manual feature extraction + classifier" pipeline and enabling the automatic learning of hierarchical feature representations from raw signals. The main technical approaches include:

[0037] Convolutional Neural Networks (CNNs) methods, which extract local spatiotemporal patterns through convolution operations, have become the benchmark model in the field of EEG deep learning. Furthermore, the application of CNNs in EEG deep learning can be expanded from the perspectives of multi-scale convolution and attention enhancement. However, CNN methods have limited ability to model long-term temporal dependencies and are mostly single-path processing, making it difficult to simultaneously utilize complementary information from different representation domains.

[0038] Recurrent Neural Network (RNN) / Long Short-Term Memory (LSTM) methods model temporal dependencies by updating hidden states cyclically, which can capture the progressive rhythmic changes from the pre-ictal period to the ictal period. However, they have inherent drawbacks such as slow training speed, vanishing gradients, and difficulty in parallelization, which limit their practical application in large-scale iEEG data.

[0039] Attention mechanism approach: This approach utilizes self-attention to capture global spatiotemporal dependencies. However, self-attention has a computational complexity of 100%, which is extremely high in high sampling rate scenarios. Furthermore, it requires a large amount of data to avoid overfitting, resulting in weak model interpretability.

[0040] Graph Neural Networks (GNNs) methods model channels as graph nodes and use functional connectivity information to capture the dynamic reorganization of brain networks. However, preprocessing is cumbersome (requiring pre-computation of the functional connectivity matrix), and computational costs increase quadratically with the number of channels, making end-to-end real-time processing difficult.

[0041] Spectrum-deep learning hybrid methods combine wavelet transform or filter banks with CNNs to utilize frequency domain features while maintaining lightweight architecture. Some methods employ wavelet dendritic decomposition to generate multi-band spectral features, combined with grouped convolution and norm-based temporal aggregation, exhibiting good lightweight characteristics. However, the classifiers in these methods typically use simple classifiers and lack the ability to dynamically route signals according to different patterns.

[0042] In summary, the deep learning-based intracranial EEG seizure classification techniques for epilepsy suffer from the following core shortcomings: Most techniques employ a single pathway for feature extraction, resulting in incomplete feature representation. Pure time-domain methods fail to fully utilize frequency band rhythmic information, while pure frequency-domain methods lose high-resolution time-domain waveform information, lacking a dual-stream complementary representation mechanism that simultaneously integrates frequency-domain rhythmic features and time-domain waveform features. Furthermore, many models employ fixed-structure fully connected layers, processing all input signals with the same parameters, lacking a conditional computation mechanism that dynamically selects classification strategies based on input features. This results in weak classifier adaptability and insufficient generalization ability when dealing with highly heterogeneous and time-varying object data.

[0043] To this end, embodiments of the present invention provide a method for classifying epileptic seizures and interictal periods based on hybrid expert classifiers, comprising: decoupling the target intracranial EEG signal into multiple frequency band components; extracting frequency domain feature vectors by performing spatial filtering on each frequency band component; the target intracranial EEG signal is obtained by preprocessing the original intracranial EEG signal; fusing the frequency domain feature vectors and the temporal feature vectors extracted by cross-channel spatial filtering of the target intracranial EEG signal to obtain a fused feature vector including multi-frequency band spectral spatial information and original temporal information; determining the matching degree between each expert network and the fused feature vector through a gating network of a hybrid expert classifier, and determining multiple target expert networks for processing the fused feature vectors from multiple expert networks; and determining the epileptic seizure classification result for assisting user judgment based on the aggregated features obtained by aggregating the intermediate features output by each target expert network, the epileptic seizure classification result indicating whether the target intracranial EEG signal corresponds to an epileptic seizure or an interictal period.

[0044] The embodiments of this invention achieve complementary fusion of multi-scale features through parallel encoding of frequency domain and time domain streams, thereby enabling the fused feature vector to cover more comprehensive information and solving the problem of incomplete feature extraction from a single pathway. Furthermore, by introducing a hybrid expert mechanism, corresponding expert networks are dynamically activated for classification decisions based on different input features. This allows the model to make optimal judgments by flexibly adjusting expert combinations even when faced with drastically different epileptogenic zone anatomical locations, seizure types, and electrode coverage areas, effectively improving the model's generalization ability to different patterns of intracranial EEG signals and enhancing classification accuracy.

[0045] Figure 1 The diagram illustrates an application scenario of the hybrid expert-based intracranial EEG epilepsy ictal phase and interictal phase classification method according to an embodiment of the present invention.

[0046] like Figure 1 As shown, the application scenario according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0047] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103.

[0048] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0049] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0050] It should be noted that the hybrid expert-based classification method for intracranial EEG epilepsy ictal phase and interictal phase provided in this embodiment of the invention can generally be executed by server 105. Correspondingly, the hybrid expert-based classification device for intracranial EEG epilepsy ictal phase and interictal phase provided in this embodiment of the invention can generally be located in server 105. The hybrid expert-based classification method for intracranial EEG epilepsy ictal phase and interictal phase provided in this embodiment of the invention can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the hybrid expert-based classification device for intracranial EEG epilepsy ictal phase and interictal phase provided in this embodiment of the invention can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.

[0051] It should be understood that Figure 1 The number of first terminal devices, second terminal devices, third terminal devices, networks, and servers shown in the diagram is merely illustrative. Depending on implementation needs, any number of first terminal devices, second terminal devices, third terminal devices, networks, and servers can be included.

[0052] The following will be based on Figure 1 The described scene, through Figures 2-3 The invention provides a detailed description of the hybrid expert-based intracranial EEG method for classifying the ictal and interictal phases of epilepsy.

[0053] Figure 2 A flowchart of a hybrid expert-based method for classifying the epileptic seizure and interictal phases based on intracranial EEG data according to an embodiment of the present invention is shown.

[0054] like Figure 2As shown, the hybrid expert-based intracranial EEG epilepsy seizure and interictal period classification method of this embodiment includes operations S210 to S240.

[0055] In operation S210, the target intracranial EEG signal is decoupled into multiple frequency band components. By performing spatial filtering on each frequency band component, the frequency domain feature vector is extracted.

[0056] In operation S220, the frequency domain feature vector and the time domain feature vector obtained by cross-channel spatial filtering of the target intracranial EEG signal are fused to obtain a fused feature vector that includes multi-band spectral spatial information and original time domain information.

[0057] In operation S230, the matching degree between each expert network and the fused feature vector is determined by the gating network of the hybrid expert classifier, and multiple target expert networks are determined from multiple expert networks to process the fused feature vector.

[0058] In operation S240, based on the aggregated features obtained by aggregating the intermediate features output by each target expert network, the epileptic seizure classification result used to assist the user in making a judgment is determined.

[0059] In embodiments of the present invention, the target intracranial EEG signal is obtained by preprocessing the original intracranial EEG signal. Preprocessing may include steps such as filtering and resampling. By unifying the signal format and removing irrelevant noise interference through preprocessing, the signal can be processed into a standardized form, which is convenient for subsequent model processing.

[0060] Decoupling the target intracranial EEG signal into multiple frequency band components can be achieved through a pre-defined filter bank. For example, based on the natural frequency band division of EEG activity, the target signal can be decomposed into multiple pre-defined frequency band components such as Delta, Theta, Alpha, Beta, and Gamma. Each frequency band component corresponds to a specific rhythmic EEG activity, facilitating the extraction of frequency domain features at different scales.

[0061] The corresponding time-domain feature extraction process can perform cross-channel spatial filtering on the original target intracranial EEG signal, extract the time-domain waveform features of the original signal, and completely preserve the high-resolution temporal information of the original signal to obtain the time-domain feature vector.

[0062] After obtaining the frequency domain feature vector and the time domain feature vector, the two feature vectors can be concatenated to obtain a fused feature vector that simultaneously covers multi-band spectral spatial information and original time domain information, thereby achieving complementary fusion of dual-stream features and making up for the information loss problem in single-path feature extraction.

[0063] In embodiments of the present invention, the hybrid expert classifier includes a gating network and multiple structurally independent expert networks. The gating network takes the fused feature vector as input and outputs the matching degree of the fused feature vector for each expert network. The higher the matching degree value, the better the expert network fits the signal pattern of the currently input fused feature vector.

[0064] Based on the matching degree, the expert network with the highest matching degree can be selected as the target expert network. Only the selected target expert network is activated to process the current fused feature vector, and the unselected expert networks do not participate in the calculation. This improves the model's adaptive ability while controlling the overall computational cost.

[0065] Each target expert network outputs corresponding intermediate features based on the input fused feature vector. The intermediate features of each target expert network can be weighted and summed according to their corresponding matching degree to obtain aggregate features.

[0066] In embodiments of the present invention, the epileptic seizure classification result indicates whether the target intracranial EEG signal corresponds to the epileptic seizure phase or the interictal phase. By inputting the aggregated features into the output layer, the classification probability of the target intracranial EEG signal corresponding to the seizure phase or the interictal phase can be obtained, and the category with the highest probability is taken as the final epileptic seizure classification result output.

[0067] In some embodiments, the seizure classification results and classification probabilities can be presented to the user in a visual form to provide a reference for the user's judgment.

[0068] According to embodiments of the present invention, complementary fusion of multi-scale features is achieved through parallel encoding of frequency domain streams and time domain streams, thereby enabling the fused feature vector to cover more comprehensive information and solving the problem of incomplete feature extraction from a single pathway. Furthermore, by introducing a hybrid expert mechanism, corresponding expert networks are dynamically activated for classification decisions based on different input features. This allows the model to make optimal judgments by flexibly adjusting expert combinations even when faced with drastically different epileptogenic zone anatomical locations, seizure types, and electrode coverage areas, effectively improving the model's generalization ability to different patterns of intracranial EEG signals and enhancing classification accuracy.

[0069] According to an embodiment of the present invention, the process of data preprocessing for the raw intracranial electroencephalogram (EEG) signal includes: using a data preprocessing module to sequentially perform bad channel removal, bandpass filtering and notch filtering, and bipolar reference transformation on the raw intracranial EEG signal to obtain a denoised and rereferenced intracranial EEG signal; slicing the denoised and rereferenced intracranial EEG signal into sliding window slices according to a preset time window, and standardizing each slice; resampling the standardized slices to a preset uniform sampling rate to obtain the target intracranial EEG signal.

[0070] Bad channel removal can automatically identify and remove channels marked as bad channels based on the channel labeling table in the Brain Imaging Data Structure (BIDS) format standard. At the same time, based on channel name keyword matching, it can remove non-EEG channels such as ECG, reference electrode, blood oxygen, and labeled channels.

[0071] Bandpass filtering and notch filtering can be applied to the raw intracranial EEG signal after bad channel removal with a 0.5Hz high-pass filter to remove baseline drift and low-frequency artifacts. Then, notch filtering at 60Hz and its harmonics (120Hz, 180Hz, 240Hz) is applied to eliminate power frequency interference.

[0072] After filtering, statistical bad sector removal can be further performed. By calculating the variance of each channel signal, channels with variances exceeding 50 times the median variance or below 1 / 50 of the median variance are identified as abnormal bad sectors and removed to eliminate abnormal signals caused by hardware failure or poor contact.

[0073] Bipolar reference transformation can employ a longitudinal bipolar montage rereference method. By automatically parsing the electrode group and contact number in the channel name using regular expressions, differential processing is performed on the signals of two physically adjacent and consecutively numbered contacts on the same electrode bundle to generate bipolar lead signals. This effectively eliminates common-mode noise and volume conduction effects, improving the spatial resolution of local neural activity.

[0074] After bipolar reference transformation, the intracranial EEG signal is obtained after denoising and rereference. The signal can be sliced ​​by sliding window according to a preset time window (7 seconds in this embodiment, the length of which is based on the conclusion of ablation experiments on the length of dynamic sequence, and 7 seconds has been verified as the best balance point for capturing seizure characteristics and preventing overfitting). Each slice is standardized along the time dimension to eliminate amplitude differences between channels.

[0075] Overlapping sequential sampling patterns (with a step size of 1 second) can be used between windows to improve data utilization and time coverage. Standardization can be, for example, by performing standard score (Z-score) standardization on each slice along the time dimension, as shown in equation (1) below.

[0076] (1);

[0077] in, The slices are after standardization. The slices before standardization processing. The total mean of the slice. The population standard deviation of the slices. It is the numerical stability constant, usually taken as .

[0078] Since different original intracranial EEG signals may correspond to different sampling rates (possibly covering four sampling rates: 256Hz, 500Hz, 512Hz, and 1024Hz), a polyphase resampling method can be used to uniformly resample the data to a fixed 1792 time points (corresponding to 256Hz × 7 seconds) to adapt to the fixed input size of the subsequent model.

[0079] According to embodiments of the present invention, irrelevant artifacts and non-EEG interference in the original signal are removed by bad channel removal, bandpass filtering and notch filtering, and bipolar reference transformation. Combined with sliding window slicing, standardization and unified resampling processing, a target intracranial EEG signal with uniform format, high signal-to-noise ratio and suitable for model input requirements is obtained, which provides a reliable input basis for subsequent classification, reduces the impact of poor original data quality on classification results, and improves classification accuracy.

[0080] According to an embodiment of the present invention, the target intracranial electroencephalogram (EEG) signal is decoupled into multiple frequency band components. A frequency domain feature vector is extracted by spatial filtering of each frequency band component. This includes: using a frequency domain spectral spatial embedding module to perform multi-level discrete wavelet decomposition of each channel in a tree structure; for each level of decomposition, convolving and downsampling the input signal using low-pass and high-pass filters to obtain frequency band components including approximate and detail components; concatenating the frequency band components of each channel along the channel dimension to obtain a spectral feature tensor; and using a frequency domain encoder in a dual-stream spatiotemporal encoder to perform spatial filtering on each frequency band component in the spectral feature tensor to obtain a frequency domain feature vector.

[0081] For the preprocessed target intracranial EEG signal, a tree-like multi-level frequency decomposition method based on wavelet transform can be used to decouple the signal into multiple fine-grained frequency band components. Specifically, a 4th-order (db4) wavelet basis function can be used, employing a fully binary tree-structured discrete wavelet decomposition, with the decomposition depth set. Layers. Each layer convolves the input signal through low-pass and high-pass filters and downsamples it (with a stride of 2) to generate approximate and detail components. Echo padding is used during the decomposition process to reduce boundary distortion.

[0082] After four layers of decomposition, the following is produced There are leaf nodes, each corresponding to a specific frequency band component, with a frequency band resolution of approximately 100000. ( This indicates the sampling frequency. When the sampling frequency is standardized to 256Hz, the bandwidth resolution is approximately 8Hz.

[0083] All The decomposition results of the target intracranial EEG signal (C channels) across 16 frequency bands are concatenated along the channel dimension to form a spectral feature tensor with dimension . ,in, This refers to the batch size. For the time dimension of the spectral feature tensor, The target number of time points for the intracranial EEG signal, for example, uniformly resampled to 1792 time points (corresponding to a 256Hz sampling rate and a 7-second window). .

[0084] After forming the spectral feature tensor, a frequency domain encoder can be used to perform spatial convolution filtering on each frequency band component of the spectral feature tensor to model the spatial correlation between different channels under the same frequency band, capture the collaborative activity patterns of different brain regions under specific rhythms, and obtain a frequency domain feature vector with uniform dimensions.

[0085] According to embodiments of the present invention, fine-grained decoupling of signal frequencies is achieved through multi-level wavelet decomposition. Combined with frequency-band spatial filtering, the spatial interaction features of different rhythmic EEG activities can be accurately captured. The extracted frequency domain feature vectors can completely preserve multi-scale frequency domain information, providing sufficient frequency domain pattern information for classification and improving classification accuracy.

[0086] According to an embodiment of the present invention, spatial filtering is performed on each frequency band component in the spectral feature tensor to obtain a frequency domain feature vector, including: inputting the spectral feature tensor into a grouped convolutional layer, using each sub-convolutional layer to perform spatial filtering on the frequency band components of the corresponding frequency band in the spectral feature tensor, and outputting a spatial filtering feature map of the frequency band; performing norm aggregation on the spatial filtering feature map of each frequency band along the time dimension to obtain a feature vector for each frequency band; and concatenating the feature vectors of all frequency bands along the feature dimension to obtain a frequency domain feature vector.

[0087] In an embodiment of the present invention, the frequency domain encoder includes a grouped convolutional layer, which includes multiple sub-convolutional layers corresponding to each frequency band, i.e., Groups= Where Groups represents the number of sub-convolutional layers in the grouped convolutional layers. This refers to the number of frequency bands. Each sub-convolutional layer independently processes the spectral feature tensor within one frequency band. Each channel signal outputs a single signal. Spatial filtering feature map ( This is the spatial filter factor, in this embodiment... The grouped convolution mechanism ensures that features between different frequency bands do not overlap, maintaining the independence and interpretability of each frequency band.

[0088] The frequency domain encoder may also include a normalization layer and an activation layer, which are used to perform nonlinear transformation on the spatial filtered feature map through batch normalization and the Exponential Linear Unit (ELU) activation function to obtain the output of the frequency domain encoder.

[0089] For the output of a frequency domain encoder, the Frobenius norm (or L2 norm) can be calculated along the time dimension to compress the time dimension into a scalar energy value, resulting in the output. 3D frequency domain feature vectors. This parameterless operation significantly reduces the feature dimensionality and automatically assigns higher gradient weights to frequency bands / time periods with significant energy during backpropagation. Both the Frobenius norm and L2 norm can compress the output of the frequency domain encoder from the time dimension to scalar energy values.

[0090] According to an embodiment of the present invention, independent spatial modeling of features in different frequency bands is achieved through grouped convolution, avoiding mutual interference between different rhythmic features. Combined with norm aggregation of the time dimension, the feature dimension is compressed without losing key information, thereby reducing the amount of subsequent computation while ensuring classification accuracy.

[0091] According to an embodiment of the present invention, the frequency domain feature vector and the time domain feature vector obtained by cross-channel spatial filtering of the target intracranial EEG signal are fused to obtain a fused feature vector including multi-band spectral spatial information and original time domain information. The fusion process includes: using the time domain encoder in the dual-stream spatiotemporal encoder, processing the target intracranial EEG signal through the full-channel hybrid convolutional layer in the time domain encoder to extract the global spatial dependency and temporal waveform features between channels, and obtaining a time domain intermediate feature map; performing norm aggregation on the time domain intermediate feature map along the time dimension to obtain a time domain feature vector; and concatenating the frequency domain feature vector and the time domain feature vector to obtain the fused feature vector.

[0092] In embodiments of the present invention, the dual-stream spatiotemporal encoder further includes a temporal encoder for extracting temporal information from the target intracranial electroencephalogram (EEG) signal. The temporal encoder includes a full-channel hybrid convolutional layer capable of learning cross-channel global spatial patterns and high-resolution temporal waveform features (such as spikes, sharp waves, fast activity, etc.), and outputs... A time-domain intermediate feature map. The time-domain encoder can also include a normalization layer and an activation layer to batch normalize and ELU activate the time-domain intermediate feature map to obtain the output of the time-domain encoder.

[0093] For the output of the time-domain encoder, the L2 norm is also calculated along the time dimension for compression, ultimately yielding... 3D time-domain eigenvectors.

[0094] After extracting the frequency domain feature vector and the time domain feature vector, the two vectors are directly concatenated along the feature dimension to obtain the vector with dimension . The fused feature vector contains both multi-band spectral spatial information and original temporal information.

[0095] According to embodiments of the present invention, cross-channel spatial and temporal features of the original intracranial electroencephalogram (EEG) signal are directly extracted by temporal stream, which complements the fine-grained frequency domain features extracted by frequency stream. This method can fully cover the feature information of different levels of intracranial EEG signals, avoid the omission of key features, provide a more comprehensive information basis for classification, and improve the reliability of classification results.

[0096] According to an embodiment of the present invention, the matching degree between each expert network and the fused feature vector is determined by a gating network of a hybrid expert classifier, and multiple target expert networks for processing the fused feature vector are determined from multiple expert networks. This includes: inputting the fused feature vector into a gating network; mapping the fused feature vector to a gating score vector using the gating network; determining a predetermined number of target expert networks from multiple expert networks based on multiple gating scores, wherein the gating scores of the target expert networks are higher than those of other expert networks; and inputting the fused feature vector into each target expert network to perform feature transformation on the fused feature vector using each target expert network to obtain intermediate features.

[0097] In embodiments of the present invention, the gated network is a linear mapping layer, which can map the fused feature vector to... dimensional gated score vector ( In this embodiment, the number of expert networks in the hybrid expert classifier is [not specified]. The gating score vector is used to evaluate the matching degree of each expert network in processing the current input. The gating score vector includes gating scores that characterize the matching degree between the fused feature vector and each expert network. For example, when there are 4 expert networks, the gating score vector contains four gating scores corresponding to the four expert networks respectively.

[0098] After obtaining the gating score vector, the gating scores can be sorted from largest to smallest. The top K expert networks with the largest gating scores are selected as target expert networks to participate in the final classification. In this embodiment, K=2 is set so that only the two target expert networks with the highest matching degree process the current fused features, which reduces the computational overhead and enhances the division of labor and specialization among experts.

[0099] In some embodiments, the number of expert networks in the hybrid expert classifier and the preset number of target expert networks can be flexibly adjusted according to the complexity of the specific task, achieving a balance between computational overhead and classification accuracy.

[0100] After determining the target expert network, the fused feature vector is input into each selected target expert network. Each expert network is a lightweight feedforward neural network (linear layer), which maps the fused features to the hidden space (dimensional 1). In this embodiment The system outputs the intermediate features obtained from the expert transformation. Each expert network learns different feature transformation strategies during the training phase, specializing in processing different types of sample patterns.

[0101] According to an embodiment of the present invention, the most suitable expert network combination is automatically matched for different feature patterns by a gating network. Only the target expert network with a high matching degree with the fused feature vector is used in the calculation. This not only ensures the model's ability to fit different intracranial EEG signal feature patterns, but also controls the overall computational cost of inference and training through sparse activation. This avoids the problem of insufficient fitting of a single classifier to complex multi-pattern samples and improves classification accuracy.

[0102] According to an embodiment of the present invention, an epileptic seizure classification result for assisting user judgment is determined based on aggregated features obtained by aggregating intermediate features output by each target expert network. This includes: obtaining target gating scores to characterize the matching degree between the fused feature vector and each target expert network; normalizing multiple target gating scores to obtain aggregated weights corresponding to each target expert network; using multiple aggregated weights to perform weighted aggregation of intermediate features output by each target expert network to obtain aggregated features; and classifying based on the aggregated features to obtain the epileptic seizure classification result.

[0103] In embodiments of the present invention, multiple intermediate features can be aggregated using a weighted aggregation method to obtain aggregated features. The aggregation weights can be obtained by Softmax normalization of the gated scores, with unselected expert network aggregated weights being 0. Softmax is used to transform multiple gated scores into a set of normalized weights whose sum is exactly 1 and all are greater than 0.

[0104] After obtaining the aggregated features, the binary classification results (episode period / interic period) can be output through the final linear layer after ELU activation.

[0105] According to an embodiment of the present invention, adaptive fusion of different expert outputs is achieved by aggregating weights. This not only preserves the professional processing advantages of each expert, but also combines the feature transformation results of multiple matching experts to form more comprehensive aggregated features, avoiding feature bias of a single expert, and outputting stable and reliable epilepsy seizure classification results.

[0106] According to an embodiment of the present invention, the intracranial EEG epileptic seizure and interictal seizure classification method based on hybrid experts further includes: inputting the raw intracranial EEG signal into the classification model to obtain the epileptic seizure classification result. The classification model includes a data preprocessing module, a frequency domain spectral spatial embedding module, a dual-stream spatiotemporal encoder, and a hybrid expert classifier.

[0107] In embodiments of the present invention, an end-to-end classification model can be used to process the raw intracranial electroencephalogram (EEG) signals to obtain epileptic seizure classification results. The classification model in this embodiment is a Spectral Group-guided Lightweight Mixture-of-Experts (SGL-MoE) model.

[0108] Figure 3 A schematic diagram of the structure of a classification model according to an embodiment of the present invention is shown.

[0109] like Figure 3 As shown, the classification model includes a data preprocessing module, a frequency domain spectral space embedding module, a dual-stream spatiotemporal encoder, and a hybrid expert classifier.

[0110] The raw intracranial EEG signal is input into the data preprocessing module, where it undergoes bad channel removal, bandpass / notch filtering, longitudinal bipolar montage rereference, sliding window slicing, standardization, and resampling to obtain the target intracranial EEG signal.

[0111] The target intracranial EEG signal is input into the frequency domain spectral space embedding module, and a tree-structured wavelet decomposition is performed to obtain the spectral feature tensor.

[0112] In some embodiments, the wavelet basis functions in the frequency domain spectral space embedding module can be replaced with other orthogonal wavelet bases (such as coif1, haar, sym4, etc.) to adapt to signal processing requirements with different frequency characteristics.

[0113] The spectral feature tensor and the target intracranial EEG signal are respectively input into the frequency domain encoder and the time domain encoder in the dual-stream spatiotemporal encoder. After norm aggregation is performed on the outputs of the two encoders to obtain frequency domain feature vectors and time domain feature vectors, the frequency domain feature vectors and time domain feature vectors are concatenated to obtain a fused feature vector.

[0114] The fused feature vector is input into the gated network of the hybrid expert classifier to determine the target expert network and aggregation weights. Simultaneously, the fused feature vector can be input into each expert network for parallel linear transformation to obtain intermediate features output by each expert network. The intermediate features output by each target expert network are then weighted and aggregated using the aggregation weights to obtain aggregated features. The epileptic seizure classification result is then obtained based on these aggregated features.

[0115] According to an embodiment of the present invention, the classification model is trained as follows: the intracranial EEG signal of the sample is input into the initial classification model to obtain the classification result of the epileptic seizure of the sample; based on the difference between the classification result of the epileptic seizure of the sample and the label corresponding to the intracranial EEG signal of the sample, and the regularization loss of the initial classification model, the parameters of the initial classification model are adjusted in multiple rounds to obtain the classification model, wherein the regularization loss is determined according to the weight matrix in the parameters; for the target adjustment round, if the weight matrix does not meet the numerical constraint conditions, the weight matrix is ​​scaled using a preset scaling factor until the numerical constraint conditions are met.

[0116] In embodiments of the present invention, the tags corresponding to the sample intracranial EEG signals can be used to characterize the actual epileptic seizure period or interictal period corresponding to the sample intracranial EEG signals. Specifically, for the seizure period (Ictal) file, the corresponding event labeling file in the same directory is read, and the sampling point indices for the seizure start and end are precisely located according to the columns of seizure start and seizure end events, and the sample intracranial EEG signal data segments during the seizure are extracted. The interictal period (Interictal) file retains the full-length data. All data are uniformly amplified to the microvolt (µV) level during export.

[0117] In this invention, the cross-entropy loss is used as the classification objective function in the loss function used to train the initial classification model. This function determines the difference between the classification result of the epileptic seizure sample and the label corresponding to the intracranial EEG signal of the sample, and adds an L2 regularization penalty term to suppress weight overfitting. The total loss function is shown in Equation (2) below.

[0118] (2);

[0119] in, Indicates the total loss. This indicates the classification results of epileptic seizures in the confirmed sample. Tags corresponding to the intracranial electroencephalogram (EEG) signals of the sample Cross-entropy between This represents the regularization coefficient, which can be 0.05. This represents the weight matrix of each learnable layer. This indicates that the weight matrix is ​​L2 regularized, and l represents the index number of the network layer.

[0120] During training, the corresponding round at the end of each training step (mini-batch) is determined as the target adjustment round, and a kernel constraint regularization operation is performed once, which, together with L2 regularization, prevents overfitting.

[0121] To prevent the model from overfitting on high-dimensional, small-sample intracranial EEG signal data, Frobenius norm constraints are applied to the fully connected layers of the initial classification model during training, as shown in equation (3) below.

[0122] (3);

[0123] in, This represents the weight matrix of the fully connected layer. and The preset threshold and scaling factor are used. When the F-norm of the weight matrix of the fully connected layer exceeds the preset threshold (numerical constraint), the weight matrix of the fully connected layer is scaled to a controllable range, thereby suppressing weight inflation and enhancing the generalization ability of the classification model. This constraint, used in conjunction with L2 regularization loss, effectively prevents overfitting in scenarios with a small number of training samples.

[0124] The training process can employ the Adaptive Moment Estimation (Adam) optimizer, with the learning rate set accordingly. The batch size is 32. Furthermore, cosine annealing or a ReduceLROnPlateau strategy based on validation performance can be used to dynamically adjust the learning rate and optimize the convergence of the training process. During training, Gaussian noise perturbations can be added to the input spectral feature tensor and time-domain signal to improve the model's robustness to signal fluctuations.

[0125] When initializing the model to obtain the initial classification model, convolutional layers can be initialized using Xavier uniform initialization, which stabilizes the variance of the signal during forward propagation. Linear layers can be initialized using Kaiming uniform initialization, which adapts to the nonlinear characteristics of the ELU activation function. All bias terms are initialized to zero.

[0126] In some embodiments, an within-subject mode can be adopted, in which the model is trained and evaluated independently for the same object, avoiding the distribution difference problem caused by cross-object data mixing, and the classification model is initialized independently for each object.

[0127] According to an embodiment of the present invention, through regularization constraints, on the one hand, excessive weights are penalized in the loss function through L2 regularization, and on the other hand, the upper limit of the norm of the weight matrix is ​​directly constrained through norm restriction. The dual constraints work together to effectively suppress the overfitting problem in high-dimensional small sample scenarios, further improve the generalization performance of the classification model in small sample scenarios, and ensure the accuracy and stability of the classification results.

[0128] According to an embodiment of the present invention, the method for classifying the epileptic seizure period and interictal period of intracranial electroencephalography further includes: dividing the original sample intracranial electroencephalogram signal into multiple consecutive original sample intracranial electroencephalogram signals in chronological order; dividing the original sample intracranial electroencephalogram signal into sample signal segments according to a preset number of divisions, and using each sample signal segment as a training signal segment or a verification signal segment, with a time gap between the training signal segment and the verification signal; merging multiple verification signal segments at the same division position to obtain a verification sample intracranial electroencephalogram signal, and merging multiple training signal segments at the same division position to obtain a training sample intracranial electroencephalogram signal.

[0129] In an embodiment of the present invention, a time-aware segmented cross-validation method is proposed to address the temporal non-stationarity of intracranial electroencephalogram (EEG) signals. The sample EEG signals include training sample EEG signals and validation sample EEG signals. The training sample EEG signals are used to train the initial classification model, while the validation sample EEG signals are used to verify the model's classification performance and adjust the model's hyperparameters during training.

[0130] When dividing the samples, the ictal and interictal samples of each subject are uniformly divided into L consecutive original samples of intracranial brain electronic signals in chronological order (in this embodiment). The samples within each original sample of intracranial brain electronic signals maintain the original chronological order.

[0131] For each original sample intracranial brain electronic signal, K-fold division can be performed within the original sample intracranial brain electronic signal (in this embodiment) to obtain multiple sample signal segments, ensuring that the signal segments used for verification and the signal segments used for training do not overlap in time.

[0132] When using overlapping sliding window sampling, a gap sample can be set between the validation signal segment and the training signal segment to remove the portion of the training signal segment that overlaps with the validation signal segment in time, thus completely eliminating the risk of data leakage caused by sliding window overlap.

[0133] When using K-fold segmentation, the verification signal segments of the same fold from the original samples' intracranial EEG signals are merged to form the final verification sample's intracranial EEG signal. This ensures that the verification signal segments are evenly distributed along the time axis, avoiding the bias of "verifying only a certain time period." Similarly, the training signal segments of the same fold are merged to form the final training sample's intracranial EEG signal.

[0134] According to an embodiment of the present invention, by using time-aware segmented cross-validation, the validation set samples and training set samples are completely separated in time, eliminating the data leakage problem commonly encountered in time-series signal partitioning. At the same time, the validation samples are evenly distributed across the entire time axis, improving the accuracy of cross-validation in evaluating the model's generalization ability and enabling more reliable selection of the classification model with the best generalization performance.

[0135] In summary, compared with related technical solutions, this invention achieves the following technical effects by introducing dual-stream spectrum time-domain coding and a hybrid expert routing mechanism:

[0136] Significantly improved classification performance: In the experiments, this application used intracranial EEG data from the HUP iEEG dataset. This dataset consists of delabeled intracranial EEG data collected during preoperative evaluation or surgical treatment of drug-resistant epilepsy patients at the Hospital of the University of Pennsylvania. It includes ictal and interictal records, and the data has been converted to BrainImaging Data Structure (BIDS) format.

[0137] On the aforementioned dataset, the K-fold cross-validation method (dividing intracranial EEG signals into 5 consecutive intracranial EEG signals, and each intracranial EEG signal into 5 signal segments) was used for evaluation.

[0138] Specifically, the experiment employed independent 5-fold cross-validation within each patient, without cross-patient mixed training. Each patient's ictal and interictal samples were divided into 5 consecutive time blocks, each further divided into 5 folds. Validation segments with the same fold number were merged into the validation set, while the remaining segments were merged into the training set. The slice window length was 7 seconds, with a step size of 1 second. Due to overlapping sliding windows, a gap was set between adjacent training and validation segments, with the number of gap samples being ceil((7-1) / 1)+1=7, to avoid data leakage caused by window overlap.

[0139] As shown in Table 1 below, the SGL-MoE model of this invention achieves an average classification accuracy of 98.62% and a median accuracy of 99.60% for different objects. Compared with three representative comparative models, the average accuracy of SGL-MoE is approximately 2.79 percentage points higher than that of lightweight deep learning models, such as EEGNet (average accuracy 95.83%), approximately 0.74 percentage points higher than that of ShallowConvNet (average accuracy 97.88%), and approximately 0.90 percentage points higher than general brain-computer interface paradigms based on EEG and interpretable lightweight multidimensional attention networks, such as Lightweight Multi-scale Deep Attention (LMDA) network (average accuracy 97.72%). Meanwhile, the standard deviation of SGL-MoE, calculated based on the average accuracy, is only 1.96%, lower than ShallowConvNet's 2.14%, LMDA's 3.27%, and EEGNet's 4.79%, indicating that the present invention not only has higher average performance, but also less cross-object variability and more stable results.

[0140] In this embodiment, "subjects" refers to different patients or subjects, such as: sub-HUP116, 117, 130, 134, 139, 140, 141, 142, 144, 146, 148, 150, 157, 160, 163, 164, 173, 177, 180, and 185, totaling 20 subjects. All of the above subjects were Engel Class I patients with good postoperative prognosis from the HUP iEEG dataset. Engel Class I indicates no disabling seizures after surgery, and its subtypes are as follows: 1A indicates no seizures after surgery; 1B indicates only non-disabling simple partial seizures after surgery; 1C indicates partial disabling seizures after surgery, but no disabling seizures for at least 2 consecutive years; 1D indicates generalized seizures only upon discontinuation of antiepileptic drugs. According to the clinical outcome subtype statistics, this example includes 10 cases of category 1A, 5 cases of category 1B, 1 case of category 1C, and 4 cases of category 1D, accounting for 50%, 25%, 5%, and 20%, respectively.

[0141] The classification labels are binary: ictal for ictal episodes is coded as 1, and interictal for interictal episodes is coded as 0. Based on the current slicing method, a total of 17,668 sample fragments were obtained, of which 5,908 were ictal episodes (33.44%) and 11,760 were interictal episodes (66.56%). The actual number of channels used for each patient ranged from 35 to 156.

[0142] Each fold accuracy is the best accuracy achieved on the validation set during the training process for that fold. The mean accuracy for a single patient is the arithmetic mean of that patient's best validation accuracy over 5 folds. The overall mean classification accuracy for 20 patients is the arithmetic mean of the mean accuracies of the 20 patients; the median accuracy is the median of the mean accuracies of the 20 patients after sorting; the standard deviation is the overall standard deviation of the mean accuracy of the 20 patients. Using this method, the SGL-MoE has an average accuracy of 98.6245%, a median accuracy of 99.60%, and a standard deviation of 1.9626%.

[0143] Table 1

[0144]

[0145] Table 1 shows that EEGNet, ShallowConvNet, LMDA, and SGL-MoE were all trained with the same data partitioning and the same number of training epochs. All comparison models include a classifier head for binary classification output. The comparison experiments uniformly used 5-fold cross-validation, with 20 training epochs, an adaptive moment estimator (Adam), a learning rate of 0.001, and a batch size of 32.

[0146] Better performance for difficult-to-classify subjects: Difficult-to-classify subjects were determined by the average accuracy of SGL-MoE patients from lowest to highest. The lowest was sub-HUP130, with an SGL-MoE accuracy of 92.10%, EEGNet of 85.23%, LMDA of 89.82%, and ShallowConvNet of 91.44%. Therefore, SGL-MoE improved accuracy by 6.87, 2.28, and 0.66 percentage points, respectively. The second lowest was sub-HUP173, with an SGL-MoE accuracy of 95.58%, EEGNet of 85.23%, LMDA of 87.73%, and ShallowConvNet of 94.22%, representing improvements of 10.35, 7.85, and 1.36 percentage points, respectively.

[0147] To be more objective, the average accuracy of each patient was calculated using three comparative models: EEGNet, ShallowConvNet, and LMDA. The average of these three values ​​was then used as the patient's baseline average accuracy. The five patients with the lowest baseline average accuracy were defined as the hard subset.

[0148] In this embodiment, the difficult object subset includes sub-HUP130, sub-HUP173, sub-HUP117, sub-HUP148, and sub-HUP144. On this subset, SGL-MoE achieved an average accuracy of 96.13%, EEGNet 88.38%, ShallowConvNet 94.98%, and LMDA 93.33%. Therefore, SGL-MoE improved accuracy by 7.75, 1.15, and 2.80 percentage points compared to EEGNet, ShallowConvNet, and LMDA, respectively, on the difficult object subset. This demonstrates that SGL-MoE has high accuracy for its own difficult-to-classify objects and also high accuracy for difficult-to-classify objects from other comparative models.

[0149] Lightweight and Efficient Models: To further illustrate the lightweight nature of the models, this embodiment statistically analyzes the parameter count of each model with 20 true channels per object. The parameter count of SGL-MoE varies with the number of object channels, ranging from approximately 92,678 to 158,502, with an average of approximately 124,910; the parameter count of EEGNet ranges from approximately 2,794 to 3,762, with an average of approximately 3,268; the parameter count of ShallowConvNet ranges from approximately 66,162 to 259,762, with an average of approximately 160,962; and the parameter count of LMDA ranges from approximately 9,170 to 11,348, with an average of approximately 10,236. Therefore, while SGL-MoE is not the model with the smallest parameter count among the compared models, its parameter size is lower than that of ShallowConvNet and remains in the hundreds of thousands, making it a compact and lightweight model.

[0150] To further evaluate actual deployment efficiency, this embodiment was tested in a local Central Processing Unit (CPU) environment. During testing, the batch size was 1, the input length was 1792 points, and representative objects sub-HUP117 (35 channels), sub-HUP130 (103 channels), and sub-HUP164 (156 channels) were selected for single-sample inference time statistics. Including wavelet spectral decomposition, the end-to-end inference times for SGL-MoE were approximately 1.61 ms, 2.00 ms, and 2.24 ms, respectively; for EEGNet, approximately 0.50 ms, 1.15 ms, and 1.69 ms; for ShallowConvNet, approximately 2.36 ms, 8.09 ms, and 17.29 ms; and for LMDA, approximately 3.50 ms, 11.00 ms, and 20.13 ms. The results show that EEGNet has a lower parameter count and lower inference time for some CPU components. While SGL-MoE is not the lightest model, it has a shorter end-to-end inference time compared to ShallowConvNet and LMDA, and overall achieves better results in accuracy and cross-object stability, indicating that it has a good overall balance between classification performance and deployment overhead.

[0151] High cross-object consistency: Based on the 50% average accuracy per object for 20 objects, SGL-MoE has a standard deviation of 1.96%, lower than ShallowConvNet's 2.14%, LMDA's 3.27%, and EEGNet's 4.79%. Furthermore, SGL-MoE has an average accuracy exceeding 99% for 12 objects (60%), higher than ShallowConvNet's 8, LMDA's 10, and EEGNet's 6; only 3 objects (sub-HUP130, sub-HUP173, and sub-HUP177) have an accuracy below 97%, fewer than ShallowConvNet's 5, EEGNet's 9, and LMDA's 4. Therefore, this invention not only has a higher overall average accuracy but also lower performance dispersion across different objects, covering more objects with high accuracy and fewer objects with low accuracy, demonstrating better cross-object stability and generalization ability.

[0152] Based on the above-mentioned hybrid expert-based classification method for ictal and interictal phases of intracranial EEG epilepsy, this invention also provides a hybrid expert-based classification device for ictal and interictal phases of intracranial EEG epilepsy. The following will be combined with... Figure 4 The device is described in detail.

[0153] Figure 4A structural block diagram of a hybrid expert-based intracranial EEG epilepsy seizure and interictal phase classification device according to an embodiment of the present invention is shown.

[0154] like Figure 4 As shown, the hybrid expert-based intracranial EEG epilepsy seizure and interictal period classification device 400 of this embodiment includes an extraction module 410, a fusion module 420, a matching module 430, and a determination module 440.

[0155] The extraction module 410 is used to decouple the target intracranial EEG signal into multiple frequency band components. By performing spatial filtering on each frequency band component, a frequency domain feature vector is extracted. The target intracranial EEG signal is obtained by preprocessing the original intracranial EEG signal. In one embodiment, the extraction module 410 can be used to perform the operation S210 described above, which will not be repeated here.

[0156] The fusion module 420 is used to fuse the frequency domain feature vector and the time domain feature vector obtained by cross-channel spatial filtering of the target intracranial EEG signal to obtain a fused feature vector including multi-band spectral spatial information and original time domain information. In one embodiment, the fusion module 420 can be used to perform the operation S220 described above, which will not be repeated here.

[0157] The matching module 430 is used to determine the matching degree between each expert network and the fused feature vector through a gated network of hybrid expert classifiers, and to determine multiple target expert networks from multiple expert networks for processing the fused feature vector. In one embodiment, the matching module 430 can be used to perform the operation S230 described above, which will not be repeated here.

[0158] The determination module 440 is used to determine the epileptic seizure classification result to assist the user's judgment based on the aggregated features obtained by aggregating the intermediate features output by each target expert network. The epileptic seizure classification result indicates whether the target intracranial EEG signal corresponds to the epileptic seizure period or the interictal period. In one embodiment, the determination module 440 can be used to perform the operation S240 described above, which will not be repeated here.

[0159] According to an embodiment of the present invention, the extraction module 410 includes a frequency band decomposition submodule, a frequency band splicing submodule, and a frequency band filtering submodule.

[0160] The frequency band decomposition submodule is used to perform multi-level discrete wavelet decomposition of each channel in a tree structure using the frequency domain spectral space embedding module. For each level of decomposition, the input signal is convolved and downsampled by low-pass and high-pass filters respectively to obtain frequency band components including approximate components and detail components.

[0161] The frequency band splicing submodule is used to splice the frequency band components of each channel along the channel dimension to obtain the spectral feature tensor.

[0162] The frequency band filtering submodule is used to perform spatial filtering on each frequency band component in the spectral feature tensor using the frequency domain encoder in the dual-stream spatiotemporal encoder, so as to obtain the frequency domain feature vector.

[0163] According to an embodiment of the present invention, the frequency domain encoder includes a grouped convolutional layer, which includes multiple sub-convolutional layers corresponding to each frequency band; the frequency band filtering submodule includes a frequency band filtering unit, a frequency band aggregation unit, and a frequency band splicing unit.

[0164] The frequency band filtering unit is used to input the spectral feature tensor into the grouped convolutional layer, and use each sub-convolutional layer to perform spatial filtering on the frequency band components of the corresponding frequency band in the spectral feature tensor, and output the spatial filtering feature map of the frequency band.

[0165] The frequency band aggregation unit is used to perform norm aggregation on the spatial filtering feature map of each frequency band along the time dimension to obtain the feature vector of each frequency band.

[0166] The frequency band splicing unit is used to splice the feature vectors of all frequency bands along the feature dimension to obtain the frequency domain feature vector.

[0167] According to an embodiment of the present invention, the fusion module 420 includes a temporal extraction submodule, a temporal aggregation submodule, and a feature splicing submodule.

[0168] The temporal extraction submodule utilizes the temporal encoder in the dual-stream spatiotemporal encoder to process the target intracranial EEG signal through the full-channel hybrid convolutional layer in the temporal encoder, in order to extract the global spatial dependencies and temporal waveform features between channels and obtain the intermediate temporal feature map.

[0169] The temporal aggregation submodule is used to perform norm aggregation on intermediate temporal feature maps along the time dimension to obtain temporal feature vectors.

[0170] The feature splicing submodule is used to splice the frequency domain feature vector and the time domain feature vector to obtain the fused feature vector.

[0171] According to an embodiment of the present invention, the gating network is a linear mapping layer; the matching module 430 includes a mapping submodule, a filtering submodule, and a transformation submodule.

[0172] The mapping submodule is used to input the fused feature vector into the gating network, and the gating network is used to map the fused feature vector into a gating score vector. The gating score vector includes a gating score that represents the matching degree between the fused feature vector and each expert network.

[0173] The filtering submodule is used to filter a predetermined number of target expert networks from multiple expert networks based on multiple gating scores, where the gating scores of the target expert networks are higher than those of other expert networks.

[0174] The transformation submodule is used to input the fused feature vector into each target expert network, so that each target expert network can perform feature transformation on the fused feature vector to obtain intermediate features.

[0175] According to an embodiment of the present invention, the determining module 440 includes a score acquisition submodule, a weight determination submodule, a feature aggregation submodule, and a feature classification submodule.

[0176] The score acquisition submodule is used to acquire the target gating score, which represents the matching degree between the fused feature vector and each target expert network.

[0177] The weight determination submodule is used to normalize the gating scores of multiple targets to obtain the aggregate weights corresponding to the expert networks of each target.

[0178] The feature aggregation submodule is used to perform weighted aggregation of the intermediate features output by each target expert network using multiple aggregation weights to obtain aggregated features.

[0179] The feature classification submodule is used to perform classification based on aggregated features to obtain the classification result.

[0180] According to an embodiment of the present invention, the hybrid expert-based intracranial EEG epilepsy seizure and interictal phase classification device 400 further includes a denoising reference module, a slice standard module, and a resampling module.

[0181] The denoising reference module is used to perform bad channel removal, bandpass filtering and notch filtering, and bipolar reference transformation on the raw intracranial EEG signal in sequence using the data preprocessing module, so as to obtain the intracranial EEG signal after denoising and rereference.

[0182] The slice standard module is used to slice the denoised and rereferenced intracranial EEG signals into sliding window slices according to a preset time window, and to standardize each slice.

[0183] The resampling module is used to resample the standardized slices to a preset uniform sampling rate to obtain the target intracranial electroencephalogram (EEG) signal.

[0184] According to an embodiment of the present invention, the hybrid expert-based intracranial EEG epilepsy seizure and interictal period classification device 400 further includes a model processing module.

[0185] The model processing module is used to input the raw intracranial electroencephalogram (EEG) signals into the classification model to obtain the epileptic seizure classification results. The classification model includes a data preprocessing module, a frequency domain spectral spatial embedding module, a dual-stream spatiotemporal encoder, and a hybrid expert classifier.

[0186] According to an embodiment of the present invention, the classification model is trained as follows: the intracranial EEG signal of the sample is input into the initial classification model to obtain the classification result of the epileptic seizure of the sample; based on the difference between the classification result of the epileptic seizure of the sample and the label corresponding to the intracranial EEG signal of the sample, and the regularization loss of the initial classification model, the parameters of the initial classification model are adjusted in multiple rounds to obtain the classification model, wherein the regularization loss is determined according to the weight matrix in the parameters; for the target adjustment round, if the weight matrix does not meet the numerical constraint conditions, the weight matrix is ​​scaled using a preset scaling factor until the numerical constraint conditions are met.

[0187] According to an embodiment of the present invention, the sample intracranial EEG signals include training sample intracranial EEG signals and verification sample intracranial EEG signals; the hybrid expert-based intracranial EEG epileptic seizure and interictal period classification device 400 further includes a sample segmentation module, a segmentation module, and a segment merging module.

[0188] The sample segmentation module is used to divide the original sample intracranial electroencephalogram (EEG) signals into multiple consecutive original sample intracranial EEG signals in chronological order.

[0189] The segmentation module is used to divide the original intracranial brain electronic signal into sample signal segments according to a preset number of segments, and use each sample signal segment as a training signal segment or a verification signal segment, with a time gap between the training signal segment and the verification signal segment.

[0190] The segment merging module is used to merge multiple verification signal segments at the same division position to obtain intracranial EEG signals for verification samples, and to merge multiple training signal segments at the same division position to obtain intracranial EEG signals for training samples.

[0191] According to embodiments of the present invention, any plurality of modules among the extraction module 410, fusion module 420, matching module 430, and determination module 440 may be combined into one module, or any one of these modules may be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules may be combined with at least a portion of the functionality of other modules and implemented in one module. According to embodiments of the present invention, at least one of the extraction module 410, fusion module 420, matching module 430, and determination module 440 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any appropriate combination of any of these three implementation methods. Alternatively, at least one of the extraction module 410, fusion module 420, matching module 430, and determination module 440 may be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.

[0192] Figure 5 A block diagram of an electronic device suitable for implementing a hybrid expert-based intracranial EEG method for classifying epileptic seizure and interictal periods according to an embodiment of the present invention is shown.

[0193] like Figure 5 As shown, an electronic device 500 according to an embodiment of the present invention includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory ROM 502 or a program loaded from a storage portion 508 into a random access memory RAM 503. The processor 501 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 501 may also include onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.

[0194] RAM 503 stores various programs and data required for the operation of electronic device 500. Processor 501, ROM 502, and RAM 503 are interconnected via bus 504. Processor 501 executes various operations of the method flow according to embodiments of the present invention by executing programs in ROM 502 and / or RAM 503. It should be noted that programs may also be stored in one or more memories other than ROM 502 and RAM 503. Processor 501 may also execute various operations of the method flow according to embodiments of the present invention by executing programs stored in one or more memories.

[0195] According to an embodiment of the present invention, the electronic device 500 may further include an input / output (I / O) interface 505, which is also connected to a bus 504. The electronic device 500 may also include one or more of the following components connected to the input / output (I / O) interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output (I / O) interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 510 as needed so that computer programs read from it can be installed into the storage section 508 as needed.

[0196] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of the present invention.

[0197] According to embodiments of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of the present invention, the computer-readable storage medium may include ROM 502 and / or RAM 503 and / or one or more memories other than ROM 502 and RAM 503 described above.

[0198] Embodiments of the present invention also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code enables the computer system to implement the hybrid expert-based intracranial EEG epilepsy seizure and interictal phase classification method provided in the embodiments of the present invention.

[0199] When the computer program is executed by the processor 501, it performs the functions defined in the system / apparatus of this invention. According to embodiments of the invention, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0200] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 509, and / or installed from a removable medium 511. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0201] In such an embodiment, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by processor 501, it performs the functions defined in the system of this embodiment of the invention. According to embodiments of the invention, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0202] According to embodiments of the present invention, program code for executing the computer programs provided in the embodiments of the present invention can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0203] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0204] Those skilled in the art will understand that the features described in the various embodiments of the present invention can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, the features described in the various embodiments of the present invention can be combined and / or combined in various ways without departing from the spirit and teachings of the present invention. All such combinations and / or combinations fall within the scope of the present invention.

[0205] The embodiments of the present invention have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of the invention. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of the invention, and all such substitutions and modifications should fall within the scope of the invention.

Claims

1. A method for classifying the ictal and interictal phases of epilepsy based on hybrid expert analysis, characterized in that, The method includes: The target intracranial EEG signal is decoupled into multiple frequency band components. By performing spatial filtering on each frequency band component, a frequency domain feature vector is extracted. The target intracranial EEG signal is obtained by preprocessing the original intracranial EEG signal. The frequency domain feature vector and the time domain feature vector obtained by cross-channel spatial filtering of the target intracranial EEG signal are fused to obtain a fused feature vector that includes multi-band spectral spatial information and original time domain information. The matching degree between each expert network and the fused feature vector is determined by a gating network of hybrid expert classifiers, and multiple target expert networks for processing the fused feature vector are determined from the multiple expert networks. Based on the aggregated features obtained by aggregating the intermediate features output by each of the target expert networks, an epileptic seizure classification result is determined to assist the user in making a judgment. The epileptic seizure classification result indicates whether the target intracranial EEG signal corresponds to the epileptic seizure period or the interictal period.

2. The method for classifying the ictal and interictal phases of epilepsy based on intracranial electroencephalography according to claim 1, characterized in that, The process of decoupling the target intracranial EEG signal into multiple frequency band components, and extracting a frequency domain feature vector by performing spatial filtering on each frequency band component, includes: Using the frequency domain spectral space embedding module, a tree-structured multi-level discrete wavelet decomposition is performed on each channel. For each level of decomposition, the input signal is convolved and downsampled by low-pass and high-pass filters respectively to obtain the frequency band components including approximate components and detail components. The frequency band components of each channel in each frequency band are spliced ​​along the channel dimension to obtain the spectral feature tensor; Using the frequency domain encoder in the dual-stream spatiotemporal encoder, spatial filtering is performed on each frequency band component in the spectral feature tensor to obtain the frequency domain feature vector.

3. The method for classifying the ictal and interictal phases of epilepsy based on claim 2, characterized in that, The frequency domain encoder includes a grouped convolutional layer, which includes multiple sub-convolutional layers corresponding to each frequency band; the step of spatially filtering each frequency band component in the spectral feature tensor to obtain the frequency domain feature vector includes: The spectral feature tensor is input into the grouped convolutional layer, and each sub-convolutional layer performs spatial filtering on the frequency band components of the corresponding frequency band in the spectral feature tensor, and outputs the spatial filtering feature map of the frequency band. The spatial filtering feature maps of each frequency band are subjected to norm aggregation along the time dimension to obtain the feature vector of each frequency band. The frequency domain feature vectors are obtained by concatenating the feature vectors of all frequency bands along the feature dimension.

4. The method for classifying the ictal and interictal phases of epilepsy based on claim 1, characterized in that, The step of fusing the frequency domain feature vector with the time domain feature vector obtained by cross-channel spatial filtering of the target intracranial EEG signal to obtain a fused feature vector including multi-band spectral spatial information and original time domain information includes: Using the temporal encoder in the dual-stream spatiotemporal encoder, the target intracranial EEG signal is processed through the full-channel hybrid convolutional layer in the temporal encoder to extract the global spatial dependency and temporal waveform features between channels, and obtain the temporal intermediate feature map; The intermediate feature map in the time domain is subjected to norm aggregation along the time dimension to obtain the time domain feature vector; The frequency domain feature vector and the time domain feature vector are concatenated to obtain the fused feature vector.

5. The method for classifying the ictal and interictal phases of epilepsy based on claim 1, characterized in that, The gated network is a linear mapping layer; the gated network, which uses a hybrid expert classifier to determine the matching degree between each expert network and the fused feature vector, and determines multiple target expert networks from the multiple expert networks for processing the fused feature vector, includes: The fused feature vector is input into the gating network, and the gating network is used to map the fused feature vector into a gating score vector. The gating score vector includes a gating score that characterizes the matching degree between the fused feature vector and each of the expert networks. Based on multiple gating scores, a predetermined number of target expert networks are selected from the multiple expert networks, wherein the gating scores of the target expert networks are higher than those of the other expert networks; The fused feature vector is input into each of the target expert networks to perform feature transformation on the fused feature vector using each of the target expert networks to obtain intermediate features.

6. The method for classifying the ictal and interictal phases of epilepsy based on claim 1, characterized in that, The aggregation feature obtained by aggregating the intermediate features output by each of the target expert networks, used to determine the epileptic seizure classification result to assist the user's judgment, includes: Obtain the target gating score used to characterize the matching degree between the fused feature vector and each of the target expert networks; The gating scores of the multiple targets are normalized to obtain the aggregate weights corresponding to each of the target expert networks; By using multiple aggregation weights, the intermediate features output by each of the target expert networks are weighted and aggregated to obtain aggregated features; The epileptic seizure classification results are obtained based on the aggregated features.

7. The method for classifying the ictal and interictal phases of epilepsy based on claim 1, characterized in that, The method further includes: Using the data preprocessing module, the original intracranial EEG signal is sequentially subjected to bad channel removal, bandpass filtering and notch filtering, and bipolar reference transformation to obtain the intracranial EEG signal after denoising and rereference. The denoised and rereferenced intracranial EEG signals are sliced ​​into sliding window slices according to a preset time window, and each slice is standardized. The standardized slices are resampled to a preset uniform sampling rate to obtain the target intracranial electroencephalogram (EEG) signal.

8. The method for classifying the ictal and interictal phases of epilepsy based on any one of claims 1 to 7, characterized in that, The method further includes: The raw intracranial electroencephalogram (EEG) signals are input into a classification model to obtain the epileptic seizure classification results. The classification model includes a data preprocessing module, a frequency domain spectral spatial embedding module, a dual-stream spatiotemporal encoder, and a hybrid expert classifier.

9. The method for classifying the ictal and interictal phases of epilepsy based on claim 8, characterized in that, The classification model is trained in the following manner: The intracranial electroencephalogram (EEG) signals of the sample are input into the initial classification model to obtain the epileptic seizure classification results of the sample; Based on the difference between the epileptic seizure classification results of the sample and the labels corresponding to the intracranial EEG signals of the sample, and the regularization loss of the initial classification model, the parameters of the initial classification model are adjusted in multiple rounds to obtain the classification model. The regularization loss is determined according to the weight matrix in the parameters. Adjust the weight matrix according to the target. If the weight matrix does not meet the numerical constraints, scale the weight matrix using a preset scaling factor until the numerical constraints are met.

10. The method for classifying the ictal and interictal phases of epilepsy based on claim 9, characterized in that, The sample intracranial EEG signals include training sample intracranial EEG signals and verification sample intracranial EEG signals; the method further includes: The original sample intracranial electroencephalogram (EEG) signals were divided into multiple consecutive original sample intracranial EEG signals according to time sequence. The original intracranial brain electronic signal of the sample is divided into sample signal segments according to a preset number of divisions, and each sample signal segment is used as a training signal segment or a verification signal segment, with a time gap between the training signal segment and the verification signal segment. Multiple verification signal segments located at the same division position are merged to obtain the intracranial EEG signal of the verification sample, and multiple training signal segments located at the same division position are merged to obtain the intracranial EEG signal of the training sample.