Method, medium and device for searching outputting consultation suggestion strategy based on knowledge graph
By acquiring user information and conducting multi-turn dialogues within a knowledge graph, and utilizing language models to generate natural language descriptions, the problem of low information retrieval efficiency in online TCM consultation platforms has been solved. This enables personalized consultation suggestions and dynamic knowledge updates, thereby improving user experience and service efficiency.
Patent Information
- Application Number
- CN202410292803.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-14
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2044-03-14
AI Technical Summary
Existing online TCM consultation platforms are unable to efficiently utilize knowledge graphs to provide personalized and accurate services, resulting in poor user experience and difficulty for ordinary users to understand professional terminology, leading to low information retrieval efficiency.
By acquiring the user's prior information about the object and the chief complaint, the system extracts entity information using a first language model, searches for relevant disease information in a knowledge graph, generates natural language descriptions using a second language model, conducts multi-turn dialogues to collect key information, and finally outputs a consultation suggestion strategy.
It has enabled efficient, convenient and highly personalized TCM consultation services, improved the accuracy of information retrieval and user experience, and dynamically updated the knowledge graph to keep the information up-to-date and comprehensive.
Smart Images

Figure CN118245580B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, specifically to a method, medium, and device for outputting diagnostic suggestions based on knowledge graph search. Background Technology
[0002] Traditional Chinese Medicine (TCM), as an important component of China's traditional medicine, possesses a unique theoretical system and diagnostic and treatment methods, playing a crucial role in the prevention and treatment of various diseases, especially in the management of sub-health conditions and age-related diseases. With the improvement of living standards, the public's attention to healthcare is constantly increasing. Traditional TCM diagnostic methods rely on the doctor's experience and subjective judgment, which may lead to inconsistent diagnostic results. The inefficiency of manually recording and analyzing data, as well as the uneven distribution of high-quality TCM resources, further exacerbate this problem.
[0003] Knowledge graphs are a technology that represents knowledge in the form of graphs. They can describe entities, concepts, and their relationships in the real world, forming a semantic network. Knowledge graphs can be used to improve the effectiveness of applications such as information retrieval, question answering, and recommendation, and can also assist humans in knowledge discovery and reasoning.
[0004] The main strategies for applying knowledge graphs in the field of TCM diagnosis are as follows: (1) Establish a core knowledge system for TCM clinical practice, including basic TCM theories, TCM diseases and syndromes, TCM drugs, and TCM treatment methods, to form a visualized knowledge graph to help analyze TCM thinking methods, sort out the knowledge contained in medical records, study the drug use patterns and treatment methods of physicians throughout history, and discover and summarize the experience of famous veteran TCM doctors. (2) Problem analysis: Perform word segmentation, part-of-speech tagging, named entity recognition, semantic role tagging, etc., on the natural language questions raised by users to analyze the type, intent, focus, constraints, etc. of the questions and generate a structured representation of the questions. (3) Knowledge retrieval: Based on the structured representation of the questions, retrieve relevant entities, concepts, relationships, etc. from the knowledge graph and construct a set of candidate answers. (4) Answer generation: Based on the type of questions and the form of answers, generate natural language answers, or generate answers in other forms such as tables, charts, and pictures.
[0005] Currently, while many online medical consultation platforms have established knowledge graphs containing rich medical and health knowledge, users face inefficiencies when retrieving and utilizing this information. This is mainly because traditional search engines respond to user queries through simple keyword matching, ignoring the complex semantics of natural language. As a result, the returned results are often irrelevant to the user's actual problem. Users have to invest a lot of time and energy to filter information to find content that truly meets their needs, which greatly affects their search experience and satisfaction. Therefore, existing technologies have significant shortcomings in their ability to process natural language and urgently need improvement to provide more accurate and user-friendly search services.
[0006] Furthermore, Traditional Chinese Medicine (TCM) is a highly specialized and in-depth field, and its terminology is often difficult for non-specialists to understand. On medical information websites, the complexity of categories and guiding terms often makes it difficult for ordinary users to quickly find the information they need, frequently failing to accurately capture users' specific needs and thus hindering the provision of effective and efficient services. These shortcomings indicate a need for smarter solutions to lower the barrier to entry for TCM knowledge, make information retrieval more user-friendly, and improve the accuracy and response speed of automated question-and-answer systems. Summary of the Invention
[0007] In view of the above problems, this application provides a technical solution based on knowledge graph search to output consultation suggestion strategy, so as to solve the problem that existing knowledge graphs cannot provide efficient services to users, resulting in poor patient experience.
[0008] To achieve the above objectives, in a first aspect, this application provides a method for outputting diagnostic suggestion strategies based on knowledge graph search, the method comprising:
[0009] Obtain the user's prior information about the object and their subjective statement;
[0010] The prior information of the object and the chief complaint are analyzed using a first language model to extract the corresponding first entity information;
[0011] The first entity information is used as input to the knowledge graph to search for the first disease information associated with the first entity information, and the first disease information is output to the second language model.
[0012] The second language model generates problem description information that conforms to natural language expression based on the first symptom information, and receives feedback information from the user on the problem description information. The first language model analyzes the feedback information and extracts the second entity information corresponding to the feedback information.
[0013] The second entity information is used as input to the knowledge graph to search for the second disease information associated with the second entity information. The second disease information is then output to the second language model so that the second language model can generate new problem description information that conforms to natural language expression based on the second disease information. The model also receives feedback information from the user on the new problem description information and analyzes it again.
[0014] After the preset conditions are met, the second language model outputs the consultation suggestion strategy corresponding to the current user.
[0015] Furthermore, the knowledge graph is obtained based on the following method:
[0016] Construct initial knowledge graph information;
[0017] Acquire basic knowledge information, and perform data cleaning and standardization on the basic knowledge information to obtain standardized basic knowledge information with a unified format;
[0018] Natural language processing technology is used to perform entity recognition and relation extraction on the standard basic knowledge information, and to identify the corresponding knowledge entity information and the corresponding relations of each knowledge entity information from the standard basic knowledge information.
[0019] Based on the identified knowledge entity information, triples that conform to the definition are constructed, and the extracted triples are fused with the initial knowledge graph information to obtain the updated knowledge graph.
[0020] Furthermore, the basic knowledge information includes any one or more of the following: basic knowledge of traditional Chinese medicine, disease knowledge, symptom description knowledge, drug knowledge, diagnostic and treatment experience knowledge, and literature knowledge; the knowledge entity information includes disease information, syndrome information, symptom information, and treatment method information.
[0021] Furthermore, the step of analyzing the prior information of the object and the subject information using a first language model to extract the corresponding first entity information includes:
[0022] The first language model uses the named entity recognition function in natural language processing technology to extract the prior information of the object and the first entity information of the chief complaint based on a certain extraction rule, and calculates the relationship between each first entity information. The first entity information includes symptom information, disease name, and syndrome information.
[0023] The method further includes:
[0024] The identified first entity information and its corresponding relationship information are matched with the data in the current knowledge graph to determine whether the knowledge graph contains the first entity information and / or its corresponding relationship information. If not, the prior information of the object and the subject information are analyzed again based on another extraction rule to obtain new first entity information and its corresponding relationship information, and then the determination is made again.
[0025] Furthermore, the knowledge graph is obtained in the following manner;
[0026] An autoregressive model for symptoms is constructed to analyze and predict time-series data, and historical symptoms are used to predict future symptoms. The estimate of the entire symptom series is obtained as follows:
[0027] ;
[0028] in, It is the length of a disease symptom sequence. It is a symptom of different stages in a disease sequence;
[0029] The ultimate optimization goal of the autoregressive model is to maximize the estimated value of the entire symptom sequence, thereby obtaining the knowledge graph.
[0030] Furthermore, the step of using the first entity information as input to the knowledge graph to search for and obtain the first disease information associated with the first entity information includes:
[0031] By setting the total weight Determine the ultimate importance of the feedback information from the entity to be answered in the symptom sequence. The symptomatic entity of time weights It is calculated using the following three inputs: ,in, This represents the weight of other related entities relative to a particular disease. This represents the weight between a certain related entity and different diseases. Representing entities in-degree;
[0032] The specific calculation formula is as follows:
[0033] ;
[0034] in, Representation and entity The number of diseases with directed edges;
[0035] By querying the knowledge graph using the query entity as a condition, information about the first disease related to that entity can be obtained.
[0036] The second language model generates problem description information that conforms to natural language expression based on the first symptom information, including:
[0037] Take the intersection of multiple entities related to the first symptom information associated with the current entity, and sort the intersection in descending order according to the entity weight W. If the W value is greater than a preset threshold, place the first symptom information corresponding to W into the corresponding preset question template to generate a symptom inquiry statement that conforms to natural language expression.
[0038] Furthermore, the preset conditions include:
[0039] The number of times user feedback information regarding the problem description is obtained reaches a preset limit;
[0040] Or it may receive output instructions for a consultation suggestion strategy.
[0041] Furthermore, the prior information of the object includes one or more of the user's basic physical signs, age, gender, and dietary habits, and the chief complaint information includes the user's description of the main symptoms, as well as one or more of the accompanying symptoms, medical history, aggravating or relieving factors, relevant medical history, and self-care measures taken.
[0042] In a second aspect, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for outputting diagnostic suggestion strategies based on knowledge graph search as described in the first aspect of this application.
[0043] In a third aspect, this application provides an electronic device having a computer program stored thereon, including a processor and a storage medium, wherein the computer program is stored on the storage medium, and when executed by the processor, the computer program implements the method for outputting diagnostic suggestion strategies based on knowledge graph search as described in the first aspect of this application.
[0044] Unlike existing technologies, the above technical solution utilizes a knowledge graph-based search method, medium, and device to output consultation suggestion strategies. The method includes: acquiring prior information about the user's object and their chief complaint; analyzing the prior information and chief complaint using a first language model to extract corresponding first entity information; using the first entity information as input to a knowledge graph to search for first symptom information associated with the first entity information, and outputting the first symptom information to a second language model; the second language model generating a problem description based on the first symptom information that conforms to natural language expression, and receiving feedback from the user regarding the problem description information, analyzing the feedback information using the first language model to extract corresponding second entity information, inputting the second entity information into the knowledge graph for further analysis and judgment, and outputting a consultation suggestion strategy corresponding to the current user after meeting preset conditions. This solution collects key information through multiple rounds of dialogue with the patient, providing efficient, convenient, and highly personalized TCM consultation services accordingly.
[0045] The above description of the invention is merely an overview of the technical solution of this application. In order to enable those skilled in the art to better understand the technical solution of this application and to implement it based on the description and drawings, and to make the above-mentioned objectives and other objectives, features and advantages of this application easier to understand, the following description is provided in conjunction with the specific embodiments and drawings of this application. Attached Figure Description
[0046] The accompanying drawings are only used to illustrate the principles, implementation methods, applications, features, and effects of specific embodiments of the present invention and other related contents, and should not be considered as limitations on this application.
[0047] In the accompanying drawings of the instruction manual:
[0048] Figure 1 This is a flowchart illustrating the method for outputting consultation suggestion strategies based on knowledge graph search according to the first exemplary embodiment of this application;
[0049] Figure 2 This is a flowchart illustrating the method for outputting consultation suggestion strategies based on knowledge graph search according to the second exemplary embodiment of this application;
[0050] Figure 3 This is a flowchart illustrating the method for outputting consultation suggestion strategies based on knowledge graph search according to the third exemplary embodiment of this application;
[0051] Figure 4 This is a flowchart of the method for outputting consultation suggestion strategy based on knowledge graph search according to the fourth exemplary embodiment of this application;
[0052] Figure 5 A schematic diagram of the electronic device described in the first exemplary embodiment of this application;
[0053] The reference numerals used in the above figures are explained as follows:
[0054] 10. Electronic devices;
[0055] 101. Processor;
[0056] 102. Storage medium. Detailed Implementation
[0057] To illustrate the possible application scenarios, technical principles, implementable specific solutions, and achievable objectives and effects of this application in detail, the following description, in conjunction with the listed specific embodiments and accompanying drawings, provides a detailed explanation. The embodiments described herein are merely illustrative of the technical solutions of this application and are therefore intended to limit the scope of protection of this application.
[0058] In this document, the term "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The term "embodiment" appearing in various places throughout the specification does not necessarily refer to the same embodiment, nor does it specifically limit its independence or connection with other embodiments. In principle, in this application, as long as there are no technical contradictions or conflicts, the technical features mentioned in each embodiment can be combined in any way to form corresponding implementable technical solutions.
[0059] Unless otherwise defined, the technical terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the use of related terms herein is merely for the purpose of describing particular embodiments and is not intended to limit this application.
[0060] In the description of this application, the term "and / or" is used to describe the logical relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A exists, B exists, and A and B exist simultaneously. Additionally, the character " / " in this document generally indicates that the preceding and following objects have an "or" logical relationship.
[0061] In this application, terms such as “first” and “second” are used only to distinguish one entity or operation from another, and do not necessarily require or imply any actual quantity, hierarchy or order relationship between these entities or operations.
[0062] Without further limitations, the use of terms such as “comprising,” “including,” “having,” or other similar open-ended expressions in this application is intended to cover non-exclusive inclusion, which does not exclude the presence of additional elements in a process, method, or product that includes the stated elements, such that a process, method, or product that includes a list of elements may include not only those defined elements but also other elements not expressly listed, or elements inherent to such a process, method, or product.
[0063] As understood in the Examination Guidelines, in this application, expressions such as "greater than," "less than," and "exceeding" are understood to exclude the stated number; expressions such as "above," "below," and "within" are understood to include the stated number. Furthermore, in the description of the embodiments in this application, "multiple" means two or more (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups" and "multiple times," unless otherwise explicitly specified.
[0064] In the description of the embodiments of this application, the space-related expressions used, such as "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "vertical," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential," indicate the orientation or positional relationship based on the orientation or positional relationship shown in the specific embodiments or drawings. They are only for the purpose of describing the specific embodiments of this application or for the reader's understanding, and do not indicate or imply that the device or component referred to must have a specific position, a specific orientation, or be constructed or operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of this application.
[0065] Unless otherwise expressly specified or limited, the terms "installation," "connection," "linking," "fixing," and "setting," as used in the description of the embodiments of this application, should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral setting; it can be a mechanical connection, an electrical connection, or a communication connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be the internal connection of two components or the interaction between two components. For those skilled in the art to which this application pertains, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.
[0066] like Figure 1 and Figure 3 As shown, in a first aspect, this application provides a method for outputting diagnostic suggestion strategies based on knowledge graph search, the method comprising:
[0067] First, proceed to step S101 to obtain the user's prior object information and chief complaint information;
[0068] Then, in step S102, the prior information of the object and the subject information are analyzed using the first language model to extract the corresponding first entity information.
[0069] Then, in step S103, the first entity information is used as input to the knowledge graph to search for the first disease information associated with the first entity information, and the first disease information is output to the second language model.
[0070] Then, in step S104, the second language model generates problem description information that conforms to natural language expression based on the first symptom information, and receives feedback information from the user regarding the problem description information. The feedback information is then analyzed by the first language model to extract the second entity information corresponding to the feedback information.
[0071] Then, in step S105, the second entity information is used as input to the knowledge graph to search for the second disease information associated with the second entity information, and the second disease information is output to the second language model so that the second language model can generate new problem description information that conforms to natural language expression based on the second disease information, and receive feedback information from the user on the new problem description information and analyze it again.
[0072] Then, in step S106, after the preset conditions are met, the second language model outputs the consultation suggestion strategy corresponding to the current user.
[0073] In step S101, the prior information of the object includes one or more of the user's basic physical signs, age, gender, and dietary habits. The chief complaint information includes the user's description of the main symptoms, as well as one or more of the accompanying symptoms, medical history, aggravating or relieving factors, relevant medical history, and self-care measures taken.
[0074] In step S102, the first language model is a large natural language processing model, such as a pre-trained deep learning model, and the first entity information is the relevant information of the entity identified and extracted from the text, including symptoms, signs, etc.
[0075] In step S103, the second language model can be integrated with the first language model, i.e., using the same deep learning model, or they can be set up separately. When the first language model and the second language model are set up separately, the first language model is used to extract the first entity information, and the second language model is used to generate problem description information based on the first entity information.
[0076] In step S104, the problem description information can be represented as a question and sent to the user terminal via text or voice. The user terminal can also reply with feedback information (i.e., the answer) corresponding to the problem description information via voice or text. Then, by extracting entity information from the feedback information (such as symptoms, cycles, causes, etc. in the answer), it is input into the knowledge graph to start the next round of analysis.
[0077] In step S105, a knowledge graph is a structured form of knowledge representation used to describe entities, concepts, relationships, and attributes in the real world, and to display the connections between them in the form of a graph. A knowledge graph consists of nodes and edges, where nodes represent entities or concepts, and edges represent relationships between entities. The goal of a knowledge graph is to collect, organize, and connect multi-source structured and semi-structured data to build a large-scale, scalable knowledge base.
[0078] In step S106, the preset conditions include: the number of times user feedback information regarding the problem description is received reaches a preset limit; or an output instruction for a consultation suggestion strategy is received. The preset limit can be set according to actual needs, for example, it can be set to 5 or 10 times. Of course, after every certain number of inquiries, a question like "Is there anything else to add?" can be added to the end of the question. If the user answers "No," the preset conditions can be triggered in advance before the number of feedback messages reaches the preset limit, and a consultation suggestion strategy can be output based on the user data received before that.
[0079] It should be noted that the treatment recommendations are merely suggestions based on historical experience and big data analysis output by the AI model. They can serve as a reference for doctors to assist in assessing a patient's condition, but are not the final direct diagnosis. Therefore, when doctors or patients themselves want to know their current treatment recommendations in advance, they can do so by triggering output commands. These output commands can be triggered via voice, text, touch, pressure, etc.
[0080] Through the above approach, key information is collected through multiple rounds of dialogue with patients, and based on this information, efficient, convenient, and highly personalized TCM consultation services are provided to patients.
[0081] like Figure 2 As shown, the knowledge graph is obtained based on the following method:
[0082] First, proceed to step S201 to construct the initial knowledge graph information;
[0083] Then, proceed to step S202 to obtain basic knowledge information, and perform data cleaning and standardization on the basic knowledge information to obtain standardized basic knowledge information with a unified format.
[0084] Then, in step S203, natural language processing technology is used to perform entity recognition and relation extraction on the standard basic knowledge information, and the corresponding knowledge entity information and the relationship corresponding to each knowledge entity information are identified from the standard basic knowledge information.
[0085] Then, in step S204, a triplet conforming to the definition is constructed based on the identified knowledge entity information, and the extracted triplet is fused with the initial knowledge graph information to obtain the updated knowledge graph.
[0086] Specifically, the basic knowledge information includes any one or more of the following: basic knowledge of traditional Chinese medicine, disease knowledge, symptom description knowledge, drug knowledge, diagnostic and treatment experience knowledge, and literature knowledge; the knowledge entity information includes disease information, syndrome information, symptom information, and treatment method information.
[0087] The TCM fundamentals knowledge includes basic knowledge of TCM theory, TCM diagnosis, TCM prescriptions, meridians and acupoints, etc., which constitute the core of the TCM knowledge graph. The disease knowledge includes knowledge of the etiology, pathology, symptoms, diagnosis, and treatment of various diseases. This knowledge is crucial for assisting the large language model in disease diagnosis and treatment plan recommendations. The symptom description knowledge describes symptoms as manifestations of a patient's condition; different symptoms may represent different diseases. Therefore, it is necessary to master the methods of symptom description and their relationship to related diseases so that the large language model can accurately understand the patient's condition. The drug knowledge includes knowledge of the composition, efficacy, pharmacological effects, and side effects of drugs. This knowledge is crucial for assisting the large language model in recommending TCM prescriptions and providing medication guidance. The clinical experience knowledge includes doctors' own clinical experience and case studies. This knowledge can enhance the diagnostic ability and improve the accuracy of the large language model. The literature knowledge includes research results and treatment experiences in TCM literature. This knowledge can enrich the large language model's knowledge base and improve its professional level.
[0088] In this embodiment, the source of the basic knowledge information can be a cloud platform for ancient and modern medical case studies, an EDC TCM research case collection system, or ancient and modern TCM literature. The data can be saved in TXT format.
[0089] Knowledge extraction involves extracting relevant medical entities, relationships, and attribute information from collected data to obtain a set of triples <entity 1, relationship, entity 2> or <entity, attribute, attribute value> that constitute a knowledge graph. In this application, based on the system functional design requirements and the specific content of the original data files, the following medical entities and their entity-relation triple sets are defined:
[0090] 1. Definition of medical entities: Disease; Symptom; Patterns; Treatment: Commonly used medical clinical terms for treatment principles, methods, and therapies.
[0091] 2. Definition of a triple:
[0092] Disease -> [r: clinical features] -> Symptom;
[0093] Patterns -> [r: clinical features] -> Symptoms;
[0094] Disease -> [r: contain] -> Disease;
[0095] Patterns -> [r: containment] -> Patterns;
[0096] Treatment -> [r: contain] -> Treatment.
[0097] In some embodiments, the step of analyzing the prior information of the object and the subject information using a first language model to extract the corresponding first entity information includes:
[0098] The first language model uses the named entity recognition function in natural language processing technology to extract the prior information of the object and the first entity information of the chief complaint based on a certain extraction rule, and calculates the relationship between each first entity information. The first entity information includes symptom information, disease name, and syndrome information.
[0099] The method further includes:
[0100] The identified first entity information and its corresponding relationship information are matched with the data in the current knowledge graph to determine whether the knowledge graph contains the first entity information and / or its corresponding relationship information. If not, the prior information of the object and the subject information are analyzed again based on another extraction rule to obtain new first entity information and its corresponding relationship information, and then the determination is made again.
[0101] Named Entity Recognition (NER) is a natural language processing technique designed to identify and extract predefined categories of named entities from text, such as names of people, places, organizations, dates, and currencies. NER's task is to identify and classify entity boundaries in given text. It can help accurately identify important information in text, providing valuable support for downstream information extraction, search, and analysis tasks. NER typically involves the following subtasks:
[0102] 1. Entity boundary recognition: Determine the start and end positions of entities in text.
[0103] 2. Entity Category Classification: Entities are classified into predefined categories, such as person names, place names, organization names, dates, etc.
[0104] 3. Entity Relationship Identification: Identifying the associations or relationships between entities, such as kinship between people, connections between locations, etc.
[0105] NER (Network Entity Extraction) technology can automatically identify entity information from large amounts of text data, providing fundamental support for applications such as information extraction, text summarization, machine translation, and question-answering systems. In the field of Traditional Chinese Medicine (TCM), these entities may include symptoms, disease names, and syndromes (pathological states in TCM diagnosis).
[0106] In this application, entity information extraction can be based on predefined extraction rules. There are multiple extraction rules, and each time entity information needs to be extracted, an extraction rule can be randomly selected from the rule pool. If the extracted entity information does not find a corresponding node in the knowledge graph, the current extraction rule can be temporarily removed from the rule pool, and another extraction rule can be selected from the pool to extract entity information again for evaluation. After all extraction rules in the rule pool have been cycled through, if it is found that the extracted entity information still does not find a corresponding node in the knowledge graph, it indicates that the input basic information is incorrect or the knowledge graph needs further improvement. At this point, all extraction rules will be put back into the rule pool, and a prompt message will be issued. This prompt message indicates that no entity information meeting the knowledge graph requirements has been extracted, reminding relevant personnel to re-enter the basic information or improve the knowledge graph.
[0107] In some embodiments, when it is necessary to differentiate syndromes based on symptoms, after obtaining the patient's main symptom information, the symptoms are verified according to the differentiation method, and the patient is asked whether they have related symptoms. Question generation involves generating inquiry statements based on symptoms to help the consultation system ask questions to the patient and confirm the symptoms.
[0108] Traditional Chinese medicine (TCM) diagnostic terminology follows certain rules. Questions typically contain symptom information that needs verification. For example, in verifying the "Ten Questions Song" ("First ask about fever and chills, second ask about sweating"), a TCM doctor might ask the patient, "Do you have fever or chills?" or "Are you sweating?" Therefore, this application trains a TCM large-scale language model to construct symptom inquiry statements by manually setting rules. By establishing question templates and placing symptoms within interrogative sentence structures, reasonable symptom inquiry statements can be generated, as shown in the table below:
[0109]
[0110] In some embodiments, the knowledge graph is obtained in the following manner;
[0111] An autoregressive model for symptoms is constructed to analyze and predict time-series data, and historical symptoms are used to predict future symptoms. The estimate of the entire symptom series is obtained as follows:
[0112] ;
[0113] in, It is the length of a disease symptom sequence. It is a symptom of different stages in a disease sequence;
[0114] The ultimate optimization goal of the autoregressive model is to maximize the estimated value of the entire symptom sequence, thereby obtaining the knowledge graph.
[0115] Autoregressive models are statistical models used to analyze and predict time-series data. In Traditional Chinese Medicine (TCM), applying this concept to symptoms means that we can use the manifestation of symptoms over a past period to predict future symptom manifestations, assuming a linear relationship between these data points. The concept of disease in TCM differs from that in modern medicine. TCM does not deny the existence of "disease," but it focuses more on the "patterns" (syndromes) in the disease process. The predictive power of autoregressive models depends on correlation, a characteristic inherent in the data format during disease development. This application uses a neural network based on a transformer decoder structure to implement the modeling process, with the training data for the symptom sequences derived from ancient and modern TCM medical records.
[0116] In some embodiments, the step of using the first entity information as input to a knowledge graph and searching for first disease information associated with the first entity information includes:
[0117] By setting the total weight Determine the ultimate importance of the feedback information from the entity to be answered in the symptom sequence. The symptomatic entity of time weights It is calculated using the following three inputs: ,in, This represents the weight of other related entities relative to a particular disease. This represents the weight between a certain related entity and different diseases. Representing entities in-degree;
[0118] The specific calculation formula is as follows:
[0119] ;
[0120] in, Representation and entity The number of diseases with directed edges;
[0121] By querying the knowledge graph using the query entity as a condition, information about the first disease related to that entity is obtained.
[0122] The second language model generates problem description information that conforms to natural language expression based on the first symptom information, including:
[0123] Take the intersection of multiple entities related to the first symptom information associated with the current entity, and sort the intersection in descending order according to the entity weight W. If the W value is greater than a preset threshold, place the first symptom information corresponding to W into the corresponding preset question template to generate a symptom inquiry statement that conforms to natural language expression.
[0124] like Figure 4 As shown, the knowledge graph-based consultation process is essentially a continuous process of querying and eliminating knowledge from the graph based on the patient's answers. To reduce questions asking irrelevant information, the consultation system needs to have the ability to dynamically locate key knowledge and ask questions based on the patient's situation. To achieve this function, weights are assigned to entity relationships. Considering that different symptoms and past illnesses have varying degrees of importance to a particular disease, and that the same symptom and past illness also have varying degrees of influence in differentiating diseases.
[0125] This invention combines the symptom prediction capability of autoregressive models with the accuracy of weighted knowledge graph search for relevant symptom entities. In the process of knowledge retrieval and determining the next step in the optimal consultation route, it utilizes the total weight... Determine the final importance of the entity to be answered. (In the symptom sequence) The symptomatic entity of time weights The result is calculated using these three inputs: ,in This represents the weight of other related entities relative to a particular disease. This represents the weight between a certain related entity and different diseases. Representing entities This approach increases the level of involvement, which is beneficial for highlighting the importance and breadth of disease-related entities during the consultation process.
[0126] In the pre-consultation process of this application, the TCM language model and knowledge graph work together to accurately search and analyze the patient's symptom information based on a limited number of question-and-answer sessions. Through this process, the TCM language model integrates the question-and-answer results and relevant data from the knowledge graph to organize and generate the final pre-consultation result.
[0127] Specifically, in the final round of the knowledge graph search, the system first identifies the two most likely medical conditions. These conditions are derived from the patient's information and the medical knowledge within the knowledge graph, following an optimal consultation route. Next, the system recommends appropriate departments for the patient's condition, ensuring they receive professional medical assistance. Furthermore, the system provides health and wellness advice based on the holistic principles of Traditional Chinese Medicine, aiming to help patients improve their lifestyle habits and promote health.
[0128] The main achievement of this invention is the realization of a TCM intelligent pre-diagnosis strategy that combines case mining and knowledge graph route search. This strategy has the following significant characteristics:
[0129] (1) Accurate extraction of disease information: Through the deep understanding of user dialogue by the large language model, the disease information described by the user can be accurately extracted, providing reliable input for subsequent knowledge graph search.
[0130] (2) Dynamic knowledge graph update: This invention achieves dynamic updating of the knowledge graph by continuously collecting and analyzing massive amounts of medical record data, ensuring that the information in the knowledge graph is always up-to-date and comprehensive.
[0131] (3) Efficient consultation path search: By utilizing the rich TCM facts and rules in the knowledge graph, this invention can quickly find the syndrome name and treatment suggestions related to the user's symptoms, thus improving the efficiency of pre-consultation.
[0132] (4) Personalized diagnostic suggestions: Based on the user's specific situation, the present invention can provide personalized diagnostic suggestions, including the most likely diagnosis, recommended departments for treatment, and health care advice.
[0133] (5) User-friendly interactive experience: Through the large language model text generation technology, the present invention can raise questions and suggestions in a way that is easy for users to understand, thereby improving the user's interactive experience.
[0134] In summary, the TCM intelligent pre-consultation strategy of this invention not only improves the accuracy and efficiency of pre-consultation but also provides users with more considerate and professional medical services through personalized diagnostic suggestions. This application also designs a method for accurately locating the consultation path within a knowledge graph by integrating the high natural language processing capabilities of a large language model with the deep data correlation of a knowledge graph. This method enables us to construct a comprehensive, accurate, and reliable TCM intelligent pre-consultation system. This system can collect key information through multi-round dialogues with patients on various terminal devices and provide patients with efficient, convenient, and highly personalized TCM consultation services accordingly.
[0135] In a second aspect, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for outputting diagnostic suggestion strategies based on knowledge graph search as described in the first aspect of the present invention.
[0136] The computer-readable storage medium may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
[0137] The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD ROM); the magnetic surface memory may be a disk storage device or a magnetic tape storage device.
[0138] The volatile memory may be random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synclink dynamic random access memory (SLDRAM), and direct memory bus random access memory (DRRAM). The computer-readable storage media described in the embodiments of the present invention are intended to include these and any other suitable types of memory.
[0139] like Figure 5 As shown, in a third aspect, the present invention provides an electronic device 10, including a processor 101 and a storage medium 102, wherein a computer program is stored on the storage medium, and when the computer program is executed by the processor, it implements the method for outputting consultation suggestion strategies based on knowledge graph search as described in the first aspect of the present invention.
[0140] In some embodiments, the processor may be implemented by software, hardware, firmware, or a combination thereof, and may use at least one of the following: circuit, single or multiple application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), central processing units (CPUs), controllers, microcontrollers, and microprocessors, thereby enabling the processor to execute some or all of the steps, or any combination thereof, of the methods for outputting diagnostic suggestion strategies based on knowledge graph search in the various embodiments of this application.
[0141] Finally, it should be noted that although the above embodiments have been described in the text and drawings of this application, this should not limit the scope of patent protection of this application. Any technical solutions that are based on the essential concept of this application and utilize the content described in the text and drawings of this application, resulting in equivalent structural or procedural substitutions or modifications, as well as the direct or indirect application of the technical solutions of the above embodiments to other related technical fields, are all included within the scope of patent protection of this application.
Claims
1. A method for outputting diagnostic suggestions based on knowledge graph search, characterized in that, The method includes: Obtain the user's prior information about the object and their subjective statement; The object's prior information and the subject's complaint information are analyzed using a first language model to extract the corresponding first entity information; The first entity information is used as input to the knowledge graph to search for the first disease information associated with the first entity information, and the first disease information is output to the second language model. The second language model generates problem description information that conforms to natural language expression based on the first symptom information, and receives feedback information from the user on the problem description information. The first language model analyzes the feedback information and extracts the second entity information corresponding to the feedback information. The second entity information is used as input to the knowledge graph to search for the second disease information associated with the second entity information. The second disease information is then output to the second language model so that the second language model can generate new problem description information that conforms to natural language expression based on the second disease information. The model also receives feedback information from the user on the new problem description information and analyzes it again. After the preset conditions are met, the second language model outputs the consultation suggestion strategy corresponding to the current user; The knowledge graph was obtained in the following manner; An autoregressive model for symptoms is constructed to analyze and predict time-series data, and historical symptoms are used to predict future symptoms. The estimate of the entire symptom series is obtained as follows: ; in, It is the length of a disease symptom sequence. It is a symptom of different stages in a disease sequence; The ultimate optimization goal of the autoregressive model is to maximize the estimated value of the entire symptom sequence, thereby obtaining the knowledge graph. The step of using the first entity information as input to a knowledge graph to search for and obtain first disease information associated with the first entity information includes: By setting the total weight Determine the ultimate importance of the feedback information from the entity to be answered in the symptom sequence. The symptomatic entity of time weights It is calculated using the following three inputs: ,in, This represents the weight of other related entities relative to a particular disease. This represents the weight between a certain related entity and different diseases. Representing entities in-degree; The specific calculation formula is as follows: ; in, Representation and entity The number of diseases with directed edges; By querying the knowledge graph using the query entity as a condition, information about the first disease related to that entity can be obtained. The second language model generates problem description information that conforms to natural language expression based on the first symptom information, including: Take the intersection of multiple entities related to the first symptom information associated with the current entity, and sort the intersection in descending order according to the entity weight W. If the W value is greater than a preset threshold, place the first symptom information corresponding to W into the corresponding preset question template to generate a symptom inquiry statement that conforms to natural language expression.
2. The method for outputting diagnostic suggestions based on knowledge graph search as described in claim 1, characterized in that, The step of analyzing the prior information of the object and the chief complaint information using a first language model to extract the corresponding first entity information includes: The first language model uses the named entity recognition function in natural language processing technology to extract the prior information of the object and the first entity information of the chief complaint based on a certain extraction rule, and calculates the relationship between each first entity information. The first entity information includes symptom information, disease name, and syndrome information. The method further includes: The identified first entity information and its corresponding relationship information are matched with the data in the current knowledge graph to determine whether the knowledge graph contains the first entity information and / or its corresponding relationship information. If not, the prior information of the object and the subject information are analyzed again based on another extraction rule to obtain new first entity information and its corresponding relationship information, and then the determination is made again.
3. The method for outputting diagnostic suggestions based on knowledge graph search as described in claim 1 or 2, characterized in that, The preset conditions include: The number of times user feedback information regarding the problem description is obtained reaches a preset limit; Or it may receive output instructions for a consultation suggestion strategy.
4. The method for outputting diagnostic suggestions based on knowledge graph search as described in claim 1 or 2, characterized in that, The prior information of the object includes one or more of the user's basic physical signs, age, gender, and dietary habits. The chief complaint information includes the main symptoms described by the user, as well as one or more of the accompanying symptoms, medical history, aggravating or relieving factors, relevant medical history, and self-care measures taken.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method for outputting consultation suggestion strategies based on knowledge graph search as described in any one of claims 1 to 4.
6. An electronic device having a computer program stored thereon, characterized in that, The system includes a processor and a storage medium, wherein a computer program is stored on the storage medium, and when executed by the processor, the computer program implements the method for outputting diagnostic suggestion strategies based on knowledge graph search as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Query hospital guide method and system based on knowledge graph
CN114661857A
Large language model intelligent inquiry dialogue method, system and device and medium
CN117093679A
