Medical knowledge enhanced question answering and auxiliary diagnosis and treatment method for biliary surgery

By constructing a knowledge graph of biliary tract surgery and utilizing a causal perception retrieval mechanism and a large language model, the problems of information fragmentation and logical incoherence in biliary tract surgery knowledge question-and-answer were solved, achieving accurate causal information filtering and structured generation, thus improving the scientific nature and safety of diagnosis and treatment.

CN121565499BActive Publication Date: 2026-04-10UESTC (SHENZHEN) ADVANCED RES INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610079176.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-21
Publication Date
2026-04-10
Estimated Expiration
2046-01-21

AI Technical Summary

Technical Problem

Existing technologies in biliary surgery knowledge Q&A and auxiliary diagnosis scenarios suffer from problems such as fragmented knowledge relevance, insufficient retrieval accuracy, and poor domain adaptability, failing to meet clinical needs for accurate, professional, and logical information.

Method used

Entities in biliary surgery corpora are identified by entity recognition models, causal relationships are extracted, knowledge graphs are constructed and divided into communities, and clinical response texts that conform to diagnostic and treatment thinking are generated using summary generation models and large language models. Combined with causal perception retrieval mechanisms and composite scoring functions, accurate screening and structured generation of causal information are achieved.

Benefits of technology

It improves the accuracy and logical consistency of biliary tract surgical diagnosis and treatment information, reduces medical risks, provides more reliable and interpretable answers, and assists in the diagnosis and treatment decisions for complex biliary tract diseases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121565499B_ABST
    Figure CN121565499B_ABST
Patent Text Reader

Abstract

The application discloses a medical knowledge enhanced question answering and auxiliary diagnosis and treatment method for biliary surgery, comprising the following steps: recognizing biliary surgery corpus through an entity recognition model to obtain a plurality of biliary surgery entities and extracting the causal relationship between the biliary surgery entities; constructing a biliary surgery knowledge graph based on the biliary surgery entities and the causal relationship, summarizing the information in each biliary community to obtain a plurality of community abstracts; segmenting the community abstracts to obtain a plurality of abstract blocks, calculating the scores of the abstract blocks, screening the abstract blocks according to the scores, obtaining high-relevance abstract blocks, inputting the query text of a user, a structured generation template of a causal chain and the high-relevance abstract blocks into a large language model to obtain a clinical answer text. The application accurately matches clinical causal information through a causal perception mechanism, and outputs answers conforming to a clinical thinking process based on the structured generation of a causal chain, thereby improving the accuracy and interpretability of diagnosis and treatment assistance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of medical and health information technology, and in particular to a medical knowledge enhancement question-and-answer and auxiliary diagnosis and treatment method for biliary tract surgery. Background Technology

[0002] Large Language Models (LLMs), with their massive number of parameters and vast amounts of multi-source training data, have demonstrated powerful capabilities in natural language processing. They can learn language expressions, grammatical rules, and various common sense concepts, providing a technological foundation for information processing in the medical field. In biliary surgery, doctors rely heavily on specialized knowledge in their daily diagnoses, such as disease pathology mechanisms, surgical procedures, and drug contraindications. While LLMs can theoretically assist doctors in quickly acquiring information, they suffer from significant limitations due to their inherent characteristics. The core problem is "illusion," meaning they can generate seemingly reasonable content that contradicts the realities of biliary surgery. Examples include fabricating non-existent diagnostic criteria for biliary diseases, falsifying data on biliary surgery complications, or citing fictitious biliary surgery research literature. This is because LLM generates content based solely on the language probability distribution in the training data, rather than truly "understanding" the professional knowledge of biliary surgery. When the knowledge in the field of biliary surgery in the training data is not comprehensive, there are information conflicts, or when faced with complex clinical scenarios of biliary surgery (such as the identification of rare biliary diseases and the formulation of treatment plans for patients with multiple comorbidities), it will forcibly generate coherent text through probability prediction, leading to "illusions" and seriously affecting the safety of diagnosis and treatment.

[0003] Retrieval-augmented generation (RAG) technology, by introducing an external authoritative knowledge base, retrieves relevant factual information before generating content, effectively alleviating the "illusion" problem of LLM (Limited Language Management) and improving the accuracy and timeliness of output. This provides a feasible direction for knowledge-based question answering and assisted diagnosis in the field of biliary surgery. However, traditional RAG has significant limitations in its application to biliary surgery. When processing biliary surgery corpora, traditional RAG simply segments text into independent text blocks, failing to consider the interconnectedness of biliary surgery knowledge—such as the close relationship between biliary diseases and anatomical structures, surgical methods and postoperative complications, and drug treatment and pathological mechanisms. The retrieval stage relies solely on semantic similarity matching, potentially retrieving information that is superficially similar to the query but clinically irrelevant. For example, a query for "treatment of obstructive jaundice caused by biliary stones" might result in traditional RAG retrieving content related to "treatment of jaundice caused by liver tumors" due to semantic similarity, failing to accurately locate specific knowledge about the treatment of biliary stone obstruction and thus failing to meet the stringent requirements of biliary surgery for accurate and professional diagnostic information.

[0004] Graph RAG, as a graph-based retrieval enhancement and generation technology, captures entities and relationships in text by constructing a knowledge graph. It can handle global meaning queries involving the entire corpus, solving the problem of information fragmentation in traditional RAG. However, existing Graph RAG technology lacks adaptation and optimization for the field of biliary surgery. When extracting entities and relationships, it cannot accurately identify biliary surgery-specific entities (such as "extrahepatic bile duct stones" and "endoscopic retrograde cholangiopancreatography (ERCP)") and special relationships (such as the causal chain of "biliary obstruction-cholestasis-liver function damage" and the intervention relationship of "ERCP surgery-prevention of postoperative pancreatitis"). The knowledge graph construction does not combine the clinical logic of biliary surgery to divide communities, making it difficult to form knowledge modules with clinical guidance significance, such as "biliary stone diagnosis and treatment community" and "biliary tumor diagnosis and treatment community". When generating answers, it does not follow the clinical reasoning process of "symptom analysis-pathological mechanism-differential diagnosis-treatment" in biliary surgery, and cannot provide doctors with professional support that conforms to their diagnosis and treatment habits.

[0005] In summary, existing technologies in biliary surgery knowledge Q&A and auxiliary diagnosis scenarios suffer from problems such as fragmented knowledge relevance, insufficient retrieval accuracy, and poor domain adaptability, failing to meet clinical needs for accurate, professional, and logical information. Summary of the Invention

[0006] The purpose of this application is to provide a medical knowledge enhancement question-and-answer and auxiliary diagnosis and treatment method for biliary tract surgery, in order to solve the aforementioned technical problems existing in the prior art. The various technical effects of the preferred technical solution among the many technical solutions provided in this application are detailed below.

[0007] To achieve the above objectives, this application provides the following technical solutions:

[0008] This application provides a medical knowledge enhancement question-answering and auxiliary diagnosis method for biliary tract surgery, comprising: identifying biliary tract surgery corpus using an entity recognition model to obtain multiple biliary tract surgery entities containing entity type labels; extracting causal relationships between the biliary tract surgery entities based on their core attributes; constructing a biliary tract surgery knowledge graph based on the biliary tract surgery entities and the causal relationships using a graph retrieval enhancement generation algorithm; dividing the biliary tract surgery knowledge graph into various biliary tract communities using the Leiden algorithm; summarizing information within each biliary tract community using a summary generation model to obtain multiple community summaries; segmenting the community summaries to obtain multiple summary blocks; calculating the score of each summary block using a composite scoring function based on the retrieval enhancement generation algorithm, wherein the composite scoring function is used to implement a causal perception retrieval mechanism; filtering the summary blocks according to the scores to obtain highly relevant summary blocks; and inputting the user's query text, a structured generation template of the causal chain, and the highly relevant summary blocks into a large language model to obtain clinical answer text.

[0009] This application utilizes a causal perception retrieval mechanism within a retrieval-enhanced generative algorithm to accurately locate clinical causal information, such as disease-symptom associations and intervention-outcome logic. It combines the knowledge association capture capabilities of a graph retrieval-enhanced generative algorithm with the text generation capabilities of a large language model. Through the structured generation of causal chains, it outputs clinical response texts that align with diagnostic and treatment thinking, addressing the shortcomings of existing technologies such as insufficient retrieval accuracy and lack of logical support for answers. This application achieves precise screening of clinical causal information through a retrieval-enhanced generative algorithm, ensures the integrity of causal associations through a biliary tract surgery knowledge graph constructed using a graph retrieval-enhanced generative algorithm, and simulates the clinical reasoning process through the structured generation of causal chains using a large language model. The synergistic effect of these three elements overcomes the shortcomings of traditional methods, such as fragmented information and incoherent logic.

[0010] In some embodiments, the causal relationship includes entity relationships and causal chain relationships. The step of extracting the causal relationship between the biliary tract surgical entities based on the core attributes of the biliary tract surgical entities includes: processing the entity text using a causal relationship extraction model based on a biliary tract surgical causal operator dictionary to obtain the entity relationship, wherein the entity text is a text context that includes at least two of the biliary tract surgical entities; and using a multi-step causal relationship reasoning algorithm to reason about the entity text and extract the causal chain relationship, wherein the causal chain relationship is used for the structured generation of causal chains.

[0011] In some embodiments, the step of using a multi-step causal reasoning algorithm to reason about the entity text and extract the causal chain relationship includes: starting from an initial causal relationship, traversing the entity text through entity association retrieval using the graph retrieval enhancement generation algorithm, recursively mining causal nodes until a complete causal chain relationship is formed.

[0012] In some embodiments, the step of constructing a biliary tract surgical knowledge graph based on the biliary tract surgical entities and the causal relationships using a graph retrieval-enhanced generation algorithm includes: setting the biliary tract surgical entities as nodes, setting the entity relationships as edges, associating the nodes with the diagnosis and treatment process, and constructing the biliary tract surgical knowledge graph using an attribute graph model.

[0013] In some embodiments, the step of using the Leiden algorithm to divide the biliary tract surgical knowledge graph into various biliary tract communities includes: using graph traversal technology based on the graph retrieval enhancement generation algorithm to calculate the clinical association strength between nodes of the biliary tract surgical knowledge graph, and generating biliary tract communities with a three-level community structure according to preset resolution parameters, wherein the three-level community structure includes a biliary tract core community, sub-communities, and subdivided topic communities.

[0014] In some embodiments, the community summary includes leaf-level community summaries and high-level community summaries. The step of summarizing information within each biliary community using a summary generation model to obtain multiple community summaries includes: filtering and sorting nodes, edges, and supporting evidence within the sub-communities using a clinical importance ranking algorithm; organizing the filtered and sorted information according to a first preset text template to obtain the leaf-level community summary; extracting key differences and common logic from the multiple sub-communities; integrating the key differences and common logic and removing redundancy using an information fusion algorithm; and then organizing the information after removing redundancy according to a second preset text template to obtain the high-level community summary.

[0015] In some embodiments, the medical knowledge enhancement question-answering and auxiliary diagnosis method for biliary tract surgery further includes: automatically identifying summary blocks containing core causal relationships using a keyword matching algorithm, and adding high-priority tags to the summary blocks containing core causal relationships.

[0016] In some embodiments, the formula for the composite scoring function is as follows:

[0017]

[0018] in, Here, sim(q, d) represents the semantic similarity weight, and sim(q, d) represents the semantic similarity. For causal correlation weights, This indicates a causal relationship.

[0019] In some embodiments, before constructing a biliary surgery knowledge graph based on the biliary surgery entity and the causal relationship using a graph retrieval enhancement generation algorithm, the medical knowledge enhancement question answering and auxiliary diagnosis method for biliary surgery further includes: matching and mapping the name string of the biliary surgery entity with synonym strings in the biliary surgery terminology standardization system, merging biliary surgery entities with the same semantics; and performing semantic similarity calculation to semantically match ambiguous biliary surgery entities with context text to determine the entity identifier of the ambiguous biliary surgery entity, wherein the context text is the context text of the ambiguous biliary surgery entity in the biliary surgery corpus.

[0020] In some embodiments, before recognizing the biliary surgery corpus through the entity recognition model, the medical knowledge enhancement question answering and auxiliary diagnosis method for biliary surgery further includes: fine-tuning the entity recognition model based on the biliary surgery annotated corpus to recognize the biliary surgery entities, wherein the biliary surgery entities include disease entities, anatomical entities, intervention entities, and outcome entities.

[0021] Implementing one of the technical solutions described above in this application has the following advantages or beneficial effects: In this application, a biliary tract surgical knowledge graph is constructed based on a graph retrieval-enhanced generation algorithm, according to biliary tract surgical entities and causal relationships. This graph is then divided into various biliary tract communities, and community summaries corresponding to each community are obtained. The community summaries are segmented and filtered based on the retrieval-enhanced generation algorithm to obtain highly relevant summary blocks. These blocks, along with the user's query text and a structured generation template for causal chains, are then input into a large language model to generate corresponding clinical response text. In this scenario, the graph retrieval-enhanced generation algorithm ensures the structured storage of causal relationships, the retrieval-enhanced generation algorithm achieves accurate retrieval, and the large language model completes the structured generation of causal chains. The synergy of these three elements allows the embodiments of this application to focus on the causal relationships between biliary tract surgical entities, guiding the subsequently generated summary blocks to align with actual diagnostic and treatment thinking in the clinical response text, effectively supporting clinical decision-making and reducing medical risks. This application embodiment, through the organic synergy of the three, accurately matches the causal information required for clinical reasoning, and generates clinical response text that conforms to the clinical thinking process. It not only provides more reliable and explanatory answers, but also helps to sort out the logic of diagnosis and treatment, which has significant value in improving the scientificity and safety of diagnosis and treatment decisions for complex biliary tract diseases. Attached Figure Description

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

[0023] Figure 1 This is a flowchart illustrating the medical knowledge enhancement question-and-answer and auxiliary diagnosis and treatment method for biliary tract surgery according to an embodiment of this application. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of this application clearer, various exemplary embodiments described below will be referenced to the accompanying drawings, which form part of the exemplary embodiments and depict various exemplary embodiments that may be adopted to implement this application. Unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. It should be understood that they are merely examples of processes, methods, and apparatuses consistent with some aspects of this application disclosed as detailed in the appended claims, and other embodiments may be used, or structural and functional modifications may be made to the embodiments listed herein without departing from the scope and spirit of this application.

[0025] In the description of this application, it should be understood that the terms "center," "longitudinal," "lateral," etc., indicate the orientation or positional relationship based on the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the referred element must have a specific orientation, or be constructed and operated in a specific orientation. The terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. The term "multiple" means two or more. The terms "connected" and "linked" should be interpreted broadly, for example, they can be fixed connections, detachable connections, integral connections, mechanical connections, electrical connections, communication connections, direct connections, indirect connections through an intermediate medium, and can be the internal connection of two elements or the interaction relationship between two elements. The term "and / or" includes any and all combinations of one or more of the related listed items. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0026] To illustrate the technical solutions described in this application, specific embodiments are provided below, showing only the parts related to the embodiments of this application.

[0027] like Figure 1As shown, this application provides a medical knowledge enhancement question-and-answer and auxiliary diagnosis and treatment method for biliary tract surgery, including the following steps (steps S1 to S3):

[0028] S1. The biliary tract surgery corpus is identified by an entity recognition model to obtain multiple biliary tract surgery entities with entity type labels. The causal relationship between biliary tract surgery entities is extracted based on the core attributes of the biliary tract surgery entities.

[0029] Specifically, the biliary tract surgery corpus can include clinical guidelines, surgical records, case reports, core journal articles, etc. Core attributes can include clinical characteristics of the disease, dosage ranges for medications, etc. The entity recognition model can be the MedCPT recognition model, a pre-trained model specifically optimized for text matching and retrieval in the medical field. The biliary tract surgery corpus can be preprocessed to obtain multiple medical text fragments, with the length of each sentence controlled to 512 tokens. The entity recognition model can be based on a large language model architecture.

[0030] In some embodiments, before recognizing the biliary surgery corpus using an entity recognition model, the medical knowledge enhancement question answering and auxiliary diagnosis method for biliary surgery may further include: fine-tuning the entity recognition model based on the biliary surgery labeled corpus to identify biliary surgery entities, wherein biliary surgery entities include disease entities, anatomical entities, intervention entities, and outcome entities. The biliary surgery labeled corpus may include multiple labeled samples of biliary surgery. This provides high-quality entity data for the construction process of the biliary surgery knowledge graph based on graph retrieval enhancement generation algorithms, as well as the subsequent retrieval process of the retrieval enhancement generation algorithms.

[0031] Specifically, the disease entity can include the disease name and key clinical symptoms. For example, the disease name can include extrahepatic bile duct stones, primary biliary cholangitis (PBC), cholangiocarcinoma, congenital biliary atresia, etc., and the key clinical symptoms can include the triad of "biliary colic, jaundice, high fever and chills" for extrahepatic bile duct stones.

[0032] Anatomical entities can include various anatomical structures and their functional relationships. For example, anatomical structures can include intrahepatic bile ducts, cystic ducts, sphincter of Oddi, or hepatopancreatic ampulla, etc., and functional relationships can be explained by the confluence of the cystic duct and the common hepatic duct to form the common bile duct, etc.

[0033] Interventional entities can include surgical procedures, medications, and diagnostic methods. For example, surgical procedures can include endoscopic retrograde cholangiopancreatography (ERCP), laparoscopic cholecystectomy (LC), and choledochoenterostomy, while medications can include ursodeoxycholic acid, cefoperazone / sulbactam sodium, and somatostatin, and diagnostic methods can include abdominal ultrasound, computed tomography (CT), and magnetic resonance cholangiopancreatography (MRCP).

[0034] Outcome entities can include postoperative complications, treatment effects, and prognostic indicators. For example, postoperative complications can include bile leakage, bleeding, pancreatitis, etc. Treatment effects can include symptom relief, stone clearance rate, or liver function recovery, etc. Prognostic indicators can include 1-year survival rate or recurrence rate, etc.

[0035] In some embodiments, before fine-tuning the entity recognition model based on the biliary surgery annotation corpus, the medical knowledge-enhanced question-answering and assisted diagnosis method for biliary surgery may further include: removing redundant information from the biliary surgery corpus using a medical text cleaning tool, and standardizing the terminology format of the biliary surgery corpus after removing redundant information. Specifically, the medical text cleaning tool can be the BioBERT preprocessing module, and standardizing the terminology format can refer to, for example, standardizing endoscopic retrograde cholangiopancreatography (ERCP) as ERCP while retaining its alias.

[0036] In some embodiments, causal relationships can include entity relationships and causal chain relationships. Extracting causal relationships between biliary tract surgical entities based on their core attributes can include: processing entity text using a causal relationship extraction model based on a biliary tract surgical causal operator dictionary to obtain entity relationships, where the entity text is a text context including at least two biliary tract surgical entities; and using a multi-step causal relationship reasoning algorithm to reason about the entity text and extract causal chain relationships, which are used for the structured generation of causal chains. Causal chain relationships can serve as the core association links in a biliary tract surgical knowledge graph.

[0037] Simultaneously, the confidence scores of each entity relationship can be calculated, with a threshold set to 0.85, as well as the confidence scores of causal chain relationships. A single-step relationship confidence product greater than or equal to 0.7 can be considered a valid chain. Furthermore, the causal relationship extraction model can be based on the CausalBERT algorithm, which is a method combining causal relationships with a BERT pre-trained model for mining causal associations from text data. Causal chain relationships can provide the core data foundation for the subsequent structured generation of causal chains.

[0038] Specifically, entity relationships can refer to the types of relationships between entities in biliary tract surgery. Entity relationships can include etiology-disease relationships, symptom-disease relationships, anatomy-disease relationships, and intervention-disease / outcome relationships. For example, anatomy-disease relationships can refer to the relationship between anatomical entities and disease entities, and so on.

[0039] For example, etiology-disease relationships can include biliary tract infection-intrahepatic bile duct stones, bile duct cystic dilatation-cholangiocarcinoma, etc.; symptom-disease relationships can include painless jaundice-cholangiocarcinoma, right upper quadrant pain-cholecystitis, etc.; anatomy-disease relationships can include sphincter of Oddi stenosis-cholestasis, extrahepatic bile duct obstruction-obstructive jaundice, etc.; intervention-disease / outcome relationships can include ERCP-extrahepatic bile duct stone removal, LC-cholecystitis stone treatment, cefoperazone-sulbactam sodium-biliary tract infection control, ERCP-increased risk of postoperative pancreatitis, etc.

[0040] In some embodiments, using a multi-step causal reasoning algorithm to reason about entity text and extract causal chain relationships may include: starting from an initial causal relationship, traversing the entity text through entity association retrieval using a graph retrieval-enhanced generation algorithm, recursively mining causal nodes until a complete causal chain relationship is formed. This provides structured data support for the accurate retrieval of subsequent retrieval-enhanced generation algorithms.

[0041] Specifically, a causal chain relationship can refer to a continuous causal sequence formed between several biliary surgical entities, where each biliary surgical entity is a direct cause of the next biliary surgical entity. For example, it could be biliary obstruction by gallstones → cholestasis → bile duct dilation → liver function damage, or long-term cholestasis → liver fibrosis → cirrhosis → portal hypertension, etc.

[0042] In some embodiments, the medical knowledge-enhanced question-answering and auxiliary diagnosis method for biliary tract surgery may further include assigning initial weights to causal relationships. Specifically, the initial weights for causal chain relationships and intervention-disease / outcome relationships can both be assigned a value of 0.9, while the initial weights for etiology-disease relationships, symptom-disease relationships, and anatomy-disease relationships can both be assigned a value of 0.7. This ensures that core causal relationships are preferentially matched in subsequent searches.

[0043] S2. Based on biliary tract surgical entities and causal relationships, a biliary tract surgical knowledge graph is constructed using a graph retrieval-enhanced generation algorithm. The Leiden algorithm is used to divide the biliary tract surgical knowledge graph into various biliary tract communities. Information within each biliary tract community is summarized using a summary generation model to obtain multiple community summaries.

[0044] The biliary tract surgery knowledge graph in this application focuses on strengthening the annotation and integration of causal relationships during the construction process, highlighting the complete causal link of "pathological mechanism-clinical phenotype-treatment intervention-prognosis", providing a solid data foundation for subsequent causal perception retrieval mechanisms and the structured generation of causal chains.

[0045] In some embodiments, a biliary tract surgical knowledge graph is constructed based on biliary surgical entities and causal relationships using a graph retrieval-enhanced generation algorithm. This may include: setting biliary surgical entities as nodes, entity relationships as edges, associating nodes with the diagnosis and treatment process, and constructing the biliary surgical knowledge graph using an attribute graph model. Specifically, the biliary surgical knowledge graph in this embodiment is the core data carrier of the graph retrieval-enhanced generation algorithm, used to support subsequent causal association retrieval and logical reasoning.

[0046] Nodes can include entity identifiers, names, types, core attributes, and sources of evidence. For example, core attributes could be the diagnostic criteria associated with disease nodes, and sources of evidence could be the guideline name and version. Edges can include the type, weight, confidence level, and supporting evidence for entity relationships. Supporting evidence could be, for example, an edge label indicating an incidence rate of 3% to 5% for "ERCP-postoperative pancreatitis". The attribute graph model can be a Neo4j model.

[0047] In some embodiments, before constructing a biliary surgery knowledge graph based on biliary surgery entities and causal relationships using a graph retrieval-enhanced generation algorithm, the medical knowledge enhancement question-answering and auxiliary diagnosis method for biliary surgery may further include: matching and mapping the name strings of biliary surgery entities with synonyms using synonym strings from a biliary surgery terminology standardization system, merging biliary surgery entities with the same or similar semantics; and using semantic similarity calculation to semantically match ambiguous biliary surgery entities with the context text, determining a unique entity identifier for the ambiguous biliary surgery entities. The above process constitutes the entity disambiguation optimization step in the biliary surgery knowledge graph, which can resolve entity ambiguities in biliary surgery entities and improve the accuracy of biliary surgery knowledge graph construction.

[0048] Specifically, the standardization system for biliary surgery terminology can include standardization systems such as the International Classification of Diseases (ICD-11) and the Classification of Surgical Procedures (ICD-9-CM-3). Merging biliary surgery entities can refer to combining semantically similar or identical entities; for example, ERCP and endoscopic retrograde cholangiopancreatography (ERCP) can be combined. The MedCPT embedding model can be used to calculate semantic similarity and address some ambiguous biliary surgery entities. For instance, bile duct obstruction may correspond to different anatomical locations, thus allowing for correction and the determination of a unique entity identifier.

[0049] In some embodiments, the Leiden algorithm is used to divide the biliary tract surgical knowledge graph into various biliary tract communities. This may include: graph traversal techniques based on graph retrieval enhancement generation algorithms to calculate the clinical association strength between nodes in the biliary tract surgical knowledge graph, and generating biliary tract communities with a three-level community structure according to preset resolution parameters. The three-level community structure may include a core biliary tract community, sub-communities, and sub-thematic communities. The core biliary tract community may include sub-communities, and sub-communities may include sub-thematic communities. By generating biliary tract communities, modular retrieval units can be provided for retrieval enhancement generation, thereby improving retrieval efficiency and accuracy.

[0050] Specifically, the biliary tract core community can include a biliary stone diagnosis and treatment community, a biliary tumor diagnosis and treatment community, a biliary infection diagnosis and treatment community, and a congenital biliary tract disease community. Among them, the biliary stone diagnosis and treatment community can include sub-communities on the etiology, symptoms, examination, treatment, and complications of intrahepatic bile duct stones, extrahepatic bile duct stones, and gallbladder stones.

[0051] The biliary tract tumor diagnosis and treatment community can include sub-communities for cholangiocarcinoma, gallbladder cancer, and periampullary cancer, including staging, diagnostic criteria, surgical / chemotherapy / radiotherapy regimens, and prognostic assessment.

[0052] The biliary tract infection diagnosis and treatment community can include sub-communities for acute cholecystitis, cholangitis, biliary pancreatitis, pathogens, anti-infection regimens, and symptomatic treatment.

[0053] The congenital biliary disease community can include sub-communities such as newborn screening, surgical timing, and long-term management of biliary atresia and bile duct dilatation.

[0054] In the process of dividing the biliary tract into communities, the causal chain relationships within each community can be preserved first. For example, the causal edge of "stone obstruction → cholangitis → septic shock" in the biliary stone diagnosis and treatment community can strengthen the clinical relevance of knowledge within the biliary tract community and lay a framework for subsequent accurate retrieval and structured generation of causal chains.

[0055] In some embodiments, community summaries may include leaf-level community summaries and high-level community summaries. Information within each biliary community is aggregated using a summary generation model to obtain multiple community summaries. This may include: filtering and ranking nodes, edges, and supporting evidence within sub-communities using a clinical importance ranking algorithm; organizing the filtered and ranked information according to a first preset text template to obtain leaf-level community summaries; extracting key differences and common logic from multiple sub-communities; integrating the key differences and common logic and removing redundancy using an information fusion algorithm; and then organizing the redundancy-removed information according to a second preset text template to obtain high-level community summaries. Community summaries are the core retrieval data source for the retrieval enhancement generation algorithm.

[0056] Specifically, the abstract generation model can be built using a structured generation framework. Supporting evidence can be core data arranged in descending order of weight, such as the top 200 core data points. The first preset text template can be logically organized according to the core etiology → typical symptoms → examination methods → treatment plan → outcome indicators. The second preset text template can be logically organized according to differential diagnosis → common examinations → stratified treatment.

[0057] Furthermore, leaf-level community abstracts can focus on a single disease / intervention. The ranking algorithm for clinical importance can be based on the clinical criticality of entity nodes, such as diagnostic criteria, first-line treatment having the highest priority, the weight of relational edges, and the level of evidence. The level of evidence could be, for example, Chinese Medical Association guidelines > provincial guidelines > retrospective analysis. The format requirements for leaf-level community abstracts are that each abstract should be no longer than 300 characters and should indicate 3-5 core sources of evidence.

[0058] The Ye-level community summary focuses on the entire process of disease diagnosis and treatment or intervention operation guidelines, and arranges the content in descending order of clinical importance of entity nodes and relationship edges. For example, the diagnostic criteria and first-line treatment of disease nodes, and the causal strength and evidence level of relationship edges, with priority given to retaining causal chains and intervention-outcome information.

[0059] The following uses a leaf-level community summary of gallstones as an example. A leaf-level community summary of gallstones can include the core cause, typical symptoms, preferred examination, treatment plan, and postoperative complications. The core cause may be abnormal cholesterol metabolism or cholestasis; typical symptoms may include paroxysmal colic in the right upper quadrant (triggered by fatty foods) and a positive Murphy's sign; the preferred examination is abdominal ultrasound, with a sensitivity of over 95%; postoperative complications may include bile leakage (incidence 0.5%-1%) and bleeding (management: conservative treatment / endoscopic hemostasis). It should be noted that the above example only represents the medical text that may be included in the leaf-level community summary, generated by the algorithm described above, and does not provide specific diagnostic or treatment methods for any particular disease.

[0060] When the biliary core community contains multiple sub-communities, such as the biliary obstruction diagnosis and treatment community covering sub-communities such as stone obstruction, tumor obstruction, and inflammatory stricture obstruction, the high-level community summary can focus on differential diagnosis and stratified treatment, integrating the key differences and common diagnosis and treatment logic of each sub-community.

[0061] High-level community summaries can integrate knowledge from multiple sub-communities, focusing on differential diagnosis and stratified treatment. For example, key differences could be the symptom differences between calculous obstruction and tumor-related obstruction, and common logic could be MRCP as a core examination. In this case, the high-level community summary can be a cross-disease integrated summary. Quality control of community summaries can be achieved through manual verification to ensure clear differential diagnostic logic, conflict-free treatment principles, and a verification pass rate of ≥95%.

[0062] The following uses the biliary obstruction diagnosis and treatment community as an example to illustrate the summary of a high-level community. The community summary for biliary obstruction diagnosis and treatment can include sub-communities such as obstruction etiology differentiation, common examinations, and stratified treatment principles. Obstruction etiology differentiation can refer to calculous obstruction (sudden abdominal pain + high fever), tumor obstruction (painless jaundice + weight loss), and inflammatory stricture (history of biliary surgery + progressive jaundice). Common examinations can refer to MRCP (to determine the location and extent of obstruction) and liver function tests (elevation pattern of bilirubin / ALP / GGT). Stratified treatment principles can refer to prioritizing endoscopic intervention (ERCP stent placement) for benign obstructions, prioritizing surgical resection (such as pancreaticoduodenectomy) for malignant obstructions, and palliative drainage for those who cannot undergo surgery.

[0063] During the generation of community summaries, evidence sources can be annotated, such as clinical guideline versions and DOIs (digital object unique identifiers) of core journal articles. This ensures content traceability and, by controlling the length of community summaries, adapts to the context window of a large language model, avoiding information redundancy.

[0064] S3. The community summary is segmented to obtain multiple summary blocks. A composite scoring function based on the retrieval enhancement generation algorithm is used to calculate the score of each summary block. The composite scoring function is used to implement the causal perception retrieval mechanism. The summary blocks are filtered according to the scores to obtain highly relevant summary blocks. The user's query text, the structured generation template of the causal chain, and the highly relevant summary blocks are input into the large language model to obtain the clinical response text.

[0065] Specifically, community summaries can be segmented based on token constraints of the large language model, and composite scoring functions can prioritize matching clinical causal information relevant to the query.

[0066] This application's embodiments can address typical biliary tract surgery query scenarios by employing a clinically adapted mapping-reduction process based on user input, combined with causal perception retrieval and structured generation to obtain clinical response text. For example, query text for a typical biliary tract surgery query scenario could be, "A 55-year-old male presents with right upper quadrant abdominal pain and jaundice for 3 days; ultrasound indicates common bile duct stones. How should this be treated?" or "Postoperative recurrence of cholangiocarcinoma. What are the available treatment options?"

[0067] In some embodiments, before segmenting the community summary to obtain multiple summary blocks, the medical knowledge enhancement question-and-answer and auxiliary diagnosis and treatment method for biliary tract surgery may further include: double-labeling the community summary. Specifically, the community summary can be double-labeled according to "disease type + treatment stage", such as gallstones - surgical treatment, bile duct cancer - chemotherapy regimen.

[0068] In some embodiments, the medical knowledge enhancement question-answering and auxiliary diagnosis method for biliary tract surgery may further include: automatically identifying summary blocks containing core causal relationships using a keyword matching algorithm, and adding high-priority tags to the summary blocks containing core causal relationships. This optimizes the search priority ranking generated by the enhanced search, ensuring that core causal information is matched preferentially.

[0069] For example, the core causal relationship could be the mechanism of surgical complications, the logic of disease differentiation, etc., and a summary block containing the core causal relationship could be the mechanism of pancreatitis after ERCP. The keyword matching algorithm can automatically identify the causal operator based on a dictionary. The summary block can be less than or equal to 256 tokens, which ensures that key clinical information is not split, such as surgical indications being completely preserved in the same summary block.

[0070] Specifically, summaries from each community can be categorized and labeled according to disease type and treatment process, such as "gallstones - surgical treatment" and "cholangiocarcinoma - chemotherapy regimen". High-priority tags can be added to summary blocks containing core causal relationships, such as surgical complication mechanisms and disease differentiation logic. For example, summary blocks containing the mechanism of pancreatitis after ERCP can be marked as high priority. At the same time, summaries can be segmented into summary blocks that conform to the tokens constraint of the large language model to ensure that key clinical information is not split.

[0071] In some embodiments, the formula for the composite scoring function is as follows:

[0072]

[0073] in, Here, sim(q, d) represents the semantic similarity weight, and sim(q, d) represents the semantic similarity. For causal correlation weights, This indicates a causal relationship.

[0074] Specifically, the composite scoring function achieves causal-aware retrieval through a dual weighting of semantic similarity and causal relevance, filtering out superficially similar but clinically irrelevant information. The composite scoring function is the core retrieval logic combining the retrieval enhancement generation algorithm and the graph retrieval enhancement generation algorithm in this application's embodiments, and can take into account both text semantic matching and causal association matching.

[0075] Furthermore, the semantic similarity weight can be 0.4, and the causal relevance weight can be 0.6, thus prioritizing the matching of clinical causal logic. Semantic similarity can be calculated based on the MedCPT word embedding model, calculating the semantic similarity between the query and the summary block. For example, the semantic matching degree between the query for "common bile duct stone treatment" and the summary block for "ERCP stone removal" is calculated. The input is the query text and the summary block, and the output is the cosine similarity, which ranges from 0 to 1. Causal relevance can be calculated by detecting biliary surgery-specific causal patterns in the summary block, including causal operator matching score, clinical causal chain integrity score, and evidence strength score. The causal operator matching score ranges from 0 to 0.4, the clinical causal chain integrity score ranges from 0 to 0.3, and the evidence strength score ranges from 0 to 0.3, with a total score ranging from 0 to 1. Five highly relevant summary blocks with the highest scores can be selected, and then the clinical helpness is scored by a large language model. Scorees greater than or equal to 60 are retained, while non-core information is filtered out.

[0076] The causal relevance score can be calculated by detecting biliary surgery-specific causal patterns in the abstract block. Causal operators can include "cause," "initiate," "relieve," and "reduce risk," for example, ERCP stone removal can "relieve" common bile duct obstruction; the clinical causal chain is symptom → pathology → intervention → outcome, for example, common bile duct stones → cholestasis → ERCP stone removal → jaundice resolution; the strength of evidence is determined by the guideline level cited in the abstract block, for example, Chinese Medical Association guidelines > provincial guidelines; and the study type, for example, RCT studies > retrospective analyses.

[0077] In some embodiments, the structured generation template for causal chains may include symptom analysis, causal pathological mechanisms, differential diagnosis, and evidence synthesis and treatment recommendations. By using the structured generation template to generate causal chains in a structured manner, simulating the clinical reasoning process, it ensures that clinical response texts follow the causal logic of "symptom-pathology-diagnosis-treatment," thus making the clinical response texts structured answers that conform to the clinical thinking process.

[0078] Specifically, symptom analysis can refer to extracting key clinical information from query text using a large language model and matching biliary surgical symptoms with disease associations. Causal pathological mechanisms can refer to interpreting the association between symptoms and diseases based on retrieved summary blocks. Differential diagnosis can refer to excluding similar diseases if the query involves multiple possible diseases.

[0079] The structured generation template for causal chains in this application uses retrieved causal information as its core and generates causal chains in a structured manner according to the process of "symptom analysis → causal pathological mechanism → differential diagnosis → evidence synthesis".

[0080] Among them, symptom analysis refers to matching the symptom-disease relationship in entity relationships, causal pathological mechanism can refer to analyzing the core causal association in the causal chain relationship, differential diagnosis can refer to excluding similar diseases based on the differences in the causal chains of different diseases, and evidence synthesis is to integrate the intervention-disease / outcome in entity relationships to form treatment recommendations.

[0081] The large language model of this application can generate clinical response text based on the structured generation template of the above causal chain, which enables the clinical response text to maintain correctness while possessing clear causal logic and interpretability.

[0082] For example, a symptom-disease association could be "55-year-old male + right upper quadrant pain + jaundice + ultrasound findings of common bile duct stones," clearly identifying the core issue as "diagnosis and treatment of symptomatic common bile duct stones." The association between symptoms and disease could be explained as "common bile duct stones obstructing bile excretion → bile stasis → elevated bilirubin (jaundice), increased biliary pressure (right upper quadrant pain)."

[0083] The differential diagnosis could be "it needs to be differentiated from cholangiocarcinoma (the latter is often accompanied by weight loss, elevated tumor marker CA19-9, and no stones on ultrasound)".

[0084] A clinical response text might read: "The first-line treatment is ERCP (Extracorporeal Membrane Choledochotomy) for stone removal, performed within 48 hours of admission to reduce the risk of cholangitis progression; preoperative preparation includes fasting, intravenous fluid replacement, prophylactic use of cephalosporin antibiotics such as cefoperazone / sulbactam sodium, and coverage of the intestinal flora; postoperative monitoring includes monitoring amylase within 48 hours to screen for pancreatitis, liver function, and to assess jaundice resolution; an alternative is laparoscopic choledochotomy and stone removal (LCBDE) if ERCP fails." This is merely an example of a medical text excerpt for illustrative purposes and does not constitute a specific treatment method.

[0085] During the generation of clinical response texts, the evidence sources and applicable scenarios for each recommendation can be marked. For example, "ERCP is suitable for stones with a diameter <2cm, and LCBDE is recommended for stones with a diameter >2cm". This ensures the professionalism and operability of the clinical response texts, while also adapting to the query needs of different scenarios such as biliary surgery emergencies, elective surgeries, and postoperative follow-ups, thereby improving accuracy.

[0086] This application embodiment relies on the natural language understanding capabilities of a large language model to accurately capture hepatobiliary surgery-related symptoms described by users in natural language. It combines a retrieval enhancement generation algorithm that integrates semantic similarity and causal relevance, and constructs a biliary surgery knowledge graph based on a graph retrieval enhancement generation algorithm. This allows for the accurate retrieval of causal information related to symptoms and pathological mechanisms from a professional knowledge base, and the accurate identification of potential disease issues in the user's query text.

[0087] The causal perception retrieval mechanism with a composite scoring function based on retrieval enhancement generation algorithm can effectively filter out superficially relevant but clinically irrelevant information, while the large language model based on causal chain structured generation can clearly present the correlation logic of "symptom-pathology-disease", improving the accuracy and interpretability of disease diagnosis.

[0088] This application embodiment utilizes the causal awareness retrieval mechanism of the retrieval-enhanced generation algorithm, leveraging the structured storage advantages of the biliary surgery knowledge graph within the graph retrieval-enhanced generation algorithm for causal relationships. It accurately retrieves causal-related content from the biliary surgery knowledge graph, such as disease pathogenesis and treatment principles. Combined with the structured generation capabilities of a large language model based on causal chains, it provides users with accurate knowledge answers regarding hepatobiliary surgery. The generated content follows a structure of "causal logic + clinical evidence," ensuring the accuracy and timeliness of information through the retrieval-enhanced generation algorithm while adhering to the rigorous expression standards of medical knowledge through the large language model, helping users build a systematic understanding of diseases.

[0089] This application's embodiments leverage the comprehensive analytical capabilities of a large language model to gather multi-dimensional information such as patient symptoms, medical history, and examination reports. Combined with causal features of similar cases retrieved by a retrieval-enhanced generation algorithm, along with professional medical knowledge from a biliary surgery knowledge graph, it provides doctors with preliminary diagnostic suggestions and differential diagnostic approaches. The structured generation based on causal chains simulates the clinical reasoning process, clearly demonstrating "causal evidence supporting the diagnosis" and "causal differences excluding other diseases." Meanwhile, the graph retrieval-enhanced generation algorithm ensures the integrity and logic of causal relationships, helping doctors organize diagnostic logic and reducing the risk of missed or misdiagnosed cases, playing a crucial role, especially in the differential diagnosis of complex biliary surgery cases.

[0090] This application's embodiments, based on the patient's specific condition and individual differences, such as age, physical condition, and underlying diseases, leverage the reasoning capabilities of a large language model, combined with causal information from personalized treatment cases retrieved by a retrieval-enhanced generation algorithm, and structured correlation data of intervention-outcome in the biliary tract surgery knowledge graph, to provide doctors with a reference for developing personalized treatment plans. The structured generation of causal chains based on the large language model clearly presents the causal relationship of "treatment measures - expected effects - potential risks," helping doctors weigh the pros and cons of treatment plans, improving the targeting and safety of treatment plans, and providing clear logical support for doctor-patient communication.

[0091] This application's graph retrieval enhancement generation algorithm captures deep connections between knowledge points through graph structure modeling capabilities, effectively solving the information fragmentation problem of traditional retrieval enhancement generation techniques when handling complex, multi-hop queries. In the retrieval phase, the graph retrieval enhancement generation algorithm collaborates with the traditional retrieval enhancement generation algorithm, employing a causal-aware retrieval mechanism that combines semantic similarity and causal relevance to accurately capture the causal information required for clinical reasoning in biliary surgery. In the clinical response text generation phase, a chain-of-thought strategy is introduced, using a large language model to achieve structured generation of causal chains, ensuring that the answer follows clinical reasoning logic. This synergistic approach significantly enhances the question-answering system's ability to handle complex clinical questions in biliary surgery, providing more accurate, contextually coherent, and clinically interpretable answers.

[0092] The question-answering and auxiliary diagnosis system for biliary tract surgery organically combines the authoritative knowledge base construction driven by graph retrieval-enhanced generation algorithms with the precise retrieval capabilities of these algorithms and the structured generation capabilities of a large language model. In particular, the synergistic effect of the causal perception retrieval mechanism and the structured generation based on causal chains enables the medical knowledge enhancement question-answering and auxiliary diagnosis system for biliary tract surgery to meet the stringent requirements of clinical practice. This system ensures the integrity of knowledge associations through graph retrieval-enhanced generation algorithms, accurately matches the causal information required for clinical reasoning using these algorithms, and generates clinical response texts that conform to the clinical thought process based on a large language model. This not only provides more reliable and explanatory answers but also assists doctors in clarifying diagnostic and treatment logic, becoming an efficient professional assistant for physicians. It is particularly valuable in improving the scientific rigor and safety of decision-making in the diagnosis and treatment of complex biliary tract diseases.

[0093] Clinical Reasoning Adaptability Optimization: Addressing the unique characteristics of clinical reasoning in biliary surgery, the adaptability of the retrieval enhancement generation algorithm, graph retrieval enhancement generation algorithm, and large language model in specialized scenarios has been enhanced. During the retrieval phase, the retrieval enhancement generation algorithm and the graph retrieval enhancement generation algorithm collaborate to prioritize capturing causal information relevant to the core diagnostic and treatment aspects of biliary surgery. During the generation phase, the large language model strictly adheres to the clinical reasoning path of "symptom analysis - causal pathology - differential diagnosis - evidence synthesis," ensuring that the system output highly aligns with the physician's actual diagnostic and treatment thinking, effectively supporting clinical decision-making and reducing medical risks.

[0094] In this application, a biliary tract surgical knowledge graph is constructed based on a graph retrieval-enhanced generation algorithm, according to biliary tract surgical entities and causal relationships. This graph is then divided into various biliary tract communities, and community summaries for each community are obtained. These community summaries are segmented and filtered using the retrieval-enhanced generation algorithm to obtain highly relevant summary blocks. These blocks, along with the user's query text and a structured generation template for causal chains, are input into a large language model to generate corresponding clinical response text. In this approach, the graph retrieval-enhanced generation algorithm ensures the structured storage of causal relationships, the retrieval-enhanced generation algorithm achieves accurate retrieval, and the large language model completes the structured generation of causal chains. The synergy of these three elements allows this embodiment to focus on the causal relationships between biliary tract surgical entities, guiding the subsequently generated summary blocks and clinical response text to align with actual diagnostic and treatment thinking, effectively supporting clinical decision-making and reducing medical risks. Through the organic synergy of these three elements, this embodiment accurately matches the causal information required for clinical reasoning, generating clinical response text that conforms to the clinical thought process. This not only provides more reliable and explanatory answers but also assists in clarifying diagnostic and treatment logic, demonstrating significant value in improving the scientific rigor and safety of decision-making in the diagnosis and treatment of complex biliary tract diseases.

[0095] Those skilled in the art will understand that all or part of the features / steps of the above-described method embodiments can be implemented by methods, data processing systems, or computer programs. These features may be implemented without hardware, entirely in software, or in a combination of hardware and software. The aforementioned computer program may be stored in one or more computer-readable storage media. When the computer program is executed (e.g., by a processor), it performs the steps of the above-described embodiments of the medical knowledge-enhanced question-and-answer and assisted diagnosis and treatment method for biliary tract surgery.

[0096] The aforementioned storage media capable of storing program code include: static hard disks, solid-state hard disks, random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), optical storage devices, magnetic storage devices, flash memory, magnetic disks or optical disks, and / or combinations of the above devices, that is, they can be implemented by any type of volatile or non-volatile storage devices or combinations thereof.

[0097] This application also provides a processing device embodiment, including one or more processors and a memory; wherein the memory is used to store one or more computer programs, and the one or more processors are used to execute the one or more computer programs stored in the memory, so that the processors perform the features / steps of the above-described embodiment of the medical knowledge enhancement question-and-answer and auxiliary diagnosis and treatment method for biliary tract surgery.

[0098] The above description is merely a preferred embodiment of this application. Those skilled in the art will understand that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of this application. Furthermore, under the teachings of this application, these features and embodiments can be modified to adapt to specific situations and materials without departing from the spirit and scope of this application. Therefore, this application is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of this application.

Claims

1. A medical knowledge enhanced question answering and auxiliary diagnosis and treatment method for biliary surgery, characterized in that, The method comprises the following steps: The bile duct surgery corpus is identified by an entity recognition model to obtain a plurality of bile duct surgery entities containing entity type labels, and a causal relationship between the bile duct surgery entities is extracted based on core attributes of the bile duct surgery entities; Based on the bile duct surgery entities and the causal relationship, a bile duct surgery knowledge graph is constructed by a graph retrieval enhanced generation algorithm, the bile duct surgery knowledge graph is divided into various bile duct communities by using a Leiden algorithm, information in the various bile duct communities is summarized by an abstract generation model to obtain a plurality of community abstracts; The community abstracts are segmented to obtain a plurality of abstract blocks, a composite scoring function based on the retrieval enhanced generation algorithm is used to calculate scores of the abstract blocks, wherein the composite scoring function is used to realize a causal perception retrieval mechanism, the abstract blocks are screened according to the scores to obtain high-relevance abstract blocks, a user's query text, a structured generation template of a causal chain and the high-relevance abstract blocks are input into a large language model to obtain a clinical answer text; The bile duct surgery knowledge graph is divided into various bile duct communities by using the Leiden algorithm, which comprises the following steps: based on a graph traversal technology of the graph retrieval enhanced generation algorithm, clinical correlation strengths between nodes of the bile duct surgery knowledge graph are calculated, and bile duct communities with a three-level community structure are generated according to a preset resolution parameter, wherein the three-level community structure comprises a bile duct core community, a sub-community and a subdivided theme community; The community abstracts comprise leaf-level community abstracts and high-level community abstracts, and the information in the various bile duct communities is summarized by the abstract generation model to obtain a plurality of community abstracts, which comprises the following steps: nodes, edges and supporting evidence in the sub-community are screened and sorted by a clinical importance sorting algorithm, the information after the screening and sorting is arranged according to a first preset text template to obtain the leaf-level community abstracts; key difference points and common logic are extracted from a plurality of the sub-communities, the key difference points and the common logic are integrated and redundant information is removed by an information fusion algorithm, and the information after the removal of the redundant information is arranged according to a second preset text template to obtain the high-level community abstracts.

2. The bile duct surgery-oriented medical knowledge augmented question answering and diagnosis assistance method of claim 1, wherein, The causal relationship comprises an entity relationship and a causal chain relationship, and the causal relationship between the bile duct surgery entities is extracted based on core attributes of the bile duct surgery entities, which comprises the following steps: based on a bile duct surgery causal operator dictionary, an entity text is processed by a causal relationship extraction model to obtain the entity relationship, wherein the entity text is a text context comprising at least two bile duct surgery entities; the entity text is reasoned by a multi-step causal relationship reasoning algorithm to extract the causal chain relationship, and the causal chain relationship is used for structured generation of a causal chain.

3. The medical knowledge augmented question answering and diagnosis assistance method for biliary surgery of claim 2, wherein, The entity text is reasoned by the multi-step causal relationship reasoning algorithm to extract the causal chain relationship, which comprises the following steps: starting from an initial causal relationship, the entity text is traversed by entity association retrieval of the graph retrieval enhanced generation algorithm, causal nodes are recursively mined, and a complete causal chain relationship is formed.

4. The medical knowledge augmented question answering and diagnosis assistance method for biliary surgery of claim 2, wherein, The method further comprises: constructing a biliary surgery knowledge graph based on the biliary surgery entities and the cause-effect relationships by a graph retrieval enhanced generation algorithm, including: setting the biliary surgery entities as nodes, setting the entity relationships as edges, associating the nodes with diagnosis and treatment processes, and constructing the biliary surgery knowledge graph by an attributed graph model.

5. The bile duct surgery-oriented medical knowledge augmented question answering and diagnosis assistance method of claim 1, wherein, The method further comprises: automatically identifying a summary block containing a core cause-effect relationship by a keyword matching algorithm, and adding a high-priority label to the summary block containing the core cause-effect relationship.

6. The bile duct surgery-oriented medical knowledge augmented question answering and diagnosis assistance method of claim 1, wherein, The formula of the composite scoring function is as follows: wherein, is a semantic similarity weight, sim(q, d) is a semantic similarity, is a causal correlation weight, is a causal correlation.

7. The bile duct surgery-oriented medical knowledge augmented question answering and diagnosis assistance method of claim 1, wherein, Before constructing the biliary surgery knowledge graph based on the biliary surgery entities and the cause-effect relationships by the graph retrieval enhanced generation algorithm, the method further comprises: matching and synonym mapping name strings of the biliary surgery entities by synonymous term strings in a biliary surgery terminology standardization system, and merging biliary surgery entities with the same semantics; and performing semantic matching on biliary surgery entities with ambiguity and context text by semantic similarity calculation to determine entity identifiers of the biliary surgery entities with ambiguity, the context text being context text of the biliary surgery entities with ambiguity in the biliary surgery corpus.

8. The bile duct surgery-oriented medical knowledge augmented question answering and diagnosis assistance method of claim 1, wherein, Before identifying the biliary surgery corpus by an entity recognition model, the method further comprises: fine-tuning the entity recognition model based on a biliary surgery annotated corpus for identifying the biliary surgery entities, wherein the biliary surgery entities include disease entities, anatomical entities, intervention entities, and outcome entities.

Citation Information

Patent Citations

  • Large language model medical question-answering system based on medical record knowledge graph

    CN117056493A

  • Intelligent medical question-answering system and method based on hybrid retrieval and lightweight reordering

    CN121009174A