A collaborative reasoning method and system fusing a medical knowledge graph and a large model

By constructing a collaborative reasoning system based on medical knowledge graphs and large language models, real-time monitoring and secure transmission of medical information are achieved, and interpretable reasoning reports are generated. This solves the problems of delayed knowledge updates, insufficient analytical capabilities, and security risks in clinical decision support systems, and improves reasoning ability and data security.

CN120544940BActive Publication Date: 2026-02-13FUJIAN THINKWIN BIG DATA APPLICATION SERVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511039314.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2026-02-13
Estimated Expiration
2045-07-28

AI Technical Summary

Technical Problem

Existing technologies in clinical decision support systems in the medical field suffer from problems such as slow knowledge updates, insufficient unstructured text parsing capabilities, easy interruption of the inference chain in scenarios with multiple complications, insufficient model credibility, and high security risks.

Method used

By constructing a collaborative reasoning system that combines a medical knowledge graph and a large language model, a dynamically updated knowledge graph is built using multimodal data. By combining differential privacy algorithms and federated learning mechanisms, real-time monitoring and secure transmission of medical information are achieved. Multi-layered encryption mechanisms are used to ensure data security and generate interpretable reasoning reports.

Benefits of technology

It improves the reasoning ability, timeliness, interpretability, and security of medical reasoning, solves the problems of data silos and knowledge lag, and enhances the credibility of models and data privacy protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120544940B_ABST
    Figure CN120544940B_ABST
Patent Text Reader

Abstract

The application provides a kind of collaborative reasoning method and system of fusing medical knowledge graph and large model in the field of artificial intelligence technology, method includes: step S1, constructs medical knowledge graph by extracting medical entity, medical relationship and medical attribute from medical data set through medical information extraction model;Step S2, the latest medical information is monitored to update medical knowledge graph by medical information monitoring agent;Step S3, creates clinical decision collaborative reasoning model;Step S4, clinical decision collaborative reasoning model is trained and deployed by medical data set;Step S5, clinical decision collaborative reasoning model is pushed to medical terminal by federal gateway;Step S6, the query request carried by the query appeal of medical terminal is input into clinical decision collaborative reasoning model to obtain reasoning report.The advantage of the application lies in: the reasoning ability, timeliness, interpretability and security of medical reasoning are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a collaborative reasoning method and system that integrates medical knowledge graphs and large models. Background Technology

[0002] With the deep integration of artificial intelligence technology and clinical medicine, Clinical Decision Support Systems (CDSS) have gradually evolved from rule-based expert systems to intelligent agents that combine knowledge-driven and data-driven approaches. The current mainstream technical architecture exhibits a dual-track development trend:

[0003] (I) Structured Reasoning System Based on Knowledge Graph:

[0004] Such systems are typically represented by IBM Watson Health's medical knowledge engine. They construct multimodal knowledge graphs containing medical entities such as disease ontology, symptom representation, and diagnostic indicators, and combine these with rule-based reasoning engines (such as Drools) or graph neural networks (GNNs) to achieve path deduction. However, they suffer from three major technical bottlenecks: First, knowledge updates rely on manual annotation and ontology reconstruction, resulting in a response lag of at least six weeks when facing emerging infectious diseases; second, limited by framework-based knowledge representation methods, they lack the ability to analyze the temporal features and semantic relationships implicit in unstructured texts such as medical logs and image reports; and third, in scenarios with multiple complications, their symbolic logic-based reasoning chain is prone to path interruption due to missing nodes.

[0005] (II) End-to-end systems based on generative large models:

[0006] Medical large language models (LMs), such as GPT-4 and Med-PaLM, acquire powerful natural language understanding capabilities through pre-training with hundreds of billions of parameters, enabling end-to-end reasoning on patient complaint texts. However, they suffer from the following significant drawbacks: the black-box nature of the model leads to insufficient reliability of the output; in low-resource scenarios, they are prone to generating hallucinatory reasoning that contradicts medical common sense; and, more importantly, the parameterized knowledge storage method makes it difficult for the system to synchronize with the latest clinical guidelines.

[0007] Furthermore, the relevant medical data involves patient privacy, and there are potential security risks of medical data being stolen and tampered with in plaintext during model training, data transmission, and data storage. Traditionally, the system has only been set up with simple account and password access, which is a single security measure and poses a great security risk.

[0008] Therefore, how to provide a collaborative reasoning method and system integrating medical knowledge graph and large model to improve the reasoning ability, timeliness, interpretability and security of medical reasoning has become a technical problem to be solved. SUMMARY

[0009] The technical problem to be solved by the present application is to provide a collaborative reasoning method and system integrating medical knowledge graph and large model to improve the reasoning ability, timeliness, interpretability and security of medical reasoning.

[0010] In a first aspect, the present application provides a collaborative reasoning method integrating medical knowledge graph and large model, comprising the following steps:

[0011] Step S1, a cloud server acquires a large amount of historical medical data including structured health guidelines and unstructured medical records, and constructs a medical data set after preprocessing each of the historical medical data;

[0012] Step S2, the cloud server extracts multi-modal medical entities, medical relationships and medical attributes from the medical data set through a pre-trained medical information extraction model, and constructs a medical knowledge graph based on the extracted medical entities, medical relationships and medical attributes;

[0013] Step S3, the cloud server creates a medical information monitoring agent, monitors the latest medical information through the medical information monitoring agent, and updates the medical knowledge graph based on the medical information through a differential privacy algorithm after verifying each of the monitored medical information;

[0014] Step S4, the cloud server creates a clinical decision collaborative reasoning model based on a multi-modal fusion layer, a collaborative reasoning layer and an explanation generation layer, and sets a reasoning loss function and a reasoning reward function of the clinical decision collaborative reasoning model;

[0015] The multi-modal fusion layer is used for semantic analysis of the input query appeal to obtain unstructured semantic text, and synchronous retrieval of the medical knowledge graph through the query appeal to obtain structured medical knowledge, and the semantic text and the retrieved medical knowledge are input into the collaborative reasoning layer after modal alignment;

[0016] The collaborative reasoning layer is used for interactive reasoning of the input semantic text and medical knowledge through a medical large language model and a medical knowledge graph to obtain a candidate reasoning hypothesis carrying a confidence evaluation, and the candidate reasoning hypothesis is input into the explanation generation layer;

[0017] The explanation generation layer is used for generating a reasoning report containing a reasoning result, a reasoning basis and a reasoning path based on the candidate reasoning hypothesis according to an evidence-based medicine framework;

[0018] Step S5, the cloud server trains the clinical decision-making collaborative inference model through the medical data set, the inference loss function and the inference reward function, and deploys the trained clinical decision-making collaborative inference model;

[0019] Step S6, the cloud server deploys a federal gateway, and pushes the clinical decision-making collaborative inference model to the distributed medical terminal through the federal gateway;

[0020] Step S7, the medical terminal acquires an input query request, analyzes and verifies the query request to obtain a query demand, inputs the query demand into the deployed clinical decision-making collaborative inference model to obtain an inference report including an inference result, an inference basis and an inference path, and displays the inference report;

[0021] Step S8, the medical terminal records an inference log including at least a doctor account, an inference time, a query demand, an inference report and an inference feedback in real time, and iteratively optimizes the collaborative inference model through a federal learning mechanism and the inference log;

[0022] Step S9, the medical terminal encrypts and distributes backup of the inference log.

[0023] In a second aspect, the present application provides a collaborative inference system integrating medical knowledge graph and large model, including the following modules:

[0024] A medical data set construction module is configured to acquire, by a cloud server, a large amount of historical medical data including structured health guidelines and unstructured medical records, and construct a medical data set after preprocessing each of the historical medical data;

[0025] A medical knowledge graph construction module is configured to extract, by a cloud server, multi-modal medical entities, medical relationships and medical attributes from the medical data set through a pre-trained medical information extraction model, and construct a medical knowledge graph based on each of the extracted medical entities, medical relationships and medical attributes;

[0026] A medical knowledge graph updating module is configured to create, by a cloud server, a medical information monitoring agent, monitor the latest medical information through the medical information monitoring agent, verify each of the monitored medical information, and update the medical knowledge graph based on the medical information through a differential privacy algorithm after verification;

[0027] A clinical decision-making collaborative inference model creation module is configured to create, by a cloud server, a clinical decision-making collaborative inference model based on a multi-modal fusion layer, a collaborative inference layer and an explanation generation layer, and set an inference loss function and an inference reward function of the clinical decision-making collaborative inference model;

[0028] The multi-modal fusion layer is used for semantic analysis of an input query appeal to obtain unstructured semantic text, synchronous retrieval of a medical knowledge graph through the query appeal to obtain structured medical knowledge, and input of the semantic text and the retrieved medical knowledge into a collaborative reasoning layer after modal alignment;

[0029] The collaborative reasoning layer is used for interactive reasoning of the input semantic text and medical knowledge through a medical large language model and a medical knowledge graph to obtain a candidate reasoning hypothesis carrying a confidence evaluation, and input of the candidate reasoning hypothesis into an explanation generation layer;

[0030] The explanation generation layer is used for generating a reasoning report containing a reasoning result, a reasoning basis and a reasoning path based on the candidate reasoning hypothesis according to an evidence-based medicine framework;

[0031] A clinical decision collaborative reasoning model training module is used for training of a clinical decision collaborative reasoning model by a cloud server through the medical data set, a reasoning loss function and a reasoning reward function, and deployment of the trained clinical decision collaborative reasoning model;

[0032] A clinical decision collaborative reasoning model pushing module is used for deployment of a federal gateway by the cloud server, and pushing of the clinical decision collaborative reasoning model to distributed medical terminals through the federal gateway;

[0033] A collaborative reasoning module is used for acquisition of an input query request by a medical terminal, analysis and verification of the query request to obtain a query appeal, input of the query appeal into the deployed clinical decision collaborative reasoning model to obtain a reasoning report containing a reasoning result, a reasoning basis and a reasoning path, and display of the reasoning report;

[0034] A model iteration optimization module is used for real-time recording of a reasoning log including at least a doctor account, a reasoning time, a query appeal, a reasoning report and a reasoning feedback by the medical terminal, and iteration optimization of the collaborative reasoning model through a federal learning mechanism and by using the reasoning log;

[0035] A reasoning log storage module is used for encryption and distributed backup of the reasoning log by the medical terminal.

[0036] The present application has the following advantages:

[0037] 1. A cloud server obtains a large amount of historical medical data including structured health guidelines and unstructured medical records, pre-processes each historical medical data to construct a medical data set, extracts multi-modal medical entities, medical relationships and medical attributes from the medical data set through a pre-trained medical information extraction model, constructs a medical knowledge graph based on the extracted medical entities, medical relationships and medical attributes, monitors the latest medical information through a created medical information monitoring agent, checks each piece of monitored medical information, and updates the medical knowledge graph based on the medical information through a differential privacy algorithm; the cloud server creates a clinical decision-making collaborative reasoning model based on a multi-modal fusion layer, a collaborative reasoning layer and an explanation generation layer, sets a reasoning loss function and a reasoning reward function of the clinical decision-making collaborative reasoning model; the multi-modal fusion layer is used for semantic analysis of the input query appeal to obtain unstructured semantic text, and synchronous retrieval of the medical knowledge graph to obtain structured medical knowledge; the semantic text and the retrieved medical knowledge are input into the collaborative reasoning layer after modal alignment; the collaborative reasoning layer is used for interactive reasoning of the input semantic text and medical knowledge through a medical large language model and the medical knowledge graph, to obtain a candidate reasoning hypothesis carrying a confidence evaluation, and the candidate reasoning hypothesis is input into the explanation generation layer; the explanation generation layer is used for generating a reasoning report including a reasoning result, a reasoning basis and a reasoning path based on the candidate reasoning hypothesis according to the evidence-based medicine framework; the cloud server trains the clinical decision-making collaborative reasoning model through the medical data set, the reasoning loss function and the reasoning reward function, deploys the trained clinical decision-making collaborative reasoning model, pushes the clinical decision-making collaborative reasoning model to a distributed medical terminal through a federal gateway; the medical terminal obtains an input query request, analyzes and checks the query request to obtain a query appeal, inputs the query appeal into the deployed clinical decision-making collaborative reasoning model to obtain a reasoning report including a reasoning result, a reasoning basis and a reasoning path, displays the reasoning report, and records a reasoning log including at least a doctor account, a reasoning time, a query appeal, a reasoning report and a reasoning feedback in real time, iteratively optimizes the collaborative reasoning model through a federated learning mechanism, and encrypts and distributes backup of the reasoning log; the clinical decision-making collaborative reasoning model combining the medical knowledge graph and the medical large language model reasons the input query appeal, effectively combines the advantages of the medical knowledge graph and the medical large language model, and the reasoning report output by the clinical decision-making collaborative reasoning model carries the reasoning result, the reasoning basis and the reasoning path, effectively enhancing the credibility; the medical information monitored by the medical information monitoring agent is used for dynamic updating of the medical knowledge graph, and the collaborative reasoning model is iteratively optimized through the reasoning log, so that the medical knowledge graph and the medical large language model remain in the latest state, and the security mechanism of the federal gateway, the verification of the query request, the encryption and distributed backup of the reasoning log finally greatly improve the reasoning ability, timeliness, interpretability and security of medical reasoning.

[0038] 2. By integrating multimodal medical data (structured health guidelines and unstructured medical records) to construct a dynamically updated medical knowledge graph, and innovatively combining the generalization reasoning ability of large language models with the logic of knowledge graphs, high-confidence collaborative reasoning for clinical decision-making is achieved. By leveraging differential privacy algorithms and federated learning mechanisms, real-time interaction and model optimization of distributed medical terminals are supported while ensuring data privacy and security. This not only solves the problems of medical data silos and knowledge lag, but also generates interpretable reasoning results through an evidence-based medicine framework, significantly improving reasoning efficiency and accuracy.

[0039] 3. By constructing a dual-source data system of structured (health guidelines) and unstructured (medical records), covering all elements of the reasoning process (7 major modules of health guidelines + 11 types of medical records), the problem of single-source training data for medical AI is solved; by integrating image-text multimodal data (auxiliary examination data), the limitations of traditional single-type data analysis are broken through, laying the data foundation for building a three-dimensional reasoning model.

[0040] 4. By innovatively integrating multimodal medical data such as structured health guidelines and unstructured medical records, and through a unique four-stage preprocessing workflow (desensitization-cleaning-unification-feature extraction), the system effectively improves data quality. Combined with a five-dimensional intelligent annotation system (treatment effect / query request / report / basis / path), it constructs a high-precision medical dataset. This not only overcomes the interpretability challenge of medical AI models but also supports rapid transfer learning across diseases. Its innovative multimodal data fusion architecture and dynamic feature extraction mechanism provide a breakthrough solution for the precision and practicality of medical AI systems.

[0041] 5. Text encoding employs the BioBERT network, utilizing a pre-trained medical corpus to accurately capture medical terminology and contextual semantics, enhancing the professionalism of text features. Image encoding uses a Residual Convolutional Network (ResNet), which alleviates the gradient vanishing problem through skip connections, enhancing the feature extraction capabilities of medical images (such as CT and MRI). Structural encoding introduces a Graph Attention Network (GAT) to dynamically learn the association weights between medical data nodes (such as diseases, symptoms, and drugs), effectively modeling complex relationships. The feature mapping module maps text, image, and structural features to a unified semantic space through fully connected layers, solving the problem of multimodal data heterogeneity and laying the foundation for subsequent cross-modal interaction.

[0042] 6. The modal interaction module generates a semantic association matrix through a cross-attention mechanism to quantify the complementarity between different modalities (such as the association between image features and pathological descriptions) and avoid information isolation; the gated fusion module introduces learnable weights to dynamically adjust the contribution of each modality, for example, reducing the image modality weight when high-quality images are lacking, thereby improving the model's robustness to missing data.

[0043] 7. Entity decoding uses Conditional Random Field (CRF) and combines label transition probability to optimize sequence labeling results, reducing "BIO" label conflicts (such as continuous entity recognition of "drug-dosage"); Relationship decoding constructs entity association topology through Graph Neural Network (GNN) and combines relationship classifier to distinguish dependency types (such as "treatment" and "side effects"), enhancing the interpretability of relationship reasoning; Attribute decoding uses multi-head pointer network to locate multi-label attributes (such as "dosage" and "frequency"), supports non-continuous segment extraction, and adapts to complex medical descriptions.

[0044] 8. By using cross-entropy with class weights in entity loss, the loss weight is increased for rare medical entities (such as rare disease names) to alleviate the problem of data distribution skew; by introducing multi-label marginal loss with threshold adjustment in attribute loss, positive and negative samples (such as the simultaneous existence of "contraindications" and "indications") are dynamically balanced to reduce the false negative rate.

[0045] 9. By integrating heterogeneous features of text (BioBERT), images (residual convolutional network), and structural data (graph attention network) through a multimodal coding layer, semantic association modeling and adaptive weight allocation are achieved using the cross-attention mechanism and dynamic gating fusion of the cross-modal alignment layer. Combined with CRF, GNN, and multi-head pointer network in the joint decoding layer, parallel extraction of entities, relations, and attributes is optimized. The class imbalance problem is alleviated by a weighted multi-task loss function. Finally, high-precision cross-modal semantic understanding, robust multi-source data compatibility, and end-to-end multi-task collaborative optimization are achieved in medical information extraction, which significantly improves the accuracy and efficiency of joint entity relation extraction in complex medical scenarios.

[0046] 10. By integrating official APIs, academic databases, patent databases, paper databases, news websites, and professional forums, we break through the limitations of a single data source and ensure the comprehensiveness and authority of medical information; through dynamic IP rotation, we ensure the stability of data crawling.

[0047] 11. By adding controllable noise perturbation to the original data, strong protection of individual privacy can be achieved while ensuring the effectiveness of medical knowledge extraction (such as avoiding reverse deduction of patient identity or institutional data).

[0048] 12. Through the integration of official APIs, academic databases, patent libraries, and other multi-source monitoring channels, and the use of dynamic IP proxy pools, comprehensive and stable collection of medical information is achieved. Through multi-level verification (format, logic, conflict) and data cleaning, data quality is ensured. Combined with differential privacy algorithms to add noise to sensitive information, the model efficiently extracts medical entities, relationships, and attributes under the premise of privacy compliance. The knowledge graph is dynamically updated, combining data comprehensiveness, accuracy, security, and timeliness. The modular design supports flexible expansion of monitoring rules and processing flows, addressing data silos, high privacy risks, and lagging knowledge updates in traditional medical information monitoring.

[0049] 13. Through the use of Transformer to extract deep semantic queries (unstructured data) and simultaneously search the medical knowledge graph (structured data), the patient's complaint and medical knowledge are complemented in both directions, addressing the limitations of single data sources and significantly improving the comprehensiveness of reasoning. By introducing medical ontology as a constraint framework for cross-modal alignment, semantic text and medical knowledge are mapped to a unified semantic space, effectively eliminating term ambiguity (such as the synonym problem of symptoms) and reducing noise interference in multi-modal data fusion.

[0050] 14. Through the use of time series convolution networks and memory networks to build an interactive channel between the medical large language model (LLM) and the medical knowledge graph, the model can capture dynamic temporal features of text semantics and perform logical verification based on the medical knowledge graph, addressing the credibility issues of traditional LLM "black box reasoning." By using low-rank matrix (LoRA) to vectorize the latest clinical guidelines and inject them into the LLM parameter space, the computational resource consumption is reduced by more than 60% compared to full-parameter fine-tuning, and online incremental updates of the clinical knowledge base are supported, ensuring that the model's timeliness meets the needs of medical practice.

[0051] 15. Through the use of differentiable Markov logic networks to generate causal chains of reasoning hypotheses, the reasoning process is divided into explicit logical links of symptoms → pathology → reasoning, meeting the mandatory requirements of medical scenarios for decision transparency. Through the medical ontology template engine, standardized reasoning results are generated, and reasoning bases (such as ICD coding associations), reasoning paths (DDx), and confidence assessments are output in a structured manner, allowing AI reasoning results to be directly embedded into hospital electronic medical record system workflows.

[0052] 16、Through the integration of unstructured semantic text and structured medical knowledge by multi-modal fusion layer (based on medical ontology to achieve precise modal alignment), a double-channel interaction mechanism is constructed in the collaborative reasoning layer (time sequence convolution network captures dynamic characteristics + low rank matrix dynamically injects the latest clinical guidelines), which realizes the efficient generation of reasoning hypotheses and real-time knowledge update; the explanation generation layer innovatively combines the differentiable Markov logic network (generates traceable causal chain) and the ontology template engine (automatically outputs evidence-based report), which significantly improves the decision transparency and clinical compliance; through the multi-objective joint optimization framework (loss function balances alignment / reasoning / explanation, reward function strengthens five-dimensional indicators such as accuracy / evidence integrity), while ensuring reasoning accuracy, it effectively improves logical coherence, effectively reduces misdiagnosis rate, and meets the stringent requirements of medical AI system for explainability, timeliness and legal effectiveness, providing an end-to-end intelligent solution for clinical decision support system.

[0053] 17、Through data expansion by adversarial network, i.e. using generative adversarial network (GAN) to solve the problem of medical data scarcity, synthetic data with high fidelity is generated, breaking through the limitations of traditional data enhancement methods, effectively alleviating the model bias caused by small sample training; through hierarchical sampling to divide the data set, i.e. hierarchical sampling based on disease / case characteristics, ensuring balanced data distribution of training set, validation set and test set, avoiding the loss of key cases caused by random division, especially suitable for handling the long-tail distribution problem of rare disease data.

[0054] 18、Through the alternating use of reasoning loss function (to ensure prediction accuracy) and reasoning reward function (to strengthen clinical logical consistency), it breaks through the optimization limitations of single loss function, improves reasoning accuracy while reducing clinical decision risk; by dynamically adjusting learning rate, batch size and other key parameters, adaptive learning pace control is realized, which effectively improves training efficiency compared with fixed parameter setting, and can avoid local optimal trap; by implementing dynamic pruning in the training process, redundant connections are removed in real time according to neuron activation intensity, effectively reducing model size and significantly reducing hardware threshold of deployment device.

[0055] 19、Through the collaborative data enhancement strategy of adversarial network generation and hierarchical sampling, the problem of medical data scarcity is effectively solved, combined with dynamic hyperparameter optimization and online model pruning technology, the reasoning accuracy of the model is improved while realizing efficient and lightweight; innovatively build a verification test system containing multiple indicators such as hallucination reasoning inhibition rate and knowledge conflict resolution rate, through a two-stage feedback mechanism to drive the closed-loop optimization of training data and model architecture, significantly enhance the reliability and explainability of clinical decision-making, and finally achieve the dual breakthrough of reasoning efficiency and accuracy on the premise of ensuring that the reasoning logic conforms to medical specifications.

[0056] 20、By adopting AES-128-GCM (symmetric encryption) and ChaCha20-Poly1305 (stream encryption) double encryption, performance and security are considered, and the risk of data leakage in transmission and storage is prevented; by generating a model signature value using the SM3 algorithm, the model integrity and source credibility are ensured, and tampering or malicious code implantation is prevented; through two-way authentication between the federal gateway and the medical terminal, illegal terminal access or man-in-the-middle attacks are eliminated.

[0057] 21、Through a multi-layer encryption system (AES-128-GCM + ChaCha20-Poly1305) and a dynamic character replacement mechanism to ensure model transmission security, combined with SM3 signature verification and two-way authentication mechanism to prevent tampering and illegal access, ensure medical data privacy compliance; use the load balancing and service discovery capabilities of the federal gateway to achieve dynamic resource scheduling, reduce terminal computing power requirements through lightweight ONNX model conversion and metadata standardization, and support cross-scenario precise adaptation, while reducing network dependence and improving emergency decision-making efficiency through localized deployment and hierarchical decryption processes.

[0058] 22、Through MAC value (message authentication code) integrity check of request time, query appeal, account password and other key information, ensure that data is not tampered with during transmission, and prevent malicious attacks; by adding request time verification, replay attacks (Replay Attack) can be effectively identified and intercepted, avoiding the illegal use of expired or repeated requests; through account password legality verification, further ensure the legal identity of the operation subject, and prevent unauthorized access; through the three-layer verification process of integrity check (MAC value) → timeliness check (request time) → identity legality check (account password), a progressive security protection system is formed, significantly reducing the risk of data leakage and misoperation.

[0059] 23、The deployed clinical decision-making collaborative reasoning model is accelerated through hardware acceleration technology (such as GPU, TPU or FPGA), significantly shortening the generation time of reasoning results and meeting the high requirements of real-time in clinical scenarios; hardware acceleration technology can efficiently allocate computing resources, reduce system delay, avoid response bottlenecks caused by high concurrency requests, and improve the service capability of medical terminals.

[0060] 24、The generated reasoning report contains reasoning results, reasoning basis, and reasoning path, providing not only conclusions but also logical chains and medical basis, enhancing doctors' trust in model decisions.

[0061] 25、By combining multiple security verification mechanisms (MAC value integrity verification, request time anti-replay, account password identity authentication), the data security and privacy protection are strengthened, and the inference efficiency of the clinical decision model is significantly improved using hardware acceleration technology to ensure real-time response. At the same time, the structured inference report generated has both explainability and auxiliary value, promoting efficient collaboration between doctors and AI. The modular design ensures cross-platform compatibility and meets medical compliance requirements, effectively solving the bottlenecks of traditional systems in security, efficiency, and explainability.

[0062] 26、By performing data desensitization and model parameter uploading locally (rather than raw data), patient privacy is doubly protected. By using a differential parameter transmission mechanism (rather than a complete model), the risk of privacy leakage is further reduced, forming a closed loop of data security protection.

[0063] 27、Through a training mechanism triggered by a log quantity threshold (such as every 1000 logs), data utilization efficiency is maximized. Through a parameter fusion algorithm of the cloud server (weighted average / differential privacy aggregation, etc.), the model convergence speed and data heterogeneity are balanced. Through a differential parameter return mechanism, communication costs are significantly reduced.

[0064] 28、Through multi-dimensional log recording (doctor account + timestamp + query appeal), medical responsibility traceability is supported. Through a dual performance verification mechanism (terminal local verification + cloud global verification), model stability is ensured. Through model version backup and differential comparison, an emergency rollback function is realized, meeting the reliability requirements of medical systems.

[0065] 29、Through the deep integration of local data desensitization and federated learning framework, a dynamic and efficient medical AI collaborative optimization system is constructed while ensuring patient privacy compliance: the terminal triggers local training based on log threshold, the cloud realizes global model iteration through parameter fusion, and the differential parameter transmission mechanism reduces communication load by more than 70%. Dual performance verification and model backup mechanisms ensure inference reliability, support medical responsibility traceability and emergency rollback, while edge computing and asynchronous update strategies balance computing resource allocation, realizing compliant mining of cross-institutional medical data value and continuous improvement of model accuracy, effectively solving the data island and privacy protection problems in medical AI landing.

[0066] 30、By using SHA-256 (hash), AES-128-CBC (symmetric encryption), and RSA (asymmetric encryption) algorithms, attackers need to break through three encryption mechanisms simultaneously, greatly increasing the cracking cost. The combination of SHA-256 and RSA can resist traditional brute force attacks, while AES-128 remains highly secure in a quantum computing environment, forming a technical intergenerational redundancy protection.

[0067] 31. By employing multiple encryption mechanisms including SHA-256 hash verification, AES-128-CBC, and RSA algorithms, combined with hexadecimal conversion and dynamic character obfuscation, a comprehensive security protection system for medical data from generation to storage has been constructed. While ensuring data integrity and tamper resistance, the system significantly enhances the ability of encrypted data to resist reverse analysis and quantum attacks through algorithm cascading and obfuscation operations. The distributed backup design further strengthens disaster recovery reliability and is compatible with fine-grained access control. It achieves high-strength confidential storage of sensitive medical information with lightweight computing costs, meeting privacy compliance and business continuity requirements, and significantly improving the level of medical data security protection.

[0068] 32. By simultaneously processing structured health guidelines (disease definitions, clinical pathways, etc.) and unstructured medical records (text, images, time-series data), the system covers multi-dimensional information required throughout the reasoning process, enhancing the breadth of data utilization. Through multimodal coding layers (BioBERT, residual convolutional networks, graph attention networks), it extracts text, image, and structural relationship features, achieving cross-modal semantic alignment and addressing the dependence of traditional methods on single data types. By employing a medical information monitoring agent to capture the latest medical information (patents, papers, clinical guidelines, etc.) in real time, combined with differential privacy algorithms, it ensures the security of data updates and avoids knowledge obsolescence. Through joint decoding layers (CRF, GNN, multi-head pointer networks), it accurately extracts medical entities, relationships, and attributes, constructing a high-precision knowledge graph to provide structured knowledge support for reasoning.

[0069] 33. By combining the generalization reasoning ability of the Medical Large Language Model (LLM) with the precise logical constraints of the knowledge graph through the dual-stream cross-attention module, temporal reasoning and knowledge verification are achieved through temporal convolutional networks, reducing the risk of model "illusion". The latest clinical guidelines are embedded into the LLM parameter space in the form of a low-rank matrix through the dynamic knowledge injection module, ensuring that the reasoning results meet the standards of evidence-based medicine. Causal chains are generated through the causal reasoning module (differentiable Markov logic network), and the reasoning report containing the reasoning basis and path is output in combination with the medical ontology template engine, meeting the requirements of transparency in clinical decision-making. The reliability of reasoning is quantified through confidence assessment and multi-disease confusion matrix verification, assisting doctors in quickly verifying the model conclusions.

[0070] 34. Innovatively integrate multi-modal medical data, dynamic knowledge graph and medical large language model, realize accurate and explainable clinical decision support through multi-modal encoding alignment, double-flow collaborative reasoning and differential privacy update, meanwhile, guarantee data privacy and cross-institutional collaboration security by means of federated learning mechanism and three-level encryption system, combine dynamic pruning lightweight deployment, causal reasoning chain generation and evidence-based medical ontology constraints, significantly improve reasoning accuracy, system robustness and legal compliance, effectively solve the core pain points of data silos, knowledge lag, model black box and privacy leakage in the field of medical AI, and provide an efficient, safe and reliable integrated solution for smart healthcare. BRIEF DESCRIPTION OF DRAWINGS

[0071] The application will be further described below with reference to the accompanying drawings and embodiments.

[0072] Fig. 1 is a flowchart of a collaborative reasoning method integrating a medical knowledge graph and a large model according to the present application.

[0073] Fig. 2 is a structural schematic diagram of a collaborative reasoning system integrating a medical knowledge graph and a large model according to the present application. DETAILED DESCRIPTION

[0074] The technical solution in the embodiments of the present application has the following general idea: a clinical decision collaborative reasoning model combining a medical knowledge graph and a medical large language model is used to reason the input query demand, effectively combining the advantages of the medical knowledge graph and the medical large language model, and the reasoning report output by the clinical decision collaborative reasoning model carries the reasoning result, reasoning basis and reasoning path, effectively enhancing the credibility; the medical information monitored by the medical information monitoring agent is used to dynamically update the medical knowledge graph, and the collaborative reasoning model is iteratively optimized through the reasoning log, so that the medical knowledge graph and the medical large language model remain in the latest state, and the security mechanism of the federated gateway, the verification of the query request, the encryption and distributed backup of the reasoning log are combined, thereby improving the reasoning ability, timeliness, interpretability and security of medical reasoning.

[0075] Please refer to Figs. 1-2 , a preferred embodiment of a collaborative reasoning method integrating a medical knowledge graph and a large model according to the present application, comprising the following steps:

[0076] Step S1, the cloud server acquires a large amount of historical medical data including structured health guidelines and unstructured medical records, and constructs a medical data set after pre-processing each of the historical medical data;

[0077] Step S2, the cloud server extracts multi-modal medical entities, medical relations and medical attributes from the medical data set through a pre-trained medical information extraction model, and constructs a medical knowledge graph based on the extracted medical entities, medical relations and medical attributes;

[0078] Step S3, the cloud server creates a medical information monitoring agent, and updates the medical knowledge graph based on the medical information through the differential privacy algorithm after verifying each piece of the monitored medical information through the medical information monitoring agent;

[0079] Step S4, the cloud server creates a clinical decision-making collaborative reasoning model based on a multi-modal fusion layer, a collaborative reasoning layer and an explanation generation layer, and sets a reasoning loss function and a reasoning reward function of the clinical decision-making collaborative reasoning model;

[0080] The multi-modal fusion layer is used for semantic analysis of the input query appeal to obtain unstructured semantic text, and synchronous retrieval of the medical knowledge graph to obtain structured medical knowledge, and the semantic text and the retrieved medical knowledge are input into the collaborative reasoning layer after modal alignment;

[0081] The collaborative reasoning layer is used for interactive reasoning of the input semantic text and medical knowledge through a medical large language model and a medical knowledge graph to obtain a candidate reasoning hypothesis carrying a confidence evaluation, and the candidate reasoning hypothesis is input into the explanation generation layer;

[0082] The explanation generation layer is used for generating a reasoning report containing a reasoning result, a reasoning basis and a reasoning path based on the candidate reasoning hypothesis according to an evidence-based medicine framework;

[0083] Step S5, the cloud server trains the clinical decision-making collaborative reasoning model through the medical data set, the reasoning loss function and the reasoning reward function, and deploys the trained clinical decision-making collaborative reasoning model;

[0084] Step S6, the cloud server deploys a federal gateway, and pushes the clinical decision-making collaborative reasoning model to the distributed medical terminal through the federal gateway;

[0085] Step S7, the medical terminal obtains an input query request, analyzes and verifies the query request to obtain a query appeal, inputs the query appeal into the deployed clinical decision-making collaborative reasoning model to obtain a reasoning report containing a reasoning result, a reasoning basis and a reasoning path, and displays the reasoning report; the reasoning report is only for reference, not for diagnosis result;

[0086] Step S8, the medical terminal records at least the inference log including the doctor's account, inference time, query appeal, inference report and inference feedback in real time, and iteratively optimizes the collaborative inference model by using the inference log through a federated learning mechanism;

[0087] Step S9, the medical terminal encrypts and distributes backup of the inference log;

[0088] The step S1 is specifically:

[0089] The cloud server obtains a large amount of historical medical data including structured health guidelines and unstructured medical records; the health guidelines at least include disease definition, treatment suggestion, prognosis evaluation, special population suggestion, clinical pathway and reference; the medical records at least include patient information, history of present illness, past history, physical examination data, auxiliary examination data, preliminary evaluation result, differential evaluation result, treatment process, disease change data, consultation record and discharge summary; the auxiliary examination data at least includes text data and image data;

[0090] The historical medical data are sequentially preprocessed by data desensitization, data cleaning, data unification and feature extraction, and the preprocessed historical medical data are labeled by treatment effect, query appeal, inference result, inference basis and inference path to construct a medical data set.

[0091] In the step S2, the medical information extraction model is constructed based on a multi-modal encoding layer, a cross-modal alignment layer and a joint decoding layer.

[0092] The multi-modal encoding layer is constructed based on a text encoding module, an image encoding model, a structure encoding module and a feature mapping module; the text encoding module is used to extract text features from the medical data set through a BioBERT network; the image encoding model is used to extract image features from the medical data set through a residual convolutional network; the structure encoding module is used to extract node relationship perception features from the medical data set through a graph attention network; and the feature mapping module is used to map the text features, image features and node relationship perception features to a unified semantic space through a full connection layer to obtain corresponding modal embeddings.

[0093] The cross-modal alignment layer is constructed based on a modal interaction module and a gated fusion module; the modal interaction module is used to establish a semantic association matrix of the corresponding modal embeddings of the text features, image features and node relationship perception features through a cross-attention mechanism; and the gated fusion module is used to dynamically adjust the modal contribution degree of each modal embedding in the semantic association matrix through a learnable gating weight to obtain a context-aware representation.

[0094] The joint decoding layer is constructed based on an entity decoding branch, a relation decoding branch, and an attribute decoding branch; the entity decoding branch is used to perform sequence labeling on the context-aware representation by a conditional random field, thereby identifying medical entities; the relation decoding branch is used to construct entity associations on the context-aware representation by a graph neural network, and classify the entity associations by a relation classifier to obtain medical relations; and the attribute decoding branch is used to locate medical attributes from the context-aware representation by a multi-head pointer network;

[0095] Conditional Random Fields (CRF) is a discriminative model commonly used in sequence labeling tasks, especially widely used in Natural Language Processing (NLP) and Computer Vision (CV) fields. CRF layer is usually used to process data with sequence structure, such as part-of-speech tagging, Named Entity Recognition (NER) in text, and pixel segmentation in images, etc.

[0096] Relation Classifier is a classification model used to identify semantic relationships between entities in text. Given two entities, the goal of the relation classifier is to predict the relationship type between them. For example, in the sentence "Apple Inc. was founded by Steve Jobs", the relation classifier can identify the "founded" relationship between "Apple Inc." and "Steve Jobs".

[0097] Multi-Head Pointer Network is a model that combines multi-head attention mechanism and pointer network, used to handle sequence-to-sequence tasks, especially when the output sequence is a subset or permutation of the input sequence; this network structure can effectively handle tasks such as Traveling Salesman Problem (TSP), text summarization, question answering system, etc.

[0098] The extraction loss function of the medical information extraction model is constructed by weighting entity loss, relation loss, and attribute loss; the entity loss adopts cross-entropy loss with class weight; the relation loss adopts binary cross-entropy loss; and the attribute loss adopts multi-label marginal loss with threshold adjustment;

[0099] The step S3 is specifically:

[0100] The cloud server creates a medical information monitoring agent based on crawler technology, sets the monitoring channel, monitoring frequency, data crawling rules, and dynamic IP proxy pool of the medical information monitoring agent; the monitoring channel at least includes official API, academic database, patent database, paper database, industry news website, and professional forum;

[0101] The latest medical information is monitored by the medical information monitoring agent, and each piece of the monitored medical information is sequentially subjected to format checking (such as JSON Schema / XSD), logic checking (such as time sequence / value range), and conflict checking (comparison with an existing knowledge graph), and then each piece of the medical information is subjected to data cleaning and data anonymization preprocessing, noise is added to the preprocessed medical information by a differential privacy algorithm, medical knowledge including medical entities, medical relationships, and medical attributes is extracted from the medical information with added noise by the medical information extraction model, and the medical knowledge graph is updated.

[0102] In the step S4, the multi-modal fusion layer is constructed based on a semantic analysis module, a graph retrieval module, and a modal alignment module; the semantic analysis module is used to extract deep semantic representations from the input query by a Transformer, and to obtain unstructured semantic text by semantic analysis of the deep semantic representations by a bidirectional attention mechanism; the graph retrieval module is used to retrieve a medical knowledge graph simultaneously by a query, and to obtain structured medical knowledge; the modal alignment module is used to align the semantic text and the retrieved medical knowledge by the constraint of medical ontology;

[0103] The collaborative reasoning layer is constructed based on a double-flow cross-attention module, a dynamic knowledge injection module, and a hypothesis verification module; the double-flow cross-attention module is used to establish an interaction channel between a pre-trained medical large language model and a medical knowledge graph, to input the semantic text and the medical knowledge into the medical large language model and the medical knowledge graph through the interaction channel, and to generate a candidate reasoning hypothesis by interactive reasoning of the input semantic text and medical knowledge through a time series convolution network and a time series memory network; the dynamic knowledge injection module is used to inject the latest clinical guidelines into the parameter space of the medical large language model in the form of a low-rank matrix after vectorization by a real-time knowledge adapter; and the hypothesis verification module is used to input the candidate reasoning hypothesis carrying the confidence evaluation into the explanation generation layer by reasoning the confidence evaluation of the candidate reasoning hypothesis by a differential logic reasoner.

[0104] The differential logic reasoner (Differential Logic Reasoner) is a model combining logical reasoning and deep learning techniques, aiming to handle logical reasoning tasks in a differentiable manner; it combines logical rules and neural networks, so that the model can maintain logical expression capabilities while using gradient descent and other optimization methods for learning and reasoning.

[0105] The explanation generation layer is constructed based on a causal reasoning module and an evidence alignment module; the causal reasoning module is used to perform causal reasoning on the candidate reasoning hypothesis through a differentiable Markov logic network to obtain a causal chain; the evidence alignment module is used to convert the causal chain into a reasoning report containing reasoning results, reasoning basis and reasoning paths through a medical ontology template engine, and output the reasoning report;

[0106] The formula of the reasoning loss function is:

[0107] L_total=α*L_align+β*L_reason+γ*L_explain;

[0108] Wherein, L_total represents the reasoning loss value; L_align represents the modal alignment loss function; L_reason represents the collaborative reasoning loss function; L_explain represents the explanation generation loss function; α, β, γ all represent loss component weight coefficients, and α+β+γ=1;

[0109] L_align=1-cos_sim(E_text, E_know);

[0110] Wherein, E_text∈R^d, represents a semantic text encoding vector, R is a real number, and d is an encoding dimension; E_know∈R^d, represents a medical knowledge encoding vector; cos_sim represents the cosine similarity calculation; L_align is used to constrain the representation consistency of unstructured text and structured knowledge in the hidden space;

[0111] L_reason=CE(y_pred, y_true)+λ*KL(p_conf||p_true);

[0112] Wherein, CE represents the cross-entropy loss function; y_pred∈R^C, represents the probability distribution of the candidate reasoning hypothesis, and C is the number of disease categories; y_true∈R^C, represents the true result label distribution; KL represents the Kullback-Leibler divergence; p_conf∈R^C, represents the confidence distribution output by the model; p_true∈R^C, represents the confidence benchmark annotated by experts; L_reason= is used to supervise the accuracy (CE term) and confidence calibration (KL term) of the reasoning hypothesis; λ represents the weight coefficient;

[0113] L_explain=Σ_{s∈S}[CE(g_s, g_s^)+δROUGE(g_s, g_s^)];

[0114] where S = {report, based on, path} represents a set of evidence-based medical elements; g s represents a word-level probability distribution of generated text; g s represents an expert-annotated reference text; ROUGE represents a text semantic matching degree index; L explain is used to constrain the factual accuracy (CE term) and medical logical coherence (ROUGE term) of the reasoning result; δ represents a weight coefficient;

[0115] The formula of the reasoning reward function is:

[0116] R_total = ω1*R_accuracy + ω2*R_consistency + ω3*R_coherence + ω4*R_confidence + ω5*R_evidence;

[0117] where R_total represents the reasoning reward value; R_accuracy represents the reasoning accuracy reward; R_consistency represents the knowledge consistency reward; R_coherence represents the logical coherence reward; R_confidence represents the confidence calibration reward; R_evidence represents the evidence completeness reward; ω1-ω5∈[0,1] represents the reward component weight, and Σωi=1 is satisfied;

[0118] R_accuracy = F1(y_pred, y_true) + AUC-ROC(p_conf, y_true);

[0119] where F1 represents the F1 score (harmonic mean of precision and recall) of disease classification; AUC-ROC represents the area under the ROC curve of confidence prediction; R_accuracy is used to encourage the dual accuracy of the model in disease classification and confidence evaluation;

[0120] R_consistency = KG_Recall(h, G) * cos_sim(E_h, E_kg);

[0121] where KG_Recall represents the path recall rate of the candidate hypothesis h in the knowledge graph G; E_h∈R^d represents the hypothesis encoding vector; E_kg∈R^d represents the knowledge graph subgraph encoding vector; R_consistency is used to constrain the logical association strength of the reasoning hypothesis and the medical knowledge graph;

[0122] R_coherence = Σ_{t=2}^T [logit(p_t|C_{1:t-1}) - logit(p_t|∅)];

[0123] wherein, p_t represents the probability distribution of the t-th step inference decision; C_{1:t-1} represents the historical inference context state; R_coherence is used to strengthen the causal coherence of the inference path in multi-step inference (calculated by conditional probability gain); and represents an empty set.

[0124] R_confidence=1-|Brier(p_conf,y_true)-Brier(p_expert,y_true)|;

[0125] wherein, Brier represents the Brier score calibration index, which calculates the mean square error of the prediction confidence and the true label; p_expert represents the confidence benchmark labeled by an expert; and R_confidence is used to drive the model confidence distribution to align with the evaluation standard of clinical experts.

[0126] R_evidence=0.5ROUGE-L(r, r') + 0.5*Coverage(s, S_EBM);

[0127] wherein, ROUGE-L represents the long sequence matching degree of the generated report r and the standard report r'; Coverage represents the coverage ratio of the generated content to the evidence-based medicine element set S_EBM (medical history / examination / guidelines); and R_evidence is used to ensure that the inference explanation conforms to the complete fact chain required by evidence-based medicine.

[0128] The step S5 is specifically:

[0129] After expanding the sample size of the medical data set through the adversarial network, the medical data set is divided into a training set, a validation set and a test set through stratified sampling method, the clinical decision collaborative inference model is trained through the training set, in each round of training, the inference loss function and the inference reward function are alternately used to optimize the clinical decision collaborative inference model, and the hyperparameters of the clinical decision collaborative inference model including at least learning rate, decay rate, batch size, random drop rate and neuron number are dynamically adjusted during the training process, and the dynamic pruning compression operation is performed on the clinical decision collaborative inference model until the preset early stopping condition is met.

[0130] The inference accuracy of the clinical decision collaborative inference model is calculated through the validation set to verify the clinical decision collaborative inference model, if the verification fails, the training of the training set is continued; if the verification passes, then:

[0131] The illusion reasoning inhibition rate, confidence calibration error, knowledge conflict resolution rate and multi-disease confusion matrix of the clinical decision-making collaborative reasoning model are calculated through the test set to test the clinical decision-making collaborative reasoning model, and if the test fails, the training set is expanded for further training; if the test passes, the training is ended, and the trained clinical decision-making collaborative reasoning model is deployed.

[0132] In specific implementation, the illusion reasoning inhibition rate is detected by an adversarial test set (containing 50 imaginary symptom combinations), and the qualified standard is that the probability of generating a non-medical entity is <0.01%; the confidence calibration error is the Brier score of the model prediction probability and the actual accuracy; the test method of the knowledge conflict resolution rate is to inject 10% outdated guidelines, and the proportion of the model that preferentially uses the latest guidelines is ≥98% to pass the test; the multi-disease confusion matrix is a stratified sampling test of 100 diseases, and the key indicators are: sensitivity (Recall): misdiagnosis rate ≤3%; specificity (Specificity): misdiagnosis rate ≤1.5%; F1-score (especially important for concurrent disease cases).

[0133] The step S6 specifically includes:

[0134] The cloud server deploys a federated gateway supporting load balancing and traffic management, enables the service discovery mechanism of the federated gateway, configures a bidirectional authentication mechanism, and performs bidirectional authentication operation with each medical terminal deployed in a distributed manner through the bidirectional authentication mechanism;

[0135] The cloud server converts the format of the clinical decision-making collaborative reasoning model into a lightweight ONNX, calculates the signature value of the clinical decision-making collaborative reasoning model through the SM3 algorithm, adds metadata including at least version number, applicable scenario, medical knowledge graph query path and signature value in the clinical decision-making collaborative reasoning model, encrypts the clinical decision-making collaborative reasoning model with added metadata through AES-128-GCM to obtain a first-level encryption model, encodes the first-level encryption model through Base64, replaces the character "+" with "$" and " / " with "@" to obtain a second-level encryption model, encrypts the second-level encryption model through ChaCha20-Poly1305 to obtain a third-level encryption model, and pushes the third-level encryption model to the medical terminal deployed in a distributed manner through the federated gateway;

[0136] The medical terminal receives a three-level encryption model pushed through the federation gateway, decrypts the three-level encryption model through ChaCha20-Poly1305 to obtain a two-level encryption model, replaces characters "$" in the two-level encryption model with "+" and "@" with " / ", and performs Base64 decoding to obtain a one-level encryption model, decrypts the one-level encryption model through AES-128-GCM to obtain a clinical decision-making collaborative reasoning model, and locally deploys the clinical decision-making collaborative reasoning model after verifying the signature value carried in the metadata of the clinical decision-making collaborative reasoning model;

[0137] The step S7 is specifically:

[0138] The medical terminal obtains an input query request carrying a request time, a query appeal, a doctor account, a doctor password, and a MAC value, wherein the MAC value is obtained by performing HMAC calculation on the request time, the query appeal, the doctor account, and the doctor password;

[0139] The medical terminal parses the query request to obtain the request time, the query appeal, the doctor account, the doctor password, and the MAC value, performs integrity verification through the MAC value, then performs integrity verification through the request time, and then performs legality verification through the doctor account and the doctor password, and if the verification is passed, inputs the query appeal into the deployed clinical decision-making collaborative reasoning model, and the clinical decision-making collaborative reasoning model performs accelerated reasoning through a hardware acceleration technology to obtain a reasoning report including a reasoning result, a reasoning basis, and a reasoning path, and the reasoning report is displayed on a display screen.

[0140] The step S8 is specifically:

[0141] The medical terminal records a reasoning log including at least a doctor account, a reasoning time, a query appeal, a reasoning report, and a reasoning feedback in real time, when the number of the reasoning log reaches a preset number threshold, trains a local collaborative reasoning model through each reasoning log after performing a data desensitization operation, verifies the performance of the trained collaborative reasoning model, reads model parameters of the collaborative reasoning model after performance verification, and uploads the model parameters to a cloud server through a federation gateway;

[0142] The cloud server backs up the locally deployed collaborative reasoning model, updates the collaborative reasoning model by averaging the parameter values of the model parameters uploaded by each medical terminal, and verifies the performance of the updated collaborative reasoning model, and after the performance verification is passed, obtains difference parameters by comparing the backed-up collaborative reasoning model, and distributes the difference parameters to each medical terminal through the federation gateway, and each medical terminal iteratively optimizes the collaborative reasoning model based on the received difference parameters;

[0143] The step S9 is specifically:

[0144] The medical terminal calculates the hash value of the reasoning log through SHA-256, encrypts the reasoning log and the hash value through AES-128-CBC to obtain first-level encrypted data, converts the first-level encrypted data into hexadecimal data, reverses the number 7 and the letter B in the hexadecimal data, and reverses the number 9 and the letter C to obtain second-level encrypted data, encrypts the second-level encrypted data into an encrypted log through an RSA algorithm, stores the encrypted log and performs distributed backup.

[0145] A preferred embodiment of the collaborative reasoning system fusing a medical knowledge graph and a large model comprises the following modules:

[0146] The medical data set construction module is configured to acquire a large amount of historical medical data including structured health guidelines and unstructured medical records by a cloud server, and construct a medical data set after preprocessing each of the historical medical data.

[0147] The medical knowledge graph construction module is configured to extract multi-modal medical entities, medical relationships and medical attributes from the medical data set by a pre-trained medical information extraction model, and construct a medical knowledge graph based on the extracted medical entities, medical relationships and medical attributes.

[0148] The medical knowledge graph updating module is configured to create a medical information monitoring agent by the cloud server, monitor the latest medical information through the medical information monitoring agent, and update the medical knowledge graph based on the medical information through a differential privacy algorithm after verifying each of the medical information.

[0149] The clinical decision collaborative reasoning model creation module is configured to create a clinical decision collaborative reasoning model based on a multi-modal fusion layer, a collaborative reasoning layer and an explanation generation layer by the cloud server, and set a reasoning loss function and a reasoning reward function of the clinical decision collaborative reasoning model.

[0150] The multi-modal fusion layer is configured to perform semantic analysis on an input query to obtain unstructured semantic text, synchronously retrieve a medical knowledge graph based on the query to obtain structured medical knowledge, and input the semantic text and the retrieved medical knowledge to the collaborative reasoning layer after modal alignment.

[0151] The collaborative reasoning layer is configured to perform interactive reasoning on the input semantic text and medical knowledge based on a medical large language model and a medical knowledge graph, obtain a candidate reasoning hypothesis carrying a confidence evaluation, and input the candidate reasoning hypothesis to the explanation generation layer.

[0152] The explanation generation layer is configured to generate an inference report including an inference result, an inference basis, and an inference path based on the candidate inference hypothesis according to an evidence-based medicine framework.

[0153] The clinical decision-making collaborative inference model training module is configured to train a clinical decision-making collaborative inference model by the cloud server based on the medical data set, an inference loss function, and an inference reward function, and deploy the trained clinical decision-making collaborative inference model.

[0154] The clinical decision-making collaborative inference model pushing module is configured to deploy a federal gateway by the cloud server, and push the clinical decision-making collaborative inference model to the distributed medical terminal through the federal gateway.

[0155] The collaborative inference module is configured to acquire an input query request by the medical terminal, parse and verify the query request to obtain a query demand, input the query demand into the deployed clinical decision-making collaborative inference model to obtain an inference report including an inference result, an inference basis, and an inference path, and display the inference report; the inference report is only for reference, not a diagnosis result.

[0156] The model iteration optimization module is configured to record an inference log including at least a doctor account, an inference time, a query demand, an inference report, and an inference feedback by the medical terminal in real time, and iteratively optimize the collaborative inference model by using the inference log through a federal learning mechanism.

[0157] The inference log storage module is configured to encrypt and distribute backup of the inference log by the medical terminal.

[0158] The medical data set construction module is specifically configured to:

[0159] The cloud server acquires a large amount of historical medical data including structured health guidelines and unstructured medical records; the health guidelines at least include disease definition, treatment suggestion, prognosis evaluation, special population suggestion, clinical path, and reference; the medical records at least include patient information, chief complaint and present history, past history, physical examination data, auxiliary examination data, preliminary evaluation result, differential evaluation result, treatment process, disease change data, consultation record, and discharge summary; the auxiliary examination data at least includes text data and image data.

[0160] The historical medical data are sequentially preprocessed by data desensitization, data cleaning, data unification, and feature extraction, and the preprocessed historical medical data are labeled by treatment effect, query demand, inference result, inference basis, and inference path to construct a medical data set.

[0161] In the medical knowledge graph construction module, the medical information extraction model is constructed based on a multi-modal encoding layer, a cross-modal alignment layer, and a joint decoding layer;

[0162] The multi-modal encoding layer is constructed based on a text encoding module, an image encoding model, a structure encoding module, and a feature mapping module. The text encoding module is used to extract text features from the medical data set through a BioBERT network. The image encoding model is used to extract image features from the medical data set through a residual convolutional network. The structure encoding module is used to extract node relationship perception features from the medical data set through a graph attention network. The feature mapping module is used to map the text features, image features, and node relationship perception features to a unified semantic space through a fully connected layer to obtain corresponding modal embeddings.

[0163] The cross-modal alignment layer is constructed based on a modal interaction module and a gated fusion module. The modal interaction module is used to establish a semantic association matrix of the corresponding modal embeddings of the text features, image features, and node relationship perception features through a cross-attention mechanism. The gated fusion module is used to dynamically adjust the modal contribution of each modal embedding in the semantic association matrix through learnable gating weights to obtain a context-aware representation.

[0164] The joint decoding layer is constructed based on an entity decoding branch, a relationship decoding branch, and an attribute decoding branch. The entity decoding branch is used to perform sequence labeling on the context-aware representation through a conditional random field, and then identify medical entities. The relationship decoding branch is used to construct entity associations through a graph neural network on the context-aware representation, and classify the entity associations through a relationship classifier to obtain medical relationships. The attribute decoding branch is used to locate medical attributes from the context-aware representation through a multi-head pointer network.

[0165] Conditional Random Fields (CRF) is a discriminative model commonly used in sequence labeling tasks, especially widely used in Natural Language Processing (NLP) and Computer Vision (CV) fields. CRF layer is usually used to process data with sequence structure, such as part-of-speech tagging, Named Entity Recognition (NER) in text, and pixel segmentation in images, etc.

[0166] Relation Classifier is a classification model used to identify the semantic relationship between entities in text. Given two entities, the goal of the Relation Classifier is to predict the relationship type between them. For example, in the sentence "Apple Inc. was founded by Steve Jobs", the Relation Classifier can identify the "founded" relationship between "Apple Inc." and "Steve Jobs".

[0167] Multi-Head Pointer Network is a model that combines multi-head attention mechanism and pointer network, used for processing sequence-to-sequence tasks, especially when the output sequence is a subset or permutation of the input sequence; this network structure can effectively handle tasks such as the Traveling Salesman Problem (TSP), text summarization, question answering systems, etc.

[0168] The extraction loss function of the medical information extraction model is constructed by weighting entity loss, relationship loss, and attribute loss; the entity loss adopts cross-entropy loss with class weight; the relationship loss adopts binary cross-entropy loss; the attribute loss adopts multi-label marginal loss with threshold adjustment;

[0169] The medical knowledge graph updating module is specifically used for:

[0170] The cloud server creates a medical information monitoring agent based on crawler technology, sets the monitoring channel, monitoring frequency, data crawling rules, and dynamic IP proxy pool of the medical information monitoring agent; the monitoring channel at least includes official API, academic database, patent database, paper database, industry news website, and professional forum;

[0171] Through the medical information monitoring agent, the latest medical information is monitored, and each piece of the medical information is sequentially subjected to format verification (such as JSON Schema / XSD), logic verification (such as time sequence / value range), and conflict verification (compared with the existing knowledge graph), and then each piece of the medical information is subjected to data cleaning and data anonymization preprocessing, the medical information after preprocessing is added with noise through the differential privacy algorithm, the medical knowledge including medical entities, medical relationships, and medical attributes is extracted from the medical information after adding noise through the medical information extraction model, and then the medical knowledge graph is updated.

[0172] In the clinical decision-making collaborative reasoning model creation module, the multi-modal fusion layer is constructed based on a semantic analysis module, a graph retrieval module, and a modal alignment module; the semantic analysis module is used to extract deep semantic representation from the input query demand through Transformer, and to obtain unstructured semantic text through semantic analysis of the deep semantic representation through a bidirectional attention mechanism; the graph retrieval module is used to retrieve the medical knowledge graph simultaneously using the query demand, and to obtain structured medical knowledge; the modal alignment module is used to align the semantic text and the retrieved medical knowledge through the constraints of medical ontology;

[0173] The synergistic reasoning layer is constructed based on a double-flow cross-attention module, a dynamic knowledge injection module, and a hypothesis verification module; the double-flow cross-attention module is used to establish an interaction channel between a pre-trained medical large language model and a medical knowledge graph, semantic text and medical knowledge are input into the medical large language model and the medical knowledge graph through the interaction channel, and the input semantic text and medical knowledge are interactively reasoned through a time sequence convolution network and a time sequence memory network, so as to generate a candidate reasoning hypothesis; the dynamic knowledge injection module is used to inject the latest clinical guideline in the form of a low-rank matrix into the parameter space of the medical large language model after being vectorized through a real-time knowledge adapter; the hypothesis verification module is used to reason the confidence evaluation of the candidate reasoning hypothesis through a differential logic reasoner, and input the candidate reasoning hypothesis carrying the confidence evaluation into an explanation generation layer;

[0174] The differential logic reasoner (Differential Logic Reasoner) is a model combining logical reasoning and deep learning technology, aiming to process logical reasoning tasks in a differentiable way; it combines logical rules and neural networks, so that the model can maintain logical expression ability while using gradient descent and other optimization methods for learning and reasoning.

[0175] The explanation generation layer is constructed based on a causal reasoning module and an evidence alignment module; the causal reasoning module is used to perform causal reasoning on the candidate reasoning hypothesis through a differentiable Markov logic network to obtain a causal chain; the evidence alignment module is used to convert the causal chain into a reasoning report containing reasoning results, reasoning basis and reasoning paths through a medical ontology template engine, and output the reasoning report;

[0176] The formula of the reasoning loss function is:

[0177] L_total=α*L_align+β*L_reason+γ*L_explain;

[0178] Wherein, L_total represents the reasoning loss value; L_align represents the modal alignment loss function; L_reason represents the synergistic reasoning loss function; L_explain represents the explanation generation loss function; α, β, γ all represent loss component weight coefficients, and α+β+γ=1;

[0179] L_align=1-cos_sim(E_text, E_know);

[0180] wherein, E_text∈R^d, represents semantic text encoding vector, R is a real number, and d is the encoding dimension; E_know∈R^d, represents medical knowledge encoding vector; cos_sim represents cosine similarity calculation; L_align is used to constrain the consistency of the representation of unstructured text and structured knowledge in the hidden space;

[0181] L_reason=CE(y_pred, y_pred)+λ*KL(p_conf||p_conf);

[0182] wherein, CE represents cross-entropy loss function; y_pred∈R^C, represents candidate reasoning hypothesis probability distribution, and C is the number of disease categories; y_true∈R^C, represents the true result label distribution; KL represents Kullback-Leibler divergence; p_conf∈R^C, represents the confidence distribution output by the model; p_true∈R^C, represents the confidence benchmark annotated by experts; L_reason= is used to supervise the accuracy (CE term) and confidence calibration (KL term) of reasoning hypothesis; λ represents a weight coefficient;

[0183] L_explain=Σ_{s∈S}[CE(g_s, g_s^)+δROUGE(g_s, g_s^)];

[0184] wherein, S={report, basis, path}, represents a set of evidence-based medicine elements; g_s represents the word-level probability distribution of the generated text; g_s^ represents the reference text annotated by experts; ROUGE represents a text semantic matching index; L_explain is used to constrain the factual accuracy (CE term) and medical logical coherence (ROUGE term) of reasoning results; δ represents a weight coefficient;

[0185] The formula of the reasoning reward function is:

[0186] R_total=ω1*R_accuracy+ω2*R_consistency+ω3*R_coherence+ω4*R_confidence+ω5*R_evidence;

[0187] wherein, R_total represents the reasoning reward value; R_accuracy represents the reasoning accuracy reward; R_consistency represents the knowledge consistency reward; R_coherence represents the logical coherence reward; R_confidence represents the confidence calibration reward; R_evidence represents the evidence integrity reward; ω1~ω5∈[0,1], represents the reward component weight, and satisfies Σωi=1;

[0188] R_accuracy = F1(y_pred, y_true) + AUC-ROC(p_conf, y_true);

[0189] where F1 denotes the F1 score (harmonic mean of precision and recall) of disease classification; AUC-ROC denotes the area under the ROC curve of confidence prediction; R_accuracy is used to encourage the dual accuracy of the model in disease classification and confidence evaluation;

[0190] R_consistency = KG_Recall(h, G) * cos_sim(E_h, E_kg);

[0191] where KG_Recall denotes the path recall rate of candidate hypothesis h in knowledge graph G; E_h ∈ R^d, denotes the hypothesis encoding vector; E_kg ∈ R^d, denotes the knowledge graph subgraph encoding vector; R_consistency is used to constrain the logical association strength of reasoning hypothesis and medical knowledge graph;

[0192] R_coherence = Σ_{t=2}^T [logit(p_t|C_{1:t-1}) - logit(p_t|∅)];

[0193] where p_t denotes the probability distribution of the t-th step reasoning decision; C_{1:t-1} denotes the historical reasoning context state; R_coherence is used to strengthen the causal coherence of reasoning path in multi-step reasoning (calculated by conditional probability gain); ∅ represents an empty set;

[0194] R_confidence = 1 - |Brier(p_conf, y_true) - Brier(p_expert, y_true)|;

[0195] where Brier denotes the Brier score calibration index, which calculates the mean square error of predicted confidence and true label; p_expert denotes the confidence benchmark labeled by experts; R_confidence is used to drive the model confidence distribution to align with the evaluation standard of clinical experts;

[0196] R_evidence = 0.5 ROUGE-L(r, r') + 0.5 * Coverage(s, S_EBM);

[0197] where ROUGE-L denotes the long sequence matching degree of generated report r and standard report r'; Coverage denotes the coverage proportion of generated content to evidence-based medicine element set S_EBM (medical history / examination / guidelines); R_evidence is used to ensure that the reasoning explanation conforms to the complete fact chain required by evidence-based medicine.

[0198] The clinical decision-making collaborative reasoning model training module is specifically configured to:

[0199] After expanding the sample size of the medical data set through the adversarial network, the medical data set is divided into a training set, a validation set, and a test set through stratified sampling. The clinical decision-making collaborative reasoning model is trained using the training set. In each round of training, the reasoning loss function and the reasoning reward function are alternately used to optimize the clinical decision-making collaborative reasoning model. During the training process, the hyperparameters of the clinical decision-making collaborative reasoning model are dynamically adjusted, including learning rate, decay rate, batch size, random dropout rate, and neuron number. The dynamic pruning compression operation is performed on the clinical decision-making collaborative reasoning model until the preset early stopping condition is met.

[0200] The reasoning accuracy of the clinical decision-making collaborative reasoning model is calculated through the validation set to verify the clinical decision-making collaborative reasoning model. If the verification fails, the training set is expanded for further training. If the verification passes, the following steps are performed:

[0201] The hallucination reasoning suppression rate, confidence calibration error, knowledge conflict resolution rate, and multi-disease confusion matrix of the clinical decision-making collaborative reasoning model are calculated through the test set to test the clinical decision-making collaborative reasoning model. If the test fails, the training set is expanded for further training. If the test passes, the training is ended, and the trained clinical decision-making collaborative reasoning model is deployed.

[0202] In specific implementation, the hallucination reasoning suppression rate is detected by an adversarial test set (containing 50 fictional symptom combinations), and the qualified standard is that the probability of generating non-medical entities is <0.01%. The confidence calibration error is the Brier score of the model prediction probability and the actual accuracy. The test method for the knowledge conflict resolution rate is to inject 10% outdated guidelines, and the proportion of the model that prefers to use the latest guidelines is ≥98% to pass the test. The multi-disease confusion matrix is a stratified sampling test of 100 diseases, and the key indicators are: sensitivity (Recall): misdiagnosis rate ≤3%; specificity (Specificity): misdiagnosis rate ≤1.5%; F1-score (especially important for concurrent disease cases).

[0203] The clinical decision-making collaborative reasoning model pushing module is specifically configured to:

[0204] The cloud server deploys a federal gateway that supports load balancing and traffic management, enables the service discovery mechanism of the federal gateway, configures a two-way authentication mechanism, and performs two-way authentication operations with each medical terminal deployed in a distributed manner through the two-way authentication mechanism.

[0205] The cloud server converts the format of the clinical decision-making collaborative reasoning model into a lightweight ONNX, calculates a signature value of the clinical decision-making collaborative reasoning model through an SM3 algorithm, adds metadata including at least a version number, an applicable scenario, a medical knowledge graph query path, and the signature value in the clinical decision-making collaborative reasoning model, encrypts the clinical decision-making collaborative reasoning model to which the metadata is added through AES-128-GCM to obtain a first-level encrypted model, encodes the first-level encrypted model through Base64, replaces the character "+" with "$", and " / " with "@" to obtain a second-level encrypted model, encrypts the second-level encrypted model through ChaCha20-Poly1305 to obtain a third-level encrypted model, and pushes the third-level encrypted model to a distributed medical terminal through the federal gateway.

[0206] The medical terminal receives the third-level encrypted model pushed through the federal gateway, decrypts the third-level encrypted model through ChaCha20-Poly1305 to obtain a second-level encrypted model, replaces the characters "$" and "@" in the second-level encrypted model with "+" and " / ", respectively, and decodes the second-level encrypted model through Base64 to obtain a first-level encrypted model, decrypts the first-level encrypted model through AES-128-GCM to obtain a clinical decision-making collaborative reasoning model, verifies the signature value carried by the metadata of the clinical decision-making collaborative reasoning model, and locally deploys the clinical decision-making collaborative reasoning model.

[0207] The collaborative reasoning module is specifically configured to:

[0208] The medical terminal obtains an input query request carrying a request time, a query appeal, a doctor account, a doctor password, and a MAC value, and the MAC value is obtained by calculating the request time, the query appeal, the doctor account, and the doctor password through HMAC.

[0209] The medical terminal parses the query request to obtain the request time, the query appeal, the doctor account, the doctor password, and the MAC value, performs integrity verification through the MAC value, then performs integrity verification through the request time, and then performs legality verification through the doctor account and the doctor password, and if the verification is passed, inputs the query appeal into the deployed clinical decision-making collaborative reasoning model, and the clinical decision-making collaborative reasoning model performs accelerated reasoning through a hardware acceleration technology to obtain a reasoning report including a reasoning result, a reasoning basis, and a reasoning path, and displays the reasoning report through a display screen.

[0210] The model iteration optimization module is specifically configured to:

[0211] The medical terminal records at least a doctor account, an inference time, a query demand, an inference report and an inference feedback in real time, and when the number of logs of the inference log reaches a preset number threshold, each of the inference logs after performing a data desensitization operation is used to train a local collaborative inference model, the trained collaborative inference model is subjected to performance verification, model parameters of the collaborative inference model after performance verification are read, and the model parameters are uploaded to a cloud server through a federal gateway;

[0212] The cloud server backs up the locally deployed collaborative inference model, averages parameter values of the model parameters uploaded by each medical terminal to update the collaborative inference model, and performs performance verification on the updated collaborative inference model, and when the performance verification is passed, difference parameters are obtained by comparing the backup collaborative inference model, the difference parameters are distributed to each medical terminal through the federal gateway, and each medical terminal iteratively optimizes the collaborative inference model based on the received difference parameters;

[0213] The inference log storage module is specifically configured to:

[0214] The medical terminal calculates a hash value of the inference log through SHA-256, encrypts the inference log and the hash value through AES-128-CBC to obtain first-level encrypted data, converts the first-level encrypted data into hexadecimal data, and reverses the number 7 and the letter B and the number 9 and the letter C in the hexadecimal data to obtain second-level encrypted data, encrypts the second-level encrypted data into an encrypted log through an RSA algorithm, stores the encrypted log and performs distributed backup.

[0215] Although the specific embodiments of the present application are described above, those skilled in the art should understand that the specific examples described are only illustrative, and are not intended to limit the scope of the present application, and equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present application should be covered within the scope of the claims of the present application.

Claims

1. A method for collaborative reasoning by fusing medical knowledge graphs and large models, characterized in that: The method comprises the following steps: Step S1, the cloud server acquires a large amount of historical medical data including structured health guidelines and unstructured medical records, pre-processes each of the historical medical data, and constructs a medical data set; Step S2, the cloud server extracts multi-modal medical entities, medical relationships and medical attributes from the medical data set through a pre-trained medical information extraction model, and constructs a medical knowledge graph based on the extracted medical entities, medical relationships and medical attributes; Step S3, the cloud server creates a medical information monitoring agent, monitors the latest medical information through the medical information monitoring agent, and updates the medical knowledge graph based on the medical information through a differential privacy algorithm after verifying each of the monitored medical information; Step S4, the cloud server creates a clinical decision-making collaborative reasoning model based on a multi-modal fusion layer, a collaborative reasoning layer and an explanation generation layer, and sets a reasoning loss function and a reasoning reward function of the clinical decision-making collaborative reasoning model; The multi-modal fusion layer is constructed based on a semantic analysis module, a graph retrieval module and a modal alignment module; the semantic analysis module is used to extract deep semantic representations from input query demands through a Transformer, and to obtain unstructured semantic text through semantic analysis of the deep semantic representations through a bidirectional attention mechanism; the graph retrieval module is used to retrieve medical knowledge graph with query demands, and to obtain structured medical knowledge; and the modal alignment module is used to align the semantic text and the retrieved medical knowledge through the constraint of medical ontology; The collaborative reasoning layer is constructed based on a double-flow cross-attention module, a dynamic knowledge injection module and a hypothesis verification module; the double-flow cross-attention module is used to establish an interaction channel between the pre-trained medical large language model and the medical knowledge graph, to input the semantic text and the medical knowledge into the medical large language model and the medical knowledge graph through the interaction channel, and to generate candidate reasoning hypotheses through interactive reasoning of the input semantic text and medical knowledge through a time series convolution network and a time series memory network; The dynamic knowledge injection module is used to inject the latest clinical guidelines into the parameter space of the medical large language model in the form of a low-rank matrix after vectorization through a real-time knowledge adapter; The hypothesis verification module is used to infer the confidence evaluation of the candidate reasoning hypothesis through a differential logic reasoner, and to input the candidate reasoning hypothesis carrying the confidence evaluation into the explanation generation layer; The explanation generation layer is constructed based on a causal reasoning module and an evidence alignment module; The causal reasoning module is used to perform causal reasoning on the candidate reasoning hypothesis through a differentiable Markov logic network to obtain a causal chain; and the evidence alignment module is used to convert the causal chain into a reasoning report containing reasoning results, reasoning basis and reasoning paths through a medical ontology template engine, and to output the reasoning report; The formula of the reasoning loss function is: L_total=α*L_align+β*L_reason+γ*L_explain; Wherein, L_total represents the inference loss value; L_align represents the modal alignment loss function; L_reason represents the collaborative inference loss function; L_explain represents the explanation generation loss function; α, β, γ all represent loss component weight coefficients, and α+β+γ=1; The formula of the inference reward function is: R_total=ω1*R_accuracy+ω2*R_consistency+ω3*R_coherence+ω4*R_confidence+ω5*R_evidence; Wherein, R_total represents the inference reward value; R_accuracy represents the inference accuracy reward; R_consistency represents the knowledge consistency reward; R_coherence represents the logical coherence reward; R_confidence represents the confidence calibration reward; R_evidence represents the evidence integrity reward; ω1~ω5∈[0,1], represent reward component weights, and Σωi=1; Step S5, the cloud server trains the clinical decision collaborative inference model through the medical data set, the inference loss function, and the inference reward function, and deploys the trained clinical decision collaborative inference model; Step S6, the cloud server deploys a federal gateway supporting load balancing and traffic management, enables the service discovery mechanism of the federal gateway, configures a bidirectional authentication mechanism, and performs bidirectional authentication operation with each medical terminal deployed in a distributed manner through the bidirectional authentication mechanism; The cloud server converts the format of the clinical decision collaborative inference model into a lightweight ONNX, calculates the signature value of the clinical decision collaborative inference model through the SM3 algorithm, adds metadata including at least version number, applicable scenario, medical knowledge graph query path, and signature value in the clinical decision collaborative inference model, encrypts the clinical decision collaborative inference model with added metadata through AES-128-GCM to obtain a primary encryption model, encodes the primary encryption model through Base64, replaces the character "+" with "$", and " / " with "@", obtains a secondary encryption model, encrypts the secondary encryption model through ChaCha20-Poly1305 to obtain a tertiary encryption model, and pushes the tertiary encryption model to the medical terminal deployed in a distributed manner through the federal gateway; The medical terminal receives the tertiary encryption model pushed through the federal gateway, decrypts the tertiary encryption model through ChaCha20-Poly1305 to obtain a secondary encryption model, replaces the characters "$" and "@" in the secondary encryption model with "+" and " / ", respectively, and performs Base64 decoding to obtain a primary encryption model, decrypts the primary encryption model through AES-128-GCM to obtain a clinical decision collaborative inference model, and locally deploys the clinical decision collaborative inference model after verifying the signature value carried by the metadata of the clinical decision collaborative inference model; Step S7, the medical terminal acquires the input query request, parses and verifies the query request to obtain a query demand, inputs the query demand into a deployed clinical decision-making collaborative reasoning model to obtain a reasoning report including a reasoning result, reasoning basis and reasoning path, and displays the reasoning report; Step S8, the medical terminal records a reasoning log including at least a doctor account, reasoning time, query demand, reasoning report and reasoning feedback in real time, and iteratively optimizes the collaborative reasoning model by using the reasoning log through a federated learning mechanism; Step S9, the medical terminal encrypts and distributes backup of the reasoning log.

2. The method of claim 1, wherein the method comprises: The step S1 is specifically: The cloud server acquires a large amount of historical medical data including structured health guidelines and unstructured medical records; The historical medical data are sequentially preprocessed by data desensitization, data cleaning, data unification and feature extraction, and the preprocessed historical medical data are labeled by treatment effect, query demand, reasoning result, reasoning basis and reasoning path to construct a medical data set; In the step S2, the medical information extraction model is constructed based on a multi-modal encoding layer, a cross-modal alignment layer and a joint decoding layer; The multi-modal encoding layer is constructed based on a text encoding module, an image encoding model, a structure encoding module and a feature mapping module; the text encoding module is used to extract text features from the medical data set through a BioBERT network; the image encoding model is used to extract image features from the medical data set through a residual convolutional network; the structure encoding module is used to extract node relationship perception features from the medical data set through a graph attention network; The feature mapping module is used to map the text features, image features and node relationship perception features to a unified semantic space through a full connection layer to obtain corresponding modal embeddings; The cross-modal alignment layer is constructed based on a modal interaction module and a gated fusion module; the modal interaction module is used to establish a semantic association matrix of the corresponding modal embeddings of the text features, image features and node relationship perception features through a cross-attention mechanism; the gated fusion module is used to dynamically adjust the modal contribution of each modal embedding in the semantic association matrix through a learnable gating weight to obtain a context-aware representation; The joint decoding layer is constructed based on an entity decoding branch, a relationship decoding branch and an attribute decoding branch; The entity decoding branch is used to perform sequence labeling on the context-aware representation through a conditional random field to identify medical entities; the relationship decoding branch is used to construct entity associations from the context-aware representation through a graph neural network, and classify the entity associations through a relationship classifier to obtain medical relationships; The attribute decoding branch is used to locate medical attributes from the context-aware representation through a multi-head pointer network; The extraction loss function of the medical information extraction model is constructed by weighting an entity loss, a relationship loss and an attribute loss; the entity loss adopts a cross-entropy loss with class weight; the relationship loss adopts a binary cross-entropy loss; and the attribute loss adopts a multi-label margin loss with threshold adjustment; The step S3 is specifically: The cloud server creates a medical information monitoring agent based on a crawler technology, sets a monitoring channel, a monitoring frequency, a data crawling rule, and a dynamic IP proxy pool of the medical information monitoring agent; the monitoring channel at least includes an official API, an academic database, a patent database, a paper database, an industry news website, and a professional forum; The latest medical information is monitored through the medical information monitoring agent, and each piece of the monitored medical information is sequentially subjected to format verification, logic verification, and conflict verification, and then each piece of the medical information is subjected to data cleaning and data anonymization preprocessing, noise is added to the preprocessed medical information through a differential privacy algorithm, medical knowledge including medical entities, medical relationships, and medical attributes is extracted from the medical information with added noise through the medical information extraction model, and the medical knowledge graph is updated.

3. The method of claim 1, wherein the method comprises: The step S5 is specifically: After expanding the sample size of the medical data set through the adversarial network, the medical data set is divided into a training set, a validation set, and a test set through stratified sampling, the clinical decision collaborative reasoning model is trained through the training set, in each round of training, the reasoning loss function and the reasoning reward function are alternately used to optimize the clinical decision collaborative reasoning model, the hyperparameters of the clinical decision collaborative reasoning model including learning rate, decay rate, batch size, random dropout rate, and neuron number are dynamically adjusted during training, and a dynamic pruning compression operation is performed on the clinical decision collaborative reasoning model until a preset early stopping condition is met; The reasoning accuracy of the clinical decision collaborative reasoning model is calculated through the validation set to verify the clinical decision collaborative reasoning model, if the verification fails, the training set is expanded for further training; if the verification passes, the following steps are performed: The illusion reasoning inhibition rate, confidence calibration error, knowledge conflict resolution rate, and multi-disease confusion matrix of the clinical decision collaborative reasoning model are calculated through the test set to test the clinical decision collaborative reasoning model, if the test fails, the training set is expanded for further training; if the test passes, the training is ended, and the trained clinical decision collaborative reasoning model is deployed.

4. The method of claim 1, wherein the method comprises: The step S7 is specifically: The medical terminal obtains an input query request carrying a request time, a query appeal, a doctor account, a doctor password, and a MAC value, the MAC value being obtained by HMAC calculation on the request time, the query appeal, the doctor account, and the doctor password; The medical terminal parses the query request to obtain the request time, the query appeal, the doctor account, the doctor password, and the MAC value, performs integrity verification through the MAC value, then performs integrity verification through the request time, and then performs legality verification through the doctor account and the doctor password, if the verification passes, the query appeal is input into the deployed clinical decision collaborative reasoning model, the clinical decision collaborative reasoning model is accelerated through hardware acceleration technology to obtain a reasoning report including a reasoning result, a reasoning basis, and a reasoning path, and the reasoning report is displayed on a display screen.

5. The method of claim 1, wherein the method further comprises: The step S8 is specifically: The medical terminal records at least a doctor account, an inference time, a query demand, an inference report, and an inference feedback in real time, and when the number of inference logs reaches a preset number threshold, each inference log after a data desensitization operation is performed is used to train a local collaborative inference model, the trained collaborative inference model is verified in performance, model parameters of the collaborative inference model after performance verification are read, and the model parameters are uploaded to a cloud server through a federal gateway; The cloud server backs up the collaborative inference model deployed locally, updates the collaborative inference model by averaging the parameter values of the model parameters uploaded by each medical terminal, and verifies the updated collaborative inference model in performance, and when the performance verification is passed, difference parameters are obtained by comparing the backed-up collaborative inference model, the difference parameters are distributed to each medical terminal through the federal gateway, and each medical terminal iteratively optimizes the collaborative inference model based on the received difference parameters. The step S9 specifically includes: The medical terminal calculates a hash value of the inference log through SHA-256, encrypts the inference log and the hash value through AES-128-CBC to obtain first-level encrypted data, converts the first-level encrypted data into hexadecimal data, and reverses the number 7 and the letter B and the number 9 and the letter C in the hexadecimal data to obtain second-level encrypted data, encrypts the second-level encrypted data into an encrypted log through an RSA algorithm, stores the encrypted log, and performs distributed backup.

6. A collaborative reasoning system fusing medical knowledge graph and large model, characterized in that: The method comprises the following modules: A medical data set construction module is configured to enable the cloud server to obtain a large amount of historical medical data including structured health guidelines and unstructured medical records, and to construct a medical data set after preprocessing each historical medical data. A medical knowledge graph construction module is configured to enable the cloud server to extract multi-modal medical entities, medical relationships, and medical attributes from the medical data set through a pre-trained medical information extraction model, and to construct a medical knowledge graph based on the extracted medical entities, medical relationships, and medical attributes. A medical knowledge graph updating module is configured to enable the cloud server to create a medical information monitoring agent, to monitor the latest medical information through the medical information monitoring agent, and to update the medical knowledge graph based on the medical information through a differential privacy algorithm after verifying each medical information. A clinical decision collaborative inference model construction module is configured to enable the cloud server to create a clinical decision collaborative inference model based on a multi-modal fusion layer, a collaborative inference layer, and an explanation generation layer, and to set an inference loss function and an inference reward function of the clinical decision collaborative inference model. The multi-modal fusion layer is constructed based on a semantic analysis module, a graph retrieval module, and a modal alignment module; the semantic analysis module is configured to extract deep semantic representations from an input query by a Transformer, and perform semantic analysis on the deep semantic representations by a bidirectional attention mechanism to obtain unstructured semantic text; the graph retrieval module is configured to retrieve a medical knowledge graph based on the query to obtain structured medical knowledge; and the modal alignment module is configured to align the semantic text and the retrieved medical knowledge based on constraints of a medical ontology; The collaborative reasoning layer is constructed based on a double-flow cross-attention module, a dynamic knowledge injection module, and a hypothesis verification module; the double-flow cross-attention module is configured to establish an interaction channel between a pre-trained medical large language model and a medical knowledge graph, input the semantic text and the medical knowledge into the medical large language model and the medical knowledge graph through the interaction channel, and perform interactive reasoning on the input semantic text and medical knowledge through a time series convolution network and a time series memory network to generate a candidate reasoning hypothesis; The dynamic knowledge injection module is configured to inject the latest clinical guidelines into the parameter space of the medical large language model in the form of a low-rank matrix after vectorization through a real-time knowledge adapter; The hypothesis verification module is configured to infer a confidence evaluation of the candidate reasoning hypothesis through a differential logic reasoner, and input the candidate reasoning hypothesis carrying the confidence evaluation into an explanation generation layer; The explanation generation layer is constructed based on a causal reasoning module and an evidence alignment module; The causal reasoning module is configured to perform causal reasoning on the candidate reasoning hypothesis through a differentiable Markov logic network to obtain a causal chain; and the evidence alignment module is configured to convert the causal chain into a reasoning report containing a reasoning result, a reasoning basis, and a reasoning path through a medical ontology template engine, and output the reasoning report; The formula of the reasoning loss function is: L_total=α*L_align+β*L_reason+γ*L_explain; wherein, L_total represents a reasoning loss value; L_align represents a modal alignment loss function; L_reason represents a collaborative reasoning loss function; L_explain represents an explanation generation loss function; α, β, and γ each represent a loss component weight coefficient, and α+β+γ=1; The formula of the reasoning reward function is: R_total=ω1*R_accuracy+ω2*R_consistency+ω3*R_coherence+ω4*R_confidence+ω5*R_evidence; Wherein, R_total represents the inference reward value; R_accuracy represents the inference accuracy reward; R_consistency represents the knowledge consistency reward; R_coherence represents the logical coherence reward; R_confidence represents the confidence calibration reward; R_evidence represents the evidence integrity reward; ω1~ω5∈[0,1] represents the reward component weight, and satisfies Σωi=1; The clinical decision collaborative inference model training module is configured to train the clinical decision collaborative inference model by the cloud server through the medical data set, the inference loss function, and the inference reward function, and deploy the trained clinical decision collaborative inference model; The clinical decision collaborative inference model pushing module is configured to enable the service discovery mechanism of the federal gateway supporting load balancing and traffic management, configure a bidirectional authentication mechanism, and perform bidirectional authentication operation with each medical terminal in distributed deployment through the bidirectional authentication mechanism; The cloud server converts the format of the clinical decision collaborative inference model into a lightweight ONNX, calculates the signature value of the clinical decision collaborative inference model through the SM3 algorithm, adds metadata including at least a version number, an applicable scenario, a medical knowledge graph query path, and a signature value in the clinical decision collaborative inference model, encrypts the clinical decision collaborative inference model with added metadata through AES-128-GCM to obtain a primary encryption model, encodes the primary encryption model through Base64, replaces the character "+" with "$", and " / " with "@", obtains a secondary encryption model, encrypts the secondary encryption model through ChaCha20-Poly1305 to obtain a tertiary encryption model, and pushes the tertiary encryption model to the medical terminal in distributed deployment through the federal gateway; The medical terminal receives the tertiary encryption model pushed through the federal gateway, decrypts the tertiary encryption model through ChaCha20-Poly1305 to obtain a secondary encryption model, replaces the characters "$" and "@" in the secondary encryption model with "+" and " / ", respectively, and decodes the secondary encryption model through Base64 to obtain a primary encryption model, decrypts the primary encryption model through AES-128-GCM to obtain a clinical decision collaborative inference model, and locally deploys the clinical decision collaborative inference model after verifying the signature value carried by the metadata of the clinical decision collaborative inference model; The collaborative inference module is configured to enable the medical terminal to obtain an input query request, analyze and verify the query request to obtain a query demand, input the query demand into the deployed clinical decision collaborative inference model to obtain an inference report including an inference result, an inference basis, and an inference path, and display the inference report; The model iteration optimization module is configured to enable the medical terminal to record an inference log including at least a doctor account, an inference time, a query demand, an inference report, and an inference feedback in real time, and iteratively optimize the collaborative inference model through a federal learning mechanism using the inference log. The reasoning log storage module is configured to encrypt and perform distributed backup of the reasoning log by the medical terminal.

7. The system of claim 6, wherein the system further comprises: a medical knowledge graph construction module configured to construct a medical knowledge graph based on the medical knowledge graph data; and a medical knowledge graph reasoning module configured to perform reasoning on the medical knowledge graph based on the medical knowledge graph data. The medical data set construction module is specifically configured to: The cloud server acquires a large amount of historical medical data including structured health guidelines and unstructured medical records; Each of the historical medical data is sequentially preprocessed by data desensitization, data cleaning, data unification and feature extraction, and each of the preprocessed historical medical data is labeled by treatment effect, query demand, reasoning result, reasoning basis and reasoning path to construct a medical data set; In the medical knowledge graph construction module, the medical information extraction model is constructed based on a multi-modal encoding layer, a cross-modal alignment layer and a joint decoding layer; The multi-modal encoding layer is constructed based on a text encoding module, an image encoding model, a structure encoding module and a feature mapping module; the text encoding module is configured to extract text features from the medical data set by a BioBERT network; the image encoding model is configured to extract image features from the medical data set by a residual convolutional network; and the structure encoding module is configured to extract node relationship perception features from the medical data set by a graph attention network; The feature mapping module is configured to map the text features, image features and node relationship perception features to a unified semantic space by a full connection layer to obtain corresponding modal embeddings; The cross-modal alignment layer is constructed based on a modal interaction module and a gated fusion module; the modal interaction module is configured to establish a semantic association matrix of the corresponding modal embeddings of the text features, image features and node relationship perception features by a cross-attention mechanism; and the gated fusion module is configured to dynamically adjust the modal contribution of each modal embedding in the semantic association matrix by a learnable gating weight to obtain a context-aware representation; The joint decoding layer is constructed based on an entity decoding branch, a relationship decoding branch and an attribute decoding branch; The entity decoding branch is configured to perform sequence labeling on the context-aware representation by a conditional random field to identify medical entities; the relationship decoding branch is configured to construct entity associations from the context-aware representation by a graph neural network, and classify the entity associations by a relationship classifier to obtain medical relationships; The attribute decoding branch is configured to locate medical attributes from the context-aware representation by a multi-head pointer network; The extraction loss function of the medical information extraction model is constructed by weighting an entity loss, a relationship loss and an attribute loss; the entity loss adopts a cross-entropy loss with class weights; the relationship loss adopts a binary cross-entropy loss; and the attribute loss adopts a multi-label margin loss with threshold adjustment; The medical knowledge graph updating module is specifically configured to: The cloud server creates a medical information monitoring agent based on a crawler technology, sets a monitoring channel, a monitoring frequency, a data crawling rule and a dynamic IP proxy pool of the medical information monitoring agent; and the monitoring channel at least includes an official API, an academic database, a patent database, a paper database, an industry news website and a professional forum. The latest medical information is monitored through the medical information monitoring agent, each piece of the monitored medical information is sequentially subjected to format checking, logic checking and conflict checking, and each piece of the medical information is subjected to data cleaning and data anonymization preprocessing, noise is added to the preprocessed medical information through a differential privacy algorithm, medical knowledge including medical entities, medical relationships and medical attributes is extracted from the medical information with added noise through the medical information extraction model, and the medical knowledge graph is updated.

8. The system of claim 6, wherein the system further comprises: a medical knowledge graph construction module configured to construct a medical knowledge graph based on the medical knowledge graph data; and a medical knowledge graph reasoning module configured to perform reasoning on the medical knowledge graph based on the medical knowledge graph data. The clinical decision-making collaborative reasoning model training module is specifically used for: After expanding the sample size of the medical data set through the adversarial network, the medical data set is divided into a training set, a validation set and a test set through stratified sampling method, the clinical decision-making collaborative reasoning model is trained through the training set, in each round of training, the reasoning loss function and the reasoning reward function are alternately used to optimize the clinical decision-making collaborative reasoning model, the hyperparameters of the clinical decision-making collaborative reasoning model including learning rate, decay rate, batch size, random dropout rate and neuron number are dynamically adjusted during training, and the dynamic pruning compression operation is performed on the clinical decision-making collaborative reasoning model until the preset early stopping condition is met; The reasoning accuracy of the clinical decision-making collaborative reasoning model is calculated through the validation set to verify the clinical decision-making collaborative reasoning model, if the verification fails, the training set is expanded for further training; if the verification passes, the following steps are performed: The illusion reasoning inhibition rate, confidence calibration error, knowledge conflict resolution rate and multi-disease confusion matrix of the clinical decision-making collaborative reasoning model are calculated through the test set to test the clinical decision-making collaborative reasoning model, if the test fails, the training set is expanded for further training; if the test passes, the training is ended, and the trained clinical decision-making collaborative reasoning model is deployed.

9. The system of claim 6, wherein the system further comprises: a medical knowledge graph construction module configured to construct a medical knowledge graph based on the medical knowledge graph data; and a medical knowledge graph reasoning module configured to perform reasoning on the medical knowledge graph based on the medical knowledge graph data. The collaborative reasoning module is specifically used for: The medical terminal obtains an input query request carrying a request time, a query appeal, a doctor account, a doctor password and a MAC value, the MAC value is obtained by HMAC calculation on the request time, the query appeal, the doctor account and the doctor password; The medical terminal analyzes the query request to obtain the request time, the query appeal, the doctor account, the doctor password and the MAC value, performs integrity checking through the MAC value, then performs integrity checking through the request time, and then performs legality checking through the doctor account and the doctor password, if the checking passes, the query appeal is input into the deployed clinical decision-making collaborative reasoning model, the clinical decision-making collaborative reasoning model is accelerated through hardware acceleration technology to obtain a reasoning report including a reasoning result, a reasoning basis and a reasoning path, and the reasoning report is displayed through a display screen.

10. The system of claim 6, wherein the system further comprises: a medical knowledge graph construction module configured to construct a medical knowledge graph based on the medical knowledge graph data; and a medical knowledge graph reasoning module configured to perform reasoning on the medical knowledge graph based on the medical knowledge graph data. The model iteration optimization module is specifically used for: The medical terminal records at least a doctor account, reasoning time, query demand, reasoning report and reasoning feedback in real time. When the number of reasoning logs reaches a preset number threshold, each reasoning log after a data desensitization operation is performed is used to train a local collaborative reasoning model. The trained collaborative reasoning model is verified for performance. Model parameters of the collaborative reasoning model after performance verification are read. The model parameters are uploaded to a cloud server through a federal gateway. The cloud server backs up the local collaborative reasoning model. The parameter values of the model parameters uploaded by each medical terminal are averaged to update the collaborative reasoning model. The updated collaborative reasoning model is verified for performance. After performance verification, difference parameters are obtained by comparing the backup collaborative reasoning model. The difference parameters are distributed to each medical terminal through the federal gateway. Each medical terminal iteratively optimizes the collaborative reasoning model based on the received difference parameters. The reasoning log storage module is specifically configured to: The medical terminal calculates a hash value of the reasoning log by using SHA-256. The reasoning log and the hash value are encrypted by using AES-128-CBC to obtain first-level encrypted data. The first-level encrypted data is converted into hexadecimal data. The number 7 and the letter B in the hexadecimal data are swapped, and the number 9 and the letter C are swapped to obtain second-level encrypted data. The second-level encrypted data is encrypted into an encrypted log by using an RSA algorithm. The encrypted log is stored and distributed.

Citation Information

Patent Citations

  • Interrogation method and system based on knowledge graph and generative large model

    CN117854748A

  • Knowledge graph-driven medical large model diagnosis method

    CN118280562A