TCM syndrome differentiation and / or prescription selection system based on tensor structure and its construction method
Through the tensor structure-based method, the Chinese medicine diagnosis and treatment term are marked, which achieves high accuracy matching between traditional Chinese medicine diagnosis and treatment information and prescription information, and solves the problems of inaccurate matching and lack of explanatory interpretation in the prior art.
Patent Information
- Application Number
- CN202411849362.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-12-16
AI Technical Summary
The prior art is difficult to achieve high accuracy matching between traditional Chinese medicine diagnosis and treatment information and prescription information, and lacks interpretability.
The tensor structure-based method is used to mark the Chinese medicine diagnosis and treatment terms, and the properties and treatment methods of traditional Chinese medicine are represented by multi-dimensional arrays, and the cosine similarity calculation is used to achieve the matching of traditional Chinese medicine diagnosis and treatment information and traditional Chinese medicine information.
It achieves a fast and accurate matching between traditional Chinese medicine diagnosis and treatment information and prescription information, conforms to the dialectical treatment theory of traditional Chinese medicine, is interpretable, and can quickly, accurately and visually realize the dialectical and prescription selection of traditional Chinese medicine diseases.
Smart Images

Figure CN119314682B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical information technology, and in particular to a tensor-structure-based Chinese medicine syndrome differentiation and / or prescription selection system and a construction method thereof. Background Art
[0002] TCM terminology includes two categories: diagnostic terminology and therapeutic terminology, which correspond to the dialectic and treatment of TCM practice activities. Diagnostic terminology includes disease name, symptom (sign), syndrome type, etiology and pathogenesis, pathological products and some TCM physiological terms; therapeutic terminology includes treatment method name, prescription name, Chinese medicine name, acupoint name and its operation (acupuncture, moxibustion, cupping, scraping, massage), etc. From another perspective, the process of TCM dialectic treatment is to find the connection and mapping from diagnostic terminology to therapeutic terminology under the guidance of TCM theory. For example, TCM obtains the patient's complexion, expression, tongue image, voice, smell, chief complaint, symptoms, pulse or other signs through the "four examinations" of observation, smell, questioning and palpation, which together constitute the symptom (sign) terminology; then, under the guidance of TCM physiological and pathological theories, the etiology and pathogenesis are inferred, the syndrome type is identified, and the TCM dialectic process is completed; on this basis, the treatment method is established, and the appropriate prescription, Chinese medicine or acupoint (and its operation) is selected to complete the TCM treatment process. It can be seen from the process that symptom terms are the input end, Chinese medicine names or acupoints (and their operations) are the output end, and syndrome terms and prescription names are the display and connection points of the process.
[0003] Among them, Chinese patent medicine is also a prescription, which is made of several Chinese herbal medicine slices according to certain proportions and method standards into a dosage form of certain specifications, and can be directly used for the prevention and treatment of diseases. In other words, the name of the Chinese patent medicine is equal to the name of the prescription, which is composed of several Chinese medicine names according to different weights and nonlinear combinations. The application history of Chinese classic prescriptions (including the corresponding Chinese patent medicines) is long and wide, and it has played an important role in disease prevention and treatment. However, there are many unreasonable uses of Chinese patent medicines at present. According to incomplete statistics, about 70% of Chinese patent medicines in my country are prescribed by Western medicine physicians in general hospitals, and the clinical unreasonable use rate is about four layers, which is mainly manifested in inaccurate dialectics, unreasonable combination of drugs, improper usage and dosage, and unclear course of treatment. Among them, the reasons for inaccurate dialectics and unreasonable combination of drugs are mainly due to the fact that the characteristics of Chinese medicine "dialectical treatment" have not been understood. Chinese medicine prescriptions are formulated according to Chinese medicine theory for certain diseases and symptoms. In use, it is necessary to select medicines according to Chinese medicine theory, or select medicines based on disease and syndrome. There are characteristics such as "different treatments for the same disease" and "same treatment for different diseases". Therefore, "dialectics", that is, establishing a connection between patient diagnosis and treatment information and Chinese medicine prescriptions in accordance with TCM theory and achieving a reasonable match between the two, is the key to reducing the irrational use rate of Chinese medicine prescriptions.
[0004] At present, some progress has been made in matching patient diagnosis and treatment information with drug information. Liu Zhenping, Yuan Hong et al., Li Xueming et al., and Cao Qingheng respectively started from the number of symptom characteristics of diagnosis and treatment information and drug indication information, established an index database from clinical data-limited keywords, extracted information and data from literature information-limited subject terms to construct weighted heterogeneous graphs and sort them, and used the text character matching method to solve the problem of "presence or absence" of symptom characteristics to achieve matching, but did not match from the perspective of semantic relationship and Chinese medicine dialectical logic. Li Shao et al. used natural language processing technology to extract the semantic relationship between diagnosis and treatment information and Chinese medicine indications and contraindications from the corpus of Chinese and Western medical terms and the corpus of Chinese medicine-related terms to match, which to a certain extent reflects the semantic relevance of the Chinese medicine category, but the process lacks interpretability from the perspective of "dialectical treatment".
[0005] TCM dialectical treatment is to describe the "positive energy" and "evil energy" of the human body from multiple dimensions under the guidance of TCM theory, and then reconstruct or compose existing prescriptions (Chinese patent medicines, acupuncture points, etc.) with units (TCM, acupuncture points, etc.) that can adjust the "positive energy" and "evil energy" of the human body in multiple dimensions, so that the two can match as much as possible. For example, the "yin and yang", "cold and heat", "deficiency and excess", and "exterior and interior" in the "Eight-Principle Dialectics" describe the current state of the human body from the dimensions of disease nature, disease location, and disease progress, while TCM has the properties of cold, heat, warmth, coolness, meridians, rise and fall, etc. After the prescription is composed according to a certain rule (algorithm), it can match the results of the Eight-Principle Dialectics from the aspects of disease nature, disease location, and disease progress, thereby realizing the connection between the theory, method, prescription, and medicine of dialectical treatment.
[0006] Therefore, it is of great significance to develop a system and method for TCM disease differentiation and / or prescription selection that can achieve a clear match between TCM diagnosis and treatment information and prescription information, with high accuracy and explainable process. Summary of the invention
[0007] The purpose of the present invention is to provide a tensor-structure-based Chinese medicine syndrome differentiation and / or prescription selection system and a construction method thereof in response to the above-mentioned problems existing in the prior art.
[0008] The data structure of the multidimensional array has the ability to simultaneously represent multidimensional properties, and is widely used in the current information technology field. It has rich algorithm support and can meet the multidimensional characterization of the human body's "positive energy" and "evil energy" in TCM dialectics, and can also realize the description of the properties of Chinese medicine such as cold, hot, warm, cool, meridian, rise and fall. When the present invention uses a multidimensional array (tensor) to mark TCM diagnostic terms and therapeutic terms, it adjusts the assignment meanings of the two in the corresponding positions of the multidimensional array, so as to realize TCM treatment principles and methods such as "heat for cold", "cool for heat", "tonify for deficiency", and "drain for excess". Then, through the distance (such as cosine similarity) between the calculated diagnostic tensor result and the therapeutic tensor result, the matching of TCM diagnosis and treatment information and TCM information is realized, which conforms to the theory of TCM dialectical treatment and has interpretability; it can quickly, accurately and visually realize the dialectics and prescription selection of TCM diseases, and achieve unexpected technical effects.
[0009] In order to achieve the above object, the technical solution adopted by the present invention is:
[0010] The method for constructing a TCM disease differentiation and / or prescription selection system based on a tensor structure comprises the following steps:
[0011] Step 1: Construct three-dimensional Euclidean space R 3 The (d0, d1, d2) data set forms a tensor structure I;
[0012] Constructing a three-dimensional Euclidean space R 3 (d0, d1, d 21 ) The data group forms a tensor structure II;
[0013] Among them, d0 represents different levels of disease location, d1 represents different five internal organs disease location, d2 represents different disease nature and disease progress; 21 The pathogenicity and disease severity indicated by the same position in d2 are opposite to those in d2;
[0014] Step 2: Organize the syndrome terminology of a certain disease in traditional Chinese medicine, the Chinese medicine prescriptions involved and the drug composition of the prescriptions;
[0015] Step 3: Use tensor structure I to perform structured assignment annotation on each syndrome term obtained in step 2 to obtain the feature tensor of the syndrome term. , forming a syndrome term feature database in the format of "Syndrome term name: feature tensor" ;
[0016] Each drug in each prescription obtained in step 2 is annotated with structured assignment using tensor structure II. Based on the annotated drug term feature tensor, the "bottom-k weighted normalization based on tensor addition" algorithm is used to calculate the feature tensor of the prescription. ; Construct a prescription term feature database in the format of "prescription term name: feature tensor" ;
[0017] That is, a system for TCM disease diagnosis and / or prescription selection is obtained.
[0018] The present invention provides a construction method of a TCM disease dialectic and / or prescription selection system based on a tensor structure, firstly, a tensor structure is established using TCM terminology elements, then the syndrome terms and prescriptions and drug compositions of TCM-related diseases are sorted out, the syndromes and drugs are annotated using the tensor structure, and a syndrome term feature database and a prescription term feature database are constructed to form a TCM disease dialectic and / or prescription selection system. The system uses a multidimensional array (tensor) to annotate TCM diagnostic terms and therapeutic terms, and adjusts the assignment meanings of the two in corresponding positions of the multidimensional array, so as to realize TCM treatment principles and methods such as "treat cold with heat", "treat heat with cold", "replenish deficiency with supplement", and "treat excess with purgation". In subsequent use, the distance (such as cosine similarity) between the calculated diagnostic tensor result and the therapeutic tensor result is used to achieve the matching of TCM diagnosis and treatment information and TCM information, and it conforms to the TCM dialectic and treatment theory and has interpretability; it can quickly, accurately and visually realize the dialectic and prescription selection of TCM diseases, and achieves unexpected technical effects.
[0019] Furthermore, d0 represents different levels of disease locations, including the viscera level, organ level, qi and blood level, and body level; in the organ level, d1 includes the liver, heart, spleen, lung, kidney, and pericardium; in the viscera level, d1 includes the gallbladder, small intestine, stomach, bladder, large intestine, and triple energizer; in the qi and blood level, d1 includes the nutrient, blood, qi, defense, essence, and body fluid; in the body level, d1 includes the tendons, veins, flesh, skin, bones, and pores; d2 includes cold, heat, deficiency, excess, ascending, descending, slippery, and stagnant.
[0020] Preferably, d0 represents disease sites at different levels, which are in the order of viscera level → bowel level → body level → qi and blood level; and / or, in the viscera level, d1 is arranged in the order of liver, heart, spleen, lung, kidney, and pericardium; and / or, in the bowel level, d1 is arranged in the order of gallbladder, small intestine, stomach, bladder, large intestine, and triple energizer; and / or, in the qi and blood level, d1 is arranged in the order of nutrient, blood, qi, defense, essence, and body fluid; and / or, in the body level, d1 is arranged in the order of tendons, veins, flesh, skin, bones, and pores; and / or, d2 is arranged in the order of cold, heat, deficiency, excess, ascending, descending, slippery, and stagnant; at the same time, d2 is arranged in the order of heat, cold, supplementation, deficiency, descending, ascending, guarding, and moving.
[0021] Furthermore, in step 3, when the structured assignment is annotated, 0 and 1 are used to indicate whether the theoretical element in d0, d1 and d2 is present; and / or, 1 indicates that it is present, and 0 indicates that it is not present.
[0022] When using the structure of R3(d0, d1, d2) to annotate symptom terms, syndrome terms, and Chinese medicine names, the purpose is to see which meta-elements of TCM theory are reflected in certain symptoms (TCMs) at the time they appear, and then calculate the TCM meta-element position of the group of symptoms (symptoms) or the group of TCMs (prescriptions), and then determine the distance of the tensor representing the position of the symptom, syndrome, and prescription meta-element, so as to match. Among them, the TCM meta-element meaning of syndrome and TCM name is definite, that is, the location, nature, and course of a syndrome and the meridian, medicinal properties, and medicinal potency of a TCM are definite. Therefore, we use 0 and 1 to indicate whether the syndrome and TCM name have the TCM meta-element (1 means yes, 0 means no). The TCM meta-element meaning of a symptom is uncertain, such as "thirst" can be "deficiency" in the "body fluid" position or "stagnation" in the "body fluid" position. When the symptom has occurred n times in a certain time and space, forming a symptom group sample, the possibility of the symptom occupying a meta-element of TCM theory conforms to the statistical principle and is a probability between 0 and 1. However, when the symptom appears in a certain symptom, and it is necessary to judge the significance of the meta-element of TCM theory embodied this time, then this is only one of the Bernoulli experiments, and does not satisfy the "Bernoulli Law of Large Numbers". Statistical probability does not apply, and it only has two possibilities: "occupying" or "not occupying" the meta-element. Therefore, 0 and 1 can also be used to indicate whether the symptom has the meta-element of TCM theory.
[0023] Furthermore, in step 3, the "bottom-k weighted normalization based on tensor addition" algorithm has the following specific operation process:
[0024] First, the characteristic tensor of n (n is a natural number ≥ 1) drugs contained in the prescription is summed up, the formula is:
[0025] ;
[0026] In the formula Form feature tensors for each drug, is the sum of the drug component tensors;
[0027] Then Perform maximum value normalization, the formula is:
[0028] ;
[0029] In the formula For tensors The maximum value of all positions in , is the normalized tensor;
[0030] Then the normalized tensor is reset to zero with the k1 threshold, that is, the values in the tensor that are less than k1 are reset to zero. The formula is:
[0031] ;
[0032] Where ( ) refers to the tensor The position where the value of all positions is greater than or equal to k1, that is, The positions greater than or equal to k1 are assigned the original value, and the positions less than k1 are assigned 0.
[0033] Another object of the present invention is to provide a TCM disease differentiation and / or prescription selection system constructed by the above construction method.
[0034] The TCM disease dialectics and / or prescription selection system is constructed by the method for constructing a TCM disease dialectics and / or prescription selection system based on tensor structure as described above.
[0035] The method for TCM disease differentiation and / or prescription selection using the above TCM disease differentiation and / or prescription selection system comprises the following steps:
[0036] S1. Obtain a set of symptom terms from the patient, perform structured assignment annotation on each symptom term using tensor structure I, and calculate the symptom feature tensor using the "bottom-k weighted normalization based on tensor addition" algorithm based on the annotated symptom term feature tensor to obtain the symptom feature tensor ;
[0037] S2, calculate separately All feature tensors in The feature tensor obtained in step S1 The cosine similarity I of the disease is sorted by size, and one or more larger values are selected, which are the syndrome types of the disease in traditional Chinese medicine;
[0038] and / or,
[0039] Calculate separately All feature tensors in The feature tensor obtained in step S1 The cosine similarity II is sorted by size, and one or more larger values are selected, which are the prescriptions for traditional Chinese medicine diseases.
[0040] Furthermore, in S1, the method of calculating the feature tensor of the symptom by the "bottom-k weighted normalization based on tensor addition" algorithm is as follows:
[0041] First, the feature tensors of n (n is a natural number ≥ 1) symptom terms contained in a set of symptom terms are summed, and the formula is:
[0042] ;
[0043] In the formula is the feature tensor of each symptom term, is the sum of the symptom term tensors;
[0044] Then Perform maximum value normalization, the formula is:
[0045] ;
[0046] In the formula Returns a tensor The maximum value of all positions in , is the normalized tensor;
[0047] The normalized tensor is then k2-thresholded to zero, using the formula:
[0048] ;
[0049] Where ( ) refers to the tensor The value of all positions is greater than or equal to k2, that is, The positions greater than or equal to k2 are assigned the original value, and the positions less than k2 are assigned 0.
[0050] Furthermore, the calculation method of cosine similarity in S2 is as follows:
[0051] In the characteristic tensor of the syndrome The characteristic tensor of the term or the characteristic tensor of the prescription When matching, the three-dimensional tensor is first flattened into a one-dimensional vector to obtain the corresponding feature vector tzh, tzx or tfj, and then the distance between the two feature tensors is calculated using cosine similarity. The cosine similarity formula is:
[0052] ;
[0053] Where t1 and t2 are two vectors that need to be compared for similarity, t1×t2 is the dot product (scalar product) of the two vectors, ||t1||×||t2|| is the product of the modulus lengths of the two vectors; where n is the dimension of the vector; For each component of vector t1, For each component of vector t2.
[0054] Compared with the prior art, the present invention has the following beneficial effects:
[0055] The present invention is a TCM disease dialectic and / or prescription selection system based on tensor structure and its construction method. First, the tensor structure is established by using TCM term elements, and then the syndrome terms and prescriptions and drug compositions of TCM-related diseases are sorted out. The syndromes and drugs are annotated by using the tensor structure, and a syndrome term feature database and a prescription term feature database are constructed to form a TCM disease dialectic and / or prescription selection system. The system uses a multidimensional array (tensor) to annotate TCM diagnostic terms and therapeutic terms, and adjusts the assignment meanings of the two in the corresponding positions of the multidimensional array, so as to realize TCM treatment principles and methods such as "heat for cold", "cool for heat", "tonify for deficiency", and "drain for excess". In subsequent use, the distance (such as cosine similarity) between the calculated diagnostic tensor result and the therapeutic tensor result is used to achieve the matching of TCM diagnosis and treatment information and TCM information, and it conforms to the TCM dialectic and treatment theory and has interpretability; it can quickly, accurately and visually realize the dialectic and prescription selection of TCM diseases, and achieve unexpected technical effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 This is a structural block diagram of the tensor-based TCM syndrome differentiation and prescription selection method of the present invention.
[0057] Figure 2 The present invention is symptomatic of the term tensor structure.
[0058] Figure 3 It is the tensor structure of the Chinese medicine name of the present invention.
[0059] Figure 4 This is the feature tensor after the “sighing” symptom is labeled. DETAILED DESCRIPTION
[0060] The present invention will be described in detail below in conjunction with the accompanying drawings.
[0061] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. Example
[0062] This embodiment provides a method for constructing a TCM disease differentiation and / or prescription selection system based on a tensor structure, comprising the following steps:
[0063] Step 1: Construct three-dimensional Euclidean space R 3 The (d0, d1, d2) data set forms a tensor structure I;
[0064] Constructing a three-dimensional Euclidean space R 3 (d0, d1, d 21 ) The data group forms a tensor structure II;
[0065] Among them, d0 represents different levels of disease location, d1 represents different five internal organs disease location, d2 represents different disease nature and disease progress; 21 The pathogenicity and disease severity indicated by the same position in d2 are opposite to those in d2;
[0066] Step 2: Organize the syndrome terminology of a certain disease in traditional Chinese medicine, the Chinese medicine prescriptions involved and the drug composition of the prescriptions;
[0067] Step 3: Use tensor structure I to perform structured assignment annotation on each syndrome term obtained in step 2 to obtain the feature tensor of the syndrome term. , forming a syndrome term feature database in the format of "Syndrome term name: feature tensor" ;
[0068] Each drug in each prescription obtained in step 2 is annotated with structured assignment using tensor structure II. Based on the annotated drug term feature tensor, the "bottom-k weighted normalization based on tensor addition" algorithm is used to calculate the feature tensor of the prescription. ; Construct a prescription term feature database in the format of "prescription term name: feature tensor" ;
[0069] That is, a system for TCM disease diagnosis and / or prescription selection is obtained.
[0070] The method for TCM disease differentiation and / or prescription selection using the system constructed by the above construction method comprises the following steps:
[0071] S1. Obtain a set of symptom terms from the patient, perform structured assignment annotation on each symptom term using tensor structure I, and calculate the symptom feature tensor using the "bottom-k weighted normalization based on tensor addition" algorithm based on the annotated symptom term feature tensor to obtain the symptom feature tensor ;
[0072] S2, calculate separately All feature tensors in The feature tensor obtained in step S1 The cosine similarity I of the disease is sorted by size, and one or more larger values are selected, which are the syndrome types of the disease in traditional Chinese medicine;
[0073] and / or,
[0074] Calculate separately All feature tensors in The feature tensor obtained in step S1 The cosine similarity II is sorted by size, and one or more larger values are selected, which are the prescriptions for traditional Chinese medicine diseases.
[0075] Taking the example of obtaining the patient's depression syndrome and prescription, the specific operation is as follows:
[0076] 1. Establish TCM symptom terminology for depression and depression syndrome entry
[0077] In the three documents of TCM Diagnosis and Treatment Program for Depression (Depressive Episode) (2017 Edition), Expert Consensus on Integrated Traditional Chinese and Western Medicine for Depression (2019), and International TCM Clinical Practice Guidelines_First Depression (2019-10-11), the dialectical classification of depression and the symptom terms and syndrome terms in the classification were sorted out. The above symptom terms and syndrome terms were compared and revised with the "Terms of Traditional Chinese Medicine" and "Second Edition of TCM Symptom Differential Diagnosis" to form standardized symptom and syndrome terminology entries. The specific contents of TCM symptom terms and syndrome types of depression are shown in Table 1:
[0078] Table 1 TCM symptom terms and syndrome types of depression
[0079]
[0080] II. Establishing TCM prescriptions (Chinese patent medicines) and drug composition items for depression
[0081] In the three documents, TCM Diagnosis and Treatment Program for Depression (Depressive Episode) (2017 Edition), Expert Consensus on Integrated Traditional Chinese and Western Medicine for Depression (2019), and International TCM Clinical Practice Guidelines_First Episode of Depression (2019-10-11), we compiled information on the classification and treatment of depression, that is, the name of the prescription and its Chinese medicine composition recommended for each TCM syndrome type. The specific content is shown in Table 2:
[0082] Table 2 Names of prescriptions and constituent Chinese medicines for TCM classification and treatment of depression
[0083]
[0084] 3. Application Figure 2 (In the figure, "dim" represents dimension, and the values "0, 1, 2" are numbers) The structural tensor labels the symptom terms and syndrome terms
[0085] The symptom terms related to depression are annotated. For example, the term "prone to sighing" has two cases in the "Second Edition of Differential Diagnosis of Symptoms in Traditional Chinese Medicine": "liver depression prone to sighing" and "qi deficiency prone to sighing". Therefore, when annotating, the positions of "liver" and "stagnation", "qi" and "stagnation" and "qi" and "deficiency" and "descend", that is, the positions of (1, 1, 8), (4, 3, 8), (4,3, 3) and (4, 3,6) are annotated as "1", and the other positions are occupied by "0" to represent that "prone to sighing" occupies the TCM element of liver qi stagnation, qi deficiency or qi collapse. The annotation results are as follows: Figure 4 Other symptoms are termed in the same manner as shown.
[0086] The syndrome terms involved in depression are marked. For example, the term "heart and spleen deficiency syndrome" is explained as "insufficient heart blood and weak spleen" in the "Terms of Traditional Chinese Medicine and Pharmacy". Therefore, when marking, the positions of "heart", "deficiency", "blood", "deficiency" and "spleen", "deficiency", "qi", "deficiency", that is, the positions of (1, 2, 3), (4, 2, 3) and (1,3, 3), (4, 3, 3) are marked as "1", and the other positions are marked with "0" to indicate that "heart and spleen deficiency syndrome" has the TCM elements of heart blood deficiency and spleen qi deficiency. Other syndrome terms are similar.
[0087] After the syndrome term annotation is completed, the syndrome term feature database is constructed in the format of "term name: feature tensor" .
[0088] IV. Application Figure 3 (In the figure, "dim" represents the dimension, and the values "0, 1, 2" are numbers) The structure tensor labels the names of traditional Chinese medicines
[0089] The names of Chinese medicines included in the prescriptions used in the dialectical treatment of depression are marked. For example, the Chinese medicine "Bupleurum" is "pungent and bitter in taste, slightly cold in nature", "enters the liver, gallbladder, pericardium, and triple burner meridians", and has the effects of "reconciling the exterior and interior, soothing the liver and relieving depression, raising yang and lifting the sunken, and reducing fever and stopping malaria". Therefore, when marking, the positions of "cold", "rising" and "moving" corresponding to "liver", "gallbladder", "pericardium", "triple burner" and "qi" are (1,1, 2), (1, 1, 6), (1,1, 8), (2, 1, 2), (2, 1, 6), (2, 1, 8), (1,6, 2), (1, 6, 6), (1,6, 8), (2, 6, 2), (2,6, 6), (2, 6, 8), (4, 3, 2), (4, 3, 6), (4,3, 8) is marked as "1", and the other positions are marked as "0". This is used to indicate that "Bupleurum" has the TCM element of making the "qi" of the "liver", "gallbladder", "pericardium" and "triple burner" organs upward, unobstructed, and cold. Other TCM names are similar.
[0090] 5. Calculate the prescription feature tensor based on the Chinese medicine name feature tensor and construct a database
[0091] After all the Chinese medicine names are labeled, the "bottom-k weighted normalization based on tensor addition" calculates the feature tensor of each prescription. For example, "Guipi Decoction" is composed of 11 Chinese medicines: "Astragalus, Codonopsis, Poria, Atractylodes, Angelica, Polygala, Ziziphus jujuba, Aucklandia, Longan meat, Jujube, Licorice". First, the sum of the feature tensors of these 11 Chinese medicine names is calculated, that is:
[0092] ;
[0093] in Take the feature tensor of 1 to 11 Chinese medicine names that make up Guipi Decoction. Then sum Perform maximum normalization so that the values of each position of the summed tensor cannot be divided into [0, 1]. The formula is:
[0094] ;
[0095] In the formula Returns a tensor The maximum value of all positions in , is the normalized tensor. Then the normalized tensor is reset to zero with the k1 threshold, that is, the values in the tensor that are less than k1 are reset to zero to exclude interference items. The formula is:
[0096] ;
[0097] Where ( ) refers to the tensor The position where the value of all positions is greater than or equal to k1, that is, The positions greater than or equal to k1 are assigned original values, and the positions less than k1 are assigned 0 values. In the experiment, k1 is set to 0.15 (the size can be adjusted according to experience), so that the meridians of "Guipi Decoction" are mainly "heart, spleen, lung, liver, and gallbladder", and the interference items of "Yuanzhi" belonging to "kidney" and "Muxiang" belonging to "triple energizer and large intestine" are excluded. This calculation process can reflect the principle of "removing the nature and keeping the use" of prescription compatibility. The calculation method of the characteristic tensors of other prescriptions is the same as above.
[0098] After the prescription feature tensor is calculated, the prescription name feature database is constructed in the format of "prescription name: feature tensor" .
[0099] 6. Calculate the syndrome feature tensor based on the symptom term feature tensor and match the syndrome type and prescription
[0100] Provide a set of symptoms as syndromes, and simulate the symptoms, pulse, tongue and other information obtained by "looking, smelling, asking and palpating", such as "mental depression, emotional instability, chest and flank distension, belching, sighing, irritability, restless sleep, tinnitus, bitter taste in the mouth, foreign body sensation in the throat, nausea, short and dark urine, red tongue, yellow and greasy tongue coating, and stringy pulse". According to the labeled symptom term feature tensor, the "bottom-k weighted normalization based on tensor addition" algorithm is used to calculate the feature tensor of the syndrome. First, the sum of the feature tensors of the 15 symptom terms included in the syndrome group is calculated. The formula is:
[0101] ;
[0102] in Take the feature tensor of 1 to 15 symptom terms of the above syndrome. Then Perform maximum normalization so that the values of each position of the summed tensor cannot be divided into [0, 1]. The formula is:
[0103] ;
[0104] In the formula Returns a tensor The maximum value of all positions in , is the normalized tensor. Then the normalized tensor is reset to zero using the k2 threshold, that is, the values in the tensor that are less than k2 are reset to zero to exclude interference items. The formula is:
[0105] ;
[0106] Where ( ) refers to the tensor The value of all positions is greater than or equal to k2, that is, The positions greater than or equal to k2 are assigned the original value, and the positions less than k2 are assigned 0. In the experiment, k1 is set to 0.25 (the size can be adjusted according to experience), so that the characteristic tensor of the syndrome excludes the "probable value" of "good sighing" in the TCM element "qi", "deficiency", "descent" and "tinnitus" in the TCM element "kidney", "deficiency", "essence", "deficiency", "slippery" and other "probable value" situations, solving the problem of "probable value of TCM symptom diagnosis" when calculating the characteristic tensor of the symptom group every time.
[0107] Then use the obtained syndrome feature tensor , calculated in , All feature tensors in , The cosine similarity between them is calculated, and then sorted by cosine similarity to match n (n=2 in the experiment) syndromes and prescriptions. First, the three-dimensional tensor is flattened into a one-dimensional vector to obtain the corresponding one-dimensional vectors tzh, tzx, and tfj, and then the similarity between the three is calculated by cosine similarity. The cosine similarity formula is:
[0108] ;
[0109] Where t1 and t2 are two vectors that need to be compared for similarity, t1×t2 is the dot product (scalar product) of the two vectors, and ||t1||×||t2|| is the product of the modulus lengths of the two vectors. The experimental results show that The two with the largest cosine similarity are "liver and gallbladder damp-heat syndrome" and "liver qi stagnation syndrome". The two with the largest cosine similarity are "Modified Chaihu Shugan Powder" and "Modified Longdan Xiegan Decoction", that is, the possible syndrome types of the symptoms "mental depression, emotional instability, chest and flank distension, belching, sighing, irritability, restless sleep, tinnitus, bitter taste in the mouth, foreign body sensation in the throat, nausea, short and dark urine, red tongue, yellow and greasy tongue coating, and stringy pulse" are "liver and gallbladder damp-heat syndrome" or "liver qi stagnation syndrome", and the appropriate prescriptions are "Modified Longdan Xiegan Decoction" or "Modified Chaihu Shugan Powder".
[0110] The cosine similarity of the first two digits in the experiment is relatively close, and it can also be considered that the syndrome is a combination of "liver and gallbladder damp-heat syndrome" and "liver qi stagnation syndrome". By visualizing the values of the meta-elements, it can indicate the severity of "liver and gallbladder damp-heat syndrome" and "liver qi stagnation syndrome", which can assist the teaching of TCM diagnosis and dialectics.
[0111] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for constructing a TCM disease differentiation and / or prescription selection system based on a tensor structure, characterized in that: The following steps are involved: Step 1: Construct three-dimensional Euclidean space R 3 The (d0, d1, d2) data set forms a tensor structure I; Constructing a three-dimensional Euclidean space R 3 (d0, d1, d 21 ) The data group forms a tensor structure II; Among them, d0 represents different levels of disease location, d1 represents different five internal organs disease location, d2 represents different disease nature and disease progress; 21 The pathogenicity and disease severity indicated by the same position in d2 are opposite to those in d2; Step 2: Organize the syndrome terms of the TCM diseases to be analyzed, the TCM prescriptions involved, and the drug composition of the prescriptions; Step 3: Use tensor structure I to perform structured assignment annotation on each syndrome term obtained in step 2 to obtain the feature tensor of the syndrome term. , forming a syndrome term feature database in the format of "syndrome term name: feature tensor" ; Each drug in each prescription obtained in step 2 is annotated using tensor structure II. Based on the annotated drug term feature tensor, the "bottom-k weighted normalization based on tensor addition" algorithm is used to calculate the feature tensor of the prescription. ; Construct a prescription term feature database in the format of "prescription term name: feature tensor" ; That is, we obtain the TCM disease differentiation and / or prescription selection system; The specific operation process of the "bottom-k weighted normalization based on tensor addition" algorithm is as follows: First, the characteristic tensor of n drugs contained in the prescription is summed, where n is a natural number ≥ 1, and the formula is: ; In the formula Form feature tensors for each drug, is the sum of the drug component tensors; Then Perform maximum value normalization, the formula is: ; In the formula For tensors The maximum value of all positions in , is the normalized tensor; Then the normalized tensor is reset to zero with the k1 threshold, that is, the values in the tensor that are less than k1 are reset to zero. The formula is: ; Where ( ) refers to the tensor The position where the value of all positions is greater than or equal to k1, that is, The positions greater than or equal to k1 are assigned the original value, and the positions less than k1 are assigned 0.
2. The method for constructing a tensor-structure-based TCM disease differentiation and / or prescription selection system according to claim 1, characterized in that: in, d0 represents different levels of disease locations, including the viscera level, organ level, qi and blood level, and body level; in the organ level, d1 includes the liver, heart, spleen, lung, kidney, and pericardium; in the viscera level, d1 includes the gallbladder, small intestine, stomach, bladder, large intestine, and triple energizer; in the qi and blood level, d1 includes the nutrient, blood, qi, defense, essence, and body fluid; in the body level, d1 includes the tendons, veins, flesh, skin, bones, and pores; d2 includes cold, heat, deficiency, excess, ascending, descending, slippery, and stagnant.
3. The method for constructing a tensor-structure-based TCM disease differentiation and / or prescription selection system according to claim 2, characterized in that: d0 represents different levels of disease locations, which are in the order of viscera level → bowel level → body level → qi and blood level; and / or, in the viscera level, d1 is arranged in the order of liver, heart, spleen, lung, kidney, and pericardium; and / or, in the bowel level, d1 is arranged in the order of gallbladder, small intestine, stomach, bladder, large intestine, and triple energizer; and / or, in the qi and blood level, d1 is arranged in the order of nutrient, blood, qi, defense, essence, and body fluid; and / or, in the body level, d1 is arranged in the order of tendons, vessels, flesh, skin, bones, and pores; and / or, d2 is arranged in the order of cold, heat, deficiency, excess, ascending, descending, slippery, and stagnant; at the same time, d2 is arranged in the order of heat, cold, supplementation, deficiency, descending, ascending, guarding, and moving.
4. The method for constructing a tensor-structure-based TCM disease differentiation and / or prescription selection system according to claim 1, characterized in that: In step 3, when the structured assignment is marked, 0 and 1 are used to indicate whether the theoretical element in d0, d1 and d2 is present; and / or, 1 indicates that it is present, and 0 indicates that it is not present.
5. A TCM disease differentiation and / or prescription selection system constructed by the method for constructing a TCM disease differentiation and / or prescription selection system based on tensor structure as described in any one of claims 1 to 4.
6. A method for performing TCM disease differentiation and / or prescription selection using the TCM disease differentiation and / or prescription selection system according to claim 5, characterized in that: The following steps are involved: S1. Obtain a set of symptom terms from the patient, perform structured assignment labeling on each symptom term using tensor structure I, and calculate the symptom feature tensor using the "bottom-k weighted normalization based on tensor addition" algorithm based on the labeled symptom term feature tensor. ; S2, calculate separately All feature tensors in The feature tensor obtained in step S1 The cosine similarity I of the disease is sorted by size, and one or more larger values are selected, which are the syndrome types of the disease in traditional Chinese medicine; and / or, respectively, All feature tensors in The feature tensor obtained in step S1 The cosine similarity II is sorted by size, and one or more larger values are selected, which are the prescriptions for traditional Chinese medicine diseases.
7. The method for TCM disease differentiation and / or prescription selection according to claim 6, characterized in that: In S1, the method of calculating the feature tensor of the symptom based on the "bottom-k weighted normalization" algorithm of tensor addition is as follows: First, the feature tensors of n symptom terms contained in a set of symptom terms are summed, where n is a natural number ≥ 1, and the formula is: ; In the formula is the feature tensor of each symptom term, is the sum of the symptom term tensors; Then Perform maximum value normalization, the formula is: ; In the formula Returns a tensor The maximum value of all positions in , is the normalized tensor; The normalized tensor is then k2-thresholded to zero, using the formula: ; Where ( ) refers to the tensor The value of all positions is greater than or equal to k2, that is, The positions greater than or equal to k2 are assigned the original value, and the positions less than k2 are assigned 0.
8. The method for TCM disease differentiation and / or prescription selection according to claim 6, characterized in that: The calculation method of cosine similarity in S2 is as follows: In the characteristic tensor of syndrome The characteristic tensor of the term or the characteristic tensor of the prescription When matching, the three-dimensional tensor is first flattened into a one-dimensional vector to obtain the corresponding feature vector tzh, tzx or tfj, and then the distance between the two feature tensors is calculated using cosine similarity. The cosine similarity formula is: ; Where t1 and t2 are two vectors that need to be compared for similarity, t1×t2 is the dot product of the two vectors, ||t1||×||t2|| is the product of the modulus lengths of the two vectors; where n is the dimension of the vector; For each component of vector t1, For each component of vector t2.
Citation Information
Patent Citations
Traditional Chinese medicine dialectical treatment data processing method
CN108986911A
Traditional Chinese medicine dialectical treatment system
CN109102882A