CN108491486B - Method, device, terminal equipment and storage medium for simulating patient inquiry dialogue - Google Patents

Method, device, terminal equipment and storage medium for simulating patient inquiry dialogue Download PDF

Info

Publication number
CN108491486B
CN108491486B CN201810207918.1A CN201810207918A CN108491486B CN 108491486 B CN108491486 B CN 108491486B CN 201810207918 A CN201810207918 A CN 201810207918A CN 108491486 B CN108491486 B CN 108491486B
Authority
CN
China
Prior art keywords
inquiry
sentence
sentences
answer
statement
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810207918.1A
Other languages
Chinese (zh)
Other versions
CN108491486A (en
Inventor
孟健
金志宇
何光宇
武二亮
胡永亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Neusoft Corp
Original Assignee
Neusoft Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Neusoft Corp filed Critical Neusoft Corp
Priority to CN201810207918.1A priority Critical patent/CN108491486B/en
Publication of CN108491486A publication Critical patent/CN108491486A/en
Application granted granted Critical
Publication of CN108491486B publication Critical patent/CN108491486B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B9/00Simulators for teaching or training purposes
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H80/00ICT specially adapted for facilitating communication between medical practitioners or patients, e.g. for collaborative diagnosis, therapy or health monitoring

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Medical Informatics (AREA)
  • Biomedical Technology (AREA)
  • Educational Technology (AREA)
  • General Physics & Mathematics (AREA)
  • Educational Administration (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Pathology (AREA)
  • Epidemiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Public Health (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

The embodiment of the invention provides a method, a device, terminal equipment and a storage medium for simulating a patient inquiry dialogue. The invention relates to a method for simulating a patient inquiry dialogue, which comprises the following steps: acquiring an inquiry statement input by a user, searching a first answer statement corresponding to the inquiry statement in an inquiry matching template, and if the first answer statement corresponding to the inquiry statement exists in the inquiry matching template, outputting the first answer statement to the user; and if the answer sentence does not exist, determining a corresponding second answer sentence according to the semantic attribute category of the inquiry sentence, and outputting the second answer sentence to the user. The embodiment of the invention can reduce the training cost and shorten the training period.

Description

Method, device, terminal equipment and storage medium for simulating patient inquiry dialogue
Technical Field
The embodiment of the invention relates to an artificial intelligence technology, in particular to a method, a device, terminal equipment and a storage medium for simulating patient inquiry dialogue.
Background
Clinical skills are the most valuable wealth in the medical field and the most difficult skills to learn and exercise. The mastery and promotion of clinical skills are acquired through a large amount of practices. However, in traditional medical teaching, medical students or interns mostly observe the clinical process of doctors, are difficult to contact patients in person, and rarely encounter typical and targeted cases. The assessment and evaluation of students also do not have objective, standard measures because they face patients that differ significantly from the case. Standardized Patients (SP), also called simulated Patients (Simulant Patients), refer to normal persons or Patients who can accurately express the actual clinical problems of the Patients after Standardized and systematic training, the SP plays multiple roles of acting as Patients, acting as evaluators and teachers through realistic simulation and teaching guidance of clinical environment and patient problems, can increase the chances of students contacting the Patients, provides a standard uniform and objective and fair teaching and evaluation method, is beneficial to culturing good occupational literacy and clinical thinking, thereby solving the problems and improving the effectiveness of teaching and evaluation.
However, SPs typically employ a means of personnel training, i.e., recruiting people for a collection of medical requirements, to perform a significant amount of training to enable them to play the role of standardized patients. The standardized patient training cost is high, the training period is long, and the requirements of medical teaching and evaluation cannot be met.
Disclosure of Invention
The embodiment of the invention provides a method, a device, terminal equipment and a storage medium for simulating patient inquiry dialogue, which can reduce the training cost and shorten the training period.
In a first aspect, an embodiment of the present invention provides a method for simulating a patient inquiry dialogue, including:
acquiring an inquiry statement input by a user;
searching a first answer sentence corresponding to the inquiry sentence in an inquiry matching template;
if a first answer sentence corresponding to the inquiry sentence exists in the inquiry matching template, outputting the first answer sentence to a user; if not, determining a corresponding second answer sentence according to the semantic attribute category of the inquiry sentence, and outputting the second answer sentence to the user;
the inquiry matching template comprises a matching rule and a response statement corresponding to the matching rule, and the matching rule is used for matching the inquiry statement.
With reference to the first aspect, in a possible implementation manner of the first aspect, the determining, according to the semantic attribute category of the inquiry statement, a corresponding second answer statement includes:
and analyzing the inquiry sentences according to the pathological knowledge base corresponding to the semantic attribute categories of the inquiry sentences to obtain second response sentences corresponding to the inquiry sentences.
With reference to the first aspect or one possible implementation manner of the first aspect, in another possible implementation manner of the first aspect, the semantic attribute category includes: at least one of a symptom category, a pain category; analyzing the inquiry statement according to a pathology knowledge base corresponding to the semantic attribute category of the inquiry statement to acquire a second response statement corresponding to the inquiry statement, wherein the method comprises the following steps:
acquiring keywords of the inquiry sentences;
searching keywords of the inquiry sentences in a pathological knowledge base corresponding to the semantic attribute categories of the inquiry sentences;
and generating a second response sentence corresponding to the inquiry sentence according to whether the keyword of the inquiry sentence exists in the pathology knowledge base or not.
With reference to the first aspect or any one of the possible implementations of the first aspect, in another possible implementation of the first aspect, the semantic attribute category includes a transition semantic category, and the method further includes:
acquiring keywords of the inquiry sentences;
and determining a second response sentence corresponding to the inquiry sentence according to the keyword of the inquiry sentence.
With reference to the first aspect or any one of the possible implementations of the first aspect, in another possible implementation of the first aspect, the semantic attribute category includes other semantic categories, and the method further includes:
processing the inquiry sentences by using a first machine learning algorithm to obtain second answer sentences corresponding to the inquiry sentences;
the first machine learning algorithm is obtained by training by using an inquiry knowledge base, wherein the inquiry knowledge base comprises inquiry sentences and corresponding response sentences.
With reference to the first aspect or any one of the possible implementation manners of the first aspect, in another possible implementation manner of the first aspect, the processing the inquiry statement by using a first machine learning algorithm to obtain a second answer statement corresponding to the inquiry statement includes:
performing word segmentation on the inquiry knowledge base to obtain a word set;
forming a vector space from the set of words;
determining the vector of the inquiry statement according to the vector space;
matching the vectors of the inquiry sentences in the vector space by adopting a similarity algorithm;
and if the matching is successful, extracting a second response sentence corresponding to the inquiry sentence.
With reference to the first aspect or any one of the possible implementations of the first aspect, in another possible implementation of the first aspect, the method further includes:
classifying the inquiry sentences by using a second machine learning algorithm to determine semantic attribute categories of the inquiry sentences;
the second machine learning algorithm is obtained by training by using an inquiry statement and a semantic attribute class corresponding to the inquiry statement.
With reference to the first aspect or any one of the possible implementation manners of the first aspect, in another possible implementation manner of the first aspect, the acquiring an inquiry statement input by a user includes:
receiving a voice signal input by a user;
and carrying out voice-to-character conversion on the voice signal to obtain the inquiry statement.
With reference to the first aspect or any one of possible implementations of the first aspect, in another possible implementation of the first aspect, the outputting the second answer sentence to the user includes:
and performing character-to-voice conversion on the second answer sentence, and outputting a voice signal of the second answer sentence.
With reference to the first aspect or any one of the possible implementations of the first aspect, in another possible implementation of the first aspect, the method further includes:
receiving a standardized patient simulation instruction, and determining a currently activated disease according to disease information corresponding to the standardized patient simulation instruction;
determining the pathology knowledge base based on the currently activated disease.
In a second aspect, an embodiment of the present invention provides a device for simulating a patient inquiry dialogue, including:
the acquisition module is used for acquiring the inquiry sentences input by the user;
the matching module is used for searching a first answer sentence corresponding to the inquiry sentence in the inquiry matching template;
the output module is used for outputting a first answer sentence to a user if the first answer sentence corresponding to the inquiry sentence exists in the inquiry matching template; if not, determining a corresponding second answer sentence according to the semantic attribute category of the inquiry sentence, and outputting the second answer sentence to the user;
the inquiry matching template comprises a matching rule and a response statement corresponding to the matching rule, and the matching rule is used for matching the inquiry statement.
With reference to the second aspect, in a possible implementation manner of the second aspect, the output module includes a first answer determining module, and the first answer determining module is configured to:
and analyzing the inquiry sentences according to the pathological knowledge base corresponding to the semantic attribute categories of the inquiry sentences to obtain second response sentences corresponding to the inquiry sentences.
With reference to the second aspect or one possible implementation manner of the second aspect, in another possible implementation manner of the second aspect, the semantic attribute category includes: at least one of a symptom category, a pain category; the first response determination module is specifically configured to:
acquiring keywords of the inquiry sentences;
searching keywords of the inquiry sentences in a pathological knowledge base corresponding to the semantic attribute categories of the inquiry sentences;
and generating a second response sentence corresponding to the inquiry sentence according to whether the keyword of the inquiry sentence exists in the pathology knowledge base or not.
With reference to the second aspect or any one of the possible implementations of the second aspect, in another possible implementation of the second aspect, the semantic attribute category includes a transition semantic category, and the output module further includes a second answer determining module, where the second answer determining module is configured to:
acquiring keywords of the inquiry sentences;
and determining a second response sentence corresponding to the inquiry sentence according to the keyword of the inquiry sentence.
With reference to the second aspect or any one of the possible implementations of the second aspect, in another possible implementation of the second aspect, the semantic attribute categories include other semantic categories, and the output module further includes a third answer determining module, where the third answer determining module is configured to:
processing the inquiry sentences by using a first machine learning algorithm to obtain second answer sentences corresponding to the inquiry sentences;
the first machine learning algorithm is obtained by training by using an inquiry knowledge base, wherein the inquiry knowledge base comprises inquiry sentences and corresponding response sentences.
With reference to the second aspect or any possible implementation manner of the second aspect, in another possible implementation manner of the second aspect, the third answer determining module is configured to:
performing word segmentation on the inquiry knowledge base to obtain a word set;
forming a vector space from the set of words;
determining the vector of the inquiry statement according to the vector space;
matching the vectors of the inquiry sentences in the vector space by adopting a similarity algorithm;
and if the matching is successful, extracting a second response sentence corresponding to the inquiry sentence.
With reference to the second aspect or any possible implementation manner of the second aspect, in another possible implementation manner of the second aspect, the apparatus further includes a category determining module, where the category determining module is configured to:
classifying the inquiry sentences by using a second machine learning algorithm to determine semantic attribute categories of the inquiry sentences;
the second machine learning algorithm is obtained by training by using an inquiry statement and a semantic attribute class corresponding to the inquiry statement.
With reference to the second aspect or any possible implementation manner of the second aspect, in another possible implementation manner of the second aspect, the obtaining module is configured to:
receiving a voice signal input by a user;
and carrying out voice-to-character conversion on the voice signal to obtain the inquiry statement.
With reference to the second aspect or any possible implementation manner of the second aspect, in another possible implementation manner of the second aspect, the output module is configured to:
and performing character-to-voice conversion on the second answer sentence, and outputting a voice signal of the second answer sentence.
With reference to the second aspect or any possible implementation manner of the second aspect, in another possible implementation manner of the second aspect, the obtaining module is further configured to:
receiving a standardized patient simulation instruction, and determining a currently activated disease according to disease information corresponding to the standardized patient simulation instruction;
determining the pathology knowledge base based on the currently activated disease.
In a third aspect, an embodiment of the present invention provides a computer storage medium, on which a computer program or instructions are stored, which, when executed by a processor or a computer, implement the method according to any one of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a terminal device, where the terminal device includes: a processor, a memory, a transceiver; the transceiver is coupled to the processor, and the processor controls transceiving action of the transceiver;
wherein the memory is to store computer-executable program code, the program code comprising instructions; the instructions, when executed by the processor, cause the terminal device to perform the method of any of the first aspects.
According to the method, the device, the terminal equipment and the storage medium for simulating the patient inquiry dialogue, the inquiry statement input by the user is obtained, the first answer statement corresponding to the inquiry statement is searched in the inquiry matching template, and if the first answer statement corresponding to the inquiry statement exists in the inquiry matching template, the first answer statement is output to the user; if the answer sentence does not exist, the corresponding second answer sentence is determined according to the semantic attribute category of the inquiry sentence, the second answer sentence is output to the user, automatic inquiry dialogue is achieved with the user, the effect of simulating the inquiry dialogue of the patient is achieved, the answer sentence can be applied to practice and evaluation of clinical medical skills, compared with a mode of training a real person, the training cost can be reduced, and the training period can be shortened.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart of a first embodiment of a method of simulating a patient interview session of the present invention;
FIG. 2 is a flowchart of a second embodiment of a method for simulating a patient interview session of the present invention;
FIG. 3 is a schematic diagram of a simulated patient interrogation session apparatus according to a first embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a second embodiment of the device for simulating a patient inquiry session according to the present invention;
fig. 5 is a schematic structural diagram of a first embodiment of a terminal device according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Reference herein to "and/or" describing an associative relationship of associated objects means that there may be three relationships, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone.
Reference herein to a "doctor" is to be taken to mean in particular a intern or a student.
The first machine learning algorithm and the second machine learning algorithm according to the embodiment of the present invention are used to distinguish different machine learning algorithms, where the difference refers to the difference of training data. The first machine learning algorithm and the second machine learning algorithm can be traditional machine learning algorithms, neural network algorithms and the like.
The method for simulating the patient inquiry dialogue according to the embodiment of the present invention may be applied to a Terminal device, which may also be referred to as a Terminal (Terminal), a User Equipment (UE), a Mobile Station (MS), a Mobile Terminal (MT), or the like. The terminal device may be a mobile phone (mobile phone), a tablet computer (Pad), a computer with a wireless transceiving function, a Virtual Reality (VR) terminal, an Augmented Reality (AR) terminal, and so on.
The terminal device acts as a role of a standardized patient in the training and evaluation process of clinical medical skills by executing the method for simulating the patient inquiry dialogue, and a user using the terminal device can act as a role of a doctor to automatically perform inquiry dialogue with the terminal device, so that the effect of simulating the patient inquiry is achieved. The user can use the terminal equipment to practice and evaluate the clinical medical skill, and compared with a method of training a real person, the training cost can be reduced, and the training period can be shortened.
Fig. 1 is a flowchart of a first method for simulating a patient inquiry session according to an embodiment of the present invention, and as shown in fig. 1, the method of this embodiment may include:
step 101, obtaining an inquiry statement input by a user.
Wherein the user may be a user of the above-mentioned terminal device, who plays a role of a doctor, during practice and evaluation of clinical medical skills, and the inquiry sentence may be a sentence inquiring the terminal device, which plays a role of a standardized patient, to determine the disease of the standardized patient according to a response sentence fed back from the terminal device, for example, the inquiry sentence may be "ask for your last name? "," you good, where you are uncomfortable "," do you get a fever ", etc.
Specifically, the specific implementation manner for acquiring the inquiry sentence input by the user may be a plurality of different implementation manners. One specific implementation manner is to receive a voice signal input by a user, perform voice-to-text conversion on the voice signal, and acquire the inquiry sentence. It can be understood that the inquiry statement input by the user may be received, that is, the user inputs the text through the peripheral of the terminal device, so that the terminal device obtains the inquiry statement. Other implementation manners are also possible, and the embodiment of the present invention is not limited thereto.
And 102, searching a first answer sentence corresponding to the inquiry sentence in the inquiry matching template.
The inquiry matching template comprises a matching rule and a response sentence corresponding to the matching rule. The matching rule is used for matching the inquiry statement. The specific implementation manner of matching may be regular matching, keyword matching, and the like, and the embodiment of the present invention is not limited thereto.
Specifically, the inquiry matching template may include one or more matching rules and response sentences corresponding to the matching rules, in this embodiment, after acquiring an inquiry sentence, a matching rule matching the inquiry sentence may be searched in the inquiry matching template, if there is a matching rule matching the inquiry sentence, an response sentence corresponding to the matching rule is acquired, and the response sentence corresponding to the matching rule is the first response sentence, and the following step 103 is executed. If there is no matching rule matching, the following step 104 is performed.
For example, the matching rule is: your family name, the answer sentence corresponding to the matching rule is: i surname king, I have a whole body and generate heat. If the inquiry sentence is "ask for your maiden name? If yes, the inquiry statement matches the matching rule, and the answer statement corresponding to the matching rule is the first answer statement. That is, the first answer sentence corresponding to the inquiry sentence is stored in the inquiry matching template, the following step 103 is executed.
If the inquiry statement is "do you have a fever", the inquiry statement does not match the matching rule, i.e. there is no answer statement corresponding to the inquiry statement in the matching template, then the following step 104 is executed.
Step 103, if a first answer sentence corresponding to the inquiry sentence exists in the inquiry matching template, outputting the first answer sentence to the user.
There are various specific implementations of outputting the first answer sentence to the user, for example, performing text-to-speech conversion on the first answer sentence, and outputting a speech signal of the first answer sentence. It is understood that the text of the first answer sentence may also be directly output, or a voice signal and text may also be output, which is not limited in the embodiment of the present invention.
And 104, if the answer sentence does not exist, determining a corresponding second answer sentence according to the semantic attribute type of the inquiry sentence, and outputting the second answer sentence to the user.
The semantic attribute category of the embodiment of the present invention may include any one or more of a symptom category, a pain category, a transition semantic category, and other semantic categories, and may be flexibly set according to a requirement. When the first answer sentence corresponding to the inquiry sentence does not exist in the inquiry matching template, the semantic attribute category of the inquiry sentence can be determined, and the corresponding second answer sentence is determined according to the semantic attribute category of the inquiry sentence.
There are various specific implementations of outputting the second answer sentence to the user, for example, performing text-to-speech conversion on the second answer sentence, and outputting a speech signal of the second answer sentence. It is understood that the text of the second answer sentence may also be directly output, or a voice signal and text may also be output, which is not limited in the embodiment of the present invention.
A specific implementation manner of the step 104 is as follows: and analyzing the inquiry sentences according to the pathological knowledge base corresponding to the semantic attribute categories of the inquiry sentences to obtain second response sentences corresponding to the inquiry sentences.
Wherein the pathology knowledge base is formed from medical records of each standardized patient, which may include various symptoms, various pain sites, and the like. And the second answer sentence obtained according to the pathology knowledge base conforms to the medical record, so that the simulation of the standardized patient is realized.
In this embodiment, by obtaining an inquiry statement input by a user, a first answer statement corresponding to the inquiry statement is searched for in an inquiry matching template, and if the first answer statement corresponding to the inquiry statement exists in the inquiry matching template, the first answer statement is output to the user; if the answer sentence does not exist, the corresponding second answer sentence is determined according to the semantic attribute category of the inquiry sentence, the second answer sentence is output to the user, automatic inquiry dialogue is achieved with the user, the effect of simulating the inquiry dialogue of the patient is achieved, the answer sentence can be applied to practice and evaluation of clinical medical skills, compared with a mode of training a real person, the training cost can be reduced, and the training period can be shortened.
The technical solutions of the above method embodiments are described in detail below using several specific examples.
Fig. 2 is a flowchart of a second embodiment of the method for simulating a patient inquiry session, as shown in fig. 2, the method of this embodiment may include:
step 201, obtaining an inquiry statement input by a user.
Step 202, searching a first answer sentence corresponding to the inquiry sentence in the inquiry matching template.
And 203, if a first answer sentence corresponding to the inquiry sentence exists in the inquiry matching template, outputting the first answer sentence to the user.
For the detailed explanation of the above steps 201 to 203, refer to steps 101 to 103 in the embodiment shown in fig. 1, which are not described herein again.
For example, the inquiry sentence asked by the user is: "you are good, where you are uncomfortable". The matching rule is ". times.discomfort", the answer sentence corresponding to the matching rule is "pain of the whole body of oneself", the matching template includes the matching rule and the answer sentence corresponding to the matching rule, and then the answer sentence of the inquiry sentence can be determined as "pain of the whole body of oneself" through the above steps 201 to 203.
And 204, if the query statement does not exist, determining the semantic attribute type of the query statement.
The determination of the semantic attribute category of the inquiry statement can be determined by using a machine learning algorithm, specifically, the inquiry statement is classified by using a second machine learning algorithm, and the semantic attribute category of the inquiry statement is determined; the second machine learning algorithm is obtained by training by using an inquiry statement and a semantic attribute class corresponding to the inquiry statement.
The semantic attribute category referred to herein may be flexibly divided according to requirements, for example, the semantic attribute category may be divided into four categories, including a symptom category, a pain category, a transition semantic category, and other semantic categories, which are used for example and explanation in the embodiments of the present invention. It is to be understood that the semantic attribute category may also be other specific categories, which is not limited in the embodiment of the present invention.
The inquiry sentences belonging to the symptom category are used for inquiring whether the patient has any symptom, for example, the inquiry sentences are sentences with similar semantics such as "do you have fever", "do you have hemoptysis", and the semantic attribute category of the inquiry sentences is the symptom category.
The inquiry sentences belonging to the pain category are used for inquiring whether the patient has pain, for example, the inquiry sentences are sentences with similar semantics such as "do you have headache", "do you have joint pain", "do you have abdomen pain", and the semantic attribute category of the inquiry sentences is the pain category.
The inquiry sentences belonging to the category of transition sentences are used for inquiring whether the patient has a question, for example, the inquiry sentences are sentences with similar semantics such as "whether you have any question", "what you have to supplement", and the like, and the category of semantic attribute of the inquiry sentences is the category of transition sentences.
Other semantic categories: other classes that do not belong to the above categories, classified as not explicitly intended, cannot locate a category.
When semantic attribute categories of the inquiry statement include: when at least one of the symptom category and the pain category is selected, steps 2051 to 2053 are performed, and when the semantic attribute category of the inquiry sentence includes: if the semantic attribute type is a transition semantic type, step 2061 to step 2062 are executed, and if the semantic attribute type does not belong to any of the above symptom type, pain type and transition semantic type, that is, belongs to another semantic type, step 207 is executed.
And step 2051, acquiring keywords of the inquiry sentence.
The obtaining of the keywords may adopt various existing keyword extraction methods, for example, methods based on multi-pattern matching of a keyword thesaurus, word correlation ordering, and the like, which are not illustrated here.
For example, the inquiry sentence asked by the user is: "do you get fever". Since there is no matching rule in the matching template that matches the inquiry statement, it is determined through the above steps 201 to 202 that there is no first answer statement corresponding to the inquiry statement in the inquiry matching template, the semantic attribute category of the inquiry statement is determined through step 204, the semantic attribute category of the inquiry statement is a symptom category, and the keyword of the inquiry statement is obtained through step 2051, and the keyword is "fever".
And step 2052, searching keywords of the inquiry statement in a pathology knowledge base corresponding to the semantic attribute category of the inquiry statement.
Specifically, the keywords of the inquiry sentence are searched in the pathology knowledge base corresponding to the symptom category and/or the pathology knowledge base corresponding to the pain category. Wherein the pathology knowledge base corresponding to the symptom category may comprise a symptom list, i.e. comprise one or more symptoms, such as fever, cough, etc. The pathology knowledge base corresponding to the pain category may include a list of pain, i.e., one or more pain sites, e.g., joints, left abdomen, throat, etc.
The inquiry sentences asked by the user are as follows: by way of further illustration, by way of example, "do you have fever," the keyword is "fever," and the keyword "fever" is looked up in the pathology knowledge base, via step 2052.
And step 2053, generating a second response sentence corresponding to the inquiry sentence according to whether the keyword of the inquiry sentence exists in the pathology knowledge base.
Specifically, if the keyword of the inquiry sentence exists in the pathology knowledge base, the second answer sentence is generated, and the second answer sentence may be a positive answer, and if the keyword of the inquiry sentence does not exist in the pathology knowledge base, the second answer sentence may be a negative answer.
The inquiry sentences asked by the user are as follows: as a further example, the term "do you have a fever" is searched in the pathological knowledge base corresponding to the semantic attribute category of the inquiry sentence, and a second response sentence is generated through step 2053, specifically, for example, if the term exists, the second response sentence is "i have a fever", or "i have a sustained fever, 37.8 degrees", and the like, and if the term does not exist, the second response sentence is "i do not have a fever".
Step 2061, obtaining the keywords of the inquiry statement.
The obtaining of the keywords may adopt various existing keyword extraction methods, for example, methods based on multi-pattern matching of a keyword thesaurus, word correlation ordering, and the like, which are not illustrated here.
Step 2062, determining a second answer sentence corresponding to the inquiry sentence according to the keyword of the inquiry sentence.
For example, the inquiry sentence is "do you have any question", the keywords "what" and "question" are obtained in step 2061, and whether there is any question can be analyzed according to the keywords, and the second answer sentence can be "doctor, what you think me has got what disease".
And step 207, when the inquiry statement belongs to other semantic categories, processing the inquiry statement by using a first machine learning algorithm to obtain a second answer statement corresponding to the inquiry statement.
The first machine learning algorithm is obtained by training by using an inquiry knowledge base, wherein the inquiry knowledge base comprises inquiry sentences and corresponding response sentences.
Wherein, a specific implementation manner of step 207 is as follows: segmenting words from the inquiry knowledge base to obtain a word set, wherein the word set can also be called as a word bag, and a vector space is formed according to the word set; determining the vector of the inquiry statement according to the vector space; matching the vectors of the inquiry sentences in the vector space by adopting a similarity algorithm; and if the matching is successful, extracting a second response sentence corresponding to the inquiry sentence.
For example, the inquiry sentence asked by the user is: "do you need to take a blood drawing check, do you have a blood fainting". Since there is no matching rule in the matching template that matches the inquiry sentence, it is determined through the above steps 201 to 202 that there is no first answer sentence corresponding to the inquiry sentence in the inquiry matching template, it is determined through the steps 204, 2051 to 2053, 2061 to 2062 that the semantic attribute category of the inquiry sentence does not belong to any one of the symptom category, the pain category and the transition semantic category, the inquiry sentence is processed through the step 207 using the first machine learning algorithm, a second answer sentence corresponding to the inquiry sentence is obtained, for example, the answer "do not have blood halo" is matched to "do not have blood halo me", and the answer "do not have blood halo" is taken as the second answer sentence corresponding to the inquiry sentence.
Specifically, a vector space may be formed according to an algorithm such as term frequency-inverse document frequency (TF-IDF). The similarity calculation method may specifically adopt algorithms such as hamming distance and euclidean distance.
And step 208, outputting the second answer sentence to the user.
For a detailed explanation of step 208, reference may be made to the embodiment shown in fig. 1, which is not described herein again.
In this embodiment, by obtaining an inquiry statement input by a user, a first answer statement corresponding to the inquiry statement is searched for in an inquiry matching template, and if the first answer statement corresponding to the inquiry statement exists in the inquiry matching template, the first answer statement is output to the user; if the answer is not found, the semantic attribute category of the inquiry statement is determined, the corresponding second answer statement is determined according to the semantic attribute category of the inquiry statement, the second answer statement is output to the user, automatic inquiry dialogue is achieved with the user, the effect of simulating the inquiry dialogue of the patient is achieved, the answer is applied to practice and evaluation of clinical medical skills, compared with a method of training real people, the training cost can be reduced, and the training period can be shortened.
Moreover, by determining the semantic attribute types of the inquiry statement and executing corresponding processing operations according to different semantic attribute types, the processing efficiency of the inquiry statement can be improved.
It should be noted that the terminal device applying the method of the embodiment of the present invention may simulate an inquiry session of patients with different diseases, and the terminal device may receive a standardized patient simulation instruction, and determine the currently activated disease according to the disease information corresponding to the standardized patient simulation instruction. Determining the pathology knowledge base based on the currently activated disease.
That is, the pathology knowledge base includes a symptom list and a pain list, and may further include symptoms and diseases corresponding to pain parts, each disease is represented by a plurality of symptoms and a plurality of pain parts, when the terminal device may simulate an inquiry dialogue of patients with different diseases, for example, diseases such as pneumonia, cold, leukemia, etc. the terminal device may determine a currently activated disease according to the simulated disease selected by the user, that is, receive a standardized patient simulation instruction, for example, the currently simulated disease is pneumonia, and then determine the pathology knowledge base in the above embodiment according to the pneumonia, where the pathology knowledge base includes symptoms and pain parts corresponding to pneumonia.
Wherein the standardized patient simulation instruction may be an instruction of a touch operation in which the user clicks the disease selection box. For example, a user graphical interface of the terminal device to which the method of the embodiment of the present invention is applied may display a disease selection box for a user to select, and determine a currently activated disease according to an instruction of a touch operation of clicking the disease selection box by the user.
Fig. 3 is a schematic structural diagram of a first device for simulating a patient inquiry session according to an embodiment of the present invention, and as shown in fig. 3, the device of this embodiment may include: the system comprises an acquisition module 11, a matching module 12 and an output module 13, wherein the acquisition module 11 is used for acquiring an inquiry statement input by a user; the matching module 12 is configured to search a first answer sentence corresponding to the inquiry sentence in the inquiry matching template; an output module 13, configured to output a first answer sentence corresponding to the inquiry sentence to a user if the inquiry matching template has the first answer sentence; if not, determining a corresponding second answer sentence according to the semantic attribute category of the inquiry sentence, and outputting the second answer sentence to the user; the inquiry matching template comprises a matching rule and a response statement corresponding to the matching rule, and the matching rule is used for matching the inquiry statement.
Optionally, the output module 13 is configured to determine, according to the semantic attribute category of the inquiry statement, a corresponding second answer statement, and includes: and analyzing the inquiry sentences according to the pathological knowledge base corresponding to the semantic attribute categories of the inquiry sentences to obtain second response sentences corresponding to the inquiry sentences.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 1, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 4 is a schematic structural diagram of a second embodiment of the device for simulating a patient inquiry session, as shown in fig. 4, the device of this embodiment is based on the device structure shown in fig. 3, and further, the semantic attribute categories include: at least one of a symptom category, a pain category; the output module 13 includes a first answer determining module 131, where the first answer determining module 131 is specifically configured to: acquiring keywords of the inquiry sentences; searching keywords of the inquiry sentences in a pathological knowledge base corresponding to the semantic attribute categories of the inquiry sentences; and generating a second response sentence corresponding to the inquiry sentence according to whether the keyword of the inquiry sentence exists in the pathology knowledge base or not.
The semantic attribute classes comprise transition semantic classes, the output module 13 further comprises a second answer determining module 132, the second answer determining module 132 is configured to: acquiring keywords of the inquiry sentences; and determining a second response sentence corresponding to the inquiry sentence according to the keyword of the inquiry sentence.
The semantic attribute categories include other semantic categories, the output module 13 further includes a third answer determining module 133, and the third answer determining module 133 is configured to: processing the inquiry sentences by using a first machine learning algorithm to obtain second answer sentences corresponding to the inquiry sentences; the first machine learning algorithm is obtained by training by using an inquiry knowledge base, wherein the inquiry knowledge base comprises inquiry sentences and corresponding response sentences.
Optionally, the third response determining module 133 is configured to: performing word segmentation on the inquiry knowledge base to obtain a word set; forming a vector space from the set of words; determining the vector of the inquiry statement according to the vector space; matching the vectors of the inquiry sentences in the vector space by adopting a similarity algorithm; and if the matching is successful, extracting a second response sentence corresponding to the inquiry sentence.
Optionally, the apparatus further includes a category determining module 14, where the category determining module 14 is configured to: classifying the inquiry sentences by using a second machine learning algorithm to determine semantic attribute categories of the inquiry sentences; the second machine learning algorithm is obtained by training by using an inquiry statement and a semantic attribute class corresponding to the inquiry statement.
Optionally, the obtaining module 11 is configured to: receiving a voice signal input by a user; and carrying out voice-to-character conversion on the voice signal to obtain the inquiry statement.
Optionally, the output module 13 is further configured to: and performing character-to-voice conversion on the second answer sentence, and outputting a voice signal of the second answer sentence.
Optionally, the obtaining module 11 is further configured to: receiving a standardized patient simulation instruction, and determining the currently activated disease according to the disease information corresponding to the standardized patient simulation instruction; determining the pathology knowledge base based on the currently activated disease.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 2, and the implementation principle and the technical effect are similar, which are not described herein again.
Embodiments of the present invention also provide a computer storage medium having a computer program or instructions stored thereon, which when executed by a processor or a computer, implement the method according to any of the above embodiments.
It should be noted that, the above-mentioned device for simulating a patient inquiry dialogue according to the embodiment of the present invention may be a terminal device, or may be a component in the terminal device, such as a chip.
Fig. 5 is a schematic structural diagram of a first terminal device according to an embodiment of the present invention, and as shown in fig. 5, the terminal device according to the embodiment includes: a processor 211, a memory 212, a transceiver 213, and a bus 214. Wherein the processor 211, the memory 212 and the transceiver 213 are connected to each other through a bus 214. The bus 214 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 214 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 5, but this is not intended to represent only one bus or type of bus.
In terms of hardware implementation, the functional modules shown in fig. 3 or fig. 4 above may be embedded in the processor 211 of the terminal device or may be independent of the processor.
The transceiver 213 may include a mixer or the like as necessary for radio frequency communication. The processor 211 may include at least one of a Central Processing Unit (CPU), a Digital Signal Processor (DSP), a Microcontroller (MCU), an Application Specific Integrated Circuit (ASIC), or a Field Programmable Gate Array (FPGA).
The memory 212 is used for storing program instructions, and the processor 211 is used for calling the program instructions in the memory 212 to execute the above scheme.
The program instructions may be embodied in the form of software functional units and may be sold or used as a stand-alone product, and the memory 212 may be any form of computer readable storage medium. Based on such understanding, all or part of the technical solutions of the present application may be embodied in the form of a software product, which includes several instructions to enable a computer device, specifically, the processor 211, to execute all or part of the steps of the first terminal in the embodiments of the present application. And the aforementioned computer-readable storage media comprise: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The terminal device described above in this embodiment may be configured to execute the technical solutions in the above method embodiments, and the implementation principles and technical effects are similar, where the functions of each device may refer to corresponding descriptions in the method embodiments, and are not described herein again.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A method of simulating a patient interview session, comprising:
acquiring an inquiry statement input by a user; the inquiry sentence is a sentence for inquiring a terminal device which plays a role of a standardized patient;
searching a first answer sentence corresponding to the inquiry sentence in an inquiry matching template;
if a first answer sentence corresponding to the inquiry sentence exists in the inquiry matching template, outputting the first answer sentence to a user; if not, determining a corresponding second answer sentence according to the semantic attribute category of the inquiry sentence, and outputting the second answer sentence to the user;
the inquiry matching template comprises a matching rule and a response statement corresponding to the matching rule, and the matching rule is used for matching the inquiry statement;
if the semantic attribute category comprises: at least one of a symptom category, a pain category, the determining a corresponding second answer sentence according to the semantic attribute category of the inquiry sentence, comprising: acquiring keywords of the inquiry sentences; searching keywords of the inquiry sentences in a pathological knowledge base corresponding to the semantic attribute categories of the inquiry sentences; and generating a second response sentence corresponding to the inquiry sentence according to whether the keyword of the inquiry sentence exists in the pathology knowledge base or not.
2. The method of claim 1, wherein if the semantic attribute class comprises a transition semantic class, the method further comprises:
acquiring keywords of the inquiry sentences;
and determining a second response sentence corresponding to the inquiry sentence according to the keyword of the inquiry sentence.
3. The method of claim 1, wherein if the semantic attribute class comprises other semantic classes, the method further comprises:
processing the inquiry sentences by using a first machine learning algorithm to obtain second answer sentences corresponding to the inquiry sentences;
the first machine learning algorithm is obtained by training by using an inquiry knowledge base, wherein the inquiry knowledge base comprises inquiry sentences and corresponding response sentences.
4. The method of claim 3, wherein the processing the interrogation sentence using the first machine learning algorithm to obtain a second answer sentence corresponding to the interrogation sentence comprises:
performing word segmentation on the inquiry knowledge base to obtain a word set;
forming a vector space from the set of words;
determining the vector of the inquiry statement according to the vector space;
matching the vectors of the inquiry sentences in the vector space by adopting a similarity algorithm;
and if the matching is successful, extracting a second response sentence corresponding to the inquiry sentence.
5. The method according to any one of claims 1 to 4, further comprising:
classifying the inquiry sentences by using a second machine learning algorithm to determine semantic attribute categories of the inquiry sentences;
the second machine learning algorithm is obtained by training by using an inquiry statement and a semantic attribute class corresponding to the inquiry statement.
6. The method of claim 1, further comprising:
receiving a standardized patient simulation instruction, and determining a currently activated disease according to disease information corresponding to the standardized patient simulation instruction;
determining the pathology knowledge base based on the currently activated disease.
7. A device for simulating a patient interview session, comprising:
the acquisition module is used for acquiring the inquiry sentences input by the user; the inquiry sentence is a sentence for inquiring a terminal device which plays a role of a standardized patient;
the matching module is used for searching a first answer sentence corresponding to the inquiry sentence in the inquiry matching template;
the output module is used for outputting a first answer sentence to a user if the first answer sentence corresponding to the inquiry sentence exists in the inquiry matching template; if not, determining a corresponding second answer sentence according to the semantic attribute category of the inquiry sentence, and outputting the second answer sentence to the user;
the inquiry matching template comprises a matching rule and a response statement corresponding to the matching rule, and the matching rule is used for matching the inquiry statement;
if the semantic attribute category comprises: at least one of a symptom category, a pain category, the output module including a first answer determination module to: acquiring keywords of the inquiry sentences; searching keywords of the inquiry sentences in a pathological knowledge base corresponding to the semantic attribute categories of the inquiry sentences; and generating a second response sentence corresponding to the inquiry sentence according to whether the keyword of the inquiry sentence exists in the pathology knowledge base or not.
8. A terminal device, characterized in that the terminal device comprises: a processor, a memory, a transceiver; the transceiver is coupled to the processor, and the processor controls transceiving action of the transceiver;
wherein the memory is to store computer-executable program code, the program code comprising instructions; the instructions, when executed by the processor, cause the terminal device to perform the method of any of claims 1 to 6.
9. A computer storage medium having stored thereon a computer program or instructions for implementing the method of any one of claims 1 to 6 when executed by a processor or computer.
CN201810207918.1A 2018-03-14 2018-03-14 Method, device, terminal equipment and storage medium for simulating patient inquiry dialogue Active CN108491486B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810207918.1A CN108491486B (en) 2018-03-14 2018-03-14 Method, device, terminal equipment and storage medium for simulating patient inquiry dialogue

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810207918.1A CN108491486B (en) 2018-03-14 2018-03-14 Method, device, terminal equipment and storage medium for simulating patient inquiry dialogue

Publications (2)

Publication Number Publication Date
CN108491486A CN108491486A (en) 2018-09-04
CN108491486B true CN108491486B (en) 2020-11-24

Family

ID=63339140

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810207918.1A Active CN108491486B (en) 2018-03-14 2018-03-14 Method, device, terminal equipment and storage medium for simulating patient inquiry dialogue

Country Status (1)

Country Link
CN (1) CN108491486B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109545350A (en) * 2018-11-21 2019-03-29 上海依智医疗技术有限公司 A kind of hospital guide's method and device
CN109492107A (en) * 2018-11-21 2019-03-19 上海依智医疗技术有限公司 A kind of method and device of hospital guide
TWI659429B (en) * 2018-11-30 2019-05-11 國立成功大學 System and method of interactive health assessment
CN111180081B (en) * 2019-12-30 2023-11-03 众安信息技术服务有限公司 Intelligent inquiry method and device
CN111259664B (en) * 2020-01-14 2023-03-24 腾讯科技(深圳)有限公司 Method, device and equipment for determining medical text information and storage medium
CN111863254B (en) * 2020-06-03 2023-09-26 四川大学华西医院 Method, system and equipment for evaluating questioning and examining body based on simulated patient
CN111833678A (en) * 2020-06-03 2020-10-27 四川大学华西医院 Method, device and equipment for inquiry teaching
CN112395394B (en) * 2020-11-27 2024-04-26 安徽迪科数金科技有限公司 Short text semantic understanding template checking method, template generating method and device
CN112657037A (en) * 2021-01-11 2021-04-16 华中科技大学 Intelligent mental disorder treatment equipment based on variable light
CN113836284A (en) * 2021-09-26 2021-12-24 北京京东拓先科技有限公司 Method and device for constructing knowledge base and generating response statement
CN114627710A (en) * 2022-03-23 2022-06-14 北京华医网科技股份有限公司 Training system for simulating diagnosis and treatment capacity of patient

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101076060A (en) * 2007-03-30 2007-11-21 腾讯科技(深圳)有限公司 Chatting robot system and automatic chatting method
CN102866990A (en) * 2012-08-20 2013-01-09 北京搜狗信息服务有限公司 Thematic conversation method and device
CN104036152A (en) * 2014-07-01 2014-09-10 彩带网络科技(北京)有限公司 Method and device for building diagnosis inquiring channels
GB2553286A (en) * 2016-08-24 2018-03-07 Hambali Mahamadu Prescription booth

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101076060A (en) * 2007-03-30 2007-11-21 腾讯科技(深圳)有限公司 Chatting robot system and automatic chatting method
CN102866990A (en) * 2012-08-20 2013-01-09 北京搜狗信息服务有限公司 Thematic conversation method and device
CN104036152A (en) * 2014-07-01 2014-09-10 彩带网络科技(北京)有限公司 Method and device for building diagnosis inquiring channels
GB2553286A (en) * 2016-08-24 2018-03-07 Hambali Mahamadu Prescription booth

Also Published As

Publication number Publication date
CN108491486A (en) 2018-09-04

Similar Documents

Publication Publication Date Title
CN108491486B (en) Method, device, terminal equipment and storage medium for simulating patient inquiry dialogue
CN111128394B (en) Medical text semantic recognition method and device, electronic equipment and readable storage medium
CN110209897B (en) Intelligent dialogue method, device, storage medium and equipment
CN110675944A (en) Triage method and device, computer equipment and medium
CN112015917A (en) Data processing method and device based on knowledge graph and computer equipment
US20180151183A1 (en) Method and device for searching according to speech based on artificial intelligence
Hezarjaribi et al. Speech2Health: a mobile framework for monitoring dietary composition from spoken data
CN112667799A (en) Medical question-answering system construction method based on language model and entity matching
CN111145903A (en) Method and device for acquiring vertigo inquiry text, electronic equipment and inquiry system
CN112287082A (en) Data processing method, device, equipment and storage medium combining RPA and AI
CN113326383B (en) Short text entity linking method, device, computing equipment and storage medium
CN114416929A (en) Sample generation method, device, equipment and storage medium of entity recall model
CN112949293B (en) Similar text generation method, similar text generation device and intelligent equipment
CN117747087A (en) Training method of large inquiry model, inquiry method and device based on large inquiry model
CN117454217A (en) Deep ensemble learning-based depression emotion recognition method, device and system
EP3901875A1 (en) Topic modelling of short medical inquiries
CN110047569B (en) Method, device and medium for generating question-answer data set based on chest radiography report
Iyortsuun et al. Additive Cross-Modal Attention Network (ACMA) for Depression Detection based on Audio and Textual Features
CN112233648B (en) Data processing method, device, equipment and storage medium combining RPA and AI
CN114155957A (en) Text determination method and device, storage medium and electronic equipment
CN114328864A (en) Ophthalmic question-answering system based on artificial intelligence and knowledge graph
CN114186048A (en) Question-answer replying method and device based on artificial intelligence, computer equipment and medium
CN110162614B (en) Question information extraction method and device, electronic equipment and storage medium
CN113821597A (en) Entity chain pointing method and system for natural language text and medical knowledge graph
CN113763934A (en) Training method and device of audio recognition model, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant