Seizure prediction method, device, medium, and product based on structural perturbation

CN122805295APending Publication Date: 2026-09-25SHENZHEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611290363.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-25
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0005]本公开实施例提供了一种基于结构扰动的癫痫发作预测方法、设备、介质及产品,以解决传统预测模型对邻接矩阵误差敏感的问题,保障发作预测模型在真实应用场景中的稳定性与鲁棒性

Benefits of technology

[0011]本公开实施例的技术方案,通过对目标癫痫样本的训练脑电图信号中的任意两个通道脑电信号进行关联特征提取,构建第一邻接矩阵,并为第一邻接矩阵引入初始结构扰动,在第一发作预测模型的权重参数固定的情况下,以最大化所述第一发作预测模型的第一分类损失为初始结构扰动的迭代更新目标,得到能够模拟最不利结构变化的目标结构扰动,将目标结构扰动叠加至第一邻接矩阵,以最小化第一发作预测模型的第一分类损失为权重参数的迭代优化目标,得到所述目标癫痫样本对应的目标发作预测模型,最大化-最小化的双层优化策略解决了传统预测模型对邻接矩阵误差敏感的问题,使得发作预测模型在训练过程中学习到对邻接矩阵误差不敏感的鲁棒表征,从而具备了抵抗邻接矩阵误差的能力,提高了发作预测模型在真实应用场景中的稳定性与鲁棒性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122805295A_ABST
    Figure CN122805295A_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method, device, medium and product for seizure prediction based on structural disturbance, the method comprising: performing correlation feature extraction on any two channel electroencephalogram signals in a training electroencephalogram signal of a target epilepsy sample, and constructing a first adjacency matrix; introducing an initial structural disturbance to the first adjacency matrix, and taking the maximum first classification loss of a first seizure prediction model as an iterative update target of the initial structural disturbance under the condition that the weight parameters of the first seizure prediction model are fixed, to obtain a target structural disturbance; superimposing the target structural disturbance on the first adjacency matrix, and taking the minimum first classification loss of the first seizure prediction model as an iterative optimization target of the weight parameters, to obtain a trained target seizure prediction model; and performing inference prediction on a target epilepsy sample in a seizure period by the target seizure prediction model, thereby solving the problem that a traditional prediction model is sensitive to adjacency matrix errors, and improving the robustness and stability of the seizure prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of medical artificial intelligence technology, and in particular to a method, device, medium and product for predicting epileptic seizures based on structural perturbation. Background Technology

[0002] Epilepsy is a chronic neurological disorder caused by abnormal electrical discharges in brain neurons, characterized by sudden, recurrent, and unpredictable seizures. Electroencephalography (EEG), with its advantages of being non-invasive, having high temporal resolution, and being easy to perform clinically, has become the most widely used neurophysiological monitoring method in epilepsy seizure prediction research. Based on the pathophysiological process of epileptic seizures, a continuous EEG signal can be sequentially divided into four typical phases: interictal, preictal, ictal, and postictal.

[0003] The transition from the interictal period to the preictal period is a key warning window for impending epileptic seizures. For patients with drug-resistant epilepsy, early identification and warning of seizure risk within this window can buy valuable time for preventative safety measures, emergency drug intervention, or closed-loop neuromodulation. Therefore, accurate prediction of the preictal period has significant clinical translational value.

[0004] However, EEG signals are susceptible to multiple factors, including electromyography (EMG) interference, electrooculography (EOG) interference, environmental electromagnetic interference, and changes in electrode contact status. The adjacency matrix extracted from EEG signals may contain erroneous connections such as pseudo-connections, misidentified weak connections, missing connections, or connections in reverse direction. For graph neural networks, these erroneous connections are amplified during message passing, leading to decreased sensitivity of the prediction model in detecting pre-seizure states and increasing the risk of false alarms. Therefore, traditional supervised training cannot guarantee the stability and robustness of prediction models in real-world applications. Summary of the Invention

[0005] This disclosure provides a method, device, medium, and product for predicting epileptic seizures based on structural perturbation, in order to solve the problem that traditional prediction models are sensitive to adjacency matrix errors, and to ensure the stability and robustness of the seizure prediction model in real-world application scenarios.

[0006] One aspect of this disclosure provides a method for predicting epileptic seizures based on structural perturbations, comprising: Acquire multiple training EEG signals corresponding to the target epilepsy sample; For any two channels of EEG signals in each training EEG signal, the association feature is extracted to construct the first adjacency matrix corresponding to the training EEG signal; With the weight parameters of the first seizure prediction model fixed, the initial structural perturbation is added to each first adjacency matrix to obtain multiple perturbation adjacency matrices, and the structural perturbation is iteratively updated according to each perturbation adjacency matrix and the first seizure prediction model to obtain the target structural perturbation. The target structure perturbation is added to each first adjacency matrix to obtain multiple target adjacency matrices. Based on each target adjacency matrix, the weight parameters of the first seizure prediction model are iteratively optimized to obtain the target seizure prediction model corresponding to the target epilepsy sample. The association features of any two channels of EEG signals in the target epilepsy sample are extracted to construct a second adjacency matrix. Based on the second adjacency matrix, the epileptic seizure outcome corresponding to the target epilepsy sample is determined using the target seizure prediction model. The initial structural perturbation is applied to the graph connection structure defined by the first adjacency matrix to adjust the edge connection state in the graph connection structure. The iterative update objective of the structural perturbation is to maximize the first classification loss of the first seizure prediction model. The iterative optimization objective of the weight parameters includes minimizing the first classification loss of the first seizure prediction model.

[0007] Another aspect of this disclosure provides a seizure prediction device based on structural perturbation, comprising: The training EEG signal acquisition module is used to acquire multiple training EEG signals corresponding to the target epilepsy sample; The first adjacency matrix construction module is used to extract the correlation features of any two channels of EEG signals in each training EEG signal and construct the first adjacency matrix corresponding to the training EEG signal. The target structural perturbation determination module is used to add the initial structural perturbation to each first adjacency matrix to obtain multiple perturbation adjacency matrices when the weight parameters of the first attack prediction model are fixed, and to iteratively update the structural perturbation according to each perturbation adjacency matrix and the first attack prediction model to obtain the target structural perturbation. The target seizure prediction model training module is used to add the target structure perturbation to each first adjacency matrix to obtain multiple target adjacency matrices, and to iteratively optimize the weight parameters of the first seizure prediction model according to each target adjacency matrix to obtain the target seizure prediction model corresponding to the target epilepsy sample. The second adjacency matrix construction module is used to extract the correlation features of any two channels of EEG signals in the EEG signal to be tested of the target epilepsy sample and construct the second adjacency matrix. The epileptic seizure outcome determination module is used to determine the epileptic seizure outcome corresponding to the target epileptic sample based on the second adjacency matrix using the target seizure prediction model. The initial structural perturbation is applied to the graph connection structure defined by the first adjacency matrix to adjust the edge connection state in the graph connection structure. The iterative update objective of the structural perturbation is to maximize the first classification loss of the first seizure prediction model. The iterative optimization objective of the weight parameters includes minimizing the first classification loss of the first seizure prediction model.

[0008] Another aspect of this disclosure provides an electronic device, comprising: At least one processor; A memory that is communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the seizure prediction method based on structural perturbation according to any embodiment of this disclosure.

[0009] Another aspect of this disclosure provides a computer-readable storage medium storing computer instructions for causing a processor to execute and implement the seizure prediction method based on structural perturbation as described in any embodiment of this disclosure.

[0010] Another aspect of this disclosure provides a computer program product including a computer program that, when executed by a processor, implements the structural perturbation-based epileptic seizure prediction method described in any embodiment of this disclosure.

[0011] The technical solution of this disclosure extracts associated features from any two channels of EEG signals in the training EEG signal of the target epilepsy sample to construct a first adjacency matrix. An initial structural perturbation is introduced into the first adjacency matrix. With the weight parameters of the first seizure prediction model fixed, the iterative update objective of the initial structural perturbation is to maximize the first classification loss of the first seizure prediction model. This yields a target structural perturbation that can simulate the most unfavorable structural changes. The target structural perturbation is then superimposed onto the first adjacency matrix. The iterative optimization objective of the weight parameters is to minimize the first classification loss of the first seizure prediction model. This yields the target seizure prediction model corresponding to the target epilepsy sample. The maximization-minimization two-layer optimization strategy solves the problem of traditional prediction models being sensitive to adjacency matrix errors. This allows the seizure prediction model to learn a robust representation that is insensitive to adjacency matrix errors during training, thereby possessing the ability to resist adjacency matrix errors and improving the stability and robustness of the seizure prediction model in real-world application scenarios.

[0012] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 A flowchart illustrating a method for predicting epileptic seizures based on structural perturbation, provided as an embodiment of this disclosure; Figure 2 This is a schematic diagram illustrating an iterative update process for a structural perturbation provided in one embodiment of this disclosure; Figure 3 A flowchart illustrating another method for predicting epileptic seizures based on structural perturbation, provided as an embodiment of this disclosure; Figure 4 A flowchart illustrating a specific example of a method for predicting epileptic seizures based on structural perturbation provided in one embodiment of this disclosure; Figure 5 This is a schematic diagram of the structure of an epileptic seizure prediction device based on structural perturbation, provided in one embodiment of this disclosure. Figure 6 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present disclosure. Detailed Implementation

[0015] To enable those skilled in the art to better understand the present disclosure, the technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present disclosure, and not all embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present disclosure.

[0016] It should be noted that the terms "preset," "target," "first," "second," "initial," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0017] Figure 1 This is a flowchart illustrating a method for predicting epileptic seizures based on structural perturbation, provided in one embodiment of this disclosure. This embodiment is applicable to predicting the stage of an epileptic seizure in a sample. The method can be executed by a structural perturbation-based epileptic seizure prediction device, which can be implemented in hardware and / or software and configured in a terminal device. Figure 1 As shown, the method includes: S110. Obtain multiple training EEG signals corresponding to the target epilepsy sample.

[0018] The training EEG signal represents EEG activity information within the EEG time window. The EEG time window refers to a preset time length that has specific physiological significance and can reflect the epileptic seizure period during the period of continuous EEG acquisition of the target epileptic sample. For example, the EEG time window can be 2s-4s, but is not limited to the given example.

[0019] Specifically, the training EEG signal includes channel EEG signals corresponding to multiple EEG channels, each EEG channel corresponding to a collection electrode, and the channel EEG signal represents the potential timing information of neuronal cluster discharge activity in the cerebral cortex / skull picked up by the corresponding collection electrode.

[0020] For example, the electrode lead system corresponding to the training EEG signal can be an international 10-20 lead system, an extended 10-10 lead system, or a 10-5 high-precision lead system, etc., but is not limited to the given example.

[0021] For example, the training signal set consists of various training EEG signals. ,in, Indicates that the target epilepsy sample is in the first Training EEG signals within a specific EEG time window Indicates the first Epilepsy seizure labels corresponding to each EEG time window , This indicates the number of training EEG signals corresponding to the target epilepsy sample.

[0022] S120. Extract the associated features from any two channels of EEG signals in each training EEG signal to construct the first adjacency matrix corresponding to the training EEG signal.

[0023] The pre-seizure phase involves abnormal synchronization between multiple brain regions, functional network reorganization, and the propagation and diffusion of discharge information. Feature extraction can accurately characterize the coupling relationship of abnormal discharges between different EEG channels, providing a network-dimensional quantitative basis for the identification of seizure precursors.

[0024] In an optional embodiment, the step of extracting association features from any two channels of EEG signals in each training EEG signal to construct the first adjacency matrix corresponding to the training EEG signal includes: extracting association features of the functional dimension from any two channels of EEG signals in the training EEG signal to obtain a functional connectivity matrix, and binarizing the functional connectivity matrix to obtain the first adjacency matrix corresponding to the training EEG signal.

[0025] In this embodiment, the matrix elements of the functional connectivity matrix are the functional connectivity strengths of two EEG channels, and the first adjacency matrix represents the functional connectivity relationship between EEG channels. The functional connectivity reflects the synchronous oscillation phenomenon generated by electrophysiological activities in the brain network.

[0026] For example, the functional connection strength can be measured using parameters such as Pearson Correlation Coefficient (PCC), Coherence (COH), phase synchronization index, and mutual information.

[0027] In an optional embodiment, the functional connection strength is (Phase Locking Value, PLV). For example, for the first... EEG signals from each channel and the EEG signals from each channel Its functional connection strength Satisfy the following formula: in, This indicates the number of sampling points within the EEG time window. and These represent the EEG signals from the two channels at the sampling time. The instantaneous phase below, Represents the imaginary unit, satisfying The functional connectivity matrix is ​​a symmetric connectivity matrix. In the functional connectivity matrix, .

[0028] In one optional embodiment, the binarization process is either thresholding or sparsification. Taking thresholding as an example, the first adjacency matrix... Satisfy the following formula: in, This indicates the target intensity threshold.

[0029] In another optional embodiment, the step of extracting association features from any two channels of EEG signals in each training EEG signal to construct the first adjacency matrix corresponding to the training EEG signal includes: extracting association features of the interaction dimension from any two channels of EEG signals in the training EEG signal to obtain a causal connection matrix, and binarizing the causal connection matrix to obtain the first adjacency matrix corresponding to the training EEG signal.

[0030] In this embodiment, the matrix elements of the causal connection matrix are the causal driving strengths of two EEG channels. The first adjacency matrix represents the causal driving relationship between EEG channels. The causal driving reflects the directional propagation effect of electrophysiological activity from the upstream brain region to the downstream brain region.

[0031] For example, the causal driving strength can be measured using parameters such as transfer entropy (TE) or Granger causality (GC).

[0032] Based on the above embodiments, optionally, the method further includes: traversing the candidate intensity thresholds in the candidate intensity list; determining a prediction probability set based on the traversed candidate intensity thresholds, the verification signal set, and the epileptic seizure prediction model; determining the classification performance index corresponding to the candidate intensity threshold based on the prediction probability set and the true label set; and after the traversal is completed, selecting the target intensity threshold from the candidate intensity list based on each of the classification performance indices.

[0033] Specifically, the predicted probability set includes predicted probability values ​​corresponding one-to-one with the verification EEG signals in the verification signal set; for example, the classification performance index includes accuracy, precision, recall and F1 score, but is not limited to the given example.

[0034] This embodiment adaptively solves for the optimal threshold parameters that fit the first seizure prediction model using a data-driven approach, avoiding the subjectivity of manually setting fixed intensity thresholds based on experience, thereby improving the robustness of seizure prediction on the target epilepsy sample.

[0035] S130. With the weight parameters of the first seizure prediction model fixed, the initial structural perturbation is added to each first adjacency matrix to obtain multiple perturbation adjacency matrices, and the structural perturbation is iteratively updated according to each perturbation adjacency matrix and the first seizure prediction model to obtain the target structural perturbation.

[0036] In this embodiment, the initial structural perturbation is applied to the graph connection structure defined by the first adjacency matrix to adjust the edge connection state in the graph connection structure.

[0037] For example, the initial structural perturbation ,in, Indicates the addition of the first The brainwave channel and the first The node connections between the brainwave channels Indicates deletion of the first The brainwave channel and the first The node connections between the brainwave channels Indicates maintaining the first The brainwave channel and the first The node connections between the brainwave channels remain unchanged. This indicates the number of brainwave channels.

[0038] For example, the perturbation adjacency matrix It can be represented as: in, Denotes the first adjacency matrix. This represents the projection operator, used to project the adjacency matrix obtained after adding perturbations onto the binary matrix space, ensuring that the perturbation adjacency matrix satisfies the structural constraints of the adjacency matrix.

[0039] In one alternative embodiment, the structural constraints include at least one of the following: symmetry, asymmetry, binaryity, zero diagonal constraint, and the number of disturbances on the connecting edges not exceeding the disturbance quantity budget.

[0040] Specifically, when the first adjacency matrix is ​​a symmetric adjacency matrix, the structural constraints include symmetry; when the first adjacency matrix is ​​an asymmetric adjacency matrix, the structural constraints include asymmetry. Here, binaryity means that the matrix elements in the perturbed adjacency matrix take values ​​of 0 or 1; zero diagonal constraint means that the matrix elements on the diagonal of the perturbed adjacency matrix are always 0; the perturbed quantity budget is defined as the maximum number of edge connection states that can be flipped.

[0041] For example, the constraint on the budget of the disturbance quantity can be expressed as: ,in, This indicates the budget for the number of disturbances.

[0042] In this embodiment, the method further includes: determining a first feature matrix based on the training EEG signal, wherein the first feature matrix contains the EEG feature sequence corresponding to each EEG channel in the training EEG signal.

[0043] In an optional embodiment, determining the first feature matrix based on the training EEG signal includes: determining the EEG channel corresponding to the training EEG signal as a node in the first feature matrix, and determining the channel EEG signal in the training EEG signal as the temporal sampling feature of the corresponding node, thereby obtaining the first feature matrix.

[0044] In another optional embodiment, determining the first feature matrix based on the training EEG signal includes: determining the EEG channel corresponding to the training EEG signal as a node in the first feature matrix; extracting time-frequency features from the channel EEG signals in the training EEG signal to obtain the time-frequency feature sequence of the corresponding node, and stacking the time-frequency feature sequences according to the EEG channel to obtain the first feature matrix.

[0045] Specifically, the time-frequency feature extraction includes time-domain feature extraction and / or frequency-domain feature extraction. The time-domain feature extraction includes, but is not limited to, mean, variance, kurtosis, skewness, and wavelet energy entropy. The frequency-domain feature extraction includes, but is not limited to, power spectral density, bandwidth-to-energy ratio, relative power, spectral entropy, and spectral pyramid.

[0046] Specifically, the perturbation adjacency matrix and its corresponding first feature matrix together constitute the graph structure input of the first attack prediction model. ,in, Indicates a collection of brainwave channels. Represents the perturbation adjacency matrix. This represents the first characteristic matrix.

[0047] The first seizure prediction model is used to extract the dynamic connectivity patterns of brain regions represented by the training EEG signals, thereby achieving accurate identification of the pre-seizure phase. Specifically, the first seizure prediction model is based on a graph neural network architecture. The graph neural network can be untrained, randomly initialized, or pre-trained. The training sample set of the pre-trained graph neural network can be a general brain atlas dataset or an epilepsy EEG dataset. The graph neural network includes, but is not limited to, graph convolutional networks, graph attention networks, gated graph neural networks, graph isomorphic networks, or adaptive graph convolutional networks.

[0048] In this embodiment, the iterative update objective of the structural perturbation is to maximize the first classification loss of the first seizure prediction model. Specifically, the first classification loss represents the degree of difference between the predicted seizure result output by the first seizure prediction model and the epileptic seizure label corresponding to the training EEG signal. For example, the loss function corresponding to the first classification loss includes, but is not limited to, the cross-entropy loss function, the weighted cross-entropy loss function, the focal loss function, or the symmetric cross-entropy loss function.

[0049] In an optional embodiment, the step of iteratively updating the structural perturbation to obtain the target structural perturbation based on each of the perturbation adjacency matrices and the first seizure prediction model includes: in the first iteration update process, performing forward propagation based on each of the perturbation adjacency matrices and the first seizure prediction model to determine the first classification loss of the first iteration update; in subsequent iteration update processes, obtaining unused candidate structural perturbations from the structural perturbation set and superimposing the candidate structural perturbations onto each first adjacency matrix to obtain multiple perturbation adjacency matrices in the current iteration update; performing forward propagation based on each of the perturbation adjacency matrices and the first seizure prediction model to determine the first classification loss of the current iteration update; until all candidate structural perturbations in the structural perturbation set have been traversed, determining the candidate structural perturbation corresponding to the largest first classification loss as the target structural perturbation.

[0050] Among them, the candidate structural perturbations in the set of structural perturbations are feasible structural perturbations that satisfy the structural constraints.

[0051] In another optional embodiment, the step of iteratively updating the structural perturbation to obtain the target structural perturbation based on each of the perturbation adjacency matrices and the first attack prediction model includes: in each iteration update process, performing forward propagation based on each of the perturbation adjacency matrices and the first attack prediction model to determine the current first classification loss; determining the current gradient data based on the current first classification loss, and sorting the connection edges in the graph connection structure based on the current gradient data to obtain a connection edge sequence; filtering the connection edge sequence according to preset screening conditions to obtain a candidate connection edge set, and flipping the corresponding matrix elements in each first adjacency matrix based on the candidate connection edge set to obtain multiple perturbation adjacency matrices in the next iteration update; repeating the above iterative update process until the current first classification loss reaches a preset convergence threshold or the number of iteration updates reaches the maximum number of updates, and determining the target structural perturbation based on the candidate connection edge set obtained in the final iteration.

[0052] For example, the current gradient data It can be represented as: in, This represents the first category loss.

[0053] For example, the preset filtering condition may be that the absolute value of the gradient of the connecting edge is greater than a preset threshold, a preset filtering quantity, or a preset filtering ratio, wherein the preset filtering quantity is equal to or less than the disturbance quantity budget.

[0054] Figure 2 This is a schematic diagram of an iterative update process for structural perturbation provided in one embodiment of this disclosure. The waveform curves of different colors on the left represent the channel EEG signals of different brain regions. Multiple channel EEG signals constitute the training EEG signal. The phase lock value between pairs of combined EEG channels is calculated to obtain the PLV connection matrix. The PLV connection matrix is ​​then binarized to obtain... Figure 2 The first adjacency matrix, composed of white and yellow blocks, is used to introduce structural perturbations to obtain a perturbed adjacency matrix. Specifically, this involves deleting, adding, or maintaining the connecting edges in the graph connection structure defined by the first adjacency matrix. The perturbed adjacency matrix and the corresponding first feature matrix are then input together into the first seizure prediction model, such as... Figure 2 As shown, the first seizure prediction model employs a multi-layer graph convolutional network architecture for graph structure encoding, and outputs the predicted seizure results via a classification head. Combining each predicted seizure result with each epileptic seizure label, the first classification loss is determined, and the structural perturbation is updated using a backpropagation algorithm.

[0055] This embodiment significantly improves the search efficiency of structural perturbations through a gradient-guided discrete search strategy, thereby improving the overall efficiency of prediction modeling.

[0056] S140. The target structure perturbation is added to each first adjacency matrix to obtain multiple target adjacency matrices. Based on each target adjacency matrix, the weight parameters of the first seizure prediction model are iteratively optimized to obtain the trained target seizure prediction model.

[0057] In one specific embodiment, the target adjacency matrix also satisfies the structural constraints of the adjacency matrix. In this embodiment, the iterative optimization objective of the weight parameters includes minimizing the first classification loss of the first seizure prediction model.

[0058] In an optional embodiment, the step of iteratively optimizing the weight parameters of the first seizure prediction model according to each of the target adjacency matrices to obtain the trained target seizure prediction model includes: for each target adjacency matrix, simultaneously inputting the target adjacency matrix and the corresponding first feature matrix into the first seizure prediction model to obtain the output predicted seizure result; determining a first classification loss according to each predicted seizure result and the epilepsy seizure label corresponding to each of the training EEG signals, and updating the weight parameters of the first seizure prediction model by gradient descent according to the first classification loss; until the first classification loss converges to a preset threshold or the number of iterations reaches the maximum number of iterations, to obtain the trained target seizure prediction model.

[0059] In this embodiment, for example, the two iterative processes can be represented as follows: in, This represents the weight parameters of the first seizure prediction model. Indicates the predicted outcome of the seizure. This represents the set of candidate connection edges.

[0060] In another optional embodiment, the iterative optimization objective of the weight parameters further includes minimizing the discriminant loss of the discriminator, which is used to distinguish between the first adjacency matrix and the target adjacency matrix, so that the first epidemiology prediction model can generate similar feature vectors for the first adjacency matrix and the target adjacency matrix, thereby improving the consistency of the model feature space.

[0061] This embodiment provides a detailed description of the complete execution flow of two iterative branches. It can be understood that in other optional embodiments, the two iterative branches are executed alternately in the epilepsy seizure prediction process based on structural perturbation. That is, with the weight parameters of the first seizure prediction model fixed, the structural perturbation is updated to obtain the target adjacency matrix. With the target adjacency matrix fixed, the weight parameters of the first seizure prediction model are optimized to form a maximization-minimization alternating optimization strategy until the first classification loss of the first seizure prediction model on the validation signal set of the target epilepsy sample converges or the number of alternating executions reaches the maximum number of alternations, thus obtaining the trained target seizure prediction model.

[0062] The advantage of this setting is that it ensures that the target seizure model can maintain a high degree of consistency in the distribution of model output features even when the adjacency matrix is ​​significantly disturbed, thereby further improving the robustness of the target seizure prediction model.

[0063] S150. Extract correlation features from any two channels of EEG signals in the target epilepsy sample to construct a second adjacency matrix.

[0064] Specifically, the construction method of the second adjacency matrix is ​​the same as the construction method of the first adjacency matrix provided in the above embodiments. Both the first adjacency matrix and the second adjacency matrix are symmetric adjacency matrices or asymmetric adjacency matrices.

[0065] S160. Using the target seizure prediction model, the epileptic seizure result corresponding to the target epilepsy sample is determined based on the second adjacency matrix.

[0066] Specifically, based on the EEG signal to be tested, a second feature matrix is ​​determined, and the second feature matrix and the second adjacency matrix are collaboratively input into the target seizure prediction model to obtain the epileptic seizure result corresponding to the output target epileptic sample.

[0067] The second feature matrix contains the EEG feature sequence corresponding to each EEG channel in the EEG signal to be tested, and the method for determining the second feature matrix is ​​the same as the method for determining the first feature matrix provided in the above embodiment.

[0068] Specifically, the epileptic seizure result characterizes whether the target epileptic sample is in the pre-ictal phase of epilepsy. The epileptic seizure result is a binary label or a binary probability value. The binary label is either "interictal phase" or "preictal phase," or "preictal phase" or "non-preictal phase." The binary probability value represents the probability that the target epileptic sample is in the pre-ictal phase of epilepsy, ranging from 0 to 1. A higher binary probability value indicates that the target epileptic sample is close to or has already entered the pre-ictal phase, and its risk of seizure is higher; a lower binary probability value indicates that the target epileptic sample is in the interictal phase of epilepsy, and its risk of seizure is lower.

[0069] The technical solution of this embodiment extracts associated features from any two channels of EEG signals, constructs undirected adjacency matrices and directed adjacency matrices respectively, transforms the complex physiological evolution characteristics of brain regions into computer-computable digital representations, and learns the dynamic connectivity patterns of brain regions exhibited by the two types of adjacency matrices at different stages of epileptic seizures by combining them with an epileptic seizure prediction model. The result of epileptic seizure is obtained by using undirected adjacency matrices to reflect the synchronicity of abnormal discharge activity in brain regions and directed adjacency matrices to characterize the propagation direction of abnormal discharge activity in brain regions. It comprehensively reflects the dynamic connectivity characteristics of the brain network from the two dimensions of synchronicity and directed information flow in brain regions, solves the problem of insufficient feature mining of different stages of epileptic seizures by traditional prediction methods, improves the ability to distinguish between interictal and preictal periods of epileptic seizures, reduces the false alarm rate of epileptic seizures, and provides a solid and reliable technical foundation for epileptic seizure prediction systems.

[0070] Figure 3 This is a flowchart illustrating another epileptic seizure prediction method based on structural perturbation, provided as an embodiment of this disclosure. This embodiment further refines the "first seizure prediction model" in the above embodiment. Figure 3 As shown, the method includes: S210. Based on the source epilepsy sample set, pre-train the untrained second seizure prediction model to obtain the third seizure prediction model.

[0071] In this embodiment, the source epilepsy sample set includes a source EEG set derived from at least one source epilepsy sample, and the source EEG set includes source EEG signals and epileptic seizure labels that correspond one-to-one with the EEG time window.

[0072] For example, the source epilepsy sample set , ,in, Indicates the first A collection of source EEG images from individual epilepsy samples. Source EEG Atlas The first in The source EEG signal corresponding to each EEG time window Indicates the first Epilepsy seizure labels corresponding to each EEG time window , This indicates the number of source EEG signals corresponding to a source epilepsy sample. In this embodiment, the number of signal segments in the source epilepsy sample is much greater than the number of signal segments in the target epilepsy sample.

[0073] In an optional embodiment, the method further includes: acquiring continuous electroencephalogram (EEG) signals corresponding to at least one source epilepsy sample, and performing standardized preprocessing on each of the continuous EEG signals to obtain a source epilepsy sample set.

[0074] In this embodiment, the standardization preprocessing includes at least one of the following: channel quality detection and interpolation reconstruction, filtering, rereference processing, downsampling, artifact removal, segmentation, noise segment removal, and normalization.

[0075] The channel quality detection is used to quantitatively evaluate the signal quality of each EEG channel in a continuous EEG signal, and to mark EEG channels with signal quality lower than a preset quality threshold as low-quality channels.

[0076] For example, the low-quality channel can be an EEG channel where the channel's EEG signal is nearly flat for a long time, has abnormally strong noise, exhibits persistent baseline drift, is disconnected, or has almost no effective waveform output. Specifically, a channel's EEG signal being nearly flat for a long time is manifested by an amplitude standard deviation lower than a preset amplitude threshold, indicating that the EEG channel lacks normal EEG activity characteristics and cannot reflect the synchronous firing and rhythmic oscillation of brain neurons; abnormally strong noise can be manifested by a signal-to-noise ratio lower than a preset threshold or a power spectral density with an energy percentage of less than 5% in the key frequency band (e.g., 0.5–40Hz), indicating significant distortion of the channel's EEG signal; severe baseline drift can be manifested by the mean absolute value of the first-order difference of the channel's EEG signal exceeding a preset drift threshold; a disconnected channel can be manifested by a channel's EEG signal amplitude being consistently zero or close to the instrument's background noise level; and almost no effective waveform output can be manifested by the channel's EEG signal amplitude envelope entropy being lower than a preset entropy threshold or the waveform pattern not conforming to physiological rhythms.

[0077] In this embodiment, after identifying a low-quality channel, it is not simply deleted. Instead, based on the EEG signals of the surrounding high-quality channels, the channel's own EEG signal is interpolated and reconstructed to maintain the integrity of the electrode space topology and the geometric consistency of functional connectivity modeling. For example, the interpolation method can be a spherical spline interpolation method or a Kriging interpolation method, etc.

[0078] The advantage of this setup is that it avoids the loss of information from the EEG signals in the channels and also avoids the distortion of the functional connectivity map topology and spatial neighborhood relationships caused by the lack of EEG channels, thus ensuring the consistent modeling of subsequent brain network nodes.

[0079] For example, the filtering process can employ bandpass filtering and / or notch filtering. Specifically, bandpass filtering is first performed to retain the continuous EEG signal within the 0.5–40 Hz frequency range. This band covers most of the major frequency components related to clinical EEG activity and epilepsy, while effectively suppressing baseline drift at excessively low frequencies and electromyographic interference at excessively high frequencies. Notch filtering is then performed on top of the bandpass filtering to remove power frequency interference. Preferably, a 50 Hz notch filter is used in a 50 Hz power environment, and a 60 Hz notch filter is used in a 60 Hz power environment. This filtering process effectively reduces the impact of environmental power noise on the correlation and connectivity estimation between EEG channels, improving the stability of subsequent functional connectivity and causal connectivity calculations.

[0080] Since continuous EEG signals essentially record the potential differences between brain channels, rather than absolute potentials, the choice of reference electrode directly affects the waveform morphology and amplitude distribution of all brain channels. To reduce the systematic bias caused by the selection of the original reference electrode, the filtered continuous EEG signals undergo rereference processing. Preferably, an average reference method is used, i.e., the channel EEG signal of each EEG channel is subtracted from the average EEG signal corresponding to all EEG channels; or, depending on the actual application scenario, a designated reference electrode replaces the original reference electrode. Through rereference processing, each continuous EEG signal can be re-expressed under a unified reference benchmark, thereby reducing the overall bias introduced by a single reference electrode.

[0081] Downsampling refers to reducing the original sampling rate of continuous EEG signals by an integer multiple or a specified sampling rate. For example, the original sampling rate may be 500Hz, 1000Hz, or other higher sampling rates, and the specified sampling rate may be 256Hz. Downsampling reduces data redundancy, saves storage resources, and lowers the computational overhead of subsequent feature extraction, correlation calculation, and model training. Furthermore, it preserves the key EEG frequency band features necessary for epileptic seizure prediction, improving overall computational efficiency without significantly losing crucial EEG information, making it more suitable for practical equipment deployment and long-term continuous monitoring operations.

[0082] Continuous EEG signals are often contaminated with numerous non-brain-derived artifacts, including blinking, horizontal eye movements, electrocardiograms (ECGs), electromyograms (EMGs), and localized electrode noise. For example, artifact removal methods can employ Independent Component Analysis (ICA) wavelet transform, adaptive noise cancellation, or principal component analysis, but are not limited to the given examples. Taking ICA as an example, firstly, the continuous EEG signal is decomposed into multiple independent components. Each independent component is then identified to determine the artifact components belonging to non-brain-derived activities, such as blinking, eye movements, ECGs, EMGs, and localized channel noise. These artifact components are then removed from their corresponding independent components, and the resulting independent components are reconstructed to obtain the artifact-free continuous EEG signal. Artifact removal can suppress the interference of artifact components on the continuous EEG signal while preserving the original neural activity components, thereby ensuring the accuracy and robustness of epileptic seizure prediction.

[0083] During the model training phase, the duration of continuous EEG signals in the training samples typically covers multiple EEG time windows. Segmentation aims to divide the continuous EEG signals into several fixed-length signal segments. In one optional embodiment, a sliding window or event markers are used for segmentation. Specifically, if the continuous EEG signals in the training samples carry event markers, segmentation is performed based on the location of the event markers, such as the seizure period of an epileptic seizure. If the continuous EEG signals in the training samples do not carry event markers, a sliding window approach is used for segmentation. Segmentation aims to ensure that each segment of the EEG signal has sufficient signal-to-noise ratio and physiological validity to meet the temporal resolution and statistical stability required for epileptic seizure periods.

[0084] After segmentation, each EEG signal needs to be re-evaluated for quality. For example, EEG signals with abnormally increased variance, excessively large peak values, or obvious deviations from physiological rhythms are deleted to reduce the negative impact of abnormal segments on weight parameter learning.

[0085] After noise segment removal, the remaining EEG signals are normalized. Normalization aims to reduce amplitude differences between different EEG channels, different EEG signals, and different recording time periods, improving the consistency and numerical stability of the model input. Preferably, z-score normalization can be used, which involves subtracting the mean from each EEG channel or each EEG signal and dividing by the standard deviation, giving the processed EEG signals a uniform scale. Normalization avoids bias in subsequent feature extraction and network training towards certain high-amplitude samples due to inconsistent amplitude scales, thereby improving the stability of model training.

[0086] Because continuously acquired EEG signals are often affected by factors such as unstable channel quality, power frequency noise, EEG and EMG artifacts, inconsistent reference electrodes, sampling rate differences, and transient contamination of local segments during long-term continuous recording, the estimation bias of the adjacency matrix is ​​relatively high, making it impossible to provide a reliable pre-training model for personalized fine-tuning of target epilepsy samples. This embodiment addresses this by performing standardized preprocessing on continuous EEG signals, ensuring consistency in channel structure, signal-to-noise ratio, temporal resolution, and reference benchmarks across different source epilepsy samples, thereby reducing structural bias caused by individual differences and environmental heterogeneity.

[0087] In an optional embodiment, the step of pre-training the untrained second seizure prediction model to obtain a third seizure prediction model based on the source epilepsy sample set includes: determining the predicted seizure result corresponding to each source EEG signal based on the source epilepsy sample set and the untrained second seizure prediction model; determining a second classification loss based on the predicted seizure result and the epilepsy seizure label of the corresponding source EEG signal; performing backpropagation and gradient update on the weight parameters of the untrained second seizure prediction model based on the second classification loss; and obtaining the third seizure prediction model until the second classification loss converges or the pre-training rounds reach the upper limit of the pre-training rounds.

[0088] In another optional embodiment, the step of pre-training the untrained second seizure prediction model to obtain the third seizure prediction model based on the source epilepsy sample set includes: defining two source EEG signals with the same seizure label in the source epilepsy sample set as positive sample pairs, and defining two source EEG signals with different seizure labels as negative sample pairs; determining the EEG-level representation and predicted seizure result corresponding to each source EEG signal based on the source epilepsy sample set and the untrained second seizure prediction model; and using a contrastive learning mechanism, iteratively training the second seizure prediction model to obtain the third seizure prediction model based on each of the EEG-level representations, each of the predicted seizure results, and each of the seizure labels.

[0089] Specifically, the positive sample pairs represent the semantic consistency of the two source EEG signals, and the negative sample pairs represent the semantic differences between the two source EEG signals; the second seizure prediction model includes a graph encoder and a graph classifier, and the output of the graph encoder is the EEG-level representation of each signal.

[0090] The positive and negative sample pairs defined in this embodiment ensure that the pre-training process is not affected by the inherent physiological baseline drift between source epilepsy samples. It focuses on modeling the physiological consistency across epilepsy samples, learns the shared embedding features across epilepsy samples rather than the inherent personalized embedding features of the source epilepsy samples themselves, and provides a higher quality weight parameter basis for subsequent specific fine-tuning training for small samples.

[0091] Specifically, the objective of the contrastive learning mechanism is to minimize the distance between positive sample pairs in the embedding space and maximize the distance between negative sample pairs in the embedding space. Based on the respective EEG-level representations, the similarity between the source EEG signals in pairwise combinations is determined; based on the respective similarities and positive / negative sample pair labels, a contrastive loss is determined, and based on the respective predicted seizure results and respective epileptic seizure labels, a second classification loss is determined; the contrastive loss and the second classification loss are weighted and summed to obtain a pre-training loss; backpropagation and gradient updates are performed on the weight parameters of the second seizure prediction model based on the pre-training loss; this process continues until the pre-training loss converges or the pre-training epochs reach the upper limit, resulting in a third seizure prediction model.

[0092] For example, the similarity can be measured by parameters such as cosine similarity, Euclidean distance, Manhattan distance, or Pearson correlation coefficient; the contrast loss function corresponding to the contrast loss can be the Equalized Supervised Contrastive Loss (EL) function, and the classification loss function corresponding to the second classification loss can be the cross-entropy loss function or the Focal loss function, etc., but is not limited to the examples given above.

[0093] In one optional embodiment, the graph encoder includes a graph convolutional network and a global pooling layer. Exemplarily, the graph convolutional network satisfies the following formula: in, For an augmented adjacency matrix of an undirected graph, , Represents the identity matrix. Represents the augmented adjacency matrix of an undirected graph The corresponding degree matrix, Indicates the first The output feature matrix of each graph convolutional layer Indicates the first The output feature matrix of each graph convolutional layer , Indicates the first The learnable weight parameter matrix of a graph convolutional layer This represents a non-linear activation function.

[0094] In an optional embodiment, the global pooling layer includes an average pooling module and / or a max pooling module, wherein the average pooling module is used to perform average pooling on the graph embedding features output by the graph convolutional network, and the max pooling module is used to perform max pooling on the graph embedding features output by the graph convolutional network.

[0095] In one specific embodiment, when the global pooling layer includes an average pooling module and a max pooling module, the global pooling layer further includes a splicing module for splicing the output of the average pooling module with the output of the max pooling module.

[0096] For example, the first EEG-level representations corresponding to each EEG time window It can be represented as: The output result of the graph encoder , This indicates the total number of source EEG signals in the source epilepsy sample set.

[0097] Taking cosine similarity as an example, the first EEG-level representations and the EEG-level representations The corresponding similarity satisfies the following formula: For example, the contrast loss Satisfy the following formula: ; in, Indicates the relationship with the first Individual EEG signals belong to the same category label. The number of source EEG signals, Indicates an indicator function, This represents the temperature parameter.

[0098] Taking the cross-entropy loss function as an example, the second classification loss satisfies the following formula: in, This indicates the predicted outcome of the seizure, which is the [number]th [number]. The epileptic seizure period corresponding to each source EEG signal is the predicted probability value of the pre-seizure phase.

[0099] For example, pre-training loss ,in, This represents the weighting coefficient.

[0100] Seizure prediction exhibits significant specificity, with substantial differences in seizure focus location, pathological mechanisms, brain network topology, medication use, and signal manifestations among different epilepsy samples. Traditional pre-trained models using supervised learning mechanisms may learn noise or data acquisition biases specific to the source epilepsy samples, resulting in insufficient mining of transferable features. This embodiment employs a contrastive learning mechanism for model pre-training, enabling the model to learn more discriminative and transferable shared embedding features across samples, providing a higher-quality foundation of weight parameters for subsequent specific fine-tuning training for smaller samples.

[0101] S220. Based on the third seizure prediction model, initialize the first seizure prediction model corresponding to the target epilepsy sample.

[0102] In an optional embodiment, initializing the first seizure prediction model corresponding to the target epilepsy sample according to the third seizure prediction model includes: determining the third seizure prediction model as the first seizure prediction model matching the target epilepsy sample.

[0103] In another optional embodiment, the step of initializing the first seizure prediction model corresponding to the target epilepsy sample according to the third seizure prediction model includes: transferring the weight parameters of the graph encoder in the third seizure prediction model to the graph encoder of the first seizure prediction model corresponding to the target epilepsy sample.

[0104] For example, the weight coefficients of the graph encoder in the first seizure prediction model ,in, This represents the weight parameters of the graph encoder in the third seizure prediction model.

[0105] Specifically, the network architecture of the graph classifier in the first seizure prediction model and the graph classifier in the third seizure prediction model can be the same or different.

[0106] S230. Acquire multiple training EEG signals from the target epilepsy sample.

[0107] Specifically, the acquisition methods of the training EEG signals are the same as or similar to the acquisition methods of the source EEG signals, and will not be repeated here.

[0108] S240. Extract the associated features from any two channels of EEG signals in each training EEG signal to construct the first adjacency matrix corresponding to the training EEG signal.

[0109] S250. With the weight parameters of the first seizure prediction model fixed, the initial structural perturbation is added to each first adjacency matrix to obtain multiple perturbation adjacency matrices, and the structural perturbation is iteratively updated according to each perturbation adjacency matrix and the first seizure prediction model to obtain the target structural perturbation.

[0110] S260. The target structure perturbation is added to each first adjacency matrix to obtain multiple target adjacency matrices. Based on each target adjacency matrix, the weight parameters of the first seizure prediction model are iteratively optimized to obtain the trained target seizure prediction model.

[0111] S270. Extract the associated features from any two channels of the EEG signal in the target epilepsy sample and construct a second adjacency matrix.

[0112] S280. Using the target seizure prediction model, the epileptic seizure result corresponding to the target epilepsy sample is determined based on the second adjacency matrix.

[0113] S230-S280 in this embodiment are the same as those in the above embodiment. Figure 1 The S110-S160 shown are the same or similar, and will not be described again in this embodiment.

[0114] In real-world medical scenarios, due to the limited number of samples for a particular type of epilepsy, and the characteristics of seizures such as low frequency, sudden onset, and significant individual differences, deep learning models are prone to problems such as insufficient training samples, overfitting, and decreased generalization ability. Therefore, they often require a long period of data accumulation to achieve stable predictive performance, which limits the timeliness of their deployment.

[0115] Traditional predictive modeling methods often use sample augmentation to overcome the problem of insufficient training samples. However, sample augmentation has limited ability to expand the number of samples and is prone to introducing artificial noise, which can lead to distortion of EEG signals and reduce the recognition accuracy of the seizure prediction model.

[0116] The technical solution of this embodiment obtains a third seizure prediction model by pre-training an untrained second seizure prediction model based on the source epilepsy sample set, and initializes the first seizure prediction model corresponding to the target epilepsy sample based on the third seizure prediction model. This solves the problem of insufficient training data for the target epilepsy sample, avoids the above-mentioned technical defects introduced by sample augmentation, alleviates the dependence of the prediction modeling process on large-scale labeled data of the target epilepsy sample, improves the adaptability of the prediction modeling process to small sample, low frequency, and high individual difference scenarios, and broadens the application scenarios of the prediction modeling process.

[0117] Based on the above embodiments, optionally, the method further includes: statistically analyzing multiple epileptic seizure results of the target epilepsy sample within a historical time series; triggering an epileptic seizure alarm operation when the number of epileptic seizure results indicating the pre-seizure phase reaches a preset threshold; and suspending the statistical process of epileptic seizure results during the refractory period after the alarm operation is triggered.

[0118] In this embodiment, the historical time series covers multiple EEG time windows, and the preset number threshold is less than the number of windows within the historical time series. For example, when the epileptic seizure result is a binary label, the label indicating the pre-seizure phase can be "1". When the epileptic seizure result is a binary probability, the predicted probability value indicating the pre-seizure phase is a predicted probability value exceeding a preset probability threshold or a predicted probability value exceeding a target probability threshold, where the target probability threshold is obtained through filtering a validation signal set.

[0119] For example, the alarm operation for an epileptic seizure may be to send an alarm signal to the monitoring system, send a vibration alert to the wearable device, or activate the emergency response interface, but is not limited to the examples given above.

[0120] Specifically, the refractory period represents the inhibition period that the system enters after an epileptic seizure alarm. Its duration can be set according to the statistical distribution of false alarm aggregation intervals in clinical validation, with a typical value of 30 seconds to 5 minutes. The refractory period is counted from the time the alarm operation is triggered, during which all newly generated epileptic seizure results are discarded and not included in subsequent statistics.

[0121] In another optional embodiment, the epileptic seizure result is a predicted probability value of the pre-seizure phase. The method further includes: determining a predicted probability set based on the validation signal set corresponding to the target epileptic sample and the target seizure prediction model; traversing the candidate probability thresholds in the candidate threshold list, and determining the classification performance index corresponding to the candidate probability threshold based on the traversed candidate probability thresholds, the predicted probability set, and the true label set; after the traversal is completed, selecting a target probability threshold from the candidate threshold list based on each of the classification performance indices; and triggering an epileptic seizure alarm operation based on the epileptic seizure result and the target probability threshold.

[0122] The predicted probability set contains predicted probability values ​​that correspond one-to-one with the EEG signals in the verification signal set. For example, the search range corresponding to the candidate threshold list can be [0.05, 0.95], and the search step size is 0.01.

[0123] In one alternative embodiment, the classification performance metrics include at least one of sensitivity, false positive rate, and Youden index.

[0124] In one specific embodiment, the selection criterion for the target probability threshold is maximizing the Youden exponent. Specifically, the Youden exponent is defined as the sum of sensitivity and specificity minus 1, and the candidate probability threshold corresponding to the largest Youden exponent is determined as the target probability threshold.

[0125] In another specific embodiment, the screening condition for the target probability threshold is to balance sensitivity and false alarm burden. Specifically, a set of candidate thresholds with a false alarm rate of less than or equal to 1.0 times / hour is selected from the candidate threshold list, and the candidate probability threshold with the highest sensitivity in the candidate threshold set is determined as the target probability threshold. The false alarm rate per hour is equal to the product of the false positive rate and the number of EEG time windows covered in one hour.

[0126] The above screening criteria aim to improve the ability to identify real epileptic seizures as much as possible while controlling the frequency of false alarms in daily monitoring, thus meeting the application requirements of long-term continuous EEG monitoring.

[0127] In an optional embodiment, the step of triggering an alarm operation for epileptic seizures based on the epileptic seizure result and the target probability threshold includes: performing a sliding smoothing process on the epileptic seizure result, and triggering an alarm operation for epileptic seizures if the predicted probability value after smoothing exceeds the target probability threshold.

[0128] Figure 4 This is a flowchart illustrating a specific example of a structural perturbation-based epileptic seizure prediction method provided in one embodiment of this disclosure. The dashed first layer represents the model pre-training process, in which EEG data is collected from multiple source epilepsy samples. The collected continuous EEG signals are then standardized, preprocessed, feature matrix constructed, and adjacency matrix transformed before being input into the graph encoder of the second seizure prediction model. The graph encoder outputs P1-P... m This indicates the EEG-level representation corresponding to the source EEG signal labeled as the interictal period in epileptic seizures, I1-I n The EEG-level representations corresponding to the source EEG signals in the preic seizure phase are labeled as epileptic seizures. The similarity of the EEG-level representations in pairs is calculated, and contrastive learning training is performed to obtain the contrastive loss. At the same time, all EEG-level representations are input into a graph classifier for supervised learning to obtain the second classification loss. The second seizure prediction model is pre-trained based on the contrastive loss and the second classification loss to obtain the third seizure prediction model.

[0129] The dashed middle layer represents the model fine-tuning training process. EEG data is collected from the target epilepsy sample, and the collected continuous EEG signals are preprocessed by standardization, feature matrix construction, adjacency matrix transformation, and structural perturbation before being input into the graph encoder of the first seizure prediction model. The weight parameters of the graph encoder in the first seizure prediction model are transferred from the third seizure prediction model. The EEG-level representations output by the graph encoder are input into the graph classifier. The first classification loss is determined through supervised learning, and the first seizure prediction model is fine-tuned and adversarially trained based on the first classification loss to obtain the target seizure prediction model.

[0130] The last layer, represented by the dashed line, depicts the model's inference and prediction process. EEG data is collected from the target epilepsy sample, and the collected continuous EEG signals undergo standardization preprocessing, feature matrix construction, and adjacency matrix transformation. This data is then input into the target seizure prediction model, passing through a graph encoder and graph classifier to output the epileptic seizure result. Time-series curves before and after sliding smoothing are plotted, with the horizontal axis representing the time before the onset of the seizure and the vertical axis representing the probability value in the pre-seizure phase. The blue curve represents the predicted probability value output by the target seizure prediction model, the red curve represents the predicted probability value after sliding smoothing, and the gray dashed line represents the target probability threshold. Figure 4 As shown, the target probability threshold is 0.6. Single-point threshold determination is performed on the probability values ​​in the time series curve. The alarm point indicated by the red dashed arrow is the moment when the red curve first exceeds the target probability threshold.

[0131] In another optional embodiment, the step of triggering an alarm operation for epileptic seizures based on the epileptic seizure results and the target probability threshold includes: performing sliding smoothing and statistical processing on multiple epileptic seizure results of the target epileptic sample in a historical time series; triggering an alarm operation for epileptic seizures when the number of predicted probability values ​​exceeding the target probability threshold reaches a preset number threshold; and suspending the statistical process of epileptic seizure results during the refractory period after the alarm operation is triggered.

[0132] This embodiment reduces false alarms caused by transient noise by setting a preset quantity threshold, and effectively suppresses short-term high-frequency false alarms by setting a refractory period, thereby improving the robustness of epileptic seizure alarms.

[0133] To verify the effectiveness and practicality of this disclosure in predicting epileptic seizures, its feasibility has been demonstrated through experiments using publicly available electroencephalogram (EEG) datasets, and compared with existing prediction models. Experimental results show that the target seizure prediction model trained according to this disclosure can effectively and accurately identify the pre-seizure stage of epilepsy, and possesses good predictive performance and application potential.

[0134] Example 1 This embodiment uses the CHB-MIT and Siena datasets. The CHB-MIT dataset contains transscalp EEG recordings of 22 epilepsy cases, involving 198 seizure events, with a sampling frequency of 256 Hz, primarily using bipolar leads. To ensure consistency of input dimensions among different epilepsy cases, 18 bipolar lead channels common to all epilepsy cases were retained for modeling in the comparative experiment. The Siena dataset contains transscalp EEG recordings of 14 epilepsy cases, involving 47 seizure events, with a total duration of approximately 128 hours, a sampling frequency of 512 Hz, and using unipolar leads. To ensure consistency of input dimensions among different epilepsy cases, 14 lead channels common to all epilepsy cases were selected for modeling in the comparative experiment.

[0135] The EEG segment 15 minutes before the onset of a seizure is defined as the pre-seizure period, and the EEG segment far from the seizure event is defined as the interictal period. If the time interval between two adjacent seizure events is less than 30 minutes, they are combined and regarded as the same seizure event.

[0136] The CLEP-STS-Net and ST-DECNet models were selected as comparison models. The CLEP-STS-Net model is a spatiotemporal contrast network designed for short-term EEG segmentation in epilepsy. It extracts multi-scale features of EEG by relying on channel local feature aggregation and temporal sliding modeling. The ST-DECNet model is a spatiotemporal graph convolutional network built by mining the spatial electrode correlation and temporal evolution features of EEG signals.

[0137] To comprehensively evaluate the performance of the Contrastive Learning and Adversarial Training for Graph Convolutional Networks (CL-ATGCN) disclosed in this publication on the epileptic seizure prediction task, ablation experiments were added to validate the comparative experiments. To ensure the fairness of the comparative experiments, all baseline methods were implemented and evaluated on the same dataset and experimental environment.

[0138] Table 1 below summarizes the results of a comparative experiment and an ablation experiment provided in Example 1 of this disclosure.

[0139] Table 1 Here, "without CL" represents the CL-ATGCN model without contrastive learning, and "without AT" represents the CL-ATGCN model without structural adversarial training. All ablation variants maintain the same hyperparameters. AUC (Area Under Curve) represents the model's combined discriminative power (true positive rate vs. false positive rate) at different thresholds, used to measure the model's ability to differentiate the overall pre-ictal state and its sensitivity. The percentage of epileptic seizure events correctly predicted by the model is used to assess the model's ability to identify pre-seizure events. The false alarm rate (FPR / h) per hour represents the average frequency of false alarms triggered by the model during non-pre-seizure periods, and is used to quantify the interference load caused by the model during deployment.

[0140] As shown in Table 1, the CL-ATGCN model proposed in this disclosure achieves the best AUC (0.932 / 0.926) on both the CHB-MIT and Siena datasets, demonstrating the clear experimental feasibility of this disclosure. Furthermore, ablation experiments verify the necessity of co-modeling using contrastive learning mechanisms and structural adversarial training; removing either training strategy leads to a decrease in both AUC and sensitivity. The decline.

[0141] Through comparative experiments, within acceptable sensitivity... Within the range of the hourly false positive rate (FPR / h), the CL-ATGCN model proposed in this disclosure maximizes classification performance.

[0142] The following are embodiments of the epileptic seizure prediction device based on structural perturbation provided in this disclosure. This device and the epileptic seizure prediction method based on structural perturbation in the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the epileptic seizure prediction device based on structural perturbation, please refer to the content of the epileptic seizure prediction method based on structural perturbation in the above embodiments.

[0143] Figure 5 This is a schematic diagram of a seizure prediction device based on structural perturbation, provided as an embodiment of this disclosure. Figure 5 As shown, the device includes: a training EEG signal acquisition module 310, a first adjacency matrix construction module 320, a target structure perturbation determination module 330, a target seizure prediction model training module 340, a second adjacency matrix construction module 350, and a seizure result determination module 360.

[0144] Among them, the training EEG signal acquisition module 310 is used to acquire multiple training EEG signals corresponding to the target epilepsy sample; The first adjacency matrix construction module 320 is used to extract the correlation features of any two channels of EEG signals in each training EEG signal and construct the first adjacency matrix corresponding to the training EEG signal. The target structural perturbation determination module 330 is used to add the initial structural perturbation to each first adjacency matrix to obtain multiple perturbation adjacency matrices when the weight parameters of the first onset prediction model are fixed, and to iteratively update the structural perturbation according to each perturbation adjacency matrix and the first onset prediction model to obtain the target structural perturbation. The target seizure prediction model training module 340 is used to add the target structure perturbation to each first adjacency matrix to obtain multiple target adjacency matrices, and to iteratively optimize the weight parameters of the first seizure prediction model according to each target adjacency matrix to obtain the trained target seizure prediction model. The second adjacency matrix construction module 350 is used to extract the correlation features of any two channels of EEG signals in the EEG signal to be tested of the target epilepsy sample and construct the second adjacency matrix. The epileptic seizure result determination module 360 ​​is used to determine the epileptic seizure result corresponding to the target epileptic sample based on the second adjacency matrix through the target seizure prediction model. The initial structural perturbation is applied to the graph connection structure defined by the first adjacency matrix to adjust the edge connection state in the graph connection structure. The iterative update objective of the structural perturbation is to maximize the first classification loss of the first seizure prediction model. The iterative optimization objective of the weight parameters includes minimizing the first classification loss of the first seizure prediction model.

[0145] The technical solution of this embodiment extracts associated features from any two channels of EEG signals, constructs undirected adjacency matrices and directed adjacency matrices respectively, transforms the complex physiological evolution characteristics of brain regions into computer-computable digital representations, and learns the dynamic connectivity patterns of brain regions exhibited by the two types of adjacency matrices at different stages of epileptic seizures by combining them with an epileptic seizure prediction model. The result of epileptic seizure is obtained by using undirected adjacency matrices to reflect the synchronicity of abnormal discharge activity in brain regions and directed adjacency matrices to characterize the propagation direction of abnormal discharge activity in brain regions. It comprehensively reflects the dynamic connectivity characteristics of the brain network from the two dimensions of synchronicity and directed information flow in brain regions, solves the problem of insufficient feature mining of different stages of epileptic seizures by traditional prediction methods, improves the ability to distinguish between interictal and preictal periods of epileptic seizures, reduces the false alarm rate of epileptic seizures, and provides a solid and reliable technical foundation for epileptic seizure prediction systems.

[0146] In an optional embodiment, the target structure disturbance determination module 330 is specifically used for: During each iteration update, forward propagation is performed based on the perturbation adjacency matrices and the first attack prediction model to determine the current first classification loss; Based on the current first classification loss, the current gradient data is determined, and based on the current gradient data, the connection edges in the graph connection structure are sorted to obtain a connection edge sequence; The connection edge sequence is filtered according to preset filtering conditions to obtain a candidate connection edge set. Based on the candidate connection edge set, the corresponding matrix elements in each first adjacency matrix are flipped to obtain multiple perturbation adjacency matrices in the next iteration update. Repeat the above iterative update process until the current first classification loss reaches the preset convergence threshold or the number of iterations reaches the maximum number of iterations. Based on the candidate connection edge set obtained from the final iteration, determine the target structure perturbation.

[0147] In an optional embodiment, the perturbation adjacency matrix satisfies the structural constraints of the adjacency matrix, which include at least one of the following: symmetry, asymmetry, binaryity, zero diagonal constraint, and the number of perturbations on the connecting edges not exceeding the perturbation quantity budget.

[0148] In an optional embodiment, the device further includes: The pre-training module is used to pre-train the untrained second-seizure prediction model to obtain the third-seizure prediction model based on the source epilepsy sample set. The first seizure prediction model initialization module is used to initialize the first seizure prediction model corresponding to the target epilepsy sample according to the third seizure prediction model. The source epilepsy sample set includes a source EEG set derived from at least one source epilepsy sample, and the source EEG set includes source EEG signals and epileptic seizure labels that correspond one-to-one with the EEG time window.

[0149] In one alternative embodiment, the pre-training module is specifically used for: Two source EEG signals with the same epileptic seizure label in the source epilepsy sample set are defined as positive sample pairs, and two source EEG signals with different epileptic seizure labels are defined as negative sample pairs. Based on the source epilepsy sample set and the untrained second seizure prediction model, determine the EEG-level representation and predicted seizure outcome corresponding to each source EEG signal; A contrastive learning mechanism is used to iteratively train the second seizure prediction model to obtain a third seizure prediction model based on the EEG-level representations, the predicted seizure results, and the epileptic seizure labels.

[0150] In an optional embodiment, the second seizure prediction model includes a graph encoder and a graph classifier. The graph encoder includes a graph convolutional network and a global pooling layer. The global pooling layer includes an average pooling module and / or a max pooling module. The output of the graph encoder is the EEG-level representation of each of the above.

[0151] In an optional embodiment, the device further includes: The source epilepsy sample set determination module is used to acquire continuous electroencephalogram (EEG) signals corresponding to at least one source epilepsy sample, and to perform standardized preprocessing on each of the continuous EEG signals to obtain the source epilepsy sample set. The standardized preprocessing includes at least one of the following: channel quality detection and interpolation reconstruction, filtering, rereference processing, downsampling, artifact removal, segmentation, noise segment removal, and normalization.

[0152] In an optional embodiment, the device further includes: The first seizure alarm module is used to statistically analyze multiple seizure results of the target epilepsy sample within a historical time series, where the historical time series covers multiple EEG time windows. When the number of pre-seizure seizures reaches a preset threshold, an alarm for seizures is triggered. During the refractory period following the triggering of the alarm operation, the statistical process for epileptic seizure results is suspended.

[0153] In an optional embodiment, the device further includes: The second seizure alarm module is used to determine the prediction probability set based on the verification signal set corresponding to the target epilepsy sample and the target seizure prediction model; The candidate probability thresholds in the candidate threshold list are traversed, and the classification performance index corresponding to the candidate probability threshold is determined based on the traversed candidate probability thresholds, the predicted probability set, and the true label set. After the traversal is completed, the target probability threshold is selected from the candidate threshold list according to each of the classification performance indicators. Based on the epileptic seizure outcome and the target probability threshold, trigger an alarm operation for the epileptic seizure. The classification performance indicators include at least one of sensitivity, false positive rate, and Youden index.

[0154] The epilepsy seizure prediction device based on structural perturbation provided in this disclosure can execute the epilepsy seizure prediction method based on structural perturbation provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0155] Figure 6This is a schematic diagram of an electronic device provided according to one embodiment of the present disclosure. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0156] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor 11. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0157] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information or data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0158] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the structural perturbation-based seizure prediction method provided in the above embodiments.

[0159] In some embodiments, the structural perturbation-based seizure prediction method provided in the above embodiments can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the structural perturbation-based seizure prediction method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the structural perturbation-based seizure prediction method by any other suitable means (e.g., by means of firmware).

[0160] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of embodiments of this disclosure.

[0161] Various embodiments of the systems and techniques described above can be implemented in the following systems or combinations thereof: digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard parts (ASSPs), system-on-chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0162] Computer programs for implementing the structural perturbation-based seizure prediction method of this disclosure can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0163] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable storage medium. Examples of machine-readable storage media include, based on an electrical connection of at least one wire, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0164] To provide interaction with a user, the systems and techniques described herein can be implemented on a terminal device having: a display device for displaying information to the user (e.g., a cathode-ray tube (CRT) or liquid crystal display (LCD) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the terminal device. Other types of devices can also provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including audio input or tactile input).

[0165] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0166] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and Virtual Private Server (VPS) services, such as high management difficulty and weak business scalability.

[0167] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this disclosure can be achieved, and this is not limited herein.

[0168] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for predicting epileptic seizures based on structural perturbations, characterized in that, include: Acquire multiple training EEG signals corresponding to the target epilepsy sample; For any two channels of EEG signals in each training EEG signal, the association feature is extracted to construct the first adjacency matrix corresponding to the training EEG signal; With the weight parameters of the first seizure prediction model fixed, the initial structural perturbation is added to each first adjacency matrix to obtain multiple perturbation adjacency matrices, and the structural perturbation is iteratively updated according to each perturbation adjacency matrix and the first seizure prediction model to obtain the target structural perturbation. The target structure perturbation is added to each first adjacency matrix to obtain multiple target adjacency matrices. Based on each target adjacency matrix, the weight parameters of the first seizure prediction model are iteratively optimized to obtain the trained target seizure prediction model. The association features of any two channels of EEG signals in the target epilepsy sample are extracted to construct a second adjacency matrix. Based on the second adjacency matrix, the epileptic seizure outcome corresponding to the target epilepsy sample is determined using the target seizure prediction model. The initial structural perturbation is applied to the graph connection structure defined by the first adjacency matrix to adjust the edge connection state in the graph connection structure. The iterative update objective of the structural perturbation is to maximize the first classification loss of the first seizure prediction model. The iterative optimization objective of the weight parameters includes minimizing the first classification loss of the first seizure prediction model.

2. The method according to claim 1, characterized in that, The step of iteratively updating the structural perturbation to obtain the target structural perturbation based on each of the perturbation adjacency matrices and the first outbreak prediction model includes: During each iteration update, forward propagation is performed based on the perturbation adjacency matrices and the first attack prediction model to determine the current first classification loss; Based on the current first classification loss, the current gradient data is determined, and based on the current gradient data, the connection edges in the graph connection structure are sorted to obtain a connection edge sequence; The connection edge sequence is filtered according to preset filtering conditions to obtain a candidate connection edge set. Based on the candidate connection edge set, the corresponding matrix elements in each first adjacency matrix are flipped to obtain multiple perturbation adjacency matrices in the next iteration update. Repeat the above iterative update process until the current first classification loss reaches the preset convergence threshold or the number of iterations reaches the maximum number of iterations. Based on the candidate connection edge set obtained from the final iteration, determine the target structure perturbation.

3. The method according to claim 1, characterized in that, The perturbation adjacency matrix satisfies the structural constraints of the adjacency matrix, which include at least one of the following: symmetry, asymmetry, binaryity, zero diagonal constraint, and the number of perturbations on the connecting edges not exceeding the perturbation quantity budget.

4. The method according to claim 1, characterized in that, The method further includes: Based on the source epilepsy sample set, the untrained second seizure prediction model is pre-trained to obtain the third seizure prediction model; Based on the third seizure prediction model, initialize the first seizure prediction model corresponding to the target epilepsy sample; The source epilepsy sample set includes a source EEG set derived from at least one source epilepsy sample, and the source EEG set includes source EEG signals and epileptic seizure labels that correspond one-to-one with the EEG time window.

5. The method according to claim 4, characterized in that, The step of pre-training the untrained second-seizure prediction model to obtain the third-seizure prediction model based on the source epilepsy sample set includes: Two source EEG signals with the same epileptic seizure label in the source epilepsy sample set are defined as positive sample pairs, and two source EEG signals with different epileptic seizure labels are defined as negative sample pairs. Based on the source epilepsy sample set and the untrained second seizure prediction model, determine the EEG-level representation and predicted seizure outcome corresponding to each source EEG signal; A contrastive learning mechanism is used to iteratively train the second seizure prediction model to obtain a third seizure prediction model based on the EEG-level representations, the predicted seizure results, and the epileptic seizure labels.

6. The method according to claim 5, characterized in that, The second seizure prediction model includes a graph encoder and a graph classifier. The graph encoder includes a graph convolutional network and a global pooling layer. The global pooling layer includes an average pooling module and / or a max pooling module. The output of the graph encoder is the EEG-level representation of each of the above.

7. The method according to claim 4, characterized in that, The method further includes: Obtain continuous electroencephalogram (EEG) signals corresponding to at least one source epilepsy sample, and perform standardized preprocessing on each of the continuous EEG signals to obtain a source epilepsy sample set. The standardized preprocessing includes at least one of the following: channel quality detection and interpolation reconstruction, filtering, rereference processing, downsampling, artifact removal, segmentation, noise segment removal, and normalization.

8. The method according to claim 1, characterized in that, The method further includes: Statistical analysis was performed on multiple epileptic seizure results of the target epilepsy sample within a historical time series, the historical time series covering multiple EEG time windows; When the number of pre-seizure seizures reaches a preset threshold, an alarm for seizures is triggered. During the refractory period following the triggering of the alarm operation, the statistical process for epileptic seizure results is suspended.

9. The method according to claim 1, characterized in that, The epileptic seizure outcome is a predicted probability value for the pre-seizure phase, and the method further includes: Based on the validation signal set corresponding to the target epilepsy sample and the target seizure prediction model, a prediction probability set is determined; The candidate probability thresholds in the candidate threshold list are traversed, and the classification performance index corresponding to the candidate probability threshold is determined based on the traversed candidate probability thresholds, the predicted probability set, and the true label set. After the traversal is completed, the target probability threshold is selected from the candidate threshold list according to each of the classification performance indicators. Based on the epileptic seizure outcome and the target probability threshold, trigger an alarm operation for the epileptic seizure. The classification performance indicators include at least one of sensitivity, false positive rate, and Youden index.

10. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, which enables the at least one processor to perform the seizure prediction method based on structural perturbation as described in any one of claims 1-9.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the seizure prediction method based on structural perturbation as described in any one of claims 1-9.

12. A computer program product, characterized in that, The method includes a computer program that, when executed by a processor, implements the method for predicting epileptic seizures based on structural perturbations according to any one of claims 1-9.