Epilepsy data processing method and system based on knowledge graph, and medium

By constructing a knowledge graph-based epilepsy data processing method that integrates clinical medication and flow cytometry data to generate predicted immune risk levels, the method solves the problem of low detection accuracy caused by drug interference in existing technologies and achieves highly accurate epilepsy detection.

CN122314435APending Publication Date: 2026-06-30HUNAN CHILDRENS HOSPITAL +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUNAN CHILDRENS HOSPITAL
Filing Date
2026-03-30
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing methods for detecting epilepsy lack multimodal data fusion based on pharmacological background when faced with complex immune indicators, and cannot eliminate the masking interference of epilepsy drugs on flow cytometry data, resulting in low detection accuracy.

Method used

We construct a knowledge graph-based method for processing epilepsy data. By integrating clinical medication data and flow cytometry feature data through an epilepsy immune heterogeneous knowledge graph, graph attention network, cross-attention mechanism module, and fully connected nonlinear mapping model, we generate a probability prediction of immune risk level and dynamically correct for the effects of drug interference.

Benefits of technology

It enables accurate prediction of patients' immune risk levels, provides highly accurate epilepsy detection reference, solves the detection error caused by drug interference, and improves the accuracy of epilepsy detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122314435A_ABST
    Figure CN122314435A_ABST
Patent Text Reader

Abstract

This invention discloses a knowledge graph-based method, system, and medium for epilepsy data processing, relating to the technical field of epilepsy data processing. The method includes the following steps: acquiring current clinical data, including current medication data and current flow cytometry immunoassay data; using an epilepsy data processing model based on the current clinical data to make predictions and obtain the predicted probability of immune risk level. The knowledge graph-based epilepsy data processing method of this invention utilizes an epilepsy data processing model as an artificial intelligence model to accurately predict the probability of a patient's immune risk level, providing a reference for clinical treatment. This solves the technical problem that existing methods for providing data references for epilepsy detection and identification do not eliminate the masking interference of epilepsy drugs on flow cytometry data, resulting in low accuracy of the provided epilepsy detection reference.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of epilepsy data processing, and in particular, to epilepsy data processing methods, systems, devices, and media based on knowledge graphs. Background Technology

[0002] Epilepsy is a chronic brain disorder (chronic neurological disorder) caused by abnormal and excessive discharge of neurons in the brain, characterized by recurrent seizures. Treatment-resistant epilepsy (DRE) is a specific form of epilepsy, referring to epilepsy that cannot be controlled despite standard drug treatment. Recent studies have shown that imbalances in the homeostasis of the immune system, particularly the functional defects of regulatory T cells (Tregs) and the excessive activation of pro-inflammatory Th17 cells, are key factors driving the pathological process of treatment-resistant epilepsy.

[0003] Currently, the most common reference data for epilepsy detection based on artificial intelligence technology mainly includes two types. One type relies on feature extraction and processing using electroencephalography (EEG) and neuroimaging (MRI). Patent publication number CN115019950A, entitled "Epilepsy Detection Method, System and Device Based on Knowledge Graph and EEG," uses artificial intelligence to assist in epilepsy detection (providing reference data). It integrates the patient's text information and EEG image information to classify the types of epilepsy, achieving more accurate detection of the patient's condition, preventing misdiagnosis, providing a basis for the treatment of epilepsy, and solving the technical problem of poor recognition effect of existing single-modal technology in epilepsy detection.

[0004] However, research has revealed diagnostic blind spots in reliance on EEG and MRI: First, while EEG can capture abnormal discharges and MRI can identify macroscopic structural damage, they struggle to detect microscopic inflammatory storms during the immune latency period before morphological changes occur. For immune-mediated epilepsy, abnormalities are often only detected by traditional imaging after patients have undergone prolonged drug trials and irreversible neuronal damage, leading to missed opportunities for early immune intervention (such as hormone or IVIg therapy). Second, using single biomarker output processing to provide reference data suffers from poor interference resistance. Specifically, although... While peripheral blood Treg cell counts or the Th17 / Treg ratio have been proposed as potential biomarkers, their accuracy in actual clinical applications is easily affected by the patient's current medications. For example, drugs such as rapamycin, as mTOR inhibitors, directly lead to a decrease in p-mTOR levels in Treg cells. If the low p-mTOR level detected by flow cytometry is relied upon (data-driven), it is easy to misjudge that the patient is in an immune homeostasis or low-risk state, ignoring that this is actually a false negative due to drug suppression, thus masking the potential risk of Th17 drift.

[0005] In summary, existing methods for processing and providing reference data for epilepsy lack multimodal data fusion based on pharmacological background. This results in current flow cytometry analysis methods only being able to process biological data, unable to integrate patient clinical course data and medication history data as prior knowledge for fusion processing. When faced with complex immune indicators, qualitative judgments are often made based on experience. There is a lack of intelligent data analysis methods that can quantitatively integrate microscopic cellular metabolic characteristics with macroscopic clinical pharmacological background, automatically correct for drug interference, and eliminate the masking interference of epilepsy drugs on flow cytometry data based on pharmacological background. Consequently, it is difficult to provide accurate reference for epilepsy detection, and the epilepsy detection and identification effect is poor.

[0006] Therefore, it is necessary to provide a knowledge graph-based method, system, device, and medium for epilepsy data processing, aiming to solve the existing technical problems of failing to eliminate the masking interference of epilepsy drugs on streaming data based on pharmacological background, resulting in difficulty in providing accurate reference for epilepsy detection and poor epilepsy detection and identification effects. Summary of the Invention

[0007] The knowledge graph-based epilepsy data processing method, system, and medium provided by this invention aim to solve the technical problem that existing data references for epilepsy detection and identification do not eliminate the masking interference of epilepsy drugs on streaming data, resulting in low accuracy of the provided epilepsy detection references.

[0008] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A knowledge graph-based method for processing epilepsy data includes the following steps: S10, Obtain current clinical data, which includes current medication data and current flow cytometry immunoassay data; S20, Based on current clinical data, an epilepsy data processing model is used to make predictions and obtain epilepsy prediction reference results, including the predicted probability of immune risk level; the process of obtaining the epilepsy data processing model includes: S201. Construct an initial epilepsy data processing model. This model includes an embedded epilepsy immune heterogeneous knowledge graph, a graph attention network, a cross-attention mechanism module, and a fully connected nonlinear mapping model. The epilepsy immune heterogeneous knowledge graph provides the graph attention network with topological structure and node feature inputs. The graph attention network aggregates the path features of knowledge graph nodes related to clinical medication records and generates a background vector. The cross-attention mechanism module fuses the background vector and biometric vectors to generate a fused feature vector. The fully connected nonlinear mapping model maps the fused feature vector to an immune risk level probability. S202, Obtain input data and output labels from the training and testing sets. Input data includes clinical record data, which includes flow cytometry immunoassay data and clinical medication records. Output labels include immune risk level labels. S203: Activate the node paths corresponding to clinical medication record data in the epilepsy immune heterogeneous knowledge graph, aggregate path features through graph attention network to generate background vectors corresponding to clinical medication record data; semantically encode the recorded flow cytometry feature data to generate biofeature vectors. S204, through the cross-attention mechanism module, the biometric vector and the background vector are fused. The background vector is used to compensate or suppress the immune indicators in the biometric vector to generate a fused vector. The three weight matrices of the cross-attention mechanism module are the biometric query weight matrix, the background feature key weight matrix and the background feature value weight matrix. The fused vector is calculated based on the attention weight matrix and the feature fusion coefficient. S205 will input the fusion vector into the fully connected nonlinear mapping model, and after normalization, output the predicted risk level probability in the interval of 0 to 1. S206. The loss value is calculated based on the predicted risk level probability and the immune risk level label. The structural parameters of the initial epilepsy data processing model are jointly updated end-to-end based on the loss value until convergence is obtained. The structural parameters include the graph neural weight parameters of the graph attention network, the three weight matrices of the cross attention mechanism module, the feature fusion coefficients, and the mapping parameters of the fully connected nonlinear mapping model.

[0009] Furthermore, the entity nodes of the epilepsy immune heterogeneity knowledge graph include drug nodes, molecular target nodes, cytokine nodes, immune phenotype nodes, and clinical prognosis nodes. Each entity node is connected by an association edge. The sub-nodes under the immune phenotype node include metabolic remodeling sub-nodes and phenotypic drift sub-nodes. The metabolic remodeling sub-nodes correspond to the quantitative characteristics of the metabolic remodeling index, and the phenotypic drift sub-nodes correspond to the quantitative characteristics of the phenotypic drift index. Each entity node and its corresponding sub-node are associated through a membership relationship. The semantic relationships of the association edge annotations include membership, inhibition, activation, induction, cause, concurrence, and treatment.

[0010] Furthermore, a query vector Q is generated based on the biometric feature vector and the biometric feature query weight matrix; a key vector K is generated based on the background vector and the background feature key weight matrix; and a value vector is generated based on the background vector and the background feature value weight matrix. ; The dot product of the query vector Q and the key vector K is calculated, and after Softmax normalization, the correction correlation matrix of the background vector to the biometric vector is obtained.

[0011] Furthermore, using the formula The fusion vector is calculated, where, Represents the fusion vector. Represents the biological feature vector, Indicates the feature fusion coefficient. The value ranges from 0.1 to 1.0. This represents the corrected correlation matrix.

[0012] Furthermore, during the training of the epilepsy data processing model, flow cytometry-based immunoassay data, including metabolic remodeling index and phenotypic drift index, were recorded.

[0013] Furthermore, the flow cytometry immunoassay data also includes immunoassay data, which includes the proportion of regulatory T cells, the inflammatory factors interleukin-1β and interleukin-6, and the metabolic remodeling index and phenotypic drift index, which are calculated based on the immunoassay data.

[0014] Furthermore, the flow cytometry immunoassay data also included any two of the following: serum TNF-α concentration and interaction data between regulatory T cell proportion and interleukin-1β, interaction data between metabolic remodeling index and interleukin-6, and interaction data between phenotypic drift index and regulatory T cell proportion. The recorded flow cytometry immunoassay data were normalized, spliced, and semantically encoded to obtain biological feature vectors.

[0015] Furthermore, the epilepsy prediction reference results also include the predicted risk level; The predicted risk level is obtained by mapping the predicted immune risk level probability to a preset clinical threshold. If the condition 0 ≤ predicted immune risk level probability < 0.3 is met, the predicted immune risk level is low; if the condition 0.3 ≤ predicted immune risk level probability < 0.7 is met, the predicted immune risk level is medium; if the condition 0.7 ≤ predicted immune risk level probability ≤ 1 is met, the predicted immune risk level is medium to high.

[0016] Furthermore, the process of obtaining immune risk level labels during the training of the epilepsy data processing model includes: A multicenter sample of epilepsy patients was selected, and clinical follow-up outcome indicators for a preset duration were obtained from all epilepsy patient samples. The clinical follow-up outcome indicators included epileptic seizure data, dynamic changes in immune indicators, and treatment effect data. Based on clinical guidelines in the field of epilepsy immunology, clinical follow-up outcome indicators are mapped to three immune risk levels: low, medium, and high. Based on expert experience, the three immune risk levels are reviewed and revised, and immune risk level labels are output.

[0017] This invention also provides a knowledge graph-based epilepsy data processing system. This includes an epilepsy data processing model, which comprises a data acquisition module, a knowledge graph construction module, a feature embedding module, a weight correction and fusion module, and a risk assessment module. The data acquisition module is used to acquire clinical data, including clinical medication data and flow cytometry data with informed consent from the subjects. The knowledge graph construction module is used to store and characterize the association between drugs, targets and immune pathways to construct a heterogeneous knowledge graph of epilepsy immunity. The feature embedding module is used to map clinical drug use data to the heterogeneous knowledge graph of epilepsy immunity and generate a background vector containing pharmacological priors through a graph attention network. The feature embedding module is also used to process flow cytometry feature data to obtain biological feature vectors. The weight correction fusion module is used to calculate the fused feature vector after pharmacological background correction based on the cross attention mechanism, using the biological feature vector as the query vector and the graph embedding vector as the key vector and value vector. The risk assessment module is used to input the fused feature vector into the risk assessment model and output the epilepsy prediction reference result for the subject. The epilepsy prediction reference result includes the probability of immune risk level.

[0018] The present invention also provides a computer-readable storage medium. A computer program is stored on a computer-readable storage medium, and when the computer program is executed by a processor, it implements the steps of the above-described knowledge graph-based epilepsy data processing method.

[0019] The present invention has the following beneficial effects: This invention discloses a knowledge graph-based epilepsy data processing method. It constructs an epilepsy immune heterogeneous knowledge graph containing drug nodes, molecular target nodes, cytokine nodes, immune phenotype nodes, and clinical prognostic nodes and their relationships. A data processing model for epilepsy is built, consisting of a graph attention network, a cross-attention mechanism module, and a fully connected nonlinear mapping model. During model training, training samples containing clinical record data and immune risk level labels are acquired. Background feature vectors related to medication are extracted from the epilepsy immune heterogeneous knowledge graph. Biometric vectors are constructed by combining the extraction, splicing, and feature encoding of immune indicators. The cross-attention mechanism is used to fuse the background feature vectors and biometric vectors. The fusion process balances the influence of medication and immune indicators through an attention weight matrix α and a dynamically adjustable fusion coefficient λ. Finally, the data is processed by a fully connected nonlinear mapping model. The model outputs a predicted risk level probability by connecting a nonlinear mapping model. The model parameters are then iteratively optimized end-to-end through loss value calculation until convergence. Finally, based on the converged epilepsy data processing model, the acquired patient's current clinical data is input, and the predicted immune risk level probability is output. This predicted immune risk level probability can serve as reference data for the patient's immune status and the risk of epileptic seizure recurrence. By integrating clinical data with epilepsy immune-related pharmacological knowledge, the epilepsy data processing model is used as an artificial intelligence model to accurately predict the patient's immune risk level probability, providing a reference for clinical treatment of brain diseases. This solves the technical problem of low accuracy in existing epilepsy detection and identification references due to the failure to eliminate the masking interference of epilepsy drugs on flow cytometry data.

[0020] In addition to the objectives, features, and advantages described above, the present invention has other objectives, features, and advantages. The invention will now be described in further detail with reference to the figures. Attached Figure Description

[0021] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a flowchart illustrating a knowledge graph-based epilepsy data processing method according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the process of obtaining the epilepsy data processing model in the epilepsy data processing method based on knowledge graph of the present invention; Figure 3 This is a schematic diagram illustrating part of the principle of the epilepsy immune heterogeneous knowledge graph in the epilepsy data processing method based on knowledge graph in one embodiment of the present invention. Detailed Implementation

[0022] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0024] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.

[0025] Furthermore, the use of terms such as "first" and "second" in this invention is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. When the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed by this invention.

[0026] This invention provides a knowledge graph-based epilepsy data processing system, including an epilepsy data processing model. The model comprises a data acquisition module, a knowledge graph construction module, a feature embedding module, a weight correction and fusion module, and a risk assessment module. The data acquisition module acquires clinical data, including clinical medication data with informed consent from subjects and flow cytometry data. The knowledge graph construction module stores and characterizes the drug-target-immune pathway relationships to construct an epilepsy immune heterogeneous knowledge graph (EI-KG). The feature embedding module maps the clinical medication data to the epilepsy immune heterogeneous knowledge graph. The graph embedding module generates a graph embedding vector (background vector) containing pharmacological prior background through a graph attention network (GAT). The feature embedding module is also used to process the flow cytometry immunoassay feature data to obtain a biofeature vector. The weight correction fusion module is used to calculate a fused feature vector after pharmacological background correction based on a cross-attention mechanism, using the biofeature vector as the query vector and the graph embedding vector as the key vector and value vector. The risk assessment module is used to input the fused feature vector into a fully connected nonlinear mapping model (risk assessment model) and output the epilepsy prediction reference result for the subject, which includes the probability of immune risk level.

[0027] Understandably, in the solution of the present invention, the data acquisition module acquires initial medical data and then performs data standardization processing to obtain clinical data.

[0028] Understandably, the knowledge graph-based epilepsy data processing system of the present invention, in its specific implementation, includes an epilepsy data processing model. This model comprises a data acquisition module, a knowledge graph construction module, a feature embedding module, a weight correction and fusion module, and a risk assessment module. The data acquisition module is used to acquire clinical data, including clinical medication data with informed consent from subjects and peripheral blood flow cytometry immunoassay data. The flow cytometry immunoassay data includes the metabolic remodeling index (MRI) and phenotypic drift index (PDI) calculated from the p-mTOR and Foxp3 fluorescence intensity of CD4+ Treg cells. The knowledge graph construction module is used to store and characterize the association between drugs, targets, and immune pathways. The system comprises the following modules: a knowledge graph of epilepsy immune heterogeneity; a feature embedding module, which maps clinical medication data to the knowledge graph and generates a background vector containing pharmacological prior information through a graph attention network, which is used to convert the flow cytometry feature data into a biofeature vector; a weight correction fusion module, based on a cross-attention mechanism, uses the biofeature vector as the query vector and the graph embedding vector as the key and value vectors to calculate a fused feature vector after pharmacological background correction; and a risk assessment module, which inputs the fused feature vector into a fully connected nonlinear mapping model and outputs the immune risk level probability of the subject, which includes the predicted risk level probability and may also include the immune risk level of refractory epilepsy.

[0029] The hardware and software components of the knowledge graph-based epilepsy data processing system in this invention mainly include: a data acquisition end with a multi-source streaming data interface supporting connection to a flow cytometry analysis platform; its core components include an FCS parsing engine, adaptive gating processing logic, a structured clinical information input unit, a structured dictionary, and a multi-dimensional feature input unit. The FCS parsing engine can automatically identify and read linear and logarithmic coordinate parameters, fluorescence compensation matrices, and channel metadata in standard FCS format files. The adaptive gating processing logic automatically identifies feature parameters such as CD3+, CD4+, and CD25+ through preset templates, initially delineates the target Treg cell population, and calculates the mean fluorescence intensity (MFI) of p-mTOR in real time. The structured clinical information input unit not only provides a user interface but also includes a pre-configured medical semantic mapping mechanism. The structured dictionary establishes standard coding mappings for antiepileptic drugs (such as carbamazepine, valproic acid, and rapamycin), ensuring that drugs of the same type with different names can be accurately associated with entity nodes in the knowledge graph. The multi-dimensional feature input unit supports long-term input of subject medical history, including pathological information such as seizure frequency, disease stage, medication dosage, and blood drug concentration monitoring values, providing accurate numerical references for subsequent weight correction. The data processing server is used for inference on heterogeneous graph data and parallel computation of multimodal neural networks. The server is equipped with a medium-to-high-performance GPU and a supporting CUDA computing acceleration library, utilizing the GPU... The system employs a multi-core architecture for parallel inference, with hardware-level acceleration for tensor multiplication in multimodal fusion neural networks and neighbor node aggregation operations in graph attention networks, improving inference latency response. A dynamic heterogeneous graph database, built on highly scalable graph engines such as Neo4j or GraphDB, supports a heterogeneous knowledge graph of epilepsy immunity. A memory stores entity nodes containing drugs, targets, cytokines, immune phenotypes, and clinical prognoses, along with the complex semantic relationships between these nodes. A query performance unit supports multi-level skip queries for activating drug-target paths. The software layer's operating mechanism includes a heterogeneous data preprocessing layer to address the highly unstructured relationship between biomarkers and clinical information. A flow cytometry data standardization module receives the raw FCS file from the laboratory flow cytometer, extracts Treg cell populations using an adaptive gating algorithm, and maps the raw MFI (mean fluorescence intensity) to a unified quantization space. The clinical semantic extraction module utilizes Named Entity Recognition (NER) technology to extract patients' medication records (e.g., rapamycin, sodium valproate, etc.) and dosages from electronic medical records. A multimodal synchronizer ensures that the collected streaming indicators are aligned with the medication background on a temporal scale, constructing indicator-drug spatiotemporal association pairs. Secondly, the knowledge graph reasoning layer is responsible for transforming discrete medical common sense into a semantic space that can be processed by deep learning models. It stores a heterogeneous epilepsy immune knowledge graph containing drug-target-immune pathway-disease manifestations. A graph embedding projection engine, employing GraphSage or Transfer algorithms, learns the topological structure of entity nodes and their relationships in the graph, mapping each drug node and its corresponding m-TOR and other signaling pathway association strengths into a 64-dimensional prior background vector. The semantic alignment mechanism engine identifies different drugs with the same pharmacological mechanism and assigns them similar vector weights, ensuring the model's generalization ability across different medication regimens. Thirdly, the multimodal fusion decision layer performs nonlinear calculations of bioindicators for pharmacological background correction, while the cross-attention fusion engine receives biofeedback vectors from the data layer. (Generated by semantic encoding after standardization and splicing of MRI, PDI, etc.) and background vector from the inference layer. The correction logic implementation engine uses biometric vectors. For the query term, calculate its relationship with the background vector. The correlation weight between them, if the background vector The attention layer will automatically reduce the biometric vector as a result of the presence of a potent immunosuppressant. The weights of suppressed indices (such as p-mTOR) are shifted, and the sensitivity weights caused by phenotypic drift are amplified. Risk classification and engine division are performed, and the fused feature vector is obtained. The samples are fed into a multilayer perceptron and trained with labeled clinical samples of epilepsy or refractory epilepsy. The probability distribution of each risk level is calculated using the Softmax function.

[0030] Understandably, in practical implementation, the epilepsy immune heterogeneity knowledge graph transforms antiepileptic drugs, molecular targets, immune cell subsets, and clinical prognosis into computer-processable graph structure data; the data acquisition module acquires macroscopic clinical medication data and microscopic peripheral blood flow cytometry immune characteristic data of the subjects, including the metabolic remodeling index (MRI) calculated from the ratio of p-mTOR and Foxp3 fluorescence intensity of CD4+Treg cells, and the phenotypic drift index (PDI) calculated from the proportion of RORγt positive cells; during feature embedding, the clinical medication data is mapped to the epilepsy immune heterogeneity knowledge graph, and a graph neural network is used to generate a graph embedding vector containing pharmacological prior background. This method enables the calculation of the theoretical interference of the subject's current medication regimen on the immune pathway. It standardizes and concatenates flow cytometry data, then semantically encodes the data to generate biofeedback vectors. During weight correction and fusion, a cross-attention mechanism is used, based on biological feature vectors. For queries, embed vectors into graphs. As keys and values, dynamically calculate and generate fused feature vectors after pharmacological background correction. It can identify the masking effect of drugs on specific biological indicators and automatically adjust the weights. During risk prediction, it uses a fully connected layer and a Softmax classifier to fuse the vectors. The risk level is mapped to the immune risk level of the subject's refractory epilepsy, and the final output includes three risk probabilities: low, medium, and high, for doctors to use as a reference for decision-making.

[0031] Please refer to Figure 1 , Figure 2 and Figure 3 A preferred embodiment of the present invention provides a method for processing epilepsy data based on a knowledge graph, comprising the following steps: S10, acquire current clinical data, including current medication data and current flow cytometry immunoassay data; S20, Based on the current clinical data, an epilepsy data processing model is used to make a prediction, and an epilepsy prediction reference result is obtained. The epilepsy prediction reference result includes the predicted probability of the immune risk level; wherein, the process of obtaining the epilepsy data processing model includes: S201, Construct an initial epilepsy data processing model. This initial model includes an embedded Epilepsy Immunological Heterogeneous Knowledge Graph (EI-KG), a Graph Attention Network (GAT), a cross-attention mechanism module, and a fully connected nonlinear mapping model. The Epilepsy Immunological Heterogeneous Knowledge Graph provides topological structure and node feature inputs to the Graph Attention Network. The Graph Attention Network aggregates knowledge graph node path features related to clinical medication records and generates a background vector. The cross-attention mechanism module fuses the background vector and biometric vector to generate a fused feature vector. The fully connected nonlinear mapping model maps the fused feature vector to an immune risk level probability. S202, Obtain input data and output labels from the training set and the test set. The input data includes clinical record data, which includes recorded flow cytometry immunoassay data and clinical medication record data. The output labels include immune risk level labels. S203, activate the node paths corresponding to the clinical medication record data in the epilepsy immune heterogeneity knowledge graph, and generate a background vector corresponding to the clinical medication record data by aggregating path features through a graph attention network (GAT). Semantic encoding is performed on the recorded stream cytometry immunoassay data to generate biofeedback vectors. The semantic encoding includes mapping streaming immune feature data into semantic level embedding vectors; S204, the biometric vector is fused through the cross-attention mechanism module. With the background vector Using the background vector For the biological feature vector The immune indicators in the data are weighted and compensated or suppressed to generate a fusion vector. The three weight matrices of the cross-attention mechanism module are the biometric query weight matrix. Background feature key weight matrix and background eigenvalue weight matrix The fusion vector is based on the attention weight matrix. and feature fusion coefficient Perform calculations; S205, the fusion vector Input the fully connected nonlinear mapping model, and output the predicted risk level probability in the interval of 0 to 1 after normalization. S206, calculate the loss value based on the predicted risk level probability and the immune risk level label, and perform end-to-end joint iterative update on the structural parameters of the initial epilepsy data processing model based on the loss value until convergence is obtained to obtain the epilepsy data processing model. The structural parameters include the graph neural weight parameters of the graph attention network, the three weight matrices of the cross-attention mechanism module, the feature fusion coefficient λ, and the mapping parameters of the fully connected nonlinear mapping model.

[0032] This invention provides a knowledge graph-based method for epilepsy data processing. It constructs an epilepsy immune heterogeneous knowledge graph containing drug nodes, molecular target nodes, cytokine nodes, immune phenotype nodes, and clinical prognostic nodes and their relationships. A data processing model for epilepsy is built, consisting of a graph attention network, a cross-attention mechanism module, and a fully connected nonlinear mapping model. During model training, training samples containing clinical record data and immune risk level labels are acquired. Background feature vectors related to medication are extracted from the epilepsy immune heterogeneous knowledge graph. Biometric vectors are constructed by combining the extraction, splicing, and feature encoding of immune indicators. The background feature vectors and biometric vectors are fused using a cross-attention mechanism, with the fusion process achieved through an attention weight matrix. The model balances the influence of medication and immune indicators using a dynamically adjustable fusion coefficient λ, and then outputs the predicted risk level probability through a fully connected nonlinear mapping model. The model parameters are then jointly optimized end-to-end through loss value calculation until the model converges. Finally, based on the converged epilepsy data processing model, the current clinical data of the acquired patient is input, and the predicted immune risk level probability is output. This predicted immune risk level probability can serve as reference data for the patient's immune status and the risk of epileptic seizure recurrence. By integrating clinical data with epilepsy immune-related pharmacological knowledge, the epilepsy data processing model is used as an artificial intelligence model to accurately predict the patient's immune risk level probability, providing a reference for clinical treatment. This solves the technical problem of low accuracy in existing epilepsy detection and identification references due to the failure to eliminate the masking interference of epilepsy drugs on flow cytometry data.

[0033] Understandably, in the present invention, medication data (drug entities) are mapped into high-dimensional semantic background vectors through an epilepsy immune heterogeneous knowledge graph, graph attention network, cross-attention mechanism module, and fully connected nonlinear mapping model. The background vectors carry semantic information of the pharmacological mechanism. Flow cytometry immunoassay data is semantically encoded to generate high-dimensional semantic biofeature vectors. These biofeature vectors are used to characterize the semantic expression of the immune state (i.e., converting the raw physical signals detected by flow cytometry into high-dimensional vectors with clinical semantics). The biofeature vectors, after spatial dimension alignment, interact with the background vectors at the semantic level through the cross-attention mechanism module. The feature interaction includes: calculating the correlation weights between the biofeature vectors and the background vectors in the semantic space; compensating or suppressing each semantic component in the biofeature vectors based on the correlation weights to eliminate the masking interference of drugs on immune indicators and generate fused feature vectors.

[0034] In an optional embodiment of the present invention, the biofeature vector is a semantic expression used to characterize the immune status, and its generation method includes: mapping each immune indicator in the recorded flow cytometry immunoassay data to a preset semantic level, wherein the semantic level includes at least three levels: low expression, normal expression, and high expression, or is divided into abnormally low, normal, and abnormally high according to the clinical reference range; mapping each semantic level to a high-dimensional semantic embedding vector through a trainable embedding layer; and concatenating each semantic embedding vector to generate the biofeature vector, wherein the biofeature vector has the same high-dimensional semantic vector dimension as the background vector to achieve spatial dimension alignment.

[0035] Understandably, this solution improves the accuracy and clinical applicability of epilepsy immune risk prediction by integrating clinical semantic information with knowledge graphs and combining it with quantitative analysis of immune indicators. It adapts to individual differences among patients and provides a valuable reference. Understandably, the construction of the knowledge graph incorporates multimodal data structuring techniques.

[0036] Understandably, the entity nodes of the epilepsy immune heterogeneity knowledge graph include drug nodes, molecular target nodes, cytokine nodes, immune phenotype nodes, and clinical prognosis nodes. Each entity node is connected by an association edge. The sub-nodes under the immune phenotype node include metabolic remodeling sub-nodes and phenotypic drift sub-nodes. The metabolic remodeling sub-node corresponds to the quantitative characteristics of the metabolic remodeling index MRI value, and the phenotypic drift sub-node corresponds to the quantitative characteristics of the phenotypic drift index PDI value. Each entity node and its corresponding sub-node are associated through a membership relationship. The semantic relationships annotated by the association edge include membership, inhibition, activation, induction, cause, complication, and treatment.

[0037] Furthermore, based on the biometric vector and the biometric query weight matrix Calculate and generate query vector Q based on the background vector. and the background feature key weight matrix Calculate and generate the key vector K based on the background vector. and the background feature weight matrix Calculate the generated value vector K; perform a dot product between the query vector Q and the key vector K, and after Softmax normalization, obtain the background vector. For the biological feature vector The corrected correlation matrix α is the attention weight matrix in the cross-attention mechanism module. ).

[0038] Furthermore, using the formula The fusion vector is calculated, where, Represents the fusion vector. Represents the biological feature vector, Represents the feature fusion coefficient, The value ranges from 0.1 to 1.0. This represents the corrected correlation matrix. In the solution of this invention, As a feature fusion coefficient, its function is to quantify the influence weight of the background vector in the fusion process, and to balance the biological feature vectors. (High-dimensional semantics of immune indicators / immune state semantics) and background vector The contribution of (pharmacological mechanism semantics) can be dynamically adjusted to 1 if the drug use background and the degree of influence of immune indicators are completely consistent.

[0039] Furthermore, during the training of the epilepsy data processing model, the recorded flow cytometry immunoassay data includes metabolic remodeling index (MRI) and phenotypic drift index (PDI).

[0040] Furthermore, the recorded flow cytometry immunoassay data also includes immunoassay data, which includes the proportion of regulatory T cells (Treg%), the inflammatory cytokine interleukin-1β (IL-1β), and the inflammatory cytokine interleukin-6 (IL-6). The metabolic remodeling index (MRI) and phenotypic drift index (PDI) are calculated based on the immunoassay data.

[0041] Furthermore, the recorded flow cytometry immunoassay data also includes normalized values ​​of serum TNF-α concentration (tumor necrosis factor α) and any two of the following: interaction data between regulatory T cell proportion and interleukin-1β, interaction data between metabolic remodeling index and interleukin-6, and interaction data between phenotypic drift index and regulatory T cell proportion. The biometric vector... The 8-dimensional physical vector is obtained through semantic encoding mapping. In a specific embodiment of the present invention, the background vector is a 64-dimensional semantic vector representing the semantics of the pharmacological mechanism, and the biological feature vector is a 64-dimensional semantic vector representing the semantics of the standard immune status, thereby achieving unified spatial dimension alignment in semantic space expression.

[0042] Understandably, in one specific implementation, the biofeature vector generation process in step S203 includes: acquiring recorded flow cytometry immunoassay data, which includes metabolic remodeling index (MRI), phenotypic drift index (PDI), regulatory T cell percentage (Treg%), interleukin-1β (IL-1β), interleukin-6 (IL-6), and tumor necrosis factor-α (TNF-α); mapping each immunoassay data to a preset semantic level, which includes three levels: low expression, normal expression, and high expression, or is divided into abnormally low, normal, and abnormally high levels according to the clinical reference range; mapping each semantic level to a corresponding semantic embedding vector through a trainable embedding layer; and concatenating the semantic embedding vectors to generate the biofeature vector. Through semantic encoding, flow cytometry immunoassay data and medication data are expressed in a unified semantic space, facilitating weight correction by the cross-attention mechanism at the same semantic level, further improving the model's generalization ability and clinical interpretability.

[0043] Furthermore, the epilepsy prediction reference result also includes a predicted risk level; the predicted risk level is obtained by mapping the predicted immune risk level probability to a preset clinical threshold. If the condition 0 ≤ predicted immune risk level probability < 0.3 is met, the predicted immune risk level is low; if the condition 0.3 ≤ predicted immune risk level probability < 0.7 is met, the predicted immune risk level is medium; if the condition 0.7 ≤ predicted immune risk level probability ≤ 1 is met, the predicted immune risk level is medium to high.

[0044] Furthermore, the sub-nodes of the drug node include antiepileptic drug sub-nodes and immunomodulatory agent sub-nodes, wherein the antiepileptic drug sub-node includes at least one of levetiracetam sub-node and oxcarbazepine sub-node, and the immunomodulatory agent sub-node includes at least one of glucocorticoid sub-node and mycophenolate mofetil sub-node; the sub-nodes of the molecular target node include target of rapamycin (mTOR) sub-node, histone deacetylase (HDAC) sub-node, transforming growth factor-β (TGF-β) sub-node, and related inflammatory factor sub-nodes, wherein the related inflammatory factor sub-nodes include at least one of the targets of inflammatory factors such as IL-1β (interleukin-1β) and IL-6 (interleukin-6); the sub-nodes of the cytokine node include pro-inflammatory factor sub-nodes and anti-inflammatory factor sub-nodes, wherein the pro-inflammatory factor sub-node corresponds to IL-1β. At least one of the pro-inflammatory cytokines such as IL-1β (InterleuKin-1β), IL-6 (InterleuKin-6), and IL-17A (InterleuKin-17A), and the anti-inflammatory factor sub-nodes correspond to anti-inflammatory cytokines such as TGF-β (transforming growth factor-β). The cytokine nodes establish regulatory relationships with molecular target nodes, immunophenotype nodes, and cell type nodes through association edges. The cell type nodes (cell types) include at least one of CD4+Treg (CD4+ regulatory T cells), Th17 cells (T helper T cells 17), and microglia. The clinical prognostic nodes (clinical outcomes) include clinical prognostic indicators for high immune risk, intermediate immune risk, and low immune risk. In one alternative embodiment of the present invention, low risk is characterized by immune indicators remaining in a steady state after pharmacological correction; medium risk is characterized by abnormal MRI and a trend of metabolic imbalance, indicating a risk of breakthrough attack; high risk is characterized by a significantly elevated PDI and, after correction, a breakdown of immune tolerance, suggesting the need for immune intervention.

[0045] Furthermore, the formula for calculating the metabolic remodeling index (MRI) is as follows: in, The mean fluorescence intensity of phosphorylated mammalian target of rapamycin (p-mTOR) in regulatory T cells in the peripheral blood of the subjects. The average fluorescence intensity of forkhead box protein P3 (Foxp3) in the same regulatory T cell population.

[0046] Furthermore, during the training of the epilepsy data processing model, the process for obtaining the immune risk level labels includes: selecting multi-center epilepsy patient samples; obtaining clinical follow-up outcome indicators for all epilepsy patient samples for a preset duration, wherein the clinical follow-up outcome indicators include epileptic seizure data, dynamic changes in immune indicators, and treatment effect data; mapping the clinical follow-up outcome indicators to three immune risk levels (low, medium, and high) according to clinical guidelines in the field of epilepsy immunology; reviewing and correcting the three immune risk levels based on expert experience; and outputting the immune risk level labels. It is understood that in this invention, immune risk level labels in the training and test sets can also be obtained using other existing technologies, as long as the clinical follow-up outcome indicators are cleaned and standardized to obtain the immune risk level labels for the low, medium, and high immune risk levels.

[0047] Furthermore, the formula for calculating the Phenotypic Drift Index (PDI) is as follows: .

[0048] in, The Phenotype Deviation Index, or plasticity index, represents the proportion of abnormal Treg cells exhibiting pro-inflammatory phenotypic shifts among all Treg cells. Simultaneous expression and The total number of cells with the two transcription factors represents the regulatory T cells (Tregs) that originally had an immunosuppressive effect, but which have acquired Th17-like pro-inflammatory characteristics (i.e., a cell population that has undergone changes in cell phenotypic plasticity). : All expressions in the sample The absolute total number of regulatory T cells (Treg cells).

[0049] In one specific embodiment of the present invention, the following steps are included: After obtaining informed consent, samples were collected and processed to obtain flow cytometry immunoassay data from the subjects. Flow cytometry immunoassay data included the metabolic remodeling index (MRI) and phenotypic drift index (PDI). Specifically, sample collection and processing involved drawing 2-4 mL of peripheral venous blood from the subjects; isolating peripheral blood mononuclear cells within 4 hours using density gradient centrifugation; multicolor flow cytometry antibody staining was performed, constructing a 6- or 8-color fluorescent antibody combination scheme to accurately delineate Treg cell subsets. Prior to intracellular staining, cells were treated with a dedicated transcription factor fixation / permeabilization buffer for 45-60 minutes to ensure the structural stability of Foxp3 and p-mTOR proteins and antibody entry; calculations were then performed to obtain… MRI is used to reflect the degree of overactivity of the mTOR pathway relative to Foxp3 stability within Treg cells. The Phenotypic Drift Index (PDI) is used to quantify the actual degree of Treg cell transformation into Th17-like cells. Within the classic Treg phylum of CD3+CD4+CD25+CD127-lowFoxp3+, RORγt expression is further analyzed, and the expression is calculated using the aforementioned formula. ,when At that time, it indicated that there was significant Treg instability and pro-inflammatory transformation tendency in the subjects.

[0050] In the scheme of this invention, the epilepsy immunoheterogeneous knowledge graph is used to generate background vectors corresponding to pharmacological backgrounds, which are ultimately used to correct biological feature vectors. Specifically, the core node types and edge types of the ontology structure of the epilepsy immunoheterogeneous knowledge graph are defined. When defining entity nodes, drug nodes are defined, which include entity nodes corresponding to first-line drugs such as valproic acid (VPA) and carbamazepine (CBZ), entity nodes corresponding to second-line drugs such as lamotrigine (LTG), and entity nodes corresponding to immunomodulators such as ACTH, prednisone, and rapamycin; molecular target nodes are defined, which include drug... Sub-nodes of action sites (such as Nav1.1 channel, GABA-A receptor) and sub-nodes of key molecules in immune signaling pathways (such as mTORC1, HDAC1 / 2, IL-6R, TGF-β); cell phenotype nodes, including sub-nodes of Treg (Foxp3+), Th17 (RORγt+), and Ex-Treg (Foxp3+RORγt+); clinical phenotype nodes, including sub-nodes of drug sensitivity, drug refractory, immune-inflammatory, and metabolic defects. When defining the relationships in the epilepsy immune heterogeneity knowledge graph, pharmacological knowledge is used as a basis for definition. For example, drug action is like a target, such as rituximab acting on CD20; drugs regulate cytokines, such as gamma globulin downregulating IL-6; cytokines induce immune phenotypes, such as IL-6 inducing Th17 cell differentiation; immune phenotype is associated with clinical prognosis, such as increased Treg cells being associated with a good prognosis, such as increased M1 macrophages being associated with increased inflammation; drugs improve clinical prognosis, such as rituximab improving clinical remission.

[0051] In one optional embodiment of the present invention, a background vector is generated based on the GraphSAGE algorithm using an epilepsy immune heterogeneous knowledge graph. Specifically, the current medication list of the subject is input; sampling and aggregation are performed, with the drug node as the center, its first-order neighbors (targets) and second-order neighbors (cellular pathways) are sampled, and its feature information is aggregated; a fixed-length clinical background graph embedding vector (e.g., 64-dimensional) is output. The background vector not only contains drug name information, but also implies pharmacological semantics such as the drug strongly inhibiting mTOR and possibly improving Foxp3 stability.

[0052] After normalizing and semantically encoding MRI, PDI, Treg%, and conventional inflammatory factors (IL-1β, IL-6) to generate biometric vectors, in an optional embodiment of this invention, the construction and training of the multimodal fusion evaluation of the cross-attention mechanism module and the fully connected nonlinear mapping model includes: to achieve the correction of biometric indicators by pharmacological background, a unidirectional cross-attention mechanism is designed for cross-attention fusion: Query(Q) originates from... Key(K) and Value(V) are derived from Calculate the attention weight matrix , In a specific correction logic of the present invention, if a setup is established... The p-mTOR component in the data shows low values ​​with small values, while The rapamycin feature in the data shows that a high Key value indicates strong inhibition. After the dot product of the two, the attention mechanism identifies low values ​​as matching drug background. Therefore, after weighted summation, the fused vector... This will reduce the contribution of low p-mTOR values ​​to the final high-risk assessment and eliminate the masking interference of epilepsy drugs on flow cytometry data. The fused data will then be directed to... The input consists of a two-layer fully connected neural network with ReLU as the activation function and Softmax as the last layer. The output consists of three probability values: low risk indicates steady state, medium risk indicates metabolic remodeling and MRI abnormalities, and high risk indicates phenotypic drift and PDI abnormalities.

[0053] In an optional embodiment of the present invention, model training convergence includes: training using retrospective data of 500 epilepsy patients with known clinical outcomes (2-year follow-up results), using the cross-entropy loss function as the loss function, selecting Adam as the optimizer, and setting the learning rate to 0.001, wherein the background vector uses 64 as the feature vector, and the biological feature vector uses 64 as the feature vector.

[0054] The following is a comparative example of the clinical application of the knowledge graph-based epilepsy data processing method of the present invention for data reference: This embodiment uses clinical data from a patient with complex tuberous sclerosis (TSC) complicated with epilepsy for control testing and validation. The background data of the subject includes: Patient ID: TSC-007, Age / Sex: 12 years old / Male, Current medication: Rapamycin (mTOR inhibitor) + Vigabatrin; Clinical manifestations: The frequency of seizures has increased slightly recently, but the background rhythm of the electroencephalogram (EEG) is still acceptable, and MRI shows no significant increase in nodule size.

[0055] The control group was analyzed using traditional flow cytometry, with the results based solely on flow cytometry data. The results showed: Treg cell percentage: 4.5% (normal range), p-mTOR (MFI): 350 (significantly lower than the normal mean of 1200, indicating low metabolic activity), and Foxp3 (MFI): 800 (normal). Due to the extremely low p-mTOR level, the traditional logistic model determined that the patient's Treg cells were in a state of deep inhibition / rest, with no signs of overactivation, and the output conclusion was low risk.

[0056] The experimental group used the knowledge graph-based epilepsy data processing method of this invention. Biometric feature extraction included: calculating the MRI index (due to p-mTOR suppression, the MRI value was low); calculating the PDI index (detection showed RORγt+ cells accounted for 6.2% – slightly elevated, exceeding the 5% threshold); and knowledge graph-based reasoning to identify rapamycin in the medication list. A graph neural network was used to generate a background vector. This includes semantic features that strongly suppress mTOR molecular targets; multimodal fusion decision-making: discovery of cross-attention modules. Low p-mTOR value and The drug effect was highly consistent with that in the model, which was determined to be a drug effect rather than physiological homeostasis. The model then focused on the small fluctuations in the PDI index (6.2%) and MRI, and identified that the PDI was still elevated in the presence of a potent inhibitor, suggesting that the immune tolerance mechanism was actually collapsing. The output reference conclusion was high risk, suggesting the presence of a hidden cytokine storm.

[0057] Clinical follow-up results: Two months after the assessment, the patient experienced a severe cluster of seizures accompanied by elevated CRP, confirming that the predictive accuracy of the system of this invention is superior to that of traditional methods and can penetrate drug interference to detect potential risks.

[0058] The present invention also provides an electronic device, including a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the above-described knowledge graph-based epilepsy data processing method.

[0059] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the knowledge graph-based epilepsy data processing method described above.

[0060] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A knowledge graph-based epilepsy data processing method, characterized in that, Including the following steps: S10, acquire current clinical data, including current medication data and current flow cytometry immunoassay data; S20, Based on the current clinical data, an epilepsy data processing model is used to make a prediction, and an epilepsy prediction reference result is obtained. The epilepsy prediction reference result includes the predicted probability of the immune risk level; wherein, the process of obtaining the epilepsy data processing model includes: An initial epilepsy data processing model is constructed, comprising an embedded epilepsy immune heterogeneous knowledge graph, a graph attention network, a cross-attention mechanism module, and a fully connected nonlinear mapping model. The epilepsy immune heterogeneous knowledge graph provides topological structure and node feature inputs to the graph attention network. The graph attention network aggregates knowledge graph node path features related to clinical medication records and generates a background vector. The cross-attention mechanism module fuses the background vector and biometric vector to generate a fused feature vector. The fully connected nonlinear mapping model maps the fused feature vector to an immune risk level probability. Obtain input data and output labels from the training set and the test set. The input data includes clinical record data, which includes recorded flow cytometry immunoassay data and clinical medication record data. The output labels include immune risk level labels. In the epilepsy immune heterogeneous knowledge graph, the node paths corresponding to the clinical medication record data are activated, and the path features are aggregated through a graph attention network to generate a background vector corresponding to the clinical medication record data; the recorded flow cytometry feature data is semantically encoded to generate a biofeature vector. The cross-attention mechanism module fuses the biometric vector and the background vector, and uses the background vector to compensate or suppress the immune indicators in the biometric vector to generate a fusion vector. The three weight matrices of the cross-attention mechanism module are the biometric query weight matrix, the background feature key weight matrix, and the background feature value weight matrix. The fusion vector is calculated based on the attention weight matrix and the feature fusion coefficient. The fusion vector is input into the fully connected nonlinear mapping model, and the predicted risk level probability in the interval of 0 to 1 is output. The loss value is calculated based on the predicted risk level probability and the immune risk level label. The structural parameters of the initial epilepsy data processing model are then jointly updated end-to-end based on the loss value until convergence is obtained. The structural parameters include the graph neural weight parameters of the graph attention network, the three weight matrices of the cross-attention mechanism module, the feature fusion coefficients, and the mapping parameters of the fully connected nonlinear mapping model.

2. The epilepsy data processing method based on knowledge graphs according to claim 1, characterized in that, The entity nodes of the epilepsy immune heterogeneity knowledge graph include drug nodes, molecular target nodes, cytokine nodes, immune phenotype nodes, and clinical prognosis nodes. Each entity node is connected by an association edge. The child nodes under the immune phenotype nodes include metabolic remodeling child nodes and phenotypic drift child nodes. The metabolic remodeling child nodes correspond to the quantitative characteristics of the metabolic remodeling index, and the phenotypic drift child nodes correspond to the quantitative characteristics of the phenotypic drift index. Each entity node and its corresponding child node are associated through a membership relationship. The semantic relationships of the association edge annotations include membership, inhibition, activation, induction, cause, concurrence, and treatment.

3. The epilepsy data processing method based on knowledge graphs according to claim 1, characterized in that, A query vector is generated based on the biometric vector and the biometric query weight matrix; a key vector is generated based on the background vector and the background feature key weight matrix; and a value vector is generated based on the background vector and the background feature value weight matrix. The dot product of the query vector and the key vector is calculated, and after normalization, the correction correlation matrix of the background vector to the biometric vector is obtained.

4. The epilepsy data processing method based on knowledge graphs according to claim 3, characterized in that, The fusion vector is calculated by using the formula wherein, denotes the fusion vector, denotes the biometric feature vector, denotes the feature fusion coefficient, has a value range of 0.1 to 1.0, denotes the correction correlation matrix.

5. The epilepsy data processing method based on knowledge graphs according to any one of claims 1 to 4, characterized in that, During the training of the epilepsy data processing model, the recorded flow cytometry immune feature data includes metabolic remodeling index and phenotypic drift index.

6. The epilepsy data processing method based on knowledge graphs according to claim 5, characterized in that, The recorded flow cytometry immunoassay data also includes immunoassay data, which includes the proportion of regulatory T cells, the inflammatory cytokine interleukin-1β, and the inflammatory cytokine interleukin-6. The metabolic remodeling index and the phenotypic drift index are calculated based on the immunoassay data.

7. The epilepsy data processing method based on knowledge graphs according to claim 6, characterized in that, The recorded flow cytometry immunoassay data also includes any two of the following: serum TNF-α concentration and interaction data between regulatory T cell proportion and interleukin-1β, interaction data between metabolic remodeling index and interleukin-6, and interaction data between phenotypic drift index and regulatory T cell proportion. The recorded flow cytometry immune feature data is normalized, spliced, and semantically encoded to obtain the biofeature vector.

8. The epilepsy data processing method based on knowledge graphs according to claim 5, characterized in that, During the training of the epilepsy data processing model, the process for obtaining the immune risk level label includes: A multicenter sample of epilepsy patients was selected, and clinical follow-up outcome indicators for a preset duration were obtained from all the epilepsy patient samples. The clinical follow-up outcome indicators included epileptic seizure data, dynamic changes in immune indicators, and treatment effect data. Based on clinical guidelines in the field of epilepsy immunology, the aforementioned clinical follow-up outcome indicators are mapped to three immune risk levels: low, medium, and high. Based on expert experience, the three immune risk levels are reviewed and revised, and the immune risk level labels are output.

9. A knowledge graph-based epilepsy data processing system, characterized in that, This includes an epilepsy data processing model, which comprises a data acquisition module, a knowledge graph construction module, a feature embedding module, a weight correction and fusion module, and a risk assessment module. The data acquisition module is used to acquire clinical data, which includes clinical medication data and flow cytometry data with informed consent from the subjects. The knowledge graph construction module is used to store and characterize the association between drugs, targets, and immune pathways to construct an epilepsy immune heterogeneous knowledge graph. The feature embedding module is used to map the clinical drug use data to the epilepsy immune heterogeneous knowledge graph and generate a background vector containing pharmacological priors through a graph attention network. The feature embedding module is also used to process the flow cytometry feature data to obtain a biological feature vector. The weight correction fusion module is used to calculate the fusion feature vector after pharmacological background correction based on the cross attention mechanism, using the biological feature vector as the query vector and the graph embedding vector as the key vector and value vector. The risk assessment module is used to input the fused feature vector into the risk assessment model and output the epilepsy prediction reference result predicted by the subject, which includes the probability of immune risk level.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the knowledge graph-based epilepsy data processing method as described in any one of claims 1 to 8.