CN114913995A - Self-service diagnosis method, device, equipment and storage medium - Google Patents
Self-service diagnosis method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN114913995A CN114913995A CN202210547326.0A CN202210547326A CN114913995A CN 114913995 A CN114913995 A CN 114913995A CN 202210547326 A CN202210547326 A CN 202210547326A CN 114913995 A CN114913995 A CN 114913995A
- Authority
- CN
- China
- Prior art keywords
- patient
- message
- doctor
- target
- diagnosis
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H80/00—ICT specially adapted for facilitating communication between medical practitioners or patients, e.g. for collaborative diagnosis, therapy or health monitoring
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- Biomedical Technology (AREA)
- Medical Informatics (AREA)
- Theoretical Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Biophysics (AREA)
- Molecular Biology (AREA)
- Primary Health Care (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Epidemiology (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Public Health (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Pathology (AREA)
- Medical Treatment And Welfare Office Work (AREA)
Abstract
The application relates to the technical field of artificial intelligence, and discloses a self-service diagnosis method, a self-service diagnosis device, self-service diagnosis equipment and a storage medium, wherein the method comprises the following steps: when a patient consultation request is received, establishing communication connection with a target patient terminal, and sending a preset inquiry message to the target patient terminal to guide a target patient to reply a message; when receiving the patient information, recording the times of receiving the patient information as doctor-patient inquiry times; when the inquiry times of the doctors and the patients do not reach the preset times, acquiring a doctor response message corresponding to the patient message according to a pre-trained doctor response model, and sending the doctor response message to a target patient terminal to guide the target patient to continuously reply the message; integrating each patient message and doctor response message to obtain target conversation information when the doctor-patient inquiry times reach the preset times; and determining a model according to the pre-trained diagnosis and treatment result to obtain a target diagnosis and treatment result corresponding to the target dialogue information, and sending the target diagnosis and treatment result to the target patient terminal.
Description
Technical Field
The application relates to the technical field of artificial intelligence, in particular to a self-service diagnosis method, a self-service diagnosis device, self-service diagnosis equipment and a storage medium.
Background
At present, in the process of doctor-patient diagnosis and treatment, a doctor still makes manual conversation with a patient to perform inquiry, the doctor needs to make multi-directional inquiry according to the existing symptoms, historical symptoms, examination results, disease evolution and other processes of the patient, and then diagnoses according to pathological development, so that diagnosis and treatment results can be finally obtained. In addition, the patients need to spend a lot of time to go to the hospital and register and queue, resulting in low efficiency of patient treatment.
Disclosure of Invention
The application mainly aims to provide a self-service treatment method, a self-service treatment device, self-service treatment equipment and a storage medium, and aims to solve the problem of low treatment efficiency of patients in the prior art.
In a first aspect, the present application provides a self-service medical consultation method, including:
when a patient consultation request is received, establishing full-duplex communication connection with a target patient terminal according to the patient consultation request, and sending a preset inquiry message to the target patient terminal to guide a target patient to reply a message through the target patient terminal;
when receiving a patient message sent from the target patient terminal, recording the number of times of receiving the patient message as the number of doctor-patient queries;
when the doctor-patient inquiry times do not reach the preset times, acquiring a doctor response message corresponding to the patient message according to a pre-trained doctor response model, and sending the doctor response message to the target patient terminal to guide the target patient to continuously reply the message;
when the doctor-patient inquiry times reach the preset times, integrating the patient messages and the doctor response messages to obtain target conversation information;
and determining a model according to the pre-trained diagnosis and treatment result to obtain a target diagnosis and treatment result corresponding to the target dialogue information, and sending the target diagnosis and treatment result to the target patient terminal.
In a second aspect, the present application further provides a self-service medical treatment device, comprising:
the query request processing module is used for establishing full-duplex communication connection with a target patient terminal according to a patient consultation request when the patient consultation request is received, and sending a preset query message to the target patient terminal so as to guide a target patient to reply the message through the target patient terminal;
the inquiry message receiving module is used for recording the times of receiving the patient messages as doctor-patient inquiry times when the patient messages sent from the target patient terminal are received;
the inquiry message reply module is used for acquiring a doctor response message corresponding to the patient message according to a pre-trained doctor response model when the doctor-patient inquiry times do not reach the preset times, and sending the doctor response message to the target patient terminal so as to guide the target patient to continue replying the message;
the dialogue message processing module is used for integrating each patient message and each doctor response message to obtain target dialogue information when the doctor-patient inquiry times reach the preset times;
and the diagnosis and treatment result output module is used for obtaining a target diagnosis and treatment result corresponding to the target dialogue information according to the pre-trained diagnosis and treatment result determination model and sending the target diagnosis and treatment result to the target patient terminal.
In a third aspect, the present application further provides a computer device, which includes a processor, a memory, and a computer program stored on the memory and executable by the processor, wherein the computer program, when executed by the processor, implements the steps of the self-service visit method as described above.
In a fourth aspect, the present application further provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the self-service visit method as described above.
The application provides a self-service diagnosis method, a self-service diagnosis device, self-service diagnosis equipment and a self-service diagnosis storage medium, wherein when a patient message sent by a target patient terminal is received, a doctor response message corresponding to the patient message is obtained according to a pre-trained doctor response model, and the doctor response message is sent to the target patient terminal, so that intelligent response of the patient message is realized; in the process of intelligent response of a patient, patient information and doctor response information are integrated to obtain doctor-patient dialogue information, and the doctor-patient dialogue information is processed by utilizing a pre-trained diagnosis and treatment result determination model, so that a diagnosis and treatment result can be given. Through the technical scheme that this application provided, realized carrying out intelligent dialogue and giving according to the dialogue condition and diagnosing the result with the patient through artifical intelligent mode.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart illustrating steps of a self-service medical examination method according to an embodiment of the present disclosure;
fig. 2 is a schematic block diagram of a self-service medical treatment device provided in an embodiment of the present application;
fig. 3 is a schematic block diagram of a structure of a computer device according to an embodiment of the present disclosure.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
The technical solutions in 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 obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
The flow diagrams depicted in the figures are merely illustrative and do not necessarily include all of the elements and operations/steps, nor do they necessarily have to be performed in the order depicted. For example, some operations/steps may be decomposed, combined or partially combined, so that the actual execution sequence may be changed according to the actual situation. In addition, although the division of the functional blocks is made in the device diagram, in some cases, it may be divided in blocks different from those in the device diagram.
The embodiment of the application provides a self-service diagnosis method, a self-service diagnosis device, self-service diagnosis equipment and a storage medium. The method can be applied to terminal equipment or a server, wherein the terminal equipment can be electronic equipment such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant and wearable equipment; the server may be a single server or a server cluster including a plurality of servers. The following explanation will be given taking the application of the method to a server as an example.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating steps of a self-service medical examination method according to an embodiment of the present disclosure.
As shown in fig. 1, the self-service medical consultation method comprises steps S10 to S14.
Step S10, when a patient consultation request is received, establishing full-duplex communication connection with a target patient terminal according to the patient consultation request, and sending a preset inquiry message to the target patient terminal to guide a target patient to reply a message through the target patient terminal.
In some embodiments, when the main body of execution of the self-service visit method is a server, the patient consultation request may be a network request sent by the target patient through the target patient terminal; when the execution main body of the self-service diagnosis method is the terminal device, the patient consultation request can be a message instruction which is received by the terminal device and sent from the server, wherein the message instruction is a message instruction which is generated and sent to the execution main body according to the received network request and is sent by the server as a transfer station for network request processing after the target patient sends the network request to the server through the target patient terminal, and at the moment, the message instruction can be an instruction in the forms of remote push notification, short message, mail and the like. In addition, the patient consultation request may be other types of instructions, and is not limited herein.
It can be understood that the patient consultation request carries the device identification information of the target patient terminal, and after the full-duplex communication connection is established with the target device terminal according to the device identification information, the execution main body of the method and the target patient terminal can send and receive chat messages to each other.
The preset inquiry message is used for calling the target patient and guiding the target patient to reply the message. For example, the preset query message may be set as a guidance message such as "you are asking what can help you".
It is understood that a doctor response model for an intelligent session with a target patient and a diagnosis result determination model for obtaining a diagnosis result according to the session need to be trained before a patient consultation request is received.
In some embodiments, before establishing a full duplex communication connection with a target patient terminal according to a patient consultation request when the patient consultation request is received, the method further includes:
acquiring historical doctor-patient dialogue information and historical diagnosis and treatment results corresponding to the historical doctor-patient dialogue information;
labeling the historical doctor-patient conversation information to obtain historical conversation labeling information;
training a preset first language model according to the historical dialogue labeling information to obtain the doctor response model;
and training a preset second language model according to the historical dialogue labeling information and the historical diagnosis and treatment result to obtain the diagnosis and treatment result determination model.
It can be understood that the historical doctor-patient dialogue information records the speech messages of the doctor and the patient in the inquiry process, and the historical diagnosis and treatment results are the diagnosis and treatment results given by the doctor according to the feedback condition of the patient in the inquiry process. And obtaining historical dialogue labeling information after the speaker labeled with each speech message is a doctor or a patient.
In some embodiments, the first language model is a GPT-2 (Generation Pre-Training 2.0) model and the second language model is a GPT (Generation Pre-Training) model.
The doctor response model trained on the basis of the GPT-2 model and the diagnosis and treatment result determination model trained on the basis of the GPT model can generate an output text according to the input text.
The first language model is trained by using the labeled historical dialogue labeling information, so that the first language model can better understand the dialogue characteristics of doctors and patients under different roles, and the first language model can effectively simulate the inquiry step of inquiring the patient by the doctors. The finally trained doctor response model can generate a doctor reply message which is more in line with the doctor inquiry scene.
And the second language model is trained by using the labeled historical dialogue labeling information and the historical diagnosis and treatment results, so that the second language model can better learn how to obtain the diagnosis and treatment results according to the inquiry dialogue process of the patient and the doctor. The finally obtained diagnosis and treatment result determination model can simulate the diagnosis process of a doctor, and intelligent diagnosis of the disease of the patient is realized.
Based on the distinguishing characteristics of the GPT model and the GPT-2 model, compared with the GPT-2 model, the GPT model is used as the second language model for training, and the diagnosis and treatment result determination model can better generate the diagnosis and treatment result of the patient according to the whole inquiry dialogue process.
Furthermore, a plurality of historical dialogue labeling information used for training the first language model can be provided, and the more training data, the better the training effect of the first language model is; similarly, the historical dialogue labeling information and the historical diagnosis and treatment results used for training the second language model can be in multiple groups, and the more training data, the better the training effect of the second language model.
In some embodiments, the history doctor-patient conversation information includes a plurality of speaking messages, and the annotating the history doctor-patient conversation information to obtain history conversation annotation information includes:
acquiring the message transmitting and receiving type of the speaking message, and judging whether the speaking message is a doctor end message or not according to the message transmitting and receiving type;
when the speech message is a doctor end message, acquiring preset doctor identification characters and splicing the speech message to obtain a doctor speech message;
when the speech message is a patient-side message, acquiring preset patient identification characters and performing splicing processing on the speech message to obtain a patient speech message;
sequencing the doctor speech messages and the patient speech messages according to the message time to obtain historical conversation labeling information.
It can be understood that the method is applied to the doctor side, and whether the speaking message is the doctor side message or the patient side message can be determined according to the message sending and receiving type of the speaking message. Specifically, when the message sending and receiving type of the speech message is the message receiving type, the speech message is a patient-side message; and when the message sending and receiving type of the speaking message is the message sending type, the speaking message is the doctor side message.
In addition, each speaking message has a message time for representing the message sending time, and the speaking messages of all doctors and the speaking messages of all patients are sorted according to the message time of each speaking message, so that a complete and coherent doctor-patient conversation, namely historical conversation labeling information, can be obtained.
In some embodiments, the preset doctor identification character may be set to "[ sector ]", and the preset patient identification character may be set to "[ patient ]", so long as the doctor identification character and the patient identification character are different. In addition, the doctor identification character and the patient identification character can be set as other characters according to the situation, and the method is not limited herein.
Illustratively, assume that the physician identification character is "[ factor ]", and that the patient identification character is "[ patient ]". Suppose the talk message "do you cough? "is a doctor-side message, and after the splicing processing, the obtained doctor utterance message is" [ sector ] you cough? ". Similarly, assuming that the speech message "i cough frequently now and feel very itchy in throat" is a patient-side message, after the concatenation processing, the obtained patient speech message is "[ patient ] i cough frequently now and feel very itchy in throat".
In some embodiments, the training a preset first language model according to the historical dialog labeling information to obtain the doctor response model includes:
extracting multiple groups of associated dialog information from the historical dialog marking information, wherein the associated dialog information comprises a first speech message and a second speech message which is continuous to the first speech message, and the first speech message and the second speech message have different message sending and receiving types;
and taking the first speech message as an encoding input parameter of the first language model, and taking the second speech message as a decoding input parameter of the first language model, and training the first language model to obtain the doctor response model.
It can be understood that there is an association relationship between the first speech message and the second speech message in the associated dialog information, and the speech roles of the first speech message and the second speech message are different, for example, assuming that the first speech message a is a message sent by the patient, the second speech message B is a response message made by the doctor according to the first speech message a.
And training the first language model by taking the first speech message as an encoding input parameter of the first language model and taking the second speech message as a decoding input parameter of the first language model, wherein the obtained doctor response model has the capability of generating a response message according to the input speech message.
In some embodiments, the training a preset second language model according to the historical dialogue labeling information and the historical diagnosis and treatment result to obtain the diagnosis and treatment result determination model includes:
splicing each speaking message in the historical dialogue labeling information according to the message time to obtain a historical dialogue splicing result;
and taking the historical dialogue splicing result as a coding input parameter of the second language model, taking the historical diagnosis and treatment result as a decoding input parameter of the second language model, and training the second language model to obtain the diagnosis and treatment result determination model.
It can be understood that after the concatenation processing, doctor identification characters and patient identification characters are still separated between the utterances in the historical dialogue concatenation result, which enables the second language model to better understand the expression semantics of the patient and the doctor.
And training the second language model by taking the historical dialogue splicing result as a coding input parameter of the second language model and taking the historical diagnosis and treatment result as a decoding input parameter of the second language model, wherein the obtained diagnosis and treatment result determination model has the capability of outputting the diagnosis and treatment result according to the input doctor-patient dialogue information.
In some embodiments, when the second semantic model is a GPT model, the encoding input parameter is an Encoder input parameter of the second semantic model, and the decoding input parameter is a Decoder input parameter of the second semantic model.
And step S11, when the patient message sent from the target patient terminal is received, recording the times of receiving the patient message as doctor-patient inquiry times.
It is understood that after the full-duplex communication connection is established with the target patient terminal, the execution main body of the self-service diagnosis method and the target patient terminal can send messages to each other. And the received message sent by the target patient terminal is the patient message. The doctor-patient inquiry times are used for recording the times of receiving the patient messages, and the doctor-patient inquiry times are correspondingly increased once each time the patient messages are received.
And step S12, when the doctor-patient inquiry times do not reach the preset times, acquiring a doctor response message corresponding to the patient message according to a pre-trained doctor response model, and sending the doctor response message to the target patient terminal to guide the target patient to continue replying the message.
It is understood that a doctor response message corresponding to the patient message can be generated by using the previously trained doctor response model, and after the doctor response message is sent to the terminal of the target patient, the target patient can reply the message according to the received doctor response message. In this process of guiding the patient to reply to the message, relevant information of the patient, such as existing symptoms, historical symptoms, examination results, and disease evolution, can be collected.
In some embodiments, the preset number may be set to 15 or 20, or may be set to other numbers as occasion demands. It will be appreciated that the greater the preset number of settings, the more comprehensive the patient-related information can be collected.
In some embodiments, the obtaining a doctor response message corresponding to the patient message according to a pre-trained doctor response model includes:
acquiring the patient identification characters and the patient information to carry out splicing processing to obtain target patient information;
and inputting the target patient message to the doctor response model, and acquiring an output result of the doctor response model as a doctor response message.
It can be understood that if the doctor response model is obtained by training according to the historical dialogue labeling information, when the doctor response model is used for obtaining the doctor response message corresponding to the patient message, the patient identification characters are obtained first to be spliced with the patient message, and then the obtained target patient message is input into the doctor response model, so that the doctor response model can better identify the semantics of the patient message, and the doctor response message more conforming to the doctor-patient inquiry scene is output.
And step S13, integrating the patient messages and the doctor response messages to obtain target dialogue information when the doctor-patient inquiry times reach the preset times.
It is understood that when the number of doctor-patient queries reaches the preset number, it can be presumed that a sufficient number of dialogues have been performed with the patient using the doctor response model, i.e., sufficient patient information has been collected by integrating the obtained target dialog information.
And step S14, obtaining a target diagnosis and treatment result corresponding to the target dialogue information according to the pre-trained diagnosis and treatment result determination model, and sending the target diagnosis and treatment result to the target patient terminal.
It can be understood that, after the target dialogue information is input into the diagnosis and treatment result determination model, the diagnosis and treatment result determination model may extract the patient condition from the target dialogue information, and generate a corresponding diagnosis and treatment result according to the patient condition. After the target diagnosis and treatment result is sent to the target patient terminal, the target patient can refer to the target diagnosis and treatment result and adopt a proper treatment scheme.
In some embodiments, the obtaining a target diagnosis and treatment result corresponding to the target session information according to a pre-trained diagnosis and treatment result determination model includes:
acquiring the patient identification characters, and splicing the patient messages to obtain target patient-side messages;
acquiring the doctor identification characters and the doctor response message for splicing to obtain a target doctor end message;
splicing the target patient end messages and the target doctor end messages according to message time to obtain a target dialogue splicing result;
and inputting the target dialogue splicing result to the diagnosis and treatment result determining model, and acquiring an output result of the diagnosis and treatment result determining model as a target diagnosis and treatment result.
It can be understood that, when the diagnosis and treatment result determination model is obtained through historical dialogue labeling information and historical diagnosis and treatment result training, because the historical dialogue labeling information is obtained through labeling and splicing the historical diagnosis and treatment results, at this time, if the same labeling and splicing processing is performed on the target dialogue information, the obtained target dialogue splicing result is input into the diagnosis and treatment result determination model, so that the diagnosis and treatment result determination model can better understand semantics in the labeling dialogue splicing result and output a more accurate diagnosis and treatment result.
According to the self-service diagnosis method, the self-service diagnosis device, the self-service diagnosis equipment and the self-service diagnosis storage medium, when a patient message sent by a target patient terminal is received, a doctor response message corresponding to the patient message is obtained according to a pre-trained doctor response model, and the doctor response message is sent to the target patient terminal, so that intelligent response of the patient message is realized; in the process of intelligent response of a patient, patient information and doctor response information are integrated to obtain doctor-patient dialogue information, and the doctor-patient dialogue information is processed by utilizing a pre-trained diagnosis and treatment result determination model, so that a diagnosis and treatment result can be given. Through the technical scheme that this application provided, realized carrying out intelligent dialogue and giving according to the dialogue condition and diagnosing the result with the patient through artifical intelligent mode.
Referring to fig. 2, fig. 2 is a schematic block diagram of a self-service medical examination apparatus according to an embodiment of the present disclosure.
As shown in fig. 2, the self-service medical treatment device 201 includes:
an inquiry request processing module 2011, configured to, when a patient inquiry request is received, establish a full-duplex communication connection with a target patient terminal according to the patient inquiry request, and send a preset inquiry message to the target patient terminal to guide a target patient to reply a message through the target patient terminal;
a query message receiving module 2012, configured to, when receiving the patient message sent from the target patient terminal, record the number of times of receiving the patient message as a doctor-patient query number;
the inquiry message reply module 2013 is configured to, when the doctor-patient inquiry times do not reach preset times, obtain a doctor response message corresponding to the patient message according to a pre-trained doctor response model, and send the doctor response message to the target patient terminal, so as to guide the target patient to continue to reply to the message;
the dialogue message processing module 2014 is used for integrating each patient message and each doctor response message when the doctor-patient inquiry times reach the preset times to obtain target dialogue information;
the diagnosis and treatment result output module 2015 is used for obtaining a target diagnosis and treatment result corresponding to the target dialogue information according to a pre-trained diagnosis and treatment result determination model and sending the target diagnosis and treatment result to the target patient terminal.
In some embodiments, the self-service visit apparatus 201 further includes a model pre-training module 2016, where before the query request processing module 2011 establishes a full-duplex communication connection with the target patient terminal according to the patient consultation request when receiving the patient consultation request, the model pre-training module 2016 is configured to obtain historical doctor-patient conversation information and historical diagnosis and treatment results corresponding to the historical doctor-patient conversation information;
labeling the historical doctor-patient conversation information to obtain historical conversation labeling information;
training a preset first language model according to the historical dialogue labeling information to obtain the doctor response model;
and training a preset second language model according to the historical dialogue labeling information and the historical diagnosis and treatment result to obtain the diagnosis and treatment result determination model.
In some embodiments, the historical doctor-patient dialogue information includes a plurality of speech messages, and the model pre-training module 2016, when performing annotation processing on the historical doctor-patient dialogue information to obtain historical dialogue annotation information, includes:
acquiring the message transmitting and receiving type of the speaking message, and judging whether the speaking message is a doctor end message or not according to the message transmitting and receiving type;
when the speech message is a doctor end message, acquiring preset doctor identification characters and splicing the speech message to obtain a doctor speech message;
when the speech message is a patient-side message, acquiring preset patient identification characters and performing splicing processing on the speech message to obtain a patient speech message;
sequencing the doctor speech messages and the patient speech messages according to the message time to obtain historical conversation labeling information.
In some embodiments, when the model pre-training module 2016 trains a preset first language model according to the historical dialog marking information to obtain the doctor response model, the method includes:
extracting multiple groups of associated dialog information from the historical dialog marking information, wherein the associated dialog information comprises a first speech message and a second speech message which is continuous to the first speech message, and the first speech message and the second speech message have different message sending and receiving types;
and taking the first speech message as an encoding input parameter of the first language model, and taking the second speech message as a decoding input parameter of the first language model, and training the first language model to obtain the doctor response model.
In some embodiments, the query message reply module 2013, when obtaining a doctor response message corresponding to the patient message according to a pre-trained doctor response model, includes:
acquiring the patient identification characters and the patient information, and splicing to obtain target patient information;
and inputting the target patient message to the doctor response model, and acquiring an output result of the doctor response model as a doctor response message.
In some embodiments, the model pre-training module 2016, when training a preset second language model according to the historical dialogue labeling information and the historical diagnosis and treatment result to obtain the diagnosis and treatment result determination model, includes:
splicing each speaking message in the historical dialogue labeling information according to the message time to obtain a historical dialogue splicing result;
and taking the historical dialogue splicing result as a coding input parameter of the second language model, taking the historical diagnosis and treatment result as a decoding input parameter of the second language model, and training the second language model to obtain the diagnosis and treatment result determination model.
In some embodiments, when obtaining the target diagnosis and treatment result corresponding to the target session information according to the pre-trained diagnosis and treatment result determination model, the diagnosis and treatment result output module 2015 includes:
acquiring the patient identification characters, and splicing the patient messages to obtain target patient-side messages;
acquiring the doctor identification characters and the doctor response message for splicing to obtain a target doctor end message;
splicing the target patient end messages and the target doctor end messages according to message time to obtain a target dialogue splicing result;
and inputting the target dialogue splicing result to the diagnosis and treatment result determining model, and acquiring an output result of the diagnosis and treatment result determining model as a target diagnosis and treatment result.
It should be noted that, as will be clear to those skilled in the art, for convenience and brevity of description, the specific working processes of the above-described apparatus and each module and unit may refer to the corresponding processes in the foregoing self-service diagnosis method embodiment, and are not described herein again.
The apparatus provided by the above embodiments may be implemented in the form of a computer program, which can be run on a computer device as shown in fig. 3.
Referring to fig. 3, fig. 3 is a schematic block diagram of a computer device according to an embodiment of the present disclosure. The computer device includes, but is not limited to, a server.
As shown in fig. 3, the computer device 301 includes a processor 3011, a memory and a network interface connected through a system bus, where the memory may include a storage medium 3012 and an internal memory 3015, and the storage medium 3012 may be non-volatile or volatile.
The storage medium 3012 may store an operating system and computer programs. The computer program includes program instructions that, when executed, cause the processor 3011 to perform any of the self-service medical treatment methods.
The internal memory 3015 provides an environment for running a computer program on the storage medium 3012, and the computer program, when executed by the processor 3011, causes the processor 3011 to execute any one of the self-service medical treatment methods.
The network interface is used for network communication, such as sending assigned tasks and the like. Those skilled in the art will appreciate that the architecture shown in fig. 3 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
It should be understood that Processor 3011 may be a Central Processing Unit (CPU), and that Processor 3011 may also be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In some embodiments, the processor 3011 is configured to run a computer program stored in the memory to implement the following steps:
when a patient consultation request is received, establishing full-duplex communication connection with a target patient terminal according to the patient consultation request, and sending a preset inquiry message to the target patient terminal to guide a target patient to reply a message through the target patient terminal;
when receiving a patient message sent from the target patient terminal, recording the number of times of receiving the patient message as the number of doctor-patient queries;
when the doctor-patient inquiry times do not reach the preset times, acquiring a doctor response message corresponding to the patient message according to a pre-trained doctor response model, and sending the doctor response message to the target patient terminal to guide the target patient to continuously reply the message;
when the doctor-patient inquiry times reach the preset times, integrating the patient messages and the doctor response messages to obtain target conversation information;
and determining a model according to the pre-trained diagnosis and treatment result to obtain a target diagnosis and treatment result corresponding to the target dialogue information, and sending the target diagnosis and treatment result to the target patient terminal.
In some embodiments, the processor 3011, prior to establishing a full duplex communication connection with a target patient terminal in accordance with a patient consultation request when the patient consultation request is received, is further configured to:
acquiring historical doctor-patient dialogue information and historical diagnosis and treatment results corresponding to the historical doctor-patient dialogue information;
labeling the historical doctor-patient conversation information to obtain historical conversation labeling information;
training a preset first language model according to the historical dialogue labeling information to obtain the doctor response model;
and training a preset second language model according to the historical dialogue labeling information and the historical diagnosis and treatment result to obtain the diagnosis and treatment result determination model.
In some embodiments, the historical doctor-patient dialogue information includes a plurality of speaking messages, and the processor 3011 is configured to, when performing annotation processing on the historical doctor-patient dialogue information to obtain historical dialogue annotation information, implement:
acquiring the message transmitting and receiving type of the speaking message, and judging whether the speaking message is a doctor end message or not according to the message transmitting and receiving type;
when the speech message is a doctor end message, acquiring preset doctor identification characters and splicing the speech message to obtain a doctor speech message;
when the speech message is a patient-side message, acquiring preset patient identification characters and performing splicing processing on the speech message to obtain a patient speech message;
sequencing the doctor speech messages and the patient speech messages according to the message time to obtain historical conversation labeling information.
In some embodiments, the processor 3011, when training a preset first language model according to the historical dialog annotation information to obtain the doctor response model, is configured to implement:
extracting multiple groups of associated dialog information from the historical dialog marking information, wherein the associated dialog information comprises a first speech message and a second speech message which is continuous to the first speech message, and the first speech message and the second speech message have different message sending and receiving types;
and taking the first speech message as an encoding input parameter of the first language model, and taking the second speech message as a decoding input parameter of the first language model, and training the first language model to obtain the doctor response model.
In some embodiments, the processor 3011, when obtaining a doctor response message corresponding to the patient message according to a pre-trained doctor response model, is configured to:
acquiring the patient identification characters and the patient information to carry out splicing processing to obtain target patient information;
and inputting the target patient message to the doctor response model, and acquiring an output result of the doctor response model as a doctor response message.
In some embodiments, the processor 3011, when training a preset second language model according to the historical dialogue marking information and the historical diagnosis and treatment result to obtain the diagnosis and treatment result determination model, is configured to:
splicing each speaking message in the historical dialogue labeling information according to the message time to obtain a historical dialogue splicing result;
and taking the historical dialogue splicing result as a coding input parameter of the second language model, taking the historical diagnosis and treatment result as a decoding input parameter of the second language model, and training the second language model to obtain the diagnosis and treatment result determination model.
In some embodiments, the processor 3011, when obtaining a target diagnosis result corresponding to the target dialogue information according to a pre-trained diagnosis result determination model, is configured to:
acquiring the patient identification characters, and splicing the patient messages to obtain target patient-side messages;
acquiring the doctor identification characters and the doctor response message for splicing to obtain a target doctor end message;
splicing the target patient end messages and the target doctor end messages according to the message time to obtain a target dialogue splicing result;
and inputting the target dialogue splicing result to the diagnosis and treatment result determining model, and acquiring an output result of the diagnosis and treatment result determining model as a target diagnosis and treatment result.
It should be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the computer device may refer to the corresponding process in the foregoing self-service diagnosis method embodiment, and details are not described herein again.
The embodiment of the present application further provides a storage medium, which is a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, where the computer program includes program instructions, and a method implemented when the program instructions are executed may refer to various embodiments of the self-service medical consultation method of the present application.
The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, for example, a hard disk or a memory of the computer device. The computer readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device.
It is to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items. It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments. While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (10)
1. A self-service medical treatment method, comprising:
when a patient consultation request is received, establishing full-duplex communication connection with a target patient terminal according to the patient consultation request, and sending a preset inquiry message to the target patient terminal to guide a target patient to reply a message through the target patient terminal;
when receiving the patient information sent from the target patient terminal, recording the times of receiving the patient information as doctor-patient inquiry times;
when the doctor-patient inquiry times do not reach the preset times, acquiring a doctor response message corresponding to the patient message according to a pre-trained doctor response model, and sending the doctor response message to the target patient terminal to guide the target patient to continuously reply the message;
when the doctor-patient inquiry times reach the preset times, integrating the patient messages and the doctor response messages to obtain target conversation information;
and determining a model according to the pre-trained diagnosis and treatment result to obtain a target diagnosis and treatment result corresponding to the target dialogue information, and sending the target diagnosis and treatment result to the target patient terminal.
2. The method of claim 1, wherein before establishing a full duplex communication connection with a target patient terminal according to a patient consultation request when the patient consultation request is received, the method further comprises:
acquiring historical doctor-patient dialogue information and historical diagnosis and treatment results corresponding to the historical doctor-patient dialogue information;
labeling the historical doctor-patient conversation information to obtain historical conversation labeling information;
training a preset first language model according to the historical dialogue labeling information to obtain the doctor response model;
and training a preset second language model according to the historical dialogue labeling information and the historical diagnosis and treatment result to obtain the diagnosis and treatment result determination model.
3. The method of claim 2, wherein the historical doctor-patient dialog information includes a plurality of speech messages, and wherein the tagging of the historical doctor-patient dialog information to obtain historical dialog tagging information includes:
acquiring the message transmitting and receiving type of the speaking message, and judging whether the speaking message is a doctor end message or not according to the message transmitting and receiving type;
when the speech message is a doctor end message, acquiring preset doctor identification characters and splicing the speech message to obtain a doctor speech message;
when the speech message is a patient-side message, acquiring preset patient identification characters and performing splicing processing on the speech message to obtain a patient speech message;
sequencing the doctor speech messages and the patient speech messages according to the message time to obtain historical conversation labeling information.
4. The method of claim 3, wherein the training a preset first language model according to the historical dialog annotation information to obtain the physician response model comprises:
extracting multiple groups of associated dialog information from the historical dialog marking information, wherein the associated dialog information comprises a first speech message and a second speech message which is continuous to the first speech message, and the first speech message and the second speech message have different message sending and receiving types;
and taking the first speech message as an encoding input parameter of the first language model, and taking the second speech message as a decoding input parameter of the first language model, and training the first language model to obtain the doctor response model.
5. The method of claim 4, wherein obtaining a doctor response message corresponding to the patient message according to a pre-trained doctor response model comprises:
acquiring the patient identification characters and the patient information to carry out splicing processing to obtain target patient information;
and inputting the target patient message to the doctor response model, and acquiring an output result of the doctor response model as a doctor response message.
6. The method according to claim 3, wherein the training a preset second language model according to the historical dialogue labeling information and the historical diagnosis and treatment results to obtain the diagnosis and treatment result determination model comprises:
splicing each speaking message in the historical dialogue labeling information according to the message time to obtain a historical dialogue splicing result;
and taking the historical dialogue splicing result as a coding input parameter of the second language model, taking the historical diagnosis and treatment result as a decoding input parameter of the second language model, and training the second language model to obtain the diagnosis and treatment result determination model.
7. The method according to claim 6, wherein the obtaining of the target diagnosis and treatment result corresponding to the target dialogue information according to the pre-trained diagnosis and treatment result determination model comprises:
acquiring the patient identification characters, and splicing the patient messages to obtain target patient-side messages;
acquiring the doctor identification characters and the doctor response message for splicing to obtain a target doctor end message;
splicing the target patient end messages and the target doctor end messages according to message time to obtain a target dialogue splicing result;
and inputting the target dialogue splicing result to the diagnosis and treatment result determining model, and acquiring an output result of the diagnosis and treatment result determining model as a target diagnosis and treatment result.
8. A self-service medical treatment device, comprising:
the query request processing module is used for establishing full-duplex communication connection with a target patient terminal according to a patient consultation request when the patient consultation request is received, and sending a preset query message to the target patient terminal so as to guide a target patient to reply the message through the target patient terminal;
the inquiry message receiving module is used for recording the times of receiving the patient messages as doctor-patient inquiry times when the patient messages sent from the target patient terminal are received;
the inquiry message reply module is used for acquiring a doctor response message corresponding to the patient message according to a pre-trained doctor response model when the doctor-patient inquiry times do not reach the preset times, and sending the doctor response message to the target patient terminal so as to guide the target patient to continue replying the message;
the dialogue message processing module is used for integrating each patient message and each doctor response message to obtain target dialogue information when the doctor-patient inquiry times reach the preset times;
and the diagnosis and treatment result output module is used for obtaining a target diagnosis and treatment result corresponding to the target dialogue information according to the pre-trained diagnosis and treatment result determination model and sending the target diagnosis and treatment result to the target patient terminal.
9. A computer device comprising a processor, a memory, and a computer program stored on the memory and executable by the processor, wherein the computer program, when executed by the processor, implements the steps of the self-service encounter method of any of claims 1-7.
10. A computer-readable storage medium, having a computer program stored thereon, wherein the computer program, when executed by a processor, performs the steps of the self-service visit method as claimed in any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210547326.0A CN114913995A (en) | 2022-05-19 | 2022-05-19 | Self-service diagnosis method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210547326.0A CN114913995A (en) | 2022-05-19 | 2022-05-19 | Self-service diagnosis method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114913995A true CN114913995A (en) | 2022-08-16 |
Family
ID=82769005
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210547326.0A Pending CN114913995A (en) | 2022-05-19 | 2022-05-19 | Self-service diagnosis method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114913995A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117370535A (en) * | 2023-12-05 | 2024-01-09 | 粤港澳大湾区数字经济研究院(福田) | Training method of medical dialogue model, medical query method, device and equipment |
-
2022
- 2022-05-19 CN CN202210547326.0A patent/CN114913995A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117370535A (en) * | 2023-12-05 | 2024-01-09 | 粤港澳大湾区数字经济研究院(福田) | Training method of medical dialogue model, medical query method, device and equipment |
CN117370535B (en) * | 2023-12-05 | 2024-04-16 | 粤港澳大湾区数字经济研究院(福田) | Training method of medical dialogue model, medical query method, device and equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108334487B (en) | Missing semantic information completion method and device, computer equipment and storage medium | |
WO2021068321A1 (en) | Information pushing method and apparatus based on human-computer interaction, and computer device | |
CN108877782B (en) | Speech recognition method and device | |
CN112650854B (en) | Intelligent reply method and device based on multiple knowledge graphs and computer equipment | |
CN112084789B (en) | Text processing method, device, equipment and storage medium | |
CN112037904B (en) | Online diagnosis and treatment data processing method and device, computer equipment and storage medium | |
CN110266900A (en) | Recognition methods, device and the customer service system that client is intended to | |
CN116340778B (en) | Medical large model construction method based on multiple modes and related equipment thereof | |
CN112836521A (en) | Question-answer matching method and device, computer equipment and storage medium | |
CN111414453A (en) | Structured text generation method and device, electronic equipment and computer readable storage medium | |
CN118070072A (en) | Problem processing method, device, equipment and storage medium based on artificial intelligence | |
CN116992879A (en) | Entity identification method, device, equipment and medium based on artificial intelligence | |
CN114780701A (en) | Automatic question-answer matching method, device, computer equipment and storage medium | |
CN115640386A (en) | Method and apparatus for conducting dialogs based on recommended dialogs | |
CN114913995A (en) | Self-service diagnosis method, device, equipment and storage medium | |
CN117909463A (en) | Business scene dialogue method and related products | |
CN117743522A (en) | Medical reply generation method, device, equipment and storage medium | |
WO2023040545A1 (en) | Data processing method and apparatus, device, storage medium, and program product | |
CN111753062A (en) | Method, device, equipment and medium for determining session response scheme | |
CN113327691B (en) | Query method and device based on language model, computer equipment and storage medium | |
CN116842143A (en) | Dialog simulation method and device based on artificial intelligence, electronic equipment and medium | |
CN114188041B (en) | Medical system for completing doctor-patient service in remote dialogue mode | |
CN111556096B (en) | Information pushing method, device, medium and electronic equipment | |
US11165905B2 (en) | Automatic identification of medical information pertinent to a natural language conversation | |
CN113656566A (en) | Intelligent dialogue processing method and device, computer equipment and storage medium |
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 |