CN110838359B - Diagnosis method and device based on dialogue robot, storage medium and robot - Google Patents

Diagnosis method and device based on dialogue robot, storage medium and robot Download PDF

Info

Publication number
CN110838359B
CN110838359B CN201910981777.3A CN201910981777A CN110838359B CN 110838359 B CN110838359 B CN 110838359B CN 201910981777 A CN201910981777 A CN 201910981777A CN 110838359 B CN110838359 B CN 110838359B
Authority
CN
China
Prior art keywords
word
triage
user
complaint information
dialogue
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
CN201910981777.3A
Other languages
Chinese (zh)
Other versions
CN110838359A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910981777.3A priority Critical patent/CN110838359B/en
Publication of CN110838359A publication Critical patent/CN110838359A/en
Priority to PCT/CN2020/092897 priority patent/WO2021073110A1/en
Application granted granted Critical
Publication of CN110838359B publication Critical patent/CN110838359B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G16H40/00ICT specially adapted for the management or administration of healthcare resources or facilities; ICT specially adapted for the management or operation of medical equipment or devices
    • G16H40/20ICT specially adapted for the management or administration of healthcare resources or facilities; ICT specially adapted for the management or operation of medical equipment or devices for the management or administration of healthcare resources or facilities, e.g. managing hospital staff or surgery rooms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Primary Health Care (AREA)
  • Human Computer Interaction (AREA)
  • Artificial Intelligence (AREA)
  • Public Health (AREA)
  • Biomedical Technology (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Epidemiology (AREA)
  • Machine Translation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application belongs to the technical field of computers, and particularly relates to a diagnosis method and device based on a dialogue robot, a computer readable storage medium and the robot. After receiving a triage request instruction issued by a user, the method carries out a plurality of rounds of conversations with the user according to a preset conversation process, and obtains conversation sentences of the user in each round of conversations; respectively determining the main complaint information of the user in each preset triage dimension according to the dialogue sentences of the user in each round of dialogue; constructing the complaint information of the user in each triage dimension as a complaint information set of the user; respectively calculating the matching degree between the main complaint information set of the user and each triage item in a preset main complaint information base; and recommending a department corresponding to the preferred triage entry to the user, wherein the preferred triage entry is the triage entry corresponding to the maximum matching degree. According to the method and the device, the time consumption of triage is shortened, and the accuracy of triage is improved.

Description

Diagnosis method and device based on dialogue robot, storage medium and robot
Technical Field
The application belongs to the technical field of computers, and particularly relates to a diagnosis method and device based on a dialogue robot, a computer readable storage medium and the robot.
Background
The existing hospital triage process mainly depends on manual triage, and the manpower cost is high. In recent years, some hospitals introduce robots to assist in manual triage, at present, triage of the robots is mainly finished by means of screen click, the whole process is time-consuming, long and low in efficiency, and recognition based on a voice form is very various in expression mode of a patient during complaints, and difficulty in accurately extracting target positions and describing symptoms in long strings of characters is high, so that the patient may need to repeatedly describe the symptoms and discomfort. Meanwhile, at present, the triage rule mainly depends on experience information extracted after communication with doctors in departments and nurses in triage stations, and the problem that part of main complaint information cannot be covered and symptoms cannot be exhausted possibly exists, so that a triage robot can only understand part of description, and most main complaints cannot give triage conclusions. The above reasons lead to long time consumption and low accuracy of the whole diagnosis procedure, and serious workload of diagnosis stations when the hospital flow is large.
Disclosure of Invention
In view of this, the embodiments of the present application provide a diagnosis method and apparatus based on a dialogue robot, a computer readable storage medium, and a robot, so as to solve the problems of long time consumption and low accuracy of the existing diagnosis process.
A first aspect of an embodiment of the present application provides a diagnosis method based on a conversational robot, which is applied to a preset conversational robot, and the method may include:
after receiving a triage request instruction issued by a user, carrying out F rounds of dialogue with the user according to a preset dialogue flow, and acquiring dialogue sentences of the user in each round of dialogue, wherein F is a positive integer;
respectively determining the main complaint information of the user in each preset triage dimension according to the dialogue sentences of the user in each round of dialogue;
constructing the complaint information of the user in each triage dimension as a complaint information set of the user;
respectively calculating the matching degree between the main complaint information set of the user and each triage item in a preset main complaint information base;
and recommending a department corresponding to the preferred triage entry to the user, wherein the preferred triage entry is the triage entry corresponding to the maximum matching degree.
A second aspect of the embodiments of the present application provides a triage device based on a conversational robot, which is applied to a preset conversational robot, and the device may include:
the dialogue sentence acquisition module is used for carrying out F rounds of dialogue with the user according to a preset dialogue flow after receiving a triage request instruction issued by the user, and acquiring dialogue sentences of the user in each round of dialogue, wherein F is a positive integer;
the main complaint information determining module is used for respectively determining main complaint information of the user in each preset triage dimension according to dialogue sentences of the user in each round of dialogue;
the main complaint information set construction module is used for constructing main complaint information of the user in each triage dimension as a main complaint information set of the user;
the matching degree calculation module is used for calculating the matching degree between the main complaint information set of the user and each triage item in the preset main complaint information base respectively;
the department recommendation module is used for recommending departments corresponding to the preferred triage items to the users, wherein the preferred triage items are triage items corresponding to the maximum matching degree.
A third aspect of embodiments of the present application provides a computer-readable storage medium storing computer-readable instructions that when executed by a processor perform the steps of:
after receiving a triage request instruction issued by a user, carrying out F rounds of dialogue with the user according to a preset dialogue flow, and acquiring dialogue sentences of the user in each round of dialogue, wherein F is a positive integer;
respectively determining the main complaint information of the user in each preset triage dimension according to the dialogue sentences of the user in each round of dialogue;
constructing the complaint information of the user in each triage dimension as a complaint information set of the user;
respectively calculating the matching degree between the main complaint information set of the user and each triage item in a preset main complaint information base;
and recommending a department corresponding to the preferred triage entry to the user, wherein the preferred triage entry is the triage entry corresponding to the maximum matching degree.
A fourth aspect of the embodiments of the present application provides a robot comprising a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, the processor executing the computer readable instructions to perform the steps of:
after receiving a triage request instruction issued by a user, carrying out F rounds of dialogue with the user according to a preset dialogue flow, and acquiring dialogue sentences of the user in each round of dialogue, wherein F is a positive integer;
respectively determining the main complaint information of the user in each preset triage dimension according to the dialogue sentences of the user in each round of dialogue;
constructing the complaint information of the user in each triage dimension as a complaint information set of the user;
respectively calculating the matching degree between the main complaint information set of the user and each triage item in a preset main complaint information base;
and recommending a department corresponding to the preferred triage entry to the user, wherein the preferred triage entry is the triage entry corresponding to the maximum matching degree.
Compared with the prior art, the embodiment of the application has the beneficial effects that: after receiving a triage request instruction issued by a user, the dialogue robot firstly carries out a plurality of rounds of dialogue with the user according to a preset dialogue flow, obtains dialogue sentences of the user in each round of dialogue, then respectively determines main complaint information of the user in each preset triage dimension according to the dialogue sentences of the user in each round of dialogue, constructs the main complaint information of the user in each triage dimension into a main complaint information set of the user, then respectively calculates the matching degree between the main complaint information set of the user and each triage item in a preset main complaint information base, finally takes the triage item corresponding to the maximum matching degree as a preferred triage item, and recommends a department corresponding to the preferred triage item to the user. According to the embodiment of the application, the conversation robot can acquire the complaint information on each triage dimension only through a plurality of rounds of conversations, the triage time is greatly shortened, and a reliable basis is provided for triage through the calculation of the matching degree of each triage item in the complaint information base, so that the most suitable department can be selected according to the matching degree and recommended to a user, and the triage accuracy is greatly improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required for the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of one embodiment of a method for triage based on conversational robots in an embodiment of the present application;
FIG. 2 is a schematic flow chart of determining complaint information of a user in preset triage dimensions according to dialogue sentences of the user in each round of dialogue;
FIG. 3 is a schematic flow chart of a setup process for a complaint information library;
FIG. 4 is a schematic diagram of dividing each historical dialog sentence into groups according to the corresponding departments;
FIG. 5 is a block diagram of one embodiment of a diagnostic device based on a conversational robot according to one embodiment of the present application;
fig. 6 is a schematic block diagram of a robot in an embodiment of the present application.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the embodiments described below are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The triage method in the embodiment of the application can be applied to a preset conversation robot (Chatterbot), wherein the conversation robot is a robot for simulating human conversation or chat. In a specific application scenario of the embodiment of the present application, the session robot may be set at a location such as a triage table, a consultation table or a hall entrance of a hospital, so as to provide a convenient triage service for a passing user.
Referring to fig. 1, an embodiment of a triage method based on a dialogue robot according to an embodiment of the present application may include:
step S101, after receiving a triage request instruction issued by a user, performing F rounds of dialogue with the user according to a preset dialogue flow, and acquiring dialogue sentences of the user in each round of dialogue.
In this embodiment, the user may issue a triage request instruction to the session robot in the form of voice. When the conversation robot receives the voice of the user, whether the voice comprises preset keywords or not can be judged, the keywords comprise words such as diagnosis, diagnosis guiding, department and the like, if the voice of the user comprises the keywords, the voice can be judged to be a diagnosis separating request instruction issued by the user. The user can also issue a triage request instruction to the dialogue robot through an entity key or a virtual key in the designated man-machine interaction interface, for example, the dialogue robot can comprise a touch screen for interacting with the user, and when the user needs to issue the triage request instruction to the dialogue robot, the user can click a specific key displayed in the triage request instruction. After receiving the triage request instruction issued by the user, the conversation robot can perform F-round conversations with the user according to a preset conversation flow, and obtain conversation sentences of the user in each round of conversations. Wherein, F is a positive integer, and its specific value can be set according to practical situations, for example, it can be set to 2, 3, 5 or other values. In this embodiment, it is preferable to set f=3, that is, the conversation robot may perform 3 conversations with the user. For example, in round 1 conversation, the conversation robot may query: "where uncomfortable" and then get the dialogue statement that the user answered for the question, in round 2 dialogue, the dialogue robot can ask: "which cardinal symptoms you have" and then get the dialogue statement that the user answered for the question, in the 3 rd round of dialogue the dialogue robot can ask: "which concomitant symptoms you have" and then get the dialogue statement that the user answered for the question.
Step S102, according to dialogue sentences of the user in each round of dialogue, the complaint information of the user in each preset triage dimension is respectively determined.
The triage dimension includes, but is not limited to, uncomfortable parts, main symptoms, accompanying symptoms, and the like, and in a specific implementation of this embodiment, the conversation robot may determine complaint information of the user in the triage dimension of the uncomfortable parts according to conversation sentences of the user in the 1 st round of conversations, determine complaint information of the user in the triage dimension of the main symptoms according to conversation sentences of the user in the 2 nd round of conversations, and determine complaint information of the user in the triage dimension of the accompanying symptoms according to conversation sentences of the user in the 3 rd round of conversations.
Specifically, taking the F-th round (1. Ltoreq.f) dialogue as an example, the dialogue robot can determine complaint information of the user in the F-th triage dimension through the process as shown in fig. 2:
step S1021, respectively inquiring the word vectors of the first words in a preset word vector database.
The first word is a word composing a dialogue sentence of the user in an f-th dialogue. The first words can be obtained by word segmentation processing of dialogue sentences of the user in the f-th round of dialogue. The word segmentation process refers to segmenting a sentence into individual words, in this embodiment, the dialogue sentence may be segmented in a manner of combining a general dictionary with a medical special dictionary, that is, the dialogue sentence is segmented for the first time by using the medical special dictionary, and then the dialogue sentence remaining after the first round of segmentation is segmented by using the general dictionary.
The word vector database is a database for recording the corresponding relation between words and word vectors. The word vector may be a corresponding word vector obtained by training words according to a word2vec model. I.e. the probability of the occurrence of a word is represented based on the context information of the word. The training of word vectors is still according to the thought of word2vec, each word is expressed into a 0-1 vector (one-hot) form, word2vec model training is carried out by using the word vectors, n-1 words are used for predicting n-th words, and an intermediate process obtained after neural network model prediction is used as the word vector.
In the prior art, a plurality of word vector databases are provided, and the word vector databases used in the embodiment can be any word vector database based on the existing open source, but the word vector databases are universal for each field and are not specially set for the medical field, so that in order to improve the accuracy, the word vector databases specially aiming at the medical field can be retrained according to a word2vec model in the scheme.
Step S1022, calculating the word center vector of the preset complaint information base in the f triage dimension.
The detailed setting process of the complaint information base in step S104 will be described in detail, and the embodiment will not be described here again.
When calculating the term center vector of the complaint information base in the f-th triage dimension, the term vector database can be firstly searched for the term vector of each second term, wherein the second term is the term of each triage item in the complaint information base in the f-th triage dimension. The dialogue robot can obtain each second word by performing word segmentation processing on each diagnosis entry in the complaint information base. The specific process of the word segmentation is similar to that in step S1021, and reference may be made to the foregoing, which is not repeated here.
Then, the term center vector of the complaint information base in the f-th triage dimension can be calculated according to the following formula:
Figure BDA0002235427750000071
wherein n is the number of each second word, and 1 is less than or equal toN is less than or equal to N, N is the total number of the second words, wordVec n Is the word vector of the nth second word, and WordVec n =(elem n,1 ,elem n,2 ,...,elem n,d ,...,elem n,D ) D is the element number in the word vector, D is 1-D, D is the total number of elements in each word vector, elem n,d And CtVec is the term center vector of the complaint information base in the f triage dimension for the d element in the term vector of the n second term.
Step S1023, selecting a preferred word from the first words according to the word vector of the first words and the word center vector.
Specifically, the distance between the word vector of each first word and the word center vector may be calculated first according to the following formula:
Figure BDA0002235427750000081
wherein M is the serial number of each first word, M is more than or equal to 1 and less than or equal to M, M is the total number of the first words, ansWdVec m Is the word vector of the mth first word, and AnsWdVec m =(AnsElm m,1 ,AnsElm m,2 ,...,AnsElm m,d ,...,AnsElm m,D ),AnsElm m,d AnsDis, the d element in the word vector of the m first word m Is the distance between the word vector of the mth first word and the word center vector.
Then, the preferred word is selected from the first words according to the following formula:
SelSeq=argmin(AnsDis 1 ,AnsDis 2 ,...,AnsDis m ,...,AnsDis M )
wherein argmin is the minimum argument function and SelSeq is the sequence number of the preferred word. As can be seen from this equation, the distance between the word vector of the preferred word and the word center vector is minimal.
And step S1024, if the distance between the word vector of the preferred word and the word center vector is smaller than the preset maximum offset distance, determining the preferred word as the complaint information of the user in the f triage dimension.
Wherein the maximum offset distance may be set according to the following procedure:
first, the distance between the word vector of each second word and the word center vector is calculated according to the following formula:
Figure BDA0002235427750000082
wherein VecDis n Is the distance between the word vector of the nth second word and the word center vector.
The maximum offset distance may then be calculated according to the following equation:
MaxDis=Max(VecDis 1 ,VecDis 2 ,...,VecDis n ,...,VecDis N )
wherein, max is the maximum function and MaxDis is the maximum offset distance.
If the distance between the word vector of the preferred word and the word center vector is smaller than the maximum offset distance, the preferred word can be determined as complaint information of the user in the f-th triage dimension. If the distance between the word vector of the preferred word and the word center vector is greater than or equal to the maximum offset distance, the fact that the complaint information of the user in the f-th triage dimension cannot be determined according to the dialogue statement of the user in the f-th triage dimension is indicated, and at this time, the f-th dialogue can be repeated until the complaint information of the user in the f-th triage dimension can be determined.
Step S103, constructing the complaint information of the user in each triage dimension as a complaint information set of the user.
For example, if the complaint information of the user in the sub-diagnosis dimension of the uncomfortable portion is "face", the complaint information of the user in the sub-diagnosis dimension of the main symptom is "edema", and the complaint information of the user in the sub-diagnosis dimension of the accompanying symptom is "emaciation", the complaint information set shown below may be constructed: { uncomfortable site: facial, main symptoms: edema, with symptoms: emaciation }.
Step S104, the matching degree between the main complaint information set of the user and each triage item in the preset main complaint information base is calculated respectively.
The complaint information base may be preset according to the procedure shown in fig. 3:
step S1041, obtaining each history record from a preset database.
In this embodiment, the database may store a database of history records for each hospital, where each history record includes a history dialogue statement and a corresponding department, each history dialogue statement is a self-description of a patient's own illness state, and the corresponding department is a department that ultimately visits the patient.
In order to improve the accuracy of the complaint information base, the history records should be collected as much as possible, and the total number of the history records is ensured to exceed a certain threshold, and the threshold can be set according to practical situations, for example, the threshold can be set to be ten thousand, twenty thousand, fifty thousand or other values.
Step S1042, dividing each history dialogue sentence into groups according to the corresponding departments.
As shown in fig. 4, the conversation robot may divide each historical conversation sentence into groups according to corresponding departments, including but not limited to: endocrinology, dermatology, neurology, stomatology, ophthalmology, otorhinolaryngology, oncology, hepatobiliary surgery, gastroenterology, orthopedics, gynecology, and the like.
Step S1043, respectively extracting information of each historical dialogue sentence in each group to obtain the complaint information of each group in each triage dimension.
For example, if a certain historical dialog sentence is: after the information is extracted, the complaint information of the uncomfortable part in the triage dimension is called abdomen, the complaint information of the main symptom in the triage dimension is called pain, and the complaint information of the accompanying symptom in the triage dimension is called dizziness and nausea. Traversing all the historical dialogue sentences to obtain the complaint information of each group in each triage dimension.
Step S1044, frequency statistics is performed on the complaint information of each group in each triage dimension, and the complaint information with frequency higher than a preset threshold is selected.
The threshold may be set according to the actual situation, and may be set to 1000 times, 2000 times, 5000 times, or other values, for example. Preferably, the threshold value may be set to be positively correlated with the total number of histories, i.e. the greater the total number of histories, the greater the threshold value, whereas the lesser the total number of histories, the lesser the threshold value. In a specific implementation of this embodiment, the threshold may be calculated according to the following formula: thresh=lognum×coef, where LogNum is the total number of history records, coef is a preset scaling factor, and 0< Coef <1, thresh is the threshold.
Step S1045, constructing triage items corresponding to each department according to the selected main complaint information, and combining each triage item into the main complaint information base.
Taking endocrinology as an example, if the complaint information selected in the diagnosis-dividing dimension of the uncomfortable part is "face", the complaint information selected in the diagnosis-dividing dimension of the main symptom is "edema", "rash", and the complaint information selected in the diagnosis-dividing dimension of the accompanying symptom is "emaciation", "sleep disorder", "nausea and vomiting", "abnormal urine". Then this complaint information can be structured as triage entries corresponding to endocrinology. After each department is traversed, diagnosis-dividing entries corresponding to each department are constructed, and then the diagnosis-dividing entries can be combined into the complaint information base.
And after the setting of the complaint information base is finished, the matching degree between the complaint information set of the user and each triage item in the complaint information base can be calculated respectively.
Taking the matching degree between the main complaint information set of the user and the t (t is more than or equal to 1 and less than or equal to TN, TN is the total number of triage items) in the main complaint information library as an example, the matching degree between the main complaint information set of the user and the t triage items in the main complaint information library can be according to the following formula:
Figure BDA0002235427750000111
DimDeg t,f =Max(WdDeg t,f,1 ,WdDeg t,f,2 ,...,WdDeg t,f,w ,...,WdDeg t,f,WN )
WdDeg t,f,w =CosSim(InfVec f ,SdVec t,f,w )
wherein Para f Is a preset coefficient, para f >0, and
Figure BDA0002235427750000112
DimDeg t,f as a first intermediate variable, wdDeg t,f,w For the second intermediate variable, max is the maximum function, infVec f For the term vector of the complaint information set in the f triage dimension, sdVec t,f,w For the word vector of the w-th word of the t-th triage item in the complaint information base in the f-th triage dimension, w is more than or equal to 1 and less than or equal to WN, WN is the total number of words of the t-th triage item in the complaint information base in the f-th triage dimension, cosSim (InfVec f ,SdVec t,f,w ) Is InfVec f And SdVec t,f,w Cosine similarity between MatDeg t And matching degree between the main complaint information set of the user and the t-th triage item in the main complaint information base.
Step 105, recommending the department corresponding to the preferred triage item to the user.
The preferred triage entry is a triage entry corresponding to the maximum matching degree, namely:
BestDiv=argmax(MatDeg 1 ,MatDeg 2 ,...,MatDeg t ,...,MatDeg TN )
wherein argmax is the maximum argument function and BestDiv is the serial number of the preferred triage entry.
Preferably, after recommending the department corresponding to the preferred triage item to the user, the user can also be subjected to position navigation, so as to guide the user to visit the department. Specifically, a first position and a second position may be obtained first, where the first position is a current position of the dialogue robot, and the second position is a position of a department corresponding to the preferred triage entry. Then, traversing each path from the first position to the second position in a preset electronic map, and selecting one path with the shortest distance as a preferred path. And finally, displaying the preferred path on a preset man-machine interaction interface. Thus, the user can smoothly go to the corresponding department for treatment according to the guidance of the preferred path.
In summary, after receiving a triage request instruction issued by a user, the dialogue robot in the embodiment of the present application performs a plurality of rounds of dialogue with the user according to a preset dialogue flow, obtains dialogue sentences of the user in each round of dialogue, then determines, according to the dialogue sentences of the user in each round of dialogue, complaint information of the user in each preset triage dimension respectively, constructs the complaint information of the user in each triage dimension as a complaint information set of the user, then calculates a matching degree between the complaint information set of the user and each triage item in a preset main complaint information library respectively, and finally uses a triage item corresponding to the matching degree obtained as a preferred triage item, and recommends a department corresponding to the preferred triage item to the user. According to the embodiment of the application, the conversation robot can acquire the complaint information on each triage dimension only through a plurality of rounds of conversations, the triage time is greatly shortened, and a reliable basis is provided for triage through the calculation of the matching degree of each triage item in the complaint information base, so that the most suitable department can be selected according to the matching degree and recommended to a user, and the triage accuracy is greatly improved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not limit the implementation process of the embodiment of the present application in any way.
Corresponding to the diagnosis method based on the dialogue robot described in the above embodiments, fig. 5 shows a block diagram of an embodiment of the diagnosis device based on the dialogue robot provided in the embodiment of the application. The device is applied to a preset conversation robot, and can comprise:
the dialogue sentence acquisition module 501 is configured to perform an F-round dialogue with a user according to a preset dialogue flow after receiving a triage request instruction issued by the user, and acquire dialogue sentences of the user in each round of dialogue, where F is a positive integer;
a main complaint information determining module 502, configured to determine main complaint information of the user in each preset triage dimension according to dialogue sentences of the user in each round of dialogue;
a complaint information set constructing module 503, configured to construct complaint information of the user in each triage dimension as a complaint information set of the user;
the matching degree calculating module 504 is configured to calculate matching degrees between the user's complaint information set and each triage entry in a preset complaint information base;
the department recommendation module 505 is configured to recommend a department corresponding to a preferred triage entry to the user, where the preferred triage entry is a triage entry corresponding to the matching degree that is the largest.
Further, the complaint information determining module may include:
the first word vector query unit is used for respectively querying word vectors of first words in a preset word vector database, wherein the first words are words forming dialogue sentences of the user in an F-th dialogue, and the word vector database is a database for recording the corresponding relation between the words and the word vectors, and F is more than or equal to 1 and less than or equal to F;
the center vector calculation unit is used for calculating the word center vector of the complaint information base in the f triage dimension;
the optimized word selecting unit is used for selecting optimized words from the first words according to the word vectors of the first words and the word center vector;
and the complaint information determining unit is used for determining the preferred word as the complaint information of the user in the f triage dimension if the distance between the word vector of the preferred word and the word center vector is smaller than the preset maximum offset distance.
Further, the center vector calculation unit may include:
the second word vector query subunit is used for respectively querying word vectors of second words in the word vector database, wherein the second words are words of each triage entry in the complaint information base in the f triage dimension;
the central vector calculation operator unit is used for calculating the word central vector of the complaint information base in the f triage dimension according to the following steps:
Figure BDA0002235427750000131
wherein N is the number of each second word, N is 1-N, N is the total number of the second words, and WordVec n Is the word vector of the nth second word, and WordVec n =(elem n,1 ,elem n,2 ,...,elem n,d ,...,elem n,D ) D is the element number in the word vector, D is 1-D, D is the total number of elements in each word vector, elem n,d And CtVec is the term center vector of the complaint information base in the f triage dimension for the d element in the term vector of the n second term.
Further, the complaint information determining module may further include:
a distance calculating unit, configured to calculate distances between word vectors of the second words and the word center vectors according to the following formulas:
Figure BDA0002235427750000141
wherein VecDis n Is the distance between the word vector of the nth second word and the word center vector;
a maximum offset distance calculation unit for calculating the maximum offset distance according to the following formula:
MaxDis=Max(VecDis 1 ,VecDis 2 ,...,VecDis n ,...,VecDis N )
wherein, max is the maximum function and MaxDis is the maximum offset distance.
Further, the preferred word selecting unit may include:
a distance calculating subunit, configured to calculate a distance between a word vector of each first word and the word center vector according to the following formula:
Figure BDA0002235427750000142
wherein M is the serial number of each first word, M is more than or equal to 1 and less than or equal to M, M is the total number of the first words, ansWdVec m Is the word vector of the mth first word, and AnsWdVec m =(AnsElm m,1 ,AnsElm m,2 ,...,AnsElm m,d ,...,AnsElm m,D ),AnsElm m,d AnsDis, the d element in the word vector of the m first word m Is the distance between the word vector of the mth first word and the word center vector;
a preferred word selecting subunit, configured to select the preferred word from the first words according to the following formula:
SelSeq=argmin(AnsDis 1 ,AnsDis 2 ,...,AnsDis m ,...,AnsDis M )
wherein argmin is the minimum argument function and SelSeq is the sequence number of the preferred word.
Further, the apparatus may further include:
the history acquisition module is used for acquiring each history record from a preset database, wherein each history record comprises a history dialogue statement and a corresponding department;
the group dividing module is used for dividing each historical dialogue statement into groups according to the corresponding departments;
the information extraction module is used for extracting information of each historical dialogue statement in each group respectively to obtain main complaint information of each group in each triage dimension;
the frequency statistics module is used for carrying out frequency statistics on the complaint information of each group in each triage dimension respectively, and selecting the complaint information with the frequency higher than a preset threshold value;
and the main complaint information base construction module is used for constructing diagnosis items corresponding to each department according to the selected main complaint information and combining each diagnosis item into the main complaint information base.
Further, the apparatus may further include:
the position acquisition module is used for acquiring a first position and a second position, wherein the first position is the current position of the dialogue robot, and the second position is the position of a department corresponding to the preferred triage item;
the optimal path selection module is used for traversing each path from the first position to the second position in a preset electronic map and selecting one path with the shortest distance as an optimal path;
and the path display module is used for displaying the preferred path on a preset man-machine interaction interface.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described apparatus, modules and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Fig. 6 shows a schematic block diagram of a robot provided in an embodiment of the present application, and for convenience of explanation, only a portion related to the embodiment of the present application is shown.
In this embodiment, the robot 6 may include: a processor 60, a memory 61 and computer readable instructions 62 stored in the memory 61 and executable on the processor 60, such as computer readable instructions for performing the session robot-based triage method described above. The processor 60, when executing the computer readable instructions 62, implements the steps of the various embodiments of the conversation robot based triage method described above, such as steps S101 through S105 shown in fig. 1. Alternatively, the processor 60, when executing the computer readable instructions 62, performs the functions of the modules/units of the apparatus embodiments described above, such as the functions of modules 501-505 of fig. 5.
For example, the computer readable instructions 62 may be partitioned into one or more modules/units that are stored in the memory 61 and executed by the processor 60 to complete the present application. The one or more modules/units may be a series of computer readable instruction segments capable of performing a specific function describing the execution of the computer readable instructions 62 in the robot 6.
The processor 60 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may be an internal storage unit of the robot 6, such as a hard disk or a memory of the robot 6. The memory 61 may be an external storage device of the robot 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the robot 6. Further, the memory 61 may also include both an internal memory unit and an external memory device of the robot 6. The memory 61 is used for storing the computer readable instructions as well as other instructions and data required by the robot 6. The memory 61 may also be used for temporarily storing data that has been output or is to be output.
The functional units in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution contributing to the prior art or in the form of a software product stored in a storage medium, including computer readable instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing computer readable instructions.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (9)

1. A triage method based on a conversation robot, which is applied to a preset conversation robot, the method comprising:
after receiving a triage request instruction issued by a user, carrying out F rounds of dialogue with the user according to a preset dialogue flow, and acquiring dialogue sentences of the user in each round of dialogue, wherein F is a positive integer;
respectively determining the main complaint information of the user in each preset triage dimension according to the dialogue sentences of the user in each round of dialogue;
constructing the complaint information of the user in each triage dimension as a complaint information set of the user;
respectively calculating the matching degree between the main complaint information set of the user and each triage item in a preset main complaint information base;
recommending a department corresponding to a preferred triage entry to the user, wherein the preferred triage entry is a triage entry corresponding to the matching degree which is the maximum value;
the step of respectively determining the complaint information of the user in each preset triage dimension according to the dialogue sentences of the user in each round of dialogue comprises the following steps:
respectively inquiring word vectors of first words in a preset word vector database, wherein the first words are words forming dialogue sentences of the user in an F-th dialogue, and the word vector database is a database for recording the corresponding relation between the words and the word vectors, and F is more than or equal to 1 and less than or equal to F;
calculating a word center vector of the complaint information base in the f triage dimension;
selecting a preferred word from each first word according to the word vector of each first word and the word center vector; wherein the distance between the word vector of the preferred word and the word center vector is the shortest;
and if the distance between the word vector of the preferred word and the word center vector is smaller than the preset maximum offset distance, determining the preferred word as complaint information of the user in the f triage dimension.
2. The conversation robot-based triage method of claim 1 wherein the computing a term center vector of the complaint information base in an f-th triage dimension comprises:
respectively inquiring word vectors of second words in the word vector database, wherein the second words are words of each triage item in the main complaint information base in the f triage dimension;
calculating a word center vector of the complaint information base in the f triage dimension according to the following steps:
Figure FDA0004065928170000021
wherein N is the number of each second word, N is 1-N, N is the total number of the second words, and WordVec n Is the word vector of the nth second word, and WordVec n =(elem n,1 ,elem n,2 ,...,elem n,d ,...,elem n,D ) D is the element number in the word vector, D is 1-D, D is the total number of elements in each word vector, elem n,d And CtVec is the term center vector of the complaint information base in the f triage dimension for the d element in the term vector of the n second term.
3. The conversation robot based triage method of claim 2 wherein the setting of the maximum offset distance comprises:
calculating the distance between the word vector of each second word and the word center vector according to the following steps:
Figure FDA0004065928170000022
wherein VecDis n Is nth (n)A distance between a word vector of a two-word and the word center vector;
calculating the maximum offset distance according to the following formula:
MaxDis=Max(VecDis 1 ,VecDis 2 ,...,VecDis n ,...,VecDis N )
wherein, max is the maximum function and MaxDis is the maximum offset distance.
4. The conversation robot based triage method of claim 2 wherein the selecting a preferred word from each first word based on the word vector of each first word and the word center vector comprises:
the distance between the word vector of each first word and the word center vector is calculated according to the following steps:
Figure FDA0004065928170000031
wherein M is the serial number of each first word, M is more than or equal to 1 and less than or equal to M, M is the total number of the first words, ansWdVec m Is the word vector of the mth first word, and AnsWdVec m =(AnsElm m,1 ,AnsElm m,2 ,...,AnsElm m,d ,...,AnsElm m,D ),AnsElm m,d AnsDis, the d element in the word vector of the m first word m Is the distance between the word vector of the mth first word and the word center vector;
selecting the preferred word from the first words according to the following formula:
SelSeq=argmin(AnsDis 1 ,AnsDis 2 ,...,AnsDis m ,...,AnsDis M )
wherein argmin is the minimum argument function and SelSeq is the sequence number of the preferred word.
5. The conversation robot based triage method of claim 1 wherein the setting process of the complaint information base comprises:
acquiring each history record from a preset database, wherein each history record comprises a history dialogue statement and a corresponding department;
dividing each historical dialogue statement into groups according to corresponding departments;
respectively extracting information from each historical dialogue sentence in each group to obtain main complaint information of each group in each triage dimension;
frequency statistics is carried out on the complaint information of each group in each triage dimension, and the complaint information with the frequency higher than a preset threshold value is selected;
and constructing triage items corresponding to each department according to the selected main complaint information, and combining each triage item into the main complaint information base.
6. The conversation robot based triage method of any one of claims 1 to 5 further comprising, after recommending the department corresponding to the preferred triage entry to the user:
acquiring a first position and a second position, wherein the first position is the current position of the dialogue robot, and the second position is the position of a department corresponding to the preferred triage item;
traversing each path from the first position to the second position in a preset electronic map, and selecting one path with the shortest distance as a preferred path;
and displaying the preferred path on a preset man-machine interaction interface.
7. A triage device based on a conversation robot, which is applied to a preset conversation robot, the device comprising:
the dialogue sentence acquisition module is used for carrying out F rounds of dialogue with the user according to a preset dialogue flow after receiving a triage request instruction issued by the user, and acquiring dialogue sentences of the user in each round of dialogue, wherein F is a positive integer;
the main complaint information determining module is used for respectively determining main complaint information of the user in each preset triage dimension according to dialogue sentences of the user in each round of dialogue;
the main complaint information set construction module is used for constructing main complaint information of the user in each triage dimension as a main complaint information set of the user;
the matching degree calculation module is used for calculating the matching degree between the main complaint information set of the user and each triage item in the preset main complaint information base respectively;
the department recommendation module is used for recommending departments corresponding to the preferred triage items to the users, wherein the preferred triage items are triage items corresponding to the maximum matching degree;
the complaint information determining module includes:
the first word vector query unit is used for respectively querying word vectors of first words in a preset word vector database, wherein the first words are words forming dialogue sentences of the user in an F-th dialogue, and the word vector database is a database for recording the corresponding relation between the words and the word vectors, and F is more than or equal to 1 and less than or equal to F;
the center vector calculation unit is used for calculating the word center vector of the complaint information base in the f triage dimension;
the optimized word selecting unit is used for selecting optimized words from the first words according to the word vectors of the first words and the word center vector; wherein the distance between the word vector of the preferred word and the word center vector is the shortest;
and the complaint information determining unit is used for determining the preferred word as the complaint information of the user in the f triage dimension if the distance between the word vector of the preferred word and the word center vector is smaller than the preset maximum offset distance.
8. A computer readable storage medium storing computer readable instructions, which when executed by a processor, implement the steps of the conversation robot based triage method of any one of claims 1 to 6.
9. A robot comprising a memory, a processor and computer readable instructions stored in the memory and executable on the processor, wherein the processor, when executing the computer readable instructions, implements the steps of the dialogue-based robot triage method according to any one of claims 1 to 6.
CN201910981777.3A 2019-10-16 2019-10-16 Diagnosis method and device based on dialogue robot, storage medium and robot Active CN110838359B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910981777.3A CN110838359B (en) 2019-10-16 2019-10-16 Diagnosis method and device based on dialogue robot, storage medium and robot
PCT/CN2020/092897 WO2021073110A1 (en) 2019-10-16 2020-05-28 Chatbot-based triage method and apparatus, storage medium and robot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910981777.3A CN110838359B (en) 2019-10-16 2019-10-16 Diagnosis method and device based on dialogue robot, storage medium and robot

Publications (2)

Publication Number Publication Date
CN110838359A CN110838359A (en) 2020-02-25
CN110838359B true CN110838359B (en) 2023-07-07

Family

ID=69575241

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910981777.3A Active CN110838359B (en) 2019-10-16 2019-10-16 Diagnosis method and device based on dialogue robot, storage medium and robot

Country Status (2)

Country Link
CN (1) CN110838359B (en)
WO (1) WO2021073110A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110838359B (en) * 2019-10-16 2023-07-07 平安科技(深圳)有限公司 Diagnosis method and device based on dialogue robot, storage medium and robot
CN111584050B (en) * 2020-04-29 2023-05-30 广州市妇女儿童医疗中心(广州市妇幼保健院、广州市儿童医院、广州市妇婴医院、广州市妇幼保健计划生育服务中心) Jaundice diagnosis information processing method and device, computer equipment and storage medium
CN112016318B (en) * 2020-09-08 2023-11-21 平安科技(深圳)有限公司 Triage information recommendation method, device, equipment and medium based on interpretation model
CN113223735A (en) * 2021-04-30 2021-08-06 平安科技(深圳)有限公司 Triage method, device and equipment based on session representation and storage medium
CN114969306B (en) * 2022-05-31 2024-04-05 平安科技(深圳)有限公司 Training method, device, equipment and storage medium of medical information recommendation model
CN116779087B (en) * 2023-08-18 2023-11-07 江苏臻云技术有限公司 Automatic data management system and method based on AI engine

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108766545A (en) * 2018-05-31 2018-11-06 平安医疗科技有限公司 Online interrogation section office distribution method, device, computer equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109147930A (en) * 2017-06-28 2019-01-04 京东方科技集团股份有限公司 Divide and examines dialogue method, divides and examine conversational device and system
CN109065129A (en) * 2018-07-04 2018-12-21 平安科技(深圳)有限公司 Department's recommended method, device, computer equipment and storage medium
CN109741824B (en) * 2018-12-21 2023-08-04 质直(上海)教育科技有限公司 Medical inquiry method based on machine learning
CN110246572B (en) * 2019-05-05 2021-07-13 清华大学 Word vector-based medical triage method and system
CN110289093A (en) * 2019-05-30 2019-09-27 合肥阿拉丁智能科技有限公司 Medical interrogation Intelligent dialogue system engine
CN110838359B (en) * 2019-10-16 2023-07-07 平安科技(深圳)有限公司 Diagnosis method and device based on dialogue robot, storage medium and robot

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108766545A (en) * 2018-05-31 2018-11-06 平安医疗科技有限公司 Online interrogation section office distribution method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
WO2021073110A1 (en) 2021-04-22
CN110838359A (en) 2020-02-25

Similar Documents

Publication Publication Date Title
CN110838359B (en) Diagnosis method and device based on dialogue robot, storage medium and robot
US20180322954A1 (en) Method and device for constructing medical knowledge graph and assistant diagnosis method
CN110032728B (en) Conversion method and device for disease name standardization
US11670420B2 (en) Drawing conclusions from free form texts with deep reinforcement learning
CN110675944A (en) Triage method and device, computer equipment and medium
KR102424085B1 (en) Machine-assisted conversation system and medical condition inquiry device and method
CN112016295B (en) Symptom data processing method, symptom data processing device, computer equipment and storage medium
CN109493979A (en) A kind of disease forecasting method and apparatus based on intelligent decision
CN109726819B (en) Method and device for realizing event reasoning
WO2019227716A1 (en) Method for generating influenza prediction model, apparatus, and computer readable storage medium
CN111933291A (en) Medical information recommendation device, method, system, equipment and readable storage medium
US20180151254A1 (en) High-speed similar case search method and device through reduction of large scale multi-dimensional time series health data to multiple dimensions
WO2021151302A1 (en) Drug quality-control analysis method, apparatus, device, and medium based on machine learning
CN111128391A (en) Information processing apparatus, method and storage medium
CN112885478A (en) Medical document retrieval method, medical document retrieval device, electronic device, and storage medium
CN115497616A (en) Method, system, equipment and storage medium for aid decision making of infectious diseases
CN113724814A (en) Diagnosis method, diagnosis device, calculation equipment and storage medium
CN115221941A (en) Cognitive disorder detection method and related device, electronic equipment and storage medium
WO2021174923A1 (en) Concept word sequence generation method, apparatus, computer device, and storage medium
CN114758742A (en) Medical record information processing method and device, electronic equipment and storage medium
WO2020186458A1 (en) Problem generation method and apparatus, inquiry system, and computer-readable storage medium
WO2020132918A1 (en) Method and device for pharmaceutical forecasting, computer device, and storage medium
Xue et al. Perioperative predictions with interpretable latent representation
CN112635050B (en) Diagnosis recommendation method, electronic equipment and storage device
WO2021052150A1 (en) Radiation therapy plan recommendation method and apparatus, electronic device, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40020272

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant