Medical hospital guide method and related device

By identifying the user's medical intention problems in the medical guidance system and building a Q&A communication message group, combined with the department's recommendation large language model, the problem of patients in the existing technology is difficult to accurately select departments, and accurate department recommendations and efficient medical treatment processes are achieved.

CN119903150APending Publication Date: 2025-04-29ANT YIKANG (GUANGZHOU) INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411959439.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

It is difficult to accurately determine which department the patient should go to for consultation or treatment, resulting in mis-number and misvisiting medical treatment.

Method used

During the instant communication message conversation with the user, problem messages with medical intentions are identified, and these problem messages and corresponding answer messages are stored in the reference context set as question and answer communication message groups; when the number of question and answer communication message groups reaches a specified number, prompt instructions are constructed based on these question and answer communication message groups, and the department recommendation large language model is called for department recommendation.

Benefits of technology

It has achieved a full understanding of the user's health status and needs in multiple rounds of conversations, comprehensively analyzed the symptom information provided by the user, and accurately recommended the most suitable medical department, which has improved the accuracy and efficiency of patient registration, and reduced the medical problem caused by wrong registration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903150A_ABST
    Figure CN119903150A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a medical hospital guide method and a related device. The method comprises the following steps: in a process of carrying out an instant messaging message conversation with a user, identifying to obtain a problem message with a medical intention; taking the question message with the medical intention and the corresponding answer message as a question-answer communication message group, and putting the question-answer communication message group into a reference context set; and under the condition that the number of the question and answer communication message groups in the reference context set reaches a specified number, constructing a prompt instruction based on the question and answer communication message groups in the reference context set, and calling a department recommendation large language model to indicate the department recommendation large language model to output recommended department information for the user. Through medical intention recognition and contextual information accumulation in multiple rounds of dialogues and in combination with a department recommendation large language model, the accuracy of patient registration and the doctor seeing efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The implementation methods in this application relate to the field of Internet medical technology, and in particular to a medical guidance method and related devices. Background Art

[0002] With the continuous advancement of medical technology and the increasing subdivision of hospital departments, many hospitals have now established dozens or even hundreds of specialist clinics, compared to the simple classification of internal medicine, surgery, gynecology and pediatrics in the past. Although this refined division of departments helps to provide more targeted treatment plans for diagnosed patients, it is usually difficult for ordinary patients who have not yet clearly identified their symptoms to accurately judge which department they should go to for consultation or treatment when they first see a doctor. Due to the lack of medical knowledge reserves of patients themselves, coupled with the complex sources of medical information and the lack of unified standardized guidance, patients are prone to deviations when describing symptoms and motivations for seeking medical treatment, resulting in wrong registration and misdiagnosis.

[0003] In order to solve the above problems, medical guidance technology can be used to assist patients in making preliminary disease judgments and selecting departments through intelligent means. However, existing medical guidance technologies mostly rely on pre-set symptom-department mapping rules or simple keyword matching strategies, and there are still cases of wrong appointments. Summary of the invention

[0004] In view of this, multiple embodiments of the present application are dedicated to providing a medical guidance method and related devices, which can improve the accuracy of patient registration.

[0005] One embodiment of the present application provides a medical guidance method, including: in the process of conducting an instant messaging conversation with a user, identifying a question message with a medical intention; placing the question message with a medical intention and the corresponding answer message as a question-and-answer communication message group into a reference context set; when the number of question-and-answer communication message groups in the reference context set reaches a specified number, constructing a prompt instruction based on the question-and-answer communication message groups in the reference context set, and calling a department recommendation large language model to instruct the department recommendation large language model to output recommended department information for the user.

[0006] One embodiment of the present application also provides a medical guidance device, including: an identification module, used to identify question messages with medical intentions during an instant messaging conversation with a user; a storage module, used to put question messages with medical intentions and corresponding answer messages as question-and-answer communication message groups into a reference context set; a recommendation module, used to construct prompt instructions based on the question-and-answer communication message groups in the reference context set when the number of question-and-answer communication message groups in the reference context set reaches a specified number, and to call a department recommendation large language model to instruct the department recommendation large language model to output recommended department information for the user.

[0007] One embodiment of the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the medical guidance method as described above.

[0008] One embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one computer program, and when the at least one computer program is executed by a processor, the medical guidance method as described above can be implemented.

[0009] One embodiment of the present application further provides a computer program product, which is used to implement the medical guidance method as described above.

[0010] In multiple implementations provided in the present application, during an instant messaging conversation with a user, question messages with medical intent are identified, and these question messages and corresponding answer messages are stored as question-and-answer communication message groups in a reference context set; when the number of question-and-answer communication message groups in the reference context set reaches a specified number, prompt instructions are constructed based on these question-and-answer communication message groups, and a large language model for department recommendation is called to make department recommendations. This enables the medical guidance device to fully understand the user's health status and needs in multiple rounds of conversations, comprehensively analyze the symptom information provided by the user, and accurately recommend the most suitable department for consultation. This improves the accuracy of patient registration, reduces the medical troubles caused by wrong registration, and improves the user experience of Internet medical services. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 A flowchart of a medical guidance method provided for one embodiment of the present application.

[0012] Figure 2 A flowchart of constructing prompt instructions based on a question-and-answer communication message group in the reference context set is provided for one embodiment of the present application.

[0013] Figure 3A schematic diagram of a module of a medical guidance device provided in one embodiment of the present application.

[0014] Figure 4 A schematic diagram of a computer device provided for one embodiment of the present application. DETAILED DESCRIPTION

[0015] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0016] In the description of the embodiments of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0017] In related technologies, with the continuous advancement of medical technology and the increasing subdivision of hospital departments, the difficulty of choice faced by patients before seeing a doctor has also increased. In the past, hospitals usually only had a few departments such as internal medicine, surgery, gynecology and pediatrics, and patients could easily choose the appropriate department to see a doctor based on their symptoms. However, with the continuous refinement of medical specialties, many large hospitals have now established dozens or even hundreds of specialist clinics. Although this subdivision helps to provide more accurate treatment plans for diagnosed patients, for ordinary patients who have not yet clearly identified the disease, it is often difficult to accurately judge which department to go to for consultation or treatment when they first see a doctor. In addition, the lack of patients' own medical knowledge reserves, coupled with the complexity of medical information sources and the lack of unified standardized guidance, make it easy for patients to deviate when describing symptoms and medical needs, resulting in registration errors or misdiagnosis.

[0018] Medical guidance technology mainly relies on pre-set symptom-department mapping rules or simple keyword matching strategies. Such methods have limitations in understanding patients’ real symptoms and needs, and it is difficult to make accurate department recommendations based on the contextual information that is gradually enriched in multiple rounds of conversations. In addition, traditional guidance devices often lack the integration of users’ real-time registration information and cannot make dynamic recommendations based on real-time number source data, further limiting the accuracy and efficiency of guidance. Therefore, the existing technology still has the problem that it is difficult for users to accurately select departments during medical registration. There is an urgent need for a guidance method that can fully understand user intentions, dynamically analyze symptom information, and make intelligent recommendations based on real-time number source data.

[0019] To solve the above problems, this application provides a medical guidance method based on multi-agent, which improves the accuracy of patient registration and medical treatment efficiency and improves the user's medical experience through medical intent recognition and context information accumulation in multiple rounds of dialogues, combined with a large language model for department recommendation.

[0020] An embodiment of the present application provides an example of an application scenario of a medical guidance method. The medical guidance method can be applied to a medical guidance device. A user can use a guidance service by interacting with the medical guidance device through a conversation.

[0021] The medical guidance device can intelligently identify and accumulate medical-related symptom information through multiple rounds of instant messaging dialogues with users, and finally construct prompt instructions based on the accumulated information, calling the department recommendation large language model (DepartmentRecommendation LLM) to make department recommendations.

[0022] For example, a patient has a conversation with a medical guidance device through an Internet medical platform, describing her health status and symptoms. The following is the specific conversation process:

[0023] First round of dialogue:

[0024] User asked: "I often feel chest tightness recently, especially after exercise."

[0025] The medical guidance device replied: "Chest tightness may be caused by a variety of reasons, including heart problems, respiratory diseases or gastroesophageal reflux. It is recommended that you go to the cardiology department for further examination."

[0026] In this round of conversation, the medical guidance device recognizes that the user's question message has medical intent, generates a corresponding answer message, stores this question and answer pair in the instant messaging message set, and stores it as a question and answer communication message group in the reference context set.

[0027] Second round of dialogue:

[0028] User asked: "In addition, I often feel tired and my sleep quality at night is not good."

[0029] The medical guidance device answers: "Fatigue and poor sleep quality may be related to a variety of factors, such as abnormal thyroid function, anemia or chronic illness."

[0030] Similarly, the medical guidance device recognizes that this question message has a medical intention, and forms a question-answer communication message group with the answer message and stores it in the reference context set. At this time, there are already two question-answer communication message groups in the reference context set.

[0031] The third round of dialogue:

[0032] User asked: "It's raining today, making it inconvenient to travel."

[0033] The medical guidance device answers: "Please ask questions related to medical care."

[0034] At this point, the medical guidance device considers that the third round of dialogue does not have a medical intent and clears the reference context set.

[0035] For another example, a patient talks to a medical guidance device through an Internet medical platform and describes her health status and symptoms. The following is the specific conversation process:

[0036] First round of dialogue:

[0037] User asked: "I often feel chest tightness recently, especially after exercise."

[0038] The medical guidance device answered: "Chest tightness may be caused by a variety of reasons, including heart problems, respiratory diseases, or gastroesophageal reflux. It is recommended that you go to the cardiology department for further examination."

[0039] In this round of conversation, the medical guidance device recognizes that the user's question message has medical intent, generates a corresponding answer message, stores this question and answer pair in the instant messaging message set, and stores it as a question and answer communication message group in the reference context set.

[0040] Second round of dialogue:

[0041] User question: "Besides that, I often feel tired and my sleep quality at night is not good."

[0042] The medical guidance device answers: "Fatigue and poor sleep quality may be related to a variety of factors, such as abnormal thyroid function, anemia or chronic illness."

[0043] Similarly, the medical guidance device recognizes that this question message has a medical intention, and forms a question-answer communication message group with the answer message and stores it in the reference context set. At this time, there are already two question-answer communication message groups in the reference context set.

[0044] The third round of dialogue:

[0045] User asked: "I've also been having mild stomach pain lately, especially after meals."

[0046] The medical guidance device answered: "Stomach pain may be related to digestive system problems, such as gastritis or gastroesophageal reflux. It is recommended that you go to the gastroenterology department for further evaluation."

[0047] When the number of question-and-answer communication message groups consisting of question messages raised continuously by users in the reference context set reaches 3, the medical guidance device can construct prompt instructions based on these accumulated question-and-answer communication message groups. The prompt instructions include the symptom information such as chest tightness, fatigue, poor sleep quality and stomach pain described by the user, and are combined with the medical knowledge base and real-time number source data within the guidance system. Subsequently, the medical guidance device calls the department recommendation large language model, retrieves relevant information from an external authoritative medical database through RAG technology, and assists the model in making more accurate department recommendations.

[0048] The department recommendation large language model comprehensively analyzes the multi-round conversation content in the reference context, uses RAG technology to retrieve the latest medical research and authoritative guidelines, and matches Ms. Li's symptoms with the most appropriate department to visit. The department recommendation large language model ultimately recommends Ms. Li to go to the cardiology, endocrinology and gastroenterology departments, and provides doctor information and appointment links for relevant departments.

[0049] For example, the latest heart disease research can be retrieved through RAG technology, showing that chest tightness after exercise is closely related to heart function. At the same time, combined with research related to the endocrine system, it is confirmed that fatigue and poor sleep quality may be related to abnormal thyroid function, while stomach pain points to digestive system problems. Based on these search results, the department recommendation large language model generates the following recommendations.

[0050] Recommended departments: Cardiology (60% probability), Endocrinology (25% probability), and Gastroenterology (15% probability).

[0051] Reason for recommendation: "Chest tightness is highly correlated with abnormal heart function, fatigue and poor sleep quality may be related to abnormal thyroid function, and stomach pain points to digestive system problems. Taking all factors into consideration, it is recommended that you go to the cardiology department for a comprehensive examination. Endocrinology and gastroenterology are also suitable choices."

[0052] Doctor information and appointment link: The medical guidance device can recommend three doctors who have extensive experience in cardiology, endocrinology and gastroenterology and currently have available appointments based on real-time appointment data. It also provides options for sorting by distance and recommendation index, allowing Ms. Li to efficiently choose a suitable doctor for registration.

[0053] Through the recognition of medical intentions in multiple rounds of conversations, the accumulation of question-and-answer communication message groups, the construction of prompt instructions, and the calling of a large language model for department recommendations, combined with the assistance of RAG technology, the medical guidance system achieves accurate department recommendations, significantly improves the success rate of registration and the efficiency of medical treatment, and optimizes the user's medical experience.

[0054] See also Figure 1. The embodiment of the present application provides a medical guidance method. The medical guidance method can be applied to a medical guidance device. The medical guidance device can refer to an electronic device with certain computing capabilities. The electronic device can have a controller and a memory, etc. Of course, in some embodiments, the medical guidance device can also refer to a program module running in an electronic device. The medical guidance method can include the following steps.

[0055] Step S110: During the instant messaging conversation with the user, a problematic message with medical intent is identified.

[0056] Step S120: The question message with medical intent and the corresponding answer message are put into a reference context set as a question-answer communication message group.

[0057] Step S130: When the number of question-answer communication message groups in the reference context set reaches a specified number, a prompt instruction is constructed based on the question-answer communication message groups in the reference context set, and the department recommendation large language model is called to instruct the department recommendation large language model to output recommended department information for the user.

[0058] In this embodiment, the medical guidance device can conduct an instant messaging dialogue with the user through the user interaction interface, receive the question message raised by the user and answer it. The user interaction interface can be a display interface. The user interaction interface can provide a text or voice input function for the user to receive the question message raised by the user, and display the answer message obtained by the medical guidance device to the question message raised by the user to the user. The question message raised by the user can be divided into a question message with medical intention and a question message without medical intention. For example, suppose the question message raised by the user is "The weather is so good today, the wind and the sun are beautiful, and it must be very comfortable to bask in the sun in the afternoon." This question message belongs to a question message without medical intention. Suppose the question message raised by the user is "I slept very badly last night, and my eyes were red and swollen after I woke up this morning, and they were full of bloodshot. What should I do?" This question belongs to a question message with medical intention. Specifically, after receiving the question message raised by the user, the medical guidance device can call the intent recognition large language model (IntentRecognition LLM) to identify the question message with medical intention. The intent recognition large language model is used to identify whether the content contained in the question message raised by the user has medical intention.

[0059] After identifying a question message with medical intent, the medical guidance device can call the Medical Q&A LLM to further ask questions about the user's symptoms. The Medical Q&A LLM is used to conduct a question-and-answer dialogue with the user, and then deeply explore the user's current symptoms. The medical guidance device can put a group of question messages with medical intent and corresponding answer messages as a group of question-and-answer communication message groups into a reference context set. The reference context set can be a data set stored in the memory of the medical guidance device, and the reference context set stores multiple question-and-answer communication message groups.

[0060] When the number of question-answer communication message groups in the reference context set reaches a specified number, the medical guidance device can construct a prompt instruction based on the question-answer communication message groups in the reference context set, and call a department recommendation large language model (Department Recommendation LLM) to instruct the department recommendation large language model to output recommended department information for the user. The department recommendation large language model is used to comprehensively analyze the conversation content in the question-answer communication message group, and recommend multiple possible departments and disease information accordingly.

[0061] In multiple embodiments of the present application, during an instant messaging conversation with a user, question messages with medical intent are identified, and these question messages and corresponding answer messages are stored as question-and-answer communication message groups in a reference context set; when the number of question-and-answer communication message groups in the reference context set reaches a specified number, prompt instructions are constructed based on these question-and-answer communication message groups, and the department recommendation large language model is called to make department recommendations. This enables the medical guidance device to fully understand the user's health status and needs in multiple rounds of conversations, comprehensively analyze the symptom information provided by the user, and accurately recommend the most suitable department for consultation. This medical guidance method can improve the accuracy of patient registration and the efficiency of medical treatment, and reduce the medical troubles caused by wrong registration.

[0062] In some implementations, when it is determined that the user's question message does not have a medical intent, the medical guidance device may clear the reference context set.

[0063] In this embodiment, the medical guidance device can clear the reference context set when it is determined that the user's question message has no medical intention, so as to process the message not related to medical treatment sent by the user during the instant messaging message conversation.

[0064] Specifically, the medical guidance device can determine whether the user's question message has a medical intent through the intention recognition large language model. If the intention recognition large language model determines that there is no medical intent, the medical guidance device will clear all question-and-answer communication message groups in the reference context set. For example, the user asks in a conversation, "Who is the author of the last forty chapters of "Dream of Red Mansions?" The intention recognition large language model determines that the question message does not have a medical intent, and the medical guidance device will clear all question-and-answer communication message groups in the reference context set. By clearing the reference context set when a non-medical intent is identified, it is possible to prevent the conversation content that is not related to medical care from affecting the subsequent medical guidance process, so that the medical guidance device always makes department recommendations based on the latest conversation content that has medical intent.

[0065] This embodiment can effectively prevent the impact of conversation content unrelated to medical care on the subsequent medical guidance process by clearing the reference context set when it is determined that the user's question message does not have any medical intent, so that the medical guidance device always makes department recommendations based on the latest conversation content with medical intent, thereby improving the accuracy of department recommendations.

[0066] In some embodiments, the medical guidance device can construct an intention recognition instruction based on the user's question message; use the intention recognition instruction to call the intention recognition large language model to instruct the intention recognition large language model to output an intention recognition result for the question message; if the intention recognition result indicates that there is no medical intention in the question message, clear the reference context set.

[0067] In this embodiment, the medical guidance device can construct an intention recognition instruction based on the user's question message after receiving the question message raised by the user. Specifically, the medical guidance device can construct an intention recognition instruction based on the question message raised by the user and a pre-designed instruction template. For example, the question message raised by the user is "I always feel headache and a little nauseous recently. Do I feel like there is a big problem?" The pre-designed instruction template may be "Patient question: [specific question message], based on the above information, determine whether the question raised by the patient has a medical intent." Based on the above question message raised by the user and the pre-designed instruction template, the following intention recognition instruction can be constructed: "Patient question: I always feel headache and a little nauseous recently. Do I feel like there is a big problem? Based on the above information, determine whether the question raised by the patient has a medical intent."

[0068] After the intention recognition instruction is constructed, the medical guidance device can use the intention recognition instruction to call the intention recognition large language model to instruct the intention recognition large language model to output the intention recognition result for the question message. The intention recognition large language model can be obtained by fine-tuning the general large language model using pre-designed prompts and relevant medical data, without the need to train a completely new model from scratch, thereby saving resources. Specifically, the pre-designed prompts may be instructions similar to the above-mentioned intention recognition instructions, which will not be repeated here. The relevant medical data may be data in a clinical knowledge base (such as Drugs.com, DrugBank, NHS Health, etc.), obtained after pre-processing operations such as text extraction, formatting, and data cleaning. In some embodiments, based on the question message raised by the aforementioned user, "I always feel headaches and a little nauseous recently. Do I feel like there is a big problem?", the intention recognition result for the question message output by the intention recognition large language model may be "The question raised by the patient has medical intent."

[0069] If the intention recognition result indicates that the question message does not have a medical intention, the medical guidance device can clear the reference context set. If the intention recognition result indicates that the question message has a medical intention, the medical guidance device can call the medical question and answer large language model to further mine the symptoms described in the question message raised by the user.

[0070] By constructing an intention recognition instruction to instruct the intention recognition large language model to output the intention recognition result for the problem message, and then performing the subsequent guidance process based on the intention recognition result, this implementation method enables the medical guidance device to always focus on processing medical-related user needs, thereby improving the accuracy of the medical guidance method.

[0071] In some embodiments, the medical guidance device may feedback a designated answer message to the user when the question message does not have a medical intent; wherein the designated answer message is used to prompt the user to ask questions related to medical treatment.

[0072] In this embodiment, when there is no medical intention in the question message, the medical guidance device can feedback a designated answer message to the user. The designated answer message is a standardized response predefined by the medical guidance device, which is used to prompt the user to ask medical-related questions and clarify the user's medical needs. Specifically, for example, the designated answer message may be: "Please describe your health problems and we will recommend a suitable department for you." Or "Please describe your health condition or specific symptoms so that we can recommend a suitable department for you." By feeding back the designated answer message to the user, the medical guidance device can help the user express his health condition and medical needs more accurately, and reduce guidance errors caused by unclear descriptions. In addition, the designated answer message can promptly correct the user's non-medical related questions, avoid system resources being occupied by irrelevant conversation content, and thus improve the response efficiency of the medical guidance device.

[0073] This embodiment can help users express their health conditions and medical needs more accurately and reduce medical guidance errors caused by unclear descriptions by providing feedback to the user with a designated answer message for asking medical questions when the question message raised by the user does not have any medical intent.

[0074] In some embodiments, the medical guidance device can construct an answer prompt instruction based on the question message with medical intention; use the answer prompt instruction to call a medical question and answer large language model to instruct the medical question and answer large language model to output an answer message for the question message with medical intention; and form a question and answer communication message group with the question message with medical intention and the answer message and store it in the reference context set.

[0075] In this embodiment, the medical guidance device can, when determining that the question message raised by the user has a medical intention, construct an answer prompt instruction based on the question message with a medical intention. Specifically, the medical guidance device can construct an answer prompt instruction based on the question message raised by the user and a pre-designed instruction template. For example, the question message raised by the user is "Recently, I feel uncomfortable in my abdomen, and I have persistent abdominal distension and abdominal pain. Which department should I go to?" The pre-designed instruction template may be "Patient question: [specific question message], based on the above information, further explore the patient's current symptoms." Based on the above question message raised by the user and the pre-designed instruction template, the following answer prompt instruction can be constructed: "Patient question: Recently, I feel uncomfortable in my abdomen, and I have persistent abdominal distension and abdominal pain. Which department should I go to? Based on the above information, further explore the patient's current symptoms."

[0076] After the answer prompt instruction is constructed, the medical guidance device can use the answer prompt instruction to call the medical question and answer big language model to instruct the medical question and answer big language model to output an answer message for the question message with medical intention. The medical question and answer big language model can be obtained by fine-tuning the general big language model using pre-designed prompts and relevant medical data. Specifically, the pre-designed prompts can be instructions similar to the above-mentioned answer prompt instructions, which will not be repeated here. The relevant medical data can be data such as medical clinical cases, patient medical records, etc. containing patient consultation records, which are obtained after pre-processing operations such as text extraction, formatting, and data cleaning. Based on the question message raised by the aforementioned user, "Recently, I feel uncomfortable in my abdomen and have persistent abdominal distension and abdominal pain. Which department should I go to?" The answer message output by the medical question and answer big language model for the question message can be "How long have your abdominal distension and abdominal pain symptoms lasted?" Further, the medical question and answer big language model can conduct multiple rounds of question-and-answer dialogues with the user, so as to deeply explore the symptoms of the user. For example, the specific dialogue content of the multiple rounds of question-and-answer dialogues can be:

[0077] User: "I have been feeling uncomfortable in my abdomen lately, with persistent bloating and abdominal pain. Which department should I go to?"

[0078] Medical Q&A language model: "How long did your abdominal distension and pain symptoms last?"

[0079] User: "Less than a week."

[0080] Medical Q&A language model: "When you have abdominal pain and bloating, which type or types of pain do you prefer? (1. Dull pain: It feels vague and not sharp, usually a continuous, oppressive pain; 2. Colic: Severe, paroxysmal pain; 3. Dull pain: Continuous, mild pain, feeling like muscle or joint discomfort; 4. Stabbing pain: Mild, needle-like pain; 5. Distending pain: Feeling of abdominal distension and increased internal pressure)"

[0081] User: "Dull pain."

[0082] Medical Q&A language model: "Are there any of the following associated symptoms? (1. Vomiting, acid reflux; 2. Hiccups, bloating; 3. Fever, chills; 4. Diarrhea; 5. Hematuria; 6. Constipation)"

[0083] In the above-mentioned multi-round question-and-answer dialogue, for each question message raised by the user, the medical guidance device first calls the intention recognition large language model to determine whether the question message has a medical intention. If the output of the intention recognition large language model shows that the question message has a medical intention, the medical guidance device will call the medical question and answer large language model to feedback an answer message to the user for the question message, and store the question message and the answer message as a group of question and answer communication message groups in the reference context set. Storing the question message with medical intention and the answer message into a question and answer communication message group in the reference context set helps the medical guidance device to better understand the user's health status and medical needs based on the dialogue context information between the user and the medical question and answer large language model, thereby improving the accuracy of department recommendations.

[0084] This embodiment constructs an answer prompt instruction, calls the medical question and answer big language model to instruct the medical question and answer big language model to output an answer message for the question message with medical intent, and forms a question and answer communication message group with the question message with medical intent and the answer message and stores it in the reference context set. This embodiment enables the medical guidance device to better understand the user's health status and medical needs based on the conversation context information between the user and the medical question and answer big language model, thereby improving the accuracy of department recommendations.

[0085] In some implementations, during the instant communication message dialogue with the user, the medical guidance device may form an instant communication message set recording question messages and answer messages, and the reference context set is stored independently of the instant communication message set.

[0086] In this embodiment, the instant communication message set is used to store all messages included in the instant communication message dialogue between the user and the medical guidance device, and the reference context set is used to store the question messages with medical intentions raised by the user and the corresponding answer messages, and the reference context set is stored independently of the instant communication message set. By storing all messages included in the instant communication message dialogue between the user and the medical guidance device in the instant communication message set, the medical guidance device can completely track each question asked by the user and the corresponding answer, so that all messages between the user and the medical guidance device have integrity and traceability. Storing the reference context set independently from the instant communication message set helps to distinguish between messages with medical intentions and other messages without medical intentions, thereby avoiding interference of the messages without medical intentions in the medical guidance process.

[0087] This embodiment can help the medical guidance device distinguish between messages with medical intent and other messages without medical intent by independently storing the instant messaging message set that records question messages and answer messages and the reference context set, thereby avoiding interference of the medical guidance process with the messages without medical intent.

[0088] In some embodiments, the medical guidance device may construct a prompt instruction based on the question and answer communication message groups in the reference context set only when the number of question and answer communication message groups consisting of question messages continuously raised by users in the reference context set reaches a specified number; wherein the specified number is a positive integer greater than 1.

[0089] In this embodiment, when the number of question-answer communication message groups consisting of question messages continuously raised by the user in the reference context set reaches a specified number, the medical guidance device will construct a prompt instruction based on the question-answer communication message groups in the reference context set. The specified number is a positive integer greater than 1, which means that before constructing the prompt instruction, the medical guidance device has received at least two question messages with medical intentions raised by the user and fed back corresponding answer messages to the user. By setting a threshold for the number of question-answer communication message groups, the medical guidance device can enter the subsequent department recommendation process only on the premise that sufficient information describing the user's symptoms has been obtained, thereby improving the accuracy of department recommendations.

[0090] Specifically, in some embodiments, the specified number is 3. For example, in the multi-round question-and-answer dialogue corresponding to the first question message raised by the aforementioned user, "Recently, I feel uncomfortable in my abdomen, and have persistent abdominal distension and abdominal pain. Which department should I go to?", when the reply message output by the medical question-and-answer large language model is "Are there any of the following accompanying symptoms? (1. Vomiting, acid reflux; 2. Hiccups, abdominal distension; 3. Fever, chills; 4. Diarrhea; 5. Hematuria; 6. Constipation)", the number of question-and-answer communication message groups in the reference context concentration reaches the specified number of 3 groups, and the medical guidance device will construct a prompt instruction based on the 3 groups of question-and-answer communication message groups.

[0091] See also Figure 2 The step of constructing a prompt instruction based on the question-answer communication message group in the reference context set includes the following steps:

[0092] Step S210: Generate a certain amount of medical knowledge similar to the question-answer communication message group based on the question-answer communication message group in the reference context set and the medical data knowledge base.

[0093] Step S220: Construct a standard instruction template for calling the department recommendation large language model.

[0094] Step S230: The question-answer communication message group in the reference context set, a certain amount of medical knowledge similar to the question-answer communication message group, and the standard instruction template are used as prompt instructions and input into the department recommendation large language model.

[0095] The medical data knowledge base is an external database of the medical guidance device, and the medical data knowledge base can be a data knowledge base of a specific medical field or organization. By storing the structured data and unstructured data in the medical data knowledge base in a search engine and establishing an index, the question-answer communication message group in the reference context set and the medical data knowledge base are vectored by word embedding technology, and the similarity between the vectors is calculated for vector retrieval, thereby generating a certain number of medical knowledge similar to the question-answer communication message group. For example, in some embodiments, the certain number of medical knowledge similar to the question-answer communication message group can be the top 10 medical knowledge with the highest similarity to the question-answer communication message group in the medical data knowledge base. The standard instruction template for calling the department recommendation large language model can be "Conversation content between the patient and the medical guidance device: [specific multi-round dialogue content], based on the above information, recommend a department that meets the patient's symptoms." The department recommendation large language model can be obtained by fine-tuning the general large language model using pre-designed prompts and related medical data. The pre-designed prompts can be instructions similar to the above-mentioned standard instruction templates, which will not be repeated here. The relevant medical data may be data in a data set specifically used for fine-tuning (such as MedTrinity-25M, cMeKG, CMD, etc.), which is obtained after preprocessing operations such as text extraction, formatting, and data cleaning.

[0096] In some embodiments, for example, when the question-answer communication message group in the reference context set is a multi-round question-answer dialogue corresponding to the first question message raised by the aforementioned user, "Recently, I feel uncomfortable in my abdomen, with persistent abdominal distension and abdominal pain. Which department should I go to?", the output of the department recommendation large language model may be:

[0097] Gastroenterology 70% (Explanation: Abdominal bloating and abdominal pain, especially those that last for less than a week and are dull pain, should first be considered as digestive system problems, such as gastrointestinal dysfunction or mild inflammation); General Surgery 30% (Explanation: Although the symptoms are not acute, abdominal bloating and abdominal pain may also involve surgical conditions such as intestinal obstruction, which require attention.).

[0098] Gastrointestinal dysfunction 60% (Explanation: According to the description, it may be a temporary disorder of gastrointestinal function caused by factors such as diet and stress.); Mild gastritis or enteritis 40% (Explanation: The dull pain may come from mild inflammation of the stomach or intestines, which is common in short-term discomfort.).

[0099] This embodiment sets a threshold for the number of question-and-answer communication message groups so that the medical guidance device can enter the subsequent department recommendation process only after sufficient information describing the user's symptoms has been obtained. This can avoid department recommendation deviations caused by insufficient collection of user symptom information, thereby improving the accuracy of department recommendations made by the medical guidance device.

[0100] See also Figure 3 The embodiment of the present application also provides a medical guidance device. The medical guidance device includes: an identification module, a storage module and a recommendation module.

[0101] An identification module, used to identify problematic messages with medical intent during an instant messaging conversation with a user;

[0102] A storage module, used for putting the question message with medical intention and the corresponding answer message as a question-answer communication message group into a reference context set;

[0103] A recommendation module is used to construct a prompt instruction based on the question-answer communication message groups in the reference context set when the number of question-answer communication message groups in the reference context set reaches a specified number, and to call the department recommendation large language model to instruct the department recommendation large language model to output recommended department information for the user.

[0104] Regarding the specific functions and effects achieved by the medical guidance device, please refer to other embodiments of the present application for comparative explanation, and no further description will be given here. Each module in the medical guidance device can be implemented in whole or in part by software, hardware, and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0105] See also Figure 4 The present embodiment may provide a computer device, the computer device comprising: a memory, and one or more processors communicatively connected to the memory; the memory stores instructions executable by the one or more processors, the instructions are executed by the one or more processors, so that the one or more processors implement the medical guidance method as described above.

[0106] In some implementations, the computer device may include a processor, a memory, and a communication interface connected by a system bus. The memory may store an operating system and related computer programs.

[0107] The embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the processor implements the medical guidance method as described above.

[0108] The present application also provides a computer program product comprising instructions, which, when executed by a processor, enables a computer to implement the aforementioned medical guidance method.

[0109] The user information or user account information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, etc.) involved in multiple implementation methods of the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0110] It should be understood that the specific examples in this article are only intended to help those skilled in the art to better understand the embodiments of the present application, rather than to limit the scope of the present invention.

[0111] It can be understood that in the various implementations of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the implementation methods of the present application.

[0112] It can be understood that the various embodiments described in this application can be implemented individually or in combination, and the embodiments of this application are not limited to this.

[0113] Unless otherwise stated, all technical and scientific terms used in the embodiments of the present application have the same meaning as those generally understood by those skilled in the art of the technical field of the present application. The terms used in the present application are only for the purpose of describing specific embodiments and are not intended to limit the scope of the present application. The term "and / or" used in the present application includes any and all combinations of one or more related listed items. The singular forms of "a kind of", "above" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0114] It can be understood that the processor of the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method implementation can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (DigitalSignal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiment of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0115] It is understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (programmable ROM, PROM), an erasable programmable read-only memory (erasable PROM, EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory may be a random access memory (RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0116] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0117] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method implementation methods and will not be repeated here.

[0118] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0119] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0120] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0121] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0122] The above is only a specific implementation of the present application, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A medical guidance method, characterized in that: include: In the process of instant messaging conversation with the user, identifying problematic messages with medical intent; The question message with medical intention and the corresponding answer message are put into the reference context set as a question-answer communication message group; When the number of question-and-answer communication message groups in the reference context set reaches a specified number, a prompt instruction is constructed based on the question-and-answer communication message groups in the reference context set, and the department recommendation large language model is called to instruct the department recommendation large language model to output recommended department information for the user.

2. The method according to claim 1, characterized in that: The method further comprises: When it is determined that the user's question message does not have a medical intent, the reference context set is cleared.

3. The method according to claim 2, characterized in that When it is determined that the user's question message does not have a medical intent, the step of clearing the reference context set includes: Build intent recognition instructions based on the user's question message; Using the intention recognition instruction to call the intention recognition large language model to instruct the intention recognition large language model to output an intention recognition result for the question message; When the intent recognition result indicates that the question message has no medical intent, the reference context set is cleared.

4. The method according to claim 2, characterized in that: The method further comprises: In the case that the question message does not have a medical intention, a designated answer message is fed back to the user; wherein the designated answer message is used to prompt the user to ask questions related to medical treatment.

5. The method according to claim 1, characterized in that The step of placing the question message with medical intent and the corresponding answer message as a question-answer communication message group into a reference context set includes: Constructing an answer prompt instruction based on the question message with medical intention; Using the answer prompt instruction to call the medical question and answer large language model to instruct the medical question and answer large language model to output an answer message for the question message with medical intent; The question message with medical intention and the answer message form a question-answer communication message group and store it in the reference context set.

6. The method according to claim 1, characterized in that In the process of conducting an instant communication message dialogue with the user, an instant communication message set recording question messages and answer messages is formed, and the reference context set is stored independently of the instant communication message set.

7. The method according to claim 1, characterized in that When the number of question-answer communication message groups in the reference context set reaches a specified number, a step of constructing a prompt instruction based on the question-answer communication message groups in the reference context set, calling a department recommendation large language model, and instructing the department recommendation large language model to output recommended department information for the user includes: Only when the number of question-answer communication message groups consisting of question messages continuously raised by users in the reference context set reaches a specified number, a prompt instruction is constructed based on the question-answer communication message groups in the reference context set; wherein the specified number is a positive integer greater than 1.

8. A medical guidance device, characterized in that: include: An identification module, used to identify problematic messages with medical intent during an instant messaging conversation with a user; A storage module, used for putting the question message with medical intention and the corresponding answer message as a question-answer communication message group into a reference context set; A recommendation module is used to construct a prompt instruction based on the question-answer communication message groups in the reference context set when the number of question-answer communication message groups in the reference context set reaches a specified number, and to call the department recommendation large language model to instruct the department recommendation large language model to output recommended department information for the user.

9. A computer device, characterized in that: The computer device includes a memory and a processor, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and when the at least one computer program is executed by a processor, the method according to any one of claims 1 to 7 can be implemented.

11. A computer program product, characterized in that The computer program product is used to implement the method according to any one of claims 1 to 7.