A machine learning-based medical quality dynamic evaluation method and system
By securely aggregating multi-source heterogeneous data and using a federated learning framework, combined with causal graphs and counterfactual intervention scenarios, the problems of low accuracy and poor real-time performance in existing medical quality assessments are solved, achieving dynamic assessments with high accuracy, high real-time performance, and strong interpretability.
Patent Information
- Application Number
- CN202511588416.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-03
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-11-03
AI Technical Summary
Existing medical quality assessment methods rely on data from a single institution, resulting in low accuracy and poor real-time performance. They also lack dynamic time-series modeling and causal inference capabilities, failing to meet the needs for dynamic, accurate, and interpretable assessments.
By securely aggregating structured, unstructured, and time-series data, a causal graph of medical quality is constructed. The results of the causal graph are optimized using Bayesian information criterion. Counterfactual intervention scenarios are generated by combining Do calculus. The model is then corrected in real time through a federated learning optimization framework and a doctor crowdsourcing annotation mechanism. A digital twin model is then constructed for real-time evaluation.
It enables dynamic optimization of model parameters across institutions, improves the generalization ability and accuracy of the evaluation model, enhances the interpretability and decision guidance value of the evaluation results, and meets the real-time monitoring needs of the surgical process.
Smart Images

Figure CN121075689B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of medical quality evaluation, in particular to a medical quality dynamic evaluation method and system based on machine learning. BACKGROUND
[0002] Current medical quality evaluation mostly uses post-event statistical indicators (such as surgical complication rate, patient satisfaction) or single-institution static models, and relies on artificial experience for qualitative judgment. Although some methods introduce machine learning, they are limited to single-institution data, do not integrate structured / unstructured / time-series multi-source heterogeneous data, and lack dynamic time-series modeling and causal inference capabilities, making it difficult to provide real-time feedback on surgical procedures.
[0003] Traditional solutions have the defects of insufficient evaluation accuracy, poor real-time performance, and weak interpretability. Single-institution data limits the model's generalization ability, and static indicators cannot capture dynamic changes in surgery; lack of causal inference and counterfactual analysis makes it difficult to reveal the internal logic of quality influencing factors; doctors' professional experience is not effectively integrated into model optimization, and the evaluation results are disconnected from clinical decision-making needs, making it difficult to meet the needs of dynamic, precise, and interpretable medical quality evaluation. SUMMARY
[0004] The present application aims to at least solve the technical problems of single data and low evaluation accuracy in the prior art, and particularly innovatively provides a medical quality dynamic evaluation method and system based on machine learning.
[0005] In order to achieve the above-mentioned purpose of the present application, the present application provides a medical quality dynamic evaluation method based on machine learning, characterized in that the method comprises:
[0006] S1, collecting structured data, unstructured data and time-series data for secure aggregation to generate a cross-institution de-identification dataset;
[0007] S2, dynamically constructing a medical quality causal graph based on the cross-institution de-identification dataset using a constraint-based and scoring-based hybrid algorithm, and optimizing the medical quality causal graph result through Bayesian information criterion;
[0008] S3, generating a counterfactual intervention scenario based on the medical quality causal graph using Do calculus, and outputting an interpretable causal relationship model;
[0009] S4, constructing a federated learning optimization framework, dynamically aggregating the causal relationship model parameters of each medical institution through the PPO algorithm, and introducing a doctor crowd-sourced labeling mechanism in the federated learning optimization framework to real-time correct the model prediction results, and generating a globally optimized medical quality dynamic evaluation model;
[0010] S5, constructing a digital twin model of a surgical scene / patient state, mapping instrument positions, operation sequences and physiological parameters in real time to the global medical quality dynamic evaluation model, and generating a dynamic quality score at each time t using the global medical quality dynamic evaluation model.
[0011] In another aspect, the present application also provides a machine learning-based medical quality dynamic evaluation system, which comprises:
[0012] a processor;
[0013] a memory for storing processor-executable instructions;
[0014] wherein the processor is configured to implement the machine learning-based medical quality dynamic evaluation method when executing the executable instructions.
[0015] The present application has the following beneficial effects: The present application breaks through the limitations of single institution data by using a multi-source heterogeneous data security aggregation and federated learning framework, realizes dynamic optimization of cross-institution model parameters, and significantly improves the generalization ability and precision of the evaluation model; the evaluation result is enhanced in terms of explainability and decision guidance value by combining medical quality causal graph construction and counterfactual intervention scenario generation, and deeply mining the causal logic between surgical operation, physiological parameters and process compliance; relying on a digital twin model to map real-time surgical scene dynamic data, and cooperating with time series modeling and trend correction terms, precise dynamic scoring at each time t is realized, meeting the real-time monitoring needs of the surgical process; the introduction of a doctor crowd annotation mechanism directly embeds professional experience into the scoring function, forming a closed-loop optimization system of "data-driven-causal inference-expert correction", effectively solving the core problems of poor real-time performance, weak explainability and clinical disconnection in traditional evaluation, and finally outputting a high-precision, high-real-time and strongly-explainable medical quality dynamic evaluation result.
[0016] Additional aspects and advantages of the present application will be in part apparent and in part pointed out hereinafter. BRIEF DESCRIPTION OF DRAWINGS
[0017] The above and / or additional aspects and advantages of the present application will become apparent and be readily appreciated from the following description, including the appended drawings.
[0018] Figure 1 is a flowchart of a machine learning-based medical quality dynamic evaluation method of the present application. DETAILED DESCRIPTION
[0019] Embodiments of the present application are described below in detail with reference to the accompanying drawings, examples of which are shown in the drawings, wherein the same or similar numerals represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by reference to the drawings are exemplary only, and are intended to explain the present application, and cannot be understood as a limitation of the present application.
[0020] Embodiment 1
[0021] As Figure 1 shown, a medical quality dynamic evaluation method based on machine learning, characterized in that the method comprises:
[0022] S1, collecting structured data, unstructured data and time series data for secure aggregation to generate a cross-institutional desensitization dataset;
[0023] In step S1, it needs to be specified that the structured data includes operation records, medication records, vital sign data and laboratory examination results in the patient electronic medical record; the unstructured data includes operation room monitoring video stream, anesthesia record handwritten text, postoperative nursing voice record and medical image report; the time series data covers the electrocardiogram, blood oxygen saturation and invasive blood pressure waveform sequence output by the high-frequency physiological monitor. In this embodiment, secure aggregation is specifically to use differential privacy and homomorphic encryption technology, after completing data encryption processing locally in each medical institution, to realize cross-institutional data joint analysis through a secure multi-party computing protocol, to ensure that the original data is not out of the domain, and to generate a desensitization dataset containing multi-source feature fusion. After verification by the federal learning node, the dataset is stored in a distributed storage system for subsequent model training. When used, the structured data extracts key medical events through a natural language processing module, the unstructured data is converted into structured features through computer vision and speech recognition technology, the time series data is processed through sliding window segmentation and dynamic time warping to form a unified time scale feature sequence, and finally a cross-institutional medical data matrix containing spatial-time multi-dimensional features is generated.
[0024] S2, dynamically constructing a medical quality causal graph based on the cross-institutional desensitization dataset using a constraint-based and scoring-based hybrid algorithm, and optimizing the medical quality causal graph result through the Bayesian information criterion;
[0025] S3, generating counterfactual intervention scenarios using Do calculus based on the medical quality causal graph, and outputting an interpretable causal relationship model;
[0026] S4, constructing a federal learning optimization framework, dynamically aggregating the causal relationship model parameters of each medical institution through the PPO algorithm, and introducing a doctor crowdsourcing labeling mechanism in the federal learning optimization framework to real-time correct the model prediction results, and generating a globally optimized medical quality dynamic evaluation model;
[0027] S5, constructing a digital twin model of the surgical scene / patient state, mapping instrument position, operation sequence and physiological parameters in real time to the global medical quality dynamic evaluation model, and generating a dynamic quality score at each time t using the global medical quality dynamic evaluation model.
[0028] In this embodiment, the principle of a machine learning-based medical quality dynamic evaluation method is as follows: first, through the safe aggregation technology of multi-source heterogeneous data, the structured data, unstructured data and time series data from different medical institutions are integrated and desensitized, breaking the data island phenomenon. Then, a medical quality causal graph is dynamically constructed using a constraint base and score base hybrid algorithm. The causal graph can clearly show the internal logical relationship between surgical operation, physiological parameters and process compliance, and is optimized by the Bayesian information criterion to ensure the accuracy and reliability of the causal relationship. Subsequently, based on the constructed medical quality causal graph, a Do algorithm method is used to generate counterfactual intervention scenarios. These scenarios can simulate surgical processes under different conditions, thereby outputting a causal relationship model with high interpretability. In terms of model optimization, a federated learning optimization framework is constructed, and the PPO algorithm is used to dynamically aggregate the causal relationship model parameters of each medical institution, realizing the sharing and optimization of cross-institution model parameters. At the same time, a doctor crowdsourcing annotation mechanism is introduced, allowing doctors to make real-time corrections to model prediction results based on professional knowledge and experience, further improving the accuracy and practicality of the model. Finally, by constructing a digital twin model of the surgical scene and the patient state, real-time mapping of key information such as instrument position, operation sequence and physiological parameters during the surgical process is realized, and a dynamic quality score is generated at each time t using the global medical quality dynamic evaluation model, realizing real-time monitoring and precise evaluation of the surgical process.
[0029] As an optional embodiment of the present application, optionally, in step S2, a constraint base and score base hybrid algorithm is used to dynamically construct a medical quality causal graph based on the cross-institution desensitized data set, and the medical quality causal graph result is optimized by the Bayesian information criterion, including:
[0030] S201, preprocessing the cross-institution desensitized data set and extracting candidate variables related to medical quality; based on a clinical knowledge graph and statistical dependency analysis, selecting a variable subset with potential causal association from the candidate variables, and constructing an initial undirected variable network;
[0031] In step S201, it needs to be specified that the preprocessing operation includes data cleaning, missing value filling and standardization processing on the cross-institutional desensitized data set: first, abnormal records and duplicate data are removed using a rule-based filtering method; second, missing values are processed using mean imputation or K-nearest neighbor algorithm to ensure data integrity; finally, Z-score standardization is used to normalize continuous variables and eliminate the influence of dimension. The extraction of candidate variables is based on a pre-defined medical quality indicator system, including key dimensions such as surgical success rate, complication rate, operation time and patient postoperative recovery indicators. These variables are automatically extracted from the data set through feature engineering and stored in a temporary feature library. Based on the clinical knowledge graph, the International Classification of Diseases (ICD) and the Surgical Operation Coding System (CPT) are integrated to construct a priori knowledge network between variables; at the same time, statistical dependence analysis is performed using Pearson correlation coefficient and mutual information calculation to select a subset of variables with significant correlation (such as p<0.05), such as the correlation between surgical instrument usage frequency and patient physiological parameter fluctuations. When constructing the initial undirected variable network, the nodes represent the selected variable subset, and the edges represent the potential dependency between variables. The network structure is stored through an adjacency matrix or a graph database, and a preliminary topology analysis is performed using a visualization tool.
[0032] S202, based on the conditional independence test rule, the edges of the initial undirected variable network are pruned, the remaining edges are oriented using the collision node rule, and a partial directed acyclic graph is generated;
[0033] In step S202, it needs to be specified that the conditional independence test rule uses a statistical method based on chi-square test or G-test to evaluate the independence of each pair of nodes in the initial undirected variable network, which includes the following operations: first, construct a condition set Z, which consists of covariates related to the target variable pair, such as surgical operation sequence or physiological parameter fluctuations; second, apply chi-square test to calculate the conditional independence of variable pair (X, Y) given Z, if the p-value is greater than the pre-set significance threshold (such as 0.05), then X and Y are independent, and the undirected edge between them is removed; this pruning process is achieved by iteratively traversing all variable pairs, effectively eliminating false dependency relationships. Subsequently, the remaining edges are oriented using the collision node rule, which is as follows: identify V-structure (i.e. when variables A and B both point to C, but A and B have no direct connection), orient the incoming edge of collision node C as a directed edge; at the same time, based on the causal directionality constraint (such as time sequence), further orient other edges to ensure that the generated partial directed acyclic graph (PDAG) meets the causal distinguishability requirement. The entire orientation process is implemented using graph theory algorithms, and the adjacency matrix storage structure of PDAG is output.
[0034] S203, constructing a scoring function using Bayesian information criterion to evaluate the goodness of fit and complexity penalty of different edge combinations in the partial directed acyclic graph, optimizing the edge direction, and obtaining an initial causal graph;
[0035] The expression of the scoring function is:
[0036]
[0037] wherein, represents an optimization target, represents a current causal graph, represents a likelihood function, represents the total sample size of the cross-institution de-identification data set, represents the number of causal graph parameters, represents a prior constraint weight, represents the number of controversial edges in the current graph, represents an indicator function, represents the i th controversial edge in the causal graph
[0038] In step S203, the specific calculation process of the scoring function is as follows: first, the likelihood function value is calculated by the maximum likelihood estimation method, the graph structure corresponds to the current partial directed acyclic graph, and the multivariate Gaussian distribution or discrete Bayesian network model is used for probability fitting; second, the number of parameters is defined as the sum of node parameters and directed edges in the graph, and the total sample size is directly obtained from the metadata of the de-identification data set; the prior constraint weight is preset as an empirical value of 0.1, which is used to balance the model complexity penalty term and the controversial edge constraint; the number of controversial edges is counted by a graph traversal algorithm, and the indicator function takes a value of 1 when the edge direction is not determined, otherwise it is 0. The optimization process uses a greedy search strategy: traverse all controversial edge direction combinations in the PDAG, calculate the scoring function value of each combination, and retain the top 10 candidate graph structures with the highest scoring function value; based on the Bayesian information criterion, the candidate graphs are further screened to remove parameter redundant structures (such as redundant loops or invalid nodes), and finally the initial causal graph with the maximum scoring function value and satisfying the directed acyclic graph constraint is output. In use, the adjacency matrix operation is realized by a graph theory library, and the scoring calculation module is integrated with the statistical modeling toolkit of Scikit-learn, ensuring efficient optimization of large-scale graph structures in a distributed environment.
[0039] S204, generating a set of multi-version causal graphs based on the initial causal graph using the resampling method, retaining high-frequency edges in the causal graph set, introducing expert rule forced correction for controversial edges, and obtaining an optimized medical quality causal graph.
[0040] In step S204, it needs to be specified that the resampling method is implemented by Bootstrap technology, and the specific operation includes: randomly sampling samples from the cross-institutional de-identification data set (the sampling ratio is 70%, and the repetition is 1000 times), generating 1000 resampling data sets; based on each resampling data set, applying the causal graph construction algorithm in steps S201 to S203 (including the constraint base and scoring base mixed algorithm and the Bayesian information criterion optimization), outputting 1000 versions of the causal graph set, and the set is stored in the graph database for subsequent analysis. The retention strategy of high-frequency edges is defined as: traversing all versions of the causal graph, counting the appearance frequency of each edge; set a frequency threshold (such as 90%), only retain the edges with an appearance frequency greater than the threshold, form a core edge skeleton; for the edges with a frequency lower than the threshold, mark them as controversial edges, and record their direction distribution (such as the proportion of inconsistent directions is more than 30%). The modification of controversial edges introduces a pre-defined expert rule base, which integrates clinical guidelines (such as WHO surgical safety standards) and medical quality indicators (such as postoperative complication risk paths), and forcibly covers the direction of controversial edges; for example, when the edge between the operation time and the physiological parameter fluctuation of the patient is controversial in direction, the rule "time precedence" is applied to forcibly orient the operation time to affect the physiological parameter. The optimized medical quality causal graph is generated by merging the core edge skeleton and the modified controversial edges, and finally outputs a directed acyclic graph structure, and is stored in a distributed graph computing engine to support real-time query. When used, Apache Spark GraphX is used to realize resampling and frequency statistics, the expert rule base is configured in JSON format, and the modification operation is automatically executed through a rule engine (such as Drools).
[0041] As an optional embodiment of the present application, optionally, outputting the interpretable causal relationship model in step S3 includes:
[0042] S301, performing medical semantic annotation on the optimized medical quality causal graph, adding clinical explanation labels and effect size ranges to each causal edge, and obtaining a semantically annotated causal graph;
[0043] In step S301, it needs to be specified that the specific operation of medical semantic annotation includes: first, integrate the pre-constructed clinical knowledge base (such as SNOMEDCT or UMLS ontology), automatically match the standard medical concept for each causal edge through the graph traversal algorithm, and generate the initial explanation label; for example, for the edge between the frequency of surgical instrument use and the fluctuation of patient blood oxygen saturation, the label is defined as "operation affects physiological stability", and the effect size range is calculated based on the effect size statistics (such as linear regression coefficient or risk ratio) in the historical data, the specific range is represented as [lower limit, upper limit], wherein the lower limit is the lower limit of the 95% confidence interval, and the upper limit is the upper limit of the 95% confidence interval. Second, introduce a semi-automatic verification mechanism: use a natural language processing module (such as a BERT model) to parse clinical guideline text and generate candidate labels, and verify and correct them through the crowdsourcing feedback of a group of medical experts to ensure the clinical accuracy and consistency of the labels. Finally, the semantically annotated causal graph is stored in the graph database in the form of an attribute graph structure, and each edge is attached with JSON-formatted metadata, including label text, effect size value and confidence score.
[0044] S302, based on the clinical knowledge graph and the time series data analysis, filtering a set of intervention variables from the semantically annotated causal graph;
[0045] In step S302, it needs to be specified that the specific operation of screening the set of intervenable variables includes: first, applying a graph traversal algorithm (such as depth-first search or breadth-first search) to traverse the semantic annotated causal graph, extracting the variable attributes of all nodes and the effect range of the corresponding edges; second, combining the clinical knowledge graph (such as integrating ICD intervention path or NCCN guidelines), matching the pre-defined intervention priority label (such as "high intervenability" or "low intervenability") for each variable, the specific matching rule is: if the variable is marked as a standard clinical intervention point (such as drug adjustment or operation process change) in the knowledge graph, it is automatically marked as a candidate intervention variable. At the same time, based on the time series data analysis (such as the feature sequence after dynamic time warping processing), the future fluctuation trend of the variable is predicted by using the autoregressive model (ARIMA) or long short-term memory network (LSTM), the intervention sensitivity index (such as control gain or state transition probability) is calculated, the sensitivity threshold (such as gain>0.5 or transition probability<0.3) is set, and only the variables meeting the threshold are reserved. Finally, the above results are integrated through a voting mechanism: if the variable meets the intervention priority of the clinical knowledge graph and the sensitivity requirement of the time series analysis at the same time, it will be included in the set of intervenable variables; the set is stored in the distributed database in the key-value pair format (variable name: intervention priority), and supports real-time update and query. When used, Apache Spark GraphFrames library is used to realize graph traversal, clinical knowledge graph is integrated through Neo4j graph database, and time series analysis module is integrated with TensorFlow framework to ensure efficient calculation.
[0046] S303, using the Do calculus to construct counterfactual intervention on the set of intervenable variables, generating a counterfactual query library covering high-risk medical paths;
[0047] In step 303, it needs to be specified that the construction process of counterfactual intervention strictly follows the three rule system of Judea Pearl's Do calculus, and the specific operation process is as follows: first, based on the semantic annotation of the causal graph, the target variable set V and its parent node set PA(V) are identified, the input edge of variable X is cut off through intervention operator, and its value is forced to be set to a specific interval (such as the frequency of surgical instrument use x∈[5,10] times / min); second, the backdoor criterion and the frontdoor criterion are applied to adjust the confounding factors, and the conditional probability distribution after intervention is calculated, in which Y is the result variable (such as the fluctuation amplitude of patient physiological parameters), and Z is the adjusted covariate set (such as the patient's basic disease state). The generation of counterfactual query library is realized by traversing high-risk medical path: based on historical adverse event data (such as operation complication record), the key decision nodes (such as specific operation steps or instrument use threshold) in the path are identified, and the formal counterfactual problem is constructed (for example: “if the frequency of instrument use is reduced by 20% at time t, how does the probability of patient oxygen saturation decrease change?”). Each counterfactual problem is converted into a query template containing three elements: 1) intervention variable and value interval; 2) target result variable and observation condition; 3) effect quantity calculation function (such as risk difference RD or number of patients needing treatment NNT). The query library is stored in Neo4j database in graph structure, each node represents a counterfactual problem, and the edge connects the continuous intervention steps with causal dependence relationship, supporting real-time retrieval of intervention scheme of high-risk path through Cypher query language.
[0048] S304、based on the backdoor criterion, eliminate the confounding variable bias in the counterfactual query library, calculate the counterfactual conditional probability, output the counterfactual result, and introduce expert rules to forcibly correct the counterfactual result;
[0049] The expression for calculating the counterfactual conditional probability is:
[0050]
[0051] wherein, represents the conditional probability of the result variable Y when the intervention variable X is set to the counterfactual value x* under the condition that the covariate Z takes the value z*, represents the unobserved confounding factor, under the condition that the intervention variable X takes the value x*, the covariate Z takes the value z*, and the unobserved confounding factor U takes the value u*, the probability distribution of the result variable Y, denotes the covariate takes the value under the condition that the unobserved confounder takes the value ;
[0052] In step S304, it needs to be specified that the specific operation of eliminating the confounding variable bias includes: first, based on the medical quality causal graph after semantic annotation, the backdoor criterion is applied to identify the adjustment set Z (such as patient basic disease state or surgical environment parameters), and the confounder path is automatically located through the graph traversal algorithm (such as depth-first search); second, the Bayesian network inference technology is used, and the historical distribution in the cross-institution desensitization data set is combined to calculate the adjusted conditional probability distribution, wherein the integral calculation is realized by Monte Carlo simulation (repeated sampling 10000 times, and numerical integration is performed by using NumPy library), and it is ensured that the unobserved confounder U still can be accurately estimated when it exists. After calculating the counterfactual conditional probability, the specific process of outputting the counterfactual result includes: generating a structured report containing the intervention variable value interval, the target result variable conditional probability and the confidence interval (such as 95% confidence interval), and storing it in a distributed graph database (such as Neo4j) in JSON format, supporting real-time query and visual display (such as generating a trend chart by using Matplotlib). The operation of introducing expert rules to forcibly correct the counterfactual result is defined as: integrating a pre-built clinical rule library (such as based on WHO guidelines or NCCN standards, configured by Drools rule engine), automatically scanning the abnormal values in the output result (such as the probability value exceeding the clinical feasible range [0, 1] or conflicting with known medical knowledge), and applying the forced correction rule (for example, “when the postoperative complication probability exceeds the threshold value 0.8, automatically adjust to the historical average”) to cover the controversial result; the revised counterfactual result is checked again through the crowdsourcing feedback mechanism (such as a doctor expert group review), to ensure that the final output meets the requirements of clinical consistency and interpretability. When used, the TensorFlowProbability library is used to realize the probability calculation, and the rule engine interacts with the database through the RESTAPI, to ensure efficient processing of large-scale counterfactual queries in a distributed environment.
[0053] S305, using Bootstrap resampling to evaluate the statistical significance of the revised counterfactual result, marking low confidence intervention scenarios based on the significance, and obtaining counterfactual intervention scenarios;
[0054] In step S305, it needs to be specified that the statistical significance of the corrected counterfactual results is evaluated using Bootstrap resampling techniques, and the specific operations include: first, randomly extract a subsample from the original cross-institutional de-identification dataset (sampling ratio is 80%, repeated 1000 times), generate 1000 resampling datasets; for each resampling dataset, re-execute the counterfactual conditional probability calculation (based on the results corrected in step S304), obtain the effect size distribution (such as risk difference RD or number of people needing treatment NNT). Secondly, based on the distribution, calculate the confidence interval (95% confidence level) and p value (using t test or Wilcoxon signed rank test) of each counterfactual scenario, set the significance threshold (such as p<0.05) and the confidence interval width threshold (such as width>0.2); if the p value of the scene is greater than the threshold or the confidence interval width exceeds the preset value, it is automatically marked as a low-confidence intervention scene, and its uncertainty score is recorded (such as a value in the [0,1] interval, the lower the value, the worse the confidence). Finally, integrate the outputs of all scenarios to generate a counterfactual intervention scenario set, which is stored in a distributed graph database (such as Neo4j) in a structured format (such as a JSON array), and each scenario is attached with metadata (including effect size, confidence interval, p value and confidence label). When used, the statistical test is implemented using the SciPy library in Python, and the Bootstrap resampling is parallelized through the MLlib module of Apache Spark to ensure efficient operation on large-scale data.
[0055] S306, based on the counterfactual intervention scenario, generate and output an interpretable causal relationship model containing detailed description of counterfactual intervention scenario, statistical significance analysis and expert correction results.
[0056] In step S306, it needs to be specified that based on the counterfactual intervention scenario, an interpretable causal relationship model containing counterfactual intervention scenario detailed description, statistical significance analysis and expert correction result is generated and output. The specific operation includes: first, the structured integration of each counterfactual intervention scenario output in step S305 is performed to generate a complete entry containing scene description (such as intervention variable, target variable, hypothetical condition), original counterfactual probability calculation result, expert correction rule application record, Bootstrap resampling effect size distribution (including mean, 95% confidence interval, p value) and confidence label; second, based on the integrated scene entry, a visual model tree structure with intervention path as the core is constructed, wherein the root node is the initial intervention point, the branch node represents the continuous intervention step, and the leaf node stores the final counterfactual result and its statistical attributes; at the same time, a natural language explanation template is attached to each intervention path, which automatically fills the effect size value and confidence information (for example: “When the frequency of instrument use is controlled at [lower limit, upper limit] times / minute, the probability of patient oxygen saturation decrease is expected to be reduced [effect size] % (95% CI: [lower limit, upper limit]), and the confidence of this conclusion is [high / medium / low]”) ; finally, the model tree structure, explanation template and underlying data are associated and integrated into a standardized output module in JSON-LD format, which is integrated into a clinical decision support system through a pre-defined API interface, supports real-time retrieval and dynamic visual display (such as generating an interactive causal path graph through D3.js) according to medical event types (such as surgical complication warning) or intervention variable categories. In use, the model tree construction is realized by NetworkX library, the explanation template generation integrates Jinja2 engine, and the API service is deployed through Flask framework to ensure low delay response.
[0057] As an optional embodiment of the present application, optionally, the global medical quality dynamic evaluation model optimized by the population in step S4 includes:
[0058] S401, construct the basic framework of the federated learning optimization framework;
[0059] In step S401, it needs to be specified that the specific operation of constructing the infrastructure of the federated learning optimization framework includes: first, designing a distributed federated learning architecture composed of a central aggregation server and multiple participant nodes (such as medical institutions), the central server is deployed in the cloud (such as AWS or Azure environment), the participant nodes access through API interface, and the local medical data set is stored and processed; second, implement a secure communication mechanism, use TLS / SSL protocol to encrypt data transmission, ensure privacy protection in model parameter exchange process (such as applying differential privacy technology to add Gaussian noise, and setting noise scale parameter ε to 0.5 to balance privacy and utility); third, configure the federated training workflow, the central server initializes the global model (such as the interpretable causal relationship model based on the output of step S3), the participant nodes use local data to perform model training (the training framework integrates TensorFlowFederated library), and update the global model through periodic aggregation strategy (such as FedAvg algorithm); finally, establish a participant management module, including node registration, authentication and contribution evaluation (based on Shapley value calculation), the architecture is deployed through Kubernetes containerization, supporting elastic expansion and fault recovery. In use, the central server uses Flask framework to build RESTful API, the participant nodes integrate PyTorchLightning to realize efficient local training, and the security communication layer uses OpenSSL library to realize.
[0060] S402, under the infrastructure of the federated learning optimization framework, each medical institution trains and updates the local causal relationship model using local data, preprocesses structured data, unstructured data and time series data, and uses appropriate loss function and optimization algorithm to train the causal relationship model;
[0061] In step S402, it is necessary to specify that each medical institution first preprocesses the local data: structured data (such as diagnosis codes and laboratory indicators in electronic health records) is processed by standardization (Z-score normalization) and feature selection (such as a mutual information-based method) to eliminate the influence of dimension; unstructured data (such as clinical text reports and image descriptions) is converted into a structured feature vector using natural language processing techniques (such as the integrated HuggingFace BERT model for entity recognition and sentiment analysis); time series data (such as vital sign monitoring streams and medication use records) is segmented by sliding window (window size 60 minutes) and time series feature extraction (such as calculating mean, variance, and autocorrelation coefficients) to generate input sequences. After preprocessing, the model output error is evaluated using a suitable loss function (such as a cross-entropy loss function for classification tasks or a mean square error loss function for regression tasks); the optimization algorithm uses the Adam optimizer combined with gradient clipping (threshold set to 1.0) to prevent gradient explosion; the training of the local causal relationship model is implemented based on the TensorFlow framework, and the validation set metrics (such as accuracy or AUC) are calculated after each epoch, and the early stopping strategy is used to optimize the training efficiency. The training update process is executed on the local node to ensure that the original data does not leave the domain, and only the model parameter gradient is uploaded to the central server for federal aggregation.
[0062] S403, using the PPO algorithm to dynamically aggregate the causal relationship model parameters of each medical institution locally, based on the aggregated model parameters, using the center server in the infrastructure of the federal learning optimization framework to generate aggregation weights according to the strategy network, and obtaining global model update parameters by weighted average according to the weights;
[0063] In step S403, it needs to be specified that the specific implementation of PPO algorithm includes: first, deploying a policy network (a three-layer fully connected neural network constructed based on PyTorch) in the central server, the input of which is the model parameter update uploaded by the participant node and the local validation set performance indicators (such as accuracy and recall rate); the output is the aggregation weight vector of each node. The objective function of the policy network is designed to maximize the expected reward of the global model on the validation set (the reward function is defined as the improvement amplitude of the validation set F1 score), while constraining the KL divergence difference between the new and old strategies (set threshold δ = 0.01). Second, the proximal policy optimization algorithm (PPO-Clip version) is used to train the policy network, and the weight distribution strategy is adjusted through multiple iterations (the typical number of iterations is 50 rounds): in each round, the central server collects the parameter updates (gradient tensor form) of all nodes, the policy network calculates the current weight distribution πθ(a|s), performs weighted average operation to obtain the temporary global model; then the performance of the temporary model is evaluated on the reserved validation set and the reward value is calculated, and then the policy network parameters θ are updated (the learning rate is set to 0.001, and the Adam optimizer is used). Finally, the node parameter updates are weighted and averaged according to the output weight of the converged policy network. When used, the policy network training is based on the Ray framework to realize distributed reinforcement learning, and the weighted average calculation uses the einsum function of the NumPy library to efficiently perform tensor operations.
[0064] S404, introduce a doctor crowdsourcing labeling mechanism in the infrastructure of the federated learning optimization framework. Doctors correct and label the model prediction results according to their professional knowledge and experience, and the central server integrates the labeling results and feeds them back to the model for optimization.
[0065] In step S404, it needs to be specified that first, the specific implementation of the doctor crowdsourcing annotation platform is constructed: the platform adopts micro-service architecture, the front end uses Vue.js framework to develop interactive Web interface (such as integrating ECharts visualization components), and allows authorized doctors to log in to view the counterfactual scenario results predicted by the model (presented in JSON format, including intervention variables, target variable probability distribution and confidence interval); doctors can correct abnormal probability values (such as manually adjusting to the clinically feasible range [0, 1]), add text annotations (such as "this result conflicts with the NCCN guidelines") and select confidence labels (high, medium and low levels). Secondly, the annotation data is transmitted to the central server in real time through asynchronous RESTAPI (based on gRPC protocol to optimize delay), and the server side uses Cassandra database to store annotation records (including timestamp, doctor ID and correction content), supporting high-concurrency writing; the central server performs batch processing tasks every day, applies a weight allocation algorithm based on Shapley value (the weight is calculated according to the doctor's professional level and historical annotation consistency) to integrate the annotation results, and generates a consensus correction dataset. Then, the correction data is fed back to the federated learning framework: the central server distributes the integrated annotation results to each participant node, and the node local model updates the training data or adjusts the loss function weight (such as increasing the weight of the annotated sample in the cross-entropy loss) through incremental learning (such as using the retrain method of TensorFlow); at the same time, the annotation triggers the expert rule library to dynamically optimize (such as when more than 70% of doctors annotate that a rule is invalid, the rule is automatically disabled through the Drools engine). When in use, the front end is deployed on the Nginx server, the back end uses Node.js to process API logic, data transmission uses TLS1.3 encryption and JWT token authentication to ensure security and real-time performance in a distributed environment.
[0066] S405, repeat steps S402-S404 for iterative optimization, generate a globally optimized global medical quality dynamic evaluation model.
[0067] In step S405, it needs to be specified that the specific process of iterative optimization includes: first, the central server broadcasts the latest global model parameters to all participant nodes before each round of training (using ProtocolBuffers serialization format to reduce transmission overhead); after each node performs local training based on local data in step S402, the encrypted model parameter update (gradient tensor is processed by differential privacy, noise parameter δ=0.01) and local verification index (such as AUC, F1 score) are uploaded through the secure channel. Second, the central server performs the PPO algorithm in step S403 to dynamically adjust the aggregation weight and generate an updated global model; at the same time, the crowd labeling mechanism in step S404 is triggered, and the key counterfactual prediction (scenario with confidence less than 0.6) generated in this round is pushed to the doctor labeling platform, and the doctor's correction result is fed back to the server within 12 hours. After each iteration, the system automatically calculates the global model performance change rate (such as the decline amplitude of the validation set loss function less than 0.5% for three rounds) and the participant contribution variance (Shapley value variation coefficient>0.3) as the termination condition judgment basis. When the convergence criteria are met or the maximum number of iterations (default 100 rounds) is reached, the final optimized global model is output, which is stored in HDF5 format on the central server and synchronized to the edge computing nodes of each medical institution through version control (such as GitLFS), supporting real-time quality evaluation reasoning (delay <200ms).
[0068] As an optional embodiment of the application, optionally, the expression of the PPO algorithm is:
[0069]
[0070] wherein, represents the clipping objective function of the proximal policy optimization algorithm, represents the expectation of the time step , represents the probability of the new policy network taking action in state , represents the probability of the old policy network taking action in state , represents the advantage function under the old policy , represents the clipping function, represents a positive number for defining the boundary range of clipping.
[0071] As an optional embodiment of the application, optionally, generating a dynamic quality score at each time t in step S5 using the global medical quality dynamic evaluation model includes:
[0072] S501, construct a digital twin model of the surgical scene and the patient state, and establish a three-dimensional virtual model covering surgical instrument positioning, surgical process logic, and patient physiological dynamics by integrating operating room sensor data, patient electronic medical records, and real-time physiological monitoring data;
[0073] In step S501, it needs to be specified that the construction of the digital twin model is realized through multi-source heterogeneous data fusion: first, based on the UWB positioning sensor (refresh rate 100 Hz) and the inertial measurement unit (IMU) deployed in the operating room, the spatial coordinates and motion trajectories of the surgical instruments are captured in real time (accuracy ±1.5 mm), and are converted into six-degree-of-freedom pose data in the ROS coordinate system; second, through the OpenIGTLink protocol, the patient real-time physiological monitoring data stream (such as ECG waveform sampling rate 500 Hz, blood pressure monitoring interval 30 seconds) is accessed, combined with the preoperative baseline indicators in the electronic medical record (such as ASA classification, comorbidity list), and a patient physiological state dynamic vector (containing 15-dimensional time series features) is constructed; finally, the preoperative imaging data in DICOM format (such as CT / MRI three-dimensional reconstruction model) and the surgical procedure knowledge graph (containing the logical relationship of surgical stages defined by ISO8370 standard) are integrated, and an interactive three-dimensional virtual surgical scene is constructed in Unity3D engine. The specific construction process is as follows: first, use the AssetImportPipeline of Unity3D to import the imaging data in DICOM format (such as three-dimensional reconstruction by Python script calling SimpleITK library), generate a patient-specific anatomical model (mesh accuracy <0.5 mm); second, subscribe to the six-degree-of-freedom pose data in the ROS topic (update frequency 100 Hz) through the ROS# plug-in of Unity, drive the motion trajectory of the virtual surgical instrument (collision detection based on physical engine such as PhysX); then, use the Timeline system of Unity to integrate the surgical procedure knowledge graph (logical rules stored in JSON format), design an interactive surgical stage switching interface (such as adding event triggers to control the visualization of surgical progress); then, access the OpenIGTLink data stream (using TCP / IP protocol) through the WebGL module of Unity, dynamically map the physiological monitoring data to the parameter panel of the virtual model (such as heart rate waveform rendered in real time by ShaderGraph); finally, add doctor interaction controls (such as VR hand support for HTC Vive devices), realize the scaling, rotating and labeling functions of the three-dimensional scene (integrate UnityXRInteractionToolkit), ensure that the model response delay is <50 ms.
[0074] S502, use data interface and communication mechanism to map the surgical instrument position coordinates, operation sequence information and patient physiological parameters in the three-dimensional virtual model to the global medical quality dynamic evaluation model in real time;
[0075] Specifically, first, the data interface uses the ROS (Robot Operating System) message interface to realize real-time communication with the OpenIGTLink protocol: through the ROS node, the position coordinates and operation sequence information of the surgical instrument are subscribed (the surgical stage events are packaged in JSON format, such as incision start or suture completion); at the same time, the physiological parameters of the patient (such as the sampling rate of the electrocardiogram waveform is 500Hz, the blood pressure value interval is 30 seconds, and the data format is IGTL_SCALAR or IGTL_WAVEFORM) are transmitted through the OpenIGTLink protocol (based on the TCP / IP protocol, port number 18944). Second, the communication mechanism is designed as an asynchronous publish-subscribe mode: the central server deploys the ROS master node and the OpenIGTLink server, and each edge node (operating room terminal) is used as a client to push data in real time; the ZeroMQ library is used to optimize the message queue (the buffer size is set to 512KB), to ensure that the data transmission delay is <20ms, and the connection stability is maintained through heartbeat detection (interval 1 second). Then, the mapping process includes data conversion and alignment: after the position coordinates of the surgical instrument are converted through coordinate transformation (the UWB coordinate system is converted to the world coordinate system using the TF library of ROS, with an accuracy error of <2mm), a three-dimensional spatial feature vector (including position, rotation angle, etc. 6 dimensions) is generated; the operation sequence information is parsed into a time sequence event sequence (such as extracting the timestamp and event type through the json library by using the Python script), and is encoded into a one-hot vector; the physiological parameters of the patient are smoothed through a sliding window (window size 10 seconds) and standardized (Z-score normalization), and are integrated into a 15-dimensional physiological state vector. All data are aggregated in real time on the central server side, the concatenate function of the NumPy library is called to concatenate the feature vectors, and the global model input tensor is formed. In terms of optimization, a real-time verification mechanism is integrated: data integrity checks are performed before mapping (such as verifying the continuity of the timestamp and the value range, and triggering a ROS warning topic for abnormal values); after mapping, the DatasetAPI of TensorFlow is used to realize the data pipeline (pre-fetch buffer size 128), to support online inference of the global model (response delay <50ms). In use, the interface module is developed based on Python3.8, the roslibpy library is used to bridge ROS and web services, communication security is encrypted through TLS1.3 and JWT token authentication (key length 256 bits), to ensure reliability and real-time performance in a distributed environment.
[0076] S503, based on the mapping data, using the global medical quality dynamic evaluation model to perform feature extraction, model inference and score calculation, and generating a dynamic quality score in each time t.
[0077] In step S503, the feature extraction link is developed based on the multi-layer perceptron structure of the global model: the model input layer receives the 156-dimensional feature vector aggregated by the central server (including 6-dimensional surgical instrument spatial features, 12-dimensional operation timing features, and 138-dimensional physiological state features), which is normalized by the BatchNormalization layer and then subjected to nonlinear transformation by two hidden layers (containing 256 and 128 neurons respectively, with the ReLU activation function) to extract deep features related to medical quality (such as surgical operation compliance and patient physiological stability). Second, the TensorFlowLite framework is used to deploy the optimized global model in the model inference stage: the central server converts the trained HDF5 format model into TFLite format (the model size is compressed to 12.8MB), and distributes it to each edge computing node through the gRPC protocol; after the node loads the model, it inputs the real-time mapping data for inference (the time consumption of a single inference is less than 35ms), and outputs the original score vector containing 12 quality indicators (such as surgical time deviation rate and instrument use specification). Then, the score calculation module applies a dynamic weight adjustment mechanism: according to the type of surgery (such as heart surgery focusing on physiological indicators and orthopedic surgery focusing on operation indicators), the weight configuration file (JSON format) is loaded from the expert rule library, and the original score vector is weighted and summed; at the same time, a time decay factor (such as a physiological indicator weight decreasing by 15% per hour within 24 hours after surgery) is introduced to generate the final dynamic quality score (range 0-100 points, precision retained to 1 decimal place). In terms of optimization, an abnormal value processing mechanism is integrated: when a score mutation (such as a score difference between adjacent time points greater than 20 points) is detected, a secondary verification process is triggered (the local backup model is called to re-infer), and warning information is generated by the Drools rule engine (such as "abnormal blood pressure fluctuation in stage 3, suggest manual review"). In use, the score result is pushed to the operating room monitoring terminal in real time through the WebSocket protocol (delay < 50ms), and the terminal interface uses the ECharts visualization component to display the score trend chart (including threshold line markers) and index detail pop-up window, supporting doctors to view historical score records through touch operation (stored in the InfluxDB time series database).
[0078] As an optional embodiment of the present application, optionally, the dynamic quality score is generated in step S503 at each time t, comprising:
[0079] S5031, real-time feature extraction is performed on the mapping data, and standardization is performed to obtain a feature vector;
[0080] In step S5031, it needs to be specified that the real-time feature extraction process is performed on the multi-modal data in the surgical scene: first, for the surgical instrument position coordinate data, it is converted from the UWB local coordinate system to the world coordinate system through the TF transformation library of ROS, eliminating the coordinate deviation between different sensors, generating a 6-dimensional spatial feature vector containing three-dimensional spatial position (X, Y, Z) and rotation angle (Roll, Pitch, Yaw), ensuring that the spatial positioning accuracy error is less than 2mm; second, for the operation sequence information, the json library of Python is used to parse the surgical stage events (such as "instrument enters the field of view", "suture begins", etc.) encapsulated in the ROS message, extract the event type and timestamp, build a time sequence event sequence, and convert it into a 12-dimensional time sequence feature vector through One-Hot Encoding, where each bit represents a surgical stage state (0 means not occurred, 1 means occurred); finally, for the patient physiological parameters, the electrocardiogram waveform (sampling rate 500Hz) and blood pressure value (interval 30 seconds) data received through the OpenIGTLink protocol, first use the sliding window smoothing algorithm (window size 10 seconds) to eliminate transient noise, and then through Z-score standardization processing (mean zero, standard deviation unity), generate a 138-dimensional physiological state feature vector, covering key indicators such as heart rate variability and blood pressure fluctuation range. The StandardScaler class of Scikit-learn is used in the standardization process to ensure that all feature value distributions conform to the standard normal distribution (mean μ=0, standard deviation σ=1), eliminating the influence of different dimensions on model training. Finally, the 6-dimensional spatial features, 12-dimensional time sequence features and 138-dimensional physiological features are concatenated into a 156-dimensional feature vector through the concatenate function of NumPy library, which is used as the input data of the global medical quality dynamic evaluation model. In the feature extraction process, a data quality checking mechanism is integrated: through the ROS topic subscriber, the continuity of data timestamp is monitored in real time, if the abnormality of time interval exceeding 50ms is detected, the ROS warning topic is triggered immediately and the log is recorded; at the same time, the range of physiological parameter is checked (such as heart rate normal range 40-120 times / min), if it exceeds the threshold, it is marked as abnormal data, and in the subsequent model reasoning, it is excluded by mask processing, ensuring the reliability and consistency of the input data.
[0081] S5032, input the feature vector into the global medical quality dynamic evaluation model, perform model reasoning through multi-layer neural network, and generate medical quality prediction value;
[0082] In step S5032, it needs to be specified that the global medical quality dynamic evaluation model adopts a multi-layer perception structure. After the input layer receives a 156-dimensional feature vector, it is first normalized by the BatchNormalization layer to eliminate the dimensional differences between features and speed up model convergence. Subsequently, the data enters the first hidden layer, which contains 256 neurons and uses the ReLU activation function to introduce non-linear transformation, enabling the model to capture complex interactions between features. Then, the data is transmitted to the second hidden layer, which contains 128 neurons and also uses the ReLU activation function, further extracting deep features highly related to medical quality, such as the standardization of surgical operations and the stability of patient physiological states. During the model inference phase, the central server converts the trained HDF5 format model to TFLite format to reduce the model size and improve inference speed, compressing the model size to 12.8 MB. The converted model is distributed to each edge computing node through the gRPC protocol. After the node loads the model, it inputs real-time mapping data for inference. During the inference process, the model performs forward propagation on the input feature vector, calculates the medical quality prediction value of the output layer through the weight matrix and bias vector of each layer, and obtains an original score vector containing 12 quality indicators, such as surgical time deviation rate, instrument use standardization, and patient physiological indicator fluctuation range. The single inference time is less than 35 ms, meeting the real-time requirement. To ensure the accuracy and stability of the inference, the model uses Dropout and L2 regularization techniques to prevent overfitting during the training phase, and integrates an outlier detection mechanism during the inference phase. When detecting outliers in the input data (such as feature values exceeding the reasonable range), the model automatically triggers an alarm and records logs.
[0083] S5033, based on the medical quality prediction value, a preset scoring function is applied to calculate the dynamic quality score at each time t.
[0084] In step S5033, it needs to be specified that the dynamic quality score is calculated based on the following core mechanism: first, extract the quality indicator values (such as surgical time deviation rate s1, instrument use standardization s2, and physiological stability index s3) from the 12-dimensional original score vector output by the global model; second, load the corresponding dynamic weight configuration file (JSON format) according to the real-time surgical stage (determined by the ROS event timestamp), for example, in the "vascular anastomosis" stage of heart surgery, the physiological indicator weight is increased to 0.35, while the operation indicator weight is reduced to 0.15; at the same time, apply a time decay factor (t is the postoperative hour number, upper limit 24 hours) to decay and weight the historical scores of non-critical stages.
[0085] The system incorporates correction coefficients from the expert rule base: when a specific event combination is detected (e.g., "sudden drop in blood pressure + continuous use of high-frequency electrosurgical unit for >60 seconds"), correction rules (e.g., multiplying by a compliance coefficient of 0.8) are invoked via the Drools engine. The final score is truncated (forced to return to the boundary value when outside the range [0,100]) and retained to one decimal place before being pushed to the monitoring terminal via WebSocket. For anomaly handling, if adjacent scores differ, the system automatically triggers parallel inference on a local backup model (a lightweight TFLite model, 4.2MB in size). When the difference persists, a level three alert is generated (e.g., "Score anomaly: a surge in instrument trajectory offset in stage 3"), and the anomaly time point is marked with a flashing red indicator on the ECharts chart. All scoring results are synchronously written to the InfluxDB database, storing fields including timestamp, original vector, weight configuration version, and verification hash (SHA-256 algorithm) to ensure the integrity of audit traceability.
[0086] As an optional embodiment of the present invention, the expression for generating the predicted medical quality value is optionally:
[0087]
[0088]
[0089]
[0090] in, Indicates time The predicted value of dynamic quality score, This represents the Sigmoid activation function. Indicates the top-level weight. Indicates time The feature representation that integrates causal priors and dynamic temporal sequences. Indicates top-level bias. Represents the Long Short-Term Memory network. Indicates time eigenvectors, Indicates time The feature representation that integrates causal priors and dynamic temporal sequences. The time parameters representing federated learning optimization are... This represents element-wise multiplication. This represents the correction vector for doctor crowdsourcing annotations. This indicates counterfactual intervention characteristics. This indicates the total number of medical institutions. Indicates the first Aggregated weights of local model parameters for each medical institution Indicates the first individual medical institutions in time Feature vectors extracted from counterfactual intervention scenarios.
[0091] As an optional embodiment of the present invention, the expression of the scoring function may be:
[0092]
[0093]
[0094] in, Indicates time Dynamic quality score, Sigmoid activation function Representing dimension, Represents the set of evaluation dimensions. Representing dimensions Causal weights Representing dimensions In time The predicted value, This represents the trend correction coefficient. This indicates the rating trend over time. This represents the expert correction factor. Indicates time In this embodiment, doctor-annotated correction items are collected in real time through the interactive interface of the operating room monitoring terminal (such as a touch tablet). Specifically, an annotation panel is set below the scoring trend chart in the ECharts visualization interface. When a doctor finds a deviation between the model score and clinical reality, they can activate the annotation function through touch operation. During operation, the doctor directly drags the slider to adjust the current score (range 0-100), and the system automatically records the correction amount and timestamp t. For example, in coronary artery bypass surgery, if the model misjudges the instrument usage standardization as 72 points due to electrosurgical interference, the doctor can correct it to 85 points, generating doctor-annotated correction items.
[0095] Represents the state variable at time t. The value, Indicates the state variable in The value at any given moment.
[0096] In this embodiment, the state variables specifically refer to three core variables: surgical stage state, patient physiological state, and instrument operation state. These variables are dynamically updated through real-time data streams and directly affect the calculation process of dynamic quality scores.
[0097] The surgical stage state is determined by the ROS event timestamp and event type (e.g., "instrument enters field of view" and "suture completion"). By parsing the JSON format configuration file, the weight parameters corresponding to the current stage (e.g., the "vascular anastomosis" stage of a heart surgery) are loaded. The state value is stored in integer encoding form (0 represents inactivation, and 1 represents activation), and the update frequency is once every 100 ms, ensuring synchronization with the surgical process.
[0098] The patient physiological state is based on physiological parameters (e.g., heart rate, blood pressure) received from the OpenIGTLink protocol. After sliding window smoothing and Z-score standardization processing, a state vector is generated, including heart rate variability indicators (HRV) and blood pressure stability indexes. The state value range is limited within the preset threshold (e.g., heart rate 40-120 beats / min), and an abnormality flag is triggered when it exceeds the range.
[0099] The instrument operation state uses the position data converted by the UWB coordinate system to calculate the trajectory offset and operation specification. The state value is updated by real-time TF transformation, with an error control within 2 mm. In the scoring function, these state variables are used to dynamically adjust the weight configuration and correction coefficient: for example, when the surgical stage state is "vascular anastomosis", the physiological state weight is increased to 0.35; if an abnormality in the patient's physiological state is detected (e.g., sudden drop in blood pressure), the correction rule is called through the Drools engine (multiplied by a compliance coefficient of 0.8).
[0100] All state variable values are written synchronously into the InfluxDB database at each time t, and the storage fields include timestamp, state encoding, and check hash value (SHA-256 algorithm), facilitating audit traceability and model rollback. At the same time, the system integrates a state monitoring mechanism, which displays the state change trend in real time through the ECharts visualization interface, and triggers an alarm (e.g., red flashing marker) when an abnormality occurs.
[0101] Embodiment 2
[0102] A machine learning-based medical quality dynamic evaluation system, comprising:
[0103] a processor;
[0104] a memory for storing processor-executable instructions;
[0105] wherein the processor is configured to implement a machine learning-based medical quality dynamic evaluation method when executing the executable instructions.
[0106] It should be noted that the computer device includes a processor, a memory, and the computer device can further include one or more of a multimedia component, an input / output (I / O) interface, and a communication component.
[0107] The processor is configured to control the overall operation of the computer device to complete all or part of the steps of the machine learning-based medical quality dynamic assessment method described above.
[0108] The memory is configured to store various types of data to support the operation of the computer device, which can include, for example, instructions for any application or method operating on the computer device, and application-related data; the memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0109] The multimedia component can include a screen, which can be a touch screen, for example, and an audio component for outputting and / or inputting audio signals; for example, the audio component can include a microphone for receiving external audio signals, which can be further stored in the memory or transmitted through the communication component; the audio component also includes at least one speaker for outputting audio signals.
[0110] The I / O interface provides an interface between the processor and other interface modules, which can be a keyboard, mouse, button, etc.; these buttons can be virtual buttons or physical buttons.
[0111] The communication component is configured to perform wired or wireless communication between the computer device and other devices; wireless communication, such as Wi-Fi, Bluetooth, near field communication (NFC), 2G, 3G, 4G or 5G, or a combination of one or more of them, so the corresponding communication component can include a Wi-Fi module, a Bluetooth module, an NFC module, and a mobile communication module.
[0112] As a preferred scheme of the present embodiment, the computer device can be implemented by one or more Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), controller, microcontroller, microprocessor or other electronic elements for executing the machine learning based medical quality dynamic evaluation method described above.
[0113] Although the embodiments of the present application have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made thereto without departing from the principles and the spirit of the present application, the scope of which is defined by the claims and their equivalents.
Claims
1.A method for dynamically evaluating medical quality based on machine learning, characterized in that, The method comprises: S1, collecting structured data, unstructured data and time series data for security aggregation, and generating cross-institutional de-identification data sets; S2, based on the cross-institutional de-identification data set, a constraint base and a scoring base hybrid algorithm is used to dynamically construct a medical quality causal graph, and the Bayesian information criterion is used to optimize the medical quality causal graph result; S3, based on the medical quality causal graph, a counterfactual intervention scenario is generated by using the Do calculus, and an interpretable causal relationship model is output; S4, a federated learning optimization framework is constructed, the causal relationship model parameters of each medical institution are dynamically aggregated by using the PPO algorithm, and a doctor crowdsourcing labeling mechanism is introduced into the federated learning optimization framework to correct the model prediction result in real time, and a globally optimized medical quality dynamic evaluation model is generated; S5, a digital twin model of the operation scene / patient state is constructed, the instrument position, operation sequence and physiological parameters are mapped to the global medical quality dynamic evaluation model in real time, and the global medical quality dynamic evaluation model is used to generate a dynamic quality score once every time t. 2.The machine learning based medical quality dynamic evaluation method of claim 1, wherein, In step S2, based on the cross-institutional de-identification data set, a constraint base and a scoring base hybrid algorithm is used to dynamically construct a medical quality causal graph, and the Bayesian information criterion is used to optimize the medical quality causal graph result, comprising: S201, preprocessing the cross-institutional de-identification data set, and extracting candidate variables related to medical quality; based on the clinical knowledge graph and statistical dependence analysis, a variable subset with potential causal correlation is screened from the candidate variables, and an initial undirected variable network is constructed; S202, based on the conditional independence test rule, the initial undirected variable network is pruned, the remaining edges are oriented by using the collision node rule, and a partial directed acyclic graph is generated; S203, a scoring function is constructed by using the Bayesian information criterion, the fitting degree and complexity penalty of different edge combinations in the partial directed acyclic graph are evaluated, the edge direction is optimized, and an initial causal graph is obtained; S204, based on the initial causal graph, a multi-version causal graph set is generated by using the resampling method, and high-frequency edges in the causal graph set are retained, expert rules are introduced for mandatory correction of the controversial edges, and an optimized medical quality causal graph is obtained. 3.The machine learning based medical quality dynamic evaluation method of claim 1, wherein, In step S3, the output of the interpretable causal relationship model comprises: S301, medical semantic labeling is performed on the optimized medical quality causal graph, a clinical explanation label and an effect size range are added to each causal edge, and a semantically labeled causal graph is obtained; S302, based on the clinical knowledge graph and the time series data analysis, a set of intervenable variables is screened from the semantically labeled causal graph; S303, the Do calculus is used to construct counterfactual intervention on the set of intervenable variables, and a counterfactual query library covering high-risk medical paths is generated; S304, based on the backdoor criterion, the confounding variable bias in the counterfactual query library is eliminated, the counterfactual conditional probability is calculated, the counterfactual result is output, and the counterfactual result is corrected by introducing expert rules for mandatory correction; S305, evaluate the statistical significance of the corrected counterfactual result using Bootstrap resampling, mark low-confidence intervention scenarios based on the significance, and obtain counterfactual intervention scenarios; S306, generate and output an interpretable causal relationship model containing detailed descriptions of counterfactual intervention scenarios, statistical significance analysis, and expert correction results based on the counterfactual intervention scenarios. 4.The machine learning based medical quality dynamic evaluation method of claim 1, wherein, The generation of the globally optimized dynamic medical quality evaluation model in step S4 includes: S401, constructing a basic framework of a federated learning optimization framework; S402, under the basic framework of the federated learning optimization framework, each medical institution trains and updates the local causal relationship model using local data, preprocesses structured data, unstructured data, and time series data, and trains the causal relationship model using a suitable loss function and optimization algorithm; S403, dynamically aggregate the causal relationship model parameters of each medical institution using the PPO algorithm, generate aggregation weights based on the aggregated model parameters using the center server in the basic framework of the federated learning optimization framework according to the policy network, and obtain global model update parameters by weighted average according to the weights; S404, introduce a doctor crowdsourcing labeling mechanism in the basic framework of the federated learning optimization framework, doctors correct and label the model prediction results based on their professional knowledge and experience, the center server integrates the labeling results and feeds them back to the model for optimization; S405, repeat steps S402-S404 for iterative optimization to generate a globally optimized dynamic medical quality evaluation model. 5.The machine learning based medical quality dynamic evaluation method of claim 4, wherein, The expression of the PPO algorithm is: wherein, represents a clipped target function of a proximal policy optimization algorithm, represents an expectation over time steps , represents a probability of a new policy network taking an action in a state , represents a probability of an old policy network taking an action in a state , represents an advantage function under an old policy , represents a clipping function, represents a positive number for defining a boundary range of clipping. 6.The machine learning based medical quality dynamic evaluation method of claim 1, wherein, In step S5, the global medical quality dynamic evaluation model is used to generate a dynamic quality score at each time t, which includes: S501, construct a digital twin model of the surgical scene and patient state, and establish a three-dimensional virtual model covering surgical instrument positioning, surgical process logic, and patient physiological dynamics by integrating operating room sensor data, patient electronic medical records, and real-time physiological monitoring data; S502, use data interfaces and communication mechanisms to map the surgical instrument position coordinates, operation sequence information, and patient physiological parameters in the three-dimensional virtual model to the global medical quality dynamic evaluation model in real time; S503, based on the mapping data, use the global medical quality dynamic evaluation model for feature extraction, model inference, and score calculation to generate a dynamic quality score at each time t. 7.The machine learning based medical quality dynamic evaluation method of claim 6, wherein, In step S503, a dynamic quality score is generated at each time t, which includes: S5031, perform real-time feature extraction on the mapping data and standardize it to obtain a feature vector; S5032, input the feature vector into the global medical quality dynamic evaluation model, perform model inference through a multi-layer neural network, and generate a medical quality prediction value; S5033, based on the medical quality prediction value, apply a preset scoring function to calculate the dynamic quality score at each time t. 8.The method of claim 7, wherein, The expression of generating a medical quality prediction value is: in, Indicates time The predicted value of dynamic quality score, This represents the Sigmoid activation function. Indicates the top-level weight. Indicates time The feature representation that integrates causal priors and dynamic temporal sequences. Indicates top-level bias. Represents the Long Short-Term Memory network. Indicates time eigenvectors, Indicates time The feature representation that integrates causal priors and dynamic temporal sequences. The time parameters representing federated learning optimization are... This represents element-wise multiplication. This represents the correction vector for doctor crowdsourcing annotations. This indicates counterfactual intervention characteristics. This indicates the total number of medical institutions. Indicates the first Aggregated weights of local model parameters for each medical institution Indicates the first individual medical institutions in time Feature vectors extracted from counterfactual intervention scenarios. 9.The machine learning based medical quality dynamic evaluation method of claim 7, wherein, The expression of the scoring function is: wherein, representing a dynamic quality score, at time a sigmoid activation function, representing a dimension, representing a set of evaluation dimensions, representing a causal weight for a dimension representing a predicted value for a dimension representing a predicted value for a dimension at time representing a trend correction coefficient, representing a score time trend term, representing an expert correction coefficient, representing a doctor annotation correction term at time representing a doctor annotation correction term at time representing a doctor annotation correction term at time 10.A machine learning-based medical quality dynamic evaluation system, characterized by, The system includes: a processor; a memory for storing processor-executable instructions; The processor is configured to implement the machine learning-based medical quality dynamic evaluation method in any one of claims 1 to 9 when executing the executable instructions.
Citation Information
Patent Citations
Method and system for optimizing medical decision based on artificial intelligence
CN120260789A
Healthy life management system based on heterogeneous data collaboration
CN120853899A