Traditional Chinese medicine auxiliary diagnosis system and diagnosis method
By designing a traditional Chinese medicine-assisted diagnostic system combining natural language processing and multi-objective optimization algorithms, the shortcomings of the existing system in quickly identifying complex symptoms and providing personalized drug recommendations are solved, and the diagnosis and treatment of high accuracy and effectiveness are achieved.
Patent Information
- Application Number
- CN202510304796.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-06-20
AI Technical Summary
The existing traditional Chinese medicine auxiliary diagnosis system has shortcomings in quickly identifying complex symptoms and providing personalized drug recommendations, and it is difficult to evaluate the consistency of data and the merits of drug combinations.
A Chinese medicine auxiliary diagnosis system was designed, and through modules such as data preprocessing, feature extraction, diagnostic reasoning and drug recommendation, it uses natural language processing and multi-objective optimization algorithm to dynamically balance the constraints of overall concepts, Yin and Yang and Five Elements, and six-dimensional diagnostic and treatment principles, quickly obtain drug information related to symptoms, and calculate drug recommendation priority through a weighted scoring algorithm.
It realizes rapid identification of complex symptoms and personalized drug recommendations, improves diagnosis accuracy and treatment effectiveness, enhances the systematic diagnosis and treatment accuracy, and continuously optimizes the model and knowledge base through dynamic feedback closed loop.
Smart Images

Figure CN120183671A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent medical technology, and particularly to a traditional Chinese medicine assisted diagnosis system and a diagnosis method. Background Art
[0002] Traditional Chinese medicine diagnosis and treatment, as a traditional medical system rooted in Chinese civilization, takes the holistic concept as the core, and constructs a unique syndrome differentiation and treatment theoretical framework by systematically analyzing the dynamic relationship between the physiological functions and pathological changes of the human body. However, the existing traditional Chinese medicine syndrome differentiation and treatment system has significant characteristics of experience dependence, and its diagnosis and treatment accuracy mainly relies on the clinical experience accumulation of individual physicians. This experience-oriented diagnosis and treatment mode leads to significant bottlenecks in talent cultivation: clinical physicians need 10 - 15 years of apprenticeship practice and case study to form a systematic syndrome differentiation thinking. The experience acquisition cycle is long and the standardized cultivation path is lacking, resulting in significant structural contradictions in the talent supply side.
[0003] Therefore, it is necessary to construct an auxiliary traditional Chinese medicine diagnosis system. By assisting clinical physicians in differentiating symptoms and selecting corresponding drug combinations, the essence of the auxiliary traditional Chinese medicine diagnosis system is the process from "inputting symptoms" to "outputting prescriptions". The existing auxiliary traditional Chinese medicine diagnosis systems correspond "input symptoms" to "output prescriptions". For the same medical record, senior traditional Chinese medicine physicians have different judgments on key decision points such as syndrome determination (such as the differentiation between phlegm stasis and qi stagnation with blood stasis) and the priority of treatment principles (the sequential selection of strengthening healthy qi and eliminating pathogenic factors). Prescriptions are tried based on rules and exhaustive methods. However, there are too many types of traditional Chinese medicines. If combined, there are too many combinations. Therefore, even if combinations are given, it is impossible to judge the advantages and disadvantages of various combinations. At the same time, each school or each traditional Chinese medicine doctor has different understandings of traditional Chinese medicines and prescriptions. Even if all prescriptions are collected, in the view of a computer, the data of these prescriptions is inconsistent and it is difficult to statistically obtain the medication rules. Summary of the Invention
[0004] Aiming at the deficiencies of the prior art, the present invention provides a traditional Chinese medicine assisted diagnosis system and a diagnosis method, aiming to solve the problem of how to quickly differentiate complex symptoms. Through the analysis of the specific symptoms of patients, the system can quickly obtain drug information related to the symptoms and provide personalized drug recommendations.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] In the first aspect, a traditional Chinese medicine assisted diagnosis system includes:
[0007] A data input unit, configured to collect the symptom text of a patient, where the symptom text includes the patient's symptoms, constitution, and the success rate of historical medical records;
[0008] A data preprocessing unit, configured to perform normalization processing on the input symptom text, including word segmentation, semantic mapping, and symptom normalization based on traditional Chinese medicine classics, and convert non-standard descriptions into standard traditional Chinese medicine disease terms;
[0009] A feature extraction unit, configured to extract a structured feature vector from the preprocessed symptom data through natural language processing technology, including multi-dimensional representations of yin-yang attributes, five-element attributions, six-meridian syndrome differentiation, and qi-blood-body fluid states;
[0010] A diagnosis and reasoning unit, configured to input the multi-dimensional representation into a pre-trained traditional Chinese medicine diagnosis assistance model, and obtain and output a diagnosis result;
[0011] A drug listing and comparison unit, configured to retrieve drug combinations matching the diagnosis result according to the diagnosis result and based on a knowledge database constructed based on Huang Yuanyu's traditional Chinese medicine system, Treatise on Febrile Diseases, and 1264 Clinical Methods, and calculate the drug recommendation priority through a weighted scoring algorithm;
[0012] A feedback unit, which is used to record and analyze the evaluation of the prescription and diagnosis result recommended by the system by the doctor according to clinical experience and the actual situation of the patient, form a feedback database, and optimize the model and knowledge base through the data in the feedback database to achieve continuous iteration of the system;
[0013] The traditional Chinese medicine diagnosis assistance model is obtained by training a model training subunit provided in the diagnosis and reasoning unit. Among them, the model training subunit is configured to train the traditional Chinese medicine diagnosis assistance model using a multi-objective optimization algorithm. The overall loss function of the traditional Chinese medicine diagnosis assistance model is: Loss_total = α * Loss_1 + β * Loss_2 + γ * Loss_6 + δ * Loss_4; where Loss_total is the overall loss function; Loss_1 is the overall concept loss function to ensure that the model prediction conforms to the principle of human integrity; Loss_2 is the yin-yang and five-element loss function to ensure that the prediction result conforms to the yin-yang and five-element theory; Loss_6 is the six-dimensional diagnosis loss function to comprehensively consider the six dimensions of inspection, auscultation and olfaction, interrogation, palpation of the pulse, and tongue condition; Loss_4 is the treatment principle loss function to ensure compliance with the basic treatment principles of syndrome differentiation and treatment, treating the root cause of the disease, strengthening the healthy qi and eliminating pathogenic factors, and adjusting yin and yang; α, β, γ, and δ are the weight coefficients of the overall concept loss function, yin-yang and five-element loss function, six-dimensional diagnosis loss function, and treatment principle loss function respectively. The training is iterated until the overall loss function of the traditional Chinese medicine diagnosis assistance model is the minimum value, and the training is completed.
[0014] In a second aspect, a traditional Chinese medicine assisted diagnosis method includes the following steps:
[0015] Input the symptom text of the patient, where the symptom text includes the patient's symptoms, constitution, and the success rate of historical medical records;
[0016] Standardize the input symptom text, including word segmentation, semantic mapping, and symptom normalization based on traditional Chinese medicine classics, and convert non-standard descriptions into standard traditional Chinese medicine disease terms;
[0017] Extract structured feature vectors from the preprocessed symptom data through natural language processing techniques, including multi-dimensional representations of yin-yang attributes, five-element attributions, six-meridian syndrome differentiation, and qi-blood-body fluid states;
[0018] Input the multi-dimensional representation into the pre-trained traditional Chinese medicine diagnosis assistance model to obtain and output the diagnosis result;
[0019] According to the diagnosis result and based on the knowledge database constructed by Huang Yuanyu's traditional Chinese medicine system, Treatise on Febrile Diseases, and 1264 Clinical Methods, retrieve the drug combinations that match the diagnosis result, and calculate the drug recommendation priority through a weighted scoring algorithm;
[0020] Record and analyze the evaluations of the prescriptions and diagnosis results recommended by the system by doctors based on clinical experience and the actual situation of patients, form a feedback database, and optimize the model and knowledge base through the data in the feedback database to achieve continuous iteration of the system;
[0021] The traditional Chinese medicine diagnosis assistance model is trained using a multi-objective optimization algorithm. The overall loss function of the model is: Loss_total = α * Loss_1 + β * Loss_2 + γ * Loss_6 + δ * Loss_4; where Loss_total is the overall loss function; Loss_1 is the holistic concept loss function to ensure that the model prediction conforms to the principle of human integrity; Loss_2 is the yin-yang and five-element loss function to ensure that the prediction result conforms to the yin-yang and five-element theory; Loss_6 is the six-dimensional diagnosis loss function, comprehensively considering the six dimensions of inspection, auscultation and olfaction, inquiry, palpation, tongue, and pulse; Loss_4 is the treatment principle loss function to ensure compliance with the basic treatment principles of syndrome differentiation and treatment, treating the root cause of the disease, strengthening the healthy qi and eliminating pathogenic factors, and adjusting yin and yang; α, β, γ, and δ are the weight coefficients of the holistic concept loss function, yin-yang and five-element loss function, six-dimensional diagnosis loss function, and treatment principle loss function respectively. Train and iterate until the overall loss function of the traditional Chinese medicine diagnosis assistance model reaches the minimum value to complete the training.
[0022] Preferably, the holistic concept loss function is: Loss_1 = ||f(S_whole) - Σf(S_i)||2;
[0023] Where S_whole is the overall symptom representation of the patient; S_i is the single symptom representation; f is the model prediction function; ||·||2 is the L2 norm, used to measure the difference between the overall prediction and the local prediction;
[0024] S_whole = [V_yin_yang, V_wu_xing, V_liu_jing, V_qi_xue];
[0025] V_yin_yang is the yin-yang attribute vector, representing the overall yin-yang imbalance state of the patient, including: yang deficiency index, yin deficiency index, yang excess index, and yin excess index;
[0026] V_wu_xing is the five-element attribute vector, representing the functional states of the patient's five zang-organs, including: liver function index, heart function index, spleen function index, lung function index, and kidney function index;
[0027] V_liu_jing is the six-meridian syndrome differentiation vector, representing the six-meridian disease locations of the patient, including: taiyang disease index, yangming disease index, shaoyang disease index, taiyin disease index, shaoyin disease index, and jueyin disease index;
[0028] V_qi_xue is the qi-blood-body fluid vector, representing the states of the patient's qi, blood, and body fluids, including: qi deficiency index, qi stagnation index, blood deficiency index, blood stasis index, body fluid deficiency index, and phlegm-dampness index;
[0029] S_i = [basic symptom attributes, symptom yin-yang attributes, symptom five-element attribution, symptom six-meridian attribution, symptom manifestation characteristics];
[0030] The basic symptom attributes include: symptom name, symptom severity, and symptom duration;
[0031] The symptom yin-yang attributes include: yin syndrome index and yang syndrome index;
[0032] The symptom five-element attribution includes: wood attribute index, fire attribute index, earth attribute index, metal attribute index, and water attribute index;
[0033] The symptom six-meridian attribution includes: taiyang meridian index, yangming meridian index, shaoyang meridian index, taiyin meridian index, shaoyin meridian index, and jueyin meridian index;
[0034] The symptom manifestation characteristics include: cold-heat index, deficiency-excess index, and exterior-interior index;
[0035] The model prediction function is f(S) = W × S + b; where S is the input symptom representation vector, which can be the overall representation S_whole or the single symptom representation S_i; W is the weight matrix, representing the association strength between symptoms and drugs; b is the bias vector, representing the basic recommendation values of each drug; × is the matrix multiplication operator.
[0036] Preferably, the Yin-Yang and Five-Element loss function is: Loss_2 = CrossEntropy(Y_pred_yin_yang, Y_true_yin_yang) + CrossEntropy(Y_pred_wu_xing, Y_true_wu_xing);
[0037] Among them, Y_pred_yin_yang is the prediction of the Yin-Yang attribute by the model, Y_true_yin_yang is the true Yin-Yang attribute label, Y_pred_wu_xing is the prediction of the Five-Element attribute by the model, and Y_true_wu_xing is the true Five-Element attribute label.
[0038] Preferably, the six-dimensional diagnosis loss function is: Loss_6 = Σ(w_i * MSE(D_i_pred, D_i_true));
[0039] Among them, w_i is the weight of the i-th diagnosis dimension, D_i_pred is the prediction of the i-th diagnosis dimension by the model, D_i_true is the true value of the i-th diagnosis dimension, and MSE is the mean square error function.
[0040] Preferably, the treatment principle loss function is: Loss_4 = λ1 * BCE(Bian_Zheng, Y_true) + λ2 * BCE(Zhi_Ben, Y_true) + λ3 * BCE(Fu_Zheng, Y_true) + λ4 * BCE(Yin_Yang, Y_true);
[0041] Among them, BCE is the binary cross-entropy loss function, Bian_Zheng is the prediction of syndrome differentiation and treatment, Zhi_Ben is the prediction of treating the disease by seeking the root cause, Fu_Zheng is the prediction of strengthening healthy qi and eliminating pathogenic factors, Yin_Yang is the prediction of adjusting Yin and Yang, Y_true is the historical medical records and 1264 clinical data, and λ1, λ2, λ3, and λ4 are the weight coefficients of Bian_Zheng, Zhi_Ben, Fu_Zheng, and Yin_Yang respectively.
[0042] Preferably, during the training iteration until the overall loss function of the traditional Chinese medicine diagnosis assistance model reaches the minimum value, that is, during the process of calculating the minimum value of the overall loss function, the gradient descent method is adopted. The gradient descent calculation formula is as follows: Among them, θ_t is the model parameter of the t-th iteration, that is, α, β, γ, and δ, and η is the learning rate. is the gradient of the total loss function.
[0043] Preferably, the calculation formula of the weighted scoring algorithm for the drug recommendation priority is as follows:
[0044]
[0045] Among them, Score(mi) is the comprehensive score of drug mi, wj is the weight of feature j, and f j (mi) is the performance of drug mi on feature j. Feature j includes the efficacy of the drug, the physical constitution of the patient, and the success rate of historical medical records.
[0046] Preferably, the process of training the traditional Chinese medicine diagnosis assistance model includes the following steps:
[0047] Extract a large amount of symptom and prescription data from historical 1264 system clinical medical records to form a medical training set with a clear and feasible guiding plan;
[0048] By cleaning and standardizing the medical training set, and then using natural language processing technology, extract key features from the input symptoms to form feature vectors for model training, and randomly divide the feature vectors into a training set, a validation set, and a test set;
[0049] Input the corresponding feature vectors in the training set and the validation set into the traditional Chinese medicine diagnosis assistance model respectively, and train the traditional Chinese medicine diagnosis assistance model using a multi-objective optimization algorithm based on the 1264 theory system;
[0050] After the traditional Chinese medicine diagnosis assistance model is trained, perform cross-validation to evaluate the performance of the traditional Chinese medicine diagnosis assistance model in actual applications.
[0051] Preferably, when performing word segmentation based on traditional Chinese medicine classics, use a word segmentation algorithm to decompose the symptom text into a set of words: W = Segment(S) = {w1, w2,..., wn}; where W is the word segmentation result, and w1, w2,...., wn are the words after word segmentation;
[0052] When performing semantic mapping and symptom normalization, use a knowledge database for disease matching: D = Retrieve(W, KnowledgeBase); where KnowledgeBase is the knowledge database of the disease explanation mapping set in the relevant reference literature of the Huang Yuanyu traditional Chinese medicine system, and D is the set of diseases retrieved from the knowledge base;
[0053] When retrieving drug combinations that match the diagnosis result according to the diagnosis result, use a drug database for drug recommendation: M = Retrieve(D, MedicineDatabase); where MedicineDatabase is the drug database containing the mapping set of diseases-related drugs and their indications, and M is the set of drugs retrieved from the drug database.
[0054] For a traditional Chinese medicine assisted diagnosis system and method described in the present invention, its beneficial effects are as follows:
[0055] The data preprocessing unit uses the word segmentation technology and semantic mapping algorithm of traditional Chinese medicine classics to convert non-standard inputs into standardized terms, establish a unified set of traditional Chinese medicine symptom terms, and eliminate expression ambiguities. The feature extraction unit extracts structured feature vectors from the symptom data based on Huang Yuanyu's traditional Chinese medicine system, Treatise on Febrile Diseases, and 1264 Clinical Methods for use in the diagnosis and reasoning of the diagnosis and reasoning unit and the training of the model training subunit, enabling the diagnosis and reasoning unit to dynamically balance the four types of constraints of the holistic concept, yin-yang and five elements, six-dimensional diagnosis, and treatment principles through weight coefficients (α, β, γ, δ), quickly identify complex symptoms, and give a diagnosis result. The drug listing and comparison unit retrieves drug combinations that match the diagnosis result based on the diagnosis result and the knowledge database constructed based on Huang Yuanyu's traditional Chinese medicine system, Treatise on Febrile Diseases, and 1264 Clinical Methods, quickly obtains drug information related to the symptoms, calculates the drug recommendation priority through a weighted scoring algorithm, takes into account the patient's constitution, historical medical records, and drug compatibility taboos, provides personalized drug recommendations, ensures the safety of the prescription, and improves the effectiveness of symptom-drug matching. Compared with traditional auxiliary traditional Chinese medicine diagnosis systems that rely on static knowledge bases and cannot be iteratively updated according to clinical feedback, resulting in outdated knowledge bases or degraded model performance, the feedback unit of this application constructs a dynamic feedback loop, records the physician's corrective operations on the recommended prescription, optimizes the model parameters, and updates the symptom-drug associations in the knowledge base, improving the accuracy of syndrome differentiation and treatment of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 is a structural block diagram of the traditional Chinese medicine auxiliary diagnosis system according to an embodiment of the present invention.
[0057] Figure 2 is a schematic flowchart of the method of the traditional Chinese medicine auxiliary diagnosis method according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0058] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0059] As Figure 1 shown, the present invention provides a traditional Chinese medicine auxiliary diagnosis system, including:
[0060] A data input unit for collecting the symptom text of the patient, where the symptom text includes the patient's symptoms, constitution, and the success rate of historical medical records;
[0061] A data preprocessing unit configured to perform standardized processing on the input symptom text, including word segmentation, semantic mapping, and symptom normalization based on traditional Chinese medicine classics, and converting non-standard descriptions into standardized traditional Chinese medicine disease terms;
[0062] A feature extraction unit configured to extract structured feature vectors from the preprocessed symptom data through natural language processing technology, including multi-dimensional representations of yin-yang attributes, five-element affiliations, six-channel syndrome differentiation, and qi-blood-body fluid states;
[0063] A diagnosis inference unit, configured to input a multi-dimensional representation into a pre-trained traditional Chinese medicine diagnosis assistance model, and obtain and output a diagnosis result;
[0064] A drug listing and comparison unit, configured to retrieve a drug combination matching the diagnosis result according to the diagnosis result and based on a knowledge database constructed according to the traditional Chinese medicine system of Huang Yuanyu, Treatise on Febrile Diseases, and 1264 Clinical Methods, and calculate the drug recommendation priority through a weighted scoring algorithm;
[0065] A feedback unit, which is used to record and analyze the evaluation of the prescription and diagnosis result recommended by the system by the doctor according to clinical experience and the actual situation of the patient, form a feedback database, and optimize the model and knowledge base through the data in the feedback database to achieve continuous iteration of the system;
[0066] The traditional Chinese medicine diagnosis assistance model is obtained by training a model training subunit provided in the diagnosis inference unit. Among them, the model training subunit is configured to train the traditional Chinese medicine diagnosis assistance model using a multi-objective optimization algorithm. The overall loss function of the traditional Chinese medicine diagnosis assistance model is: Loss_total = α * Loss_1 + β * Loss_2 + γ * Loss_6 + δ * Loss_4; where Loss_total is the overall loss function; Loss_1 is the overall concept loss function to ensure that the model prediction conforms to the principle of human integrity; Loss_2 is the yin-yang and five-element loss function to ensure that the prediction result conforms to the yin-yang and five-element theory; Loss_6 is the six-dimensional diagnosis loss function, comprehensively considering the six dimensions of inspection, auscultation and olfaction, interrogation, palpation, tongue, and pulse; Loss_4 is the treatment principle loss function to ensure compliance with the basic treatment principles of syndrome differentiation and treatment, treating the root cause of the disease, strengthening healthy qi and eliminating pathogenic factors, and adjusting yin and yang; α, β, γ, and δ are the weight coefficients of the overall concept loss function, the yin-yang and five-element loss function, the six-dimensional diagnosis loss function, and the treatment principle loss function respectively. The training is iterated until the overall loss function of the traditional Chinese medicine diagnosis assistance model is the minimum value, and the training is completed.
[0067] The data preprocessing unit uses the word segmentation technology and semantic mapping algorithm of traditional Chinese medicine classics to convert non-standard inputs into standardized terms, establish a unified set of traditional Chinese medicine symptom terms, and eliminate expression ambiguities; the feature extraction unit extracts structured feature vectors from the symptom data based on Huang Yuanyu's traditional Chinese medicine system, Treatise on Febrile Diseases, and 1264 Clinical Methods for use in the diagnosis and reasoning of the diagnosis and reasoning unit and the training of the model training subunit, enabling the diagnosis and reasoning unit to dynamically balance the four types of constraints of the holistic concept, yin-yang and the five elements, six-dimensional diagnosis, and treatment principles through the weight coefficients (α, β, γ, δ), quickly identify complex symptoms, and give a diagnosis result; the drug listing and comparison unit retrieves drug combinations that match the diagnosis result based on the diagnosis result and the knowledge database constructed based on Huang Yuanyu's traditional Chinese medicine system, Treatise on Febrile Diseases, and 1264 Clinical Methods, quickly obtains drug information related to the symptoms, calculates the drug recommendation priority through a weighted scoring algorithm, takes into account the patient's constitution, historical medical records, and drug compatibility taboos, provides personalized drug recommendations, ensures the safety of the prescription, and improves the effectiveness of symptom-drug matching; compared with traditional auxiliary traditional Chinese medicine diagnosis systems that rely on static knowledge bases and cannot be iteratively updated according to clinical feedback, resulting in outdated knowledge bases or degraded model performance, the feedback unit of this application constructs a dynamic feedback closed-loop, records the doctor's correction operations on the recommended prescription, optimizes the model parameters, and updates the symptom-drug associations in the knowledge base, improving the accuracy of syndrome differentiation and treatment of the system.
[0068] As Figure 2 shown, the present invention also provides a traditional Chinese medicine assisted diagnosis method, including the following steps:
[0069] Input the symptom text of the patient, where the symptom text includes the patient's symptoms, constitution, and the success rate of historical medical records;
[0070] Perform standardized processing on the input symptom text, including word segmentation, semantic mapping, and symptom normalization based on traditional Chinese medicine classics, and convert non-standard descriptions into standardized traditional Chinese medicine disease terms;
[0071] Extract structured feature vectors from the preprocessed symptom data through natural language processing technology, including multi-dimensional representations of yin-yang attributes, five-element attributions, six-meridian syndrome differentiation, and qi, blood, and body fluid states;
[0072] Input the multi-dimensional representation into a pre-trained traditional Chinese medicine diagnosis assistance model to obtain and output a diagnosis result;
[0073] According to the diagnosis result and based on the knowledge database constructed based on Huang Yuanyu's traditional Chinese medicine system, Treatise on Febrile Diseases, and 1264 Clinical Methods, retrieve drug combinations that match the diagnosis result, and calculate the drug recommendation priority through a weighted scoring algorithm;
[0074] Record and analyze the evaluations made by doctors on the prescribed formulas and diagnostic results recommended by the system based on clinical experience and the actual conditions of patients, form a feedback database, and optimize the model and knowledge base through the data in the feedback database to achieve continuous iteration of the system;
[0075] The traditional Chinese medicine diagnosis assistance model is trained using a multi-objective optimization algorithm. The overall loss function of the model is: Loss_total = α * Loss_1 + β * Loss_2 + γ * Loss_6 + δ * Loss_4; where Loss_total is the overall loss function; Loss_1 is the holistic concept loss function to ensure that the model prediction conforms to the principle of human holism; Loss_2 is the yin-yang and five-element loss function to ensure that the prediction result conforms to the yin-yang and five-element theory; Loss_6 is the six-dimensional diagnosis loss function, comprehensively considering the six dimensions of inspection, auscultation and olfaction, inquiry, palpation, tongue and pulse; Loss_4 is the treatment principle loss function to ensure compliance with the basic treatment principles of syndrome differentiation and treatment, treating the root cause of the disease, strengthening the healthy qi and eliminating pathogenic factors, and adjusting yin and yang; α, β, γ, and δ are the weight coefficients of the holistic concept loss function, yin-yang and five-element loss function, six-dimensional diagnosis loss function, and treatment principle loss function respectively. Train and iterate until the overall loss function of the traditional Chinese medicine diagnosis assistance model reaches the minimum value to complete the training.
[0076] Through the word segmentation technology and semantic mapping algorithm of traditional Chinese medicine classics, convert non-standard inputs into standardized terms, establish a unified traditional Chinese medicine symptom terminology, and eliminate expression ambiguities; extract structured feature vectors from symptom data based on the Huang Yuanyu traditional Chinese medicine system, Treatise on Febrile Diseases, and 1264 Clinical Methods for use in the diagnosis reasoning of the diagnosis reasoning unit and the training of the model training subunit, enabling the diagnosis reasoning unit to dynamically balance the four types of constraints of the holistic concept, yin-yang and five elements, six-dimensional diagnosis, and treatment principles through the weight coefficients (α, β, γ, δ), quickly identify complex symptoms, and give a diagnosis result; according to the diagnosis result and based on the knowledge database constructed by the Huang Yuanyu traditional Chinese medicine system, Treatise on Febrile Diseases, and 1264 Clinical Methods, retrieve the drug combinations that match the diagnosis result, quickly obtain drug information related to the symptoms, and calculate the drug recommendation priority through a weighted scoring algorithm, taking into account the patient's constitution, historical medical records, and drug compatibility taboos, providing personalized drug recommendations, ensuring the safety of the prescribed formulas, and at the same time improving the effectiveness of symptom-drug matching; compared with traditional traditional Chinese medicine diagnosis assistance systems that rely on static knowledge bases and cannot be iteratively updated according to clinical feedback, resulting in outdated knowledge bases or degraded model performance, this application constructs a dynamic feedback closed-loop, records the doctor's corrective operations on the recommended prescribed formulas, optimizes the model parameters, and updates the symptom-drug associations in the knowledge base, improving the accuracy of syndrome differentiation and treatment of the system.
[0077] Preferably, the holistic concept loss function is: Loss_1 = ||f(S_whole) - Σf(S_i)||2;
[0078] Among them, \(S_{whole}\) is the overall symptom representation of the patient; \(S_i\) is the single symptom representation; \(f\) is the model prediction function; \(\|\cdot\|_2\) is the L2 norm, which is used to measure the difference between the overall prediction and the local prediction;
[0079] \(S_{whole} = [V_{yin_yang}, V_{wu_xing}, V_{liu_jing}, V_{qi_xue}]\);
[0080] \(V_{yin_yang}\) is the yin-yang attribute vector, representing the overall yin-yang imbalance state of the patient, including: yang deficiency index (0 - 1), yin deficiency index (0 - 1), yang excess index (0 - 1), and yin excess index (0 - 1);
[0081] \(V_{wu_xing}\) is the five - element attribute vector, representing the functional states of the five zang - organs of the patient, including: liver function index (wood, 0 - 1), heart function index (fire, 0 - 1), spleen function index (earth, 0 - 1), lung function index (metal, 0 - 1), and kidney function index (water, 0 - 1);
[0082] \(V_{liu_jing}\) is the six - channel syndrome differentiation vector, representing the six - channel disease locations of the patient, including: taiyang disease index, yangming disease index, shaoyang disease index, taiyin disease index, shaoyin disease index, and jueyin disease index;
[0083] \(V_{qi_xue}\) is the qi - blood - body - fluid vector, representing the qi - blood - body - fluid state of the patient, including: qi deficiency index, qi stagnation index, blood deficiency index, blood stasis index, body - fluid deficiency index, and phlegm - dampness index;
[0084] \(S_i = [basic symptom attributes, symptom yin - yang attributes, symptom five - element attribution, symptom six - channel attribution, symptom manifestation characteristics]\);
[0085] The basic symptom attributes include: symptom name (such as headache, diarrhea, etc.), symptom severity (0 - 1), and symptom duration (short - term / long - term);
[0086] The symptom yin - yang attributes include: yin syndrome index (0 - 1) and yang syndrome index (0 - 1);
[0087] The symptom five - element attribution includes: wood attribute index (0 - 1), fire attribute index (0 - 1), earth attribute index (0 - 1), metal attribute index (0 - 1), and water attribute index (0 - 1);
[0088] The symptom six - channel attribution includes: taiyang meridian index (0 - 1), yangming meridian index (0 - 1), shaoyang meridian index (0 - 1), taiyin meridian index (0 - 1), shaoyin meridian index (0 - 1), and jueyin meridian index (0 - 1);
[0089] The symptom manifestation characteristics include: cold-heat index (from cold -1 to heat +1), deficiency-excess index (from deficiency -1 to excess +1), and exterior-interior index (from exterior -1 to interior +1);
[0090] The model prediction function is f(S) = W × S + b; where S is the input symptom representation vector, which can be the overall representation S_whole or a single symptom representation S_i; W is the weight matrix, representing the association strength between symptoms and drugs; b is the bias vector, representing the basic recommendation value for each drug; × is the matrix multiplication operator.
[0091] By using the L2 norm constraint ||f(S_whole)-Σf(S_i)||2 of the holistic concept loss function (Loss_1), it ensures that the system achieves a dynamic balance between local symptom analysis (S_i) and overall syndrome differentiation (S_whole), effectively solving the problem of syndrome differentiation bias of "seeing symptoms but not the patient" in traditional algorithms.
[0092] The overall symptom representation of the patient comprehensively depicts the patient's state through multi-dimensional vectors (yin-yang, five elements, six meridians, qi and blood and body fluids), and then combines with the single symptom representation to comprehensively depict the symptom state through multi-dimensional vectors (yin-yang, five elements, six meridians, qi and blood and body fluids), improving the systematicness of diagnosis.
[0093] For example, the symptom manifestation characteristics of the symptom of headache may be:
[0094] Symptom name: headache;
[0095] Severity: 0.7;
[0096] Duration: short-term;
[0097] Yin syndrome index: 0.3;
[0098] Yang syndrome index: 0.7;
[0099] Wood element index: 0.8 (headache due to hyperactivity of liver-yang);
[0100] Fire element index: 0.6;
[0101] Taiyang meridian index: 0.7 (pain at the back of the head);
[0102] Cold-heat index: 0.5 (slightly hot);
[0103] Deficiency-excess index: 0.6 (slightly excess);
[0104] Exterior-interior index: -0.2 (slightly exterior).
[0105] Preferably, the Yin-Yang and Five-Element loss function is: Loss_2 = CrossEntropy(Y_pred_yin_yang, Y_true_yin_yang) + CrossEntropy(Y_pred_wu_xing, Y_true_wu_xing);
[0106] Among them, Y_pred_yin_yang is the prediction of the Yin-Yang attribute by the model, Y_true_yin_yang is the true Yin-Yang attribute label, Y_pred_wu_xing is the prediction of the Five-Element attribute by the model, and Y_true_wu_xing is the true Five-Element attribute label.
[0107] By calculating the Yin-Yang and Five-Element loss function, the difference between the model prediction probability and the actual label is measured, and the cross-entropy loss optimizes the classification task, thereby effectively guiding the model to reduce the prediction error during training and improving the prediction accuracy of the Yin-Yang attribute and the Five-Element attribution.
[0108] Preferably, the six-dimensional diagnosis loss function is: Loss_6 = Σ(w_i * MSE(D_i_pred, D_i_true));
[0109] Among them, w_i is the weight of the i-th diagnosis dimension, D_i_pred is the prediction of the i-th diagnosis dimension by the model, D_i_true is the true value of the i-th diagnosis dimension, and MSE is the mean square error function.
[0110] Using the six-dimensional diagnosis loss function Loss_6 = Σ(w_i * MSE(D_i_pred, D_i_true)), the weighted error correction is performed on the six dimensions of inspection, auscultation and olfaction, interrogation, palpation of the radial artery and tongue, which improves the prediction accuracy.
[0111] Preferably, the treatment principle loss function is: Loss_4 = λ1 * BCE(Bian_Zheng, Y_true) + λ2 * BCE(Zhi_Ben, Y_true) + λ3 * BCE(Fu_Zheng, Y_true) + λ4 * BCE(Yin_Yang, Y_true);
[0112] Among them, BCE is the binary cross-entropy loss function, Bian_Zheng is the prediction of syndrome differentiation and treatment, Zhi_Ben is the prediction of treating the disease by seeking the root cause, Fu_Zheng is the prediction of strengthening healthy qi and eliminating pathogenic factors, Yin_Yang is the prediction of adjusting Yin and Yang, Y_true is the historical medical records and 1264 clinical data, and λ1, λ2, λ3, and λ4 are the weight coefficients of Bian_Zheng, Zhi_Ben, Fu_Zheng, and Yin_Yang respectively.
[0113] By calculating the treatment principle loss function, the difference between the model's predicted probability and the actual label is measured, thereby effectively guiding the model to reduce prediction errors during training and improving classification accuracy.
[0114] Preferably, during the training iteration until the overall loss function of the traditional Chinese medicine diagnosis assistance model reaches the minimum value, that is, during the process of calculating the minimum value of the overall loss function, the gradient descent method is adopted. The gradient descent calculation formula is as follows: where θ_t is the model parameter at the t-th iteration, namely α, β, γ, and δ, and η is the learning rate. is the gradient of the total loss function.
[0115] Model training adopts gradient descent optimization. Combined with the three-stage dataset division (training set, validation set, test set), the model maintains a high stable diagnostic accuracy rate in cross-validation, which is significantly better than the diagnostic accuracy rate of traditional machine learning models.
[0116] Preferably, the calculation formula of the weighted scoring algorithm for drug recommendation priority is as follows:
[0117]
[0118] where Score(mi) is the comprehensive score of drug mi, wj is the weight of feature j, and f j (mi) is the performance of drug mi on feature j. Feature j includes the efficacy of the drug, the patient's constitution, and the success rate of historical medical records.
[0119] Through the weighted scoring algorithm, the effectiveness of the retrieved drugs is evaluated. Considering the efficacy of the drugs, the specific symptoms, constitution, and the success rate of historical medical records of the patients are also combined for comprehensive evaluation to identify the most suitable drug combination, thereby providing a precise treatment plan for doctors. In addition, the process of drug listing and comparison will also take into account the individual differences of different patients to ensure that the recommended drugs can meet the specific needs of the patients. Through this purposeful drug listing and comparison, the system can effectively improve the accuracy of traditional Chinese medicine diagnosis and the effectiveness of treatment, and provide more scientific and personalized medical services for patients.
[0120] For example, assume the scores of the drug "White Peony Root" are as follows:
[0121] Efficacy: 4 (out of 5 full marks);
[0122] Indication matching degree: 5 (out of 5 full marks);
[0123] Historical success rate: 3 (out of 5 full marks);
[0124] Then its comprehensive score is: Score(White Peony Root) = 0.5 * 4 + 0.3 * 5 + 0.2 * 3 = 4.1.
[0125] The method of listing and comparing drugs solves the following pain points:
[0126] Information asymmetry: When faced with complex symptoms, doctors can quickly obtain drug information related to the symptoms, reducing the time for consulting the literature.
[0127] Personalized treatment: By analyzing the specific symptoms of patients, the system can provide personalized drug recommendations, improving the pertinence and effectiveness of treatment.
[0128] Reducing misdiagnosis: By combining historical medical records and drug effects, the system can reduce the misdiagnosis rate and improve the accuracy of diagnosis.
[0129] Preferably, the process of training the traditional Chinese medicine diagnosis assistance model includes the following steps:
[0130] Extract a large amount of symptom and prescription data from the historical 1264 system clinical medical records to form a medical training set with clear and feasible guiding solutions;
[0131] By cleaning and standardizing the medical training set, and then using natural language processing technology, extract key features from the input symptoms to form feature vectors for model training, and randomly divide the feature vectors into training sets, validation sets, and test sets;
[0132] Respectively input the feature vectors in the corresponding training sets and validation sets into the traditional Chinese medicine diagnosis assistance model, and train the traditional Chinese medicine diagnosis assistance model using a multi-objective optimization algorithm based on the 1264 theory system;
[0133] After the training of the traditional Chinese medicine diagnosis assistance model is completed, perform cross-validation to evaluate the performance of the traditional Chinese medicine diagnosis assistance model in actual applications.
[0134] Preferably, when performing word segmentation based on traditional Chinese medicine classics, use a word segmentation algorithm to decompose the symptom text into a set of words: W = Segment(S) = {w1, w2,..., wn}; where W is the word segmentation result, and w1, w2,...., wn are the words after word segmentation;
[0135] When performing semantic mapping and symptom normalization, use a knowledge database for disease matching: D = Retrieve(W, KnowledgeBase); where KnowledgeBase is the knowledge database of the disease explanation mapping set in the relevant reference literature of the Huang Yuanyu traditional Chinese medicine system, and D is the set of diseases retrieved from the knowledge base;
[0136] When retrieving a drug combination that matches the diagnosis result according to the diagnosis result, a drug database is used for drug recommendation: M = Retrieve(D, MedicineDatabase); where MedicineDatabase is a drug database containing the mapping set of drugs related to diseases and their indications, and M is the set of drugs retrieved from the drug database.
[0137] Example 1: The input is "My skull hurts". During the conventional data tokenization process, it will be split into three word tokens: "My", "skull", and "hurts". The skull generally refers to the entire head in Chinese vocabulary, and the words may not necessarily be recognized as relevant medical terms. There are a large number of slang words in life that are different from traditional Chinese medical terms.
[0138] Example 2: The input is "I feel something moving in my stomach". During the conventional data tokenization process, the system may split it into five word tokens: "I", "feel", "in my stomach", "there is something", and "moving". There are no similar pathological description words when parsing the word tokens alone. This kind of disease requires clinical judgment and summary.
[0139] To solve this problem, the data preprocessing algorithm splits the input text appropriately and then compares it with the knowledge database. "My skull hurts" can be mapped and recognized as "headache" or "pain in Baihui acupoint"; "I feel something moving in my stomach", the system can recognize it as "ascariasis syncope" or "borborygmus".
[0140] For example, for the recognized disease "headache", the system may retrieve the following drugs:
[0141] White peony root: Used to relieve headache and harmonize nutrient qi and defensive qi.
[0142] Chuanxiong rhizome: Promote blood circulation to remove blood stasis and is commonly used to treat headache.
[0143] Peppermint: Clear heat and detoxify, suitable for wind-heat headache.
[0144] The following is a real case of using the traditional Chinese medicine assisted diagnosis system:
[0145] Basic information of the patient: Zhang, female, 12 years old.
[0146] Symptoms: The patient's parents reported that the patient had a cold and fever the week before, and the cold improved after taking western medicine. The day before yesterday, after school, he felt tired and did not eat. He felt uncomfortable and bloated in the stomach when he woke up early yesterday. After eating breakfast reluctantly, the bloating worsened. He vomited in the morning, and the vomitus was the contents of the stomach. At the same time, he had diarrhea and his stool was not formed. He had diarrhea three times a day, without obvious odor, and no burning sensation in the anus. He still feels uncomfortable and bloated in the stomach, does not want to eat, has a slightly dry mouth, but does not drink much water, has a bitter mouth, a bland mouth, and eats little. He had a bowel movement this morning, which was still loose stools, without obvious abdominal pain, and no coldness around the navel. Recently, due to the high pressure of study, his mood is unstable, he is easily irritable and anxious, loves to get angry, and loves to sulk. He complained that he sometimes felt bloated and uncomfortable in the upper abdomen, especially under the xiphoid process of the heart, which was obvious after eating.
[0147] Core complaint: Vomiting and diarrhea for one day.
[0148] The hospital prescribed the following medicine for the patient: Coptis chinensis, Scutellaria baicalensis, Pinellia ternata, Codonopsis pilosula, dried ginger, roasted licorice, and jujube.
[0149] Input the above symptom description into the TCM auxiliary diagnosis system.
[0150] The system's diagnosis results show that the system gives the following syndrome distributions: stomach cold (29.58%), middle qi deficiency (26.76%), muscle fire (12.68%), lung cold (11.27%), yin deficiency (5.63%), and liver wind (5.63%).
[0151] System recommended prescription:
[0152] Prescription for stomach cold: 12g of Pinellia ternata, 8g of Magnolia officinalis, Liushenqu, and 12g of Citrus aurantium;
[0153] Prescription for deficiency of middle qi: dried ginger 8g, wheat and licorice 8g, cherry rice 25g, and Poria 16g;
[0154] Muscle fire formula: Bupleurum 12g, White Peony 16g, Scutellaria 8g;
[0155] Lung cold formula: almond 8g, peach peel 8g;
[0156] Prescription for Yin deficiency: Ophiopogon japonicus 12g.
[0157] In this case, the change from 7 herbs in the original hospital prescription to 14 herbs reflects the system's profound understanding and innovative application of classic medical works such as "Treatise on Febrile Diseases". This change is not a simple addition of herbs, but a precise adjustment based on the core theory of "Banxia Xiexin Decoction", combined with modern clinical experience, through the system's multi-dimensional analysis of the pathogenesis.
[0158] Theoretical basis for prescription expansion: The system retains the core drugs of the original prescription (Pinellia, Citrus aurantium, Scutellaria baicalensis, dried ginger, Licorice, etc.), extends the application of the theory of classical prescriptions, and optimizes the prescriptions based on the following three dimensions: adhering to the compatibility principle of "using both cold and heat" in "Treatise on Febrile Diseases"; supplementing the original prescription with drug pairs that harmonize yin and yang; and embodying the concept of "seeking the root cause of the disease to cure it".
[0159] Precise matching of individual characteristics: drug combinations are made according to the specific syndrome distribution of the patient, the dosage is adjusted considering the patient's age characteristics (12 years old), drugs for strengthening the body and eliminating pathogens are added in a targeted manner, the overall regulation system is optimized, the drug combination for strengthening the spleen and stomach is increased, drugs for regulating Qi are supplemented, and auxiliary drugs for improving symptoms are added.
[0160] The effects of the medicine prescribed by the TCM auxiliary diagnosis system on patients are significantly better than those prescribed by the hospital.
[0161] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the distribution network technical transformation method for improving operating effects by taking key indicators into account in the above-mentioned embodiment is implemented.
[0162] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the recognition model training method in the above embodiment is implemented, or when the computer program is executed by a processor, a traditional Chinese medicine auxiliary diagnosis method in the above embodiment is implemented.
[0163] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by hardware related to computer program instructions. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0164] As described above, the above are only preferred embodiments of the present invention, and do not impose any limitation on the technical scope of the present invention. Therefore, any minor modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention still fall within the scope of the technical solutions of the present invention.
Claims
1. A TCM-assisted diagnosis system, characterized in that: include: A data input unit is used to collect the patient's symptom text, which includes the patient's symptoms, constitution and the success rate of historical medical records; A data preprocessing unit is configured to perform standardization processing on the input symptom text, including word segmentation, semantic mapping and symptom normalization based on TCM classics, and convert non-standard descriptions into standardized TCM disease terms; A feature extraction unit is configured to extract a structured feature vector from the preprocessed symptom data by natural language processing technology, including multi-dimensional representations of yin-yang attributes, five-element attribution, six-channel syndrome differentiation, and qi, blood, and body fluid states; The diagnostic reasoning unit is configured to input the multi-dimensional representation into a pre-trained TCM diagnostic auxiliary model to obtain and output a diagnostic result; The drug listing and comparison unit is configured to retrieve drug combinations matching the diagnosis results based on the diagnosis results and the knowledge database constructed based on Huang Yuanyu's TCM system, Treatise on Febrile Diseases and 1264 clinical methods, and calculate the priority of drug recommendation through a weighted scoring algorithm; The feedback unit is configured to record and analyze the evaluation of the prescriptions and diagnostic results recommended by the system based on the doctor's clinical experience and the actual situation of the patient, to form a feedback database, and to optimize the model and knowledge base through the data in the feedback database to achieve continuous iteration of the system; The TCM diagnosis auxiliary model is obtained by training a model training subunit provided in the diagnosis reasoning unit, wherein the model training subunit is configured to train the TCM diagnosis auxiliary model using a multi-objective optimization algorithm, and the overall loss function of the TCM diagnosis auxiliary model is: Loss_total = α*Loss_1+β*Loss_2+γ*Loss_6+δ*Loss_4; wherein Loss_total is the overall loss function; Loss_1 is the overall concept loss function, ensuring that the model prediction conforms to the principle of human integrity; Loss_2 is the Yin-Yang and Five Elements loss function, which ensures that the prediction results are in line with the Yin-Yang and Five Elements theory; Loss_6 is the six-dimensional diagnosis loss function, which comprehensively considers the six dimensions of observation, auscultation, questioning, palpation, tongue and pulse; Loss_4 is the treatment principle loss function, which ensures compliance with the basic treatment principles of syndrome differentiation and treatment, treating the root of the disease, strengthening the body and eliminating evil, and adjusting Yin and Yang; α, β, γ and δ are the weight coefficients of the overall concept loss function, the Yin-Yang and Five Elements loss function, the six-dimensional diagnosis loss function and the treatment principle loss function, respectively. The training is iterated until the overall loss function of the TCM diagnosis auxiliary model is the minimum, and the training is completed.
2. A TCM-assisted diagnosis method, characterized in that: The following steps are involved: Enter the patient's symptom text, which includes the patient's symptoms, constitution, and the success rate of historical medical records; Standardize the input symptom text, including word segmentation, semantic mapping and symptom normalization based on TCM classics, and convert non-standard descriptions into standardized TCM disease terms; Through natural language processing technology, structured feature vectors are extracted from the pre-processed symptom data, including multi-dimensional representations of yin-yang attributes, five elements attribution, six meridian syndrome differentiation, and qi, blood, and body fluid status; Input the multi-dimensional representation into the pre-trained TCM diagnosis auxiliary model to obtain and output the diagnosis result; According to the diagnosis results and the knowledge database built based on Huang Yuanyu's TCM system, Treatise on Febrile Diseases and 1264 clinical methods, the drug combination matching the diagnosis results is retrieved, and the priority of drug recommendation is calculated through a weighted scoring algorithm; Record and analyze the evaluation of the prescriptions and diagnostic results recommended by the system based on the doctors' clinical experience and the actual situation of the patients, form a feedback database, optimize the model and knowledge base through the data in the feedback database, and realize the continuous iteration of the system; The TCM diagnosis auxiliary model is trained using a multi-objective optimization algorithm, and the overall loss function of the TCM diagnosis auxiliary model is: Loss_total = α*Loss_1+β*Loss_2+γ*Loss_6+δ*Loss_4; where Loss_total is the overall loss function; Loss_1 is the overall concept loss function, which ensures that the model prediction conforms to the principle of human integrity; Loss_2 is the Yin-Yang and Five Elements loss function, which ensures that the prediction results conform to the Yin-Yang and Five Elements theory; Loss_6 is the six-dimensional diagnosis loss function, which comprehensively considers the six dimensions of observation, auscultation, questioning, palpation, tongue and pulse; Loss_4 is the treatment principle loss function, which ensures that it conforms to the basic treatment principles of syndrome differentiation and treatment, treating the disease at its root, strengthening the body and eliminating evil, and adjusting Yin and Yang; α, β, γ and δ are the weight coefficients of the overall concept loss function, the Yin-Yang and Five Elements loss function, the six-dimensional diagnosis loss function and the treatment principle loss function, respectively. The training is iterated until the overall loss function of the TCM diagnosis auxiliary model is the minimum, and the training is completed.
3. The TCM-assisted diagnosis method according to claim 2, characterized in that: The overall concept loss function is: Loss_1 = ||f(S_whole)-Σf(S_i)||2; Among them, S_whole is the overall symptom representation of the patient; S_i is the single symptom representation; f is the model prediction function; ||·||2 is the L2 norm, which is used to measure the difference between the overall prediction and the local prediction; S_whole=[V_yin_yang,V_wu_xing,V_liu_jing,V_qi_xue]; V_yin_yang is the yin-yang attribute vector, which indicates the overall yin-yang imbalance of the patient, including: yang deficiency index, yin deficiency index, yang excess index, and yin excess index; V_wu_xing is a five-element attribute vector, which indicates the functional status of the five internal organs of the patient, including liver function index, heart function index, spleen function index, lung function index and kidney function index; V_liu_jing is the six meridian syndrome differentiation vector, which indicates the six meridian disease positions of the patient, including: Taiyang disease index, Yangming disease index, Shaoyang disease index, Taiyin disease index, Shaoyin disease index and Jueyin disease index; V_qi_xue is the vector of qi, blood, body fluids, which indicates the status of the patient's qi, blood, body fluids, including: qi deficiency index, qi stagnation index, blood deficiency index, blood stasis index, body fluid deficiency index and phlegm dampness index; S_i=[symptom basic attributes, symptom yin and yang attributes, symptom five elements affiliation, symptom six meridian affiliation, symptom manifestation characteristics]; The basic attributes of symptoms include: symptom name, symptom severity and symptom duration; The Yin-Yang attributes of symptoms include: Yin-Symptom Index and Yang-Symptom Index; The five elements of symptoms include: wood attribute index, fire attribute index, earth attribute index, metal attribute index and water attribute index; Symptoms belonging to the six meridians include: Taiyang meridian index, Yangming meridian index, Shaoyang meridian index, Taiyin meridian index, Shaoyin meridian index and Jueyin meridian index; Symptom manifestation characteristics include: cold and heat index, deficiency and excess index, and exterior and interior index; The model prediction function is f(S)=W×S+b; where S is the input symptom representation vector, which is the overall representation S_whole or the individual symptom representation S_i; W is the weight matrix, which represents the strength of the association between symptoms and drugs; b is the bias vector, which represents the basic recommended value of each drug; and × is the matrix multiplication operator.
4. The TCM-assisted diagnosis method according to claim 2, characterized in that: The Yin-Yang and Five Elements loss function is: Loss_2 = CrossEntropy(Y_pred_yin_yang, Y_true_yin_yang) + CrossEntropy(Y_pred_wu_xing, Y_true_wu_xing); Among them, Y_pred_yin_yang is the model's prediction of the Yin-Yang attribute, Y_true_yin_yang is the true Yin-Yang attribute label, Y_pred_wu_xing is the model's prediction of the Five Elements attribute, and Y_true_wu_xing is the true Five Elements attribute label.
5. The TCM-assisted diagnosis method according to claim 2, characterized in that: The six-dimensional diagnosis loss function is: Loss_6 = Σ(w_i*MSE(D_i_pred, D_i_true)); Among them, w_i is the weight of the i-th diagnostic dimension, D_i_pred is the model's prediction of the i-th diagnostic dimension, D_i_true is the true value of the i-th diagnostic dimension, and MSE is the mean square error function.
6. The TCM-assisted diagnosis method according to claim 2, characterized in that: The treatment principle loss function is: Loss_4 = λ1*BCE(Bian_Zheng, Y_true)+λ2*BCE(Zhi_Ben, Y_true)+λ3*BCE(Fu_Zheng, Y_true)+λ4*BCE(Yin_Yang, Y_true); Among them, BCE is the binary cross entropy loss function, Bian_Zheng is the prediction of syndrome differentiation and treatment, Zhi_Ben is the prediction of treating the root of the disease, Fu_Zheng is the prediction of strengthening the body and eliminating evil, Yin_Yang is the prediction of adjusting yin and yang, Y_true is the historical medical records and 1264 clinical data, λ1, λ2, λ3 and λ4 are the weight coefficients of Bian_Zheng, Zhi_Ben, Fu_Zheng and Yin_Yang respectively.
7. The TCM-assisted diagnosis method according to claim 2, characterized in that: In the process of training iteration until the overall loss function of the TCM diagnosis auxiliary model is the minimum, that is, in the process of calculating the minimum value of the overall loss function, the gradient descent method is used. The gradient descent calculation formula is as follows: θ_t+1=θ_t-η* Among them, θ_t is the model parameter of the tth iteration, namely α, β, γ and δ, η is the learning rate, is the gradient of the total loss function.
8. The TCM-assisted diagnosis method according to claim 2, characterized in that: The weighted scoring algorithm calculation formula for drug recommendation priority is as follows: Among them, Score(mi) is the comprehensive score of drug mi, wj is the weight of feature j, and f j (mi) is the performance of drug mi on feature j, which includes the efficacy of the drug, the patient's constitution and the success rate of historical medical records.
9. The TCM-assisted diagnosis method according to claim 2, characterized in that: The training process of the TCM diagnosis auxiliary model includes the following steps: A large amount of symptom and prescription data will be extracted from the historical 1264 system clinical medical records to form a medical training set; By cleaning and standardizing the medical training set, and then using natural language processing technology, key features are extracted from the input symptoms to form feature vectors that can be used for model training, and the feature vectors are randomly divided into training sets, validation sets, and test sets; The feature vectors in the corresponding training set and validation set are respectively input into the TCM diagnosis auxiliary model, and the TCM diagnosis auxiliary model is trained using a multi-objective optimization algorithm; After the training of the TCM diagnosis auxiliary model is completed, cross-validation is performed to evaluate the performance of the TCM diagnosis auxiliary model in practical applications.
10. The TCM-assisted diagnosis method according to claim 2, characterized in that: When segmenting words based on TCM classics, a segmentation algorithm is used to decompose the symptom text into a word set: W = Segment (S) = {w1, w2, ..., wn}; where W is the segmentation result, and w1, w2, ..., wn are the words after segmentation; During semantic mapping and symptom normalization, the knowledge database is used for symptom matching: D = Retrieve (W, KnowledgeBase); wherein KnowledgeBase is the knowledge database of the symptom explanation mapping set in the references related to Huang Yuanyu's TCM system, and D is the symptom set retrieved from the knowledge base; When retrieving a drug combination that matches the diagnosis result based on the diagnosis result, the drug database is used for drug recommendation: M=Retrieve(D, MedicineDatabase); wherein, MedicineDatabase contains a drug database of disease-related drugs and their indication mapping sets, and M is a drug set retrieved from the drug database.