Traditional Chinese medicine intelligent prescription generation method, device and electronic equipment

CN122290906APending Publication Date: 2026-06-26RUI MEDICAL CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
RUI MEDICAL CO LTD
Filing Date
2026-04-21
Publication Date
2026-06-26

Smart Images

  • Figure CN122290906A_ABST
    Figure CN122290906A_ABST
Patent Text Reader

Abstract

This invention provides a method, device, and electronic device for generating intelligent prescriptions in traditional Chinese medicine (TCM), relating to the field of smart healthcare technology. The method includes: acquiring multimodal data of a target patient, including text data, visual data, and physiological signal data; determining dynamic adaptation factors based on the multimodal data to suit the patient's constitution, disease course, environment, and temporal changes in their condition, with these dynamic adaptation factors characterizing the prescription's adjustment intensity; and generating a target TCM prescription for the target patient based on the multimodal data and the dynamic adaptation factors. By introducing dynamic adaptation factors, the generated prescription can adapt to changes in the patient's constitution, disease course, environment, and temporal changes in their condition, thereby achieving dynamic and personalized prescription generation and improving the accuracy of prescription generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart healthcare technology, and in particular to a method, apparatus, and electronic device for generating intelligent prescriptions for traditional Chinese medicine. Background Technology

[0002] Traditional Chinese medicine (TCM) prescriptions are the ultimate embodiment of the principles of syndrome differentiation and treatment. Their generation process integrates the physician's comprehensive judgment of information from the four diagnostic methods (inspection, auscultation, palpation, and olfaction) with a profound understanding of the properties and compatibility rules of Chinese herbs. With the deepening application of artificial intelligence technology in the medical field, how to utilize intelligent methods to achieve automatic prescription generation has become an important research direction.

[0003] Existing TCM prescription generation schemes typically use fixed templates or static statistical models, which generally suffer from the problem of static and rigid prescriptions. When faced with complex and ever-changing diagnosis and treatment scenarios in the real world, the prescriptions they output have significant limitations in terms of targeting and adaptability. Summary of the Invention

[0004] The purpose of this invention is to provide a method, device, and electronic device for generating intelligent prescriptions in traditional Chinese medicine, so as to realize the dynamic and personalized generation of prescriptions and improve the accuracy of prescription generation.

[0005] In a first aspect, the present invention provides a method for generating intelligent prescriptions for traditional Chinese medicine, comprising: Acquire multimodal data of the target diagnostic and treatment subjects, including text data, visual data, and physiological signal data; Based on multimodal data, dynamic adaptation factors are determined to match the physical condition, disease course, environment, and temporal changes of the disease in the target treatment subjects. These dynamic adaptation factors are used to characterize the intensity of prescription adjustment. Based on multimodal data and dynamic adaptation factors, a target traditional Chinese medicine prescription is generated for the target diagnosis and treatment subject.

[0006] In an optional implementation, dynamic adaptation factors are determined based on multimodal data to fit the target patient's physical condition, disease course, environment, and temporal changes in their condition, including: Extract physical condition information, disease course information, environmental information, and temporal changes in disease status from multimodal data; Based on physical condition information, disease course information, environmental information, and disease progression information, determine the physical condition coefficient, disease course coefficient, regional climate coefficient, and daily variation of disease course; The dynamic adaptation factor is obtained by weighted summation of the physical fitness coefficient, disease duration coefficient, regional climate coefficient, and daily variation of disease duration.

[0007] In an optional implementation, the text data includes contraindication information; based on multimodal data and dynamic adaptation factors, a target traditional Chinese medicine prescription is generated for the target patient, including: Based on the contraindication information, a safety factor characterizing the risk of medication is calculated; Based on multimodal data, safety factor, and dynamic adaptation factor, a target traditional Chinese medicine prescription is generated.

[0008] In an optional implementation, a safety factor characterizing the risk of medication is calculated based on contraindication information, including: Based on contraindication information, determine the risks of allergies, liver and kidney function, toxicity of traditional Chinese medicine, and contraindications to pregnancy. The safety factor was calculated based on the risks of allergies, liver and kidney function, toxicity of traditional Chinese medicine, and contraindications during pregnancy.

[0009] In an optional implementation, a target traditional Chinese medicine prescription is generated based on multimodal data, a safety factor, and a dynamic adaptation factor, including: Multimodal data is preprocessed and features are extracted to obtain multimodal collaborative features; The multimodal collaborative features and the intermediate vector of TCM syndrome differentiation generated based on the TCM knowledge graph are fused to obtain the global fused features; Traditional Chinese medicines are screened based on global fusion characteristics, dynamic adaptation factors, and safety coefficients to obtain a target set of traditional Chinese medicines. Based on the dynamic adaptation factor and safety factor, the dosage of each Chinese herb in the target set of Chinese herbal medicines is calculated to obtain the candidate Chinese herbal medicine prescription. The candidate Chinese medicine prescriptions are subject to security verification, and the candidate Chinese medicine prescriptions that pass the verification are determined as the target Chinese medicine prescriptions.

[0010] In an optional implementation, the multimodal collaborative features include text features, tongue visual features, and pulse diagnosis physiological signal features; feature fusion includes: weighted fusion of each modal feature and its corresponding modal stability coefficient in the multimodal collaborative features with the intermediate vector of traditional Chinese medicine syndrome differentiation; wherein, the modal stability coefficient is dynamically determined based on the signal-to-noise ratio or quality assessment value of the corresponding modal data; The screening of traditional Chinese medicines includes: for each candidate traditional Chinese medicine, based on global fusion features, dynamic adaptation factors and safety coefficients, combined with the herb-syndrome compatibility of the candidate traditional Chinese medicine and its priority in the prescription, calculating its probability of being included in the target set of traditional Chinese medicines; Dosage calculation includes: for each herb in the target set of Chinese medicines, the final dosage is calculated based on its pharmacopoeia baseline dose, dynamic adaptation factor, safety factor and symptom severity score of the target patient, combined with the mildness of the herb's medicinal properties. Safety verification includes pharmaceuticals Drug contraindication verification, drug-human contraindication verification, and dosage compliance verification.

[0011] In an optional implementation, the method for generating intelligent prescriptions for traditional Chinese medicine further includes: Obtain efficacy feedback data for the target traditional Chinese medicine prescription; Based on efficacy feedback data and preset parameter update formulas, the parameters involved in the TCM intelligent prescription generation method are optimized; among them, the parameter update formulas include efficacy feedback error, compatibility rationality loss and safety contraindication loss.

[0012] Secondly, the present invention provides a traditional Chinese medicine intelligent prescription generation device, comprising: The acquisition module is used to acquire multimodal data of the target diagnostic and treatment object. The multimodal data includes text data, visual data, and physiological signal data. The determination module is used to determine dynamic adaptation factors based on multimodal data to adapt to the physical condition, disease course, environment and temporal changes of the disease in the target diagnosis and treatment object. The dynamic adaptation factors are used to characterize the prescription adjustment intensity. The generation module is used to generate target traditional Chinese medicine prescriptions for target patients based on multimodal data and dynamic adaptation factors.

[0013] Thirdly, the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the traditional Chinese medicine intelligent prescription generation method of any of the foregoing embodiments.

[0014] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program, when run by a processor, executes the traditional Chinese medicine intelligent prescription generation method of any of the foregoing embodiments.

[0015] The present invention provides a method, apparatus, and electronic device for generating intelligent prescriptions for traditional Chinese medicine (TCM). These devices can acquire multimodal data of the target patient, including text data, visual data, and physiological signal data. Based on the multimodal data, dynamic adaptation factors are determined to suit the patient's constitution, disease course, environment, and temporal changes in their condition. These dynamic adaptation factors characterize the prescription's adjustment intensity. Based on the multimodal data and the dynamic adaptation factors, a target TCM prescription is generated for the target patient. By introducing dynamic adaptation factors, the generated prescription can adapt to changes in the patient's constitution, disease course, environment, and temporal changes in their condition, thereby achieving dynamic and personalized prescription generation and improving the accuracy of prescription generation. Attached Figure Description

[0016] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0017] Figure 1 A flowchart illustrating a method for generating intelligent prescriptions for traditional Chinese medicine, provided in an embodiment of the present invention; Figure 2 A flowchart illustrating another method for generating intelligent prescriptions in traditional Chinese medicine provided in an embodiment of the present invention; Figure 3 A flowchart illustrating another method for generating intelligent prescriptions for traditional Chinese medicine provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a traditional Chinese medicine intelligent prescription generation device provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0018] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] Research has revealed five core flaws in existing traditional Chinese medicine prescription generation technologies, which limit their clinical applicability, safety, and level of intelligence: 1. Limited data dimensions: Existing solutions mainly rely on textual descriptions of symptoms, while neglecting key diagnostic criteria such as tongue appearance (visual information), pulse diagnosis (waveform signals), and other physiological indicators. This single data input mode cannot comprehensively and objectively reflect the overall condition of the patient, resulting in incomplete information collection and insufficient diagnostic basis.

[0020] 2. Static and fixed prescription generation: Prescriptions (including drug compatibility and dosage) generated by existing systems are usually based on fixed rules or static data models, and the output results present a fixed pattern; prescriptions cannot be dynamically adjusted in real time according to key variables such as individual patient differences, different stages of disease, and regional climate environment.

[0021] 3. Superficial integration with TCM theory, with logical inconsistencies: Existing AI-based methods often operate as a "black box" in their model decision-making process, with their integration with fundamental TCM theories (such as the properties and meridians of TCM, the principles of monarch-minister-assistant-guide drug pairing, and the eighteen incompatibilities and nineteen taboos) remaining superficial. This can easily lead to prescriptions that may be statistically effective but contain contradictions or inconsistencies in TCM theoretical logic, such as violating core drug pairing contraindications or having incompatible drug functions, thus reducing the theoretical credibility and clinical acceptability of the prescriptions.

[0022] 4. Lack of closed-loop system and self-iterative optimization capability: Most existing technologies are open-loop systems, with only a one-way flow of "symptom input → prescription output". The system cannot continuously optimize and iterate its generation model based on the efficacy data fed back after the prescription is applied in real clinical practice; this results in the accuracy and adaptability of the system being locked after deployment, and it is impossible to accumulate experience through actual use and achieve self-evolution and accuracy improvement.

[0023] 5. Lagging safety risk control mechanisms pose potential medication risks: Existing solutions typically place medication safety checks (such as drug interactions, patient allergy history, and contraindications due to special physiological conditions) after prescription generation, as an independent post-processing or review stage; this "generate first, verify later" post-risk control model fails to mitigate risks from the source of system design.

[0024] Based on this, the present invention provides a method, device, and electronic device for generating intelligent prescriptions for traditional Chinese medicine. It adopts a multimodal collaborative and hierarchical dynamic adaptation approach to achieve intelligent multimodal four-diagnosis consultation and improve the comprehensiveness of diagnosis; it constructs hierarchical dynamic adaptation to realize one prescription per person, one prescription per time, and one prescription per place; it deeply integrates traditional Chinese medicine theory with the intermediate vector of traditional Chinese medicine syndrome differentiation to ensure reasonable prescription; it establishes an autonomous iterative closed loop so that the system becomes more accurate with use; and it adopts a pre-emptive safety risk control to avoid contraindications, allergies, and toxicity risks from the source.

[0025] The embodiments of this invention integrate multi-dimensional medical data and combine traditional Chinese medicine theory. It has the capabilities of hierarchical dynamic adaptation, forward security risk control and autonomous iterative optimization, and can be applied to primary medical institutions, intelligent diagnosis and treatment platforms and family health management terminals.

[0026] The key terms involved in the embodiments of this invention are explained as follows: 1. Multi-modal Collaborative Feature (MCF): A unified high-dimensional feature of text, tongue image, and physiological indicators such as pulse diagnosis after preprocessing; 2. Layered Dynamic Adaptation Factor (LDAF): A dynamic adaptation factor calculated by stratifying constitution, disease course, and environment, used to dynamically adjust the core parameters of the prescription; 3. Traditional Chinese Medicine Intermediate Vector (TCM) IV): Vectorized results of knowledge graphs serve as a logical intermediary between data and prescriptions; 4. Pre-Security Check Coefficient (PSCC): Also known as the safety coefficient, it is a risk correction coefficient for allergies / liver and kidney function / toxicity calculated in advance; 5. Autonomous Efficacy Learning (AEL): Efficacy feedback → self-evolutionary mechanism for automatic model optimization; 6. Global fusion features ( F global ): The total feature vector after fusing multimodal collaborative features and TCM syndrome differentiation intermediate vector; 7. Symptom severity score ( S level ): Indicators that quantify the severity of symptoms in patients undergoing diagnosis and treatment.

[0027] To facilitate understanding of this embodiment, a detailed description of a traditional Chinese medicine intelligent prescription generation method disclosed in this embodiment of the invention will be provided first.

[0028] This invention provides a method for generating intelligent prescriptions for traditional Chinese medicine, which can be executed by an electronic device with data processing capabilities. See also... Figure 1 The diagram shows a flowchart of a method for generating intelligent prescriptions for traditional Chinese medicine. The method mainly includes the following steps S110 to S130: Step S110: Obtain multimodal data of the target patient.

[0029] The target patients mentioned above can be people or animals requiring traditional Chinese medicine treatment. To achieve a comprehensive and multi-dimensional understanding of the patients' health status, this embodiment collects heterogeneous multimodal data from multiple complementary dimensions. Specifically, the multimodal data includes text data, visual data, and physiological signal data.

[0030] For example, the aforementioned text data can be structured / unstructured information obtained through doctor-patient interaction interfaces, electronic medical record systems, or consultation records, including the patient's chief complaint, present medical history, past medical history, and symptom description. For instance, the patient's chief complaint might be "fever, cough, yellow phlegm, and yellow greasy tongue coating."

[0031] For example, the aforementioned visual data can be images or videos acquired through image acquisition devices that reflect information from traditional Chinese medicine's "inspection" method, including images of the tongue and facial complexion. Among these, the tongue image contains information from multiple dimensions, such as tongue color, tongue coating, and petechiae, and is an important basis for determining key syndrome types such as cold / heat, deficiency / excess, and dampness / dryness in the patient. For instance, a tongue image showing a red tongue with little coating.

[0032] For example, the aforementioned physiological signal data can be signals that reflect the physiological state of the human body, collected by sensor devices, including pulse diagnosis signals (i.e., pulse waveforms), electrocardiogram signals, heart rate, respiratory rate, blood pressure signals, blood glucose, etc. Among them, pulse diagnosis signals are the core of traditional Chinese medicine's "palpation diagnosis," and their waveform characteristics are closely related to the syndrome of the patient being diagnosed. For example, the pulse diagnosis signal is thin and rapid; the blood pressure is 135 / 85 mmHg.

[0033] It can be explained that by collecting the above three types of data, this embodiment has achieved comprehensive digitization of the "inquiry" (text), "inspection" (visual), and "palpation" (physiological signals) information of the patient, laying a data foundation for subsequent intelligent decision-making based on the "four diagnostic methods".

[0034] Step S120: Based on multimodal data, determine the dynamic adaptation factors that adapt to the physical condition, disease course, environment, and temporal changes of the disease in the target patient.

[0035] The aforementioned dynamic adaptation factor is a quantitative parameter used to characterize the strength of prescription adjustment based on the individual state of the patient. This step aims to extract four key dynamic dimensions influencing prescriptions from multimodal data and calculate this dynamic adaptation factor.

[0036] In some possible embodiments, the aforementioned dynamic adaptation factor can be obtained by stratifying physical condition, disease course, and environment. Based on this, step S120 may include: extracting physical condition information, disease course information, environmental information, and disease progression information from multimodal data; determining physical condition coefficient, disease course coefficient, regional climate coefficient, and daily disease course variation based on the physical condition information, disease course information, environmental information, and disease course variation information; and performing a weighted summation of the physical condition coefficient, disease course coefficient, regional climate coefficient, and daily disease course variation to obtain the dynamic adaptation factor.

[0037] Specifically, the process begins by extracting constitution information, disease course information, environmental information, and temporal changes in disease progression from multimodal data. Constitution information can be determined based on the patient's constitution identification results; for example, a "Yin deficiency constitution" can be determined from symptom descriptions and tongue appearance. Disease course information refers to the current stage of the disease, such as "acute phase" or "recovery phase," which can be inferred from the duration of illness and symptom evolution in the text data. Environmental information mainly refers to the climate of the patient's location, which can be obtained by combining geographical location data from medical records or automatically acquired by the system. Temporal changes in disease progression can be obtained by comparing recent (e.g., yesterday vs. today) changes in the patient's physiological signals (e.g., pulse waveform changes) or symptom descriptions.

[0038] Subsequently, based on the extracted information, the corresponding quantification coefficients are determined. Based on preset mapping rules or calculation models, constitution information, disease course information, and environmental information can be converted into constitution coefficients, disease course coefficients, and regional climate coefficients, respectively. For example, a Yin deficiency constitution can correspond to a coefficient greater than 1 (e.g., 1.08), indicating the need for nourishing Yin and clearing heat; the acute phase can correspond to another coefficient (e.g., 1.2), indicating the need for increased heat-clearing efforts; and the damp-heat of southern China can correspond to a coefficient greater than 1 (e.g., 1.05). The temporal changes in the disease course can be quantified as a positive or negative daily variation in the disease course, reflecting the trend of worsening or improvement in the condition.

[0039] Finally, the three quantification coefficients and the daily variation in disease duration are weighted and summed to obtain the dynamic fitting factor. For example, the formula for calculating the dynamic fitting factor can be: ; in, LDAF This represents the dynamic adaptation factor, which can range from 0.75 to 1.25. C const This represents the body mass index, which can range from 0.9 to 1.1. C course This represents the disease duration coefficient, which can range from 0.8 to 1.2. C env This represents the regional climate coefficient, and its value can range from 0.85 to 1.15. △T This represents the daily variation in the course of the disease, and its value can range from -0.1 to +0.1. oh 1. oh 2. oh 3 represents the weights of the three quantification coefficients. These can be fixed values ​​set based on clinical experience, or initial values ​​set based on clinical experience. For example, the initial values ​​could be... oh 1 = 0.45 oh 2 = 0.35, oh 1 = 0.2, and will be optimized and updated based on feedback data on treatment efficacy. xThe time-series weights corresponding to the daily changes in the course of the disease can be fixed values ​​or optimized and updated. For example, x 0.02 can be used.

[0040] For example, if the Yin deficiency constitution corresponds to C const =1.08, corresponding to the recovery period C course =1.0, corresponding to the humid and hot climate in the south C env =1.05, ΔT =0.03, the weight of the quantization coefficient takes the initial value, then LDAF =0.45×1.08+0.35×1.0+0.2×1.05+0.02×0.03=1.0526.

[0041] It should be noted that in the calculation of dynamic adaptation factors, the strength of prescription adjustment is jointly determined by physical condition, disease course, environmental and temporal changes. Furthermore, by increasing the daily variation in disease course ΔT, it can adapt to the daily changes in the condition. The calculation of dynamic adaptation factors transforms the prescription generation process from a static mapping into an intelligent process that can dynamically adjust according to the individual's condition (physical condition), disease development (disease course), external environment (regional climate), and daily changes (temporal sequence). This provides a core technical means for achieving precise and personalized diagnosis and treatment that is tailored to each individual, time, and location.

[0042] Step S130: Generate a target traditional Chinese medicine prescription for the target patient based on multimodal data and dynamic adaptation factors.

[0043] After obtaining comprehensive information about the patient (multimodal data) and personalized adjustment instructions (dynamic adaptation factors), this step combines the two to generate the final traditional Chinese medicine (TCM) prescription. In some possible embodiments, the features corresponding to the multimodal data and the dynamic adaptation factors can be input into a trained prescription generation model (e.g., a deep neural network). The prescription generation model uses the dynamic adaptation factors to calculate the inclusion probability of each TCM herb in the knowledge base and performs dosage calculations, ultimately outputting a complete candidate TCM prescription. After security verification, this candidate TCM prescription can be used as the final target TCM prescription. If the security verification fails, the prescription generation model can be used again to regenerate the candidate TCM prescription.

[0044] For example, suppose a patient with "Yin deficiency constitution, in the recovery phase of illness, located in the south, and whose symptoms have recently improved" is given a calculated dynamic adaptation factor of a specific value (e.g., close to 1.1). When generating a prescription, this dynamic adaptation factor will appropriately increase the inclusion probability and recommended dosage of traditional Chinese medicines with "Yin-nourishing" effects (such as Ophiopogon japonicus and Adenophora stricta), while the use of "warming and drying" drugs will be more cautious, and the dosage may be reduced, ultimately generating a targeted prescription adapted to the patient's current condition.

[0045] In this embodiment of the invention, the method introduces a dynamic adaptation factor based on multimodal data calculation to systematically quantify and integrate the core dynamic factors affecting prescription generation (constitution, disease course, environment, and temporal changes), and uses them as direct regulatory inputs to the prescription generation model. This makes the generated prescription no longer fixed, but rather a dynamic result that can systematically and automatically respond to individual differences in the patient, disease development, external environment, and daily changes in the patient's condition. Therefore, this method fundamentally overcomes the shortcomings of existing technologies where prescriptions are static and lack personalized adaptation, realizing a shift from a "one prescription for everyone" to an "one prescription for each person, dynamically adjusted" intelligent treatment paradigm, significantly improving the accuracy, adaptability, and clinical value of TCM prescription generation.

[0046] Considering the lagging safety risk control mechanisms in existing technologies and the potential medication risks, this embodiment introduces and calculates a safety coefficient for quantifying and mitigating medication risks. This safety coefficient is then combined with a dynamic adaptation factor to jointly influence the prescription generation process, thereby achieving personalized dynamic adaptation while proactively ensuring the safety of clinical medication. See also Figure 2 The flowchart shown is another method for generating intelligent prescriptions for traditional Chinese medicine. This method includes the following steps S210 to S240: Step S210: Obtain multimodal data of the target patient. The multimodal data includes text data, visual data, and physiological signal data. The text data includes contraindication information.

[0047] To enable a systematic assessment of medication risks, the text data in this embodiment includes contraindication information that constrains prescription generation. Specifically, contraindication information can be derived from the target patient's medical records, allergy history questionnaires, and past medical history.

[0048] Given that contraindication information is usually in unstructured text form, natural language processing techniques, such as named entity recognition and relation extraction, can be used to automatically extract structured information related to medication risks from the text data to facilitate subsequent processing. For example, from the medical record text "The patient has a history of penicillin allergy and mild liver function abnormalities," the key contraindication entities "allergen: penicillin" and "liver and kidney function status: abnormal" and their attributes can be extracted.

[0049] For example, the extraction of contraindication information can form a structured tag library, which includes, but is not limited to, the following dimensions: allergy history (such as penicillin, cephalosporins, certain types of traditional Chinese medicine), liver and kidney function status (such as normal, mild damage, severe failure), special toxicity of traditional Chinese medicine (such as drugs containing aristolochic acid, aconitine, etc.), and special physiological status (such as pregnancy, lactation).

[0050] Step S220: Based on multimodal data, determine the dynamic adaptation factors that adapt to the physical condition, disease course, environment, and temporal changes of the disease in the target patient.

[0051] Step S230: Calculate the safety coefficient representing the risk of medication use based on the contraindication information.

[0052] After obtaining structured contraindication information, the core task of this step is to quantify these discrete risk points into a unified, calculable parameter, namely, the safety factor. This safety factor will serve as a proactive, preemptive mitigation factor to avoid risks in subsequent prescription generation.

[0053] In some possible embodiments, step S230 above may include: determining the risks of allergy, liver and kidney function, traditional Chinese medicine toxicity, and pregnancy contraindication based on contraindication information; and calculating a safety factor based on the risks of allergy, liver and kidney function, traditional Chinese medicine toxicity, and pregnancy contraindication.

[0054] Specifically, the first step is to assess and assign values ​​to various risks in the contraindication information. Optionally, a risk quantification model can be set: if the patient has a clear history of allergy to a certain type of traditional Chinese medicine, the corresponding allergy risk value is set to 1.0; if the patient has mild liver function abnormalities, the liver and kidney function risk value can be set to 0.5; for pregnant patients, the pregnancy contraindication risk value is set to 1.0; for the toxicity risk of the traditional Chinese medicine itself, corresponding risk values ​​can be assigned according to the toxicity level (such as highly toxic, toxic, and slightly toxic) marked in the pharmacopoeia or knowledge graph.

[0055] Then, based on these risk values, a safety factor is calculated using a preset formula. An example safety factor calculation formula could be: ; in, PSCCThis represents the safety factor, which can range from 0.85 to 1.0. R allergy This indicates the risk of allergies, and its value can range from 0 to 1. R health This indicates the risk of liver and kidney function, and its value can range from 0 to 1. R tox This indicates the toxicity risk of traditional Chinese medicine, and its value can range from 0 to 1. R preg This indicates the risk of pregnancy contraindication, with values ​​ranging from 0 to 1; the weight of each risk. d , e , g , or 1. Used to balance the severity of different risk types, it can be a fixed value set based on clinical experience, or an initial value set based on clinical experience. For example, the initial value could be... d =0.05, e =0.05, g =0.04, or The initial value was 1 = 0.04, and it will be optimized and updated based on efficacy feedback data. The smaller the calculated safety coefficient, the higher the overall medication risk, and stronger constraints should be applied in subsequent prescription generation.

[0056] For example, if there is no allergy R allergy =0; normal liver function R health =0; No poison R tox =0; Non-pregnant R preg =0, then PSCC =1.0.

[0057] The aforementioned safety factor is used to suppress risks before prescription generation, thus achieving safety in advance; furthermore, the calculation of the safety factor includes the risk of pregnancy contraindications (Rpreg), covering more safety dimensions.

[0058] Step S240: Generate the target traditional Chinese medicine prescription based on multimodal data, safety factor and dynamic adaptation factor.

[0059] After obtaining the two key regulatory parameters, dynamic adaptation factor and safety coefficient, this step combines them with multimodal data reflecting the comprehensive syndrome of the patient and inputs them into the trained prescription generation model to generate candidate Chinese medicine prescriptions that are both personalized and safe, thereby obtaining the final target Chinese medicine prescription.

[0060] Specifically, the processing logic inside the prescription generation model (such as a deep neural network) is that when calculating the probability of each candidate Chinese medicine being selected, it not only considers the degree of matching with the syndrome, but is also simultaneously modulated by dynamic adaptation factors and safety coefficients.

[0061] This can be explained by the fact that the aforementioned dynamic adaptation factors primarily adjust positively or negatively from the perspective of "how to be more effective" (e.g., increasing the weight of warming yang herbs for patients with yang deficiency), while the safety factor negatively inhibits from the perspective of "how to be safer" (e.g., significantly reducing or directly excluding the weight of traditional Chinese medicines with liver damage risk for patients with liver dysfunction). The role of the safety factor is proactive and preventative; it reduces the likelihood of high-risk drugs being selected at the source of model decision-making, rather than intercepting them ex-post after prescription generation.

[0062] Let's assume a patient with a "Yang deficiency constitution, chronic disease stage, and history of liver damage" is being considered for calculation. The dynamic adaptor factor might be a value greater than 1 (e.g., 1.1), tending to increase the dosage of warming and tonifying drugs. However, the safety factor will be significantly reduced due to the "history of liver damage" (e.g., 0.85). When the prescription generation model screens drugs, for those drugs that can warm Yang but may increase the burden on the liver (such as certain warming and drying drugs that require large amounts of liver metabolism), their selection probability will be simultaneously slightly increased by the dynamic adaptor factor and strongly suppressed by the safety factor, ultimately resulting in their rejection or selection at only a very low dose. For drugs that can both warm Yang and are relatively safe for the liver, their selection probability and dosage are mainly regulated by the dynamic adaptor factor.

[0063] It should be noted that the parts not described in detail in steps S210 to S240 above can be referred to the corresponding content in the foregoing embodiments. Furthermore, there is no specific execution order between steps S220 and S230; they can be executed in a predetermined order (e.g., ...). Figure 2 (The order in which they are executed) can also be parallelized.

[0064] In this embodiment of the invention, by adding the extraction and quantification of contraindication information to the prescription generation process and calculating a pre-emptive safety coefficient, the method achieves a fundamental shift in safety risk control from "post-event inspection" to "pre-event regulation." The safety coefficient and dynamic adaptation factor work synergistically in the prescription generation model, jointly constituting a dual decision-making logic of "efficacy-driven" and "safety-constrained." This not only inherits the highly personalized advantages brought by dynamic adaptation but also constructs an additional proactive and quantifiable safety barrier. Thus, while ensuring that the prescription accurately adapts to the dynamic individual state of the patient, it systematically avoids potential medication risks caused by factors such as allergy history, underlying diseases, and drug toxicity from the source of decision-making, significantly improving the clinical safety and reliability of the intelligent prescription generation system and providing a key safety guarantee mechanism for the in-depth application of artificial intelligence in the serious medical field.

[0065] Considering the superficial integration of existing technologies with Traditional Chinese Medicine (TCM) theory, logical inconsistencies, lack of system closed-loop mechanisms, and insufficient autonomous iterative optimization capabilities, this embodiment further deepens and improves upon the aforementioned embodiments. This embodiment details how to generate global fusion features from multimodal data, how to utilize these global fusion features, dynamic adaptation factors, and safety coefficients to generate specific prescriptions, how to perform multi-dimensional safety verification on the prescriptions, and ultimately, how to achieve autonomous iterative optimization of the system based on efficacy feedback, thereby forming a complete intelligent diagnosis and treatment closed loop from perception to decision-making, and then to verification and evolution. See also... Figure 3 The diagram shows another method for generating intelligent prescriptions in traditional Chinese medicine, which includes the following steps S310 to S390: Step S310: Obtain multimodal data of the target patient. The multimodal data includes text data, visual data, and physiological signal data. The text data includes contraindication information.

[0066] Step S320: Based on multimodal data, determine the dynamic adaptation factors that adapt to the physical condition, disease course, environment, and temporal changes of the disease in the target patient.

[0067] Step S330: Calculate the safety coefficient representing the risk of medication based on the contraindication information.

[0068] Step S340: Preprocess and extract features from the multimodal data to obtain multimodal collaborative features.

[0069] After acquiring multimodal raw data containing text, visual, and physiological signals, the core task of this step is to denoise, standardize, and extract deep features from this heterogeneous data, transforming it into high-dimensional feature vectors that the model can understand and compute.

[0070] Specifically, preprocessing and feature extraction employ specialized techniques for different modalities of data. For textual data (such as the patient's chief complaint and medical history), preprocessing may include word segmentation and stop word removal. Feature extraction can use the output of a certain layer of a pre-trained language model as a semantic feature vector, which can capture the deep semantic information of the symptom description. Optionally, Traditional Chinese Medicine BERT (Bidirectional Encoder Representations from Transformers) can be used to extract syndrome keyword vectors. For example, the chief complaint "fever, cough, yellow phlegm" can generate a 768-dimensional dense vector after processing by the BERT model, which encodes key semantics such as "heat syndrome" and "pulmonary diseases".

[0071] For visual data (such as tongue images), preprocessing can include image normalization and tongue region cropping, while feature extraction can employ convolutional neural networks (CNNs). Optionally, a lightweight CNN can be used to extract color and texture features from the tongue image. For example, using a ResNet model pre-trained on ImageNet, after removing its fully connected layers, the tongue image can be input into the network to extract the feature map of the last convolutional layer or obtain a fixed-length visual feature vector through global average pooling. This vector encodes key visual information such as the color, thickness, and moisture of the tongue coating.

[0072] For physiological signal data (such as pulse waveforms), preprocessing can include filtering and denoising, signal standardization, and segmentation. Feature extraction can employ time-frequency analysis (such as wavelet transform) or specialized signal processing neural networks to extract key features such as frequency, amplitude, and morphology of the waveform, forming a physiological signal feature vector. Optionally, wavelet denoising can be used to process the pulse waveform to obtain temporal features.

[0073] This can be explained by the fact that, through this step, the original multimodal data is transformed into multimodal collaborative features with a unified mathematical representation (i.e., a high-dimensional vector).

[0074] Step S350: The multimodal collaborative features and the TCM syndrome differentiation intermediate vector generated based on the TCM knowledge graph are fused to obtain the global fused features.

[0075] This step aims to deeply integrate data-driven features with domain knowledge-driven features to generate a comprehensive feature representation that includes both the objective physical signs of the patient and the underlying logic of traditional Chinese medicine diagnosis.

[0076] In some possible embodiments, the aforementioned multimodal collaborative features include text features, tongue visual features, and pulse diagnosis physiological signal features; based on this, feature fusion may include: weighted fusion of each modal feature in the multimodal collaborative features and its corresponding modal stability coefficient with the intermediate vector of traditional Chinese medicine syndrome differentiation; wherein, the modal stability coefficient is dynamically determined based on the signal-to-noise ratio or quality assessment value of the corresponding modal data.

[0077] Specifically, the first step is to generate intermediate vectors for TCM syndrome differentiation based on a pre-constructed TCM knowledge graph. The TCM knowledge graph is a structured semantic network that formally represents scattered TCM concepts, entities, and their complex logical relationships, providing a computable and reasoning-enabled domain knowledge base for artificial intelligence models. The TCM knowledge graph includes TCM herb nodes, syndrome nodes, and rule edges between nodes. TCM herb nodes describe the pharmaceutical characteristics of TCM entities through a set of standardized attributes, including properties, channels, efficacy, dosage, and toxicity. Syndrome nodes represent the conclusions of TCM diagnosis, summarizing the pathological essence of the current stage of the disease, such as "yin deficiency with exuberant fire" or "spleen deficiency with dampness." Syndrome nodes can include entities representing syndrome types such as yin deficiency, yang deficiency, qi deficiency, blood stasis, phlegm-dampness, and qi stagnation. Complex relationships exist between syndrome nodes, such as inclusion relationships, transformation relationships, and symptom-syndrome associations. Rule edges are the relational edges in a Traditional Chinese Medicine (TCM) knowledge graph that connect various entities and define how they interact. They are mandatory constraints that ensure the generated prescriptions conform to the theoretical logic and safety norms of TCM. Rule edges can include principles such as monarch-minister-assistant-guide, the eighteen incompatibilities, the nineteen taboos, and contraindications related to pregnancy. Knowledge graph embedding techniques (such as the TransR algorithm) can be used to map these entities and relations into a low-dimensional continuous vector space, obtaining the TCM diagnostic intermediate vector. In other words, the TCM diagnostic intermediate vector is a structured and vectorized representation of entities (Chinese herbs, syndromes, etc.) and relations (efficacy, meridian tropism, etc.) in the entire TCM knowledge graph. For example, an improved TransR can be used to generate a 128-dimensional diagnostic intermediate vector, which carries the TCM logic.

[0078] Next, the multimodal collaborative features obtained in step S340 are fused with the intermediate vector of TCM syndrome differentiation. The fusion process can adopt a hierarchical dynamic attention fusion mechanism. A modal stability coefficient can be calculated for each of the three modal features corresponding to text, tongue image, and pulse diagnosis. This modal stability coefficient can be dynamically adjusted based on the quality of each modal data. Optionally, for text data, the modal stability coefficient can be determined through one or more of the following: integrity assessment (analyzing the completeness of the text content, such as checking whether key fields such as the patient's chief complaint, medical history, and symptom description are missing), consistency assessment (assessing the consistency within the text data or between the text data and other modal data, for example, if there is a significant contradiction between the symptoms described in the text and the tongue appearance and pulse diagnosis characteristics, the reliability of the text description can be judged as questionable, thereby reducing its stability coefficient), structuring and noise assessment (assessing the degree of unstructuredness and noise level of the text, for example, using natural language processing technology to determine whether the text contains a large number of irrelevant descriptions, vague words, or self-contradictory content), and source and confidence assessment (obtaining meta-information of the source of the text data, such as from the patient's self-report, the physician's standard medical record, or non-professional paraphrasing, assigning different basic confidence levels based on the meta-information, and then fine-tuning it in combination with the quality of the text content). The corresponding modal stability coefficient can be determined by the clarity of the tongue image and the signal-to-noise ratio of the pulse diagnosis signal. Finally, the multimodal collaborative features, which are weighted based on the modal stability coefficient and the preset modal attention weights, are concatenated or re-weighted and summed with the intermediate vector of TCM syndrome differentiation to obtain the global fusion features.

[0079] In one possible implementation, the hierarchical dynamic attention fusion formula can be: ; in, F global This represents the global fusion feature (the dimension can be 384). Indicates the first i The attention weights for each modality can be dynamically set based on the importance of the three modalities to satisfy... ; F m,i Indicates the first i Modal characteristics of each mode; k i Indicates the first i The modal stability coefficient of each mode can range from 0.9 to 1.0; W kg The knowledge weight matrix (which can be 384×128 in dimension) represents trainable parameters. F iv This represents the intermediate vector for TCM syndrome differentiation (the dimension can be 128). b fThis represents the preset global bias term. For example, the modal attention weights are: text weight 0.5, tongue image weight 0.3, and pulse diagnosis weight 0.2; all have a stability coefficient of 0.95; the fused output is 384-dimensional. F global .

[0080] This embodiment uses dynamic attention (modal stability coefficient) to weight the modal features corresponding to text, tongue image, and pulse diagnosis, and then integrates the intermediate vector of TCM syndrome differentiation to form a unified syndrome differentiation feature. The introduction of modal stability coefficient can alleviate the weight drift caused by noise in tongue image / pulse diagnosis acquisition.

[0081] It should be noted that by introducing intermediate vectors for TCM diagnosis and performing attention-weighted fusion, the global fusion features not only integrate the "four diagnostic methods" information of the patient, but also deeply embed prior knowledge such as the properties, flavors, meridian tropism, and syndrome compatibility of Chinese medicines. This allows the subsequent prescription generation process to reason within a semantic space that conforms to TCM theory, effectively avoiding logical contradictions that may arise from purely data-driven approaches.

[0082] Step S360: Based on global fusion features, dynamic adaptation factors and safety coefficients, traditional Chinese medicines are screened to obtain a set of target traditional Chinese medicines.

[0083] After obtaining the global fusion features, this step utilizes these features, combined with two regulatory parameters—dynamic adaptation factor and safety coefficient—to intelligently select the most suitable drug combination for the current patient from knowledge bases such as the Chinese herbal medicine database.

[0084] In some possible embodiments, the above-mentioned screening of traditional Chinese medicine may include: for each candidate traditional Chinese medicine, based on global fusion features, dynamic adaptation factors and safety coefficients, combined with the herb-syndrome compatibility of the candidate traditional Chinese medicine and its priority in the prescription, calculating its inclusion probability in the target set of traditional Chinese medicine.

[0085] Specifically, for each candidate traditional Chinese medicine (TCM) in the knowledge base, the prescription generation model calculates its probability of being included in the target TCM set. In one possible implementation, the probability calculation formula can be: ; in, P j Indicates the first j The probability of a Chinese herbal medicine being selected can range from 0 to 1. s This represents the Sigmoid activation function; W f Represents trainable feature weights; W d Represents trainable, dynamically adaptable weights used to adjust the representation of the drug property embedding; Ws Indicates trainable safety weights; f j Indicates the taste of medicine The syndrome fit can range from 0.8 to 1.0. t j Indicates the priority of the ruler, ministers, assistants, and envoys. t j =1.0 indicates that this drug should be used as the principal drug in this prescription. t j =0.9 indicates that this drug should be used as an adjunct drug in this prescription. t j =0.8 indicates that the drug should be used as an adjuvant or guiding drug in this prescription; b p This indicates the preset bias term.

[0086] For example, Ophiopogon japonicus corresponds to f j =0.98, t j =1.0, calculated P j =0.93, so Ophiopogon japonicus has a high probability of being selected.

[0087] When calculating the probability of selection, the prescription generation model considers the herbal flavor-syndrome compatibility (i.e., the degree of matching between the herbal properties and efficacy and the current diagnostic direction, such as the high compatibility of heat-clearing herbs with heat syndromes) and its priority in the prescription (e.g., the principal herb usually has a higher basic priority). Global fusion features. F global Provided dialectical basis, dynamic adaptation factors LDAF Based on this, minor adjustments can be made (such as increasing the weight of yin-nourishing herbs for those with yin deficiency), and the safety factor can be improved. PSCC This inhibits high-risk drugs. Adding medicinal ingredients – syndrome compatibility. f j Priority of ruler, minister, assistant, and envoy t j This ensures that the prescription conforms to the logic of traditional Chinese medicine prescription. Ultimately, all drugs with a selection probability exceeding a preset threshold, or a preset number of drugs ranked highest according to their selection probability, are identified as the target set of traditional Chinese medicines.

[0088] Step S370: Based on the dynamic adaptation factor and safety factor, calculate the dosage of each Chinese herb in the target set of Chinese herbal medicines to obtain the candidate Chinese herbal medicine prescription.

[0089] After determining the drug composition (target set of Chinese herbal medicines), the task of this step is to calculate the personalized dosage for each selected Chinese herbal medicine, thereby forming a complete prescription draft (i.e., candidate Chinese herbal medicine prescription).

[0090] In some possible embodiments, the above dosage calculation may include: for each herb in the target set of Chinese herbal medicines, calculating its final dosage based on its pharmacopoeia baseline dose, dynamic adaptation factor, safety factor and symptom severity score of the target patient, combined with the mildness of the herb's medicinal properties.

[0091] Specifically, for each herb in the target set of Chinese medicinal herbs m j its final dose Dose j The calculation formula can be: ; in, Dose base,j Indicates the first j The basic dosage of a Chinese herbal medicine in the pharmacopoeia or conventional formulations, in grams; l This represents the symptom weight, which can be a fixed value, such as... l =0.15, and can also be updated dynamically; S level The symptom severity score can be derived from the description of the text data and its value ranges from 0 to 1. i j Indicates the first j The mildness of the medicinal properties of Chinese herbs. For herbs with strong medicinal properties (such as aconite and rhubarb)... i j Less than 1, such as i j =0.85, which provides a safety protection against dose attenuation; for drugs with mild properties, i j Equal to or close to 1, such as i j =1.

[0092] For example, the basic dose of Ophiopogon japonicus is 10g; LDAF =1.0526, PSCC =1.0, S level =0.6, mildness of medicinal properties i =1.0, then the final dose of Ophiopogon japonicus is Dose = 10 g × 1.0526 × 1.0 × (1 + 0.15 × 0.6) × 1.0 = 11.47 g.

[0093] This approach incorporates multiple layers of safety and personalized adjustments to the pharmacopoeia dosage, by adding a layer of milder drug properties. i j This causes the dosage of potent drugs to decrease automatically.

[0094] Step S380: Perform security verification on the candidate Chinese medicine prescriptions, and determine the candidate Chinese medicine prescriptions that pass the verification as the target Chinese medicine prescriptions.

[0095] After generating candidate Chinese medicine prescriptions, this step sets up the final and most stringent security defense, performing multi-dimensional automated verification of the prescriptions based on clear rules.

[0096] In some possible embodiments, the above-mentioned security verification may include the drug Drug contraindication verification, drug-human contraindication verification, and dosage compliance verification.

[0097] Specifically, the safety verification process comprises three layers. The first layer is drug-drug contraindication verification, which checks for prohibited drug pairs in candidate herbal prescriptions based on the clearly defined rules of drug incompatibility, such as the "Eighteen Incompatibilities" and "Nineteen Antagonisms," as defined in the Traditional Chinese Medicine knowledge graph. The second layer is drug-person contraindication verification, comparing each herb in the candidate prescription with the contraindications information of the patient (such as allergy history, liver and kidney function status, and pregnancy status) to check for conflicts. The third layer is dosage compliance verification, confirming that the final dosage of each herb is within the safe dosage range specified in the pharmacopoeia or clinical guidelines.

[0098] If all three checks pass, the candidate TCM prescription is ultimately determined as a target TCM prescription suitable for clinical use. If any check fails (for example, the prescription contains two of the "Eighteen Incompatibilities" simultaneously, or the dosage of a certain drug exceeds the upper limit of the pharmacopoeia), the prescription will not be directly output. Instead, the check result will be used as feedback to re-trigger the prescription generation process (e.g., return to step S360) for prescription adjustment until a prescription that has completely passed the security checks is generated. This process constitutes an internal generation-checking closed loop.

[0099] Step S390: Obtain efficacy feedback data for the target traditional Chinese medicine prescription, and optimize the parameters involved in the intelligent prescription generation method of traditional Chinese medicine based on the efficacy feedback data and the preset parameter update formula; wherein, the parameter update formula includes efficacy feedback error, compatibility rationality loss and safety contraindication loss.

[0100] This step constructs an external evolutionary closed loop for the system, enabling the entire TCM intelligent prescription generation method to continuously improve itself based on actual efficacy feedback and possess the ability to learn continuously.

[0101] Specifically, after the target traditional Chinese medicine prescription is applied in clinical practice, efficacy feedback data is collected through follow-up visits, re-examination records, self-assessment scales of patients, or wearable devices.

[0102] Subsequently, based on this efficacy feedback data, all trainable parameters involved in the method are iteratively optimized using a pre-defined parameter update formula (essentially an optimization algorithm). Specifically, the loss function defined by the parameter update formula includes not only the efficacy feedback error (such as mean squared error) that measures the difference between the predicted prescription and the actual efficacy, but also the compatibility rationality loss (used to encourage compatibility that conforms to theories such as "principal, assistant, adjuvant, and guide") and the safety contraindication loss (used to punish prescription tendencies that violate safety rules). The safety contraindication loss can strengthen the learning of contraindication information. Trainable parameters may include: 1) attention weights involved in feature fusion. and knowledge weight matrix W kg ;2) The dynamic adaptation factor calculation involves oh 1. oh 2. oh 3 and x 3) Risk weights involved in the calculation of the safety factor d , e , g , or 1; 4) Feature weights involved in the selection probability calculation formula W f Dynamically adapt weights W d and safety weight W s 5) Symptom weights involved in the calculation of traditional Chinese medicine dosage l wait.

[0103] In one possible implementation, the parameter update formula can be: ; in, i new This indicates the updated parameters. i old This indicates the parameters before the update; or This represents the learning rate (e.g., 0.0008). This represents the gradient operator; L MSE This indicates the error in the feedback of therapeutic efficacy; L compat This indicates a loss of compatibility. L safe Indicates loss that is considered a safety taboo; α , β For example, the preset weights α =0.2, β =0.15.

[0104] For example, in an optimization iteration, if a prescription provides short-term symptom relief (small efficacy feedback error) but is later pointed out by a physician to have a slight drug interaction (increased loss of compatibility), then updating the parameters will be influenced by both positive efficacy feedback and negative compatibility feedback. Consequently, in future prescription generation, it will be more inclined to avoid such unreasonable combinations, even if they are statistically related to symptom relief. This multi-objective optimization mechanism ensures that while pursuing efficacy, the theoretical rationality and safety of the prescription are always learned and reinforced as hard constraints.

[0105] It should be noted that the parts not described in detail in steps S310 to S390 above can be referred to the corresponding content in the foregoing embodiments. Furthermore, there is no specific execution order among steps S320, S330, and S340; they can be executed in a predetermined order (e.g., ...). Figure 3 (The order in which they are executed) can also be parallelized.

[0106] In this embodiment of the invention, an intelligent TCM prescription generation closed-loop system was constructed, possessing deep knowledge fusion, precise dynamic adaptation, rigid security constraints, and continuous autonomous evolution capabilities. This system not only generates highly personalized prescriptions with sound theoretical basis and guaranteed safety, but also accumulates experience through practical application, continuously improving the accuracy and reliability of its diagnosis and treatment. It provides a complete technical solution and a feasible evolutionary path for the deep, safe, and reliable application of artificial intelligence in the complex field of TCM.

[0107] In summary, the key technical points of the embodiments of the present invention include: 1. Multimodal collaboration + modal stability coefficient weighting: stronger anti-interference and more suitable for clinical data acquisition environment; 2. Layered dynamic adaptation + temporal change: Prescriptions are dynamically adjusted according to the patient's condition, physical condition, region, and time; 3. Four-fold proactive security risk control: mitigating risks at the source; 4. The intermediate vector for TCM syndrome differentiation: Deep integration of AI and TCM theory; 5. Autonomous iteration with safety constraints: becoming more accurate and safer with use.

[0108] Compared with existing technologies, the present invention provides more comprehensive diagnosis (covering four diagnostic methods); more accurate prescriptions (one prescription per person, time, place, and location); safer medication (four-fold pre-emptive risk control); more intelligent (autonomous iteration); and more flexible deployment (supporting primary care / family / clinics).

[0109] Corresponding to the above-described method for generating intelligent prescriptions for traditional Chinese medicine, this invention also provides a device for generating intelligent prescriptions for traditional Chinese medicine. See [link to related document]. Figure 4The diagram shows a structural schematic of a traditional Chinese medicine intelligent prescription generation device, which includes: The acquisition module 401 is used to acquire multimodal data of the target diagnosis and treatment object. The multimodal data includes text data, visual data and physiological signal data. The determination module 402 is used to determine dynamic adaptation factors based on multimodal data to adapt to the physical condition, disease course, environment and temporal changes of the disease of the target diagnosis and treatment object. The dynamic adaptation factors are used to characterize the prescription adjustment intensity. The generation module 403 is used to generate a target traditional Chinese medicine prescription for the target diagnosis and treatment object based on multimodal data and dynamic adaptation factors.

[0110] The TCM intelligent prescription generation device provided in this embodiment of the invention introduces dynamic adaptation factors, enabling the generated prescription to adapt to changes in the patient's constitution, disease course, environment, and the timing of the illness, thereby realizing dynamic personalized prescription generation and improving the accuracy of prescription generation.

[0111] Furthermore, the aforementioned determining module 402 is specifically used to: extract physical condition information, disease course information, environmental information, and disease progression information from multimodal data; determine the physical condition coefficient, disease course coefficient, regional climate coefficient, and daily variation of disease course based on the physical condition information, disease course information, environmental information, and disease progression information; and perform weighted summation on the physical condition coefficient, disease course coefficient, regional climate coefficient, and daily variation of disease course to obtain the dynamic adaptation factor.

[0112] Furthermore, the aforementioned text data includes contraindication information; the generation module 403 is specifically used to: calculate a safety coefficient representing the risk of medication based on the contraindication information; and generate a target traditional Chinese medicine prescription based on multimodal data, the safety coefficient, and the dynamic adaptation factor.

[0113] Furthermore, the aforementioned generation module 403 is also used to: determine the risks of allergies, liver and kidney function, traditional Chinese medicine toxicity, and pregnancy contraindications based on the contraindication information; and calculate the safety coefficient based on the risks of allergies, liver and kidney function, traditional Chinese medicine toxicity, and pregnancy contraindications.

[0114] Furthermore, the aforementioned generation module 403 is also used for: preprocessing and extracting features from multimodal data to obtain multimodal collaborative features; fusing the multimodal collaborative features and the TCM syndrome differentiation intermediate vector generated based on the TCM knowledge graph to obtain global fusion features; screening TCMs based on the global fusion features, dynamic adaptation factors, and safety coefficients to obtain a target TCM set; calculating the dosage of each TCM in the target TCM set based on the dynamic adaptation factors and safety coefficients to obtain candidate TCM prescriptions; performing safety verification on the candidate TCM prescriptions, and determining the candidate TCM prescriptions that pass the verification as the target TCM prescriptions.

[0115] Furthermore, the aforementioned multimodal collaborative features include text features, tongue visual features, and pulse diagnosis physiological signal features; feature fusion includes: weighted fusion of each modal feature and its corresponding modal stability coefficient in the multimodal collaborative features with the intermediate vector of TCM syndrome differentiation; wherein, the modal stability coefficient is dynamically determined based on the signal-to-noise ratio or quality assessment value of the corresponding modal data; The screening of traditional Chinese medicines includes: for each candidate traditional Chinese medicine, based on global fusion features, dynamic adaptation factors and safety coefficients, combined with the herb-syndrome compatibility of the candidate traditional Chinese medicine and its priority in the prescription, calculating its probability of being included in the target set of traditional Chinese medicines; Dosage calculation includes: for each herb in the target set of Chinese medicines, the final dosage is calculated based on its pharmacopoeia baseline dose, dynamic adaptation factor, safety factor and symptom severity score of the target patient, combined with the mildness of the herb's medicinal properties. Safety verification includes pharmaceuticals Drug contraindication verification, drug-human contraindication verification, and dosage compliance verification.

[0116] Furthermore, the aforementioned intelligent prescription generation device for traditional Chinese medicine also includes an update module, which is used to: acquire efficacy feedback data for the target traditional Chinese medicine prescription; optimize the parameters involved in the intelligent prescription generation method for traditional Chinese medicine based on the efficacy feedback data and the preset parameter update formula; wherein, the parameter update formula includes efficacy feedback error, compatibility rationality loss and safety contraindication loss.

[0117] The TCM intelligent prescription generation device provided in this embodiment has the same implementation principle and technical effects as the aforementioned TCM intelligent prescription generation method embodiment. For the sake of brevity, any parts not mentioned in the TCM intelligent prescription generation device embodiment can be referred to the corresponding content in the aforementioned TCM intelligent prescription generation method embodiment.

[0118] like Figure 5 As shown, an electronic device 500 provided in this embodiment of the invention includes: a processor 501, a memory 502 and a bus. The memory 502 stores a computer program that can run on the processor 501. When the electronic device 500 is running, the processor 501 and the memory 502 communicate through the bus, and the processor 501 executes the computer program to realize the above-mentioned method for generating intelligent prescriptions for traditional Chinese medicine.

[0119] Specifically, the memory 502 and processor 501 mentioned above can be general-purpose memory and processor, without any specific limitations here.

[0120] This invention also provides a computer-readable storage medium storing a computer program. When a processor runs this computer program, it executes the intelligent prescription generation method for traditional Chinese medicine described in the preceding method embodiments. The computer-readable storage medium includes various media capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), RAM, magnetic disk, or optical disk.

[0121] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0122] In all examples shown and described herein, any specific values ​​should be interpreted as merely exemplary and not as limitations; therefore, other examples of exemplary embodiments may have different values.

[0123] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0124] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and there may be other division methods in actual implementation. Furthermore, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interface; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.

[0125] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0126] In addition, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.

[0127] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for generating intelligent prescriptions in traditional Chinese medicine, characterized in that, include: Acquire multimodal data of the target patient, including text data, visual data, and physiological signal data; Based on the multimodal data, dynamic adaptation factors are determined to adapt to the changes in the physical condition, disease course, environment, and disease progression of the target patient. These dynamic adaptation factors are used to characterize the intensity of prescription adjustment. Based on the multimodal data and the dynamic adaptation factor, a target traditional Chinese medicine prescription is generated for the target patient.

2. The method for generating intelligent prescriptions for traditional Chinese medicine according to claim 1, characterized in that, The step of determining dynamic adaptation factors based on the multimodal data to suit the physical condition, disease course, environment, and temporal changes in the disease of the target patient includes: From the multimodal data, extract physical condition information, disease course information, environmental information, and disease progression information over time; Based on the physical condition information, the disease course information, the environmental information, and the disease progression information, the physical condition coefficient, disease course coefficient, regional climate coefficient, and daily variation of disease course are determined. The dynamic adaptation factor is obtained by weighted summation of the physical fitness coefficient, the disease course coefficient, the regional climate coefficient, and the daily variation of the disease course.

3. The method for generating intelligent prescriptions for traditional Chinese medicine according to claim 1, characterized in that, The text data includes contraindication information; the step of generating a target traditional Chinese medicine prescription for the target patient based on the multimodal data and the dynamic adaptation factor includes: Based on the contraindication information, a safety factor characterizing the risk of medication use is calculated; The target traditional Chinese medicine prescription is generated based on the multimodal data, the safety factor, and the dynamic adaptation factor.

4. The method for generating intelligent prescriptions for traditional Chinese medicine according to claim 3, characterized in that, The calculation of the safety coefficient characterizing the drug use risk based on the contraindication information includes: Based on the contraindication information, the risks of allergies, liver and kidney function disorders, toxicity of traditional Chinese medicine, and contraindications to pregnancy are determined. The safety factor is calculated based on the risks of allergies, liver and kidney function, toxicity of traditional Chinese medicine, and contraindications to pregnancy.

5. The method for generating intelligent prescriptions for traditional Chinese medicine according to claim 3, characterized in that, The step of generating the target traditional Chinese medicine prescription based on the multimodal data, the safety factor, and the dynamic adaptation factor includes: The multimodal data is preprocessed and features are extracted to obtain multimodal collaborative features; The multimodal collaborative features and the TCM syndrome differentiation intermediate vector generated based on the TCM knowledge graph are fused to obtain global fused features; Based on the global fusion features, the dynamic adaptation factor, and the safety coefficient, traditional Chinese medicines are screened to obtain a target set of traditional Chinese medicines. Based on the dynamic adaptation factor and the safety factor, the dosage of each Chinese herb in the target set of Chinese herbal medicines is calculated to obtain a candidate Chinese herbal medicine prescription. The candidate traditional Chinese medicine prescriptions are subjected to security verification, and the candidate traditional Chinese medicine prescriptions that pass the verification are determined as the target traditional Chinese medicine prescriptions.

6. The method for generating intelligent prescriptions for traditional Chinese medicine according to claim 5, characterized in that, The multimodal collaborative features include text features, tongue image visual features, and pulse diagnosis physiological signal features; The feature fusion includes: weighted fusion of each modal feature and its corresponding modal stability coefficient in the multimodal collaborative features with the TCM syndrome differentiation intermediate vector; wherein, the modal stability coefficient is dynamically determined based on the signal-to-noise ratio or quality assessment value of the corresponding modal data; The screening of traditional Chinese medicines includes: for each candidate traditional Chinese medicine, based on the global fusion features, the dynamic adaptation factor and the safety coefficient, combined with the herb-syndrome compatibility of the candidate traditional Chinese medicine and its priority in the prescription, calculating its probability of being selected into the target set of traditional Chinese medicines. The dosage calculation includes: for each Chinese herb in the target set of Chinese herbal medicines, based on its pharmacopoeia basic dose, the dynamic adaptation factor, the safety factor, and the symptom severity score of the target patient, combined with the mildness of the medicinal properties of the Chinese herb, calculating its final dose; The security verification includes the drug. Drug contraindication verification, drug-human contraindication verification, and dosage compliance verification.

7. The method for generating intelligent prescriptions for traditional Chinese medicine according to claim 1, characterized in that, The method for generating intelligent prescriptions for traditional Chinese medicine also includes: Obtain therapeutic feedback data for the target traditional Chinese medicine prescription; Based on the efficacy feedback data and the preset parameter update formula, the parameters involved in the TCM intelligent prescription generation method are optimized; wherein, the parameter update formula includes efficacy feedback error, compatibility rationality loss and safety contraindication loss.

8. A traditional Chinese medicine intelligent prescription generation device, characterized in that, include: The acquisition module is used to acquire multimodal data of the target diagnostic object, including text data, visual data, and physiological signal data; The determination module is used to determine, based on the multimodal data, dynamic adaptation factors that adapt to the physical condition, disease course, environment, and temporal changes of the disease in the target patient, wherein the dynamic adaptation factors are used to characterize the prescription adjustment intensity; The generation module is used to generate a target traditional Chinese medicine prescription for the target patient based on the multimodal data and the dynamic adaptation factor.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, When the processor executes the computer program, it implements the traditional Chinese medicine intelligent prescription generation method according to any one of claims 1-7.

10. A computer-readable storage medium storing a computer program thereon, characterized in that, The computer program is executed by the processor to perform the traditional Chinese medicine intelligent prescription generation method according to any one of claims 1-7.