A dynamic knowledge graph construction method, an electronic device, and a storage medium

By constructing a dynamic knowledge graph, the system automatically generates a set of four diagnostic elements based on patient medical record text and performs long logical chain deduction in traditional Chinese medicine, solving the problems of inconvenience and inefficiency in TCM clinical thinking training, and realizing fast, efficient and accurate TCM clinical thinking training.

CN116467464BActive Publication Date: 2026-04-24KELINGLI INTELLIGENT MEDICAL SOFTWARE (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
KELINGLI INTELLIGENT MEDICAL SOFTWARE (SHENZHEN) CO LTD
Filing Date
2023-04-17
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

In existing technologies, the training methods for TCM clinical thinking rely on manual instruction or textbook knowledge, which makes the training inconvenient and inefficient, and cannot effectively transplant the training methods of Western medicine.

Method used

By constructing a dynamic knowledge graph, a set of four diagnostic elements is automatically generated based on the patient's medical record text. Long logical chains in traditional Chinese medicine are deduced to obtain the target syndrome elements and symptoms and their scores, generating a dynamic knowledge graph for training clinical thinking in traditional Chinese medicine.

Benefits of technology

It enables rapid, efficient, and precise training of TCM clinical thinking. The dynamic knowledge graph is dynamically adjusted according to clinical conditions, reducing human intervention and improving training efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116467464B_ABST
    Figure CN116467464B_ABST
Patent Text Reader

Abstract

The application discloses a dynamic knowledge graph construction method, an electronic device and a computer readable storage medium. The method comprises the following steps: determining a four-diagnosis element set for a patient according to a medical record text of the patient, wherein the four-diagnosis element set comprises a plurality of four-diagnosis elements, and the four-diagnosis element is a characteristic related to a disease possessed by the patient described from the perspective of four-diagnosis of traditional Chinese medicine; performing traditional Chinese medicine long logic chain deduction based on the four-diagnosis element set, performing through different thinking threads, and obtaining at least one target syndrome element, scores of each target syndrome element, at least one target syndrome matching the target syndrome element, and scores of each target syndrome; and generating a dynamic knowledge graph according to the four-diagnosis element set, the scores of each target syndrome element and the scores of each target syndrome. Through the scheme, a knowledge graph based on dynamic changes of clinical conditions can be obtained, so that fast, efficient and accurate clinical thinking training for traditional Chinese medicine is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of information processing technology, and in particular relates to a method for constructing dynamic knowledge graphs, an electronic device, and a computer-readable storage medium. Background Technology

[0002] Clinical thinking is a thought process and activity in which doctors use relevant knowledge from medical science, natural science, humanities and social sciences, and behavioral science, with the patient at the center, to comprehensively consider the patient's examination results, medical history, family, cultural background, symptoms, and communication results, and then implement and continuously revise their thinking.

[0003] While relatively mature clinical reasoning training methods exist for Western medicine, due to the differences in clinical reasoning between Western and Traditional Chinese Medicine (TCM), these methods cannot be readily applied to TCM. Currently, TCM clinical reasoning training still relies on personal instruction or textbook knowledge. Clearly, this approach is inconvenient and inefficient. Therefore, TCM clinical reasoning training methods still need further development. Summary of the Invention

[0004] This application provides a method for constructing a dynamic knowledge graph, an electronic device, and a computer-readable storage medium, which can obtain a knowledge graph that dynamically changes based on clinical conditions, thereby enabling rapid, efficient, and precise clinical thinking training for traditional Chinese medicine.

[0005] Firstly, this application provides a method for constructing a dynamic knowledge graph, including:

[0006] Based on the patient's medical record text, determine the set of four diagnostic elements for the patient. The set of four diagnostic elements includes multiple four diagnostic elements, which are disease-related characteristics of the patient described from the perspective of the four diagnostic methods of traditional Chinese medicine.

[0007] Based on the set of four diagnostic elements, a long logical chain of TCM is deduced, which is expressed through different thought threads, and at least one target syndrome element, the score of each target syndrome element, at least one target syndrome matching the target syndrome element, and the score of each target syndrome.

[0008] A dynamic knowledge graph is generated based on the set of four diagnostic elements, the scores of each target syndrome element, and the scores of each target syndrome.

[0009] In a second aspect, this application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the method described in the first aspect.

[0010] Thirdly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described in the first aspect above.

[0011] The beneficial effects of this application compared to existing technologies are as follows: This application considers using knowledge graphs as a tool for clinical thinking training and proposes a method for constructing dynamic knowledge graphs based on clinical situations. In this method, the results derived from the long logic chain in Traditional Chinese Medicine include not only target syndrome elements and target symptoms, but also the scores of target syndrome elements and target symptoms. These scores are used to ultimately generate a dynamic knowledge graph. It is understood that the scores of each target syndrome element and target symptom will differ depending on the clinical situation, which allows the knowledge graph to be constructed dynamically and accurately based on the clinical situation, resulting in a targeted dynamic knowledge graph. Furthermore, the construction process of the dynamic knowledge graph does not require manual intervention. Users only need to provide the patient's medical record text, and the dynamic knowledge graph can be automatically constructed through the above process, which is very convenient and efficient. Finally, based on the constructed dynamic knowledge graph, users can quickly, efficiently, and accurately train their clinical thinking. It is understood that the beneficial effects of the second to third aspects mentioned above can be found in the relevant descriptions in the first aspect above, and will not be repeated here. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a schematic diagram illustrating the implementation process of the dynamic knowledge graph construction method provided in the embodiments of this application;

[0014] Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0015] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0016] To illustrate the technical solution proposed in this application, specific embodiments are described below.

[0017] The following describes the dynamic knowledge graph construction method proposed in the embodiments of this application. It can be understood that this dynamic knowledge graph construction method is based on a medical knowledge base, which can be constructed based on the syndrome differentiation system proposed in the field of Traditional Chinese Medicine. This medical knowledge base will be described in detail later. Please refer to... Figure 1 The dynamic knowledge graph construction method proposed in this application includes:

[0018] Step 101: Determine the set of four diagnostic elements for the patient based on the patient's medical record text.

[0019] The electronic device first obtains the patient's medical record text. This electronic medical record contains information about the patient's clinical visits, specifically expressed in natural language; that is, the electronic medical record is actually presented as natural language text. The electronic device can perform Natural Language Processing (NLP) on this medical record text to obtain multiple diagnostic elements specific to the patient; alternatively, the electronic device can display the medical record text and all possible diagnostic elements to the user, allowing the user to review the medical record text and select the diagnostic elements. Based on the user's selections, multiple diagnostic elements specific to the patient are determined. Here, the four diagnostic elements refer to the disease-related characteristics of the patient described from the perspective of the four diagnostic methods of Traditional Chinese Medicine. The multiple diagnostic elements specific to the patient obtained by the electronic device can constitute a set of diagnostic elements specific to the patient. The patient's medical record text can be a virtual case or a de-identified real case; there is no limitation here. Furthermore, the medical record text can be imported through a file interface or directly entered on the user interface; there is no limitation here either.

[0020] Step 102: Based on the set of four diagnostic elements, perform long logical chain deduction in traditional Chinese medicine, express it through different thought threads, and obtain at least one target syndrome element, the score of each target syndrome element, at least one target syndrome matching the target syndrome element, and the score of each target syndrome.

[0021] After obtaining a set of diagnostic elements (four diagnostic methods), the electronic device can set the symptom severity of each element within that set. For example, symptom severity can be categorized into three levels: "mild," "moderate," and "severe." The electronic device can default to setting the symptom severity of each element to "moderate." For medical rigor, users can adjust the symptom severity of elements that do not conform to the actual situation based on the patient information they have.

[0022] Electronic devices can deduce a hierarchical, long logical chain of TCM principles from the set of four diagnostic elements based on a medical knowledge base, expressed through different thought processes. Based on these thought processes, at least one derived syndrome element (denoted as the target syndrome element), the score of each target syndrome element, at least one derived syndrome (denoted as the target syndrome), and the score of each target syndrome can be obtained. It can be understood that the score of the target syndrome element represents the degree of relevance between that target syndrome element and the patient; similarly, the score of the target syndrome represents the degree of relevance between that target syndrome and the patient. The following explains and clarifies the various concepts involved in this process:

[0023] A knowledge node refers to a basic element constituting a knowledge system, represented by key terms and supported by a system dictionary. In this embodiment, the knowledge node actually corresponds to each node in the final generated knowledge graph. As an example only, each target symptom and target syndrome is represented as a knowledge node.

[0024] A thought thread refers to the smallest unit of thought, described by connections, that marks the beginning and end of a thought process. In this embodiment, the thought thread actually corresponds to a curve segment with arrows in a knowledge graph, starting at a node and ending at another node derived from the starting point. As an example only, the matching relationship between a target symptom and a target syndrome that matches that target symptom constitutes a thought thread.

[0025] In Traditional Chinese Medicine (TCM), a long logical chain refers to an ordered sequence of connections (i.e., a relational order) formed by thought processes and knowledge nodes. This relational order must conform to the logic of TCM and is called a segment of the logical chain. Multiple interlocking logical chains can constitute a complete medical proposition or medical process, which is the long logical chain of TCM.

[0026] Syndrome elements and syndromes are existing concepts in the syndrome element differentiation system of traditional Chinese medicine, and will not be elaborated here.

[0027] Step 103: Generate a dynamic knowledge graph based on the set of four diagnostic elements, the scores of each target syndrome element, and the scores of each target syndrome.

[0028] Based on the syndrome differentiation system, the target syndrome element is directly derived from the set of four diagnostic elements, while the target syndrome is directly derived from the target syndrome element. That is, the electronic device obtains a mapping relationship from the four diagnostic elements to the syndrome element and then to the syndrome, and this mapping relationship is targeted (specifically to the currently processed medical record text). Considering that the scores of both the target syndrome element and the target syndrome are used to represent their relevance to the patient, the electronic device can sort each target syndrome element and each target syndrome based on their scores from high to low.

[0029] The electronic device can generate a first knowledge graph based on the mapping relationship between each of the four diagnostic elements in the set of diagnostic elements and each sorted target syndrome element. Similarly, the electronic device can generate a second knowledge graph based on the mapping relationship between each sorted target syndrome element and each sorted target syndrome. Based on this, the electronic device can further generate a third, fourth, and fifth knowledge graph based on a medical knowledge base. The third knowledge graph represents the mapping relationship between the target syndrome and the target treatment principle (i.e., the treatment principle derived from the target syndrome); the fourth knowledge graph represents the mapping relationship between the target treatment principle and the target traditional Chinese medicine formula (i.e., the traditional Chinese medicine formula derived from the target treatment principle); and the fifth knowledge graph represents the mapping relationship between the target traditional Chinese medicine formula and the target traditional Chinese medicine (i.e., the traditional Chinese medicine derived from the target traditional Chinese medicine formula). The electronic device can display the generated knowledge graphs level by level, allowing the knowledge graphs to be dynamically displayed on the user interface for easy access by the user, thus enabling knowledge graph-based training of TCM clinical thinking.

[0030] In some embodiments, to improve processing efficiency and eliminate the need for users to manually review medical record texts and extract the four diagnostic elements, step 101 may specifically include:

[0031] A1. Extract the set of elements based on the patient's medical record text.

[0032] Medical record texts typically contain the following information: the patient's age, gender, pregnancy status, and current medical history. Electronic devices can first perform NLP processing on the medical record text to parse out the age, gender, pregnancy status, and current medical history contained within. Then, the parsed current medical history is compared with a pre-defined element dictionary in a medical knowledge base to obtain the element set for that case. This element set contains multiple elements from the current medical history; each element refers to a disease-related characteristic possessed by the patient.

[0033] As an example, the format of each entry in the feature dictionary is as follows: {Feature ID|Feature Name|Feature Gender|Minimum Age|Maximum Age|Pregnancy Indicator|Other Feature Information}

[0034] Among them, Element ID represents the unique identifier of the element; Element Name represents the standardized name of the element; Element Gender represents the gender to which the element is applicable, for example, 0 means it is applicable to both men and women, 1 means it is only applicable to men, and 2 means it is only applicable to women; Element Minimum Age and Element Maximum Age represent the age range to which the element is applicable; Pregnancy Indicator represents whether the element is applicable during pregnancy, for example, 0 means it is universal, 1 means it is not applicable during pregnancy, and 2 means it is applicable during pregnancy; Other Element Information represents other information related to the element.

[0035] Since the element dictionary defines information such as the applicable gender, pregnancy status, and applicable age range for each element, after obtaining the element set based on the present medical history of the medical record text, each element in the element set can be matched with the patient's age, gender, and pregnancy status. Elements that do not meet the patient's age, gender, and pregnancy status can be removed to obtain the final element set.

[0036] A2. Convert the set of elements into a set of elements for the four diagnostic methods.

[0037] Considering that the present illness history in medical record texts may not necessarily adopt a purely TCM descriptive approach, the set of elements obtained through step A1 may include elements applicable to TCM (i.e., the four diagnostic methods) as well as elements applicable to Western medicine (i.e., Western medicine elements). Considering that this application focuses on the generation of dynamic knowledge graphs from a Traditional Chinese Medicine (TCM) perspective, the electronic device can convert an element set into a set of four diagnostic elements based on a pre-set dictionary of four diagnostic elements in a medical knowledge base. The process is as follows: Based on the element ID, the element set obtained in step A1 is matched with a cached dictionary of TCM-Western medicine element conversion, resulting in a list of element IDs to be converted and a list of element IDs not to be converted. The list of element IDs to be converted is processed as follows: for each element ID in the list, its convertible four diagnostic element IDs and names are searched in the cached dictionary of TCM-Western medicine element conversion, and the required related information is retrieved from the element dictionary and added to the set of four diagnostic elements. The list of element IDs not to be converted is processed as follows: for each element ID in the list, its element ID is matched with a cached dictionary of four diagnostic elements relationship trees, resulting in matching four diagnostic element IDs and names, and the required related information is retrieved from the element dictionary and added to the set of four diagnostic elements. Through the above process, the conversion of the element set is completed, resulting in the final set of four diagnostic elements.

[0038] In some embodiments, considering the logical relationship between the four diagnostic elements, syndrome elements, and syndromes, the electronic device can divide the entire derivation process into two stages: the stage of syndrome element derivation and the stage of syndrome derivation, thereby achieving rapid derivation based on the set of four diagnostic elements. Based on this, step 102 may specifically include:

[0039] B1. Based on the set of four diagnostic elements, the syndrome elements are deduced to obtain at least one target syndrome element and the score of each target syndrome element.

[0040] The electronic device can deduce syndrome elements from the set of four diagnostic methods based on a pre-set TCM syndrome element dictionary and syndrome element derivation algorithm rules in a medical knowledge base. The result is at least one target syndrome element and the score of each target syndrome element. The syndrome element derivation algorithm rules include: classification rules, scoring rules, and threshold rules, as well as the first scoring algorithm based on these rules.

[0041] As an example only, the format of each entry in the Dictionary of Traditional Chinese Medicine Syndromes is as follows:

[0042] {Element ID | Element Name | Element Classification Marker | Element Gender | Element Minimum Age | Element Maximum Age | Pregnancy Signs | Other Element Information}

[0043] Among them, the syndrome element ID represents the unique identifier of the syndrome element; the syndrome element name represents the standardized name of the syndrome element; the syndrome element classification indicator represents the syndrome element category, for example, 1 represents the location syndrome element, and 2 represents the nature syndrome element; the syndrome element gender represents the gender to which the syndrome element is applicable, for example, 0 represents both men and women, 1 represents only men, and 2 represents only women; the minimum age and maximum age of the syndrome element represent the age range to which the syndrome element is applicable; the pregnancy indicator represents whether the syndrome element is applicable during pregnancy, for example, 0 represents universal, 1 represents not applicable during pregnancy, and 2 represents applicable during pregnancy; and the other information of the syndrome element represents other information related to the syndrome element.

[0044] As an example only, the classification rule is related to the contribution level of the element to the evidence element. The format of each term in this classification rule is as follows:

[0045] {Symptom ID | Four Diagnostic Elements ID | Element's Contribution Level | Element's Contribution Score (CP_Score) | Other Information}

[0046] Among them, the syndrome element ID represents the unique identifier of the syndrome element; the four diagnostic elements ID represents the unique identifier of the four diagnostic elements; the contribution level of the element is used to represent the contribution level of the four diagnostic elements to the syndrome element, which is defined as RC-PS, and is explained in detail below:

[0047] RC-P S The parameter R is used to represent the contribution level. In this embodiment, six contribution levels are defined for the four diagnostic elements related to the syndrome elements, which are A, B, C, D, E and F from high to low. That is, the value of the R parameter can be any one of A to F.

[0048] Among them, A contribution level is used to represent the symptom group, indicating that the symptoms of the four diagnostic elements can be defined as diseases; B contribution level is used to represent existing pathological symptoms; C contribution level is used to represent the direct main symptom group, indicating that the four diagnostic elements can characteristically represent typical syndrome elements; D contribution level is used to represent the indirect main symptom group, indicating that the four diagnostic elements can indirectly represent typical syndrome elements; E contribution level is used to represent the auxiliary symptom group, indicating that the influence of the four diagnostic elements is relatively minor; F contribution level is used to represent the residual symptom group, indicating that the four diagnostic elements are serious on the surface, but have a very low correlation with the syndrome elements in reality.

[0049] RC-P S The parameter C in the formula represents the number of factors whose contribution level to the element is effective in scoring the element's contribution to the overall score. For example, parameter C can be configured to 0, 1, 2, or 3. It is understood that the first scoring rule to be used will differ depending on the number of effective factors.

[0050] RC-P S The parameter P in S This parameter, PS, represents the contribution score of any additional diagnostic elements when the number of diagnostic elements appearing in the contribution level of an element exceeds the number of corresponding scoring elements. For example only, this parameter can be configured to 0, 1, or 2 points.

[0051] The contribution score CP_Score of an element represents the initial contribution score CP_Score of the element to its corresponding contribution level. As an example, the contribution score CP_Score of this element can be configured as follows: Level A: 18 points, Level B: 16 points, Level C: 13 points, Level D: 10 points, Level E: 5 points, and Level F: 2 points.

[0052] Other information is used to indicate other information related to this rule entry.

[0053] As an example only, the scoring rule is used to represent the scoring rules for the number of different scoring elements corresponding to a contribution level. It can be understood as a rule for calculating the coefficients to be applied to the four diagnostic elements belonging to that contribution level based on the number of scoring elements corresponding to that contribution level. Since the number of scoring elements can range from 0, 1, 2, and 3, this scoring rule can be defined as follows:

[0054] {Count=1, S11=a|Count=2, S21=b, S22=c|Count=3, S31=d, S32=e, S33=f|}

[0055] The specific explanations of the above scoring rules are as follows:

[0056] When Count = 1 for a certain contribution level, that is, when the number of scoring elements corresponding to it is 1, the first element belonging to that contribution level is scored according to S11 (i.e. a).

[0057] When Count = 2 for a certain contribution level, that is, when the number of scoring elements corresponding to it is 2, the calculation coefficient of the first four diagnostic elements belonging to that contribution level is S21 (i.e., b) and the calculation coefficient of the second four diagnostic elements is S22 (i.e., b).

[0058] When Count = 3 for a certain contribution level, that is, when the number of scoring elements corresponding to it is 3, the calculation coefficient of the first four diagnostic elements belonging to that contribution level is S31 (i.e., d), the calculation coefficient of the second four diagnostic elements is S32 (i.e., e), and the calculation coefficient of the third four diagnostic elements is S33 (i.e., f).

[0059] It should be noted that the scoring rules do not require configuring the calculation coefficient corresponding to Count=0. In fact, when Count=0 for a certain contribution level, meaning the number of scoring elements corresponding to that level is 0, the contribution level can be configured as R0, such as A0, B0, C0, D0, E0, or F0. It can be understood that for contribution level R0, elements belonging to that level can be scored directly according to the configured contribution score CP-Score, and this CP-Score will be configured as a negative value of the contribution score for the corresponding R level. For example, the CP-Score for contribution level A0 is configured as -18, the CP-Score for contribution level B0 is configured as -16, and so on. This will not be elaborated further here. In other words, if the number of scoring elements corresponding to a certain contribution level is 0, it means that the four diagnostic elements belonging to that contribution level have a negative score (i.e., a deduction) for the corresponding syndrome element.

[0060] In a typical application scenario, a = b = d, c < b, f < e < d. For example, a, b, and d can all be configured to 100%, b can be configured to 70%, e can be configured to 60%, and f can be configured to 30%.

[0061] As an example only, the threshold rule is used to represent the impact of symptom severity of the four diagnostic elements on scoring, as well as the scoring thresholds for syndrome elements and syndromes. This threshold rule can be defined as follows:

[0062] {Sym_Weak=g|Sym_Middle=h|Sym_Heavy=i|Snf_ThresHold=j|syn_ThresHold=k}

[0063] As described above, each of the four diagnostic elements has a severity level, ranging from mild to moderate, with the default being moderate. Based on this threshold rule, the impact of the symptom severity of the four diagnostic elements on the scoring is as follows: if a certain element is mild, its score must be multiplied by the value of Sym_Weak; if it is moderate, its score must be multiplied by the value of Sym_Middle; and if it is severe, its score must be multiplied by the value of Sym_Heavy. Furthermore, Snf_ThresHold represents the contribution threshold for the final score of a certain syndrome element. Syn_ThresHold is used to represent the contribution threshold for the final score of a certain syndrome.

[0064] In a typical application scenario, g < h < i, Snf_ThresHold < syn_ThresHold. For example, g can be configured to 70%, h can be configured to 100%, i can be configured to 150%, Snf_ThresHold can be configured to 49.9, and syn_ThresHold can be configured to 99.

[0065] Based on the classification rules, scoring rules, and threshold rules proposed above, the following describes a possible first scoring algorithm proposed in this embodiment. This first scoring algorithm is used to calculate the contribution score of each contribution level of the evidence element:

[0066] When the Count of a certain diagnostic element's contribution level R (R can be any of A / B / C / D / E / F) is 1, the contribution score is calculated based on the number of diagnostic elements belonging to that contribution level:

[0067] i) If the number of four diagnostic elements belonging to this contribution level is 0, then its contribution score is 0.

[0068] ii) If the number of four diagnostic elements belonging to this contribution level is 1, then its contribution score is Sym_svr*S11*CP_Score.

[0069] iii) If the number of four diagnostic elements belonging to this contribution level is n (n>1), then its contribution score is Sym_svr*S11*CP_Score+(n-1)*PS.

[0070] It should be noted that Sym_svr refers to the symptom severity of the four diagnostic elements that have been marked, and its values ​​can be Sym_Weak (corresponding to mild), Sym_Middle (corresponding to moderate), and Sym_Heavy (corresponding to severe). If there is only one four diagnostic element belonging to a certain contribution level of a syndrome, the value corresponding to the symptom severity of that four diagnostic element (configured in the threshold rules) is used for calculation; if there are more than one four diagnostic element belonging to a certain contribution level of a syndrome, the value of the most severe symptom severity of the four diagnostic elements belonging to that contribution level is used for calculation.

[0071] When the Count of a certain diagnostic element's contribution level R (R can be any of A / B / C / D / E / F) is 2, the contribution score is calculated based on the number of diagnostic elements belonging to that contribution level:

[0072] i) If the number of four diagnostic elements belonging to this contribution level is 0, then its contribution score is 0; ii) If the number of four diagnostic elements belonging to this contribution level is 1, then its contribution score is Sym_svr*S21*CP_Score.

[0073] ii) If the number of four diagnostic elements belonging to this contribution level is 2, then its contribution score is Sym_svr1*S21*CP_Score+Sym_svr2*S22*CP_Score.

[0074] iii) If the number of four diagnostic elements belonging to this contribution level is n (n>2), then its contribution score is Sym_svr1*S21*CP_Score+Sym_svr2*S22*CP_Score+(n-2)*PS.

[0075] It should be noted that Sym_svr1 and Sym_svr2 refer to the symptom severity of the four diagnostic elements that have been marked, and their values ​​can be Sym_Weak (corresponding to mild), Sym_Middle (corresponding to moderate), and Sym_Heavy (corresponding to severe). If there is only one four diagnostic element belonging to a certain contribution level of a syndrome, then Sym_svr1 is calculated based on the value corresponding to the symptom severity of that four diagnostic element (configured in the threshold rules). If there are more than one four diagnostic element belonging to a certain contribution level of a syndrome, then Sym_svr1 is calculated based on the value of the most severe symptom severity among the four diagnostic elements belonging to that contribution level, and Sym_svr2 is calculated based on the value of the most severe symptom severity among the remaining four diagnostic elements after excluding the four diagnostic element with the most severe symptom severity.

[0076] When the Count of a certain diagnostic element's contribution level R (R can be any of A / B / C / D / E / F) is 3, the contribution score is calculated based on the number of diagnostic elements belonging to that contribution level:

[0077] i) If the number of four diagnostic elements belonging to this contribution level is 0, then its contribution score is 0; ii) If the number of four diagnostic elements belonging to this contribution level is 1, then its contribution score is Sym_svr1*S31*CP_Score.

[0078] iii) If the number of four diagnostic elements belonging to this contribution level is 2, then its contribution score is Sym_svr1*S31*CP_Score+Sym_svr2*S32*CP_Score.

[0079] iv) If the number of four diagnostic elements belonging to this contribution level is 3, then its contribution score is Sym_svr1*S31*CP_Score+Sym_svr2*S32*CP_Score+Sym_svr3*S33*CP_Score.

[0080] v) If the number of four diagnostic elements belonging to this contribution level is n (n>3), then its contribution score is Sym_svr1*S31*CP_Score+Sym_svr2*S32*CP_Score+Sym_svr3*S33*CP_Score+(n-3)*PS.

[0081] Therefore, the calculation process of the contribution score for each element list corresponding to any target evidence element can be summarized as follows: determine the scoring parameters of the element list (including but not limited to Count and CP_Score parameters); calculate the contribution score of the element list based on the number of four diagnostic elements contained in the element list and the scoring parameters.

[0082] It should be noted that Sym_svr1, Sym_svr2, and Sym_svr3 refer to the severity of symptoms marked by the four diagnostic elements, and the values ​​can be Sym_Weak (corresponding to mild), Sym_Middle (corresponding to moderate), and Sym_Heavy (corresponding to severe). If there is only one diagnostic element belonging to a certain contribution level of a syndrome, then Sym_svr1 is calculated based on the value corresponding to the symptom severity of that diagnostic element (configured in the threshold rules). If there are two diagnostic elements belonging to a certain contribution level of a syndrome, then Sym_svr1 is calculated based on the value of the most severe symptom severity among the diagnostic elements in that contribution level, and Sym_svr2 is calculated based on the value of the most severe symptom severity among the remaining diagnostic elements after excluding the one with the most severe symptom severity. If there are more than two diagnostic elements belonging to a certain contribution level of a syndrome, then Sym_svr1 is calculated based on the value of the most severe symptom severity among the diagnostic elements in that contribution level, Sym_svr2 is calculated based on the value of the most severe symptom severity among the remaining diagnostic elements after excluding the one with the most severe symptom severity, and Sym_svr3 is calculated based on the value of the most severe symptom severity among the remaining diagnostic elements after excluding the two with the most severe symptom severity.

[0083] B2. Based on at least one target symptom element, symptom derivation is performed to obtain at least one target symptom and the score of each target symptom.

[0084] The electronic device can deduce syndromes from all the target syndrome elements obtained based on the preset TCM syndrome dictionary, body part dictionary, list of mapping relationships between syndromes and treatment principles, and syndrome deduction algorithm rules in the medical knowledge base. The result is at least one target syndrome and the score of each target syndrome. Considering that the same syndrome may have different expressions, the medical knowledge base can also be preset with a TCM syndrome synonym dictionary.

[0085] The evidence element derivation algorithm rules include: cleaning rules, adjustment rules, and derivation rules, as well as the second and third scoring algorithms based on these rules.

[0086] As an example only, the format of each entry in the Dictionary of Traditional Chinese Medicine Syndromes is as follows:

[0087] {Syndrome ID|Syndrome Name|Syndrome Gender|Syndrome Minimum Age|Syndrome Maximum Age|Pregnancy Signs|Other Syndrome Information}

[0088] Among them, Syndrome ID represents the unique identifier of the syndrome; Syndrome Name represents the standardized name of the syndrome; Syndrome Gender represents the gender to which the syndrome applies, for example, 0 means it applies to both men and women, 1 means it applies only to men, and 2 means it applies only to women; Syndrome Minimum Age and Syndrome Maximum Age represent the age range to which the syndrome applies; Pregnancy Indicator represents whether it applies to pregnancy, for example, 0 means it applies to all, 1 means it is prohibited during pregnancy, and 2 means it is available during pregnancy; Syndrome Other Information represents other information related to the syndrome.

[0089] As an example, the format of each entry in the body part dictionary is as follows: {ID|Name}

[0090] Here, ID represents a unique identifier for a body part; and name represents the name of the body part.

[0091] As an example only, the format of each entry in the dictionary of theorem on syndromes in Traditional Chinese Medicine is as follows:

[0092] {Syndrome ID | Synonym Name | Other Information about Synonyms}

[0093] Among them, Syndrome ID represents the unique identifier of the syndrome, which can be matched with the syndrome ID in the TCM syndrome dictionary; Syndrome Syndrome Name represents the synonym name of the syndrome. It can be understood that if a syndrome has multiple synonyms, then there are multiple entries here; Syndrome Syndrome Other Information represents other information related to the syndrome synonym.

[0094] The mapping relationship between syndromes and treatment principles can be represented as follows:

[0095] {Master relation table name | Master relation ID | Dependent relation table name | Dependent relation ID | Dependent relation sorting | Other information}

[0096] In this table, the primary relation table name represents the table name corresponding to the primary relation, which is syn in this case, meaning syndrome; the primary relation ID represents the unique identifier of the primary relation, corresponding to the record ID in the table name corresponding to the primary relation; the secondary relation table name represents the table name corresponding to the secondary relation, which is tre in this case, meaning treatment principle; the secondary relation ID represents the unique identifier of the secondary relation, corresponding to the record ID in the table name corresponding to the secondary relation; and the secondary relation sorting indicates the order of the secondary relations, generally increasing from 1.

[0097] It is understandable that the medical knowledge base can also pre-set mapping lists between treatment principles and traditional Chinese medicine formulas, and mapping lists between traditional Chinese medicine formulas and traditional Chinese medicines. The format of these mapping lists can refer to the mapping lists between syndromes and treatment principles mentioned above, only with adaptive modifications to the parameters. For example, in the mapping list between treatment principles and traditional Chinese medicine formulas, the primary relation table is named tre, which represents the treatment principle, and the secondary relation table is named pre, which represents the traditional Chinese medicine formula, and so on. This will not be elaborated further here.

[0098] As an example only, the cleaning rule is used to clean the interfering characters in the name of syndrome element and syndrome name, and it can be configured as follows: {Snf_Interfer = "(syndrome)" | Syn_Interfer = "syndrome" OR "syndrome pattern"}

[0099] Among them, the interfering characters that need to be cleaned in the name of syndrome element are configured in Snf_Interfer, and in this example, it is configured as "(syndrome)". For example, if the name of the syndrome element is "mind (syndrome)", then before syndrome derivation, the "(syndrome)" in the name of this syndrome element can be cleaned first, and only "mind" is retained, and then subsequent processing can be carried out. The interfering characters that need to be cleaned in the syndrome name are configured in Syn_Interfer, and it can be configured as "syndrome" or "syndrome pattern".

[0100] As an example only, the adjustment rule is used to adjust the score of a single disease location syndrome element, and this adjustment rule can be configured as follows:

[0101] {PosSnf_Count = 1 | PosSnf_Percentage1 < 40, AdjustValue1 = +5% | PosSnf_Percentage2 < 30, AdjustValue2 = +10%}

[0102] Among them, PosSnf_Count configures the number of disease location syndrome elements that need to have their scores adjusted. In this example, it is configured as 1, that is, when there is only 1 disease location syndrome element derived, the score obtained by scoring this disease location syndrome element needs to be adjusted; PosSnf_Percentage1 configures that when the score of the disease location syndrome element is less than 40, its AdjustValue1 score adjustment value is +5%; PosSnf_Percentage2 configures that when the score of the disease location syndrome element is less than 30, its AdjustValue2 score adjustment value is +10%.

[0103] As an example only, the derivation rule can be configured as follows:

[0104] <SnfToSyn_Rules | {SnfGroup_Count = 1, SnfToSyn_Count = 5 | SnfGroup_Count = 2, SnfToSyn_Count = 3 | SnfGroup_Count >= 3, SnfToSyn_Count = 2}, {Shield_Rule1 | Tre_Relation = 0}, {Shield_Rule2 | BodyPart_Including_ReduChar = 1 & SymName_Including_ReduChar = 0} >

[0105] The `SnfGroup_Count` and `SnfToSyn_Count` parameters define the number of syndromes that can be derived from each group of evidence elements, based on the number of groups of evidence elements. If there is only one group of evidence elements, then five syndromes can be derived from that group; if there are two groups of evidence elements, then three syndromes can be derived from each group; if there are three or more groups of evidence elements, then two syndromes can be derived from each group.

[0106] Among them, Shield_Rule1 defines the shielding rule 1 when deriving syndromes from grouped syndrome elements: Tre_Relation=0, which means that if the derived syndrome has no associated rule, the syndrome will be shielded.

[0107] Among them, Shield_Rule2 defines the shielding rule 2 when deriving syndromes from grouped syndrome elements: First, count the syndrome names derived from grouped syndrome elements that do not include the character ReduChar in the corresponding grouped syndrome element name; BodyPart_Including_ReduChar=1&SymName_Including_ReduChar=0 means: if the body part dictionary name in the knowledge base includes the redundant character ReduChar, and the name of the four diagnostic elements does not include the redundant character ReduChar, then the syndrome will be shielded.

[0108] The following describes a possible second scoring algorithm proposed in this embodiment. This second scoring algorithm is used to calculate the preliminary score of the syndrome that can be derived from a certain group of syndrome elements, and can be specifically expressed as follows:

[0109] Syn_Score=∑Snf_Percentage*Probit_Value

[0110] Where ∑Snf_Percentage is the cumulative contribution score of all evidence elements under a group of evidence elements; Probit_Value is the probability value for scoring the evidence element, and its algorithm is as follows:

[0111] Probit_Value=(100 / Snf_Count) / 100*Multiple+AdjustValue

[0112] Where Snf_Count represents the number of evidence elements contained in the group; if Snf_Count > 1, then Multiple = 2, otherwise Multiple = 1; if Snf_Count is odd and not 1, then AdjustValue = 0.01, otherwise AdjustValue = 0. It can be understood that, based on the threshold rules mentioned above, the score for each evidence element is less than 50, therefore this algorithm can ensure that the evidence score is less than 100.

[0113] The following describes a possible third scoring algorithm proposed in this embodiment. This third scoring algorithm is used to deduct points based on the name of the syndrome that can be derived from a certain group of syndrome elements. In other words, this third scoring algorithm is a deduction mechanism, which can be specifically expressed as follows:

[0114] Syn_Score=Syn_Score*(1-10%*Deducted_Count)

[0115] Deducted_Count is used to count the number of characters in the name of the syndrome derived from the grouped syndrome elements that do not include the corresponding group syndrome element name but are included in the names of other syndrome elements in the TCM syndrome element dictionary. Its value ranges from 0 to 5; that is, if the counted number is greater than 5, then Deducted_Count is directly calculated as 5. It can be understood that 10% * Deducted_Count expresses the deduction ratio.

[0116] The above deduction mechanism can be understood as follows: if the syndrome name derived from the syndrome elements includes a character that meets the conditions (the character is not contained in the name of any syndrome element in the corresponding group of syndrome elements, but is contained in the name of other syndrome elements in the syndrome element dictionary), then the syndrome will be scored by deducting 10% of the score for each single character that meets the conditions, up to a maximum of 5 characters that meet the conditions.

[0117] In some embodiments, after loading information such as the patient's age, gender, and pregnancy status, the electronic device can load a set of four diagnostic elements, each of which has been assigned a symptom severity (mild, moderate, severe, or moderate). Then, it retrieves a TCM syndrome element dictionary and syndrome element derivation algorithm rules from a TCM knowledge base and writes them into a cache. The TCM syndrome element dictionary and syndrome element derivation algorithm rules have been described previously and will not be repeated here. After loading this content, the electronic device can first perform entry removal and other processing on the retrieved TCM syndrome element dictionary in the cache based on the patient's age, gender, and pregnancy status. It can be understood that since the TCM syndrome element dictionary defines whether a TCM syndrome element is applicable based on the patient's age, gender, and pregnancy status, by matching the TCM syndrome element dictionary with the patient's age, gender, and pregnancy status, entries of syndrome elements that do not meet the patient's age, gender, and pregnancy status conditions can be removed from the cached TCM syndrome element dictionary. Afterward, the electronic device can begin syndrome element derivation, which can be implemented through the following steps:

[0118] C1. Traverse the set of four diagnostic elements to determine the current four diagnostic elements.

[0119] C2. Find the syndrome elements that are related to the current four diagnostic elements as the target syndrome elements.

[0120] Using the evidence element derivation algorithm rules proposed above, electronic devices can quickly determine the evidence elements associated with the current four diagnostic elements, that is, the evidence elements that can be deduced from the current four diagnostic elements. These evidence elements can then be used as the target evidence elements of the current four diagnostic elements.

[0121] C3. Update the syndrome element list based on the contribution level of the current four diagnostic elements to each target syndrome element.

[0122] Using the evidence element derivation algorithm rules proposed above, the electronic device can clearly determine the contribution level (i.e., element group RC-P) of each target evidence element corresponding to the current four diagnostic elements. S This includes information such as the contribution level of the current four diagnostic elements, the number of scoring elements effective in contributing to the target syndrome element, and the contribution score of the four diagnostic elements beyond the number of scoring elements effective for that contribution level. Simultaneously, the electronic device can also obtain information such as the initial contribution score (CP_Score) for each contribution level. These parameters have been described above and will not be repeated here. Based on the information obtained above, the electronic device can update the syndrome element list.

[0123] C4. Return to execution and traverse the set of four diagnostic elements to determine the steps for the current four diagnostic elements and subsequent steps, until the traversal is complete.

[0124] It is understandable that the steps C1-C3 above will be repeated until all four diagnostic elements in the set have been traversed before stopping.

[0125] C5. Calculate the score of each target element in the latest element list.

[0126] After ceasing the repeated execution of steps C1-C3, i.e., after the set of four diagnostic elements has been completely traversed, the electronic device can obtain the latest (and most complete) list of syndrome elements based on the set of four diagnostic elements. According to the first scoring algorithm proposed above, the electronic device can calculate the score of each target syndrome element in the list of syndrome elements.

[0127] In some embodiments, the syndrome element list specifically uses each target syndrome element as a key value, and the syndrome element list records at least one element list corresponding to each target syndrome element, wherein the four diagnostic elements in each element list are at the same contribution level to the corresponding target syndrome element; then step C3 may include:

[0128] D1. Traverse the target syndrome elements corresponding to the current four diagnostic elements to determine the current target syndrome element.

[0129] As previously described, multiple syndrome elements may be deduced from one four diagnostic elements, that is, there may be multiple target syndrome elements corresponding to the current four diagnostic elements. Based on this, the electronic device may traverse the target syndrome elements corresponding to the current four diagnostic elements, and record the currently traversed target syndrome element as the current target syndrome element.

[0130] D2. Detect whether the current target syndrome element exists in the syndrome element list.

[0131] D3. If the current target syndrome element does not exist in the syndrome element list, add the current target syndrome element to the syndrome element list, and add the current four diagnostic elements to the target element list, where the target element list is the element list corresponding to the contribution degree level of the current four diagnostic elements to the current target syndrome element.

[0132] D4. If the current target syndrome element already exists in the syndrome element list, detect whether the current four diagnostic elements exist in the target element list.

[0133] D5. If the current four diagnostic elements do not exist in the target element list, add the current four diagnostic elements to the target element list.

[0134] Only for example, the format of the syndrome element list may be as follows:

[0135] [{SnfID1|<R group 1, SymList, R C , R CP_Score , R PS |R group 2, SymList, R C , R CP_Score , R PS |……>}, {SnfID2|<R group 1, SymList, R C , R CP_Score [[ID=3)) PS CP_Score |R group 2, SymList, RC, R PS , R C |……>}, ……]

[0136] Among them, SnfID1 and SnfID2 are the syndrome element IDs deduced from the four diagnostic element set (that is, the syndrome element IDs of the target syndrome elements). Since multiple target syndrome elements may be obtained from one current four diagnostic element, the list obtained by the electronic device is a list with the syndrome element ID as the key value (syndrome element list). R group 1 and R group 2, etc. are the contribution degree levels of a four diagnostic element to the corresponding target syndrome element, and it can include at most six levels: A, B, C, D, E, and F. SymList is the element list corresponding to the contribution degree level, and this element list includes the ID of the four diagnostic elements and the marked mild, moderate, and severe symptom degrees. R CThe number of scoring elements that affect the contribution level to the corresponding evidence element, with a value of 0, 1, 2, or 3. R CP_Score R represents the initial contribution score of the corresponding evidence element for each contribution level. PS The contribution score is the score for elements that appear beyond the number of elements that are effective in the scoring.

[0137] For the current target evidence element, the evidence element list records the list of elements at each contribution level under that current target evidence element. The electronic device can search for the current four diagnostic elements in all the element lists corresponding to the current target evidence element. If it is found, it means that the correspondence between the current four diagnostic elements and the current target evidence element is already recorded in the evidence element list, and the electronic device does not need to record it again. Conversely, if it is not found, it means that the correspondence between the current four diagnostic elements and the current target evidence element is not yet recorded in the evidence element list, and the electronic device needs to add the current four diagnostic elements to the corresponding element list. This allows for the updating of the evidence element list.

[0138] In some embodiments, step C5 may include:

[0139] E1. Calculate the contribution score of each element list corresponding to the target element based on the scoring parameters of each element list corresponding to the target element.

[0140] For each target element, the electronic device can calculate the contribution score S of each element list corresponding to that target element according to the first scoring algorithm. R According to the first scoring algorithm mentioned above, taking element A as an example, the contribution score S for any contribution level R under element A is... R The calculation can be specifically as follows:

[0141]

[0142]

[0143]

[0144]

[0145] Among them, R C The number of factors that contribute to the contribution level R to the evidence element A is the number of factors that can be used to score the contribution level R to the evidence element A. The possible values ​​are 0, 1, 2 or 3.

[0146] Among them, R n This refers to the number of the four diagnostic elements appearing in the element list corresponding to the contribution level R of this diagnostic element. As can be seen from the first scoring algorithm proposed earlier, R... nWhen the value is 0, the contribution level R to the group contribution score of factor A is 0.

[0147] Among them, R Sym_svr It is when the contribution level R is R C When the value is 0, the symptom severity of each of the four diagnostic elements appearing in the element list corresponding to the contribution level R can be classified into three categories: mild, moderate, and severe, with corresponding values ​​of Sym_Weak, Sym_Middle, and Sym_Heavy, respectively.

[0148] Among them, Sym_svr, Sym_svr1, Sym_svr2 and Sym_svr3 represent the symptom severity of each of the four diagnostic elements appearing in the element list corresponding to the contribution level R, with three cases: mild, moderate and severe, and the corresponding values ​​can be Sym_Weak, Sym_Middle and Sym_Heavy, respectively.

[0149] As can be seen from the above scoring process, if the number of diagnostic elements appearing in the element list corresponding to the contribution level R is 1, then Sym_svr and Sym_svr1 are directly calculated based on the symptom severity of the only diagnostic element appearing in the element list corresponding to the contribution level R. If the number of diagnostic elements appearing under the contribution level of a certain syndrome is greater than 1, then Sym_svr, Sym_svr1, Sym_svr2, and Sym_svr3 can be calculated by taking values ​​from the symptom severity of the diagnostic elements in the element list corresponding to the contribution level R in descending order.

[0150] Among them, S11, S21, S22, S31, S32 and S33 are all pre-set values, which have been described in the scoring rules described above, and will not be repeated here.

[0151] Among them, R CP_Score The contribution level R is the initial contribution score of the evidence element A, which has been described in the classification rules above and will not be repeated here.

[0152] Among them, R PS The contribution score for the additional four diagnostic elements beyond the number of scoring elements in the contribution level R has been described in the classification rules above and will not be repeated here.

[0153] E2. Sum the contribution scores of each element list corresponding to the target element to obtain the total contribution score.

[0154] The electronic device can sum the contribution scores of each element list corresponding to the target element, and the result ∑S R This is the total contribution score of the objective element.

[0155] E3. When the total contribution score is less than the preset contribution threshold, determine the score of the target syndrome element as the total contribution score.

[0156] E4. When the total contribution score is greater than or equal to the contribution threshold, determine the score of the target syndrome element as the contribution threshold.

[0157] In the above threshold rules, there has been a description of syn_ThresHold, which represents the contribution threshold for the final scoring of syndrome elements. It can be understood that no matter which target syndrome element, its final total contribution score cannot exceed the contribution threshold syn_ThresHold. Based on this, the electronic device can compare the total contribution score ∑S R of the obtained target syndrome element with the contribution threshold Snf_ThresHold; if ΣS R <Snf_ThresHold, then the final true score of this target syndrome element is the contribution score ∑S R ; if ∑S R ≥Snf_ThresHold, then the final true score of this target syndrome element is the contribution threshold Snf_ThresHold. The above process can be expressed as:

[0158]

[0159] At this point, the electronic device can obtain each target syndrome element and the scores of each target syndrome element. The electronic device can re - sort the target syndrome elements in the syndrome element list according to the scores of each target syndrome element, arranging the target syndrome elements with high scores in the front of the syndrome element list and the target syndrome elements with low scores in the back of the syndrome element list. Thus, the first knowledge graph can be constructed according to the sorting of each target syndrome element in the syndrome element list.

[0160] In some embodiments, considering the limited display interface of the electronic device, the user can preset a maximum number of syndrome element derivations and / or a minimum score for syndrome element display. When the maximum number of syndrome element derivations is set, if there are too many target syndrome elements in the syndrome element list and the number is greater than the maximum number of syndrome element derivations, the target syndrome elements with low scores can be removed until the number of target syndrome elements in the syndrome element list is not greater than the maximum number of syndrome element derivations. Similarly, when the minimum score for syndrome element display is set, if there are too many target syndrome elements in the syndrome element list, the target syndrome elements with scores less than the minimum score for syndrome element display can be removed.

[0161] In some embodiments, after the electronic device loads information such as the patient's age, gender, and pregnancy status, it then loads the obtained set of four diagnostic elements. Each four diagnostic element in this set has been set with a symptom degree (any one of mild, moderate, and severe) and a list of syndrome elements derived therefrom. After that, information such as the traditional Chinese medicine syndrome element dictionary, traditional Chinese medicine syndrome dictionary, traditional Chinese medicine syndrome synonym dictionary, body part dictionary, mapping relationship list of syndromes and treatment principles, and syndrome derivation algorithm rules is retrieved from the traditional Chinese medicine knowledge base and written into the cache. These dictionaries, mapping relationship lists, and algorithm rules have been described above and will not be elaborated here. After loading these contents, the electronic device can first perform operations such as entry deletion on the obtained traditional Chinese medicine syndrome dictionary in the cache according to the patient's age, gender, and pregnancy status. It can be understood that since the traditional Chinese medicine syndrome dictionary defines information such as the patient age, gender, and pregnancy status applicable to traditional Chinese medicine syndromes, by matching the traditional Chinese medicine syndrome dictionary with the patient's age, gender, and pregnancy status, entries of syndromes that do not meet the patient's age, gender, and pregnancy conditions can be removed from the traditional Chinese medicine syndrome dictionary in the cache. After that, the electronic device can start syndrome derivation, which can be specifically implemented through the following steps:

[0162] F1. Respectively search for syndromes associated with each target syndrome element as candidate syndromes.

[0163] Among them, for any target syndrome element, the syndromes associated with this target syndrome element refer to: in the syndrome name, syndromes that contain the syndrome element name of this target syndrome element. For example, if the syndrome element name of a certain target syndrome element is A and the syndrome name of a certain syndrome is ABC, then this syndrome is the syndrome associated with this target syndrome element and can be determined as a candidate syndrome. Considering that the same syndrome may have different expressions, the electronic device can specifically search for syndromes associated with each target syndrome element based on the traditional Chinese medicine syndrome dictionary and the traditional Chinese medicine syndrome synonym dictionary. That is, for a certain syndrome, as long as the syndrome synonyms of this syndrome include the syndrome element name of a certain target syndrome element, this syndrome can be determined as a candidate syndrome.

[0164] For the convenience of subsequent processing, the electronic device can write all the found candidate syndromes into a temporary variable tempSynList.

[0165] In some embodiments, before step F1, the electronic device can also first perform name cleaning on the currently obtained list of syndrome elements, the traditional Chinese medicine syndrome element dictionary in the cache, and the traditional Chinese medicine syndrome dictionary in the cache according to the cleaning rules proposed above to clean up all interfering characters. For example, if the syndrome element name of a certain target syndrome element in the list of syndrome elements is "mind (syndrome)", after the electronic device cleans up the interfering characters, the syndrome element name of this target syndrome element is updated to "mind".

[0166] F2. Group at least one target syndrome element according to the candidate syndrome, and determine the number of target syndromes based on the grouping results.

[0167] The electronic device can group the obtained target elements according to the correspondence between each candidate symptom and each target symptom, resulting in multiple grouped symptom elements, or multiple target symptom groups. Specifically, the electronic device can group target elements associated with the same candidate syndrome into the same group, thereby obtaining at least one target symptom group. The process is as follows: the electronic device can perform loop processing in the temporary variable tempSynList, that is, iterate through the temporary variable tempSynList. For ease of description, in this embodiment, the candidate syndrome currently being traversed is recorded as the current candidate symptom. The electronic device can then search for all target elements associated with the current candidate symptom and determine all the found target elements as a target symptom group. It can be understood that the current candidate syndrome may actually be associated with multiple target elements. For example, candidate syndrome ABC may be associated with target elements A, B, and C, thus obtaining a target symptom group containing A, B, and C.

[0168] It is important to note that different target evidence groups may contain the same target evidence. For example, if the evidence list obtained by the electronic device includes the following independent target evidences: A, B, C, D, E, and F; and the candidate evidences in tempSynList include AB, BCD, DEF, and EFH, then the electronic device can obtain four target evidence groups: the first target evidence group includes A and B, the second target evidence group includes B, C, and D, the third target evidence group includes D, E, and F, and the fourth target evidence group includes E and F.

[0169] As can be seen from the derivation rules presented above, the number of groups of evidence elements determines the number of syndromes that can be derived from each group of evidence elements. Based on this, the electronic device can consult and match the derivation rules according to the number of target evidence element groups to determine the number of target syndromes. The number of target syndromes refers to the number of syndromes that can be derived from a single target evidence element group. Taking four target evidence element groups as an example, by consulting the derivation rules exemplified above, it can be seen that the number of target syndromes is 2, that is, each target evidence element group can derive two target syndromes.

[0170] F3. Calculate the score for each candidate syndrome.

[0171] As can be seen from the second and third scoring algorithms proposed above, the electronic device needs to perform two calculations here: determine the candidate score of each candidate syndrome based on the grouping results, and determine the deduction ratio of each candidate syndrome based on the name of each candidate syndrome, thereby obtaining the final score of each candidate syndrome.

[0172] The calculation process for the candidate score is as follows: First, for each target symptom group, calculate the probability value (Probit_Value) of that target symptom group relative to the corresponding candidate syndrome according to Probit_Value = (100 / Snf_Count) / 100*Multiple + AdjustValue; then, calculate the preliminary score of that target symptom group relative to the corresponding candidate syndrome according to Syn_Score = ∑Snf_Percentage*Probit_Value. This preliminary score is the candidate score for that candidate syndrome. The above formulas have been introduced earlier and will not be repeated here.

[0173] The calculation process for the deduction ratio is as follows: First, the syndrome name of each candidate syndrome is processed to find characters in the syndrome name that do not include any syndrome name in the corresponding target syndrome group. For ease of description, these characters can be recorded as redundant characters. Then, combined with the TCM syndrome dictionary in the cache, the number of syndrome names containing the redundant characters in the syndrome names of other syndromes (not any target syndrome in the corresponding target syndrome group) in the TCM syndrome dictionary is counted. It should be noted that the value of this number is in the range of 0 to 5 (that is, the maximum value of this number is 5). According to the third scoring algorithm proposed above, the deduction ratio 10% * Deducted_Count can be obtained, where Deducted_Count is the counted number.

[0174] As an example, if the candidate syndrome is EFH, and the target syndrome element group includes syndrome elements E and F, then the redundant character is H. The electronic device can search for all other syndrome elements containing this redundant character in a TCM syndrome element dictionary. Assuming the electronic device ultimately finds syndrome elements F, FG, and FH containing this redundant character, then the statistically obtained number is 3, and the reduction ratio is 30%.

[0175] As mentioned above, according to the third scoring algorithm, the final score for any candidate syndrome is: Syn_Score = Syn_Score * (1 - 10% * Deducted_Count). The electronic device can sort the candidate syndromes in descending order based on their scores.

[0176] In some embodiments, after calculating the candidate scores of each candidate syndrome and before calculating the deduction ratio of each candidate syndrome, the electronic device may further screen (mask) all the obtained candidate syndromes according to each target syndrome group to make the derivation results more accurate. The process may be as follows:

[0177] First, determine the current target element group. It can be understood that the electronic device can obtain at least one target element group by grouping. The electronic device can traverse the groups to determine the target element group currently being traversed; this target element group is the current target element group.

[0178] Next, in the tempSynList obtained through step F2, a matching is performed to find candidate syndromes in the tempSynList whose syndrome names simultaneously include the syndrome names of all syndromes in the corresponding target syndrome group. These candidate syndromes are used as the initial syndrome list SynList1, and the initial syndrome list is processed in descending order of name length.

[0179] Then, according to the masking rule 1 shown above, the existing mapping relationship list of syndromes and treatment principles in the cache is matched with the initially derived syndrome list SynList1. The electronic device can remove candidate syndromes without treatment principle relationships from the initially derived syndrome list SynList1, resulting in a syndrome list SynList2 that is masked for those without treatment principle relationships.

[0180] Next, according to the masking rule 2 shown above, the syndrome name of each candidate syndrome in the syndrome list SynList2 is processed. The character "Char" is found in the syndrome name that does not include any of the syndrome names in the corresponding group of syndrome elements. It is then checked whether the body part dictionary and the loaded set of four diagnostic elements contain these corresponding characters. If "Char" exists, and the body part dictionary includes "Char", and the loaded set of four diagnostic elements does not include "Char", then masking rule 2 is satisfied. Candidate syndromes that satisfy masking rule 2 can be removed from the syndrome list SynList2 to obtain the syndrome list SynList3. It can be understood that the syndrome list SynList3 is the syndrome list corresponding to the current target syndrome element group.

[0181] After the above screening (masking) process, the electronic device can calculate the deduction ratio for each candidate syndrome in SynList3 to obtain the final score for each candidate syndrome in SynList3. The electronic device can then sort all candidate syndromes in SynList3 in descending order based on their final scores; this will not be elaborated further here.

[0182] It is understandable that through the above process, each target syndrome element group can obtain a corresponding syndrome list SynList3, and the candidate syndromes in each syndrome list SynList3 have been sorted according to their scores.

[0183] F4. Screening is performed based on the scores of each candidate syndrome and the number of target syndromes to obtain at least one target syndrome and the scores of each target syndrome.

[0184] As described above, the number of target syndromes limits the number of syndromes that can be derived from each target syndrome element group. Based on this, the electronic device can screen according to the scores of each candidate syndrome and the number of target syndromes, thereby obtaining at least one target syndrome and the scores of each target syndrome, specifically:

[0185] For each target syndrome group, the corresponding syndrome list (i.e., syndrome list SynList3) is used. Since the candidate syndromes in SynList3 are sorted according to their scores, the electronic device can retain only the top N candidate syndromes in SynList3 as target syndromes, where N represents the number of target syndromes. This yields N target syndromes and their respective scores based on the target syndrome.

[0186] The electronic device can summarize all the retained target syndromes, and the summary result is the derived syndrome list. Based on the scores of each target syndrome, the electronic device can reorder the target syndromes in the syndrome list, placing the higher-scoring syndromes at the beginning and the lower-scoring syndromes at the end. The electronic device can then construct a second knowledge graph according to the order of the target syndromes in the syndrome list.

[0187] In some embodiments, considering the limited display interface of the electronic device, the user can pre-set a maximum number of syndrome derivations and / or a minimum score for syndrome display. If there are too many target syndromes in the syndrome list, exceeding the maximum number of syndrome derivations, target syndromes with lower scores can be removed until the number of target syndromes in the syndrome list does not exceed the maximum number of syndrome derivations. Similarly, when a minimum score for syndrome display is set, if there are too many target syndromes in the syndrome list, target syndrome elements with scores lower than the minimum score for syndrome display can be removed.

[0188] In some embodiments, within the field of Traditional Chinese Medicine (TCM), syndrome elements and syndromes have completely mutually exclusive type definitions, known as opposing types. When an electronic device derives a syndrome based on a syndrome element (i.e., performs syndrome derivation), entries containing opposing types need to be removed. Therefore, a list of opposing types can be pre-defined in the medical knowledge base. This list can be defined as follows: {List of Type Names|List of Opposing Type Names}. As an example, this list of opposing types can be configured as: {"Heat", "Excess", "Exterior", "Upper", "Cold", "Deficiency", "Interior", "Lower"|"Cold", "Deficiency", "Interior", "Lower", "Heat", "Excess", "Exterior", "Upper"}

[0189] Based on this hedging type list, the electronic device can also perform conflict resolution on the derived syndrome list. Specifically, after reading the hedging type list into the cache from the medical knowledge base, it first searches for a character in the hedging type list that matches any syndrome name based on the syndrome name of each target syndrome in the syndrome list, and writes the character into a character list. Then, it searches for the hedging type name corresponding to each character in the character list and writes it into the hedging character list. Finally, it cleans up the syndrome list based on the hedging character list. If the syndrome name of a target syndrome in the syndrome list contains any character in the hedging character list, then the target syndrome can be removed from the syndrome list.

[0190] In some embodiments, the electronic device can also process the scores of disease location syndromes under specific conditions after grouping the syndrome element list. Specifically, in the derived syndrome element list, the number of disease location syndromes in the list is counted according to the syndrome element classification marker of each target syndrome element. If the counted number of disease location syndromes is 0, or the number of disease location syndromes is greater than 1, syndrome deduction can be performed directly. Conversely, if the counted number of disease location syndromes is 1, the electronic device can adjust the score of the unique disease location syndrome in the syndrome element list according to the adjustment rules shown above. As an example, according to the configured adjustment rules shown above, if the score of the unique disease location syndrome is <30, the score of the disease location syndrome can be increased by 10%; if the score of the disease location syndrome is <40, the score of the unique disease location syndrome can be increased by 5%.

[0191] In some embodiments, the TCM knowledge base of the electronic device may also include other dictionaries, which may include, but are not limited to, one or more of the following: a TCM treatment principle dictionary, a TCM prescription dictionary, and a TCM dictionary.

[0192] As an example only, the format of each entry in this dictionary of TCM treatment principles is as follows: {Treatment Principle ID|Treatment Principle Name|Treatment Principle Gender|Treatment Principle Minimum Age|Treatment Principle Maximum Age|Pregnancy Sign|Treatment Principle Other Information}

[0193] Among them, the treatment principle ID represents the unique identifier of the treatment principle; the treatment principle name represents the standardized name of the TCM treatment principle; the treatment principle gender represents the gender to which the treatment principle applies, for example, 0 means it is applicable to both men and women, 1 means it is only applicable to men, and 2 means it is only applicable to women; the minimum age and maximum age of the treatment principle represent the age range to which the treatment principle applies; the pregnancy indicator represents whether it is applicable during pregnancy, for example, 0 means it is universal, 1 means it is prohibited during pregnancy, and 2 means it is available during pregnancy; the other information of the treatment principle represents other information related to the treatment principle.

[0194] As an example only, the format of each entry in this dictionary of traditional Chinese medicine formulas is as follows: {Formula ID|Formula Name|Formula Gender|Minimum Age of Formula|Maximum Age of Formula|Pregnancy Sign|Other Information about Formula}; the format of each entry in this dictionary of traditional Chinese medicine is as follows: {Traditional Chinese Medicine ID|Traditional Chinese Medicine Name|Traditional Chinese Medicine Gender|Minimum Age of Traditional Chinese Medicine|Maximum Age of Traditional Chinese Medicine|Pregnancy Sign|Other Information about Traditional Chinese Medicine}. The definitions of each item can be found in the previous explanations of the entries in the dictionary of treatment principles for traditional Chinese medicine, and will not be repeated here.

[0195] A dictionary of TCM treatment principles can be used to construct a third knowledge graph, a dictionary of TCM formulas can be used to construct a fourth knowledge graph, and a dictionary of TCM herbs can be used to construct a fifth knowledge graph. Before constructing the knowledge graph, electronic devices can read the corresponding dictionaries from the TCM knowledge base into a cache. The specific process of constructing the third knowledge graph is as follows:

[0196] Iterate through the list of syndromes that have already been derived;

[0197] Based on the table name "syn" for syndrome, the table name "tre" for treatment, and the syndrome ID of the target syndrome being traversed, the target treatment (i.e. the treatment related to the target syndrome) is searched in the mapping relationship list of syndromes and treatments in the cache, and each target treatment is sorted according to the sorting relationship of each target treatment in the mapping relationship list.

[0198] Using the syndrome ID of the currently traversed target syndrome as the key value, establish the first relation list {SynID1|TreList1}. Here, SynID1 is the unique identifier of the target syndrome (i.e., the syndrome ID), and TreList1 is a list of treatment principles associated with the target syndrome. This list includes the treatment principle ID and the corresponding treatment principle name, with the treatment principle name being retrieved from the Traditional Chinese Medicine treatment principle dictionary based on the treatment principle ID.

[0199] The above process is repeated until all target elements in the syndrome list have been traversed, and the final first relation list can be obtained as follows: [{SynID1|TreList1},{SynID2|TreList2},…].

[0200] Similarly, the construction process of the fourth and fifth knowledge graphs can refer to the construction process of the third knowledge graph described above, except that the objects traversed, the list of mapping relationships read into the cache, and the objects searched are different, which will not be repeated here. The second relationship list finally obtained by the electronic device can be as follows: [{TreID1|PreList1},{TreID2|PreList2}…]; the third relationship list finally obtained by the electronic device can be as follows: [{PreID1|HerList1},{PreID2|HerList2}…]

[0201] Among them, TreID is the unique identifier of the target treatment principle, PreList is a list of Chinese medicine prescriptions associated with the target treatment principle, PreID is the unique identifier of the target Chinese medicine prescription, and HerList is a list of all Chinese medicines associated with the target Chinese medicine prescription.

[0202] Electronic devices can construct a third knowledge graph based on the first relation list, a fourth knowledge graph based on the second relation list, and a fifth knowledge graph based on the third relation list, which will not be elaborated here.

[0203] It should be noted that, similar to the entry removal process for the TCM syndrome element dictionary described above, after the electronic device loads any dictionary from the TCM treatment principle dictionary, TCM prescription dictionary, and TCM dictionary into the cache, it can remove entries from the loaded dictionary based on information such as the patient's age, gender, and pregnancy status. This will not be elaborated further here.

[0204] As can be seen from the above, in this embodiment of the application, the results obtained from the long logic chain derivation in Traditional Chinese Medicine include not only the target syndrome elements and their scores, but also the scores of the target syndrome elements and their corresponding symptoms. These scores are then used to ultimately generate a dynamic knowledge graph. It is understood that the scores of each target syndrome element and symptom will differ depending on the clinical situation. This allows the knowledge graph to be constructed dynamically and accurately based on the clinical context, resulting in a targeted dynamic knowledge graph. Furthermore, the construction process of the dynamic knowledge graph does not require manual intervention. Users only need to provide the patient's medical record text, and the dynamic knowledge graph can be automatically constructed through the above process, which is very convenient and efficient. Ultimately, based on the constructed dynamic knowledge graph, users can quickly, efficiently, and accurately train their clinical thinking.

[0205] Corresponding to the dynamic knowledge graph construction method provided above, this application also provides an electronic device. Please refer to... Figure 2 The electronic device 2 in this embodiment includes: a memory 201, and one or more processors 202. Figure 2(Only one is shown in the image) and a computer program stored in memory 201 and executable on the processor. Memory 201 stores software programs and units. The processor 202 executes various functional applications and data processing by running the software programs and units stored in memory 201 to obtain resources corresponding to the aforementioned preset events. Specifically, the processor 202 implements the various steps in the above method embodiments by running the aforementioned computer program stored in memory 201, which will not be elaborated further here.

[0206] It should be understood that, in the embodiments of this application, the processor 202 may be a central processing unit (CPU), but it may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0207] Memory 201 may include read-only memory and random access memory, and provides instructions and data to processor 202. Some or all of memory 201 may also include non-volatile random access memory. For example, memory 201 may also store device category information.

[0208] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0209] It is understood that all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing associated hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable storage medium can include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer-readable storage device, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc. It should be noted that the content included in the computer-readable storage medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable storage medium does not include electrical carrier signals and telecommunication signals.

[0210] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for constructing a dynamic knowledge graph, characterized in that, include: Based on the patient's medical record text, a set of four diagnostic elements for the patient is determined. The set of four diagnostic elements includes multiple four diagnostic elements, which are disease-related characteristics of the patient described from the perspective of the four diagnostic methods of traditional Chinese medicine. Based on the set of four diagnostic elements, a long logical chain of TCM deduction is performed, which is expressed through different thought threads, and at least one target syndrome element, the score of each target syndrome element, at least one target syndrome element matching the target syndrome element, and the score of each target syndrome element are obtained. A dynamic knowledge graph is generated based on the set of four diagnostic elements, the scores of each target syndrome element, and the scores of each target syndrome. The derivation of a long logical chain in Traditional Chinese Medicine based on the set of four diagnostic elements, expressed through different thought processes, yields at least one target syndrome element, the score of each target syndrome element, at least one target syndrome matching the target syndrome element, and the score of each target syndrome element, including: The set of four diagnostic elements is traversed to determine the current four diagnostic elements; Find the syndrome element associated with the current four diagnostic elements as the target syndrome element; Update the syndrome element list according to the contribution level of the current four diagnostic elements to each of the target syndrome elements; Return to the step of traversing the set of four diagnostic elements to determine the current four diagnostic elements and subsequent steps, until the traversal is complete; Calculate the score of each target element in the latest element list; Based on the at least one target symptom element, the syndrome is deduced to obtain at least one target syndrome and the score of each target syndrome; Accordingly, generating a dynamic knowledge graph based on the set of four diagnostic elements, the scores of each of the target syndrome elements, and the scores of each of the target syndromes includes: Based on the correspondence between the four diagnostic elements in the set of four diagnostic elements and the target syndrome elements, and the scores of each target syndrome element, a first knowledge graph is generated. A second knowledge graph is generated based on the correspondence between the target evidence elements and the target symptoms, as well as the scores of each target symptom.

2. The dynamic knowledge graph construction method as described in claim 1, characterized in that, The syndrome element list uses each target syndrome element as a key value; the syndrome element list records at least one element list corresponding to each target syndrome element, and the four diagnostic elements in each element list are all at the same contribution level to the corresponding target syndrome element; updating the syndrome element list according to the contribution level of the current four diagnostic elements to each target syndrome element includes: Traverse the target syndrome elements corresponding to the current four diagnostic elements to determine the current target syndrome element; Detect whether the current target evidence element exists in the evidence element list; If the current target symptom does not exist in the symptom list, then the current target symptom is added to the symptom list, and the current four diagnostic elements are added to the target element list, wherein the target element list is the element list corresponding to the contribution level of the current four diagnostic elements to the current target symptom. If the current target diagnostic element already exists in the list of diagnostic elements, then check whether the current four diagnostic elements exist in the list of target elements. If the current four diagnostic elements do not exist in the target element list, then the current four diagnostic elements are added to the target element list.

3. The dynamic knowledge graph construction method as described in claim 2, characterized in that, The calculation of the score for each target element in the latest element list includes: For each of the target evidence elements, the contribution score of each element list corresponding to the target evidence element is calculated according to the scoring parameters of each element list corresponding to the target evidence element. The contribution scores of each element list corresponding to the target element are summed to obtain the total contribution score; If the total contribution score is less than a preset contribution threshold, the score of the target element is determined as the total contribution score. If the total contribution score is greater than or equal to the contribution threshold, the score of the target element is determined as the contribution threshold.

4. The dynamic knowledge graph construction method as described in claim 1, characterized in that, The process of deriving a syndrome based on the at least one target syndrome element to obtain at least one target syndrome and a score for each target syndrome includes: Each syndrome associated with a specific target syndrome element is identified as a candidate syndrome. The at least one target syndrome element is grouped according to the candidate syndrome, and the number of target syndromes is determined based on the grouping results; Calculate the score for each of the candidate symptoms; Screening is performed based on the scores of each candidate syndrome and the number of target syndromes to obtain at least one target syndrome and the scores of each target syndrome.

5. The dynamic knowledge graph construction method as described in claim 4, characterized in that, The step of grouping the at least one target syndrome element according to the candidate syndrome, and determining the number of target syndromes based on the grouping results, includes: The target elements associated with the same candidate syndrome are grouped into the same group to obtain at least one target element group. The number of target syndromes is determined based on the number of target syndrome element groups.

6. The dynamic knowledge graph construction method as described in claim 5, characterized in that, The calculation of scores for each of the candidate syndromes includes: The candidate score for each of the candidate syndromes is determined based on the grouping results; Based on the name of each candidate syndrome, determine the deduction ratio for each candidate syndrome; The final score of each candidate syndrome is determined based on the candidate score of each candidate syndrome and the deduction ratio of each candidate syndrome.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 6.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Traditional Chinese medicine assistant diagnosis system based on syndrome element

    CN110459321A

  • Traditional Chinese medicine intelligent inquiry tongue diagnosis comprehensive system based on syndrome elements and deep learning

    CN112216383A