Interactive diagnosis and treatment system, method, medium, program product, and terminal based on large language models
The interactive diagnosis and treatment system addresses inaccuracies and inefficiencies in medical consultations by using a large language model to process medical queries, providing accurate and timely treatment suggestions through integrated data analysis and continuous learning.
Patent Information
- Authority / Receiving Office
- HK · HK
- Patent Type
- Applications
- Filing Date
- 2024-12-31
- Publication Date
- 2026-07-10
AI Technical Summary
Existing medical consultation systems face challenges in accuracy and efficiency due to incomplete information transmission, doctor subjectivity, fragmented data integration, and inefficiencies in high-volume patient interactions, leading to inconsistent diagnoses and suboptimal treatment recommendations.
An interactive diagnosis and treatment system utilizing a large language model, comprising modules for natural language understanding, knowledge graph construction, and data decision analysis, which processes medical queries to generate accurate and comprehensive treatment suggestions through semantic mapping and statistical analysis.
Enhances the accuracy of medical information services by reducing misunderstandings, improving user satisfaction, and ensuring timely and effective treatment recommendations through continuous learning and feedback integration.
Smart Images

Figure 00000019_0000 
Figure 00000019_0001 
Figure 00000020_0000
Abstract
Description
This application relates to the field of intelligent healthcare, specifically to an interactive diagnostic system, method, medium, program product, and terminal based on a large language model. Background: With the development of artificial intelligence technology, research on intelligent consultation systems is deepening, bringing more possibilities to the medical industry. These systems can assist doctors in diagnosis by analyzing patients' symptom descriptions, combining historical medical records and medical knowledge bases, improving consultation efficiency, and reducing the influence of doctors' subjective judgment. However, existing technologies still have many shortcomings in terms of the accuracy and efficiency of information transmission. For example, patients may omit important information when describing their symptoms, leading to doctors' inability to fully grasp the condition. The problem of strong doctor subjectivity has not been effectively solved in existing technologies. Doctors are easily influenced by personal experience and subjective judgment during consultations, which may lead to different interpretations of symptoms and inaccurate inferences. Furthermore, doctors may not be able to keep up with the latest medical advancements, resulting in an inability to provide the latest treatment recommendations. At the same time, in situations with high patient volume, traditional consultations are inefficient; doctors may find it difficult to communicate fully with all patients within a limited time, resulting in some patients' diseases not receiving timely and effective attention. Due to the fragmented nature of existing hospital information systems and the difficulty in integrating medical data, doctors lack a comprehensive perspective and basis for decision-making, further affecting the quality and efficiency of medical services. Summary of the Invention: In view of the shortcomings of the prior art described above, the purpose of this application is to provide an interactive diagnosis and treatment system, method, medium, program product, and terminal based on a large language model, to solve the problems of weak information integration and poor user experience in existing consultation systems.To achieve the above and other related objectives, a first aspect of this application provides an interactive diagnosis and treatment system based on a large language model, comprising: a diagnosis and treatment session management module: used to receive medical query statements input by a user and send the medical query statements to a natural language understanding module; used to receive and output a natural language response sent by a data decision analysis module; a natural language understanding module: used to receive the medical query statements, perform statement understanding operations on the medical query statements to generate query structure data; and send the query structure data to a knowledge graph construction module; a knowledge graph construction module: used to construct a medical knowledge graph based on a disease knowledge database; input the received query structure data into the medical knowledge graph to generate semantic mapping data, and send the semantic mapping data to the diagnosis and treatment session management module; and a data decision analysis module: used to receive the semantic mapping data, perform statistical analysis operations and pattern recognition operations based on the semantic mapping data, generate analysis result data; and input the analysis result data into a large language model. The process of generating decision suggestion data, converting the decision suggestion data into a natural language response, and sending the natural language response to the diagnosis and treatment session management module includes: performing a statement understanding operation on the medical query statement information to generate query structure data; inputting the preprocessed medical query statement information into a semantic extraction model to generate multiple medical features; and converting the multiple medical features into a unified field to generate query structure data. In some embodiments of the first aspect of this application, the process of inputting the received query structure data into the medical knowledge graph to generate semantic mapping data includes: performing entity linking operations between the multiple medical features in the query structure data and the medical knowledge graph to generate a mapping relationship between the query structure data and corresponding parameters in the medical knowledge graph; and extracting corresponding fields from the disease knowledge database based on the mapping relationship to generate the semantic mapping data. In some embodiments of the first aspect of this application, the process of performing statistical analysis and pattern recognition operations based on the semantic mapping data includes: the statistical analysis operation includes one or more of the following: performing correlation analysis on symptom data and disease data in the semantic mapping data; performing distribution feature statistics on symptom data, examination items, and disease data in the semantic mapping data; performing distribution statistics on time data in the semantic mapping data; the pattern recognition operation includes: performing cluster analysis on symptom data, examination items, and disease data in the semantic mapping data.In some embodiments of the first aspect of this application, the large language model includes any one of the following: GPT model, Llama model, or BERT model. In some embodiments of the first aspect of this application, the system includes a human-computer interaction optimization module: used to receive feedback information corresponding to the natural language response; and to perform parameter update optimization operations on one or more modules among the natural language understanding module, the knowledge graph construction module, the diagnosis and treatment session management module, and the data decision analysis module based on the feedback information. To achieve the above and other related objectives, the second aspect of this application provides an interactive diagnosis and treatment method based on a large language model, the method including: receiving medical query statement information input by a user; performing a statement understanding operation on the medical query statement information to generate query structure data; inputting the received query structure data into the medical knowledge graph to generate semantic mapping data; performing statistical analysis and pattern recognition operations based on the semantic mapping data to generate analysis result data; inputting the analysis result data into the large language model to generate decision suggestion data; converting the decision suggestion data into a natural language response, and outputting the natural language response. 2 HK 20134898 A Specification To achieve the above and other related objectives, a third aspect of this application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the interactive diagnosis and treatment method based on a large language model. To achieve the above and other related objectives, a fourth aspect of this application provides a computer program product including computer program code, which, when run on a computer, enables the computer to implement the interactive diagnosis and treatment method based on a large language model. To achieve the above and other related objectives, a fifth aspect of this application provides an electronic terminal including a memory, a processor, and a computer program stored in the memory; the processor executes the computer program to implement the interactive diagnosis and treatment method based on a large language model. As described above, the interactive diagnosis and treatment system, method, medium, program product, and terminal based on a large language model of this application have the following beneficial effects: They can accurately parse user queries, accurately understand user medical queries, and reduce the risk of misunderstanding and erroneous responses. Secondly, they can improve the effectiveness of medical information services, provide high-quality diagnosis and treatment suggestions and responses, and improve user satisfaction and treatment outcomes. Furthermore, the dynamic updating and improvement capabilities of the human-computer interaction optimization module allow for the reception and updating of user feedback, ensuring that performance and effectiveness continuously improve over time. Finally, it enhances the user experience by providing natural language responses, reducing user confusion and uncertainty, and increasing their trust and satisfaction.These advantages make the interactive diagnosis and treatment solution of this application a highly efficient, effective, and user-friendly medical information service solution. Figure 1 shows a structural schematic diagram of an embodiment of the interactive diagnosis and treatment system based on a large language model according to this application. Figure 2 shows a flowchart of an embodiment of the interactive diagnosis and treatment method based on a large language model according to this application. Figure 3 shows a structural schematic diagram of an embodiment of the interactive diagnosis and treatment terminal based on a large language model according to this application. Detailed Description The following describes the implementation of this application through specific examples. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Before further detailed description of this application, the nouns and terms involved in the embodiments of this application are explained. The nouns and terms involved in the embodiments of this application are subject to the following interpretations: <1> Knowledge graph construction: Knowledge graph construction refers to the process of creating a knowledge graph. A knowledge graph is a graphical structure containing entities, concepts, and relationships, used to represent and store knowledge. Knowledge graphs typically include elements such as entities, attributes, and relationships to describe the associations and dependencies between entities. <2> Semantic mapping refers to mapping data or information from different sources into a unified semantic space, enabling this data or information to be understood and utilized. Semantic mapping typically involves processes such as data standardization, normalization, and integration, aiming to achieve data interoperability and sharing. <3> Named entity recognition (NER): NER refers to the identification and extraction of named entities, such as names of people, places, and organizations, from natural language text and their classification into specific types. NER typically uses machine learning algorithms and rule engines to extract and recognize entity information from text. <4> ICD-10: The International Classification of Diseases, Tenth Revision (ICD-10) is a system for classifying and coding diseases, symptoms, and causes of death. ICD-10 provides a standardized framework for disease classification, used for data collection, statistics, and analysis in the medical and health fields. <5> UMLS: The Unified Medical Language System (UMLS) is a system for integrating and standardizing different medical languages and terminology. UMLS provides a unified medical language framework for data exchange and sharing in the medical and health fields. <6> SNOMED CT: Systematic Nomenclature in Clinical Medicine (SNOMED CT) is a multilingual, multi-level clinical terminology system for the medical field.SNOMED CT provides a standardized clinical terminology framework for data collection, statistics, and analysis in the medical and health fields. <7> Load balancing: Load balancing in a distributed system refers to the technology of distributing the load across multiple servers or nodes to improve the performance and availability of the system. Load balancing is typically implemented using algorithms and policies such as round-robin, random, and least connections, etc., for optimizing the resource utilization and performance of the system. <8> Disaster recovery technology: Disaster recovery technology refers to the technology used to protect systems or data in the event of a disaster or failure, aiming to minimize data loss and system downtime. Disaster recovery technology typically includes aspects such as data backup, disaster recovery, and business continuity, etc., for ensuring the reliability and availability of the system. <9> Regular expression: A regular expression is a pattern language used for matching and manipulating strings, commonly used in text search, validation, and extraction. Regular expressions provide a flexible and powerful tool for processing and analyzing text data. <10> Stop word filtering operation: Stop word filtering refers to filtering out those words that appear frequently in natural language text but contribute little to the meaning of the text, such as "de", "le", "he", etc. Stop word filtering is typically used in text preprocessing and natural language processing applications, etc., for reducing noise and improving processing efficiency. <11> NER tool: A named entity recognition tool (NER tool) refers to a tool used to identify and extract named entities, such as person names, locations, organizations, etc. NER tools typically use technologies such as machine learning algorithms and rule engines to implement, for extracting and identifying entity information in text. 4 HK 20134898 A DESCRIPTION <12> spaCy: spaCy is a Python library for natural language processing that provides high-performance named entity recognition, language model, and text processing capabilities. spaCy uses modern machine learning algorithms and optimization techniques to provide fast and accurate natural language processing capabilities. <13> Relationship extraction model: A relationship extraction model refers to a model used to automatically extract and identify the relationships between two or more entities, commonly used in knowledge graph construction and information retrieval. Relationship extraction models typically use technologies such as machine learning algorithms and rule engines to implement, for extracting and identifying relationship information in text. <14> Conditional random field: A conditional random field is a machine learning model for sequence labeling and classification, commonly used in tasks such as named entity recognition and part-of-speech tagging. Conditional random fields provide a flexible and powerful tool for processing and analyzing sequence data. <15> Disease Ontology: Disease Ontology is an ontology used to describe and organize disease-related knowledge. Disease Ontology provides a standardized disease classification framework for data collection, statistics, and analysis in the medical and health fields.<16> ClinicalTrials.gov: ClinicalTrials.gov is a database for registering and showcasing clinical trials, providing information on trials for various diseases and treatments. ClinicalTrials.gov offers a transparent and open platform for the registration and sharing of clinical trials. <17> MeSH: The Medical Subject Headings (MeSH) is a thesaurus used for indexing and organizing medical literature. MeSH provides a standardized medical subject headings for literature retrieval and analysis in the medical and health fields. <18> Relational databases: Relational databases are a type of database used for storing and managing data. They use tabular data storage and support the SQL query language. Relational databases provide a structured and standardized data storage and management framework to support various applications and systems. <19> NoSQL Databases: NoSQL databases are a type of database used to store and manage large-scale unstructured or semi-structured data, including key-value databases, document databases, etc. NoSQL databases provide a flexible and scalable data storage and management framework to support applications such as big data and cloud computing. To facilitate understanding of the embodiments of this application, a detailed description is provided first with reference to Figure 1. Figure 1 shows a flowchart of an interactive diagnosis and treatment system based on a large language model in an embodiment of this application. The interactive diagnosis and treatment system based on a large language model in this embodiment mainly includes a diagnosis and treatment session management module 101, a natural language understanding module 102, a knowledge graph construction module 103, and a data decision analysis module 104. The diagnosis and treatment session management module 101 is used to receive medical query statements input by the user and send the medical query statements to the natural language understanding module; it is also used to receive and output the natural language response sent by the data decision analysis module. In one embodiment of this application, the medical query statement information includes: patient information, symptom description, examination results, instruction manual, treatment intent, and medical orders, etc. Patient information includes the patient's age, gender, medical history, etc.; symptom description includes the patient's chief complaint and accompanying symptoms; examination results include the results and data of the examinations performed; and treatment intentions include diagnosis, treatment plan suggestions, and risk assessment. In one embodiment of this application, the treatment session management module 101 is also used to maintain the complete context state of each treatment session to provide comprehensive background information, support downstream data analysis and decision-making, and ensure the coherence and accuracy of dialogue analysis. Specifically, this module extracts patient information (such as basic information, past medical history, current condition, and treatment records) from the electronic medical record system based on the medical query information entered by the user, and cleans and formats the data (e.g., using JSON).Based on this, the module constructs an initial session state, loads the patient's basic information, past medical history, and current condition, and continuously updates the session state in each round of dialogue, including symptom information, performed examinations, medical order records, and current treatment goals. In one embodiment of this application, the treatment session management module includes a session state maintenance layer, a contextual session management layer, and a contextual fusion layer. Specifically, the session state maintenance layer is used to preprocess the collected electronic medical record system data and construct the initial session state. The preprocessing steps include data acquisition, natural language processing, and data mapping. First, the patient's basic information, past medical history, current condition records, and treatment records are extracted from the electronic medical record system. Subsequently, the data is cleaned to handle missing, erroneous, and duplicate data, and the extracted data is formatted into a unified structured format, such as JSON. Next, the text data is processed through text normalization, and medical-related entities are identified using Named Entity Recognition (NER) technology, and the relationships between them are extracted. Finally, the identified entities and relationships are mapped to a pre-built medical knowledge graph, and medical entities are encoded using standardized medical coding systems (such as ICD-10 and SNOMED CT). Further, when constructing the initial session state, the session state is first initialized and contextual information is integrated. Basic patient information, past medical history, and current condition records are extracted from preprocessed data as the initial session state. Next, relevant temporal features, such as symptom duration and last visit time, are extracted, and the patient's medical history, including previous examination results and treatment plans, is integrated. The session state is represented using a tree or graph structure, containing nodes (such as symptoms, examination results, and treatment plans) and edges (such as causal relationships and temporal order), and information nodes are labeled for easy querying and retrieval. After the initial state is loaded, the session state is continuously updated based on the input and output of each round of dialogue, including symptom information, performed examinations, and medical order records. Finally, the context management layer uses a pre-trained model to extract and fuse contextual features. By extracting relevant contextual features from historical and current states, such as recent symptoms, examination time characteristics, disease-related background, and current treatment pathways, these features are integrated into the semantic understanding results of the query. Finally, the output is passed to the downstream knowledge graph construction module 103 and data decision analysis module 104. In terms of hardware architecture, the treatment session management module 101 can adopt a distributed architecture, using multiple servers to handle large amounts of data and computational tasks. Each server is equipped with a high-performance CPU, GPU, and large-capacity memory to ensure efficient operation and rapid response.Meanwhile, this application also uses high-speed storage devices, such as solid-state drives (SSDs), to store and retrieve a large amount of electronic medical record data. To improve the reliability and availability of this application, load balancing and disaster recovery technologies are also adopted to ensure that this application can quickly recover and continue to run in case of failures. Thus, the hardware structure of this application includes specific components such as a data storage layer, a computing layer, a network layer, and a security layer. Among them, the data storage layer uses distributed files and relational databases of this application to store electronic medical record data and session state data. The computing layer uses multiple servers to execute computing tasks such as data preprocessing, natural language processing, and session state construction. The network layer uses high-speed network devices to connect servers and storage devices. The security layer uses firewalls, intrusion detection of this application, and encryption technologies to protect the security and confidentiality of this application. Natural Language Understanding Module 102: It is used to receive medical query statement information, perform statement understanding operations on the medical query statement information to generate query structure data, and send the query structure data to the Knowledge Graph Construction Module. In an embodiment of this application, the process of performing statement understanding operations on the medical query statement information to generate query structure data includes: performing preprocessing operations on the medical query statement information; inputting the medical query statement information after preprocessing operations into a semantic extraction model to generate multiple medical features; converting the multiple medical features into a unified field to generate query structure data. In an embodiment of this application, the process of performing preprocessing operations on the medical query statement information includes: using regular expressions to remove noises in the medical query statement information, including punctuation marks, special characters, etc.; splitting the medical query statement into independent words or phrases; converting the split medical query statement into unified uppercase or lowercase; performing stop word filtering operations on the converted statement to remove common words that have no practical meaning for understanding the query statement (such as "of", "is", etc.). Further, the process of inputting the medical query statement information after preprocessing operations into a semantic extraction model to generate multiple medical features includes: inputting the preprocessed medical query text into a pre-trained semantic extraction model, and generating a context vector by the semantic extraction model to represent the semantic features in the text; inputting the semantic features into a NER tool (such as spaCy) to perform text analysis operations to generate medical entities; after identifying the medical entities, analyzing the relationships between the entities. Using methods such as a relationship extraction model or a conditional random field (CRF) to judge the relationship between symptoms and treatment suggestions; combining the identified medical entities and structured relationship information to generate medical feature data.Furthermore, various medical features are transformed into unified fields, which include, but are not limited to: medical query text (query_text), i.e., the original input medical inquiry text; context vector (context_vector), a high-dimensional vector representing the deep semantics of the text; medical entities (entities), containing the identified medical entities and their types; relationship information (relationships), describing the relationships between entities, including source entity, target entity, relationship type, and relationship description; and optional time information (time_info) and contextual relevance (contextual_relevance). In one embodiment of this application, the natural language understanding module, through a large language model trained for the medical field, realizes semantic parsing of the natural language expressions input by doctors. This module identifies key medical information, including treatment intentions, symptoms and signs, examination items, and medical orders. Based on specific user needs, this module can define the output structured data for use by subsequent modules and provide medical personnel with a convenient way to quickly browse and review data. As the pre-processing semantic understanding unit of the entire interactive medical data analysis system, its core function is to understand and structure the natural language query input from doctors. The results provide standardized data input for subsequent data analysis, knowledge graph queries, and intelligent decision-making. Furthermore, the natural language understanding module includes an input layer, a preprocessing layer, a semantic understanding layer, a structured output layer, and a human-computer interaction layer. The input layer receives natural language queries and combines contextual information such as medical history and conversation history to enhance understanding. Subsequently, the preprocessing layer performs text normalization, domain dictionary construction, and known entity annotation to ensure the accuracy and consistency of the input information. In the semantic understanding layer, based on a large-scale language model (LLM) in the medical field, the module performs sequence labeling and sentence classification, identifies treatment intentions, and extracts key data such as symptoms, signs, examination items, and possible diseases. The recognition results are then transformed into a unified structured data format in the structured output layer, outputting standard fields including treatment intentions, symptoms, examination items, and possible diseases. Preferably, the human-computer interaction layer can also present the understanding results in both natural language and structured data forms to support doctors' review feedback and continuously optimize model performance using this feedback information. In this embodiment, the hardware configuration of the natural language understanding module includes components such as a high-performance computing server, a graphics processing unit (GPU), a storage system, network devices, security devices, and a power supply and cooling system. Specifically, it uses a server based on Intel Xeon or AMD EPYC, equipped with a multi-core processor and at least 128GB of memory, as well as a high-performance GPU (such as NVIDIA V100 or A100) to accelerate computation.Simultaneously, high-capacity storage devices, high-speed network devices, and security devices are required to ensure data security and high-speed transmission. Preferably, the system of this application can be deployed on a cloud service platform, such as AWS, Azure, or Google Cloud, leveraging the scalability, availability, and security provided by cloud services. By selecting a suitable software stack, such as TensorFlow or PyTorch, combined with natural language processing libraries and tools, and choosing a suitable database management system, high availability, scalability, and security of this module can be achieved. The implementation scheme needs to be customized and optimized according to specific performance requirements, data volume, and number of concurrent users. Knowledge graph construction module 103: used to construct a medical knowledge graph based on a disease knowledge database; inputting the received query structure data into the medical knowledge graph to generate semantic mapping data, and sending the semantic mapping data to the diagnosis and treatment session management module. In one embodiment of this application, the process of constructing a knowledge graph based on a disease knowledge database includes: collecting and organizing disease-related information, including disease concepts, causes, symptoms, examination items, and treatment plans, through existing databases, such as UMLS (Unified Medical Language System) and SNOMED CT (Medical Terminology System). A clinical pathway library is constructed, based on clinical practice experience and clinical trial data recorded in ClinicalTrials.gov, forming a series of treatment pathway models. The data model library is built, incorporating data model definitions from the hospital's electronic medical record system to support subsequent data interaction. Next, a domain ontology is constructed, clarifying the conceptual hierarchy and relationships within the medical field, utilizing standardized terminology from Disease Ontology. Then, knowledge fusion is performed, integrating the previously constructed knowledge sources to form a comprehensive knowledge graph. Next, semantic mapping links key information such as symptoms and examination items identified by the natural language understanding layer to relevant concepts in the knowledge graph, utilizing MeSH (Medical Subject Headings) to ensure knowledge applicability. After these steps, a data element lookup method is used to search the data model library for corresponding data tables and fields in the linked results to support data extraction. Finally, contextual fusion is performed, combining medical record data and conversation history to optimize the mapping results, ensuring the accuracy of the knowledge graph in practical applications.In one embodiment of this application, the process of inputting the received query structure data into the medical knowledge graph to generate semantic mapping data includes: performing entity linking operations on various medical features in the query structure data with those in the medical knowledge graph to generate a mapping relationship between the query structure data and corresponding parameters in the medical knowledge graph; and extracting corresponding fields from the disease knowledge database based on the mapping relationship to generate the semantic mapping data. In one embodiment of this application, relevant medical features are extracted from the query structure data, including disease names (e.g., "diabetes"), symptoms (e.g., "thirst"), treatment plans (e.g., "insulin therapy"), and drug names (e.g., "metformin"). These features are standardized; for example, "diabetes" is converted into its unified identifier in the knowledge graph to ensure that the feature name conforms to the naming conventions of the knowledge graph. Natural language processing technology is used to perform entity recognition and classification on the extracted features to find the corresponding entity in the knowledge graph, such as the entity ID of "diabetes". The extracted medical features are linked to these entities to form mapping relationships, for example, linking "diabetes" to a specific node in the knowledge graph. The mapping relationship between each medical feature and its corresponding entity in the knowledge graph is recorded, generating a mapping relationship table (exemplarily stored in JSON or CSV format, containing information such as feature name, mapped entity ID, and category), providing a basis for subsequent data processing. Furthermore, to improve matching accuracy, text similarity algorithms (such as cosine similarity or Jaccard similarity) are used to evaluate the extracted features and entities in the knowledge graph, ensuring that the same entity can be identified regardless of its different expressions or spellings, especially when dealing with large and diverse data. In one embodiment of this application, the mapping relationship is converted into a specific format to facilitate querying in a disease knowledge database. For example, based on the entity ID in the mapping relationship table, relevant data is extracted from the knowledge database through SQL queries or API requests to obtain field information, such as definitions, classifications, related symptoms, recommended treatments, and drug information. The extracted fields are then organized. For example, the fields are grouped by category (e.g., symptom categories, treatment plan categories), ensuring that each field has a clear description and data type (string, numeric, etc.). Semantic mapping data is generated from the organized field data. For example, a dictionary object is created containing field names, types, and values for later use. After generation, this semantic mapping data is validated by comparing the extracted data with the original data to ensure its accuracy and completeness.Furthermore, to enhance data usability, the extracted semantic mapping data is displayed using a view or graphical user interface (GUI), enabling clinicians and researchers to understand and utilize this information intuitively. This visualization helps users quickly identify key medical information and relationships, improving decision-making efficiency. Finally, reliable results are stored in a relational database (such as MySQL) or (such as MongoDB), or saved in files in formats such as XML and JSON, for subsequent retrieval and analysis. In one embodiment of this application, the knowledge graph construction module is used to construct a comprehensive medical knowledge graph and map the output of the front-end natural language understanding module to corresponding clinical data elements, providing knowledge support and data preparation for subsequent data analysis and intelligent decision-making. This module includes a knowledge graph construction layer, a semantic mapping layer, and a result storage layer. Further, the knowledge graph construction layer is used to integrate various knowledge resources in the medical field. This layer first establishes a disease knowledge base, covering elements such as disease concepts, causes, symptoms, examination items, and treatment plans. In addition, a clinical pathway library is created, extracting effective diagnosis and treatment pathway models based on actual clinical practice. The data model library defines the data model in the hospital's electronic medical record system to ensure information consistency. The domain ontology is used to construct the conceptual hierarchy and relational ontology of the medical domain, thereby improving the organization and usability of knowledge. Finally, through knowledge fusion, the above knowledge sources are integrated into a comprehensive knowledge graph. Further, at the semantic mapping layer, entity linking is first performed, linking key information such as symptoms and examination items identified by the natural language understanding layer to relevant conceptual entities in the knowledge graph. Then, based on the linking results, the corresponding data tables and fields are searched in the data model library. In addition, contextual information such as medical record data and session history is combined to further optimize the accuracy of the mapping. Furthermore, the result storage layer stores the queried relevant knowledge graph conceptual entities and corresponding electronic medical record data element search results for effective use by subsequent analysis modules. This layered design ensures the system's efficiency and accuracy in medical information processing. Data decision analysis module 104: Receives the semantic mapping data, performs statistical analysis and pattern recognition operations based on the semantic mapping data, generates analysis result data; inputs the analysis result data into a large language model to generate decision suggestion data; converts the decision suggestion data into a natural language response, and sends the natural language response to the diagnosis and treatment response management module.In one embodiment of this application, the process of performing statistical analysis and pattern recognition operations based on the semantic mapping data includes: the statistical analysis operation includes one or more of the following: performing correlation analysis on symptom data and disease data in the semantic mapping data; performing distribution feature statistics on symptom data, examination items, and disease data in the semantic mapping data; and performing distribution statistics on time data in the semantic mapping data; the pattern recognition operation includes: performing cluster analysis on symptom data, examination items, and disease data in the semantic mapping data. In this embodiment, the process of performing correlation analysis on symptom data and disease data in the semantic mapping data includes: extracting symptom and disease information from the semantic mapping data, constructing a symptom-disease association matrix, where each element in the matrix represents the association strength between a specific symptom and a specific disease. Statistical analysis methods (such as Pearson correlation coefficient or Spearman rank correlation coefficient) are used to calculate the correlation between each pair of symptoms and diseases, and the generated analysis results include the symptom-disease correlation score, significance level, and possible association patterns. For example, the analysis shows that the correlation score between "fever" and "influenza" is 0.85, with a significance level of p<0.01. Based on the analysis results, decision-making suggestions are generated, such as "fever is highly correlated with influenza, suggesting that influenza patients often have fever symptoms." The decision-making suggestions are converted into natural language responses and passed to the medical session management module to answer users' medical queries. In this embodiment, the process of statistically analyzing the distribution characteristics of symptom data, examination items, and disease data in the semantic mapping data includes: counting the frequency of occurrence of each symptom, examination item, and disease, generating a frequency distribution table, and analyzing the results, including frequency distribution and statistical characteristics (such as mean, median, standard deviation, etc.). For example, the statistics show that "cough" accounts for 35% of all records, while "complete blood count" accounts for 60% of patient data. Further analysis shows that "the average value of blood glucose test is 5.6 mmol / L, and the standard deviation is 1.2 mmol / L." Based on the analysis results, decision-making suggestions are generated, such as "cough is one of the most common symptoms, accounting for 35%, while complete blood count is the most frequently used examination item, accounting for 60%." The decision suggestion data is converted into a natural language response and passed to the diagnosis and treatment session management module to provide users with medical explanations related to statistical features. In this embodiment, the process of performing distribution statistics on the time data in the semantic mapping data includes: extracting time-related data (such as onset time, consultation time, examination time, etc.), statistically analyzing the frequency of events within each time period, and generating analysis results data on time distribution features.For example, the analysis shows that "the incidence of influenza cases increases significantly from December to February of the following year, accounting for 70% of all cases throughout the year." Further analysis of the statistical characteristics of the time data, such as the average, peak, and trend changes of the onset time, is conducted. For example, the results indicate that "the average onset time of influenza is mid-December, with the peak occurring in early January." Based on the analysis results of the time distribution, decision-making recommendations are generated, such as "the peak period for influenza cases is from December to February of the following year, accounting for 70% of all cases throughout the year; it is recommended to strengthen prevention and monitoring during this period." The decision-making recommendations are converted into a natural language response and passed to the medical consultation session management module to provide time-trend-related medical advice. In this embodiment, the process of clustering the symptom data, examination items, and disease data in the semantic mapping data includes: preprocessing the data (such as data cleaning and standardization), using clustering algorithms (such as K-means clustering or hierarchical clustering) to perform clustering analysis on the symptom, examination, and disease data, and generating analysis result data, including each cluster group and its characteristic description. For example, the analysis clusters "fever, cough, and sore throat" together, suggesting that these symptoms commonly appear in respiratory infection-related diseases (as described in the instruction manual 11 HK 20134898 A). It also clusters "blood glucose test, glycated hemoglobin test" with "diabetes," indicating the importance of these tests in diabetes diagnosis. Based on the clustering analysis results, decision-making suggestions are generated, such as "Fever, cough, and sore throat often occur simultaneously, suggesting upper respiratory tract infection-related diseases." These suggestions are then converted into natural language responses and passed to the medical session management module to answer user queries about symptom combinations or disease patterns. The natural language response refers to the output in a language form that can be understood by the user, generated based on the analysis results. This natural language response includes, but is not limited to, various presentation formats such as text output, reports, charts, prompts, dialogues, and tables. Examples include text output such as "Fever is highly correlated with influenza, and it suggests that influenza patients often have fever symptoms," report-style distribution characteristic statistics, chart-style time distribution characteristic analysis results, prompts such as "It is recommended to strengthen prevention and monitoring during this period," dialogue-style answers to user medical queries, and table-style clustering analysis results. In one embodiment of this application, the data decision analysis module is used to perform the following operations: receiving the patient's clinical data (such as chest pain, shortness of breath symptoms and electrocardiogram results), combining the knowledge graph (including relevant knowledge such as myocardial infarction and ischemic heart disease) and the session status (suspected cardiovascular disease, further examination required), and performing data analysis (statistical analysis results and pattern recognition).Then, the system uses intelligent reasoning (including knowledge graph reasoning and clinical pathway reasoning) to generate diagnostic and treatment decisions, and outputs the results in natural language, such as "Based on your symptoms and signs and the latest electrocardiogram and myocardial enzyme spectrum test results, we suspect that you have an acute myocardial infarction... We recommend that you start thrombolysis or coronary intervention immediately...". In one embodiment of this application, the large language model includes any one of the following: GPT model, Llama model, and BERT model. In this embodiment, the large language model includes, but is not limited to, the following: GPT model, which aims to generate highly coherent and human-readable text; Llama model, known for its lightweight and efficiency, suitable for running in resource-constrained environments; and BERT model, which focuses on understanding the context and semantics of text and can effectively handle various text classification and question-answering tasks. These models each have their own characteristics and can be flexibly selected according to different specific needs and application scenarios, thereby improving the accuracy and efficiency of medical query understanding and decision support. In one embodiment of this application, the system includes a human-computer interaction optimization module: used to receive feedback information corresponding to the natural language response; and to perform parameter update optimization operations on one or more modules among the natural language understanding module, the knowledge graph construction module, the diagnosis and treatment session management module, and the data decision analysis module based on the feedback information. In this embodiment, the improvement to the natural language understanding module includes: analyzing the corresponding feedback from the natural language understanding module after receiving user feedback. For example, if user feedback indicates that certain queries are not correctly understood, this feedback data is used to adjust the model's training dataset, increasing relevant contextual samples to improve the understanding of specific diseases and symptoms. Furthermore, model parameters (such as learning rate, regularization coefficient, etc.) can also be dynamically adjusted to optimize model performance and reduce the frequency of misunderstandings. In this embodiment, the improvement to the knowledge graph construction module includes: addressing user feedback regarding information accuracy and knowledge updates, the knowledge graph construction module introduces new medical literature, guidelines, and research results at a preset cycle to update its knowledge base. Furthermore, specific diseases or symptoms mentioned by users can be prioritized for inclusion in the knowledge graph, enhancing its richness. Simultaneously, the module structure and relationship definitions are optimized based on feedback to accelerate data retrieval and improve query response speed and relevance. In this embodiment, improvements to the medical session management module include: regarding the effectiveness of user-system interaction, if feedback indicates low user satisfaction with the response, the medical session management module will analyze the problems existing in the session. Further improvements include: optimizing the dialogue flow, enhancing the module's ability to recognize user intent, and adjusting dialogue strategies to provide more personalized and context-aware responses.For example, when the module detects repeated inquiries from a user about a certain disease, it can proactively provide relevant information or ask the user if they need further assistance. In this embodiment, improvements to the data decision analysis module include: after receiving feedback on the effectiveness of suggestions or decisions, the data decision analysis module will focus on analyzing this feedback to improve the accuracy and usability of the decision-making algorithm. Specifically, if the user reports that certain suggestions fail to solve the problem as expected, the data decision analysis module will readjust the weights of the analysis algorithm or update the source of the input data to ensure that the analysis considers more comprehensive variables. Furthermore, the module can continuously optimize itself by introducing new statistical models, machine learning algorithms, or reinforcement learning mechanisms to improve the accuracy of decision support. It should be noted that in this application embodiment, the words "exemplary" or "for example" indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being better or more advantageous than other embodiments or designs. Specifically, the use of "exemplary" or "for example" is intended to present the relevant concepts in a specific manner. In this application embodiment, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, or B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the related objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple. Figure 2 is a flowchart of an interactive diagnosis and treatment method based on a large language model provided in an embodiment of this application. As shown in Figure 2, the method has the following steps: Step S21: Receive medical query statement information input by the user. Step S22: Perform a statement understanding operation on the medical query statement information to generate query structure data. Step S23: Input the received query structure data into the medical knowledge graph to generate semantic mapping data. Step S24: Based on the semantic mapping data, perform statistical analysis and pattern recognition operations to generate analysis result data; input the analysis result data into a large language model to generate decision suggestion data; convert the decision suggestion data into a natural language response and output the natural language response.It should be understood that the specific process of each module performing the corresponding steps described above has been explained in detail in the above method embodiments, and will not be repeated here for the sake of brevity. It should also be understood that the module division in the embodiments of this application is illustrative and only represents a logical functional division; other division methods may exist in actual implementation. Furthermore, the functional modules in the various embodiments of this application can be integrated into a processor, exist as separate physical entities, or have two or more modules integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules. Figure 3 is a schematic block diagram of an electronic terminal provided in an embodiment of this application. As shown in Figure 3, the electronic terminal includes: at least one processor 301, a memory 302, at least one network interface 303, and a user interface 305. The various components in the device are coupled together through a bus system 304. It can be understood that the bus system 304 is used to realize the connection and communication between these components. In addition to a data bus, the bus system 304 also includes a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as bus systems in Figure 3. The user interface 305 may include a display, keyboard, mouse, trackball, clicker, buttons, a touchpad, or a touchscreen. It is understood that the memory 302 may be volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM) or programmable read-only memory (PROM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM) and synchronous static random access memory (SSRAM). The memory described in this application embodiment is intended to include, but is not limited to, these and any other suitable categories of memory. The memory 302 in this application embodiment is used to store various types of data to support the operation of the electronic terminal 300. Examples of this data include: any executable program used to operate on electronic terminal 300, such as operating system 3021 and application 3022; operating system 3021 contains various system programs, such as framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks.Application 3022 may include various applications, such as a media player, browser, etc., to implement various application services. The interactive diagnosis and treatment method based on a large language model provided in this application embodiment can be included in application 3022. The methods disclosed in the above-described embodiments of this application can be applied to processor 301, or implemented by processor 301. Processor 301 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 301 or by instructions in software form. The processor 301 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 301 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor 301 may be a microprocessor or any conventional processor, etc. The steps of the accessory optimization method provided in the embodiments of this application can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software modules can be located in a storage medium, which is located in a memory. The processor reads information from the memory and, in conjunction with its hardware, completes the steps of the aforementioned method. In an exemplary embodiment, the electronic terminal 300 can be executed by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), or complex programmable logic devices (CPLDs). According to the method provided in the embodiments of this application, this application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to execute the interactive diagnosis and treatment method based on a large language model as described in any of the embodiments above. According to the method provided in the embodiments of this application, this application also provides a computer-readable storage medium storing program code. When the program code is run on a computer, it causes the computer to execute the interactive diagnosis and treatment method based on a large language model as described in any of the embodiments above.As used in this specification, the terms "component," "module," "system," etc., are used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or a computer. As illustrated, applications running on computing devices and computing devices can both be components. One or more components may reside in a process and / or an execution thread, and components may be located on a single computer and / or distributed among two or more computers. Furthermore, these components can be executed from various computer-readable media on which various data structures are stored. Components can communicate, for example, via local and / or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, and / or a network, such as the Internet interacting with other systems via signals). Those skilled in the art will recognize that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for example, the division of units is merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual couplings, direct couplings, or communication connections can be indirect couplings or communication connections through some interfaces, devices, or units, and can be electrical, mechanical, or other forms. Units described as separate components may or may not be physically separate; components shown as units may or may not be physical units, i.e., they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. In the above embodiments, the functions of each functional unit can be implemented entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. A computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. Computer-readable storage media can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., high-density digital video discs, DVDs), or semiconductor media (e.g., solid-state drives, SSDs). If the functionality of the specification is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes: USB flash drives, portable hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims. In summary, this application provides an interactive diagnosis and treatment system, method, medium, program product, and terminal based on a large language model. This application provides a method to improve the user's consultation experience. First, the diagnosis and treatment session management module receives user queries and sends them to the natural language understanding module for parsing, generating structured query data, which is then transmitted to the knowledge graph construction module and the data decision analysis module. The knowledge graph construction module uses a disease knowledge database to generate a knowledge graph and embeds the query data into it to generate semantic mapping data. The data decision analysis module performs statistical analysis and pattern recognition based on these data, obtains analysis results, inputs them into the large language model to generate decision suggestions, and finally converts them into natural language responses and returns them to the user. The system is also equipped with a human-computer interaction optimization module, which receives user feedback and dynamically updates other modules to improve response quality and accuracy. This application overcomes the deficiencies in information understanding and response generation, enabling the system to accurately parse user queries and generate natural language responses that meet the requirements, thereby improving the effectiveness and satisfaction of medical information services. Therefore, this application effectively overcomes various shortcomings in the prior art and has high industrial applicability. The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or change the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or changes made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.17 HK 20134898 A Claim 1. An interactive diagnosis and treatment system based on a large language model, characterized in that it comprises: a diagnosis and treatment session management module: used to receive medical query statement information input by a user and send the medical query statement information to a natural language understanding module; used to receive and output a natural language response sent by a data decision analysis module; a natural language understanding module: used to receive medical query statement information, perform statement understanding operations on the medical query statement information to generate query structure data; and send the query structure data to a knowledge graph construction module; a knowledge graph construction module: used to construct a medical knowledge graph based on a disease knowledge database; input the received query structure data into the medical knowledge graph to generate semantic mapping data, and send the semantic mapping data to the diagnosis and treatment session management module; a data decision analysis module: used to receive the semantic mapping data, perform statistical analysis operations and pattern recognition operations based on the semantic mapping data, generate analysis result data; and input the analysis result data into a large language model. 1. To generate decision suggestion data; convert the decision suggestion data into a natural language response and send the natural language response to the diagnosis and treatment session management module. 2. The interactive diagnosis and treatment system based on a large language model according to claim 1, characterized in that the process of performing statement understanding operations on the medical query statement information to generate query structure data includes: performing preprocessing operations on the medical query statement information; inputting the preprocessed medical query statement information into a semantic extraction model to generate multiple medical features; converting the multiple medical features into a unified field to generate query structure data. 3. The interactive diagnosis and treatment system based on a large language model according to claim 2, characterized in that the process of inputting the received query structure data into the medical knowledge graph to generate semantic mapping data includes: performing entity linking operations between the multiple medical features in the query structure data and the medical knowledge graph respectively to generate a mapping relationship between the query structure data and the corresponding parameters in the medical knowledge graph; based on the mapping relationship, extracting the corresponding fields in the disease knowledge database to generate the semantic mapping data.4. The interactive diagnosis and treatment system based on a large language model according to claim 1, characterized in that the process of performing statistical analysis and pattern recognition operations based on the semantic mapping data includes: the statistical analysis operation includes one or more of the following: performing correlation analysis on symptom data and disease data in the semantic mapping data; performing distribution feature statistics on symptom data, examination items, and disease data in the semantic mapping data; performing distribution statistics on time data in the semantic mapping data; the pattern recognition operation includes: performing cluster analysis on symptom data, examination items, and disease data in the semantic mapping data. 5. The interactive diagnosis and treatment system based on a large language model according to claim 2, characterized in that the large language model includes any one of the following: GPT model, Llama model, BERT model. 6. The interactive diagnosis and treatment system based on a large language model according to claim 1, characterized in that the system includes a human-computer interaction optimization module: used to receive feedback information corresponding to the natural language response; and to perform parameter update and optimization operations on one or more modules among the natural language understanding module, the knowledge graph construction module, the diagnosis and treatment session management module, and the data decision analysis module based on the feedback information. 7. An interactive diagnosis and treatment method based on a large language model, characterized in that the method includes: receiving medical query statement information input by a user; performing a statement understanding operation on the medical query statement information to generate query structure data; inputting the received query structure data into the medical knowledge graph to generate semantic mapping data; performing statistical analysis and pattern recognition operations based on the semantic mapping data to generate analysis result data; inputting the analysis result data into a large language model to generate decision suggestion data; converting the decision suggestion data into a natural language response, and outputting the natural language response. 8. A computer-readable storage medium storing a computer program thereon, characterized in that the computer program, when executed by a processor, implements the interactive diagnosis and treatment method based on a large language model according to claim 7. 9. A computer program product, characterized in that the computer program product includes computer program code, which, when executed on a computer, causes the computer to implement the interactive diagnosis and treatment method based on a large language model as described in claim 7. 10. An electronic terminal, including a memory and a processor, characterized in that the processor executes the computer program to implement the interactive diagnosis and treatment method based on a large language model as described in claim 7.2 HK 20134898 A Instruction Manual Drawings Interactive Diagnosis and Treatment Based on a Large Language Model 100 Knowledge Graph Construction Module 102 Natural Language Understanding Module 101 Data Decision Analysis Module 103 Diagnosis and Treatment Session Management Module 101 Figure 1 Performing statement understanding operation on the medical query statement information to generate query structure data S23 Inputting the received query structure data into the knowledge graph structure to generate semantic mapping data Receives medical query statement information input by the user Based on the semantic mapping data, performs statistical analysis operation and pattern recognition operation to generate analysis result data; Inputting the analysis result data into the large language model to generate decision suggestion data; Converting the decision suggestion data into a natural language response and outputting the natural language response S22 S21 S24 Figure 2 1 HK 20134898 A Instruction Manual Drawings User Interface Electronic Terminal Processor 300 Network Interface 305 303 304 301 Memory Application Program Operating System 3021 3022 302 Figure 3 2 HK 20134898 A.