A preoperative multiple comorbidity risk prediction method and system based on structured clinical data

By organizing complication risk factors into a knowledge graph during perioperative complication risk prediction and combining Node2Vec and graph neural networks, the problem of lack of medical mechanisms in existing models is solved, achieving risk prediction with high interpretability and cross-domain consistency, thus improving the trust and effectiveness of clinical applications.

CN120998507BActive Publication Date: 2026-04-10QINGDAO UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-08
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing data-driven prediction models lack medical mechanism constraints in predicting perioperative complication risks, causing them to fail in environments with distribution drift or sudden reduction in sample size. Furthermore, their black-box outputs are difficult to interpret, reducing clinical trust and implementation rate.

Method used

We employ a structured clinical data-based approach, which organizes known risk factors for postoperative complications and inputs them into a knowledge graph. By combining Node2Vec and graph neural networks, we integrate medical mechanisms for risk prediction, including deep fusion of knowledge graph embedding, gradient boosting tree model, and multi-relationship graph convolutional network.

Benefits of technology

It improves the interpretability and cross-domain consistency of the model, maintains stable and calibrated performance in specialty environments, enhances physicians' trust in the model output, and provides a stratified basis for clinical intervention strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120998507B_ABST
    Figure CN120998507B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of medical data processing, and discloses a preoperative multiple complication risk prediction method and system based on structured clinical data, which comprises the following steps: recording the causal association between risk factors and complication nodes as the edge of a knowledge graph, calculating the statistical correlation between each complication and supplementing it to the knowledge graph, carrying out network embedding training on the knowledge graph to form a first-stage model, preliminarily evaluating the risk of the complications, modeling the knowledge graph in the form of a graph neural network, and jointly training the first-stage model to form a second-stage model to output the final complication probability. The application can improve the interpretability and cross-domain consistency of the model through the deep fusion of a medical knowledge graph and a multi-relation graph convolution network, maintain stable and calibrated performance in a specialty with a scarce sample size, avoid the problem that a traditional black-box model cannot be explained, and quantify the yield increase of the model compared with the traditional strategy, thereby facilitating the evaluation of the actual application value.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of medical data processing, and particularly relates to a preoperative multiple complication risk prediction method and system based on structured clinical data. BACKGROUND

[0002] Perioperative complications not only directly lead to a significant increase in patient mortality, but also often lead to return to the ICU, prolonged hospital stay, and expensive additional resource consumption, so accurate identification of high-risk patients has always been a core problem in surgical anesthesia and perioperative medicine. However, the data-driven prediction model popular in the past decade (such as deep learning network based on electronic medical records) relies on large-scale samples to obtain a high AUC, but its internal reasoning process often lacks medical mechanism constraints - the feature interaction captured by the model may only be statistically related, and cannot guarantee effectiveness in a distribution drift or sample size reduction environment; at the same time, the black box output also makes it difficult to explain to clinicians "why this patient is determined to be high risk", which limits the clinical trust and landing rate of the model.

[0003] Therefore, how to provide a preoperative multiple complication risk prediction method and system based on structured clinical data is a problem to be solved at present. SUMMARY

[0004] The embodiment of the present application provides a preoperative multiple complication risk prediction method and system based on structured clinical data to solve the problems in the prior art.

[0005] To have a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This part is not a general review, nor is it intended to determine the key / important elements or delineate the scope of protection of these embodiments. Its only purpose is to present some concepts in a simple form as a prelude to the detailed description that follows.

[0006] According to a first aspect of the embodiment of the present application, a preoperative multiple complication risk prediction method based on structured clinical data is provided.

[0007] In one embodiment, the preoperative multiple complication risk prediction method based on structured clinical data comprises:

[0008] Based on authoritative guidelines and literature, known risk factors of postoperative complications are sorted out, the causal relationship between the risk factors and the complication nodes is recorded in the edge of the knowledge graph, the statistical correlation between each complication is calculated, and is supplemented to the knowledge graph;

[0009] The knowledge graph is trained in advance using Node2Vec for network embedding, to obtain embedding vectors and input the embedding vectors into a gradient boosting tree model as augmented prior, to form a first-stage model, and to activate corresponding risk nodes according to preoperative characteristics, to calculate a knowledge graph reasoning score of each complication node through neighborhood aggregation in the graph, and to input the reasoning score as an additional feature into the first-stage model to preliminarily assess the risk of the complication;

[0010] The knowledge graph is modeled in a graph neural network manner and trained jointly with the first-stage model to form a second-stage model, and the clinical experience and medical mechanism of doctors are integrated into the second-stage model through the knowledge graph, to compare the prediction results of all complications with corresponding true labels and fine-tune the prediction results, and to output a final complication probability;

[0011] Based on the complication probability output by the second-stage model, the patient is classified into a risk level, the clinical effectiveness of the model under different thresholds is evaluated, and a comprehensive risk stratification is defined for overall management, and a decision curve analysis is used to quantify the clinical effectiveness of the second-stage model under a given threshold.

[0012] According to the department or hospital center, the test set is divided into several subsets, the main performance indicators of the second-stage model on each subset are calculated, and a stability index is calculated.

[0013] In one embodiment, the knowledge graph is trained in advance using Node2Vec for network embedding, to obtain embedding vectors and input the embedding vectors into a gradient boosting tree model as augmented prior, to form a first-stage model, and to activate corresponding risk nodes according to preoperative characteristics, to calculate a knowledge graph reasoning score of each complication node through neighborhood aggregation in the graph, and to input the reasoning score as an additional feature into the first-stage model to preliminarily assess the risk of the complication, including:

[0014] Based on the edge weight w uv and the biased random walk (p, q) to perform node sampling and probability transfer;

[0015] The sampled nodes are optimized and trained using skip-gram to obtain embedding vectors e v ;

[0016] The risk factors, complication nodes, and department / surgery type nodes are constructed into a multi-relation graph The constructed multi-relation graph is subjected to Node2Vec embedding, the patient's risk factor vector is subjected to weighted or attention aggregation, and a patient graph representation is generated.

[0017] In one embodiment, based on the edge weight w uvAnd the node sampling and probability transition are performed by the biased random walk with the walk strategy (p, q) including;

[0018] First, input and hyperparameter setting are performed, and the input graph setting is: The hyperparameters are: random walk length l, walk number r started by each node, embedding dimension d, window size k, and negative sampling number;

[0019] The random walk is initialized, and r random walks are started from each node v in the graph, taking v as the first node of the walk sequence;

[0020] The "sentence" is generated by the biased random walk, and the non-normalized transition probability formula of the reached node t, the current node v, and the candidate next node x is:

[0021] π vx =α pq (t,x)w vx ,

[0022] In the formula, π vx is the actual transition probability obtained by re-normalization, t is the node reached in the last step, d tx is the shortest path distance between t and the next candidate node x in the original graph, α pq (t,x) represents the non-normalized transition probability from the last node t to the candidate node x, p is the return parameter, and q is the depth parameter.

[0023] In an embodiment, the skip-gram is used to optimize the training of the sampled nodes to obtain embedding vectors e v including:

[0024] The training formula is:

[0025]

[0026] The skip-gram is used to optimize the learning of the embedding, taking the walk sequence as "text", the window size k, and the center node v and its context node u are maximized:

[0027]

[0028] In the formula, σ is Sigmoid, and {u i} is the negative sample;

[0029] After the training is completed, a d-dimensional embedding vector e v is obtained for each node v.

[0030] In an embodiment, the risk factors, complication nodes, and department / surgery type nodes are constructed into a multi-relation graph On the constructed multi-relation graph Perform Node2Vec embedding on the patient's risk factor vector Perform weighted or attention aggregation to generate patient atlas representation, including:

[0031] Based on the electronic medical record, literature and expert knowledge base, potential entities are extracted and de-duplicated and combined according to the three categories of risk factors, complications and department / surgery type to obtain the node set V, and lay the foundation for the entity of the multi-relation graph;

[0032] Based on the known semantic relationship between medical events, a set of relationship types R is formulated, and the directionality of each relationship is specified, so that different semantic edges can coexist in the same pair of nodes without conflict;

[0033] To highlight the importance of quantitative edges, mutual information is calculated according to statistical co-occurrence, and the formula is:

[0034]

[0035] According to the four-tuple format of (u,v,r,w uv ) The node pairs that meet the threshold are written into the edge set E, and V, E, R are persisted as edge lists or imported into graph databases, completing the construction of the multi-relation graph;

[0036] Use Node2Vec for embedding, set the random walk length to L, and start W walks for each node. The walk parameters (p, q) control the balance between backtracking and exploration. After obtaining the walk sequence, learn the node vector with the skip-gram model The optimization objective formula is:

[0037]

[0038] In the formula, is the context window node co-occurring with v in the walk, and the embedding dimension is set to 128 to balance the expression ability and computational overhead;

[0039] After embedding, the formula for generating patient atlas representation is:

[0040] Or

[0041] In the formula, h tab is the representation after encoding the structured features, and || represents vector concatenation;

[0042] Learn node vectors through the skip-gram model to realize knowledge enhancement for risk prediction.

[0043] In one embodiment, the knowledge graph is modeled in a graph neural network manner and jointly trained with the first stage model to form a second stage model, and the doctor's clinical experience and medical mechanism are integrated into the second stage model through the knowledge graph. The prediction results of all complications are compared with the corresponding true labels, and the final complication probability is output, including:

[0044] A multi-relation graph is constructed, the risk factor nodes and the complication nodes are initialized, and the input matrix is formed after splicing. A multi-relation graph convolution network is used to perform message passing on the knowledge graph, and the final representation of the corresponding complication node is output after Sigmoid activation to output the correction probability.

[0045] Based on the comparison between the prediction results and the corresponding true labels, the training process will automatically adjust the updateable parameters in the network for fine-tuning according to the comparison results.

[0046] In one embodiment, a multi-relation graph is constructed, the risk factor nodes and the complication nodes are initialized, and the input matrix is formed after splicing. A multi-relation graph convolution network is used to perform message passing on the knowledge graph, and the final representation of the corresponding complication node is output after Sigmoid activation to output the correction probability, including:

[0047] After the multi-relation graph convolution network completes L-layer message passing, the final representation vector of each complication node is taken This step integrates the graph information and the first stage Logit into the node;

[0048] Convert to scalar logit through a layer of shared or node-specific linear transformation:

[0049]

[0050] In the formula,

[0051] For each z k Apply element-level Sigmoid (apply Sigmoid function to each element in a vector individually):

[0052]

[0053] In the formula, The corrected complication occurrence probability is represented.

[0054] In one embodiment, based on the complication probability output by the second stage model, the patient is classified into risk levels, the clinical effectiveness of the model under different thresholds is evaluated, and a comprehensive risk stratification is defined for overall management. Decision curve analysis is used to quantify the clinical effectiveness of the second stage model under a given threshold, including: ​

[0055] For each complication, one or several probability thresholds are set to divide patients into three levels of low risk, medium risk, and high risk;

[0056] Based on the decision curve analysis, the net benefit is calculated as the change of the decision threshold to evaluate whether the second stage model is beneficial for decision making and how much the net benefit is;

[0057] Through the risk layer accuracy and the promotion degree, the risk concentration of the complication occurrence of the high-risk group is obtained after screening by the second stage model, and whether it is suitable as the key intervention object.

[0058] In an embodiment, the test set is divided into several subsets according to departments or hospital centers, the main performance indicators of the second stage model on each subset are calculated, and the stability index is calculated, including:

[0059] The reciprocal of the range or standard deviation is used to represent the stability;

[0060] The calibration error and sensitivity stability of the second stage model in different departments are compared to ensure that the second model does not systematically underestimate or overestimate the risk in a department;

[0061] The calibration error and sensitivity stability of the second stage model in different departments are compared to ensure that the second model does not systematically underestimate or overestimate the risk in a department.

[0062] For calibration error:

[0063]

[0064] And sensitivity stability:

[0065]

[0066] Brier is the score difference.

[0067] According to a second aspect of an embodiment of the present application, a preoperative multiple complication risk prediction system based on structured clinical data is provided.

[0068] In an embodiment, the preoperative multiple complication risk prediction system based on structured clinical data comprises a correlation calculation module for collating known risk factors of postoperative complications based on authoritative guidelines and literature, recording the causal association between risk factors and complication nodes into the edges of the knowledge graph, calculating the statistical correlation between complications, and supplementing to the knowledge graph.

[0069] A preliminary risk assessment module is configured to pre-train a network embedding of a knowledge graph by using Node2Vec, obtain embedding vectors, and input the embedding vectors into a gradient boosting tree model as augmented prior inputs to form a first-stage model, and activate corresponding risk nodes according to preoperative features, aggregate through neighborhoods in the graph, and calculate a knowledge graph reasoning score of each complication node, and input the reasoning score as additional features into the first-stage model to preliminarily assess the risk of the complications.

[0070] A complication probability prediction module is configured to model the knowledge graph in a graph neural network manner, jointly train the knowledge graph with the first-stage model to form a second-stage model, and integrate the clinical experience and medical mechanism of doctors into the second-stage model through the knowledge graph, compare prediction results of all complications with corresponding true labels, and fine-tune the prediction results to output final complication probabilities.

[0071] An effectiveness quantification module is configured to divide patients into risk levels based on the complication probabilities output by the second-stage model, evaluate clinical effectiveness of the model under different thresholds, and define a comprehensive risk stratification for overall management, and quantifies clinical effectiveness of the second-stage model under a given threshold by using a decision curve analysis.

[0072] A stability index calculation module is configured to divide a test set into a plurality of subsets according to departments or hospital centers, calculate main performance indicators of the second-stage model on each subset, and calculate a stability index.

[0073] According to a third aspect of the embodiments of the present application, a computer device is provided.

[0074] In some embodiments, the computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0075] According to a fourth aspect of the embodiments of the present application, a computer readable storage medium is provided.

[0076] In one embodiment, the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the above method.

[0077] The technical solutions provided by the embodiments of the present application can include the following beneficial effects:

[0078] (1) Relying on the deep fusion of medical knowledge graph and multi-relation graph convolutional network can significantly improve the explainability and cross-domain consistency of the model without sacrificing the performance of traditional machine learning.

[0079] (2) In the specialist department with limited sample size (such as cardiothoracic surgery, urology), it still maintains stable and calibrated performance. Avoid the problem of traditional black box model that cannot be explained, and improve the trust of doctors on the output of the model.

[0080] (3) Automatically divide the risk level of patients, provide stratification basis for clinical intervention strategy, quantify the increase of model compared with traditional strategy, and evaluate the actual application value.

[0081] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS

[0082] The accompanying drawings incorporated in the specification hereof and forming a part thereof illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.

[0083] Figure 1 is a flow chart of a preoperative multiple complication risk prediction method based on structured clinical data according to an exemplary embodiment;

[0084] Figure 2 is a principle block diagram of a preoperative multiple complication risk prediction system based on structured clinical data according to an exemplary embodiment;

[0085] Figure 3 is a structural schematic diagram of a computer device according to an exemplary embodiment. DETAILED DESCRIPTION

[0086] The following description and accompanying drawings fully illustrate specific embodiments described herein to enable those skilled in the art to practice them. Some embodiments may include or substitute parts and features of other embodiments. The scope of the embodiments herein encompasses the entire scope of the claims and all available equivalents thereof. Throughout this document, the terms “first,” “second,” etc., are used only to distinguish one element from another without requiring or implying any actual relationship or order between the elements. Indeed, a first element can also be referred to as a second element, and vice versa. Furthermore, the terms “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, such that a structure, apparatus, or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a structure, apparatus, or device. Without further limitation, an element defined by the phrase “comprising one…” does not exclude the presence of other identical elements in the structure, apparatus, or device that includes said element. The various embodiments described herein are presented in a progressive manner, with each embodiment focusing on its differences from other embodiments; similar or identical parts between embodiments can be referred to interchangeably.

[0087] The terms "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer" used in this document to indicate orientations or positional relationships are based on the orientations or positional relationships shown in the accompanying drawings. They are used solely for the convenience of describing the document and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. In the description herein, unless otherwise specified and limited, the terms "installed," "connected," and "linked" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two elements; they can be direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.

[0088] In this document, unless otherwise stated, the term "multiple" means two or more.

[0089] In this article, the character " / " indicates that the objects before and after it are in an "or" relationship. For example, A / B means: A or B.

[0090] In this article, the term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or A and B.

[0091] It should be understood that although the steps in the flowchart are shown in sequential order, such that each step depends on the previous step in terms of order, the steps are not necessarily performed in the order shown by the arrows. Unless specifically stated in this document, there is no strict order limitation on the performance of the steps, and the steps can be performed in other orders. Moreover, at least some of the steps in the figure can include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but can be performed at different times, and the order of the sub-steps or stages is not necessarily sequential, but can be performed alternately or alternately with at least part of other steps or sub-steps or stages of other steps.

[0092] Each module in the device or system of the present application can be implemented wholly or partially by software, hardware, and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory in the computer device in software form, so as to call and execute the operations corresponding to the above modules by the processor.

[0093] In the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.

[0094] Figure 1 An embodiment of the preoperative multiple complication risk prediction method based on structured clinical data of the present application is shown.

[0095] In this optional embodiment, the preoperative multiple complication risk prediction method based on structured clinical data comprises:

[0096] Step S101, based on authoritative guidelines and literature, collate the known risk factors of postoperative complications, record the causal relationship between risk factors and complication nodes in the edge of the knowledge graph, calculate the statistical correlation between each complication, and supplement to the knowledge graph;

[0097] In this optional embodiment, the known risk factors of postoperative complications are sorted out based on authoritative guidelines and literature, for example, old age, high ASA classification, diabetes, COPD are risk factors of pulmonary complications; long-term use of immunosuppressants or malnutrition will increase the risk of infection and sepsis, etc. In addition to risk factors and complication nodes, we increase department nodes or operation type nodes to represent certain department-specific connections. For example, complications such as intestinal obstruction and anastomotic fistula are more common in the gastrointestinal surgery department, which can be connected in the graph or as a condition.

[0098] Step S102, the knowledge graph is trained by network embedding using Node2Vec to obtain embedding vectors and input the embedding vectors into a gradient boosting tree model as augmented prior, to form a first-stage model, activate corresponding risk nodes according to preoperative characteristics, aggregate through neighborhoods in the graph, calculate the knowledge graph reasoning score of each complication node, and input the reasoning score as additional features into the first-stage model to preliminarily assess the risk of complications;

[0099] In the optional embodiment, the knowledge graph is trained by network embedding using Node2Vec to obtain embedding vectors and input the embedding vectors into a gradient boosting tree model as augmented prior, to form a first-stage model, activate corresponding risk nodes according to preoperative characteristics, aggregate through neighborhoods in the graph, calculate the knowledge graph reasoning score of each complication node, and input the reasoning score as additional features into the first-stage model to preliminarily assess the risk of complications;

[0100] Specifically, the network embedding training of the knowledge graph using Node2Vec is as follows: based on the edge weight w uv and the biased random walk based on the walk strategy (p, q) to sample nodes and transfer probabilities; the sampled nodes are optimized and trained using skip-gram to obtain embedding vectors e v The risk factors, complication nodes and department / surgery type nodes are constructed into a multi-relation graph The multi-relation graph constructed is embedded by Node2Vec, and the risk factor vector of the patient is weighted or attention-aggregated to generate a patient graph representation.

[0101] Specifically, the input graph ( is the set of all nodes in the graph, and ε is the set of all edges in the graph, is the causal relationship assigned with a weight), the random walk is initialized, and the node is adopted as the first node of the random walk sequence starting from each node v in the graph;

[0102] The transition probability formula is:

[0103] π vx = α pq (t, x)w vx ,

[0104] In the formula, π vx is the actual transition probability obtained by normalization, t is the node reached in the last step, d tx is the shortest path distance between t and the next candidate node x in the original graph, and α pq(t, x) denotes the non-normalized transition probability from the previous node t to the candidate node x, p is the return parameter, and q is the depth parameter.

[0105] Node training formula:

[0106]

[0107] Optimize the learning embedding using skip-gram, taking the walk sequence as "text", window size k, and maximizing the center node v and its context node u:

[0108]

[0109] In the formula, σ is Sigmoid, {u i} is the negative sample.

[0110] Build a multi-relation graph Where the node set includes all risk factors v risk , complication label nodes v comp , and optional department or surgery type nodes, and each directed edge (u, v, r) in the edge set ε represents a relationship type (such as "causal" and "co-occurrence");

[0111] Specifically, the Node2Vec embedding is used for the constructed multi-relation graph, the random walk length is set to L, and each node starts W walks, and the walk parameters (p, q) control the balance between backtracking and exploration. After obtaining the walk sequence, the skip-gram model is used to learn the node vector The optimization objective formula is:

[0112]

[0113] In the formula, is the context window node co-occurring with v in the walk, and the embedding dimension is set to 128 to balance the expression ability and computational overhead;

[0114] After the embedding is completed, the formula for generating the patient graph representation is:

[0115] or

[0116] In the formula, h tab is the representation after encoding the structured features, and || represents vector concatenation;

[0117] The node vector is learned by skip-gram

[0118] (1) Run Node2Vec sampling on the multi-relational graph: Start W biased random walks of length L for each node, using (p, q) to control the return-exploration balance. The set of walk sequences S consists of node IDs, which can be viewed as sentences in the corpus.

[0119] (2) Set window size k, and feed S to Skip-Gram. For the center node v in the sequence, get its co-occurring nodes u ∈ N w (v) within the window, form positive sample pairs (v, u). At the same time, according to the node degree distribution, extract negative samples for contrastive learning.

[0120] (3) Maximize the log-likelihood (negative sampling version) of the following formula

[0121]

[0122] where σ is the Sigmoid. This objective is equivalent to making the true neighbor nodes approach in the vector space, while the random negative samples are far away.

[0123] (4) Use stochastic gradient descent or Adam to iteratively optimize the embedding At each parameter update, only the local window and negative samples need to be accessed, so the computational overhead is linearly related to the node size, meeting the clinical large graph scenario.

[0124] (5) When the loss no longer decreases on the validation set or reaches the set number of rounds, freeze all {e v}(After training is complete, the embedding vectors e v of all nodes are fixed as constants and stop participating in subsequent training; by setting the parameters not to participate in gradient calculation, the vectors are “frozen”; these frozen vectors serve as structural knowledge priors, which are concatenated with other clinical features and input into the risk prediction model for fusion modeling). These 128-dimensional vectors can be used as knowledge priors, concatenated with patient structured features or the first-stage model Logit, to achieve knowledge-enhanced risk prediction.

[0125] Step 103, the knowledge graph is modeled in a graph neural network manner and jointly trained with the first-stage model to form a second-stage model, and the doctor's clinical experience and medical mechanism are integrated into the second-stage model through the knowledge graph. The prediction results of all complications are compared with the corresponding true labels and fine-tuned, and the final complication probability is output.

[0126] In the optional embodiment, a multi-relation graph is constructed, risk factor nodes and complication nodes are initialized, and the input matrix is formed after splicing. A multi-relation graph convolution network is used to perform message passing on the knowledge graph. The final representation of the corresponding complication node is output as a correction probability after Sigmoid activation. Based on the comparison between the prediction result and the corresponding true label, the training process automatically adjusts the updateable parameters in the network for fine-tuning

[0127] Specifically, the joint training formula is:

[0128]

[0129] In the formula, H (0) = [x risk ||y (0) ], is the layer weight, and sigma is a linear rectifier function / leaky linear rectifier function (ReLU / LeakyReLU). After L layers are executed, the final representation of the corresponding complication node is output as a correction probability after Sigmoid activation The overall loss formula is:

[0130]

[0131] In the formula, the first term is the binary cross entropy of each label, and the second term is the graph parameter regular. During training, the multi-relation convolution network can be frozen first, and only the first stage representation and output are trained. Then, the entire network is fine-tuned end-to-end after being unfrozen, or it is alternately optimized. In this way, the structured representation and medical knowledge graph are deeply integrated.

[0132] The Sigmoid activation output formula is:

[0133]

[0134] In the formula, represents the corrected complication occurrence probability.

[0135] Next, the second stage model compares the prediction results of all complications with the corresponding true labels to measure the accuracy of the current prediction. Then, the training process automatically adjusts the parameters in the network that can still be updated based on the comparison result, so that the next prediction is closer to the true situation. Finally, the prediction probability of this time is saved and passed to the subsequent performance evaluation and explainability analysis modules for index calculation and result visualization.

[0136] Specifically, the steps of fine-tuning are:

[0137] ​(1) Freeze the graph network, in the initial stage, only train the first stage of the representation network and the output layer, keep the multi-relation convolution network unchanged {W R , W0} (W R : represents the weight matrix corresponding to the relationship type R, W0: represents the weight matrix of the self-loop), let the model converge to the structured features first. At this time, the learning rate can be set to 1e-3.

[0138] (2) Unfreeze the output mapping and correct: unlock the output weight wout,bout of the complication node, fine-tune for a few epochs while keeping the R-GCN frozen, so that the label distribution mapping of the new environment is more accurate. It is recommended to reduce the learning rate to 1e-4.

[0139] (3) Hierarchical unfreezing of multi-relation convolution network: unfreeze R-GCN layer by layer in the order of 'high first, low later'. The top layer {W(L-1), W0(L-1)} can be unfrozen at a time, and the performance of the validation set is stable (if the change amplitude of these indicators is less than the preset threshold (such as loss decrease <0.001, AUC increase <0.002) within a certain number of epochs (such as 3-5 rounds), it is considered that the model has basically converged) before unfreezing the next layer, until all layers are trainable. To avoid catastrophic forgetting, set a smaller learning rate (such as 5e-5) for the unfreezed layers and enable L2 regularization and Dropout.

[0140] (4) Alternating or joint optimization: the'structured branch' and 'graph branch' can also be updated alternately by epoch, or directly trained jointly but with different learning rate ratios. The loss of the entire fine-tuning stage is still:

[0141]

[0142] Where λ can be adjusted large (such as 1e-3) at the beginning of fine-tuning to prevent overfitting, and then decreased according to the validation loss.

[0143] Step 104, based on the complication probability output by the second stage model, the patient is classified into risk levels, the clinical effectiveness of the model under different thresholds is evaluated, and a comprehensive risk stratification is defined for overall management. Decision curve analysis is used to quantify the clinical effectiveness of the second stage model at a given threshold.

[0144] In this optional embodiment, for each complication, one or more probability thresholds are set to divide patients into three levels of low risk, medium risk, and high risk; based on decision curve analysis, the change of net benefit with decision threshold is calculated to evaluate whether the second stage model is beneficial for decision making and the net benefit; through risk layer accuracy and improvement, the complication risk concentration of the high risk group is obtained after screening using the second stage model, and whether it is appropriate to be used as the focus of intervention.

[0145] Specifically, first define the high-risk group index:

[0146] N HR = |high-risk group|

[0147] At the same time, for example, if any serious complication risk > 0.5 is considered as a whole high-risk patient, the net benefit formula is:

[0148]

[0149] Where TP(t) and FP(t) are the true positive and false positive numbers classified by threshold t respectively. The gain of the model at t * can be defined as:

[0150] ΔNB = NB(t * )-max{NB 全干预 ,NB 全不干预}

[0151] Specifically, by reporting the risk layer accuracy (RiskAcc, the true complication incidence rate in the high-risk group) and the boost degree (the complication incidence rate of the high-risk group screened by the model relative to the average incidence rate). Let the prediction probability of the kth complication be p k , the total sample size is N, and the threshold is t.

[0152] The formula for accuracy is:

[0153]

[0154] Where y (i) is the binary label of whether the sample i actually has the complication; the boost degree > 1 indicates that the high-risk group incidence concentration is enhanced, and by the formula, the thresholds t1 < t2 < … can be calculated by DCA, comparing NB(t i ) and selecting the optimal threshold that meets the preset sensitivity or specificity requirements. Patients are divided into three levels of "low" (p k < t1), "medium" (t1 ≤ p k < t2), and "high" (p k ≥ t2), and the above indicators are reported for each group to assist in developing stratified intervention strategies.

[0155] Step 105, divide the test set into several subsets according to the department or hospital center, calculate the main performance indicators of the second stage model on each subset, and calculate the stability index.

[0156] In the optional embodiment, the test set is divided into several subsets according to departments or hospital centers, the main performance indicators of the second stage model on each subset are calculated, and the stability index is calculated;

[0157] Specifically, the reciprocal of the range or standard deviation is used to represent the stability;

[0158]

[0159] Meanwhile, in order to further quantify the compactness of the consistency of distribution, a stability version based on variance is defined:

[0160] StabilityIndex σ =exp(-Var(AUC dept ))

[0161] In the formula, Var(·) represents the variance of the AUC of each department, and the closer the index is to 1, the better the cross-domain consistency. The index close to 1 indicates that the performance difference between different departments is small, and the model generalization is good; if the index decreases, it means that the model performs poorly in some departments and needs to be paid attention to.

[0162] Meanwhile, in addition to performance, to ensure that the model does not systematically underestimate or overestimate the risk in a department, the calibration error and the sensitivity / specificity at the threshold of different departments are compared;

[0163] Specifically, the calibration error formula is:

[0164]

[0165] The sensitivity stability formula is:

[0166]

[0167] If differences are found, we can improve the performance of a domain through domain adaptive fine-tuning, and then re-evaluate the indicators.

[0168] Figure 2 An embodiment of the preoperative multiple complication risk prediction system based on structured clinical data of the application is shown.

[0169] In the optional embodiment, the preoperative multiple complication risk prediction system based on structured clinical data comprises:

[0170] The correlation calculation module is used to collate known risk factors of postoperative complications based on authoritative guidelines and literature, record the causal association between the risk factors and the complication nodes into the edges of the knowledge graph, calculate the statistical correlation between the complications, and supplement to the knowledge graph;

[0171] A preliminary risk assessment module is configured to pre-train a network embedding of the knowledge graph using Node2Vec, obtain embedding vectors, and input the embedding vectors into a gradient boosting tree model as augmented prior to form a first-stage model, and activate corresponding risk nodes according to preoperative characteristics, aggregate through neighborhoods in the graph, and calculate a knowledge graph reasoning score of each complication node, and input the reasoning score as an additional feature into the first-stage model to preliminarily assess the risk of the complication;

[0172] A complication probability prediction module is configured to model the knowledge graph in a graph neural network manner, jointly train the knowledge graph with the first-stage model to form a second-stage model, and integrate the clinical experience and medical mechanism of doctors into the second-stage model through the knowledge graph, compare the prediction results of all complications with corresponding true labels, and fine-tune the prediction results to output final complication probabilities.

[0173] An effectiveness quantification module is configured to divide patients into risk levels based on the complication probabilities output by the second-stage model, evaluate the clinical effectiveness of the model under different thresholds, and define a comprehensive risk stratification for overall management, and quantifies the clinical effectiveness of the second-stage model under a given threshold by using a decision curve analysis.

[0174] A stability index calculation module is configured to divide a test set into a plurality of subsets according to departments or hospital centers, calculate main performance indicators of the second-stage model on each subset, and calculate a stability index.

[0175] In an embodiment, a computer device, which can be a server, can have an internal structure diagram as shown in Figure 3 The computer device includes a processor, a memory, and a network interface connected by a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is configured to store static information and dynamic information data. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement the steps in the above method embodiments.

[0176] Those skilled in the art can understand that Figure 3 the structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. A specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0177] In addition, the present application further provides a computer device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0178] In addition, the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps in the above method embodiments.

[0179] A person of ordinary skill in the art can understand that all or part of the processes in the above method embodiments can be completed by a computer program instructing related hardware, and the computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above embodiments. Any reference to memory, storage, database or other medium in each embodiment of the present application can include at least one of non-volatile and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory. The volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0180] The present application is not limited to the structures described above and shown in the drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A preoperative multiple comorbidity risk prediction method based on structured clinical data, characterized in that, Comprise: Enter the causal association between risk factors and complication nodes into the edge of the knowledge graph, calculate the statistical correlation between each complication, and supplement it to the knowledge graph; Pre-train the knowledge graph using the Node2Vec algorithm for network embedding, obtain the embedding vectors and input them as augmented priors into the gradient boosting tree model to form the first stage model, and activate the corresponding risk nodes according to the preoperative features, calculate the knowledge graph reasoning score of each complication node through neighborhood aggregation in the graph, and input the reasoning score as additional features into the first stage model to preliminarily assess the risk of complications; Model the knowledge graph in the form of a graph neural network and jointly train it with the first stage model to form the second stage model, and integrate clinical experience data and medical mechanisms into the second stage model through the knowledge graph, compare the prediction results of all complications with the corresponding true labels, and adjust them to output the final complication probability; Based on the complication probability output by the second stage model, divide the patients into risk levels, evaluate the clinical effectiveness of the model under different thresholds, and define a comprehensive risk stratification for overall management, and use the decision curve analysis method to quantitatively analyze the clinical effectiveness of the second stage model under a given threshold; Divide the test set into several subsets, calculate the performance indicators of the second stage model on each subset, and calculate the stability index; The knowledge graph is modeled in the form of a graph neural network, and the first stage model is jointly trained to form the second stage model, and the clinical experience data and medical mechanisms are integrated into the second stage model through the knowledge graph, and the prediction results of all complications are compared with the corresponding true labels and adjusted, and the final complication probability is output, which comprises: constructing a multi-relation graph, initializing the risk factor nodes and complication nodes, and concatenating to form an input matrix, using a multi-relation graph convolution network to perform message passing on the knowledge graph, and the final representation of the corresponding complication node is output through Sigmoid activation to output the correction probability; based on the comparison between the prediction results and the corresponding true labels, automatically adjust the updateable parameters in the network based on the comparison results; The knowledge graph is modeled in the form of a graph neural network, and the first stage model is jointly trained to form the second stage model, and the clinical experience data and medical mechanisms are integrated into the second stage model through the knowledge graph, and the prediction results of all complications are compared with the corresponding true labels and adjusted, and the final complication probability is output, which comprises: constructing a multi-relation graph, initializing the risk factor nodes and complication nodes, and concatenating to form an input matrix, using a multi-relation graph convolution network to perform message passing on the knowledge graph, and the final representation of the corresponding complication node is output through Sigmoid activation to output the correction probability; based on the comparison between the prediction results and the corresponding true labels, automatically adjust the updateable parameters in the network based on the comparison results; After the multi-relational graph convolutional network is completed After the layer message passing, take the final representation vector of each complication node Fusing the graph information and the first stage Logit into the node Convert to scalar logit by linear transformation: Convert to scalar logit by linear transformation: In the formulae, ; For each Apply element-wise Sigmoid: In the formula, represents the corrected probability of complication occurrence.

2. The preoperative multiple comorbidity risk prediction method based on structured clinical data according to claim 1, characterized in that, The pre-training of the knowledge graph using the Node2Vec algorithm for network embedding, obtaining the embedding vectors and inputting them as augmented priors into the gradient boosting tree model to form the first stage model, and activating the corresponding risk nodes according to the preoperative features, calculating the knowledge graph reasoning score of each complication node through neighborhood aggregation in the graph, and inputting the reasoning score as additional features into the first stage model to preliminarily assess the risk of complications, comprises: Based on edge weights And a walk strategy To perform node sampling and probability transfer; The skip-gram algorithm is used to optimize and train the sampled nodes to obtain embedding vectors ; Risk factors, complication nodes, and department / procedure type nodes are constructed into a multi-relational graph Node2Vec algorithm embedding is performed on the constructed multi-relational graph Risk factor vectors for patients are generated Weighted or attention aggregation is performed to generate patient graph representations 3. The preoperative multiple comorbidity risk prediction method based on structured clinical data according to claim 2, characterized in that, The edge weight-based and walk strategy The node sampling and probability transfer includes: First, input and hyperparameter setting, input graph setting is: , hyperparameters are: random walk length , the number of walks started by each node , embedding dimension , window size , negative sampling number; Initialize random walk, for each node in graph Start Sub-random walk, take as first node of walk sequence; a sequence is generated by a biased random walk, reached nodes , current node , candidate next node The non-normalized transition probability formula for the candidate next node is: wherein, denotes the actual transition probability obtained by normalization, t denotes the node walked to in the previous step, denotes the next candidate node the shortest path distance in the original graph, denotes the non-normalized transition probability from the previous node to the candidate node p denotes the return parameter, and q denotes the depth parameter.

4. The preoperative multiple comorbidity risk prediction method based on structured clinical data according to claim 2, characterized in that, The skip-gram algorithm is used to optimize and train the sampled nodes to obtain embedding vectors comprising: The training formula is: Optimized learning embeddings using the skip-gram algorithm, treating the walk sequences as text, window size , to the center node , and its context nodes maximizing: wherein represents Sigmoid, represents negative samples; After the training, for each node obtained dimensionality embedding vector .

5. The preoperative multiple comorbidity risk prediction method based on structured clinical data according to claim 2, wherein, The method constructs a multi-relationship graph by including risk factors, complication nodes, and department / surgery type nodes. For the constructed multi-relationship graph Embedding the Node2Vec algorithm into the patient's risk factor vector Weighted or attention-based aggregation is performed to generate patient atlas representations, including: Based on electronic medical records, literature and expert knowledge base, extract target entities, and perform de-duplication and merging according to three categories of risk factors, complication labels, and department / surgery types to obtain a node set V; Formulating a set of relationship types based on semantic relationships between medical events ; According to the statistical co-occurrence, the mutual information is calculated, and the formula is: ; According to write the node pairs satisfying the threshold value into the edge set in the quad format , persist as an edge list or import into a graph database, complete the construction of a multi-relation graph ​ Using Node2Vec algorithm for embedding, set random walk length as , each node starts walks, walk parameters control the balance between backtracking and exploration, after getting the walk sequence, learn node vectors with skip-gram model , the optimization objective formula is: In the formula, To walk with Co-occurrence context window nodes, embedding dimension is set to 128 to balance the expression ability and computational overhead; After the embedding is completed, the formula for generating the patient atlas representation is: In the formula, is a structured feature encoded representation, denotes vector concatenation; Learning node vectors by skip-gram Knowledge augmentation for risk prediction.

6. The preoperative multiple comorbidity risk prediction method based on structured clinical data according to claim 1, wherein, The complication probability output by the second-stage model is used to classify the risk levels of patients, evaluate the clinical effectiveness of the model at different thresholds, and define comprehensive risk stratification for overall management. The decision curve analysis method is used to quantify the clinical effectiveness of the second-stage model at a given threshold, which includes: For each complication, one or several probability thresholds are set to divide patients into three levels of low risk, medium risk, and high risk; Based on decision curve analysis, the net benefit is calculated as a function of the decision threshold; After screening using the second-stage model, the risk concentration of complications in the high-risk group is obtained.

7. The preoperative multiple comorbidity risk prediction method based on structured clinical data according to claim 1, wherein, The test set is divided into several subsets, the performance indicators of the second-stage model on each subset are calculated, and the stability index is calculated, which includes: The stability is represented by the reciprocal of the range or standard deviation; The calibration error and sensitivity stability of the second-stage model in different departments are compared; The calibration error and sensitivity stability of the second-stage model in different departments are compared, which includes: For calibration error: And sensitivity stability: Where Brier is the score difference.

8. A system for preoperative multiple comorbidity risk prediction based on structured clinical data, characterized in that, The system includes: A correlation calculation module for entering the causal relationship between risk factors and complication nodes into the edges of the knowledge graph, calculating the statistical correlation between complications, and supplementing to the knowledge graph; A preliminary risk assessment module for pre-training the knowledge graph using the Node2Vec algorithm for network embedding, obtaining embedding vectors and inputting them as augmented priors into the gradient boosting tree model to form the first-stage model, and activating the corresponding risk nodes according to the preoperative features, calculating the knowledge graph reasoning score of each complication node through neighborhood aggregation in the graph, and inputting the reasoning score as additional features into the first-stage model for preliminary risk assessment of complications; A complication probability prediction module for modeling the knowledge graph in a graph neural network and jointly training with the first-stage model to form the second-stage model, and integrating clinical experience data and medical mechanisms into the second-stage model through the knowledge graph, comparing and adjusting the prediction results of all complications with the corresponding true labels, and outputting the final complication probability; An effectiveness quantification module for classifying the risk levels of patients based on the complication probability output by the second-stage model, evaluating the clinical effectiveness of the model at different thresholds, and defining comprehensive risk stratification for overall management, using the decision curve analysis method to quantify the clinical effectiveness of the second-stage model at a given threshold; A stability index calculation module for dividing the test set into several subsets, calculating the performance indicators of the second-stage model on each subset, and calculating the stability index; A stability index calculation module for dividing the test set into several subsets, calculating the performance indicators of the second-stage model on each subset, and calculating the stability index; The knowledge graph is modeled in a graph neural network manner, is jointly trained with the first stage model to form a second stage model, and is used to integrate clinical experience data and medical mechanisms into the second stage model, a prediction result of all complications is compared with a corresponding real label, and a final complication probability is output, and the method comprises the following steps: a multi-relation graph is constructed, risk factor nodes and complication nodes are initialized, and an input matrix is formed after splicing; a multi-relation graph convolution network is used to perform message passing on the knowledge graph; and a last representation of the corresponding complication node is output through Sigmoid activation to output a correction probability; and the prediction result is compared with the corresponding real label, and the parameters that can be updated in the network are automatically adjusted based on the comparison result. The multi-relation graph is constructed, the risk factor nodes and the complication nodes are initialized, the input matrix is formed after splicing, the multi-relation graph convolution network is used to perform message passing on the knowledge graph, and the last representation of the corresponding complication node is output through Sigmoid activation to output the correction probability. After the multi-relational graph convolutional network is completed After the message passing of the layers, take the final representation vector of each complication node Fuse the graph information and the first-stage Logit into the node Convert to scalar logit by linear transformation: Convert to scalar logit by linear transformation: In the formulae, ; For each Apply element-wise Sigmoid: In the formula, represents the corrected probability of complication occurrence.

Citation Information

Patent Citations

  • Breast cancer clinical data analysis diagnosis and treatment platform based on artificial intelligence large language model

    CN118016280A

  • Emotional state evaluation method and system based on multiple events and multiple tasks

    CN119943407A