Self-service medical treatment method, device, equipment and storage medium
By using pre-trained doctor response models and diagnosis and treatment results determination models in the self-service consultation system, combining patient messages and doctor response messages to generate diagnosis and treatment results, the problem of inefficient patients' visits in the prior art is solved, and fast and accurate diagnosis and treatment results are achieved.
Patent Information
- Application Number
- CN202210547326.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-19
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2042-05-19
AI Technical Summary
In the prior art, patients' medical treatment efficiency is low, resulting in patients spending a lot of time in the hospital registration queue and diagnosis and treatment process.
It provides a self-service medical treatment method, by establishing a full-duplex communication connection with the target patient terminal, sending preset inquiry messages, recording the number of doctor-patient inquiry times, determining the model using the pre-trained doctor response model and diagnosis and treatment results, integrating patient messages and doctor response messages, generating diagnosis and treatment results and sending them to the patient terminal.
It realizes intelligent dialogue with patients through artificial intelligence, improves medical efficiency, reduces the time patients wait in the hospital, and provides fast and accurate diagnosis and treatment results.
Smart Images

Figure CN114913995B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of artificial intelligence, and in particular to a self-service medical consultation method, device, equipment and storage medium. Background Art
[0002] At present, the process of medical treatment still relies on manual dialogue between doctors and patients. Doctors need to conduct multi-faceted inquiries on patients' current symptoms, historical symptoms, examination results, disease evolution, etc., and then make a diagnosis based on the development of the pathology to finally get the diagnosis and treatment results. In addition, it takes a lot of time for patients to go to the hospital and register and queue up, resulting in low efficiency of patients' medical treatment. Summary of the invention
[0003] The main purpose of this application is to provide a self-service medical treatment method, device, equipment and storage medium, aiming to solve the problem of low efficiency of patient medical treatment in the prior art.
[0004] In a first aspect, the present application provides a self-service medical treatment method, comprising:
[0005] When receiving a patient consultation request, establishing a 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 the target patient to reply to the message through the target patient terminal;
[0006] When a patient message sent from the target patient terminal is received, the number of times the patient message is received is recorded as the number of doctor-patient inquiries;
[0007] When the number of doctor-patient inquiries does not reach the preset number, 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 to guide the target patient to continue replying to the message;
[0008] When the number of doctor-patient inquiries reaches the preset number, integrating each patient message and each doctor response message to obtain target dialogue information;
[0009] The target diagnosis and treatment result corresponding to the target dialogue information is obtained according to the pre-trained diagnosis and treatment result determination model, and the target diagnosis and treatment result is sent to the target patient terminal.
[0010] In a second aspect, the present application further provides a self-service medical consultation device, the self-service medical consultation device comprising:
[0011] The inquiry request processing module is used to establish a full-duplex communication connection with a target patient terminal according to the patient consultation request when receiving the patient consultation request, and send a preset inquiry message to the target patient terminal to guide the target patient to reply to the message through the target patient terminal;
[0012] An inquiry message receiving module, for recording the number of times the patient message is received as the number of doctor-patient inquiries when receiving a patient message sent from the target patient terminal;
[0013] An inquiry message reply module is used to obtain a doctor response message corresponding to the patient message according to a pre-trained doctor response model when the number of doctor-patient inquiries does not reach a preset number, and send the doctor response message to the target patient terminal to guide the target patient to continue replying to the message;
[0014] A dialogue message processing module, used for integrating each patient message and each doctor response message to obtain target dialogue information when the number of doctor-patient inquiries reaches the preset number;
[0015] The diagnosis and treatment result output module is used to obtain the target diagnosis and treatment result corresponding to the target dialogue information according to the pre-trained diagnosis and treatment result determination model, and send the target diagnosis and treatment result to the target patient terminal.
[0016] In a third aspect, the present application also provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the self-service medical treatment method as described above are implemented.
[0017] In a fourth aspect, the present application further provides a storage medium, wherein the computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the self-service medical treatment method as described above are implemented.
[0018] The present application provides a self-service medical treatment method, device, equipment and storage medium. The present application provides a self-service medical treatment method, device, equipment and storage medium. In the present application, 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, thereby realizing intelligent response to the patient message; in the process of the patient's intelligent response, the patient message and the doctor response message are integrated to obtain the doctor-patient dialogue information, and the doctor-patient dialogue information is processed using a pre-trained diagnosis and treatment result determination model to give the diagnosis and treatment results. Through the technical solution provided by the present application, it is realized to have an intelligent dialogue with the patient through artificial intelligence and give the diagnosis and treatment results according to the dialogue situation. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 A schematic diagram of the steps of a self-service medical consultation method provided in an embodiment of the present application;
[0021] Figure 2 A schematic block diagram of a self-service medical consultation device provided in an embodiment of the present application;
[0022] Figure 3 A schematic block diagram of the structure of a computer device provided in an embodiment of the present application.
[0023] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0025] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor do they have to be executed in the order described. For example, some operations / steps can also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions. In addition, although the functional modules are divided in the device schematic, in some cases, the module division can be different from that in the device schematic.
[0026] The embodiments of the present application provide a self-service medical treatment method, device, equipment and storage medium. The method can be applied to a terminal device or a server, and the terminal device can be an electronic device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant and a wearable device; the server can be a single server or a server cluster composed of multiple servers. The following is an explanation of the method applied to a server as an example.
[0027] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0028] Please refer to Figure 1 , Figure 1 A schematic diagram of the steps of a self-service medical consultation method provided in an embodiment of the present application.
[0029] like Figure 1 As shown, the self-service medical consultation method includes steps S10 to S14.
[0030] Step S10: When a patient consultation request is received, a full-duplex communication connection is established with a target patient terminal according to the patient consultation request, and a preset inquiry message is sent to the target patient terminal to guide the target patient to reply to the message through the target patient terminal.
[0031] In some embodiments, when the executor of the self-service medical treatment method is a server, the patient consultation request can be a network request sent by the target patient through the target patient terminal; when the executor of the self-service medical treatment method is a terminal device, the patient consultation request can be a message instruction sent from the server and received by the terminal device, wherein the message instruction is generated and sent to the executor according to the received network request by the server as a transfer station for processing the network request after the target patient sends the network request to the server through the target patient terminal. At this time, the message instruction can be an instruction in the form of remote push notification, SMS, email, etc. In addition, the patient consultation request can also be other types of instructions, which are not limited here.
[0032] It can be understood that the patient consultation request carries the device identification information of the target patient terminal. After establishing a full-duplex communication connection with the target device terminal based on the device identification information, the execution subject of the method and the target patient terminal can send and receive chat messages to each other.
[0033] The preset inquiry message is used to greet the target patient and guide the target patient to reply to the message. Exemplarily, the preset inquiry message can be set to a guiding message such as "Hello, how can I help you?"
[0034] It is understandable that before receiving a patient consultation request, it is necessary to first train a doctor response model for conducting an intelligent dialogue with the target patient and a diagnosis and treatment result determination model for obtaining the diagnosis and treatment results based on the dialogue.
[0035] In some embodiments, when a patient consultation request is received, before establishing a full-duplex communication connection with a target patient terminal according to the patient consultation request, the method further includes:
[0036] Obtaining historical doctor-patient conversation information and historical diagnosis and treatment results corresponding to the historical doctor-patient conversation information;
[0037] Annotating the historical doctor-patient conversation information to obtain historical conversation annotation information;
[0038] Training a preset first language model according to the historical conversation annotation information to obtain the doctor response model;
[0039] The preset second language model is trained according to the historical conversation annotation information and the historical diagnosis and treatment results to obtain the diagnosis and treatment result determination model.
[0040] It can be understood that the historical doctor-patient dialogue information records the speech messages of the doctor and the patient during the consultation process, while the historical diagnosis and treatment results are the diagnosis and treatment results given by the doctor based on the feedback from the patient during the consultation process. After marking whether the speaker of each speech message is a doctor or a patient, the historical dialogue annotation information is obtained.
[0041] In some embodiments, the first language model is a GPT-2 (Generative Pre-Training 2.0) model, and the second language model is a GPT (Generative Pre-Training) model.
[0042] The doctor response model trained based on the GPT-2 model and the diagnosis and treatment result determination model trained based on the GPT model can both generate output text based on the input text.
[0043] Among them, using the annotated historical conversation annotation information to train the first language model can enable the first language model to better understand the characteristics of the conversation between doctors and patients in different roles, and can allow the first language model to effectively simulate the doctor's consultation steps to ask the patient about the situation. The doctor response model finally trained can generate doctor reply messages that are more in line with the doctor's consultation scenario.
[0044] By using the annotated historical dialogue information and historical diagnosis and treatment results to train the second language model, the second language model can better learn how to obtain diagnosis and treatment results based on the patient-doctor dialogue process. The final diagnosis and treatment result determination model can simulate the doctor's diagnosis process and realize intelligent diagnosis of patient diseases.
[0045] It can be understood that based on the distinguishing characteristics of the GPT model and the GPT-2 model, compared with the GPT-2 model, the diagnosis and treatment result determination model obtained by using the GPT model as the second language model for training can better generate the patient's diagnosis and treatment results based on the entire consultation dialogue process.
[0046] Furthermore, there may be multiple sets of historical conversation annotation information used to train the first language model. The more training data there are, the better the training effect of the first language model will be. Similarly, there may be multiple sets of historical conversation annotation information and historical diagnosis and treatment results used to train the second language model. The more training data there are, the better the training effect of the second language model will be.
[0047] In some implementations, the historical doctor-patient dialogue information includes a plurality of speech messages, and the tagging of the historical doctor-patient dialogue information to obtain the historical dialogue tagging information includes:
[0048] Acquire the message sending and receiving type of the speech message, so as to determine whether the speech message is a doctor-side message according to the message sending and receiving type;
[0049] When the speech message is a doctor-side message, a preset doctor identification character is obtained and concatenated with the speech message to obtain the doctor's speech message;
[0050] When the speech message is a patient-side message, a preset patient identification character is obtained and concatenated with the speech message to obtain a patient speech message;
[0051] The doctor's speech messages and the patient's speech messages are sorted according to the message time to obtain historical conversation annotation information.
[0052] It can be understood that this method is applied to the doctor side, and according to the message receiving and sending type of the speech message, it can be determined whether the speech message is a doctor side message or a patient side message. Specifically, when the message receiving and sending type of the speech message is a receiving message type, the speech message is a patient side message; when the message receiving and sending type of the speech message is a sending message type, the speech message is a doctor side message.
[0053] In addition, each speech message has a message time used to represent the time when the message was sent. By sorting the speech messages of each doctor and each patient according to the message time of each speech message, a complete and coherent doctor-patient dialogue can be obtained, that is, the historical dialogue annotation information.
[0054] In some embodiments, the preset doctor identification characters can be set to "[doctor]", and the preset patient identification characters can be set to "[patient]", and it is only necessary to ensure that the doctor identification characters are different from the patient identification characters. In addition, the doctor identification characters and the patient identification characters can also be set to other characters as needed, which is not limited here.
[0055] For example, suppose the doctor identification characters are "[doctor]", and suppose the patient identification characters are "[patient]". If the speech message "Do you cough?" is a doctor-side message, then after splicing, the resulting doctor speech message is "[doctor] Do you cough?". Similarly, if the speech message "I often cough now, and my throat feels itchy" is a patient-side message, then after splicing, the resulting patient speech message is "[patient] I often cough now, and my throat feels itchy".
[0056] In some implementations, the training of a preset first language model according to the historical conversation annotation information to obtain the doctor response model includes:
[0057] Extracting multiple groups of related conversation information from the historical conversation annotation information, wherein the related conversation information includes a first speech message and a second speech message that is subsequent to the first speech message, and the first speech message and the second speech message have different message sending and receiving types;
[0058] The first speech message is used as an encoding input parameter of the first language model, and the second speech message is used as a decoding input parameter of the first language model, so as to train the first language model and obtain the doctor response model.
[0059] It can be understood that the first speech message and the second speech message in the associated conversation information are associated with each other, 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 based on the first speech message A.
[0060] The first language model is trained using the first speech message as the encoding input parameter of the first language model and the second speech message as the decoding input parameter of the first language model. The resulting doctor response model has the ability to generate a response message based on the input speech message.
[0061] In some embodiments, it is characterized in that the step of training a preset second language model according to the historical conversation annotation information and the historical diagnosis and treatment results to obtain the diagnosis and treatment result determination model includes:
[0062] splicing each speech message in the historical conversation annotation information according to the message time to obtain a historical conversation splicing result;
[0063] The historical conversation splicing result is used as the encoding input parameter of the second language model, and the historical diagnosis and treatment results are used as the decoding input parameter of the second language model, and the second language model is trained to obtain the diagnosis and treatment result determination model.
[0064] It can be understood that after the splicing process, the individual speeches in the historical dialogue splicing results are still separated by doctor identification characters and patient identification characters, which can allow the second language model to better understand the expression semantics of patients and doctors.
[0065] The second language model is trained using the historical conversation splicing results as the encoding input parameters of the second language model, and the historical diagnosis and treatment results as the decoding input parameters of the second language model. The obtained diagnosis and treatment result determination model has the ability to output diagnosis and treatment results based on the input doctor-patient conversation information.
[0066] In some embodiments, when the second semantic model is a GPT model, the encoding input parameter is the Encoder input parameter of the second semantic model, and the decoding input parameter is the Decoder input parameter of the second semantic model.
[0067] Step S11: when a patient message sent from the target patient terminal is received, the number of times the patient message is received is recorded as the number of doctor-patient inquiries.
[0068] It can be understood that after establishing a full-duplex communication connection with the target patient terminal, the execution subject of the self-service medical treatment method and the target patient terminal can send messages to each other. The message received from the target patient terminal is the patient message. The number of doctor-patient inquiries is used to record the number of times the patient message is received. Each time a patient message is received, the number of doctor-patient inquiries is increased accordingly.
[0069] Step S12: When the number of doctor-patient inquiries does not reach the preset number, 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 to guide the target patient to continue replying to the message.
[0070] It can be understood that the previously trained doctor response model can be used to generate a doctor response message corresponding to the patient message. After the doctor response message is sent to the target patient terminal, the target patient can reply to the message according to the received doctor response message. In the process of guiding the patient to reply to the message, relevant information such as the patient's current symptoms, historical symptoms, examination results, and disease evolution can be collected.
[0071] In some embodiments, the preset number of times can be set to 15 times or 20 times, or can be set to other times as required. It is understood that the larger the preset number of times is, the more comprehensive the patient-related information that can be collected.
[0072] In some implementations, it is characterized in that the obtaining of a doctor response message corresponding to the patient message according to a pre-trained doctor response model comprises:
[0073] Acquire the patient identification character and the patient message, and perform splicing processing to obtain the target patient message;
[0074] The target patient message is input into the doctor response model, and an output result of the doctor response model is obtained as a doctor response message.
[0075] It can be understood that if the doctor response model is trained based on historical conversation annotation information, then when the doctor response model is used to obtain the doctor response message corresponding to the patient message, the patient identification characters are first obtained and concatenated with the patient message, and then the obtained target patient message is input into the doctor response model. The doctor response model can better recognize the semantics of the patient message to output a doctor response message that is more in line with the doctor-patient inquiry scenario.
[0076] Step S13: When the number of doctor-patient inquiries reaches the preset number, each patient message and each doctor response message are integrated to obtain target dialogue information.
[0077] It can be understood that when the number of doctor-patient inquiries reaches a preset number, it can be inferred that a sufficient number of conversations have been conducted with the patient using the doctor response model, that is, sufficient patient information has been collected in the integrated target conversation information.
[0078] 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.
[0079] It can be understood that after inputting the target dialogue information into the diagnosis and treatment result determination model, the diagnosis and treatment result determination model can extract the patient's condition from the target dialogue information and generate a corresponding diagnosis and treatment result according to the patient's condition. After sending the target diagnosis and treatment result to the target patient terminal, the target patient can refer to the target diagnosis and treatment result to adopt a suitable treatment plan.
[0080] In some embodiments, it is characterized in that the step of obtaining a target diagnosis and treatment result corresponding to the target dialogue information according to a pre-trained diagnosis and treatment result determination model includes:
[0081] Acquire the patient identification character and perform splicing processing on the patient message to obtain a target patient end message;
[0082] Obtain the doctor identification character and the doctor response message for splicing processing to obtain a target doctor end message;
[0083] Splicing each of the target patient-side messages and each of the target doctor-side messages according to the message time to obtain a target conversation splicing result;
[0084] The target dialogue splicing result is input into the diagnosis and treatment result determination model, and the output result of the diagnosis and treatment result determination model is obtained as the target diagnosis and treatment result.
[0085] It can be understood that when the diagnosis and treatment result determination model is trained through historical conversation annotation information and historical diagnosis and treatment results, because the historical conversation annotation information is obtained by annotating and splicing the historical diagnosis and treatment results, at this time, if the same annotation and splicing processing is performed on the target conversation information, and then the obtained target conversation splicing result is input into the diagnosis and treatment result determination model, the diagnosis and treatment result determination model can better understand the semantics of the labeled conversation splicing result and output more accurate labeled diagnosis and treatment results.
[0086] The present application provides a self-service medical treatment method, device, equipment and storage medium. In the present application, 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, thereby realizing intelligent response to the patient message; in the process of the patient's intelligent response, the patient message and the doctor response message are integrated to obtain the doctor-patient dialogue information, and the doctor-patient dialogue information is processed using a pre-trained diagnosis and treatment result determination model to give the diagnosis and treatment result. Through the technical solution provided by the present application, it is realized to have an intelligent dialogue with the patient through artificial intelligence and give the diagnosis and treatment result according to the dialogue situation.
[0087] Please refer to Figure 2 , Figure 2 A schematic block diagram of a self-service medical consultation device provided in an embodiment of the present application.
[0088] like Figure 2 As shown, the self-service medical consultation device 201 includes:
[0089] The inquiry request processing module 2011 is used for, when receiving a patient consultation request, establishing a 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 the target patient to reply to the message through the target patient terminal;
[0090] The inquiry message receiving module 2012 is used to record the number of times the patient message is received as the number of doctor-patient inquiries when receiving the patient message sent from the target patient terminal;
[0091] The inquiry message reply module 213 is used to obtain the doctor response message corresponding to the patient message according to the pre-trained doctor response model when the number of doctor-patient inquiries does not reach the preset number, and send the doctor response message to the target patient terminal to guide the target patient to continue to reply to the message;
[0092] The dialogue message processing module 2014 is used to integrate each patient message and each doctor response message to obtain target dialogue information when the number of doctor-patient inquiries reaches the preset number;
[0093] The diagnosis and treatment result output module 2015 is used to obtain the target diagnosis and treatment result corresponding to the target dialogue information according to the pre-trained diagnosis and treatment result determination model, and send the target diagnosis and treatment result to the target patient terminal.
[0094] In some embodiments, the self-service medical consultation device 201 further includes a model pre-training module 2016. When the inquiry request processing module 2011 receives a patient consultation request, before establishing a full-duplex communication connection with the target patient terminal according to the patient consultation request, the model pre-training module 2016 is used to obtain historical doctor-patient dialogue information and historical diagnosis and treatment results corresponding to the historical doctor-patient dialogue information;
[0095] Annotating the historical doctor-patient conversation information to obtain historical conversation annotation information;
[0096] Training a preset first language model according to the historical conversation annotation information to obtain the doctor response model;
[0097] The preset second language model is trained according to the historical conversation annotation information and the historical diagnosis and treatment results to obtain the diagnosis and treatment result determination model.
[0098] In some implementations, the historical doctor-patient dialogue information includes a plurality of speech messages, and the model pre-training module 2016, when annotating the historical doctor-patient dialogue information to obtain the historical dialogue annotation information, includes:
[0099] Acquire the message sending and receiving type of the speech message, so as to determine whether the speech message is a doctor-side message according to the message sending and receiving type;
[0100] When the speech message is a doctor-side message, a preset doctor identification character is obtained and concatenated with the speech message to obtain the doctor's speech message;
[0101] When the speech message is a patient-side message, a preset patient identification character is obtained and concatenated with the speech message to obtain a patient speech message;
[0102] The doctor's speech messages and the patient's speech messages are sorted according to the message time to obtain historical conversation annotation information.
[0103] In some implementations, when the model pre-training module 2016 trains the preset first language model according to the historical dialogue annotation information to obtain the doctor response model, it includes:
[0104] Extracting multiple groups of related conversation information from the historical conversation annotation information, wherein the related conversation information includes a first speech message and a second speech message that is subsequent to the first speech message, and the first speech message and the second speech message have different message sending and receiving types;
[0105] The first speech message is used as an encoding input parameter of the first language model, and the second speech message is used as a decoding input parameter of the first language model, so as to train the first language model and obtain the doctor response model.
[0106] In some implementations, when the inquiry message reply module 2013 obtains the doctor response message corresponding to the patient message according to the pre-trained doctor response model, it includes:
[0107] Acquire the patient identification character and the patient message, and perform splicing processing to obtain the target patient message;
[0108] The target patient message is input into the doctor response model, and an output result of the doctor response model is obtained as a doctor response message.
[0109] In some embodiments, when the model pre-training module 2016 trains the preset second language model according to the historical conversation annotation information and the historical diagnosis and treatment results to obtain the diagnosis and treatment result determination model, it includes:
[0110] splicing each speech message in the historical conversation annotation information according to the message time to obtain a historical conversation splicing result;
[0111] The historical conversation splicing result is used as the encoding input parameter of the second language model, and the historical diagnosis and treatment results are used as the decoding input parameter of the second language model, and the second language model is trained to obtain the diagnosis and treatment result determination model.
[0112] In some embodiments, when the diagnosis and treatment result output module 2015 obtains the target diagnosis and treatment result corresponding to the target dialogue information according to the pre-trained diagnosis and treatment result determination model, it includes:
[0113] Acquire the patient identification character and perform splicing processing on the patient message to obtain a target patient end message;
[0114] Obtain the doctor identification character and the doctor response message for splicing processing to obtain a target doctor end message;
[0115] Splicing each of the target patient-side messages and each of the target doctor-side messages according to the message time to obtain a target conversation splicing result;
[0116] The target dialogue splicing result is input into the diagnosis and treatment result determination model, and the output result of the diagnosis and treatment result determination model is obtained as the target diagnosis and treatment result.
[0117] It should be noted that technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described device and each module and unit can refer to the corresponding process in the aforementioned self-service medical treatment method embodiment, and will not be repeated here.
[0118] The apparatus provided in the above embodiment may be implemented in the form of a computer program. The computer program may be Figure 3 Runs on the computer device shown.
[0119] See also Figure 3 , Figure 3 The present invention provides a schematic block diagram of a computer device according to an embodiment of the present invention. The computer device includes but is not limited to a server.
[0120] like Figure 3 As shown, the computer device 301 includes a processor 3011, a memory and a network interface connected via a system bus, wherein the memory may include a storage medium 3012 and an internal memory 3015, and the storage medium 3012 may be non-volatile or volatile.
[0121] The storage medium 3012 can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor 3011 can execute any self-help medical treatment method.
[0122] Processor 3011 is used to provide computing and control capabilities and support the operation of the entire computer device.
[0123] The internal memory 3015 provides an environment for the operation of the computer program in the storage medium 3012. When the computer program is executed by the processor 3011, the processor 3011 can execute any self-service medical treatment method.
[0124] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will appreciate that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0125] It should be understood that the processor 3011 may be a central processing unit (CPU), and the processor 3011 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0126] In some implementations, the processor 3011 is used to run a computer program stored in the memory to implement the following steps:
[0127] When receiving a patient consultation request, establishing a 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 the target patient to reply to the message through the target patient terminal;
[0128] When a patient message sent from the target patient terminal is received, the number of times the patient message is received is recorded as the number of doctor-patient inquiries;
[0129] When the number of doctor-patient inquiries does not reach the preset number, 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 to guide the target patient to continue replying to the message;
[0130] When the number of doctor-patient inquiries reaches the preset number, integrating each patient message and each doctor response message to obtain target dialogue information;
[0131] The target diagnosis and treatment result corresponding to the target dialogue information is obtained according to the pre-trained diagnosis and treatment result determination model, and the target diagnosis and treatment result is sent to the target patient terminal.
[0132] In some implementations, when receiving a patient consultation request, the processor 3011 is further configured to implement, before establishing a full-duplex communication connection with a target patient terminal according to the patient consultation request:
[0133] Obtaining historical doctor-patient conversation information and historical diagnosis and treatment results corresponding to the historical doctor-patient conversation information;
[0134] Annotating the historical doctor-patient conversation information to obtain historical conversation annotation information;
[0135] Training a preset first language model according to the historical conversation annotation information to obtain the doctor response model;
[0136] The preset second language model is trained according to the historical conversation annotation information and the historical diagnosis and treatment results to obtain the diagnosis and treatment result determination model.
[0137] In some implementations, the historical doctor-patient dialogue information includes a plurality of speech messages. When the processor 3011 annotates the historical doctor-patient dialogue information to obtain the historical dialogue annotation information, it is used to implement:
[0138] Acquire the message sending and receiving type of the speech message, so as to determine whether the speech message is a doctor-side message according to the message sending and receiving type;
[0139] When the speech message is a doctor-side message, a preset doctor identification character is obtained and concatenated with the speech message to obtain the doctor's speech message;
[0140] When the speech message is a patient-side message, a preset patient identification character is obtained and concatenated with the speech message to obtain a patient speech message;
[0141] The doctor's speech messages and the patient's speech messages are sorted according to the message time to obtain historical conversation annotation information.
[0142] In some implementations, when the processor 3011 trains the preset first language model according to the historical conversation annotation information to obtain the doctor response model, it is configured to implement:
[0143] Extracting multiple groups of related conversation information from the historical conversation annotation information, wherein the related conversation information includes a first speech message and a second speech message that is subsequent to the first speech message, and the first speech message and the second speech message have different message sending and receiving types;
[0144] The first speech message is used as an encoding input parameter of the first language model, and the second speech message is used as a decoding input parameter of the first language model, so as to train the first language model and obtain the doctor response model.
[0145] In some implementations, when the processor 3011 obtains the doctor response message corresponding to the patient message according to the pre-trained doctor response model, it is configured to implement:
[0146] Acquire the patient identification character and the patient message, and perform splicing processing to obtain the target patient message;
[0147] The target patient message is input into the doctor response model, and an output result of the doctor response model is obtained as a doctor response message.
[0148] In some implementations, when the processor 3011 trains a preset second language model according to the historical conversation annotation information and the historical diagnosis and treatment results to obtain the diagnosis and treatment result determination model, it is configured to implement:
[0149] splicing each speech message in the historical conversation annotation information according to the message time to obtain a historical conversation splicing result;
[0150] The historical conversation splicing result is used as the encoding input parameter of the second language model, and the historical diagnosis and treatment results are used as the decoding input parameter of the second language model, and the second language model is trained to obtain the diagnosis and treatment result determination model.
[0151] In some implementations, when the processor 3011 obtains the target diagnosis and treatment result corresponding to the target dialogue information according to the pre-trained diagnosis and treatment result determination model, it is used to implement:
[0152] Acquire the patient identification character and perform splicing processing on the patient message to obtain a target patient end message;
[0153] Obtain the doctor identification character and the doctor response message for splicing processing to obtain a target doctor end message;
[0154] Splicing each of the target patient-side messages and each of the target doctor-side messages according to the message time to obtain a target conversation splicing result;
[0155] The target dialogue splicing result is input into the diagnosis and treatment result determination model, and the output result of the diagnosis and treatment result determination model is obtained as the target diagnosis and treatment result.
[0156] It should be noted that those skilled in the art can clearly understand that, for the sake of convenience and brevity of description, the specific working process of the computer device described above can refer to the corresponding process in the aforementioned self-service medical treatment method embodiment, and will not be repeated here.
[0157] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the various embodiments of the self-service medical treatment method of the present application.
[0158] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or 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 memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.
[0159] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0160] It should also be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0161] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A self-service medical treatment method, characterized in that: include: Acquire historical doctor-patient dialogue information and historical diagnosis and treatment results corresponding to the historical doctor-patient dialogue information, wherein the historical doctor-patient dialogue information includes a plurality of speech messages; Acquire the message sending and receiving type of the speech message, so as to determine whether the speech message is a doctor-side message according to the message sending and receiving type; When the speech message is a doctor-side message, a preset doctor identification character is obtained and concatenated with the speech message to obtain the doctor's speech message; When the speech message is a patient-side message, a preset patient identification character is obtained and concatenated with the speech message to obtain a patient speech message; Sort the doctor's speech messages and the patient's speech messages according to the message time to obtain historical conversation annotation information; Extracting multiple groups of related conversation information from the historical conversation annotation information, wherein the related conversation information includes a first speech message and a second speech message that is subsequent to the first speech message, and the first speech message and the second speech message have different message sending and receiving types; Using the first speech message as an encoding input parameter of a first language model and using the second speech message as a decoding input parameter of the first language model, training the first language model to obtain a doctor response model; splicing each speech message in the historical conversation annotation information according to the message time to obtain a historical conversation splicing result; Using the historical conversation splicing result as the encoding input parameter of the second language model, and using the historical diagnosis and treatment result as the decoding input parameter of the second language model, the second language model is trained to obtain a diagnosis and treatment result determination model; When receiving a patient consultation request, establishing a 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 the target patient to reply to the message through the target patient terminal; When a patient message sent from the target patient terminal is received, the number of times the patient message is received is recorded as the number of doctor-patient inquiries; When the number of doctor-patient inquiries does not reach the preset number, 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 to guide the target patient to continue replying to the message; When the number of doctor-patient inquiries reaches the preset number, integrating each patient message and each doctor response message to obtain target dialogue information; The target diagnosis and treatment result corresponding to the target dialogue information is obtained according to the pre-trained diagnosis and treatment result determination model, and the target diagnosis and treatment result is sent to the target patient terminal.
2. The method according to claim 1, characterized in that The step of obtaining a doctor response message corresponding to the patient message according to the pre-trained doctor response model includes: Acquire the patient identification character and the patient message, and perform splicing processing to obtain the target patient message; The target patient message is input into the doctor response model, and an output result of the doctor response model is obtained as a doctor response message.
3. The method according to claim 1, characterized in that The step of determining the model based on the pre-trained diagnosis and treatment results to obtain the target diagnosis and treatment results corresponding to the target dialogue information includes: Acquire the patient identification character and perform splicing processing on the patient message to obtain a target patient end message; Obtain the doctor identification character and the doctor response message for splicing processing to obtain a target doctor end message; Splicing each of the target patient-side messages and each of the target doctor-side messages according to the message time to obtain a target conversation splicing result; The target dialogue splicing result is input into the diagnosis and treatment result determination model, and the output result of the diagnosis and treatment result determination model is obtained as the target diagnosis and treatment result.
4. A self-service medical consultation device, characterized in that: include: A model pre-training module, used to obtain historical doctor-patient dialogue information and historical diagnosis and treatment results corresponding to the historical doctor-patient dialogue information, wherein the historical doctor-patient dialogue information includes multiple speech messages; Acquire the message sending and receiving type of the speech message, so as to determine whether the speech message is a doctor-side message according to the message sending and receiving type; When the speech message is a doctor-side message, a preset doctor identification character is obtained and concatenated with the speech message to obtain the doctor's speech message; When the speech message is a patient-side message, a preset patient identification character is obtained and concatenated with the speech message to obtain a patient speech message; Sort the doctor's speech messages and the patient's speech messages according to the message time to obtain historical conversation annotation information; Extracting multiple groups of related conversation information from the historical conversation annotation information, wherein the related conversation information includes a first speech message and a second speech message that is subsequent to the first speech message, and the first speech message and the second speech message have different message sending and receiving types; Using the first speech message as an encoding input parameter of a first language model and using the second speech message as a decoding input parameter of the first language model, training the first language model to obtain a doctor response model; splicing each speech message in the historical conversation annotation information according to the message time to obtain a historical conversation splicing result; Using the historical conversation splicing result as the encoding input parameter of the second language model, and using the historical diagnosis and treatment result as the decoding input parameter of the second language model, the second language model is trained to obtain a diagnosis and treatment result determination model; The inquiry request processing module is used to establish a full-duplex communication connection with a target patient terminal according to the patient consultation request when receiving the patient consultation request, and send a preset inquiry message to the target patient terminal to guide the target patient to reply to the message through the target patient terminal; An inquiry message receiving module, configured to, when receiving a patient message sent from the target patient terminal, record the number of times the patient message is received as the number of doctor-patient inquiries; An inquiry message reply module is used to obtain a doctor response message corresponding to the patient message according to a pre-trained doctor response model when the number of doctor-patient inquiries does not reach a preset number, and send the doctor response message to the target patient terminal to guide the target patient to continue replying to the message; A dialogue message processing module, used for integrating each patient message and each doctor response message to obtain target dialogue information when the number of doctor-patient inquiries reaches the preset number; The diagnosis and treatment result output module is used to obtain the target diagnosis and treatment result corresponding to the target dialogue information according to the pre-trained diagnosis and treatment result determination model, and send the target diagnosis and treatment result to the target patient terminal.
5. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the self-service medical treatment method as described in any one of claims 1 to 3 are implemented.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the self-service medical treatment method according to any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Intelligent inquiry implementation method and system and storage medium
CN111599488A
Neural network-based inquiry reply method, apparatus and device, and storage medium
CN114242267A