Traditional Chinese medicine question-answering system and method based on large language model

Through the TCM Q&A system based on large language model, the problems of limitations, insufficient interaction and insufficient diagnostic accuracy in the TCM field are solved, and a deep understanding of TCM literature and the provision of personalized diagnostic suggestions are achieved, and the efficiency and accuracy of TCM services are improved.

CN119517372APending Publication Date: 2025-02-25郑新翰
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411580780.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The existing technology has problems such as data set limitations, insufficient interaction and insufficient diagnostic accuracy in the field of traditional Chinese medicine, which is difficult to effectively cover the breadth and depth of traditional Chinese medicine knowledge and provide personalized diagnostic suggestions.

Method used

Using a Chinese medicine question and answer system based on a large language model, through data set construction, data preprocessing, large language model training and dialogue management modules, a system that can understand and process a large number of Chinese medicine literature is built, providing natural language understanding and generation technology, achieving effective interaction with users, and generating personalized Chinese medicine diagnosis and treatment suggestions.

Benefits of technology

It has realized the understanding and processing of a large number of traditional Chinese medicine literature, provided personalized traditional Chinese medicine diagnosis and treatment suggestions, improved the accuracy of diagnosis and the effectiveness of treatment, alleviated the problem of uneven distribution of medical resources, and improved the efficiency of traditional Chinese medicine services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119517372A_ABST
    Figure CN119517372A_ABST
Patent Text Reader

Abstract

The invention discloses a traditional Chinese medicine question-answering system and method based on a large language model, and the system comprises a data set construction module which is used for extracting key information, and constructing a data set for storing traditional Chinese medicine literatures; the data preprocessing module is used for preprocessing the traditional Chinese medicine literature to obtain the preprocessed traditional Chinese medicine literature; the big language model training module is used for training a big language model according to the preprocessed traditional Chinese medicine literature to obtain a trained big language model; the input processing module is used for receiving a medical question input by a user; the dialogue management module is used for inputting the medical problems into the trained large language model to generate coherent dialogues; the diagnosis suggestion module is used for generating traditional Chinese medicine diagnosis suggestions according to the generated coherent dialogues and previous case data; the user interface module is used for interaction between a user and the system; the back-end server module is used for processing the request of the user and generating a response; and the data storage module is used for storing the user data and the diagnosis suggestions generated by the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the application of artificial intelligence technology in the field of medical health, and in particular to a traditional Chinese medicine question-answering system and method based on a large language model. Background Art

[0002] With the rapid development of artificial intelligence technology, its application in the field of medical health is becoming more and more extensive. As a traditional medicine with a long history and rich theoretical system, the diagnosis and treatment process of traditional Chinese medicine is highly dependent on the experience and knowledge of doctors. Traditional Chinese medicine diagnostic methods, such as observation, smell, questioning, and palpation, require doctors to have a deep medical background and clinical experience. However, with the aging population and the uneven distribution of medical resources, the demand for Chinese medicine services is growing, and the traditional Chinese medicine service model is facing challenges. Among the existing technologies, there have been some attempts to apply artificial intelligence technology to the field of Chinese medicine, such as analyzing Chinese medicine literature through computer-assisted systems, or using machine learning algorithms to predict diseases. However, these systems usually have the following limitations: Dataset limitations: Existing systems often rely on limited and unstructured Chinese medicine literature, which makes it difficult to cover the breadth and depth of Chinese medicine knowledge; Insufficient interactivity: Most systems lack an effective user interaction interface and cannot provide personalized diagnostic suggestions based on the user's specific symptoms and problems; Diagnostic accuracy: Due to the lack of in-depth understanding and application of Chinese medicine theory, existing systems may not be accurate or reliable enough when providing diagnostic suggestions. Therefore, it is urgent to propose a Chinese medicine question-answering system and method based on a large language model. Summary of the invention

[0003] To solve the above technical problems, the present invention proposes a TCM question-answering system and method based on a large language model, which can understand and process a large amount of TCM literature, effectively interact with users through natural language understanding and generation technology, and provide personalized TCM diagnosis and treatment recommendations.

[0004] On the one hand, to achieve the above-mentioned purpose, the present invention provides a TCM question-answering system based on a large language model, comprising: a data set construction module, a data preprocessing module, a large language model training module, an input processing module, a dialogue management module, a diagnosis suggestion module, a user interface module, a backend server module and a data storage module;

[0005] The data set construction module is used to extract key information from the Chinese medicine pharmacopoeia, classic medical cases and modern Chinese medicine research papers to construct a data set for storing Chinese medicine literature;

[0006] The data preprocessing module is used to preprocess the traditional Chinese medicine literature to obtain the preprocessed traditional Chinese medicine literature;

[0007] The large language model training module is used to train the large language model according to the preprocessed traditional Chinese medicine literature to obtain a trained large language model;

[0008] The input processing module is used to receive medical questions input by users;

[0009] The dialogue management module is used to input the medical question into the trained large language model to generate a coherent dialogue;

[0010] The diagnosis suggestion module is used to generate TCM diagnosis suggestions based on the generated coherent dialogue and previous case data;

[0011] The user interface module is used for interaction between the user and the system;

[0012] The backend server module is used to process user requests and generate responses;

[0013] The data storage module is used to store user data and diagnostic suggestions generated by the system.

[0014] Optionally, the data preprocessing module includes a file cleaning unit, a file marking unit and a structured processing unit;

[0015] The file cleaning unit is used to remove useless information and noise from the traditional Chinese medicine literature;

[0016] The document annotation unit is used to annotate key medical terms and entities on the traditional Chinese medicine literature;

[0017] The structured processing unit is used to convert the text data format of the traditional Chinese medicine literature into a structured data format.

[0018] Optionally, the large language model training module includes a feature extraction unit and a model optimization unit;

[0019] The feature extraction unit is used to extract features from the preprocessed traditional Chinese medicine literature;

[0020] The model optimization unit is used to adjust the parameters of the large language model to obtain a trained large language model.

[0021] Optionally, the dialogue management module includes a context maintenance unit and a dialogue generation unit;

[0022] The context maintenance unit is used to maintain a session state according to the medical questions input by the user and the tracking conversation history;

[0023] The dialogue generation unit is used to generate responses and maintain dialogue coherence by using natural language generation technology to generate a coherent dialogue.

[0024] Optionally, the diagnosis suggestion module includes a case matching unit and a diagnosis generation unit;

[0025] The case matching unit is used to match the user's symptoms with previous cases by similarity calculation and pattern recognition to obtain a matching result;

[0026] The diagnosis generating unit is used to generate a TCM diagnosis suggestion according to the matching result by using a decision tree and a probability model.

[0027] Optionally, the user interface module includes an information input unit, a submission unit and a display unit;

[0028] The information input unit is used to input the user's questions;

[0029] The submitting unit is used to submit the question input by the user;

[0030] The display unit is used to display the system response and TCM diagnosis suggestions.

[0031] Optionally, the backend server module includes a request processing unit and a response generating unit;

[0032] The request processing unit is used to receive the request of the user interface and forward it to the corresponding module;

[0033] The response generation unit is used to integrate the output of the module into a format that the user can understand and return it to the user interface.

[0034] On the other hand, to achieve the above-mentioned purpose, the present invention also provides a TCM question-answering method based on a large language model, comprising: extracting key information from TCM pharmacopoeia, classic medical cases and modern TCM research papers, and constructing a data set for storing TCM literature;

[0035] Preprocessing the traditional Chinese medicine literature to obtain preprocessed traditional Chinese medicine literature;

[0036] Training a large language model based on the preprocessed traditional Chinese medicine literature to obtain a trained large language model;

[0037] Inputting the user's medical questions into the trained large language model to generate a coherent dialogue;

[0038] Generate TCM diagnosis recommendations based on the generated coherent dialogue and previous case data.

[0039] Technical effects of the present invention:

[0040] (1) Understanding and processing a large amount of TCM literature: Through natural language processing technology, the system can extract key information from TCM pharmacopoeia, classic medical cases and modern TCM research papers to build a comprehensive knowledge base.

[0041] (2) Effective interaction with users: The system uses natural language understanding and generation technology to understand user questions and provide accurate answers while maintaining the continuity of the conversation.

[0042] (3) Provide personalized TCM diagnosis and treatment recommendations: Based on the user's symptoms and historical case data, the system can generate personalized TCM diagnosis and treatment recommendations to improve the accuracy of diagnosis and the effectiveness of treatment.

[0043] (4) Improve the accessibility and efficiency of TCM services: Through the intelligent TCM question-and-answer system, users can obtain TCM services anytime and anywhere, alleviating the problem of uneven distribution of medical resources and improving the efficiency of TCM services. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0045] Figure 1 This is a schematic diagram of the structure of a TCM question-answering system based on a large language model according to an embodiment of the present invention;

[0046] Figure 2 The present invention is a flowchart of a method for answering Chinese medicine questions based on a large language model according to an embodiment of the present invention. DETAILED DESCRIPTION

[0047] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0048] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0049] like Figure 1 As shown, this embodiment provides a traditional Chinese medicine question-answering system based on a large language model, including:

[0050] Dataset construction module, data preprocessing module, large language model training module, input processing module, dialogue management module, diagnosis suggestion module, user interface module, backend server module and data storage module;

[0051] A data set construction module is used to extract key information from Chinese medicine pharmacopoeias, classic medical cases and modern Chinese medicine research papers, and construct a data set for storing Chinese medicine literature, wherein the data set includes at least one thousand Chinese medicine pharmacopoeias, at least five hundred classic medical cases and at least two hundred modern Chinese medicine research papers;

[0052] A data preprocessing module is used to preprocess the traditional Chinese medicine literature to obtain the preprocessed traditional Chinese medicine literature;

[0053] A large language model training module is used to train a large language model based on the preprocessed traditional Chinese medicine literature to obtain a trained large language model;

[0054] An input processing module, used for receiving medical questions input by users;

[0055] The dialogue management module is used to input medical questions into the trained large language model to generate coherent dialogues;

[0056] The diagnosis suggestion module is used to generate TCM diagnosis suggestions based on the generated coherent dialogue and previous case data;

[0057] User interface module, used for interaction between users and the system;

[0058] The backend server module is used to process user requests and generate responses;

[0059] The data storage module is used to store user data and diagnostic suggestions generated by the system.

[0060] Through natural language processing technology, the present invention can extract key information from the Chinese medicine pharmacopoeia, classic medical cases and modern Chinese medicine research papers, build a comprehensive knowledge base, and understand and process a large amount of Chinese medicine literature; through natural language understanding and generation technology, it can understand users' questions and provide accurate answers, while maintaining the continuity of the dialogue and effectively interacting with users; based on the user's symptoms and historical case data, it can generate personalized Chinese medicine diagnosis and treatment suggestions, improve the accuracy of diagnosis and the effectiveness of treatment, and provide personalized Chinese medicine diagnosis and treatment suggestions; through the intelligent Chinese medicine question and answer system, users can obtain Chinese medicine services anytime and anywhere, alleviate the problem of uneven distribution of medical resources, and improve the efficiency of Chinese medicine services.

[0061] Furthermore, the data preprocessing module includes a file cleaning unit, a file annotation unit and a structured processing unit;

[0062] File cleaning unit, used to remove useless information and noise from TCM literature;

[0063] Document annotation unit, used to annotate key medical terms and entities in TCM literature;

[0064] The structured processing unit is used to convert the text data format of traditional Chinese medicine literature into a structured data format.

[0065] Specifically, useless information and noise include but are not limited to punctuation, irrelevant vocabulary and format errors; key medical terms and entities include disease names, herbal ingredients and treatments. Data collection collects traditional Chinese medicine literature from multiple sources, including but not limited to online databases, library collections, professional journals and academic papers. Text cleaning: Develop automated scripts to remove non-medical related content in the text, such as advertisements, copyright notices, headers and footers. Entity recognition: Use named entity recognition (NER) technology to automatically identify key information about diseases, symptoms, herbs, and dosages in the text. Semantic annotation: Use manual or semi-automatic methods to annotate the text with semantic roles, such as etiology, pathogenesis, treatment methods, and prescriptions. Structured storage: Design a database schema to convert the cleaned and annotated text into structured data for easy retrieval and analysis.

[0066] Furthermore, the large language model training module includes a feature extraction unit and a model optimization unit;

[0067] A feature extraction unit, used to extract features from the preprocessed traditional Chinese medicine literature;

[0068] The model optimization unit is used to adjust the parameters of the large language model to obtain a trained large language model.

[0069] Specifically, features include word frequency, part-of-speech tagging, and semantic roles; large language model parameters include learning rate, batch size, and regularization coefficient. Model training: Use large-scale unsupervised learning to pre-train the model on a dataset of traditional Chinese medicine literature, and then fine-tune it through supervised learning. Model optimization: Improve the generalization ability and operating efficiency of the model through methods such as hyperparameter tuning, regularization technology, and model distillation.

[0070] Further, the dialogue management module includes a context maintenance unit and a dialogue generation unit;

[0071] A context maintenance unit, used to maintain a session state based on the medical questions input by the user and to track the conversation history;

[0072] The dialogue generation unit is used to generate responses and maintain dialogue coherence by using natural language generation technology to generate a coherent dialogue.

[0073] Specifically, context modeling: Develop context modeling technology, use attention mechanisms and memory networks to maintain and update the dialogue state. Intent recognition: Implement intent recognition algorithms to accurately determine the user's intention to ask questions, such as asking about symptoms and seeking treatment advice. Dialogue strategy: Design dialogue strategies so that the system can generate appropriate responses based on user intent and dialogue history.

[0074] Further, the diagnosis suggestion module includes a case matching unit and a diagnosis generation unit;

[0075] A case matching unit, used to match the user's symptoms with previous cases by similarity calculation and pattern recognition to obtain a matching result;

[0076] The diagnosis generation unit is used to generate TCM diagnosis suggestions based on the matching results using decision trees and probability models.

[0077] Specifically, case matching algorithm: develop a case matching algorithm to match user symptoms with historical cases through text similarity calculation and pattern recognition technology. Diagnostic logic: construct diagnostic logic and generate diagnostic suggestions in combination with traditional Chinese medicine theories, such as yin and yang, five elements, viscera and meridians. Treatment plan recommendation: recommend personalized treatment plans based on the diagnosis results, including herbal formulas, acupuncture points, and dietary conditioning.

[0078] Further, the user interface module includes an information input unit, a submission unit and a display unit;

[0079] An information input unit, used to input user questions;

[0080] A submission unit, used to submit questions input by users;

[0081] The display unit is used to display the system's response and TCM diagnosis suggestions.

[0082] Further, the backend server module includes a request processing unit and a response generating unit;

[0083] A request processing unit, used to receive requests from the user interface and forward them to corresponding modules;

[0084] The response generation unit is used to integrate the output of the module into a format that the user can understand and return it to the user interface.

[0085] Specifically, user interface design: design an intuitive and easy-to-use user interface that supports text input, voice input, and touch screen operation. Backend architecture: build a high-performance backend server that supports high-concurrency processing to ensure the system's responsiveness and stability. API development: develop an application programming interface (API) to allow other systems or services to interact with the TCM Q&A system.

[0086] Furthermore, the data stored in the data storage module includes a user information table for storing the user's basic information and historical interaction records; a case information table for storing case data and diagnosis results; and a log table for recording the system's operation log and abnormal information.

[0087] Database design techniques include:

[0088] Data model: Design an efficient data model to support fast data insertion, query and update operations. Data security: Implement data encryption, access control and backup strategies to ensure the security and integrity of user data. Performance optimization: Regularly monitor and optimize database performance to improve the speed of data retrieval and processing.

[0089] System integration and testing technologies include:

[0090] Module integration: Integrate each module into a unified framework to ensure efficient communication and data flow between modules. System testing: Conduct comprehensive system testing, including unit testing, integration testing, and performance testing, to ensure the stability and reliability of the system. User testing: Conduct multiple rounds of user testing, collect user feedback, and iterate and optimize the system based on the feedback.

[0091] Continuous learning and updating mechanisms include:

[0092] Online learning: Implement online learning mechanisms to enable the system to continuously learn and evolve based on new user interactions and feedback. Knowledge update: Regularly update the TCM literature dataset and introduce the latest TCM research results and clinical data. Model iteration: Regularly retrain and optimize the model to adapt to the ever-changing TCM knowledge and user needs.

[0093] like Figure 2 As shown, this embodiment provides a TCM question-answering method based on a large language model, including:

[0094] Extract key information from TCM pharmacopoeia, classic medical records, and modern TCM research papers to build a dataset to store TCM literature;

[0095] Preprocessing the traditional Chinese medicine literature to obtain the preprocessed traditional Chinese medicine literature;

[0096] Training a large language model based on the preprocessed traditional Chinese medicine literature to obtain a trained large language model;

[0097] Input the user's medical questions into the trained large language model to generate a coherent dialogue;

[0098] Generate TCM diagnosis recommendations based on the generated coherent dialogue and previous case data.

[0099] A specific application example of the present invention is:

[0100] Step 1: Dataset construction and preprocessing

[0101] Data collection: More than 100,000 TCM-related documents were collected from the National Administration of Traditional Chinese Medicine database, China National Knowledge Infrastructure, Wanfang Data and other sources, including classic works such as "Huangdi Neijing" and "Treatise on Febrile and Miscellaneous Diseases", as well as TCM research papers published in the past ten years.

[0102] Text cleaning: Using Python programming language and regular expression technology, develop automated scripts to remove all non-medical related content, such as headers and footers, copyright notices, advertisements, etc.

[0103] Entity Recognition: Apply a BERT-based named entity recognition model to automatically identify and annotate key information in the text, such as diseases (such as "hypertension"), symptoms (such as "headache"), herbs (such as "ginseng"), and dosages (such as "10 grams").

[0104] Semantic annotation: Organize a team of Chinese medicine experts and data scientists to perform semantic annotation on the cleaned text, including causes (such as "excessive liver fire"), pathogenesis (such as "stagnation of qi and blood"), treatment methods (such as "clearing heat and detoxifying") and prescriptions (such as "Xiao Chaihu Decoction").

[0105] Structured storage: Design a relational database model to store the annotated text in a MySQL database. Each record includes fields such as text ID, text content, entity list, and semantic tags.

[0106] Step 2: Large language model training

[0107] Model architecture selection: The Transformer-based BERT model is selected as the basic architecture because of its excellent performance in processing long texts and complex semantic relationships.

[0108] Feature Engineering: Extracting lexical, syntactic, semantic, and contextual features, including TF-IDF, part-of-speech tagging, dependency parsing, and sentence embeddings.

[0109] Model training: Unsupervised pre-training was performed on the preprocessed TCM literature dataset, and then fine-tuned through supervised learning, using the cross entropy loss function and Adam optimizer.

[0110] Model optimization: Improve the generalization ability and operation efficiency of the model through hyperparameter tuning (such as setting the learning rate to 5e-5 and the batch size to 32) and model distillation technology.

[0111] Step 3: Dialogue Management Module

[0112] Context modeling: Use LSTM (Long Short-Term Memory Network) to maintain the dialogue state, track the user’s questions and the system’s answers to generate a coherent dialogue.

[0113] Intent recognition: Develop a hybrid intent recognition system based on rules and machine learning to accurately determine the intention of users asking questions, such as "asking about the cause of symptoms" or "seeking treatment advice."

[0114] Dialogue strategy: Design a dialogue strategy so that the system can generate appropriate responses based on user intent and dialogue history, such as providing possible explanations for the cause of the disease or recommending medical treatment.

[0115] Step 4: Diagnostic suggestion module

[0116] Case matching algorithm: Develop a case matching algorithm based on cosine similarity to match the symptoms entered by the user with historical cases to find the most similar case.

[0117] Diagnostic logic: Construct diagnostic logic based on traditional Chinese medicine theory, such as analyzing the relationship between user symptoms and organ functions based on the "Yin Yang and Five Elements" theory to generate diagnostic suggestions.

[0118] Treatment recommendations: Based on the diagnosis, personalized treatment plans are recommended, including herbal formulas (such as "Liuwei Dihuang Pills"), acupuncture points (such as "Zusanli"), and dietary conditioning suggestions.

[0119] Step 5: User Interface and Backend Server

[0120] User Interface Design: Design a simple and intuitive user interface that includes a text input box for users to enter questions, a submit button for submitting the questions, and a display area for displaying the system's responses.

[0121] Backend architecture: Build a backend server based on the Flask framework, support RESTful API, process user requests and call the large language model to generate responses.

[0122] API development: Develop APIs to allow other systems or services to interact with the TCM Q&A system, such as hospital information systems (HIS) or electronic health record (EHR) systems.

[0123] Step 6: Database Design

[0124] Data model: Design an efficient data model, including user table, case table, diagnosis table and treatment table, to support fast data insertion, query and update operations.

[0125] Data security: Implement data encryption (such as AES-256), access control (role-based access control), and regular backup strategies to ensure the security and integrity of user data.

[0126] Performance optimization: Regularly monitor and optimize database performance, such as index optimization, query optimization, and hardware upgrades, to improve the speed of data retrieval and processing.

[0127] Step 7: System Integration and Testing

[0128] Module integration: Integrate the data preprocessing module, large language model training module, dialogue management module, diagnosis suggestion module, user interface and backend server into a unified system.

[0129] System testing: Conduct comprehensive system testing, including unit testing (testing the functionality of a single module), integration testing (testing the interaction between modules), and performance testing (testing the system's response time and concurrent processing capabilities).

[0130] User testing: Conduct multiple rounds of user testing, including TCM experts and ordinary users, collect feedback, and iterate and optimize the system based on the feedback.

[0131] Step 8: Continuous learning and updating mechanism

[0132] Online Learning: Implement online learning mechanisms so that the system can continuously learn and evolve based on new user interactions and feedback, such as through continuous model fine-tuning to adapt to new data and user needs.

[0133] Knowledge update: Regularly update the TCM literature dataset and introduce the latest TCM research results and clinical data to keep the system's knowledge and recommendations up to date.

[0134] Model iteration: Regularly retrain and optimize the model to adapt to the ever-changing knowledge of traditional Chinese medicine and user needs, such as conducting a comprehensive model retraining once a year.

[0135] Through natural language processing technology, the present invention can extract key information from the Chinese medicine pharmacopoeia, classic medical cases and modern Chinese medicine research papers, build a comprehensive knowledge base, and understand and process a large amount of Chinese medicine literature; through natural language understanding and generation technology, it can understand users' questions and provide accurate answers, while maintaining the continuity of the dialogue and effectively interacting with users; based on the user's symptoms and historical case data, it can generate personalized Chinese medicine diagnosis and treatment suggestions, improve the accuracy of diagnosis and the effectiveness of treatment, and provide personalized Chinese medicine diagnosis and treatment suggestions; through the intelligent Chinese medicine question and answer system, users can obtain Chinese medicine services anytime and anywhere, alleviate the problem of uneven distribution of medical resources, and improve the efficiency of Chinese medicine services.

[0136] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A TCM question-answering system based on a large language model, characterized in that: include: Dataset construction module, data preprocessing module, large language model training module, input processing module, dialogue management module, diagnosis suggestion module, user interface module, backend server module and data storage module; The data set construction module is used to extract key information from the Chinese medicine pharmacopoeia, classic medical cases and modern Chinese medicine research papers to construct a data set for storing Chinese medicine literature; The data preprocessing module is used to preprocess the traditional Chinese medicine literature to obtain the preprocessed traditional Chinese medicine literature; The large language model training module is used to train the large language model according to the preprocessed traditional Chinese medicine literature to obtain a trained large language model; The input processing module is used to receive medical questions input by users; The dialogue management module is used to input the medical question into the trained large language model to generate a coherent dialogue; The diagnosis suggestion module is used to generate TCM diagnosis suggestions based on the generated coherent dialogue and previous case data; The user interface module is used for interaction between the user and the system; The backend server module is used to process user requests and generate responses; The data storage module is used to store user data and diagnostic suggestions generated by the system.

2. The TCM question-answering system based on a large language model as claimed in claim 1, characterized in that: The data preprocessing module includes a file cleaning unit, a file marking unit and a structured processing unit; The file cleaning unit is used to remove useless information and noise from the traditional Chinese medicine literature; The document annotation unit is used to annotate key medical terms and entities on the traditional Chinese medicine literature; The structured processing unit is used to convert the text data format of the traditional Chinese medicine literature into a structured data format.

3. The TCM question-answering system based on a large language model as claimed in claim 1, characterized in that: The large language model training module includes a feature extraction unit and a model optimization unit; The feature extraction unit is used to extract features from the preprocessed traditional Chinese medicine literature; The model optimization unit is used to adjust the parameters of the large language model to obtain a trained large language model.

4. The TCM question-answering system based on a large language model as claimed in claim 1, characterized in that: The dialogue management module includes a context maintenance unit and a dialogue generation unit; The context maintenance unit is used to maintain a session state according to the medical questions input by the user and the tracking conversation history; The dialogue generation unit is used to generate responses and maintain dialogue coherence by using natural language generation technology to generate a coherent dialogue.

5. The TCM question-answering system based on a large language model as claimed in claim 1, characterized in that: The diagnosis suggestion module includes a case matching unit and a diagnosis generation unit; The case matching unit is used to match the user's symptoms with previous cases by similarity calculation and pattern recognition to obtain a matching result; The diagnosis generating unit is used to generate a TCM diagnosis suggestion according to the matching result by using a decision tree and a probability model.

6. The TCM question-answering system based on a large language model as claimed in claim 1, characterized in that: The user interface module includes an information input unit, a submission unit and a display unit; The information input unit is used to input the user's questions; The submitting unit is used to submit the question input by the user; The display unit is used to display the system response and TCM diagnosis suggestions.

7. The TCM question-answering system based on a large language model as claimed in claim 1, characterized in that: The backend server module includes a request processing unit and a response generating unit; The request processing unit is used to receive the request of the user interface and forward it to the corresponding module; The response generation unit is used to integrate the output of the module into a format that the user can understand and return it to the user interface.

8. A method of a TCM question-answering system based on a large language model according to any one of claims 1 to 7, characterized in that: The following steps are involved: Extract key information from TCM pharmacopoeia, classic medical records, and modern TCM research papers to build a dataset to store TCM literature; Preprocessing the traditional Chinese medicine literature to obtain preprocessed traditional Chinese medicine literature; Training a large language model based on the preprocessed traditional Chinese medicine literature to obtain a trained large language model; Inputting the user's medical questions into the trained large language model to generate a coherent dialogue; Generate TCM diagnosis recommendations based on the generated coherent dialogue and previous case data.