Method and device for obtaining patient symptoms, storage medium, and computer equipment
By extracting entities from patient-side dialogues and querying the knowledge graph of TCM symptoms, the sub-symptoms to be asked are determined, and guiding doctor-side dialogues are generated. This solves the problem of inaccurate patient symptom extraction in existing technologies and improves the diagnostic assistance effect of the TCM intelligent dialogue consultation system.
Patent Information
- Application Number
- CN202410412030.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-07
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2044-04-07
AI Technical Summary
In the existing technology, the doctor-side dialogue content generated based on the trained language model is quite different from the patient symptoms that the doctor actually wants to know, resulting in the inability of the traditional Chinese medicine intelligent dialogue consultation system to effectively assist in targeted diagnosis.
By extracting entities from the patient's speech, using the pre-configured TCM symptom knowledge graph to query the patient's main symptoms, and determining the sub-symptoms to be asked based on the priority of the relationship entity, guiding doctor's speech is generated to determine the symptoms that the doctor wants to ask in the next round of conversation.
The generated doctor-side dialogue is more guiding, can better meet the doctor's expectations, and is convenient for assisting traditional Chinese medicine in making targeted diagnoses.
Smart Images

Figure CN118098620B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of digital medical technology, and in particular to a method and device for acquiring patient symptoms, a storage medium, and a computer device. Background Art
[0002] In today's rapidly advancing technological landscape, artificial intelligence (AI) has gradually become a technological leader in China's industrial evolution and a key support for enhancing its international competitiveness. As AI technologies are increasingly successfully implemented in various fields, related intelligent conversational consultation systems are also emerging in the field of smart Traditional Chinese Medicine (TCM). These TCM intelligent conversational consultation systems aim to alleviate the shortage of physicians, helping doctors collect user information and symptoms in advance, and even providing preliminary diagnostic results for their reference.
[0003] The Traditional Chinese Medicine (TCM) intelligent conversational consultation system, based on TCM knowledge, collects symptoms through multiple rounds of question-and-answer sessions with patients. Existing technologies train language models using historical conversation samples to generate the next round of doctor-side conversation content, collecting and processing patient symptoms from these multiple rounds of conversation. However, within the TCM field, the doctor-side conversation content generated by language models trained using existing technology differs significantly from the patient symptoms doctors actually want to understand. As a result, the patient symptoms extracted through multiple rounds of conversation are not effective in assisting TCM practitioners in making targeted diagnoses. Summary of the Invention
[0004] In view of this, the present invention provides a method and device for obtaining patient symptoms, a storage medium, and a computer device, the main purpose of which is to solve the problem in the prior art that the patient symptoms extracted from the doctor-side dialogue content generated based on the trained language model are quite different from the patient symptoms that the doctor actually wants to know.
[0005] According to one aspect of the present invention, a method for obtaining patient symptoms is provided, comprising:
[0006] Performing entity extraction processing on the current patient-side speech with the intention of asking a diagnosis, and obtaining at least one patient symptom entity corresponding to the current patient-side speech;
[0007] Based on the patient symptom entity, a query is performed in a pre-configured TCM symptom knowledge graph to determine the main symptoms of the target patient;
[0008] Determine multiple relationship entities related to the main symptoms of the target patient based on the TCM symptom knowledge graph, and determine sub-symptoms to be asked based on the priorities of the multiple relationship entities;
[0009] A doctor's side script is generated based on the sub-symptoms to be asked, so that the patient can give a symptom response based on the doctor's side script.
[0010] Furthermore, before performing entity extraction processing on the current patient-side speech with the intention of asking a medical question, the method further includes:
[0011] Obtain the current patient's speech and parse it, and judge the patient's intention based on the parsing results;
[0012] If the patient's intention is not to consult a doctor, a pre-configured non-consultation intention response template is obtained, wherein the non-consultation intention response template includes consultation guidance information;
[0013] The non-inquiry intention reply template is sent to enable the patient to conduct a medical consultation based on the medical consultation guidance information.
[0014] Furthermore, the TCM symptom knowledge graph is used to represent the association between the main symptom of a patient and multiple related sub-symptoms of the patient, and the relationship entity is used to represent the association;
[0015] Before querying the pre-configured TCM symptom knowledge graph, the method further includes:
[0016] The patient's main symptoms, the relationship entities, and the patient's sub-symptoms are stored and processed in the form of triple data to obtain the TCM symptom knowledge graph.
[0017] Furthermore, the query based on the patient symptom entity in the pre-configured TCM symptom knowledge graph to determine the main symptoms of the target patient includes:
[0018] Acquire the patient-side entity semantic information of the patient symptom entity and the main symptom semantic information of the plurality of the patient main symptoms in the TCM symptom knowledge graph;
[0019] The patient-side entity semantic information and the main symptom semantic information are matched for similarity, and the patient's main symptom corresponding to the main symptom semantic information with the highest similarity is determined as the target patient's main symptom.
[0020] Furthermore, the determining of multiple relationship entities related to the main symptoms of the target patient based on the TCM symptom knowledge graph, and determining the sub-symptoms to be asked based on the priorities of the multiple relationship entities includes:
[0021] The TCM symptom knowledge graph is queried based on the main symptoms of the target patient to determine a plurality of relationship entities that have an association relationship with the main symptoms of the target patient.
[0022] Obtaining priorities of the plurality of relationship entities, and sorting the relationship entities in descending order of priority based on the priorities to obtain a relationship entity priority sequence;
[0023] The relationship entity with the highest priority is determined from the relationship entity priority sequence, and the corresponding at least one patient sub-symptom is determined as the sub-symptom to be asked about.
[0024] Furthermore, the method further comprises:
[0025] Configuring a patient symptom dataset for the patient who initiated the current patient-side dialogue;
[0026] Saving the main symptoms of the target patient into the patient symptom data set;
[0027] After generating a doctor's side speech based on the sub-symptom to be asked, so that the patient can respond based on the doctor's side speech, the method further includes:
[0028] Obtaining the patient-side symptom response content, and performing entity extraction processing on the patient-side symptom response content to determine the patient sub-symptom entity;
[0029] Determine a target patient sub-symptom based on the patient sub-symptom entity and the sub-symptom to be asked, and save the target patient sub-symptom into the patient symptom dataset;
[0030] The target relationship entity is determined from the relationship entity priority sequence in descending priority, and at least one patient sub-symptom corresponding to the target relationship entity is determined as the target sub-symptom to be asked in turn, so that the doctor side speech is generated based on the target sub-symptom to be asked, and multiple rounds of dialogue between the doctor side and the patient side are completed.
[0031] Furthermore, generating a doctor's side talk based on the sub-symptom to be asked includes:
[0032] Obtain a pre-configured doctor-side speech template, and obtain a symptom field tag from the doctor-side speech template;
[0033] The sub-symptom to be asked is added to the symptom field based on the symptom field tag to generate the doctor-side speech.
[0034] According to another aspect of the present invention, a device for acquiring patient symptoms is provided, comprising:
[0035] An entity extraction module is used to perform entity extraction processing on the current patient-side speech with the intention of asking a diagnosis, and obtain at least one patient symptom entity corresponding to the current patient-side speech;
[0036] A main symptom determination module is used to query the pre-configured TCM symptom knowledge graph based on the patient symptom entity to determine the main symptom of the target patient;
[0037] A sub-symptom determination module is used to determine multiple relationship entities related to the main symptoms of the target patient based on the TCM symptom knowledge graph, and determine the sub-symptoms to be asked based on the priorities of the multiple relationship entities;
[0038] A generation module is used to generate doctor-side dialogue based on the sub-symptoms to be asked, so that the patient can reply based on the doctor-side dialogue.
[0039] Furthermore, the device further includes an information guidance module, which is used to:
[0040] Obtain the current patient's speech and parse it, and judge the patient's intention based on the parsing results;
[0041] If the patient's intention is not to consult a doctor, a pre-configured non-consultation intention response template is obtained, wherein the non-consultation intention response template includes consultation guidance information;
[0042] The non-inquiry intention reply template is sent to enable the patient to conduct a medical consultation based on the medical consultation guidance information.
[0043] Furthermore, the TCM symptom knowledge graph is used to represent the association between the main symptoms of a patient and a plurality of related sub-symptoms of the patient, and the relationship entity is used to represent the association; the device also includes a graph configuration module for:
[0044] The patient's main symptoms, the relationship entities, and the patient's sub-symptoms are stored and processed in the form of triple data to obtain the TCM symptom knowledge graph.
[0045] Furthermore, the main symptom determination module is further configured to:
[0046] Acquire the patient-side entity semantic information of the patient symptom entity and the main symptom semantic information of the plurality of the patient main symptoms in the TCM symptom knowledge graph;
[0047] The patient-side entity semantic information and the main symptom semantic information are matched for similarity, and the patient's main symptom corresponding to the main symptom semantic information with the highest similarity is determined as the target patient's main symptom.
[0048] Furthermore, the sub-symptom determination module is further configured to:
[0049] The TCM symptom knowledge graph is queried based on the main symptoms of the target patient to determine a plurality of relationship entities that have an association relationship with the main symptoms of the target patient.
[0050] Obtaining priorities of the plurality of relationship entities, and sorting the relationship entities in descending order of priority based on the priorities to obtain a relationship entity priority sequence;
[0051] The relationship entity with the highest priority is determined from the relationship entity priority sequence, and the corresponding at least one patient sub-symptom is determined as the sub-symptom to be asked about.
[0052] Furthermore, the device also includes a symptom storage module, which is used to:
[0053] Configuring a patient symptom dataset for the patient who initiated the current patient-side dialogue;
[0054] Saving the main symptoms of the target patient into the patient symptom data set;
[0055] The device also includes a symptom update and dialogue processing module, which is used to:
[0056] Obtaining the patient-side symptom response content, and performing entity extraction processing on the patient-side symptom response content to determine the patient sub-symptom entity;
[0057] Determine a target patient sub-symptom based on the patient sub-symptom entity and the sub-symptom to be asked, and save the target patient sub-symptom into the patient symptom dataset;
[0058] The target relationship entity is determined from the relationship entity priority sequence in descending priority, and at least one patient sub-symptom corresponding to the target relationship entity is determined as the target sub-symptom to be asked in turn, so that the doctor side speech is generated based on the target sub-symptom to be asked, and multiple rounds of dialogue between the doctor side and the patient side are completed.
[0059] Furthermore, the generating module is further configured to:
[0060] Obtain a pre-configured doctor-side speech template, and obtain a symptom field tag from the doctor-side speech template;
[0061] The sub-symptom to be asked is added to the symptom field based on the symptom field tag to generate the doctor-side speech.
[0062] According to another aspect of the present invention, a storage medium is provided, wherein the storage medium stores at least one executable instruction, wherein the executable instruction enables a processor to execute an operation corresponding to the above-mentioned method for acquiring patient symptoms.
[0063] According to another aspect of the present invention, there is provided a computer device comprising a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
[0064] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute an operation corresponding to the method for obtaining patient symptoms as described in any one of claims 1-7.
[0065] By means of the above technical solution, the technical solution provided by the embodiment of the present invention has at least the following advantages:
[0066] The present invention provides a method and device for obtaining patient symptoms, a storage medium, and a computer device. Compared with the existing technology, the present invention obtains at least one patient symptom entity corresponding to the current patient-side speech by performing entity extraction processing on the current patient-side speech with the intention of asking a diagnosis; performs query processing on a pre-configured traditional Chinese medicine symptom knowledge graph based on the patient symptom entity to determine the main symptoms of the target patient; determines multiple relationship entities related to the main symptoms of the target patient, and determines the sub-symptoms to be asked based on the priorities of the multiple relationship entities; generates a doctor-side speech based on the sub-symptoms to be asked, so that the patient side gives a symptom reply based on the doctor-side speech, and realizes the determination of the patient symptoms that the doctor wants to ask in the next round of dialogue based on the pre-configured traditional Chinese medicine symptom knowledge graph, so that the generated doctor-side speech is more guiding, so that the patient symptoms extracted based on the content of the patient-side symptom reply can better meet the doctor's expectations, which is convenient for assisting the doctor in making a targeted diagnosis.
[0067] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:
[0069] Figure 1 A schematic diagram showing a flow chart of a method for acquiring patient symptoms provided by an embodiment of the present invention;
[0070] Figure 2 A schematic diagram showing a flow chart of another method for acquiring patient symptoms provided by an embodiment of the present invention;
[0071] Figure 3 A schematic diagram showing the relationship between some nodes of a TCM symptom knowledge graph provided by an embodiment of the present invention is shown.
[0072] Figure 4A schematic flow chart showing another method for acquiring patient symptoms provided by an embodiment of the present invention is shown;
[0073] Figure 5 A schematic flow chart of another method for acquiring patient symptoms provided by an embodiment of the present invention is shown;
[0074] Figure 6 A schematic structural diagram of a device for acquiring patient symptoms provided by an embodiment of the present invention is shown;
[0075] Figure 7 A schematic structural diagram of a computer device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0076] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0077] The embodiment of the present invention provides a method for obtaining patient symptoms, such as Figure 1 As shown, the method includes:
[0078] 101. Perform entity extraction processing on the current patient-side speech with the intention of asking a diagnosis, and obtain at least one patient symptom entity corresponding to the current patient-side speech;
[0079] In an embodiment of the present invention, the current execution end performs entity extraction processing on the current patient-side speech with the intention of asking for a diagnosis, and obtains at least one patient symptom entity corresponding to the current patient-side speech. The current patient-side speech is the content of the conversation in which the patient initiates a consultation with the doctor. Such as "Doctor, I have a headache recently", "Doctor, I have diarrhea for two days", etc., which are not specifically limited in the embodiment of the present invention. The entity extraction process can be completed by using a specific named entity recognition technology NER, including LSTM model, LSTM-CRF model, RNN model, CNN model, etc., which are not specifically limited in the embodiment of the present invention. The patient symptom entity is used to represent entities related to the symptoms of the disease in the patient-side speech, such as "headache", "diarrhea", "low back pain", etc., which are not specifically limited in the embodiment of the present invention.
[0080] 102. Querying the pre-configured TCM symptom knowledge graph based on the patient symptom entity to determine the main symptoms of the target patient;
[0081] In an embodiment of the present invention, the current execution end performs a query in a pre-configured TCM symptom knowledge graph based on the patient symptom entity to determine the main symptoms of the target patient. The pre-configured TCM symptom knowledge graph is a knowledge graph containing symptoms (corresponding to nodes in the knowledge graph) and relationship entities (corresponding to relationships in the knowledge graph) created based on TCM knowledge sorted out by TCM experts. When querying the TCM symptom knowledge graph to determine the main symptoms of the target patient, keyword matching, similarity calculation, etc. can be used, which is not specifically limited in the embodiment of the present invention.
[0082] 103. Determine multiple relationship entities related to the main symptom of the target patient based on the TCM symptom knowledge graph, and determine the sub-symptoms to be asked based on the priorities of the multiple relationship entities;
[0083] In an embodiment of the present invention, the current execution end determines multiple relationship entities related to the main symptoms of the target patient based on the TCM symptom knowledge graph, wherein the relationship entity is used to characterize the association relationship between symptoms, and different keywords can be used to represent the association relationship, such as using keywords such as "location", "nature", "degree", "continuation status", and "cause" in medical attribute information as relationship entities in the TCM symptom knowledge graph, which is not specifically limited in the embodiment of the present invention. In addition, different values can also be used to represent the association relationship, etc., which is not specifically limited in the embodiment of the present invention.
[0084] It should be noted that the current execution end also determines the sub-symptoms to be asked based on the priorities of multiple relationship entities. Generally, the sub-symptoms to be asked in each round on the doctor's side are determined in order of priority. For example, the relationship entities in the above example are arranged in the order of priority as "location", "nature", "degree", "continuation status", "cause", etc. In the first round of dialogue, the symptoms corresponding to the relationship entity "location" are determined as the sub-symptoms to be asked; in the second round of dialogue, the symptoms corresponding to the relationship entity "nature" are determined as the sub-symptoms to be asked; in the third round of dialogue, the symptoms corresponding to the relationship entity "degree" are determined as the sub-symptoms to be asked; in the fourth round of dialogue, the symptoms corresponding to the relationship entity "continuation status" are determined as the sub-symptoms to be asked..., and the embodiments of the present invention do not make specific limitations.
[0085] 104. Generate doctor-side dialogue based on the sub-symptom to be asked, so that the patient can respond to the symptoms based on the doctor-side dialogue.
[0086] In an embodiment of the present invention, the current execution terminal generates a doctor's side script based on the sub-symptoms to be asked, so that the patient can respond to the symptoms based on the doctor's side script. The method for generating the doctor's side script can use a pre-edited script template, or can use a pre-trained guided natural language model to generate the script, such as the GPT model, the BART model, the task-oriented dialogue BERT model TOD-BERT, etc., which is not specifically limited in this embodiment of the present invention.
[0087] Furthermore, as a refinement and expansion of the specific implementation of the above embodiment, in order to improve the efficiency of obtaining patient symptoms, it is necessary to guide the patient's side of the consultation method, and another method for obtaining patient symptoms is provided, such as Figure 2 As shown, before the step of performing entity extraction processing on the current patient-side speech with the intention of asking a medical question, the method further includes:
[0088] 201. Obtain the current patient's speech and parse it, and determine the patient's intention based on the parsing results;
[0089] In the embodiment of the present invention, the current execution terminal obtains the current patient's speech and parses it, and determines the patient's intention based on the parsing results. The parsing process can be performed by matching symptoms with keywords or by using a semantic parsing model, which is not specifically limited in the embodiment of the present invention.
[0090] 202. If the patient's intention is not to seek medical advice, obtain a pre-configured non-medical advice response template, wherein the non-medical advice response template includes medical advice guidance information;
[0091] 203. Send the non-inquiry intention reply template so that the patient can conduct a medical consultation based on the medical consultation guidance information.
[0092] In an embodiment of the present invention, when the patient's intention is not to inquire about the diagnosis, the current execution end obtains a pre-configured non-inquiry intention reply template, which is used to represent a pre-edited speech template, such as "Hello, how can I help you?", "Hello, where do you feel uncomfortable?", etc., which is not specifically limited in the embodiment of the present invention. In addition, the non-inquiry intention reply template includes inquiry guidance information, wherein the inquiry guidance information is used to guide the patient to state specific symptoms of illness, such as "Please describe your symptoms in detail, such as headache, diarrhea, back pain, stomachache, etc.", which is not specifically limited in the embodiment of the present invention. The current execution end sends the non-inquiry intention reply template and displays it in the inquiry dialog box, so that the patient side can conduct an inquiry based on the inquiry guidance information.
[0093] Furthermore, as a refinement and extension of the above embodiment, in order to facilitate information query on the TCM symptom knowledge graph, another method for obtaining patient symptoms is provided, such as Figure 3 As shown, the TCM symptom knowledge graph is used to represent the association relationship between the patient's main symptom and multiple related patient sub-symptoms, and the relationship entity is used to represent the association relationship; before the step of querying the pre-configured TCM symptom knowledge graph, the method further includes:
[0094] The patient's main symptoms, the relationship entities, and the patient's sub-symptoms are stored and processed in the form of triple data to obtain the TCM symptom knowledge graph.
[0095] In the embodiment of the present invention, the current execution end organizes each symptom in the TCM symptom knowledge graph into a piece of data, and each piece of data records the relevant sub-symptoms of the current symptom, that is, the patient's main symptoms, relationship entities, and patient sub-symptoms are stored and processed in the form of triple data to obtain the TCM symptom knowledge graph. Figure 3 As shown, the main symptom of the patient is "headache", and the relationship entities related to headache include "location", "nature", "degree", "continuation status", and "cause". The patient sub-symptoms that have a location association relationship with the patient's main symptom "headache" include "migraine", "headache extending to the back of the neck", "posterior headache", "pain in the forehead and brow bone", "bilateral headache", and "pain at the top of the head", which are saved in the form of triple data as [headache, location, migraine], [headache, location, headache extending to the back of the neck], [headache, location, posterior headache], [headache, location, pain in the forehead and brow bone], [headache, location, bilateral headache], and [headache, location, pain at the top of the head]; the patient sub-symptoms that have a duration association relationship with the patient's main symptom "headache" include "recurrent headache" and "headache that is sometimes mild and sometimes severe", which are saved in the form of triple data as [headache, duration status, recurrent headache] and [headache, duration status, headache that is sometimes mild and sometimes severe], etc., which are not specifically limited in the embodiment of the present invention.
[0096] Furthermore, as a refinement and extension of the above embodiment, in order to improve the accuracy of symptom acquisition, another method for acquiring patient symptoms is provided, such as Figure 4 As shown, the steps are based on querying the patient symptom entity in the pre-configured TCM symptom knowledge graph to determine the main symptoms of the target patient, including:
[0097] 301. Obtain patient-side entity semantic information of the patient symptom entity and main symptom semantic information of the plurality of main symptoms of the patient in the TCM symptom knowledge graph;
[0098] In an embodiment of the present invention, the current execution end obtains the patient-side entity semantic information of the patient-side symptom entity and obtains the main symptom semantic information of multiple patient main symptoms in the Traditional Chinese Medicine Symptom Knowledge Graph. The acquisition of semantic information can be accomplished using a model that extracts semantic features, including an RNN model, an LSTM model, and the like, which is not specifically limited in this embodiment of the present invention.
[0099] 302. Perform similarity matching processing on the patient-side entity semantic information and the main symptom semantic information, and determine the patient's main symptom corresponding to the main symptom semantic information with the highest similarity as the target patient's main symptom.
[0100] In an embodiment of the present invention, the current execution end performs similarity matching processing on the semantic information of the patient-side entity and the semantic information of the main symptom. Among them, the method of similarity calculation in the similarity matching process includes but is not limited to Jaccard similarity coefficient, cosine similarity, Euclidean distance calculation similarity, Manhattan distance calculation similarity, etc., which are not specifically limited in the embodiment of the present invention. The current execution end determines the patient's main symptom corresponding to the main symptom semantic information with the highest similarity as the target patient's main symptom. For example, if the semantic information of the patient symptom entity "headache" and the semantic information of the patient's main symptoms such as "headache", "dizziness", and "dizziness" in the TCM symptom knowledge graph are similar to 0.96, 0.01, 0.58, etc. respectively, then the patient's main symptom "headache" with the highest similarity can be determined as the target patient's main symptom, which is not specifically limited in the embodiment of the present invention.
[0101] The determining of multiple relationship entities related to the main symptoms of the target patient based on the TCM symptom knowledge graph, and determining the sub-symptoms to be asked based on the priorities of the multiple relationship entities includes:
[0102] 303. Query the TCM symptom knowledge graph based on the target patient's main symptoms to determine a plurality of relationship entities associated with the target patient's main symptoms.
[0103] In the embodiment of the present invention, since the relationship entity is used in the TCM symptom knowledge graph to represent the association between the patient's main symptoms and the patient's sub-symptoms, it is necessary to determine the relationship entity associated with the patient's main symptoms before determining the patient's sub-symptoms. Figure 3 The query processing is performed on the TCM symptom knowledge graph in the embodiment of the present invention. When the main symptom of the patient is "headache", it can be determined that the multiple related relationship entities include "location", "nature", "degree", "continuation status" and "cause of disease", which are not specifically limited in the embodiment of the present invention.
[0104] 304. Obtain priorities of the plurality of relationship entities, and sort the relationship entities in descending order of priority based on the priorities to obtain a relationship entity priority sequence;
[0105] In an embodiment of the present invention, the current execution end obtains the priorities of multiple relationship entities, and sorts the relationship entities in order of priority from high to low based on the priorities to obtain a relationship entity priority sequence. Among them, the priorities of the relationship entities are pre-configured based on the experience of Chinese medicine experts. For example, in step 303, the priority sequence obtained after sorting the priorities of the relationship entities "part", "nature", "degree", "continuation status" and "cause" in order from high to low can be: part → nature → degree → continuation status → cause, wherein "→" indicates the direction of decreasing priority. It should be noted that, based on the experience of Chinese medicine experts, the priorities of the relationship entities can also be adjusted, such as the adjusted priority sequence is: part → cause → nature → degree → continuation status, etc., which is not specifically limited in the embodiment of the present invention.
[0106] 305. Determine the relationship entity with the highest priority from the relationship entity priority sequence, and determine the corresponding at least one patient sub-symptom as the sub-symptom to be asked.
[0107] In the embodiment of the present invention, the current execution end determines the highest priority relationship entity from the relationship entity priority sequence, and determines the corresponding at least one patient sub-symptom as the sub-symptom to be asked. For example, in step 304, the highest priority relationship entity can be determined as "part" from the priority sequence "part → property → degree → status → cause". Figure 3 As shown in , the patient sub-symptoms corresponding to the relational entity "part" include "migraine", "headache extending to the back of the neck", "back headache", "pain in the forehead and brow bone", "headache on both sides" and "pain at the top of the head", so the above patient sub-symptoms of "migraine", "headache extending to the back of the neck", "back headache", "pain in the forehead and brow bone", "headache on both sides" and "pain at the top of the head" are determined as the sub-symptoms to be asked questions; Figure 3 As shown, if the priority sequence is "degree → location → nature → ongoing status → cause", the patient sub-symptoms of "mild headache", "moderate headache", "severe headache" and "intensive headache" corresponding to the "degree" are determined as sub-symptoms to be asked questions, etc., and the embodiment of the present invention does not make specific limitations.
[0108] Furthermore, as a refinement and extension of the above-mentioned embodiment, in order to uniformly manage patient symptoms and patient information and obtain as many patient symptoms as possible, another method for obtaining patient symptoms is provided, the method further comprising:
[0109] Configuring a patient symptom dataset for the patient who initiated the current patient-side dialogue;
[0110] Saving the main symptoms of the target patient into the patient symptom data set;
[0111] In the embodiment of the present invention, the current execution end configures a patient symptom data set for the patient who initiated the current patient-side speech. The patient can be patient information that represents the patient's unique identity characteristics, such as ID card information, consultation ID information, telephone information, etc., which is not specifically limited in the embodiment of the present invention. The current execution end saves the target patient's main symptoms into the patient symptom data set, as shown in step 302 and the attached Figure 3 The patient's main symptom "headache" is saved in the patient symptom dataset, etc., which is not specifically limited in this embodiment of the present invention.
[0112] After the step of generating a doctor's side speech based on the sub-symptom to be asked, so that the patient can respond based on the doctor's side speech, the method further includes:
[0113] Obtaining the patient-side symptom response content, and performing entity extraction processing on the patient-side symptom response content to determine the patient sub-symptom entity;
[0114] In an embodiment of the present invention, the current execution end obtains the patient symptom response content as the patient-side speech initiated by the patient in the current round of medical consultation dialogue, and uses the same entity extraction method as step 101 to perform entity extraction processing on the patient symptom response content to obtain the patient sub-symptom entity.
[0115] Determine a target patient sub-symptom based on the patient sub-symptom entity and the sub-symptom to be asked, and save the target patient sub-symptom into the patient symptom dataset;
[0116] In this embodiment of the present invention, the current execution end uses the same semantic information extraction method as in step 301 to perform semantic feature extraction on the extracted patient sub-symptom entities. Simultaneously, the same semantic information extraction method as in step 301 is used to perform semantic feature extraction on the sub-symptom to be asked. Then, using the same similarity matching method as in step 302, the sub-symptom to be asked with the highest similarity is determined from the multiple sub-symptoms to be asked as the target patient sub-symptom, and the target patient sub-symptom is stored in the patient symptom dataset. For example, if the patient symptom response is "headache on the left side of the top of the head," after entity extraction, semantic information extraction, and similarity matching, "migraine" can be determined as the target patient sub-symptom from the sub-symptoms to be asked, including "migraine," "headache extending to the back of the neck," "back of the head headache," "pain in the forehead and brow bone," "bilateral headache," and "pain at the top of the head," and the target patient sub-symptom "migraine" is stored in the patient symptom dataset. This is not specifically limited in this embodiment of the present invention.
[0117] The target relationship entity is determined from the relationship entity priority sequence in descending priority, and at least one patient sub-symptom corresponding to the target relationship entity is determined as the target sub-symptom to be asked in turn, so that the doctor side speech is generated based on the target sub-symptom to be asked, and multiple rounds of dialogue between the doctor side and the patient side are completed.
[0118] In the embodiment of the present invention, the current execution end determines the target relationship entity from the relationship entity priority sequence in descending order of priority. For example, the "nature" relationship entity at the second priority in the relationship entity priority sequence "location → nature → degree → existence state → cause" is determined as the target relationship entity. Figure 3 As shown, the "headache", "swelling and splitting head", "pain in the head" and other symptoms corresponding to the target relationship entity "property" are determined as target sub-symptoms to be asked, so that the doctor's side speech is generated based on the target sub-symptoms to be asked "headache", "swelling and splitting head", "pain in the head" and other symptoms, and the patient side responds to the symptoms based on the doctor's side speech to enter the next round of medical consultation dialogue.
[0119] It should be noted that the current execution end obtains the symptom response content from the patient side again, and after the entity extraction, semantic information extraction, and similarity matching processing in the above steps, the patient sub-symptom entity is determined to be "headache" from the sub-symptoms to be asked "headache", "headache", "headache", etc., and the patient sub-symptom entity "headache" is saved in the patient symptom data set. The "degree" relationship entity with the third priority in the relationship entity priority sequence "location→nature→degree→existence status→cause" is determined as the target relationship entity in a descending priority manner, such as Figure 3 As shown, the "mild headache", "moderate headache", "severe headache" and "intensive headache" corresponding to the target relation entity "degree" are determined as target sub-symptoms to be asked, so that the doctor's side speech is generated based on the target sub-symptoms to be asked "mild headache", "moderate headache", "severe headache" and "intensive headache", and the patient side responds to the symptoms based on the doctor's side speech, and enters the next round of consultation dialogue... As shown in FIG. Figure 3 As shown, after multiple rounds of dialogue between the doctor and the patient, the patient's sub-symptoms corresponding to the "cause" relationship entity ranked fifth in the priority sequence of the relationship entity "part → property → degree → ongoing status → cause" are saved in the patient symptom data set, completing the acquisition of the patient's symptoms. This embodiment of the present invention does not make specific limitations.
[0120] Furthermore, as a refinement and expansion of the specific implementation of the above embodiment, in order to quickly and accurately generate doctor-side dialogue, another method for obtaining patient symptoms is provided, such as Figure 5 As shown, the method further includes:
[0121] 401. Obtain a pre-configured doctor-side speech template, and obtain a symptom field tag from the doctor-side speech template;
[0122] 402. Add the sub-symptom to be asked into the symptom field based on the symptom field tag to generate the doctor-side speech.
[0123] In an embodiment of the present invention, the current execution end obtains a pre-configured doctor-side speech template, and obtains a symptom field tag from the doctor-side speech template. The doctor-side speech template is a template that includes a symptom field tag and a general Chinese medicine speech. For example, the configuration template for the patient's main symptom "headache" is "Which of the following headache symptoms do you have, such as XXXX, XXXX, XXXX, XXXX, please select or describe, thank you!", wherein "XXXX" is the symptom field to be added, and the symptom field to be added "XXXX" is marked with a symptom field tag, which is not specifically limited in the embodiment of the present invention. The current execution end determines the specific position of the symptom field to be added in the doctor-side speech template based on the symptom field tag, and then adds the sub-symptom to be asked to the symptom field to generate the doctor-side speech. For example, using the above-mentioned doctor-side speech template, when the sub-symptoms to be asked are "migraine", "headache extending to the back of the neck", "posterior headache", "pain in the forehead and brow bone", "headache on both sides" and "pain at the top of the head", the generated doctor-side speech is "Which of the following headache symptoms do you have, such as migraine, headache extending to the back of the neck, posterior headache, pain in the forehead and brow bone, headache on both sides, pain at the top of the head, please select or describe, thank you!", etc., which is not specifically limited in the embodiment of the present invention.
[0124] An embodiment of the present invention provides a method for acquiring patient symptoms. Compared with the existing technology, the present invention obtains at least one patient symptom entity corresponding to the current patient-side speech by performing entity extraction processing on the current patient-side speech with the intention of asking a diagnosis; performs query processing on the pre-configured traditional Chinese medicine symptom knowledge graph based on the patient symptom entity to determine the main symptoms of the target patient; determines multiple relationship entities related to the main symptoms of the target patient, and determines the sub-symptoms to be asked based on the priorities of the multiple relationship entities; generates doctor-side speech based on the sub-symptoms to be asked, so that the patient side gives symptom replies based on the doctor-side speech, and realizes the determination of the patient symptoms that the doctor wants to ask in the next round of dialogue based on the pre-configured traditional Chinese medicine symptom knowledge graph, so that the generated doctor-side speech is more guiding, so that the patient symptoms extracted based on the content of the patient-side symptom reply can better meet the doctor's expectations, which is convenient for assisting the doctor to make targeted diagnosis.
[0125] As the above Figure 1 The embodiment of the present invention provides a device for obtaining patient symptoms, such as Figure 6 As shown, the device includes:
[0126] An entity extraction module 51 is configured to perform entity extraction processing on the current patient-side speech with a diagnosis-inquiry intention, and obtain at least one patient symptom entity corresponding to the current patient-side speech;
[0127] A main symptom determination module 52 is configured to query the pre-configured TCM symptom knowledge graph based on the patient symptom entity to determine the main symptom of the target patient;
[0128] The sub-symptom determination module 53 is used to determine multiple relationship entities related to the main symptom of the target patient based on the TCM symptom knowledge graph, and determine the sub-symptom to be asked based on the priorities of the multiple relationship entities;
[0129] The generating module 54 is used to generate doctor-side words based on the sub-symptoms to be asked, so that the patient can reply based on the doctor-side words.
[0130] Furthermore, the device further includes an information guidance module, which is used to:
[0131] Obtain the current patient's speech and parse it, and judge the patient's intention based on the parsing results;
[0132] If the patient's intention is not to consult a doctor, a pre-configured non-consultation intention response template is obtained, wherein the non-consultation intention response template includes consultation guidance information;
[0133] The non-inquiry intention reply template is sent to enable the patient to conduct a medical consultation based on the medical consultation guidance information.
[0134] Furthermore, the TCM symptom knowledge graph is used to represent the association between the main symptoms of a patient and a plurality of related sub-symptoms of the patient, and the relationship entity is used to represent the association; the device also includes a graph configuration module for:
[0135] The patient's main symptoms, the relationship entities, and the patient's sub-symptoms are stored and processed in the form of triple data to obtain the TCM symptom knowledge graph.
[0136] Furthermore, the main symptom determination module 52 is further configured to:
[0137] Acquire the patient-side entity semantic information of the patient symptom entity and the main symptom semantic information of the plurality of the patient main symptoms in the TCM symptom knowledge graph;
[0138] The patient-side entity semantic information and the main symptom semantic information are matched for similarity, and the patient's main symptom corresponding to the main symptom semantic information with the highest similarity is determined as the target patient's main symptom.
[0139] Furthermore, the sub-symptom determination module 53 is further configured to:
[0140] The TCM symptom knowledge graph is queried based on the main symptoms of the target patient to determine a plurality of relationship entities that have an association relationship with the main symptoms of the target patient.
[0141] Obtaining priorities of the plurality of relationship entities, and sorting the relationship entities in descending order of priority based on the priorities to obtain a relationship entity priority sequence;
[0142] The relationship entity with the highest priority is determined from the relationship entity priority sequence, and the corresponding at least one patient sub-symptom is determined as the sub-symptom to be asked about.
[0143] Furthermore, the device also includes a symptom storage module, which is used to:
[0144] Configuring a patient symptom dataset for the patient who initiated the current patient-side dialogue;
[0145] Saving the main symptoms of the target patient into the patient symptom data set;
[0146] The device also includes a symptom update and dialogue processing module, which is used to:
[0147] Obtaining the patient-side symptom response content, and performing entity extraction processing on the patient-side symptom response content to determine the patient sub-symptom entity;
[0148] Determine a target patient sub-symptom based on the patient sub-symptom entity and the sub-symptom to be asked, and save the target patient sub-symptom into the patient symptom dataset;
[0149] The target relationship entity is determined from the relationship entity priority sequence in descending priority, and at least one patient sub-symptom corresponding to the target relationship entity is determined as the target sub-symptom to be asked in turn, so that the doctor side speech is generated based on the target sub-symptom to be asked, and multiple rounds of dialogue between the doctor side and the patient side are completed.
[0150] Furthermore, the generating module 54 is further configured to:
[0151] Obtain a pre-configured doctor-side speech template, and obtain a symptom field tag from the doctor-side speech template;
[0152] The sub-symptom to be asked is added to the symptom field based on the symptom field tag to generate the doctor-side speech.
[0153] An embodiment of the present invention provides a device for acquiring patient symptoms. Compared with the existing technology, the present invention obtains at least one patient symptom entity corresponding to the current patient-side speech by performing entity extraction processing on the current patient-side speech with the intention of asking a diagnosis; performs query processing on the pre-configured traditional Chinese medicine symptom knowledge graph based on the patient symptom entity to determine the main symptoms of the target patient; determines multiple relationship entities related to the main symptoms of the target patient, and determines the sub-symptoms to be asked based on the priorities of the multiple relationship entities; generates doctor-side speech based on the sub-symptoms to be asked, so that the patient side gives a symptom reply based on the doctor-side speech, and realizes the determination of the patient symptoms that the doctor wants to ask in the next round of dialogue based on the pre-configured traditional Chinese medicine symptom knowledge graph, so that the generated doctor-side speech is more guiding, so that the patient symptoms extracted based on the content of the patient-side symptom reply can better meet the doctor's expectations, which is convenient for assisting the doctor to make a targeted diagnosis.
[0154] According to one embodiment of the present invention, a storage medium is provided, wherein the storage medium stores at least one executable instruction, and the computer-executable instruction can execute the method for obtaining patient symptoms in any of the above method embodiments.
[0155] Figure 7 A schematic structural diagram of a computer device provided according to an embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the computer device.
[0156] like Figure 7 As shown, the computer device may include: a processor (processor) 602 , a communication interface (Communications Interface) 604 , a memory (memory) 606 , and a communication bus 608 .
[0157] The processor 602 , the communication interface 604 , and the memory 606 communicate with each other via a communication bus 608 .
[0158] The communication interface 604 is used to communicate with other devices such as clients or other servers.
[0159] The processor 602 is used to execute the program 610, and specifically can execute the relevant steps of the above-mentioned method for obtaining patient symptoms.
[0160] Specifically, the program 610 may include program codes, which include computer operation instructions.
[0161] Processor 602 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in a computer device may be of the same type, such as one or more CPUs, or may be of different types, such as one or more CPUs and one or more ASICs.
[0162] The memory 606 is used to store the program 610. The memory 606 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0163] The program 610 may be specifically configured to enable the processor 602 to perform the following operations:
[0164] Performing entity extraction processing on the current patient-side speech with the intention of asking a diagnosis, and obtaining at least one patient symptom entity corresponding to the current patient-side speech;
[0165] Based on the patient symptom entity, a query is performed in a pre-configured TCM symptom knowledge graph to determine the main symptoms of the target patient;
[0166] Determine multiple relationship entities related to the main symptoms of the target patient based on the TCM symptom knowledge graph, and determine sub-symptoms to be asked based on the priorities of the multiple relationship entities;
[0167] A doctor's side script is generated based on the sub-symptoms to be asked, so that the patient can give a symptom response based on the doctor's side script.
[0168] Obviously, those skilled in the art will appreciate that the various modules or steps of the present invention described above can be implemented using a general-purpose computing device, centralized on a single computing device, or distributed across a network of multiple computing devices. Alternatively, they can be implemented using program code executable by a computing device, which can then be stored in a storage device and executed by the computing device. In some cases, the steps shown or described can be performed in a different order than that shown, or can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0169] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A method for obtaining patient symptoms, characterized in that: include: Performing entity extraction processing on the current patient-side speech with the intention of asking a diagnosis, and obtaining at least one patient symptom entity corresponding to the current patient-side speech; Based on the patient symptom entity, a query is performed in a pre-configured TCM symptom knowledge graph to determine the main symptoms of the target patient; Determine multiple relationship entities related to the main symptoms of the target patient based on the TCM symptom knowledge graph, and determine sub-symptoms to be asked based on the priorities of the multiple relationship entities; Generate a doctor's side speech based on the sub-symptom to be asked, so that the patient can answer the symptom based on the doctor's side speech; The query based on the patient symptom entity in the pre-configured TCM symptom knowledge graph to determine the main symptoms of the target patient includes: Acquire patient-side entity semantic information of the patient symptom entity and main symptom semantic information of multiple patient main symptoms in the TCM symptom knowledge graph; Performing similarity matching processing on the patient-side entity semantic information and the main symptom semantic information, and determining the patient's main symptom corresponding to the main symptom semantic information with the highest similarity as the target patient's main symptom; The determining of multiple relationship entities related to the main symptoms of the target patient based on the TCM symptom knowledge graph, and determining the sub-symptoms to be asked based on the priorities of the multiple relationship entities includes: Perform query processing on the TCM symptom knowledge graph based on the main symptoms of the target patient to determine a plurality of relationship entities associated with the main symptoms of the target patient; Obtaining priorities of the plurality of relationship entities, and sorting the relationship entities in descending order of priority based on the priorities to obtain a relationship entity priority sequence; Determine the relationship entity with the highest priority from the relationship entity priority sequence, and determine the corresponding at least one patient sub-symptom as the sub-symptom to be asked; The method further comprises: Configuring a patient symptom dataset for the patient who initiated the current patient-side dialogue; Saving the main symptoms of the target patient into the patient symptom data set; After generating a doctor's side speech based on the sub-symptom to be asked, so that the patient can respond based on the doctor's side speech, the method further includes: Obtaining the patient-side symptom response content, and performing entity extraction processing on the patient-side symptom response content to determine the patient sub-symptom entity; Determine a target patient sub-symptom based on the patient sub-symptom entity and the sub-symptom to be asked, and save the target patient sub-symptom into the patient symptom dataset; The target relationship entity is determined from the relationship entity priority sequence in descending priority, and at least one patient sub-symptom corresponding to the target relationship entity is determined as the target sub-symptom to be asked in turn, so that the doctor side speech is generated based on the target sub-symptom to be asked, and multiple rounds of dialogue between the doctor side and the patient side are completed.
2. The method according to claim 1, characterized in that Before performing entity extraction processing on the current patient-side speech with the intention of asking a medical question, the method further includes: Obtain the current patient's speech and parse it, and judge the patient's intention based on the parsing results; If the patient's intention is not to consult a doctor, a pre-configured non-consultation intention response template is obtained, wherein the non-consultation intention response template includes consultation guidance information; The non-inquiry intention reply template is sent to enable the patient to conduct a medical consultation based on the medical consultation guidance information.
3. The method according to claim 1, characterized in that The TCM symptom knowledge graph is used to represent the association between the main symptom of a patient and multiple related sub-symptoms of the patient, and the relationship entity is used to represent the association; Before querying the pre-configured TCM symptom knowledge graph, the method further includes: The patient's main symptoms, relationship entities and patient sub-symptoms are stored and processed in the form of triple data to obtain the TCM symptom knowledge graph.
4. The method according to any one of claims 1 to 3, characterized in that The generating of the doctor's side talk based on the sub-symptom to be asked includes: Obtain a pre-configured doctor-side speech template, and obtain a symptom field tag from the doctor-side speech template; The sub-symptom to be asked is added to the symptom field based on the symptom field tag to generate the doctor-side speech.
5. A device for acquiring patient symptoms, characterized in that: include: An entity extraction module is used to perform entity extraction processing on the current patient-side speech with the intention of asking a diagnosis, and obtain at least one patient symptom entity corresponding to the current patient-side speech; A main symptom determination module is used to query the pre-configured TCM symptom knowledge graph based on the patient symptom entity to determine the main symptom of the target patient; A sub-symptom determination module is used to determine multiple relationship entities related to the main symptoms of the target patient based on the TCM symptom knowledge graph, and determine the sub-symptoms to be asked based on the priorities of the multiple relationship entities; A generating module, configured to generate a doctor-side speech based on the sub-symptom to be asked, so that the patient can respond based on the doctor-side speech; The main symptom determination module is further configured to: Acquire patient-side entity semantic information of the patient symptom entity and main symptom semantic information of multiple patient main symptoms in the TCM symptom knowledge graph; Performing similarity matching processing on the patient-side entity semantic information and the main symptom semantic information, and determining the patient's main symptom corresponding to the main symptom semantic information with the highest similarity as the target patient's main symptom; The sub-symptom determination module is further configured to: Perform query processing on the TCM symptom knowledge graph based on the main symptoms of the target patient to determine a plurality of relationship entities associated with the main symptoms of the target patient; Obtaining priorities of the plurality of relationship entities, and sorting the relationship entities in descending order of priority based on the priorities to obtain a relationship entity priority sequence; Determine the relationship entity with the highest priority from the relationship entity priority sequence, and determine the corresponding at least one patient sub-symptom as the sub-symptom to be asked; The device further includes a symptom storage module, configured to: Configuring a patient symptom dataset for the patient who initiated the current patient-side dialogue; Saving the main symptoms of the target patient into the patient symptom data set; The device also includes a symptom update and dialogue processing module, which is used to: Obtaining the patient-side symptom response content, and performing entity extraction processing on the patient-side symptom response content to determine the patient sub-symptom entity; Determine a target patient sub-symptom based on the patient sub-symptom entity and the sub-symptom to be asked, and save the target patient sub-symptom into the patient symptom dataset; The target relationship entity is determined from the relationship entity priority sequence in descending priority, and at least one patient sub-symptom corresponding to the target relationship entity is determined as the target sub-symptom to be asked in turn, so that the doctor side speech is generated based on the target sub-symptom to be asked, and multiple rounds of dialogue between the doctor side and the patient side are completed.
6. A storage medium, wherein at least one executable instruction is stored in the storage medium, and the executable instruction executes an operation corresponding to the method for obtaining patient symptoms according to any one of claims 1 to 4.
7. A computer device comprising a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute an operation corresponding to the method for obtaining patient symptoms as described in any one of claims 1-4.
Citation Information
Patent Citations
Disease inquiry method, device and system, computer equipment and storage medium
CN110504028A
Robot active inquiry method based on traditional Chinese medicine clinical knowledge graph
CN110838368A