Traditional Chinese medicine prescription recommendation method and system based on thoracic lung department traditional Chinese medicine inquiry report large language model

By constructing multiple knowledge domains and sharing knowledge, and fine-tuning the large language model to output physical fitness and symptom parameters, the problem of difficult to recommend medicinal and food homologous prescriptions for symptoms in the prior art is solved, and more accurate and rapid prescription recommendations are achieved.

CN120108651APending Publication Date: 2025-06-06MACAU UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510110606.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The prior art is difficult to output specific influencing parameters of the cause and effect of the prior art, which makes it impossible to give recommendations for medicinal and food homologous prescriptions for symptoms.

Method used

By constructing multiple knowledge domains corresponding to Q&A data, symptom description data, and symptom-related images, and sharing knowledge, fine-tuning large language models to output physical fitness and symptom parameters, it is used for prescription recommendations.

Benefits of technology

It has achieved more accurate, fast and high-quality recommendations of medicinal and food homologous prescriptions, helping patients with thoracic and pulmonary medicine quickly find the right prescriptions and save costs for doctors and patients.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120108651A_ABST
    Figure CN120108651A_ABST
Patent Text Reader

Abstract

The invention discloses a traditional Chinese medicine prescription recommendation method and system based on a large language model of a thoracic and pulmonary department traditional Chinese medicine inquiry report, and belongs to the technical field of large language models. According to the method, the first knowledge domain, the second knowledge domain and the third knowledge domain corresponding to the question and answer data are constructed for knowledge sharing, the trained large language model is finely adjusted by utilizing the shared knowledge domains, the finely-adjusted large language model is obtained, and the physique and symptom parameters are output, so that subsequent prescription recommendation is realized, and the user experience is improved. Therefore, a more accurate, rapid and high-quality medicine and food homologous prescription recommendation system is established, so that patients in the thoracic lung department can rapidly find proper medicine and food homologous prescriptions, and the cost of doctors and patients is saved; through knowledge sharing, fine adjustment of the model is realized by utilizing multi-source data, and the reliability of fine adjustment of the model is realized, so that a more accurate, rapid and high-quality medicine and food homologous prescription recommendation system is further established.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of large language models, and in particular to a method and system for recommending traditional Chinese medicine prescriptions based on a large language model of traditional Chinese medicine consultation reports of chest and lung departments. Background Art

[0002] Existing medical big language models, such as Bian Que and Ling Xin, often use the natural language understanding (NLP) and reasoning capabilities of the large language model (LLM), combined with private knowledge bases for data analysis and fine-tuning optimization, to accurately understand the text content related to urology Chinese medicine consultation reports, and develop a system for recommending prescriptions of medicinal and edible substances based on the large language model.

[0003] However, in actual use, existing artificial intelligence technology can only provide prescriptions for medicine and food based on TCM consultation reports, and most recommendations cannot output the influencing parameters of the specific cause of the disease in the consultation, and thus cannot provide prescriptions for medicine and food corresponding to the symptoms based on the specific cause of the disease in the consultation. Summary of the invention

[0004] In order to solve the problems of the prior art, the embodiment of the present invention provides a method and system for recommending TCM prescriptions based on a large language model of TCM consultation reports of chest and lung departments, including:

[0005] On the one hand, a method for recommending TCM prescriptions based on a large language model of TCM consultation reports of chest and lung departments is provided, the method comprising:

[0006] Preset large language model;

[0007] Training the large language model according to the question and answer data to obtain a first knowledge domain corresponding to the question and answer data;

[0008] According to the symptom description data, the large language model is trained to obtain a second knowledge domain corresponding to the symptom description data;

[0009] Processing the symptom-related image to obtain text data corresponding to the symptom-related image;

[0010] Training the large language model according to the text data to obtain a third knowledge domain corresponding to the text data;

[0011] Sharing knowledge with the first knowledge domain, the second knowledge domain, and the third knowledge domain, and fine-tuning the trained large language model using the shared knowledge domains to obtain a fine-tuned large language model;

[0012] Input any one of the real-time data into the fine-tuned large language model, output constitution and symptom parameters, and the medical parameters are used for prescription recommendation;

[0013] The real-time data includes real-time question and answer data, real-time symptom description data and real-time symptom-related images.

[0014] Optionally, obtaining the question-answer data, training the large language model, and obtaining the first knowledge domain corresponding to the question-answer data includes:

[0015] Obtain the question and answer data from historical data;

[0016] By using the large language model, semantic recognition is performed on the question and answer data to obtain medical inquiry data, wherein the medical inquiry data includes a plurality of medical inquiry keywords;

[0017] The large language model is trained according to the multiple medical consultation keywords to obtain the constitution and symptom parameters, and a first knowledge domain corresponding to the question and answer data, wherein the first knowledge domain includes a first parameter of the large language model after training.

[0018] Optionally, the training of the large language model according to the symptom description data to obtain a second knowledge domain corresponding to the symptom description data includes:

[0019] Obtaining the symptom description data from historical data;

[0020] Using the large language model, semantic recognition is performed on the symptom description data to obtain symptom data, wherein the medical consultation data includes a plurality of symptom keywords;

[0021] The large language model is trained according to the multiple symptom keywords to obtain the constitution and symptom parameters, and a second knowledge domain corresponding to the symptom description data, wherein the first knowledge domain includes the second parameters of the large language model after training.

[0022] Optionally, the processing of the symptom-related image to obtain text data corresponding to the symptom-related image includes:

[0023] Obtaining the symptom-related image from historical data, and performing image recognition on the symptom-related image to obtain a plurality of characteristic sub-images;

[0024] Image recognition is performed on the multiple characteristic sub-images to obtain the text data.

[0025] Optionally, the step of training the large language model according to the text data to obtain a third knowledge domain corresponding to the text data includes:

[0026] By using the large language model, semantic recognition is performed on the text data to obtain image diagnosis data, wherein the consultation data includes a plurality of image diagnosis keywords;

[0027] The large language model is trained according to the multiple image diagnosis keywords to obtain the constitution and symptom parameters, and a third knowledge domain corresponding to the text data, wherein the first knowledge domain includes the third parameter of the large language model after training.

[0028] Optionally, the method further includes:

[0029] Perform semantic recognition on consultation keywords, symptom keywords and image diagnosis keywords;

[0030] According to the semantic recognition result, a mapping relationship between the medical consultation keyword, the symptom keyword and the image diagnosis keyword is set;

[0031] According to the mapping relationship, the weights of the medical consultation keywords, the symptom keywords and the image diagnosis keywords are set respectively.

[0032] Optionally, the method further includes:

[0033] According to the mapping relationship and the weight, a knowledge sharing mechanism is set;

[0034] The knowledge sharing mechanism includes:

[0035] The parameters of the large language model in the shared knowledge domain are obtained from the first parameter, the second parameter and the third parameter through the mapping relationship and the weight.

[0036] Optionally, the knowledge sharing with the first knowledge domain, the second knowledge domain and the third knowledge domain, and fine-tuning the trained large language model using the shared knowledge domains, to obtain the fine-tuned large language model includes:

[0037] Obtaining a shared knowledge domain according to the first parameter, the second parameter and the third parameter;

[0038] According to the shared knowledge domain, parameters in the trained large language model are fine-tuned.

[0039] Optionally, the method further includes:

[0040] Set up a prescription recommendation model;

[0041] Based on the prescription recommendation model, relevant prescriptions are output through the medical parameters.

[0042] On the other hand, a TCM prescription recommendation system based on a large language model of TCM consultation reports of chest and lung departments is provided, the system comprising a processor, a question-answering client, and a data uploading client;

[0043] The question-and-answer client is used to obtain question-and-answer data, and the data upload client is used to obtain symptom description data and symptom-related images;

[0044] The processor is used to:

[0045] Preset large language model;

[0046] Training the large language model according to the question and answer data to obtain a first knowledge domain corresponding to the question and answer data;

[0047] According to the symptom description data, the large language model is trained to obtain a second knowledge domain corresponding to the symptom description data;

[0048] Processing the symptom-related image to obtain text data corresponding to the symptom-related image;

[0049] Training the large language model according to the text data to obtain a third knowledge domain corresponding to the text data;

[0050] Sharing knowledge with the first knowledge domain, the second knowledge domain, and the third knowledge domain, and fine-tuning the trained large language model using the shared knowledge domains to obtain a fine-tuned large language model;

[0051] Input any one of the real-time data into the fine-tuned large language model, output constitution and symptom parameters, and the medical parameters are used for prescription recommendation;

[0052] The real-time data includes real-time question and answer data, real-time symptom description data and real-time symptom-related images.

[0053] The present invention has at least the following beneficial effects:

[0054] 1. By constructing the first knowledge domain, the second knowledge domain and the third knowledge domain corresponding to the question and answer data, knowledge sharing is carried out, and the trained large language model is fine-tuned by using the shared knowledge domain to obtain the fine-tuned large language model, and the medical parameters are output to achieve subsequent prescription recommendations, thereby establishing a more accurate, fast and high-quality medicine and food homology prescription recommendation system, which will help thoracic patients quickly find suitable medicine and food homology prescriptions and save costs for doctors and patients;

[0055] 2. Through knowledge sharing, we can use multi-source data to fine-tune the model and achieve the reliability of model fine-tuning, which will further help to establish a more accurate, fast and high-quality recommendation system for medicine and food prescriptions. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0057] Figure 1 A schematic flow chart of a method for recommending TCM prescriptions based on a large language model of TCM consultation reports of chest and lung departments provided in an embodiment of the present invention;

[0058] Figure 2 A schematic flow chart of a method for recommending TCM prescriptions based on a large language model of TCM consultation reports of chest and lung departments provided in an embodiment of the present invention;

[0059] Figure 3 A schematic flow chart of a method for recommending TCM prescriptions based on a large language model of TCM consultation reports of chest and lung departments provided in an embodiment of the present invention;

[0060] Figure 4 A schematic flow chart of a method for recommending TCM prescriptions based on a large language model of TCM consultation reports of chest and lung departments provided in an embodiment of the present invention;

[0061] Figure 5 A schematic flow chart of a method for recommending TCM prescriptions based on a large language model of TCM consultation reports of chest and lung departments provided in an embodiment of the present invention;

[0062] Figure 6 A schematic diagram of a TCM prescription recommendation system based on a large language model of TCM consultation reports of chest and lung departments provided by an embodiment of the present invention;

[0063] Figure 7 A schematic diagram of a TCM prescription recommendation system based on a large language model of TCM consultation reports of chest and lung departments provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0065] The method and system for recommending TCM prescriptions based on the large language model of TCM consultation reports of thoracic and pulmonary departments described in the embodiment of the present invention, after training the large language model (i.e., the prediction model in this article), outputs core keyword data and the correlation between the core keyword data. The above core keyword data and the correlation between the core keyword data are used as reference data to be applied to consultation and symptom-related medicine and food recommendations; thereby establishing a more accurate, fast, and high-quality medicine and food prescription recommendation system, which helps urology patients quickly find suitable medicine and food prescriptions and save costs for doctors and patients.

[0066] The above training process is achieved by fine-tuning the large language model based on chest and lung clinical case data, classic Chinese medicine textbooks and Chinese medicine consultation reports. The embodiment of the present invention takes the chest and lung clinical case data as an example to illustrate the technical effect that can be achieved by the method described in the embodiment of the present invention.

[0067] It should be noted that the Chinese medicine prescription recommendation system based on the big language model of chest and pulmonary Chinese medicine consultation reports of the embodiment of the present invention, in addition to the need to execute the Chinese medicine prescription recommendation method based on the big language model of chest and pulmonary Chinese medicine consultation reports of the embodiment of the present invention, also includes a series of functions such as data preprocessing, knowledge base management, continuous iterative optimization, big language model API access, big language model fine-tuning, testing and optimization, interface design and development, system testing and optimization, and daily maintenance.

[0068] Reference Figure 1 As shown, a method for recommending TCM prescriptions based on a large language model of TCM consultation reports of chest and lung departments is provided, and the method comprises:

[0069] 101. Preset large language model;

[0070] 102. Train the large language model according to the question and answer data to obtain a first knowledge domain corresponding to the question and answer data;

[0071] 103. Train the large language model according to the symptom description data to obtain a second knowledge domain corresponding to the symptom description data;

[0072] 104. Process the symptom-related image to obtain text data corresponding to the symptom-related image;

[0073] 105. Train the large language model according to the text data to obtain a third knowledge domain corresponding to the text data;

[0074] 106. Share knowledge with the first knowledge domain, the second knowledge domain, and the third knowledge domain, and use the shared knowledge domains to fine-tune the trained large language model to obtain a fine-tuned large language model;

[0075] 107. Input any of the real-time data into the fine-tuned large language model to output the constitution and symptom parameters;

[0076] Among them, constitution and symptom parameters are used for prescription recommendations, and real-time data include real-time question and answer data, real-time symptom description data, and real-time symptom-related images.

[0077] Optional, see Figure 2 As shown, obtaining the large language model based on the question and answer data, and obtaining the first knowledge domain corresponding to the question and answer data includes:

[0078] 201. Obtain question and answer data from historical data;

[0079] 202. Using a large language model, semantic recognition is performed on the question-answer data to obtain medical inquiry data, where the medical inquiry data includes multiple medical inquiry keywords;

[0080] 203. Train the large language model based on multiple consultation keywords to obtain constitution and symptom parameters, as well as a first knowledge domain corresponding to the question and answer data, where the first knowledge domain includes a first parameter of the large language model after training.

[0081] Optional, see Figure 3 As shown, according to the symptom description data, the large language model is trained to obtain the second knowledge domain corresponding to the symptom description data, including:

[0082] 301. Obtain symptom description data from historical data;

[0083] 302. Perform semantic recognition on the symptom description data through a large language model to obtain symptom data, where the medical consultation data includes multiple symptom keywords;

[0084] 303. Train a large language model based on multiple symptom keywords to obtain constitution and symptom parameters, as well as a second knowledge domain corresponding to the symptom description data, wherein the first knowledge domain includes the second parameters of the large language model after training.

[0085] Optional, see Figure 4 As shown, the symptom-related images are processed to obtain text data corresponding to the symptom-related images, including:

[0086] 401. Obtain symptom-related images from historical data, and perform image recognition on the symptom-related images to obtain multiple feature sub-images;

[0087] 402. Perform image recognition on multiple feature sub-images to obtain text data.

[0088] Optionally, training a large language model according to the text data to obtain a third knowledge domain corresponding to the text data includes:

[0089] 403. Using a large language model, semantic recognition is performed on the text data to obtain image diagnosis data, where the consultation data includes multiple image diagnosis keywords;

[0090] 404. Train the large language model according to the multiple image diagnosis keywords to obtain constitution and symptom parameters, as well as a third knowledge domain corresponding to the text data, wherein the first knowledge domain includes the third parameters of the large language model after training.

[0091] Optional, see Figure 5 As shown, the method also includes:

[0092] 501. Perform semantic recognition on medical consultation keywords, symptom keywords and image diagnosis keywords;

[0093] 502. According to the semantic recognition result, a mapping relationship between the medical consultation keywords, the symptom keywords and the image diagnosis keywords is set;

[0094] 503. According to the mapping relationship, the weights of the medical consultation keywords, symptom keywords and image diagnosis keywords are set respectively.

[0095] Optionally, the method further includes:

[0096] 504. Set up a knowledge sharing mechanism based on the mapping relationship and weight;

[0097] Knowledge sharing mechanisms include:

[0098] The parameters of the large language model in the shared knowledge domain are obtained by the first parameter, the second parameter and the third parameter through a mapping relationship and a weight.

[0099] Optionally, knowledge is shared with the first knowledge domain, the second knowledge domain, and the third knowledge domain, and the trained large language model is fine-tuned using the shared knowledge domains. The fine-tuned large language model includes:

[0100] According to the first parameter, the second parameter and the third parameter, a shared knowledge domain is obtained;

[0101] Based on the shared knowledge domain, the parameters in the trained large language model are fine-tuned.

[0102] Optionally, the method further includes:

[0103] Set up a prescription recommendation model;

[0104] Based on the prescription recommendation model, relevant prescriptions are output through constitution and symptom parameters.

[0105] It should be noted that the method described in the embodiment of the present invention is implemented through the following steps in practical application:

[0106] Step 1: Obtain chest and lung department consultation reports and food-drug homology prescription data samples from traditional Chinese medicine hospitals, clean and organize them into question and answer data, symptom description data and symptom-related images, as well as food-drug homology prescription data samples;

[0107] Step 2: The data samples are combined with prescriptions of medicinal and edible homology to construct a data set, where the data set includes a training set and a validation set;

[0108] Step 3: vectorize each data sample in the data set to obtain a data sample vector;

[0109] Step 4: Classify the data sample vectors, build multiple category sample vector libraries, and create indexes;

[0110] Step 5: Select training data samples from each data set and vectorize the symptoms in the training data samples;

[0111] Step 6: Retrieve data sample vectors similar to the symptom vector from the sample vector library;

[0112] Step 7: Use the vector conversion model to convert the retrieved similar data sample vectors and prescription vectors back to data samples and symptoms. Use prompt splicing to fuse the retrieved data samples with the symptoms as additional context information to construct enhanced input.

[0113] Step 8: Fine-tune the large model using the constructed augmented input and smart batching strategy.

[0114] Step 9: Calculate the similarity between the chest and lung symptom vector and each data sample vector in the private knowledge base;

[0115] Step 10: According to the similarity calculation results, select N data sample vectors similar to the symptom vector;

[0116] Step 11: Convert these N data sample vectors back to symptom and prescription data samples;

[0117] Step 12: Finally, use the reasoning ability of the large language model to summarize the prescription data sample into a unique prescription result.

[0118] Reference Figure 6 As shown, a TCM prescription recommendation system based on a large language model of TCM consultation reports of chest and lung departments is provided, and the system includes a processor, a question-and-answer client, and a data upload client;

[0119] The question-and-answer client is used to obtain question-and-answer data, and the data upload client is used to obtain symptom description data and symptom-related images;

[0120] The processor is used to:

[0121] Preset large language model;

[0122] According to the question and answer data, a large language model is trained to obtain a first knowledge domain corresponding to the question and answer data;

[0123] According to the symptom description data, the large language model is trained to obtain a second knowledge domain corresponding to the symptom description data;

[0124] Processing the symptom-related images to obtain text data corresponding to the symptom-related images;

[0125] According to the text data, the large language model is trained to obtain a third knowledge domain corresponding to the text data;

[0126] Share knowledge with the first knowledge domain, the second knowledge domain, and the third knowledge domain, and use the shared knowledge domains to fine-tune the trained large language model to obtain a fine-tuned large language model;

[0127] Input any of the real-time data into the fine-tuned large language model, output the constitution and symptom parameters, and the medical parameters are used for prescription recommendations;

[0128] Among them, real-time data includes real-time question and answer data, real-time symptom description data and real-time symptom-related images.

[0129] Optionally, the processor is specifically configured to:

[0130] Obtain question-and-answer data from historical data;

[0131] Through the large language model, semantic recognition is performed on the question-answer data to obtain the medical inquiry data, which includes multiple medical inquiry keywords.

[0132] The large language model is trained according to multiple consultation keywords to obtain constitution and symptom parameters, as well as a first knowledge domain corresponding to the question and answer data. The first knowledge domain includes a first parameter of the large language model after training.

[0133] Optionally, the processor is specifically configured to:

[0134] From historical data, obtain symptom description data;

[0135] Through the large language model, semantic recognition is performed on the symptom description data to obtain symptom data. The consultation data includes multiple symptom keywords.

[0136] According to a plurality of symptom keywords, a large language model is trained to obtain constitution and symptom parameters, as well as a second knowledge domain corresponding to the symptom description data, wherein the first knowledge domain includes the second parameters of the large language model after training.

[0137] Optionally, the processor is specifically configured to:

[0138] Obtain symptom-related images from historical data, and perform image recognition on the symptom-related images to obtain multiple feature sub-images;

[0139] Image recognition is performed on multiple feature sub-images to obtain text data.

[0140] Optionally, the processor is specifically configured to:

[0141] Through the large language model, semantic recognition is performed on text data to obtain image diagnosis data. The consultation data includes multiple image diagnosis keywords.

[0142] According to a plurality of image diagnosis keywords, a large language model is trained to obtain constitution and symptom parameters, as well as a third knowledge domain corresponding to the text data, wherein the first knowledge domain includes the third parameters of the large language model after training.

[0143] Optionally, the processor is specifically configured to:

[0144] Perform semantic recognition on consultation keywords, symptom keywords and image diagnosis keywords;

[0145] According to the semantic recognition results, the mapping relationship between the medical consultation keywords, symptom keywords and image diagnosis keywords is set;

[0146] According to the mapping relationship, the weights of the medical consultation keywords, symptom keywords and image diagnosis keywords are set respectively.

[0147] Optionally, the processor is specifically configured to:

[0148] According to the mapping relationship and weight, set up the knowledge sharing mechanism;

[0149] Knowledge sharing mechanisms include:

[0150] The parameters of the large language model in the shared knowledge domain are obtained by the first parameter, the second parameter and the third parameter through a mapping relationship and a weight.

[0151] Optionally, the processor is specifically configured to:

[0152] According to the first parameter, the second parameter and the third parameter, a shared knowledge domain is obtained;

[0153] Based on the shared knowledge domain, the parameters in the trained large language model are fine-tuned.

[0154] Optionally, the processor is specifically configured to:

[0155] Set up a prescription recommendation model;

[0156] Based on the prescription recommendation model, relevant prescriptions are output through constitution and symptom parameters.

[0157] Reference Figure 7 As shown, the above system can be specifically:

[0158] The basic large language model selection process includes data preparation, large model customization, model training, and effect evaluation. In this step, the business scenario of the large language model is to recommend prescriptions for thoracic and pulmonary medicine and food homology, understand TCM health consultation reports and find text data reflecting symptoms.

[0159] By collating specific data sets of chest and lung TCM health consultation reports and using paired task input and output data for model training, the language model can better master the ability to solve tasks by reading text. Fine-tuning can allow the large language model to produce more accurate and high-quality answers when recommending chest and lung prescriptions of traditional Chinese medicine with the same origin as food, and significantly reduce latency when answering specific questions.

[0160] The collected data is cleaned using artificial intelligence technology to remove redundant, erroneous or irrelevant information. The cleaned data is classified according to a certain logic, and attempts are made to extract keywords and structure them for subsequent processing. Natural language processing, machine learning and other technologies are used to deeply process and analyze the data to improve the intelligence level of the knowledge base. A fully functional and easy-to-use private knowledge base is built to provide strong support for the development of a recommendation system for Chinese medicine chest and lung prescriptions that are both medicinal and edible.

[0161] In terms of system architecture design, the application layer demonstrates a high degree of flexibility, integrating multiple interactive channels such as websites, telephone hotlines, and WeChat public accounts, while reserving interfaces to be compatible with more innovative interactive methods that may be introduced in the future.

[0162] The service scheduling layer has built a comprehensive and sophisticated management system, covering everything from intelligent identification and accurate classification of problems to efficient management and maintenance of the knowledge base; from real-time monitoring and feedback of service quality to seamless integration of manual assistance and intelligent transfer mechanisms; to in-depth data analysis and customized report generation, as well as all-round guarantees of system stability and security.

[0163] The resource layer focuses on selecting the best service resources and carefully selects industry-leading service resources to support the fine-tuning and pre-training process of the model. It aims to improve the overall service intelligence level and response efficiency through high-quality data and algorithm optimization.

[0164] At the bottom layer of the deployment architecture, an integration strategy is adopted to deeply integrate private knowledge bases into the system, and a series of top large language models are introduced, including iFlytek Spark, Tencent Hunyuan, Alibaba YiQianwen and Baidu Wenxin.

[0165] It mainly includes two parts: recommendation system and knowledge base system.

[0166] The specific content of the recommendation system is as follows: When a chest and lung TCM health consultation report is input into the system, the system will first determine the symptom content in the report text. Subsequently, the system will quickly retrieve the most relevant answer texts from its database. Next, with the help of artificial intelligence technology of large language models, the system will generate a concise final answer. At the same time, the recommendation system can also be connected to multiple channels such as websites and WeChat public accounts to form a complete recommendation system for chest and lung prescriptions of TCM with the same origin of medicine and food.

[0167] The knowledge base system ensures that the knowledge base reflects the latest urinary prescriptions of medicinal and edible homology by analyzing the updating frequency and timeliness of the content, so as to achieve the optimization effect of updating the existing symptoms to correspond with the new urinary prescriptions of medicinal and edible homology and supplementing the missing content.

[0168] In terms of daily maintenance, system administrators can make full use of platform functions and deeply analyze user log data. This process not only involves verifying the accuracy of question classification and ensuring the comprehensiveness of keyword extraction, but also covers the accuracy assessment of speech analysis technology, which is used as a basis for judging whether necessary fine-tuning and optimization of large language models and knowledge bases are needed. Subsequently, a series of systematic testing and iterative optimization measures are implemented to significantly improve the quality of system recommendations and user experience.

[0169] The present invention fine-tunes the large language model by using classic Chinese medicine textbooks and chest and lung Chinese medicine consultation reports to establish a more accurate, fast, and high-quality medicine and food homologous prescription recommendation system, thereby helping chest and lung patients to quickly find appropriate medicine and food homologous prescriptions and save costs for doctors and patients.

[0170] The above specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0171] The technical features of the above embodiments may be arbitrarily combined (as long as there is no contradiction in the combination of these technical features). To make the description concise, not all possible combinations of the technical features in the above embodiments are described; these embodiments that are not explicitly written should also be considered to be within the scope of this specification.

[0172] The present invention is described in more detail through general description and specific embodiments. It should be noted that, without departing from the concept of the present invention, it is obvious that several variations and improvements can be made to these specific embodiments, which all belong to the protection scope of this application. Therefore, the protection scope of the patent of this application shall be subject to the attached claims.

[0173] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for recommending Chinese medicine prescriptions based on a large language model of Chinese medicine consultation reports of chest and lung departments, characterized in that: The method comprises: Preset large language model; Training the large language model according to the question and answer data to obtain a first knowledge domain corresponding to the question and answer data; According to the symptom description data, the large language model is trained to obtain a second knowledge domain corresponding to the symptom description data; Processing the symptom-related image to obtain text data corresponding to the symptom-related image; Training the large language model according to the text data to obtain a third knowledge domain corresponding to the text data; Sharing knowledge with the first knowledge domain, the second knowledge domain, and the third knowledge domain, and fine-tuning the trained large language model using the shared knowledge domains to obtain a fine-tuned large language model; Input any one of the real-time data into the fine-tuned large language model, output constitution and symptom parameters, and the medical parameters are used for prescription recommendation; The real-time data includes real-time question and answer data, real-time symptom description data and real-time symptom-related images.

2. The method according to claim 1, characterized in that The step of obtaining the question-answer data and training the large language model to obtain the first knowledge domain corresponding to the question-answer data includes: Obtain the question and answer data from historical data; By using the large language model, semantic recognition is performed on the question and answer data to obtain medical inquiry data, wherein the medical inquiry data includes a plurality of medical inquiry keywords; The large language model is trained according to the multiple medical consultation keywords to obtain the constitution and symptom parameters, and a first knowledge domain corresponding to the question and answer data, wherein the first knowledge domain includes a first parameter of the large language model after training.

3. The method according to claim 1, characterized in that The step of training the large language model according to the symptom description data to obtain a second knowledge domain corresponding to the symptom description data includes: Obtaining the symptom description data from historical data; Using the large language model, semantic recognition is performed on the symptom description data to obtain symptom data, wherein the medical consultation data includes a plurality of symptom keywords; The large language model is trained according to the multiple symptom keywords to obtain the constitution and symptom parameters, and a second knowledge domain corresponding to the symptom description data, wherein the first knowledge domain includes the second parameters of the large language model after training.

4. The method according to claim 1, characterized in that The processing of the symptom-related image to obtain text data corresponding to the symptom-related image includes: Obtaining the symptom-related image from historical data, and performing image recognition on the symptom-related image to obtain a plurality of characteristic sub-images; Image recognition is performed on the multiple characteristic sub-images to obtain the text data.

5. The method according to claim 4, characterized in that The step of training the large language model according to the text data to obtain a third knowledge domain corresponding to the text data comprises: By using the large language model, semantic recognition is performed on the text data to obtain image diagnosis data, wherein the consultation data includes a plurality of image diagnosis keywords; The large language model is trained according to the multiple image diagnosis keywords to obtain the constitution and symptom parameters, and a third knowledge domain corresponding to the text data, wherein the first knowledge domain includes the third parameter of the large language model after training.

6. The method according to claim 1, characterized in that The method further comprises: Perform semantic recognition on consultation keywords, symptom keywords and image diagnosis keywords; According to the semantic recognition result, a mapping relationship between the medical consultation keyword, the symptom keyword and the image diagnosis keyword is set; According to the mapping relationship, the weights of the medical consultation keywords, the symptom keywords and the image diagnosis keywords are set respectively.

7. The method according to claim 6, characterized in that The method further comprises: According to the mapping relationship and the weight, a knowledge sharing mechanism is set; The knowledge sharing mechanism includes: The parameters of the large language model in the shared knowledge domain are obtained from the first parameter, the second parameter and the third parameter through the mapping relationship and the weight.

8. The method according to claim 7, characterized in that The knowledge sharing is performed with the first knowledge domain, the second knowledge domain and the third knowledge domain, and the trained large language model is fine-tuned using the shared knowledge domains, and the fine-tuned large language model includes: Obtaining a shared knowledge domain according to the first parameter, the second parameter and the third parameter; According to the shared knowledge domain, parameters in the trained large language model are fine-tuned.

9. The method according to claim 1, characterized in that: The method further comprises: Set up a prescription recommendation model; Based on the prescription recommendation model, relevant prescriptions are output through the constitution and symptom parameters.

10. A constitution and symptom recommendation system based on a large language model of chest and lung Chinese medicine consultation reports, characterized in that: The system includes a processor, a question-answering client, and a data uploading client; The question-and-answer client is used to obtain question-and-answer data, and the data upload client is used to obtain symptom description data and symptom-related images; The processor is used to: Preset large language model; Training the large language model according to the question and answer data to obtain a first knowledge domain corresponding to the question and answer data; According to the symptom description data, the large language model is trained to obtain a second knowledge domain corresponding to the symptom description data; Processing the symptom-related image to obtain text data corresponding to the symptom-related image; Training the large language model according to the text data to obtain a third knowledge domain corresponding to the text data; Sharing knowledge with the first knowledge domain, the second knowledge domain, and the third knowledge domain, and fine-tuning the trained large language model using the shared knowledge domains to obtain a fine-tuned large language model; Input any one of the real-time data into the fine-tuned large language model, output constitution and symptom parameters, and the medical parameters are used for prescription recommendation; The real-time data includes real-time question and answer data, real-time symptom description data and real-time symptom-related images.