Large and small model collaborative traditional Chinese medicine prescription optimization method and system, terminal and storage medium

By combining large and small model collaborative optimization methods, and integrating large language models with small models for screening multi-task pharmacodynamic substances, the problem of lack of validation in the optimization of traditional Chinese medicine prescriptions has been solved. This has enabled the systematization and intelligentization of traditional Chinese medicine prescription optimization, and improved the scientificity and operability of the optimization effect.

CN120998428APending Publication Date: 2025-11-21TIANJIN UNIV OF TRADITIONAL CHINESE MEDICINE +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511115220.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-11
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing methods for optimizing traditional Chinese medicine formulas lack macro-to-micro level validation and reliable indicators to determine their correctness, which affects the optimization effect of traditional Chinese medicine formulas.

Method used

A collaborative optimization method using large and small models is adopted. A large language model is used for macro-level knowledge reasoning, and a small multi-task pharmacodynamic substance screening model is used for micro-level pharmacodynamic substance screening. A local traditional Chinese medicine knowledge base is constructed through semantic representation tools, realizing intelligent operation of the entire process from prescription selection to optimization scheme generation.

Benefits of technology

It has realized the systematization and intelligentization of the optimization process of traditional Chinese medicine prescriptions, improved the intelligent level of prescription knowledge reasoning, supported multi-dimensional optimization strategies, enhanced the quantitative analysis and traceability of active ingredients, and improved the scientificity and operability of optimization schemes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120998428A_ABST
    Figure CN120998428A_ABST
Patent Text Reader

Abstract

The invention provides a large and small model collaborative traditional Chinese medicine prescription optimization method and system, a terminal and a storage medium, and the method comprises the steps: firstly determining a prescription needing to be optimized, sorting related public literatures into an input document, constructing a local prescription knowledge base, and carrying out question answering based on a prescription optimization large language model to obtain a large model optimization prescription; then, determining related pathway targets of applicable symptoms in the prescription needing to be optimized, collecting chemical substances in the prescription needing to be optimized to obtain a prediction result of a pharmacodynamic substance level, performing medicinal material tracing analysis on the prediction result, optimizing prescription composition based on pharmacodynamic substance weight to obtain a small model optimized prescription, and determining the pharmacodynamic substance weight based on the small model optimized prescription. And performing comprehensive analysis based on the large model optimization prescription and the small model optimization prescription to generate final prescription optimization recommendation. The efficient traditional Chinese medicine prescription composition optimization method is constructed from the macroscopic level and the microscopic level, and the scientificity and the practicability of prescription optimization can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of traditional Chinese medicine prescription optimization technology, and in particular relates to a method, system, terminal and storage medium for optimizing traditional Chinese medicine prescriptions using a combination of large and small models. Background Technology

[0002] In traditional Chinese medicine research and practical application, the optimization of Chinese herbal formulas mainly relies on accumulated clinical experience and the wisdom of physicians in syndrome differentiation and treatment. While this approach has certain practical value and historical heritage, it inevitably suffers from prominent problems such as strong subjectivity, frequent repetitive experiments, long research cycles, poor reproducibility, and low efficiency. This traditional method is insufficient to meet the urgent needs of current precision medicine development for systematic analysis of drug compatibility mechanisms and high-throughput screening, especially when facing complex indications and multi-target treatment requirements.

[0003] With the rapid development of artificial intelligence, big data technology, molecular biology, and bioinformatics, more and more advanced computing methods are being introduced into the field of traditional Chinese medicine (TCM), providing new opportunities for the intelligent, automated, and systematic optimization of prescriptions. Currently, many researchers are introducing artificial intelligence models and related methods into the field of TCM research and development. Among them, large language models, with their ability to understand, integrate, and generate complex semantic information, are increasingly being used in TCM prescription optimization question answering. However, using these traditional artificial intelligence models faces several problems, mainly that the obtained TCM prescription optimization results lack macro-to-micro level verification and reliable indicators to judge their correctness, thus affecting the intelligent optimization effect of TCM prescriptions. Summary of the Invention

[0004] In view of this, the present invention aims to propose a method, system, terminal and storage medium for optimizing traditional Chinese medicine prescriptions using a combination of large and small models, in order to solve the problem that existing methods for optimizing traditional Chinese medicine prescriptions lack validation and affect the optimization effect.

[0005] To achieve the above objectives, the technical solution of the present invention is implemented as follows: In a first aspect, embodiments of the present invention provide a method for optimizing traditional Chinese medicine prescriptions using a large-scale model-coordinated approach, comprising: Identify the prescriptions that need optimization; Obtain relevant publicly available literature on the medicinal materials and indications of the prescription that needs to be optimized, and compile the relevant publicly available literature into an input document; The input document is processed using semantic representation tools, and a local medicinal formula knowledge base is constructed. The large language model was optimized using the local prescription knowledge base to obtain an optimized prescription large language model. Question answering is performed based on the optimized large language model of the prescription to obtain the optimized prescription of the large model; Identify the relevant pathway targets for the indications in the prescription that need to be optimized, and construct a small model for screening multi-task pharmacodynamic substances under the guidance of efficacy. We collect chemical substances in prescriptions that need to be optimized, and after data preprocessing, we construct a standard dataset for predicting the efficacy of compounds in prescriptions. The standard dataset is input into the trained multi-task pharmacological substance screening small model to obtain prediction results at the pharmacological substance level. The predicted results are used for medicinal material traceability analysis, and the prescription composition is optimized based on the weight of active ingredients to obtain a small-model optimized prescription. Based on a comprehensive analysis of the large-model optimized prescriptions and the small-model optimized prescriptions, a final optimized prescription recommendation is generated.

[0006] Furthermore, determining the prescription that needs optimization includes: Using a large language model, a preliminary screening was conducted on classic prescriptions, hospital preparations, and commercially available Chinese herbal prescriptions to obtain a list of candidate prescriptions; Machine learning and artificial intelligence technologies are used to conduct intelligent analysis and verification of the traditional Chinese medicine prescriptions in the candidate prescription list. The focus is on whether the traditional Chinese medicine prescriptions in the candidate prescription list have systematic publicly available literature, data on the components of Chinese medicinal materials, clinical research data and relevant patent information, so as to ensure that the candidate prescription list has a research foundation and development potential.

[0007] Furthermore, the step of processing the input document using semantic representation tools and constructing a local herbal medicine knowledge base includes: By integrating Chinese semantic embedding models with relevant domain prior knowledge such as pharmaceutical knowledge vocabularies and prescription structure templates, deep semantic representation and structured extraction are performed on the input document to identify key information related to prescription names, drug composition, dosage ratio, processing methods, efficacy and indications, clinical application cases and mechanisms of action in the text, and obtain text embedding vectors. Combining the text embedding vector, semantic encoding is performed on key paragraphs in relevant published documents, and entity recognition and rule template extraction technology is used to extract the core elements of traditional Chinese medicine prescriptions into structured fields to obtain structured data. Construct a local medicinal herb knowledge base, and store the structured data in the local medicinal herb knowledge base in a unified format; Monitor newly released relevant public documents and update and maintain the local medicinal herb knowledge base based on these documents to ensure its timeliness and accuracy.

[0008] Furthermore, the step of optimizing the large language model using the local prescription knowledge base to obtain an optimized prescription large language model includes: Based on the characteristics and application requirements of the local medicinal formula knowledge base, the fine-tuning and optimization tasks are determined. The knowledge in the local traditional Chinese medicine knowledge base is used as training data, and the large language model is subjected to phased targeted fine-tuning and optimization according to the fine-tuning and optimization task to obtain a large language model for formula optimization that can adapt to the formula optimization task. The first phase of phased targeted fine-tuning and optimization uses a general pre-trained model for semantic adaptation training, enabling the large language model to learn the language style and terminology structure of traditional Chinese medicine texts. The second phase of phased targeted fine-tuning and optimization introduces task-specific labels and combines structured templates and traditional Chinese medicine knowledge graphs to guide the training of the large language model with instructions, so as to improve the ability of the large language model to express the implicit logic and structured knowledge in professional corpora.

[0009] Furthermore, the process of identifying relevant pathway targets for the indications in the prescription that need to be optimized, and constructing a small-scale, efficacy-oriented multi-task screening model for pharmacodynamic substances, includes: To optimize the indications for prescriptions, we conducted multi-dimensional data integration and knowledge extraction, and sorted out the signaling pathways and target information related to the indications. Based on the signaling pathways and target information related to the indications, a multi-task pharmacodynamic substance prediction dataset with efficacy orientation as the core is constructed; wherein, each task in the multi-task pharmacodynamic substance prediction dataset corresponds to an efficacy label, and the structural features of the medicinal material components and their interaction information with the target are used as input features; A multi-task neural network model is trained using the multi-task pharmacological substance prediction dataset to obtain a trained multi-task pharmacological substance screening small model.

[0010] Furthermore, the step of performing medicinal material traceability analysis on the prediction results and optimizing the prescription composition based on the weights of pharmacodynamic substances to obtain a small-model optimized prescription includes: By using source tracing analysis technology, the source of the active ingredients in the predicted results is traced to determine their corresponding medicinal materials; Based on the pharmacologically active substances in the predicted results, a pharmacologically active substance-target-disease action network is constructed. Based on molecular action intensity, target coverage and functional pathway enrichment information, the influence factor of each pharmacologically active substance component in the overall efficacy is quantified, and then the functional weight of the pharmacologically active substance in the prescription is calculated. By introducing pharmacological and pharmacokinetic parameters, a component action mechanism model is constructed to analyze the synergistic effects and interaction potential of each pharmacodynamic component in vivo and in vitro. Construct a formulation optimization model based on an objective function; wherein the formulation optimization model aims to improve the overall efficacy score or a specific indicator. Based on the weights of the active ingredients in the predicted results, and using the component action mechanism model and the formulation optimization model, the optimal combination of dosage and type of each medicinal material is iteratively searched to obtain the optimized formula of the small model.

[0011] Furthermore, the comprehensive analysis based on the large-model optimized prescription and the small-model optimized prescription to generate the final optimized prescription recommendation includes: A model fusion and result evaluation mechanism is constructed. First, the optimized prescriptions of the large language model for prescription optimization and the small model for screening pharmacodynamic substances in the same task are generated in parallel and labeled for comparison, and an evaluation index system is set based on the task type. Second, in the fusion stage, a result selection mechanism based on credibility scoring or a weighted voting strategy is introduced to optimize and integrate the outputs of the large language model for prescription optimization and the small model for screening pharmacodynamic substances in the same task to obtain the model fusion output result. Based on the model fusion output, a multi-index quantitative system for prescription optimization evaluation is constructed, and a weighted scoring ranking result is obtained; wherein, each index in the multi-index quantitative system is mapped to a comparable value through a standardized function, and a weighted scoring mechanism is introduced to comprehensively evaluate the quality of the optimization scheme; Based on the weighted scoring and ranking results, the highest-ranked prescription combination is selected to generate the final prescription optimization recommendation.

[0012] Secondly, embodiments of the present invention provide a large-scale model-based collaborative optimization system for traditional Chinese medicine prescriptions, comprising: The prescription screening module is used to identify prescriptions that need to be optimized. The data integration module is used to obtain relevant public literature on Chinese medicinal materials and indications for prescriptions that need to be optimized, and to organize the relevant public literature into an input document. The knowledge base construction module is used to process the input documents using semantic representation tools and construct a local medicine knowledge base. The model optimization module utilizes the local prescription knowledge base to optimize the large language model, resulting in an optimized prescription large language model. The intelligent question-answering optimization module is used to perform question-answering based on the large language model of the prescription to obtain the large model optimized prescription; The small model building module is used to identify the relevant pathway targets in the prescriptions that need to be optimized for their indications, and to build a small model for screening multi-task pharmacodynamic substances under the guidance of efficacy. The chemical substance collection module is used to collect chemical substances in prescriptions that need to be optimized, and after data preprocessing, to build a standard dataset for predicting the efficacy of compounds in prescriptions. The efficacy prediction module is used to input the standard dataset into the trained multi-task pharmacological substance screening small model to obtain prediction results at the pharmacological substance level. The prescription optimization module is used to perform medicinal material traceability analysis on the prediction results and optimize the prescription composition based on the weight of the active ingredients to obtain a small model optimized prescription. The comprehensive evaluation and recommendation module is used to perform a comprehensive analysis based on the large model optimized prescription and the small model optimized prescription to generate the final prescription optimization recommendation.

[0013] Thirdly, embodiments of the present invention also provide a terminal, including: One or more processors; Storage device for storing one or more programs; A monitor is used to display the results; When the one or more programs are executed by the one or more processors, the one or more processors implement the above-described method for optimizing traditional Chinese medicine prescriptions using a synergistic model.

[0014] Fourthly, the present invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the above-described method for optimizing traditional Chinese medicine prescriptions using a synergistic model-size approach.

[0015] Compared with existing technologies, the method, system, terminal, and storage medium for optimizing traditional Chinese medicine prescriptions using a large-scale model-based approach described in this invention have the following advantages: (1) The large and small model collaborative method, system, terminal and storage medium of the present invention can realize the systematization and intelligence of the traditional Chinese medicine prescription optimization process. By introducing a technical framework that combines large language models and graph neural networks, an intelligent closed-loop optimization process of traditional Chinese medicine prescriptions from knowledge organization to efficacy verification can be realized.

[0016] (2) The method, system, terminal and storage medium for optimizing traditional Chinese medicine prescriptions using a combination of large and small models described in this invention can improve the intelligence level of prescription knowledge reasoning. By constructing a local knowledge base based on semantic representation tools, it effectively integrates literature on medicinal materials, literature and patents related to indications, and realizes semantic understanding of traditional Chinese medicine knowledge and intelligent question-and-answer generation.

[0017] (3) The large and small model collaborative method, system, terminal and storage medium of the present invention support multi-dimensional prescription optimization strategies. Among them, the large model can provide solutions such as medicinal material replacement, dosage adjustment and addition of medicinal materials, while the small model can accurately screen the active substances at the micro level, realizing two-way support of macro-adjustment and micro-verification.

[0018] (4) The method, system, terminal and storage medium for optimizing traditional Chinese medicine prescriptions using a combination of small and large models described in this invention can enhance the quantitative analysis and traceability of active ingredients. The predicted results of active ingredients output by the small model support weighted scoring and traceability of medicinal materials, thereby improving the scientific nature, transparency and operability of the optimization scheme.

[0019] (5) The method, system, terminal and storage medium for optimizing traditional Chinese medicine prescriptions by large and small model collaboration described in this invention can build a prescription knowledge base that is updated in real time. With the help of automated data capture and standardized document processing mechanisms, the knowledge base can be continuously updated, and the system's ability to adapt to new knowledge and new prescriptions can be enhanced.

[0020] (6) The method, system, terminal and storage medium for optimizing traditional Chinese medicine prescriptions by large and small model collaboration described in this invention improves the generalization and expansion capabilities of the model. By uniformly standardizing the input data, it can adapt to various prescription types and indications, thereby improving the universality and robustness of the model in clinical practice.

[0021] (7) The method, system, terminal and storage medium for optimizing traditional Chinese medicine prescriptions by large and small model collaboration described in this invention realizes the visualization and sorting management of optimization results. The system supports quantitative scoring and priority sorting of optimization suggestions, thereby improving R&D efficiency.

[0022] (8) The method, system, terminal, and storage medium for optimizing traditional Chinese medicine prescriptions using a large and small model-based approach described in this invention support platform-based deployment and multi-scenario applications. This invention has good system module decoupling and can be flexibly embedded into various application scenarios such as hospital information systems, traditional Chinese medicine R&D platforms, and intelligent decision-making terminals.

[0023] (9) The method, system, terminal and storage medium for optimizing traditional Chinese medicine prescriptions by combining large and small models described in this invention are conducive to promoting the modernization and intelligent upgrading of traditional Chinese medicine. By deeply integrating artificial intelligence with the theory and practice of traditional Chinese medicine, an optimization model system with "literature-knowledge-efficacy" as the core is constructed, laying a technical foundation for realizing the modern intelligentization of traditional Chinese medicine. Attached Figure Description

[0024] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a schematic diagram of the process for optimizing traditional Chinese medicine prescriptions using a combination of large and small models as described in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the structure of the large-scale model-based collaborative traditional Chinese medicine prescription optimization system described in Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of the structure of a face forgery image detection terminal provided in Embodiment 3 of the present invention. Detailed Implementation

[0025] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0026] Example 1 Figure 1 This is a schematic diagram of the process for optimizing traditional Chinese medicine (TCM) prescriptions using a combination of large and small models, as described in Embodiment 1 of the present invention. Specifically, this TCM prescription optimization method involves an optimization approach that integrates artificial intelligence technology, semantic representation tools, and the collaboration between large and small language models. The aim is to achieve intelligent and scientific optimization of TCM prescriptions from macroscopic to microscopic levels.

[0027] Because of their ability to understand, integrate, and generate complex semantic information, large language models can be effectively applied to macro-level tasks such as reasoning about traditional Chinese medicine knowledge, mining compatibility rules, and generating optimization suggestions. Meanwhile, small models, especially multi-task learning models based on graph neural networks, excel at accurately identifying and predicting potential pharmacodynamic substances from micro-level data such as chemical molecular structures, target networks, and pharmacological pathways, providing quantitative efficacy support for prescription composition.

[0028] Therefore, based on the aforementioned research needs, this invention constructs a method for optimizing the composition of traditional Chinese medicine (TCM) prescriptions, integrating prescription screening, knowledge integration, and collaborative optimization of large and small models. This method first screens prescriptions with optimization potential from multiple sources, clarifying the optimization direction and objectives. Then, it collects relevant literature, patents, and medicinal material information to construct a local prescription knowledge base. Simultaneously, the data is cleaned, organized, and standardized to ensure accuracy and consistency. In the optimization stage, a large language model is used for macroscopic knowledge reasoning, combined with a small model to accurately screen pharmacodynamic substances at the microscopic level. Through the collaborative work of large and small models, comprehensive optimization of TCM prescriptions is achieved. This method ultimately enables intelligent operation throughout the entire process from prescription selection to optimization scheme generation, greatly improving the scientific rigor and practicality of prescription optimization. Furthermore, by integrating artificial intelligence technology, this method overcomes the drawbacks of strong subjectivity and low efficiency in traditional prescription optimization methods, providing innovative technical means for the modernization and intelligent development of TCM.

[0029] For details, see Figure 1 This summarizes the optimization methods for traditional Chinese medicine prescriptions using a combination of large and small models, specifically including the following steps: Step S1: Determine the prescription that needs to be optimized.

[0030] Because traditional Chinese medicine (TCM) formulas are complex, the selection of target TCM formulas for optimization must be based on clinical treatment needs, disease type, or efficacy goals. Furthermore, specific optimization directions need to be defined according to the specific requirements. In practice, initial screening can begin with classic formulas, hospital preparations, and widely used compound formulas, combined with the National Pharmacopoeia, experienced TCM practitioners' formulas, and clinical pathway recommendations to further screen candidate formulas. Then, the indications for each candidate formula should be analyzed to clarify its therapeutic targets and functional indications. This allows for subsequent analysis using artificial intelligence and model algorithms to address issues such as inappropriate dosages, overlapping medicinal functions, and insufficient exploration of modern pharmacological mechanisms, thereby further determining whether there is room for optimization.

[0031] Step S2: Obtain relevant publicly available literature on the medicinal materials and indications of the prescription that needs to be optimized, and compile the relevant publicly available literature into an input document.

[0032] By collecting literature and patents related to Chinese medicinal materials in prescriptions and to indications, relevant information can be obtained, which will facilitate the subsequent organization and summarization of the collected content into an input document.

[0033] Step S3: Process the input document using semantic representation tools and construct a local traditional Chinese medicine knowledge base.

[0034] Because the input document data is complex, we use language representation tools to process the input documents and combine them with local knowledge graphs for semantic enhancement to build a local Chinese medicine prescription knowledge base, which can facilitate subsequent model calls.

[0035] In practical use, the Chinese General Large Model Embedding Technology version 1.5 (BAAI / bge-large-zh-v1.5) semantic representation tool can be used to semantically annotate the text in the input document, extracting key concepts and entities (such as names of medicinal materials, names of diseases, pharmacological terms, etc.). Then, semantic encoding technology is used to store these elements in an orderly manner in a specially designed database architecture, thereby constructing a local herbal medicine knowledge base.

[0036] Step S4: Optimize the large language model using the local prescription knowledge base to obtain an optimized large language model for prescriptions.

[0037] Since there is a lack of large language models for traditional Chinese medicine prescriptions, it is necessary to determine the architecture of the large language model for fine-tuning, evaluate its adaptability to the prescription knowledge domain, use the knowledge in the local prescription knowledge base as training data, and adjust the parameters of the large language model according to a specific fine-tuning strategy to adapt it to the prescription optimization task.

[0038] In practical use, the local traditional Chinese medicine knowledge base can be analyzed in depth, and the type of fine-tuning task can be determined according to the characteristics of the local traditional Chinese medicine knowledge base (such as data type, complexity, and disease areas covered) and application requirements. Then, the fine-tuning parameters can be reasonably configured according to the complexity of the knowledge base and the size of the dataset to ensure the stability and efficiency of the fine-tuning process.

[0039] Step S5: Based on the optimized large language model of the prescription, conduct question and answer to obtain the optimized prescription of the large model.

[0040] Those skilled in the art can ask questions to a large language model for formula optimization based on the desired optimization goals or directions of the traditional Chinese medicine formula. The large language model for formula optimization can then generate optimization results based on the questions, which is called large model-optimized formula.

[0041] Step S6: Identify the relevant pathway targets for the indications in the prescription that need to be optimized, and construct a small model for screening multi-task pharmacodynamic substances under efficacy guidance.

[0042] To fully understand the mechanism of action of the target formula, literature search platforms such as KEGG, TCMSP, Web of Science, PubMed, and CNKI are needed. For the indications of the target formula, bioinformatics analysis and literature mining can be used to identify relevant signaling pathways and target information. Then, a multi-task dataset for efficacy-guided prediction of pharmacodynamic substances is created. Finally, the multi-task dataset is input into a deep neural network model for training, resulting in a small multi-task model for screening pharmacodynamic substances.

[0043] Specifically, bioinformatics analysis methods can be used to identify signaling pathways and targets related to the symptoms of the target prescription. Literature mining tools can then be used to retrieve reported information on drug targets related to this indication. Next, a multi-task dataset for drug efficacy prediction based on multi-task learning can be constructed to improve the model's generalization ability under various drug mechanisms of action. Finally, the multi-task dataset is input into a deep neural network for model training. Through the multi-task learning mechanism, the predictive ability of different efficacy indicators is jointly optimized, resulting in a small multi-task model for screening pharmacodynamic substances.

[0044] Step S7: Collect the chemical substances in the prescription that need to be optimized, and after data preprocessing, construct a standard dataset for predicting the efficacy of compounds in the prescription.

[0045] By using chemical analysis techniques and database retrieval, information such as the structure and activity data of various chemical substances in the prescription can be collected. After standardizing the collected data, a standard dataset for predicting drug efficacy can be constructed.

[0046] Specifically, chemical analysis instruments can be used to determine the structure and content of chemical substances in the prescription, and chemical database searches can be conducted to collect information such as the names, structures, and physicochemical properties of various chemical substances in the prescription. Then, the collected chemical data is cleaned to remove outliers and erroneous data. Finally, data standardization methods are used to convert data from different sources and formats into a standardized format, constructing a standard dataset for predicting the efficacy of compounds in the prescription.

[0047] Step S8: Input the standard dataset into the trained multi-task pharmacological substance screening small model to obtain the prediction results at the pharmacological substance level.

[0048] By calling a pre-trained multi-task mini-model and inputting a standard dataset into it, prediction results at the level of pharmacodynamic substances can be obtained. For example, a standardized dataset can be first input into a pre-trained multi-task pharmacodynamic substance screening mini-model to perform the task of predicting the efficacy of components. Then, the pre-trained multi-task pharmacodynamic substance screening mini-model is used to perform a final performance evaluation using a test set, so as to obtain subsequent prediction results at the level of pharmacodynamic substances.

[0049] Step S9: Perform medicinal material traceability analysis on the prediction results, and optimize the prescription composition based on the weight of the active ingredients to obtain a small model optimized prescription.

[0050] By employing source tracing analysis technology, the origins of the active ingredients in the predicted results can be traced, thus identifying the corresponding medicinal materials. Then, based on the weight and importance of the active ingredients, the dosage or type of each medicinal material in the prescription can be adjusted to optimize the prescription composition.

[0051] Specifically, by establishing a database of correspondences between medicinal materials and their active ingredients, and using chemical analysis techniques and traceability algorithms, the sources of the active ingredients in the predicted results can be determined by tracing them back to their origins within the various medicinal materials of the prescription. Then, based on the weights of the active ingredients (determined comprehensively by factors such as efficacy intensity and content), optimization algorithms (such as genetic algorithms and particle swarm optimization) can be applied to adjust the dosage or types of each medicinal material in the prescription, thereby optimizing the prescription composition.

[0052] Step S10: Based on the large model optimized prescription and the small model optimized prescription, a comprehensive analysis is performed to generate the final optimized prescription recommendation.

[0053] Since the optimization results of large and small language models differ, it is generally necessary to compare and analyze their consistency and differences. By comprehensively considering factors such as model results, clinical experience, and medicinal resources, a final optimized prescription recommendation scheme is generated.

[0054] Preferably, step S1, determining the prescription that needs optimization, specifically includes the following steps: Step S11: Use a large language model to conduct preliminary screening from classic prescriptions, hospital preparations, and Chinese herbal prescriptions used in the market to obtain a list of candidate prescriptions.

[0055] In practical applications, a comprehensive initial screening of traditional Chinese medicine compound prescriptions can be conducted from multiple dimensions, focusing on classic prescriptions, hospital preparations, and compound prescriptions widely used in the market with a proven track record of efficacy. Simultaneously, by referring to the prescriptions recommended by national clinical pathways, promising candidate prescriptions can be systematically reviewed and screened, laying a solid foundation for subsequent research and application.

[0056] Step S12: Utilize machine learning and artificial intelligence technologies to perform intelligent analysis and verification on the traditional Chinese medicine prescriptions in the candidate prescription list. Focus on examining whether the traditional Chinese medicine prescriptions in the candidate prescription list have systematic publicly available literature, data on the components of Chinese medicinal materials, clinical research data, and relevant patent information, so as to ensure that the candidate prescription list has a research foundation and development potential.

[0057] In practical applications, the selected prescriptions can be systematically searched and evaluated, focusing on whether they possess abundant and systematic publicly available literature, clinical research data, relevant patent information, and complete records in mainstream Chinese medicinal herb ingredient databases. Through multi-dimensional cross-validation of information, it can be ensured that the selected prescriptions requiring optimization have a strong research foundation and development potential.

[0058] Preferably, step S2 involves obtaining relevant publicly available literature on the medicinal materials and indications of the prescription to be optimized, and compiling the relevant publicly available literature into an input document, specifically including the following steps: Step S21: Collect detailed literature and patent information for each medicinal material in the prescription and compile it into an input text.

[0059] In practical applications, based on the composition of the selected prescription requiring optimization, detailed information on each of the medicinal herbs can be collected one by one. Multiple authoritative professional literature retrieval platforms, such as CNKI, Web of Science, and PubMed, can be used to systematically search and summarize the medicinal herbs' pharmacological effects, traditional uses, modern research findings, and safety evaluations, ensuring a comprehensive and scientific understanding of the herbs' characteristics.

[0060] Step S22: Collect relevant literature and patents related to the indications and compile them into input text.

[0061] In practical applications, relevant domestic and international research literature and technical patents can be collected, focusing on the main indications of this prescription, with particular attention to registration information in the State Intellectual Property Office and other mainstream patent databases. The acquired data will then be categorized and analyzed, and organized into structured input text to provide reliable data support for subsequent data mining, model analysis, or mechanism research.

[0062] Step S23: Preprocess the collected documents to remove content that is clearly irrelevant to the prescription, medicinal materials, and indications, or that is of extremely low quality. For example, text processing tools can be used to remove garbled characters, duplicate paragraphs, etc., to create a clean input document.

[0063] In practical applications, the collected original literature and text data can be preliminarily reviewed. Combined with the established keyword dictionary and domain knowledge standards, text content unrelated to the target prescription's medicinal materials and indications can be removed, including advertising content, unstructured comments, texts with disordered formatting, and data from questionable sources, to ensure the basic reliability of the corpus quality.

[0064] Preferably, step S3, processing the input document using semantic representation tools and constructing a local herbal medicine knowledge base, specifically includes the following steps: Step S31: Integrate the Chinese semantic embedding model with the relevant domain prior knowledge of the pharmaceutical knowledge vocabulary and prescription structure template, perform deep semantic representation and structured extraction on the input document, identify the relevant key information in the text, such as prescription name, drug composition, dosage ratio, processing method, efficacy and indications, clinical application cases and mechanism of action, and obtain the text embedding vector.

[0065] In practical applications, a semantic parsing module for extracting structural information from traditional Chinese medicine prescriptions can be constructed. This module integrates Chinese semantic embedding models (such as BAAI / bge-large-zh-v1.5) with prior knowledge from fields such as pharmaceutical knowledge vocabularies and prescription structure templates. It performs deep semantic representation and structured extraction on previously compiled literature and patent texts, accurately identifying key information in the text, such as prescription names, drug composition, dosage ratio, processing methods, efficacy and indications, clinical application cases, and mechanisms of action. This helps improve the accuracy of information recognition in professional contexts and achieves targeted adaptation and innovative integration of general language models in the task of recognizing the structure of traditional Chinese medicine prescriptions.

[0066] Step S32: Combining the text embedding vector, semantic encoding is performed on key paragraphs in relevant published documents, and entity recognition and rule template extraction technology is used to extract the core elements of traditional Chinese medicine prescriptions into structured fields to obtain structured data. In practical applications, the key paragraphs in TCM-related literature and patent texts can be semantically encoded by combining the text embedding vectors extracted from the aforementioned Chinese large language model. At the same time, entity recognition and rule template extraction technologies can be used to extract core elements such as prescription name, drug composition, dosage ratio, efficacy and indications into structured fields to obtain structured data.

[0067] Step S33: Construct a local medicinal herb knowledge base and store the structured data in the local medicinal herb knowledge base in a unified format.

[0068] In practical applications, the generated structured data can be stored in a local traditional Chinese medicine knowledge base in a unified format (such as JSON or tabular structure). Through field indexing, keyword reverse indexing, and knowledge tag classification, the content can be organized in an orderly manner and retrieved efficiently, thereby transforming the scattered and fragmented information in the original literature into callable and parsable traditional Chinese medicine knowledge.

[0069] Step S34: Monitor newly published relevant literature and update and maintain the local medicinal herb knowledge base based on the newly published relevant literature to ensure the timeliness and accuracy of the local medicinal herb knowledge base. Specifically, the local medicinal herb knowledge base can be updated and maintained regularly, monitoring newly published literature and patents, and timely supplementing new knowledge information to ensure the timeliness and accuracy of the local medicinal herb knowledge base.

[0070] In practical applications, a timed task scheduling system (such as based on cron or Airflow) can be built to continuously monitor newly published literature, research results and patent information related to the efficacy of traditional Chinese medicine in mainstream databases (such as CNKI, PubMed, Wanfang, Google Scholar, State Intellectual Property Office database, etc.) using web crawlers or API interfaces, and to regularly update the local prescription knowledge base.

[0071] Preferably, step S4, optimizing the large language model using the local prescription knowledge base to obtain an optimized prescription large language model, specifically includes the following steps: Step S41: Determine the fine-tuning and optimization tasks based on the characteristics and application requirements of the local traditional Chinese medicine knowledge base.

[0072] In practical applications, fine-tuning tasks can be determined based on the characteristics of the local herbal medicine knowledge base and application needs. Since the prescription optimization task needs to be fully considered, it is possible to choose whether to focus on the accurate generation of medicinal material replacement suggestions, the in-depth mining of the basis for dosage adjustment, or the prediction of the possibility of using new medicinal materials, etc. Those skilled in the art can choose the task direction and objectives according to actual needs.

[0073] Step S43: Use the knowledge in the local traditional Chinese medicine knowledge base as training data, and perform phased targeted fine-tuning optimization on the large language model according to the fine-tuning optimization task to obtain a large language model for formula optimization that can adapt to the formula optimization task; wherein, the first stage of phased targeted fine-tuning optimization uses a general pre-trained model for semantic adaptation training, enabling the large language model to learn the language style and terminology structure of traditional Chinese medicine texts; the second stage of phased targeted fine-tuning optimization introduces task-specific labels and combines structured templates and traditional Chinese medicine knowledge graphs to guide the training of the large language model with instructions, so as to improve the ability of the large language model to express the implicit logic and structured knowledge in professional corpora.

[0074] In practical applications, those skilled in the art can design and implement a phased, targeted fine-tuning strategy based on a clear understanding of the fine-tuning task direction and objectives, taking into account the linguistic characteristics of the traditional Chinese medicine (TCM) field and utilizing a previously constructed high-quality labeled training sample set. The first phase employs a general pre-trained model (such as BERT) for semantic adaptation training, enabling the model to learn the linguistic style and terminology structure of TCM texts. The second phase introduces task-specific labels (such as "prescription indications," "drug relationships," and "dosage guidelines"), combined with structured templates and TCM knowledge graphs, to guide the model's training and enhance its ability to express the implicit logic and structural knowledge within professional corpora.

[0075] Furthermore, in addition to adjusting conventional parameters (such as learning rate, batch size, and number of iterations) during training, a loss function weighting mechanism can be introduced to penalize errors in structural information recognition, making the model more focused on accurately expressing the logic of prescription compatibility and the main indications. Through these improvements, the understanding depth and output quality of the large language model in TCM knowledge expression tasks can be effectively enhanced.

[0076] Preferably, step S5, performing question-and-answer based on the optimized large language model of the prescription to obtain the optimized large model prescription, specifically includes the following steps: Step S51: Construct a question-and-answer dataset related to prescription optimization, covering common prescription optimization questions. For example, common prescription optimization-related questions can be compiled, such as "How to enhance a certain efficacy of a prescription" or "The impact of replacing a certain medicinal material on the efficacy of a prescription," and a question-and-answer dataset can be constructed.

[0077] In practical applications, after fine-tuning the model, we can focus on the core task of formula optimization, fully consider various factors of formula optimization, and combine the characteristics of the fine-tuned model to ensure that the problem can effectively stimulate the model to output valuable information and organize it into a question-and-answer dataset.

[0078] Step S52: Input the problem into the fine-tuned formula optimization language model.

[0079] In practical applications, the constructed question-and-answer dataset can be fully preprocessed according to the input format requirements of the large language model (text normalization, unified annotation format processing, such as escape processing and character normalization) before being input into the fine-tuned formula optimization large language model.

[0080] Step S53: Conduct question-and-answer simulations and optimize the quality of responses through multiple rounds of interaction to achieve intelligent optimization of the prescription.

[0081] In practical applications, a finely tuned formula-optimized large language model can be used to automatically generate answers to TCM-related questions in a pre-constructed question-and-answer dataset. Upon receiving a question, the formula-optimized large language model leverages its knowledge representation and reasoning capabilities to generate intelligent answers related to the formula's composition, indications, and mechanisms of action.

[0082] In addition, the quality of the model output results can be evaluated through expert feedback mechanisms. Furthermore, by introducing knowledge graph constraints and automated adversarial sample training, the consistency of the large language model's expression of prescription compatibility logic and traditional Chinese medicine theory can be improved, gradually realizing the high-quality output of intelligent prescription optimization suggestions.

[0083] Preferably, step S6, identifying the relevant pathway targets for the indications in the prescription that need to be optimized, and constructing a small-scale multi-task pharmacodynamic substance screening model guided by efficacy, specifically includes the following steps: Step S61: Conduct multi-dimensional data integration and knowledge extraction around the indications for which the prescription needs to be optimized, and sort out the signaling pathways and target information related to the indications.

[0084] In practical applications, multidimensional data integration and knowledge extraction can be carried out around the main indications of the prescription. Specific steps include: First, relevant literature is retrieved through keyword and subject term searches, and key biological elements such as prescription components, disease names, potential targets, gene expression regulation, and protein-protein interaction information are extracted using natural language processing techniques (such as named entity recognition and relation extraction). Second, existing pathway annotations in the database (such as KEGG Pathway and Reactome) are used to map these elements to a known signaling pathway framework. Further, a multi-level biological association network of "prescription-component-target-pathway-disease" is constructed based on a graph structure. Then, potential key targets and mechanistic pathways are identified through network analysis methods (such as PageRank and centrality analysis), thereby systematically revealing the mechanism of action of the prescription in the therapeutic indications and providing theoretical support for subsequent mechanism verification and prescription optimization.

[0085] Step S62: Based on the signaling pathways and target information related to the indication, construct a multi-task pharmacodynamic substance prediction dataset with efficacy orientation as the core; wherein, each task in the multi-task pharmacodynamic substance prediction dataset corresponds to an efficacy label, and the structural features of the medicinal material components and their interaction information with the target are used as input features.

[0086] In practical applications, a multi-task pharmacodynamic substance prediction dataset centered on efficacy can be constructed to meet the actual needs of research on the efficacy mechanisms of traditional Chinese medicine (TCM). For example, the specific steps include: First, extracting active compounds, efficacy tags, and target activity data related to TCM from public databases (such as TCMSP, ChEMBL, and PubChem) and high-quality literature. Second, designing a multi-task classification system around common pharmacological effects such as anti-inflammatory, anti-tumor, anti-oxidative, and immunomodulatory effects, and standardizing and normalizing efficacy tags based on a combination of keyword matching, pharmacological ontology, and manual annotation. Then, using the SMILES format to uniformly represent compound structures, classifying them into intervals based on bioactivity indicators (such as IC50 and EC50), and associating literature evidence with structural data by number, establishing a "structure-target-efficacy" ternary association format. Finally, a structured dataset with multi-label and multi-dimensional information is formed, supporting subsequent training and validation of graph neural networks and multi-task learning models. The above construction method is innovative in terms of data organization strategies, task setting methods, and literature evidence fusion.

[0087] Step S63: Train a multi-task neural network model using the multi-task pharmacological substance prediction dataset to obtain a trained multi-task pharmacological substance screening small model.

[0088] In practical applications, based on a clear understanding of the therapeutic targets and pathways corresponding to the prescriptions, a multi-task pharmacodynamic substance prediction dataset centered on "efficacy guidance" is constructed. Each task corresponds to an efficacy label (such as anti-inflammatory, antioxidant, immunomodulatory, etc.), and the structural features of the medicinal components (such as molecular fingerprints or graph structures) and their interactions with the targets are used as input features. Based on the above prediction dataset, a multi-task neural network model (Multi-Task Learning, MTL) is trained to simultaneously predict and optimize multiple efficacy tasks, thereby obtaining a small multi-task pharmacodynamic substance screening model that can be used for pharmacodynamic substance screening. The above construction method can effectively integrate information from multiple pharmacological pathways, improve the model's ability to identify multifunctional components, and has innovative potential in model structure fusion and data label design.

[0089] Preferably, step S8, inputting the standard dataset into the trained multi-task pharmacological substance screening small model to obtain prediction results at the pharmacological substance level, specifically includes the following steps: Step S81: Input the structured and standardized dataset of Chinese herbal compounds into the previously trained multi-task pharmacodynamic substance screening small model, which can simultaneously perform multiple pharmacodynamic-related indicators (such as anti-inflammatory activity, antioxidant capacity, target binding force, immune regulation, etc.) for parallel prediction tasks.

[0090] Step S82: The multi-task pharmacodynamic substance screening small model first extracts the key structural features and physicochemical properties of compounds. Then, using the shared representation layer and task-specific output layer in the multi-task learning framework, it performs parallel modeling and prediction for multiple pharmacodynamic-related dimensions (such as anti-inflammation, anti-oxidation, target binding force, and immune regulation). Finally, the multi-task pharmacodynamic substance screening small model outputs prediction results covering multiple pharmacodynamic components or indicators, providing data support for subsequent pharmacodynamic evaluation and prescription optimization.

[0091] Preferably, step S9 involves performing a medicinal material traceability analysis on the prediction results and optimizing the prescription composition based on the weights of the active ingredients to obtain a small-model optimized prescription, specifically including the following steps: Step S91: Using source tracing analysis technology, trace the source of the medicinal substances in the predicted results to determine their corresponding medicinal materials.

[0092] In practical applications, after obtaining the high-potential pharmacodynamic components output by the small model, further component traceability analysis can be carried out. By cross-referencing with existing Chinese medicinal herb component databases (such as TCMSP, ETCM, etc.) and literature, each pharmacodynamic substance can be accurately matched with its original compound source, clarifying which specific Chinese medicinal herb in the prescription the active ingredient originates from.

[0093] Step S92: Based on the pharmacologically active substances in the prediction results, construct a pharmacologically active substance-target-disease action network, and based on molecular action intensity, target coverage and functional pathway enrichment information, quantify the influence factor of each pharmacologically active substance component in the overall therapeutic effect, and then calculate the functional weight of the pharmacologically active substance in the prescription.

[0094] Step S93: By introducing pharmacological and pharmacokinetic parameters, a component action mechanism model is constructed to analyze the synergistic effects and interaction potential of each pharmacodynamic component in vivo and in vitro.

[0095] Step S94: Construct a formulation optimization model based on an objective function; wherein the formulation optimization model aims to improve the overall efficacy score or a specific indicator.

[0096] Step S95: Based on the weights of the active ingredients in the prediction results, and based on the component action mechanism model and the formulation optimization model, iteratively search for the optimal combination of dosage and type of each medicinal material to obtain the small model optimized formula.

[0097] In practical applications, the following steps can be followed: First, by combining literature mining and experimental verification results, a pharmacodynamic substance-target-disease action network is constructed. Based on molecular action intensity, target coverage, and functional pathway enrichment information, the influence factor of each pharmacodynamic component in the overall efficacy is quantified, and then its "functional weight" in the prescription is calculated. Subsequently, pharmacological and pharmacokinetic parameters (such as half-life, Cmax, bioavailability, etc.) are introduced to comprehensively construct a component action mechanism model for analyzing the synergistic effects and interaction potential of each component in vivo and in vitro.

[0098] Building upon the above, a formulation optimization model based on an objective function is constructed to improve the overall efficacy score or specific indicators (such as anti-inflammatory and antioxidant capacity) as the optimization objective. This formulation optimization model encodes the dosage or retention / replacement status of each herb in the formulation as adjustable parameters. Using intelligent algorithms such as Genetic Algorithm (GA) or Particle Swarm Optimization (PSO), under conditions of dosage constraints, herb incompatibilities, and efficacy boundaries, iteratively searches for the optimal formulation combination to obtain a small-scale optimized prescription.

[0099] The above steps can transform the empirical compatibility problem of traditional Chinese medicine into a computable optimization problem. It has the characteristics of clear algorithm structure, clear goal orientation, and the ability to integrate prior constraints of knowledge graph, making it easy for those skilled in the art to implement and extend.

[0100] Preferably, step S10, which involves a comprehensive analysis of the optimized prescriptions based on the large model and the optimized prescriptions based on the small model, to generate the final optimized prescription recommendation, specifically includes the following steps: Step S101: Construct a model fusion and result evaluation mechanism. First, the optimized prescriptions of the large language model for prescription optimization and the small model for screening pharmacodynamic substances in the same task are generated in parallel and labeled for comparison, and an evaluation index system is set based on the task type. Second, in the fusion stage, a result selection mechanism or weighted voting strategy based on credibility scoring is introduced to optimize and integrate the outputs of the large language model for prescription optimization and the small model for screening pharmacodynamic substances in the same task, so as to obtain the model fusion output result.

[0101] In practical applications, after completing independent optimization analysis based on fine-tuning of the large language model and the small multi-task model, a model fusion and result evaluation mechanism can be further constructed. The specific steps are as follows: First, the output results of the two models on the same task dataset are generated in parallel and compared with labels. Second, an evaluation index system (such as accuracy, recall, and consistency score) is set based on the task type (e.g., drug efficacy component identification, indication classification, medication suggestion generation). Then, in the fusion stage, a result selection mechanism based on credibility scoring or a weighted voting strategy is introduced to optimize and integrate the outputs of the two models for the same problem, obtaining the fused model output result. Furthermore, the fusion rules can be iteratively optimized by incorporating expert review feedback, achieving complementary integration of the semantic understanding advantages of the large language model and the task accuracy advantages of the small model, ultimately resulting in a high-quality optimized output.

[0102] Step S102: Based on the model fusion output results, construct a multi-index quantitative system for formula optimization evaluation and obtain weighted scoring ranking results; wherein, each index in the multi-index quantitative system is mapped to a comparable value through a standardized function, and a weighted scoring mechanism is introduced to comprehensively evaluate the quality of the optimization scheme.

[0103] In practical applications, a multi-index quantitative system for formula optimization and evaluation can be constructed based on the model fusion output results. This system can cover multiple dimensions, including efficacy enhancement potential, biosafety, literature support, component rationality, and target fit. Each index is mapped to a comparable value through a standardized function, and a weighted scoring mechanism is introduced to comprehensively evaluate the quality of the optimization scheme. The index weights can be initialized through expert experience and dynamically learned and updated based on historical validation data using gradient adjustment strategies or Bayesian optimization algorithms, thereby constructing an adaptive weight configuration system that can adapt to task requirements.

[0104] Step S103: Based on the weighted scoring and ranking results, select the highest-ranked prescription combination to generate the final prescription optimization recommendation.

[0105] Specifically, based on the weighted scoring and ranking results, the system can automatically select the prescription combinations with the highest optimization potential, generating a "prescription optimization plan" that can be directly output. The large-scale model-based collaborative optimization method for traditional Chinese medicine prescriptions described in this embodiment first selects the prescription to be optimized, thereby collecting relevant literature and patents on the medicinal materials and indications of the prescription and organizing them into an input document; then, it processes the input document using semantic representation tools to construct a local prescription knowledge base; next, it uses the local prescription knowledge base to fine-tune the large-scale language model; finally, it optimizes the large-scale language model based on the fine-tuned prescription and conducts question-and-answer sessions, achieving intelligent optimization of the prescription at the large-scale model level. Meanwhile, the large and small model collaborative TCM prescription optimization method described in this embodiment also constructs a multi-task pharmacodynamic substance screening small model under efficacy guidance by identifying relevant pathway targets for the indications of the target prescription; then, it collects chemical substances in the prescription and constructs a standard dataset for predicting the pharmacodynamic effects of compounds; subsequently, it inputs the standard dataset into the multi-task small model to obtain prediction results at the pharmacodynamic substance level; then, it performs medicinal material traceability analysis on the prediction results and optimizes the prescription composition based on the weights of pharmacodynamic substances; finally, it generates the final prescription optimization recommendation by comprehensively analyzing the optimization results of the large language model and the small model.

[0106] Compared with existing technologies, the method described in this embodiment integrates key artificial intelligence technologies such as large language models, semantic representation tools, graph neural networks, and multi-task learning, constructing an efficient and novel method for optimizing the composition of traditional Chinese medicine (TCM) prescriptions from both macroscopic and microscopic levels. This optimization method achieves dual optimization of TCM prescriptions in terms of macroscopic knowledge reasoning and microscopic pharmacodynamic mechanisms, enhancing the scientific rigor and practicality of prescription design, meeting the requirements of precision medicine development, and promoting the modernization and intelligent development of TCM.

[0107] Example 2 Figure 2 This is a schematic diagram of the structure of the large-scale model-coordinated traditional Chinese medicine prescription optimization system described in Embodiment 2 of the present invention. Figure 2 A block diagram of an exemplary system suitable for implementing embodiments of the present invention is shown. Figure 2 The system shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention. Figure 2 As shown, this large-scale model-based collaborative optimization system for traditional Chinese medicine prescriptions includes: The prescription screening module 201 is used to identify prescriptions that need to be optimized.

[0108] The data integration module 202 is used to obtain relevant public literature on Chinese medicinal materials and indications for prescriptions that need to be optimized, and to organize the relevant public literature into an input document.

[0109] The knowledge base construction module 203 is used to process the input document using semantic representation tools and construct a local medicine knowledge base.

[0110] The model optimization module 204 is used to optimize the large language model by utilizing the local prescription knowledge base to obtain an optimized prescription large language model.

[0111] The intelligent question-answering optimization module 205 is used to perform question-answering based on the large language model of the prescription optimization, so as to obtain the large model optimized prescription.

[0112] The small model building module 206 is used to identify the relevant pathway targets for the indications in the prescription that need to be optimized, and to build a small model for screening multi-task pharmacodynamic substances under the guidance of efficacy.

[0113] The chemical substance collection module 207 is used to collect chemical substances in prescriptions that need to be optimized, and after data preprocessing, to build a standard dataset for predicting the efficacy of compounds in prescriptions.

[0114] The efficacy prediction module 208 is used to input the standard dataset into the trained multi-task pharmacological substance screening small model to obtain prediction results at the pharmacological substance level.

[0115] The prescription optimization module 209 is used to perform medicinal material traceability analysis on the prediction results and optimize the prescription composition based on the weight of the active ingredients to obtain a small model optimized prescription.

[0116] The comprehensive evaluation and recommendation module 210 is used to perform a comprehensive analysis based on the large model optimized prescription and the small model optimized prescription to generate the final prescription optimization recommendation.

[0117] The large-scale model-based collaborative traditional Chinese medicine prescription optimization system provided in this embodiment of the invention can execute the large-scale model-based collaborative traditional Chinese medicine prescription optimization method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0118] Example 3 Figure 3 This is a schematic diagram of the structure of a face forgery image detection terminal provided in Embodiment 3 of the present invention; Figure 3 A block diagram of an exemplary terminal system suitable for implementing embodiments of the present invention is shown. Figure 3 The terminal system shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0119] like Figure 3 As shown, terminal 12 is presented in the form of a general-purpose computing device. The components of terminal 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).

[0120] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0121] Terminal 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by terminal 12, including volatile and non-volatile media, removable and non-removable media.

[0122] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Terminal 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 3 Not shown; usually referred to as a "hard drive"). Although Figure 3 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0123] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.

[0124] Terminal 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with terminal 12, and / or with any device that enables terminal 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, terminal 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of terminal 12 via bus 18. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with terminal 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0125] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the size model-based collaborative optimization method for traditional Chinese medicine prescriptions provided in this embodiment of the invention.

[0126] Example 4 Embodiment 4 of the present invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform any of the size model-based collaborative traditional Chinese medicine prescription optimization methods provided in the above embodiments.

[0127] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0128] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0129] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0130] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0131] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A method for optimizing traditional Chinese medicine prescriptions using a large-scale model-based approach, characterized in that, include: Identify the prescriptions that need optimization; Obtain relevant publicly available literature on the medicinal materials and indications of the prescription that needs to be optimized, and compile the relevant publicly available literature into an input document; The input document is processed using semantic representation tools, and a local medicinal formula knowledge base is constructed. The large language model was optimized using the local prescription knowledge base to obtain an optimized prescription large language model. Question answering is performed based on the optimized large language model of the prescription to obtain the optimized prescription of the large model; Identify the relevant pathway targets for the indications in the prescription that need to be optimized, and construct a small model for screening multi-task pharmacodynamic substances under the guidance of efficacy. We collect chemical substances in prescriptions that need to be optimized, and after data preprocessing, we construct a standard dataset for predicting the efficacy of compounds in prescriptions. The standard dataset is input into the trained multi-task pharmacological substance screening small model to obtain prediction results at the pharmacological substance level. The predicted results are used for medicinal material traceability analysis, and the prescription composition is optimized based on the weight of active ingredients to obtain a small-model optimized prescription. Based on a comprehensive analysis of the large-model optimized prescriptions and the small-model optimized prescriptions, a final optimized prescription recommendation is generated.

2. The method according to claim 1, characterized in that, The process of determining the prescription that needs optimization includes: Using a large language model, a preliminary screening was conducted on classic prescriptions, hospital preparations, and commercially available Chinese herbal prescriptions to obtain a list of candidate prescriptions; Machine learning and artificial intelligence technologies are used to conduct intelligent analysis and verification of the traditional Chinese medicine prescriptions in the candidate prescription list. The focus is on whether the traditional Chinese medicine prescriptions in the candidate prescription list have systematic publicly available literature, data on the components of Chinese medicinal materials, clinical research data and relevant patent information, so as to ensure that the candidate prescription list has a research foundation and development potential.

3. The method according to claim 1, characterized in that, The process of using semantic representation tools to process the input document and construct a local medicine knowledge base includes: By integrating Chinese semantic embedding models with relevant domain prior knowledge such as pharmaceutical knowledge vocabularies and prescription structure templates, deep semantic representation and structured extraction are performed on the input document to identify key information related to prescription names, drug composition, dosage ratio, processing methods, efficacy and indications, clinical application cases and mechanisms of action in the text, and obtain text embedding vectors. Combining the text embedding vector, semantic encoding is performed on key paragraphs in relevant published documents, and entity recognition and rule template extraction technology is used to extract the core elements of traditional Chinese medicine prescriptions into structured fields to obtain structured data. Construct a local medicinal herb knowledge base, and store the structured data in the local medicinal herb knowledge base in a unified format; Monitor newly released relevant public documents and update and maintain the local medicinal herb knowledge base based on these documents to ensure its timeliness and accuracy.

4. The method according to claim 1, characterized in that, The process of optimizing the large language model using the local prescription knowledge base to obtain an optimized prescription large language model includes: Based on the characteristics and application requirements of the local medicinal formula knowledge base, the fine-tuning and optimization tasks are determined. The knowledge in the local traditional Chinese medicine knowledge base is used as training data, and the large language model is subjected to phased targeted fine-tuning and optimization according to the fine-tuning and optimization task to obtain a large language model for formula optimization that can adapt to the formula optimization task. The first phase of phased targeted fine-tuning and optimization uses a general pre-trained model for semantic adaptation training, enabling the large language model to learn the language style and terminology structure of traditional Chinese medicine texts. The second phase of phased targeted fine-tuning and optimization introduces task-specific labels and combines structured templates and traditional Chinese medicine knowledge graphs to guide the training of the large language model with instructions, so as to improve the ability of the large language model to express the implicit logic and structured knowledge in professional corpora.

5. The method according to claim 1, characterized in that, The process of identifying relevant pathway targets for the indications in the prescription that need to be optimized, and constructing a small-scale, efficacy-oriented multi-task screening model for pharmacodynamic substances, includes: To optimize the indications for prescriptions, we conducted multi-dimensional data integration and knowledge extraction, and sorted out the signaling pathways and target information related to the indications. Based on the signaling pathways and target information related to the indications, a multi-task pharmacodynamic substance prediction dataset with efficacy orientation as the core is constructed; wherein, each task in the multi-task pharmacodynamic substance prediction dataset corresponds to an efficacy label, and the structural features of the medicinal material components and their interaction information with the target are used as input features; A multi-task neural network model is trained using the multi-task pharmacological substance prediction dataset to obtain a trained multi-task pharmacological substance screening small model.

6. The method according to claim 1, characterized in that, The step of performing medicinal material traceability analysis on the prediction results and optimizing the prescription composition based on the weights of pharmacodynamic substances to obtain a small-model optimized prescription includes: By using source tracing analysis technology, the source of the active ingredients in the predicted results is traced to determine their corresponding medicinal materials; Based on the pharmacologically active substances in the predicted results, a pharmacologically active substance-target-disease action network is constructed. Based on molecular action intensity, target coverage and functional pathway enrichment information, the influence factor of each pharmacologically active substance component in the overall efficacy is quantified, and then the functional weight of the pharmacologically active substance in the prescription is calculated. By introducing pharmacological and pharmacokinetic parameters, a component action mechanism model is constructed to analyze the synergistic effects and interaction potential of each pharmacodynamic component in vivo and in vitro. Construct a formulation optimization model based on an objective function; wherein the formulation optimization model aims to improve the overall efficacy score or a specific indicator. Based on the weights of the active ingredients in the predicted results, and using the component action mechanism model and the formulation optimization model, the optimal combination of dosage and type of each medicinal material is iteratively searched to obtain the optimized formula of the small model.

7. The method according to claim 1, characterized in that, The process of comprehensively analyzing the optimized prescriptions based on the large model and the optimized prescriptions based on the small model to generate the final optimized prescription recommendation includes: A model fusion and result evaluation mechanism is constructed. First, the optimized prescriptions of the large language model for prescription optimization and the small model for screening pharmacodynamic substances in the same task are generated in parallel and labeled for comparison, and an evaluation index system is set based on the task type. Second, in the fusion stage, a result selection mechanism based on credibility scoring or a weighted voting strategy is introduced to optimize and integrate the outputs of the large language model for prescription optimization and the small model for screening pharmacodynamic substances in the same task to obtain the model fusion output result. Based on the model fusion output, a multi-index quantitative system for prescription optimization evaluation is constructed, and a weighted scoring ranking result is obtained; wherein, each index in the multi-index quantitative system is mapped to a comparable value through a standardized function, and a weighted scoring mechanism is introduced to comprehensively evaluate the quality of the optimization scheme; Based on the weighted scoring and ranking results, the highest-ranked prescription combination is selected to generate the final prescription optimization recommendation.

8. A large-scale model-based collaborative optimization system for traditional Chinese medicine prescriptions, characterized in that, include: The prescription screening module is used to identify prescriptions that need to be optimized. The data integration module is used to obtain relevant public literature on Chinese medicinal materials and indications for prescriptions that need to be optimized, and to organize the relevant public literature into an input document. The knowledge base construction module is used to process the input documents using semantic representation tools and construct a local medicine knowledge base. The model optimization module utilizes the local prescription knowledge base to optimize the large language model, resulting in an optimized prescription large language model. The intelligent question-answering optimization module is used to perform question-answering based on the large language model of the prescription to obtain the large model optimized prescription; The small model building module is used to identify the relevant pathway targets in the prescriptions that need to be optimized for their indications, and to build a small model for screening multi-task pharmacodynamic substances under the guidance of efficacy. The chemical substance collection module is used to collect chemical substances in prescriptions that need to be optimized, and after data preprocessing, to build a standard dataset for predicting the efficacy of compounds in prescriptions. The efficacy prediction module is used to input the standard dataset into the trained multi-task pharmacological substance screening small model to obtain prediction results at the pharmacological substance level. The prescription optimization module is used to perform medicinal material traceability analysis on the prediction results and optimize the prescription composition based on the weight of the active ingredients to obtain a small model optimized prescription. The comprehensive evaluation and recommendation module is used to perform a comprehensive analysis based on the large model optimized prescription and the small model optimized prescription to generate the final prescription optimization recommendation.

9. A terminal, characterized in that, include: One or more processors; Storage device for storing one or more programs; A monitor is used to display the results; When the one or more programs are executed by the one or more processors, the one or more processors implement the size model collaborative traditional Chinese medicine prescription optimization method as described in any one of claims 1-7.

10. A storage medium containing computer-executable instructions, characterized in that: The computer-executable instructions, when executed by a computer processor, are used to perform the method for optimizing traditional Chinese medicine prescriptions using a large-scale model as described in any one of claims 1-7.

Citation Information

Cited By

  • Traditional Chinese medicine identification method and system based on large model, electronic equipment and storage medium

    CN121306603A

  • Component analysis method and system for kidney-tonifying essence-strengthening compound

    CN122337382A