Intelligent follow-up visit method and system based on large model

Through intelligent follow-up methods based on large models, personalized follow-up problems are generated, feedback content is judged and generated, and key medical information is extracted, which solves the problem of low processing efficiency of existing systems and achieves more efficient and flexible follow-up processing.

CN120220933AInactive Publication Date: 2025-06-27杭州惠每医疗科技有限公司

Patent Information

Application Number
CN202510704759.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-06-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing intelligent follow-up system lacks intelligent and personalized adaptability, and it is difficult to effectively deal with patients' personalized needs and complex follow-up scenarios, resulting in low processing efficiency.

Method used

Using a large model-based intelligent follow-up method, by obtaining the patient's follow-up data, targeted follow-up questions are generated based on the patient's disease type, the BERT classification model is used to judge the rationality of the patient's reply content, and reasonable feedback content is generated. At the same time, formatted information is extracted, key medical information is extracted and organized, and structured follow-up records are generated.

Benefits of technology

It improves the efficiency and flexibility of patient follow-up processing, can more accurately identify patients' needs and health status, and adjust follow-up strategies in real time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120220933A_ABST
    Figure CN120220933A_ABST
Patent Text Reader

Abstract

The invention relates to an intelligent follow-up visit method and system based on a large model, and the method comprises the steps: obtaining follow-up visit data of a patient, and guiding a large model to generate a patient follow-up visit problem for the disease type of the patient through employing an instruction type prompt word based on a preset follow-up visit problem corresponding to the disease type of the patient. And calling the large model to construct a BERT classification model based on the patient follow-up problem and the corresponding patient reply content. And calling the BERT classification model to judge whether the reply content of the patient meets a preset standard, and generating reasonable feedback content when the reply content of the patient meets the preset standard. And performing formatted information extraction on the reasonable feedback content and the patient follow-up problem to identify and extract key medical information, and performing standardized arrangement on the key medical information to generate a structured follow-up record. According to the method, the follow-up work of the patient is automatically processed based on a large model, the demand and health state of the patient are recognized through multiple rounds of dialogues, the follow-up strategy is adjusted in real time, and the follow-up processing efficiency and flexibility of the patient are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of medical assistance technologies, and particularly to an intelligent follow-up method and system based on a large model. Background Art

[0002] Currently, existing intelligent follow-up systems mainly rely on preset conversation scripts and fixed follow-up paths for interaction. Such systems usually rely on rule engines or simple machine learning models, and perform follow-up tasks by manually setting up follow-up processes, question templates, and conditional judgment logics. The main implementation methods include: Rule configuration-driven: The system conducts question-and-answer according to fixed logical rules through preset follow-up conversation scripts and paths, and it is difficult to flexibly meet the personalized needs of patients; Template-based response: The follow-up system uses preset text or recorded content to interact with patients, lacking the ability of intelligent generation, and unable to provide dynamically adjusted responses according to the specific conditions of patients; Manual assistance and adjustment: In some intelligent follow-up systems, medical staff still need to manually optimize follow-up strategies or adjust processes to improve the accuracy and pertinence of follow-up; Limited data utilization: Although some systems can record the follow-up feedback of patients, it is mainly used for simple statistical analysis, and large-scale data is not fully utilized to optimize follow-up strategies or predict follow-up results.

[0003] Therefore, the limitation of the existing technology lies in its lack of certain intelligent and personalized adaptation capabilities, and the efficiency of handling the personalized needs of patients and complex follow-up scenarios is relatively low. Especially in the face of different disease types and diverse patient feedback, the rigid processes of traditional follow-up systems are difficult to meet clinical needs and have poor flexibility. Summary of the Invention

[0004] Based on this, it is necessary to provide an intelligent follow-up method and system based on a large model with high processing efficiency and good flexibility during patient follow-up for the above technical problems.

[0005] The present invention provides an intelligent follow-up method based on a large model, and the method includes: Obtain the follow-up data of the patient, and based on the preset follow-up questions corresponding to the patient's disease type, use directive prompt words to guide the large model to generate patient follow-up questions for the patient's disease type; Invoke the large model to construct a BERT classification model based on the patient follow-up questions and the corresponding patient response content; Invoke the BERT classification model to judge whether the patient response content meets the preset standard, and generate reasonable feedback content when the patient response content meets the preset standard; Perform formatted information extraction on the reasonable feedback content and the patient follow-up questions to identify and extract key medical information, and perform standardized collation on the key medical information to generate a structured follow-up record; Among them, the follow-up data includes the patient's personal information and medical history information, the preset standards include text integrity, medical relevance, sensitive information detection and patient intention identification, and the key medical information includes changes in patient symptoms, medication status and abnormal feedback on disease types.

[0006] In one embodiment, the obtaining of the patient's follow-up data, based on the preset follow-up questions corresponding to the patient's disease, uses a command prompt word to guide the large model to generate the patient follow-up questions for the patient's disease, including: Guide the large model to generate initial follow-up questions corresponding to the patient's disease based on the preset follow-up questions through command prompt words; The large model is called to compare the quality of responses to different questioning methods, and the initial follow-up questions are rewritten to select follow-up questions corresponding to the questioning method with the highest response quality to obtain the patient follow-up questions.

[0007] In one embodiment, calling the BERT classification model to determine whether the patient's reply content meets the preset criteria, and generating reasonable feedback content when the patient's reply content meets the preset criteria, includes: Using the patient's reply content as input to the BERT classification model, so as to call the BERT classification model to determine whether the text corresponding to the patient's reply content is complete; When the patient's reply is complete, the BERT classification model is called to determine whether the patient's reply is medical-related content, and at the same time, whether the patient's reply contains preset sensitive information, so as to intercept the patient's reply if the patient's reply contains the sensitive information; Calling the BERT classification model to identify the core demands of the patient based on the patient's reply content to extract the patient's key intentions, and generating the reasonable feedback content based on the key intentions; Among them, the patient's key intentions include whether the symptoms worsen, whether there are adverse drug reactions, and whether a follow-up visit is needed.

[0008] In one embodiment, calling the BERT classification model to determine whether the patient's reply content meets the preset criteria, and generating reasonable feedback content when the patient's reply content meets the preset criteria, also includes: Establishing a medical background knowledge base, and performing structured storage of medical knowledge through the medical background knowledge base; When the patient's reply content contains the medical knowledge, the medical background knowledge base is searched based on the patient's reply content through RAG to extract medical knowledge fragments whose relevance to the patient's reply content exceeds a first threshold; Use the medical knowledge fragment as the context information of the prompt dialog box of the large model, and use it together with the patient's reply content as the input of the large model to train the large model; Among them, the medical knowledge includes medical guidelines, disease diagnosis and treatment specifications, patient medication information, and rehabilitation suggestions.

[0009] In one embodiment, before formatting the reasonable feedback content and patient follow-up questions to extract key medical information, standardizing the key medical information, and generating a structured follow-up record, it further includes: Obtain historical follow-up records corresponding to multiple patient diseases with a similarity exceeding a second threshold for multiple patients, establish an index based on the historical follow-up records, and perform text vectorization processing to construct a historical dialogue library; Obtain the patient's reply content during the follow-up of the current patient, and retrieve historical dialogue records with a similarity exceeding a third threshold to the patient's reply content from the historical dialogue library through the RAG semantic matching algorithm; Use the historical dialogue record as the context information of the prompt dialog box of the large model to train the large model.

[0010] In one embodiment, the method further includes: Obtain historical follow-up records, where the historical follow-up records include the Q&A interaction content between doctors and patients, and perform structured annotation on the historical follow-up records to obtain an annotation dataset; Based on the annotation dataset, combine SFT supervised fine-tuning to fine-tune and train the base large model, input multiple groups of Q&A interaction content during the fine-tuning training process, and split the model output using a structured reply format.

[0011] In one embodiment, the method further includes: Establish a historical question index, store historical follow-up questions based on the historical question index, and when generating new follow-up questions, calculate the text similarity between the new follow-up question and the historical follow-up question through BERT similarity to identify and eliminate new follow-up questions with a text similarity exceeding a fourth threshold to the historical follow-up question; Judge whether the patient follow-up question generated by the large model matches the corresponding patient reply content through rule matching combined with semantic analysis, and rewrite or regenerate the patient follow-up question when the patient follow-up question does not match the patient reply content.

[0012] The present invention also provides an intelligent follow-up system based on a large model, and the system includes: A follow-up question generation module, which is used to obtain the follow-up data of patients, and based on the preset follow-up questions corresponding to the patient's disease type, uses imperative prompt words to guide the large model to generate patient follow-up questions for the patient's disease type; A model construction module, which is used to call the large model to construct a BERT classification model based on the patient follow-up questions and the corresponding patient response content; A response content determination module, which is used to call the BERT classification model to determine whether the patient response content meets the preset criteria, and generate reasonable feedback content when the patient response content meets the preset criteria; A follow-up record generation module, which is used to perform formatted information extraction on the reasonable feedback content and patient follow-up questions to identify and extract key medical information, and perform standardized collation on the key medical information to generate a structured follow-up record; Among them, the follow-up data includes the patient's personal information and medical record information, the preset criteria include text integrity, medical relevance, sensitive information detection, and patient intention recognition, and the key medical information includes patient symptom changes, medication conditions, and disease type abnormal feedback.

[0013] The present invention also provides an electronic device, including a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it implements the intelligent follow-up method based on the large model as described in any one of the above.

[0014] The present invention also provides a computer storage medium, storing a computer program, and when the computer program is executed by a processor, it implements the intelligent follow-up method based on the large model as described in any one of the above.

[0015] The above intelligent follow-up method and system based on the large model obtain the follow-up data of patients, and based on the preset follow-up questions corresponding to the patient's disease type, use imperative prompt words to guide the large model to generate patient follow-up questions for the patient's disease type. Then, call the large model to construct a BERT classification model based on the patient follow-up questions and the corresponding patient response content, and then call the BERT classification model to determine whether the patient response content meets the preset criteria, and generate reasonable feedback content when the patient response content meets the preset criteria. Finally, perform formatted information extraction on the reasonable feedback content and patient follow-up questions to identify and extract key medical information, and perform standardized collation on the key medical information to generate a structured follow-up record. This method uses artificial intelligence technology based on the large model to automatically process the follow-up work after the patient is discharged, accurately identifies the needs and health status of the patient through multiple rounds of conversations, and adjusts the follow-up strategy in real time, improving the efficiency and flexibility of patient follow-up processing. Description of the Drawings

[0016] To more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0017] Figure 1 One of the schematic flowcharts of the intelligent follow-up method based on a large model provided by the present invention; Figure 2 Schematic diagram of the overall intelligent follow-up process of the intelligent follow-up method based on a large model in a specific embodiment provided by the present invention; Figure 3 Another schematic flowchart of the intelligent follow-up method based on a large model provided by the present invention; Figure 4 Another schematic flowchart of the intelligent follow-up method based on a large model provided by the present invention; Figure 5 Another schematic flowchart of the intelligent follow-up method based on a large model provided by the present invention; Figure 6 Another schematic flowchart of the intelligent follow-up method based on a large model provided by the present invention; Figure 7 Another schematic flowchart of the intelligent follow-up method based on a large model provided by the present invention; Figure 8 Another schematic flowchart of the intelligent follow-up method based on a large model provided by the present invention; Figure 9 Schematic diagram of the structure of the intelligent follow-up system based on a large model provided by the present invention; Figure 10 Internal structure diagram of a computer device in an embodiment. Detailed implementation manners

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.

[0019] The following will describe Figures 1 to 10 the intelligent follow-up method and system based on a large model of the present invention.

[0020] As Figure 1As shown, in one embodiment, an intelligent follow-up method based on a large model includes the following steps: Step S110: Obtain the follow-up data of the patient. Based on the preset follow-up questions corresponding to the patient's disease type, use imperative prompt words to guide the large model to generate patient follow-up questions for the patient's disease type.

[0021] Among them, the follow-up data includes the patient's personal information and medical record information.

[0022] Specifically, the server obtains the patient's personal information and medical record information, and based on the preset follow-up questions corresponding to the patient's disease type in them, uses imperative prompt words to guide the large model to generate patient follow-up questions for the patient's disease type.

[0023] Combined with Figure 2 As shown, in a specific embodiment, the intelligent follow-up method based on a large model provided by the present invention first, according to the relevant information of the patient to be followed up, including but not limited to age, gender, discharge diagnosis, discharge date, discharge medications, discharge instructions, etc., combined with the preset follow-up questions corresponding to the disease type, uses imperative prompt words to guide the large model to generate personalized follow-up questions that meet the requirements to ensure the pertinence and effectiveness of the follow-up content. In addition, after generating the preliminary personalized follow-up questions, in order to improve the accuracy of the subsequent model responses, the large model is further introduced to rewrite the follow-up questions, and the response quality of different questioning methods is compared through experiments. Finally, the group of follow-up questions with the best response quality is selected as the patient follow-up questions.

[0024] Step S120: Call the large model to construct a BERT classification model based on the patient follow-up questions and the corresponding patient response content.

[0025] Specifically, the server calls the large model to construct a BERT classification model based on the patient follow-up data and the corresponding patient response content.

[0026] Step S130: Call the BERT classification model to determine whether the patient response content meets the preset criteria, and generate reasonable feedback content when the patient response content meets the preset criteria.

[0027] Among them, the preset criteria include text integrity, medical relevance, sensitive information detection, and patient intention recognition.

[0028] Specifically, the server calls the BERT classification model constructed in step S120 to determine whether the patient response content meets the preset criteria of text integrity, medical relevance, sensitive information detection, and patient intention recognition, and generates the final reasonable feedback content when the patient response content meets all the preset criteria.

[0029] Combined with Figure 2As shown, in a specific embodiment, the intelligent follow-up method based on a large model provided by the present invention automatically generates reasonable feedback content according to the patient's response during the follow-up process, including the following: Judgment on the rationality of the patient's response: Judge the rationality of the patient's response to ensure the effectiveness and safety of the subsequent follow-up process. Integrity check: By constructing a text classification model based on BERT, automatically judge the integrity of the patient's response content. The large model inputs the patient's response content and judges whether the expression of the response content is complete and whether the response content is meaningful, so as to avoid the interruption of the follow-up process or the problem of incorrect judgment caused by incomplete response content.

[0030] Among them, the large model inputs the patient's response content and makes a judgment according to the following criteria: Complete judgment criteria: The text structure is complete, without obvious missing or broken sentences; Incomplete judgment criteria: There are obvious text incoherences or breaks, making the information difficult to understand. Judgment result processing: Judged as complete: directly enter the subsequent follow-up process, and the doctor can make further judgments based on this response content; Judged as incomplete: then automatically prompt the patient "Sorry, I didn't hear clearly. Could you please say it again?"

[0031] Rationality check: Use the BERT classification model to review the rationality of the patient's response, including two aspects: 1) Medical relevance judgment: Use the BERT classification model to classify the patient's response content and judge whether it belongs to medical-related content to avoid the influence of irrelevant information on follow-up decisions.

[0032] Specifically, first, perform classification discrimination. Based on the trained medical relevance classification model, calculate the classification probability of the response content text. If the probability is higher than the set threshold (such as 0.9), it is considered that the response content belongs to medical-related content, otherwise automatically prompt the patient "Sorry, this question exceeds my professional knowledge and I can't answer you. Let's continue to follow up on the disease recovery situation."

[0033] 2) Sensitive information detection: Detect whether the patient's response contains sensitive information such as politics, religion, violence, and law violations. By constructing a multi-classification model, automatically identify the above sensitive information content and take corresponding interception or prompt measures to ensure the compliance and safety of the system.

[0034] In this embodiment, during the construction of the BERT multi-classification model, first, text data containing sensitive information categories such as politics, religion, violence, and illegality are collected and organized to ensure data diversity and coverage, and then the collected data is cleaned to remove irrelevant characters. After that, the data is labeled to ensure that each data sample has a clear category label. During model training, a pre-trained natural language processing model (BERT) is selected for transfer learning to improve the classification effect. During model prediction, the patient's reply content is input into the BERT multi-classification model, and the corresponding prediction probability is output to determine whether the reply content text involves sensitive information. For sensitive information, the patient is automatically prompted "I'm sorry, this question is beyond my professional knowledge and I can't answer you. Let's continue to follow up on the recovery of the disease."

[0035] 3) Patient intent recognition: The core demands of patients are automatically identified through the BERT classification model to extract the key intentions of patients in order to provide corresponding feedback content. The core demand recognition process is based on the text classification model, which analyzes the patient's response content and classifies it according to preset categories, such as complaints, praise, registration, consultation on medication, consultation on diagnosis and treatment, etc., to provide preset targeted responses, such as: Registration: "I'm sorry, the follow-up platform currently does not have the registration function. You can make an appointment on our hospital's WeChat official account." Medication consultation: "I'm sorry, I'm a follow-up staff and cannot interfere with medication. I suggest you come to the outpatient clinic and have a face-to-face evaluation by the doctor before deciding whether to use medication and which medication to use." In this embodiment, in order to improve the response accuracy and dialogue coherence of the large model during the automatic follow-up process, a relevant knowledge enhancement mechanism is introduced, which mainly includes two aspects: background knowledge enhancement and historical dialogue example enhancement: Background knowledge enhancement: The goal of background knowledge enhancement is to combine the relevant background knowledge base of follow-up questions and perform retrieval-augmented generation (RAG) on the patient's responses to improve the accuracy and medical rationality of the model's responses.

[0036] First, construct a background knowledge base. The construction of the background knowledge base is based on the follow-up disease types and covers medical guidelines, disease diagnosis and treatment specifications, medication information, rehabilitation suggestions, etc., to ensure the systematicness and retrievability of medical knowledge. The background knowledge base adopts a hierarchical structure, with the disease type as the core, and classifies and stores various relevant medical knowledge around this disease type. For example, for benign breast tumors, the background knowledge base will include medical knowledge such as wound care, regular reexamination, diet management, breast care, rehabilitation exercises, and protection of the affected limb after surgery. When the patient's reply contains specific medical-related content (such as symptoms, medication problems, etc.), medical knowledge can be retrieved based on RAG, and the medical knowledge fragment most relevant to the follow-up question can be extracted.

[0037] Among them, the determination criteria for the most relevant medical knowledge fragment are as follows: Word vector representation: Use BERT to perform text embedding on the patient's reply to generate the corresponding word vector representation. The medical content under this disease type in the knowledge base is also encoded by BERT to form the corresponding vector index.

[0038] Similarity calculation: Calculate the cosine similarity between the word vector of the patient's reply and the word vectors of the background knowledge related to the disease type in the knowledge base.

[0039] Relevance threshold: Set the similarity threshold of 0.85 as the determination criterion. Only when the similarity between the patient's reply and a certain medical knowledge fragment in the knowledge base ≥ 0.85, is this medical knowledge fragment considered the most relevant medical knowledge fragment.

[0040] Knowledge integration and generation: Use the retrieved background knowledge as the context information of the large model Prompt (prompt dialog box), and input it together with the patient's original reply content into the large model, so that it can incorporate more medical knowledge backgrounds when generating a reply. This process enables the large model to not only rely on its own existing parameter knowledge but also dynamically combine the latest or more comprehensive medical backgrounds by providing additional medical information, thereby improving the accuracy and professionalism of the generated reply. Additionally, the retrieved background knowledge and the patient's input together constitute the input of the model, which can prompt it to combine external knowledge during the reasoning process and enhance its understanding and answering ability for complex follow-up questions. When the large model receives the Prompt, it can not only process the patient's original reply content but also associate other relevant medical information, thereby optimizing the depth and breadth of medical knowledge invocation and enhancing the medical Q&A ability of the large model.

[0041] For example, if a patient asks during a follow-up visit, "Is it normal to have edema after taking hormonal drugs?" The system retrieves relevant knowledge, obtains the common side effects of hormonal drugs, including the incidence rate of edema and treatment suggestions. The model generates an enhanced response, providing a more medically based answer based on the patient's question and the retrieved background knowledge, such as "Hormonal drugs may cause edema. It is recommended that you pay attention to changes in your weight, control your salt intake, and adjust your medication under the guidance of a doctor." Enhancement of historical dialogue examples: The goal of enhancing historical dialogue examples is to utilize historical follow-up records to improve the consistency and rationality of the large model in consecutive follow-up conversations. Since the patient's response content often has context relevance, relying solely on the current follow-up question for answering may lead to insufficient context understanding. Therefore, in this example, through RAG retrieval and in combination with past similar dialogue examples, the dialogue performance of the model is optimized.

[0042] First, collect and store historical follow-up conversations. Form question-and-answer pairs from the patient's responses and the model's answers in the follow-up conversations, and perform text vectorization to build a historical dialogue library.

[0043] Under the same follow-up disease type, the historical follow-up conversations are processed through the following steps: Manual review and extraction of question-and-answer pairs: At the initial stage of the follow-up, manually review the conversation content, correct inappropriate parts in the large model's answer, organize the patient's response and the corrected model answer into standardized question-and-answer pairs, and store them.

[0044] Text vectorization: Use the BERT deep learning model to convert the text into vector representations for subsequent retrieval and matching.

[0045] Retrieval of similar dialogue examples: When the patient responds to a question during the current follow-up, based on the semantic matching algorithm, retrieve the most similar dialogue example from the historical dialogue library: Text vectorization: Vectorize the patient's current response using the BERT model to generate the corresponding semantic representation.

[0046] Similarity calculation: Calculate the cosine similarity between this vector and the standardized patient response vectors stored in the historical dialogue library under this disease type.

[0047] Matching determination: If the similarity is greater than 0.85, it is considered that the question is similar to a certain question-and-answer pair in the historical record, and this question-and-answer pair in the historical record can be used as a historical dialogue example.

[0048] Incorporation of examples into generation: Use the retrieved historical dialogue examples as the context information of the Prompt, enabling it to refer to past conversations when generating responses, and improving the continuity and personalization of the conversation.

[0049] In the process of example integration, first, we need to build Prompt, and use the retrieved historical conversation examples as the context information of the big model Prompt, and input them into the big model together with the patient's original reply content. After that, we perform context enhancement, that is, when the model generates a reply, it will refer to the above historical conversation examples to maintain the consistency of the conversation style and respond to the patient's questions more accurately.

[0050] In this embodiment, the prompt format that combines background knowledge and historical conversation examples includes: [background knowledge] {background knowledge} [conversation example] {conversation example} [patient information] Title: {name} [questions to be followed up] {question list}.

[0051] In this example, responding based on a large model is the core of the entire follow-up process. In order to improve the quality of the model's responses and the level of intelligence, this example uses the Foundation Model as the basis and optimizes it through SFT (Supervised Fine-Tuning) to make it more in line with the needs of the follow-up scenario. In addition, in order to ensure the rationality of the response, structured expression, and dynamic adaptation of the address, a series of optimization strategies are adopted to enhance the applicability and interactive experience of the model: Follow-up model optimization based on SFT: In the process of intelligent follow-up, although the general large language model (LLM) has a strong generation capability, it is not optimized for medical follow-up scenarios, which may lead to inaccurate answers, lack of medical logic or lack of interactivity. Therefore, this method uses SFT (supervised fine-tuning) technology to fine-tune the follow-up dialogue data to improve the model's responsiveness.

[0052] First, collect real follow-up data, including question-and-answer interactions between doctors and patients (or family members), and perform structured annotation on the data to ensure the quality of the training data. Second, annotate the content categories of the doctor’s answers, including: response (providing medical advice, explaining the condition, etc.); question (asking about changes in the condition, medication, etc.); follow-up (further confirmation or additional questions after the patient’s answer); and title (the title of the listener during the follow-up). For example, a certain response fragment of the doctor will be labeled “<Response> OK,< / 响应> <Question>Do you have any other questions?< / 提问> ". When annotating data, check whether the medical logic of the doctor's response is reasonable to ensure that the training data can effectively guide the large model to generate answers that meet medical standards.

[0053] Through data annotation, the consistency, logic and medical professionalism of the big model's questions and answers in medical follow-up can be enhanced, making the follow-up process closer to real clinical needs.

[0054] Large model fine-tuning process: Base model selection: The Qwen (Tongyi Qianwen) model is adopted as the base model. Based on its powerful language understanding ability, its applicability in the medical follow-up scenario is further optimized.

[0055] Training method: The LoRA (Low-Rank Adaptation) technique is used for lightweight fine-tuning to reduce the computational resource requirements while maintaining the model's generalization ability and efficient adaptation to medical follow-up tasks.

[0056] Training data: During the fine-tuning process, multi-turn dialogue data is used as the training data instead of single-turn Q&A data to enhance the model's context understanding ability.

[0057] Application of the fine-tuned model: Automatically answering patient responses: For the feedback from patients during follow-up, such as symptom changes, medication conditions, etc., generate answers that comply with medical norms and provide further follow-up suggestions; Intelligent prompting: When the patient's answer is incomplete or there are medical doubts, the model can automatically generate prompts to guide the patient to provide more detailed information to assist doctors in better judging the condition.

[0058] During the follow-up process, ensuring the model's responses are reasonable and orderly is a key issue. For this reason, in this example, a structured response format is adopted during the fine-tuning process, splitting the model's output into two parts: "reply" and "response", to ensure that it first reasonably answers the patient's questions and then guides to the next follow-up session.

[0059] The structured split of the reply is as follows: <reply>...< / reply>: This part is used to directly respond to the patient's questions, ensuring the answer is complete, professional, and in line with medical logic. For example, if the patient feedbacks "I still cough after taking the medicine", the model should first provide a targeted medical reply, such as "Some patients may still cough in the initial stage of taking the medicine, but generally it will gradually relieve within 3 - 5 days."; <response>...< / response>: This part is used to guide the patient to the next follow-up question to ensure the coherence of the follow-up process. For example, after answering the cough question, the model can continue to ask "<response>Have you had a fever or shortness of breath recently?< / response>" to further evaluate the condition.

[0060] During the actual follow-up process, the person conducting the follow-up may not be the patient himself / herself, but rather a family member (such as parents, children, spouse, etc.). Therefore, during the address recognition and adaptation process, special markers are used for the addresses involved in the conversation in the SFT training data. For example: "Hello, [Title], may I ask about the patient's current symptoms?" Here, "[Title]" is used to dynamically replace the actual address, such as "Sir", "Madam", "Mom", "Dad", etc. If the person conducting the follow-up says "I am the child's mother", the model needs to automatically adjust the address to "Hello, Mom". If the person conducting the follow-up says "I am his friend", a more neutral address, such as "Hello", is used to avoid misjudgment. Finally, when the model outputs, "[Title]" is replaced with an appropriate address.

[0061] Since large language models may repeat questions during the generation of follow-up questions due to unclear context or model reasoning biases. For example, in the previous few rounds of conversation, the question "Have you had a fever recently?" has been asked, but the model may generate the same or a similar question in subsequent rounds, affecting the follow-up experience. Therefore, in this example, a repeated question detection algorithm is used to identify and eliminate questions that have already been asked, that is, store the questions that have already been asked for comparison when generating new questions. Before generating a new question, BERT similarity calculation is used to evaluate the text similarity between the new question and the questions that have already been asked. If the similarity is greater than 0.9, it is considered that the question has already been asked, and the next unasked question needs to be replaced in the list of follow-up questions to be asked.

[0062] During the follow-up process, the patient's answer may affect the selection of subsequent questions. For example, if the patient answers "No fever", but the model still generates a question like "What was the temperature of the fever recently?", it is obviously unreasonable. Therefore, by setting a series of rule requirements in the prompt, such as: "When the patient replies that there is no fever, there is no need to ask about the fever temperature of the patient", to prevent the follow-up questions from conflicting with the patient's historical reply content.

[0063] During the intelligent follow-up process, the follow-up questions are usually based on a preset process, covering aspects such as condition assessment, medication situation, symptom relief, etc. To ensure that all key questions are covered and important information is not missed, in this example, the execution order of the follow-up questions is checked and optimized, and it is also checked whether any important questions are missed before the end of the follow-up session. If so, they are intelligently supplemented.

[0064] The system stores the questions that have been asked and compares them with all the preset questions in the follow-up question list: Similarity calculation: The BERT model is used to calculate the semantic similarity between the asked question and the preset question; Judging omission: If the similarity between a preset question and the asked question is greater than 0.9, it is considered that the question has been covered; Otherwise, the system considers that the question may be omitted; Intelligent supplementation: For key questions with a similarity lower than 0.9 and not covered, the system will ask supplementary questions before the end of the follow-up session to ensure the integrity of the follow-up.

[0065] Step S140, perform formatted information extraction on the reasonable feedback content and the patient follow-up questions to identify and extract key medical information, and standardize and organize the key medical information to generate a structured follow-up record.

[0066] Among them, the key medical information includes changes in patient symptoms, medication taking conditions, and abnormal feedback on disease types.

[0067] Specifically, the server performs formatted information extraction on the reasonable feedback content generated in step S130 and the corresponding patient follow-up questions to identify and extract the key medical information of changes in patient symptoms, medication taking conditions, and abnormal feedback on disease types, and standardize and organize the extracted key medical information to finally generate a structured follow-up record.

[0068] Combined Figure 2 As shown, in a specific embodiment, the intelligent follow-up method based on a large model provided by the present invention, after the follow-up is completed, will perform automated formatted information extraction on the conversations or records during the follow-up based on the large model. This process includes two core parts: the determination criteria for key medical information and the formatted information extraction process of the large model.

[0069] The key medical information is predefined manually and mainly includes, but is not limited to, the following aspects: Changes in patient symptoms: Evaluate whether the symptoms are relieved, aggravated, or new symptoms appear; Medication taking conditions: Check whether the patient takes the medicine as prescribed, whether the dosage and frequency meet the requirements, and whether there are drug adverse reactions; Abnormal feedback: Pay attention to whether the patient reports physical discomfort, whether there are abnormal results in laboratory tests, etc.

[0070] The formatted information extraction of the large model is a process of structurally extracting the key medical information in the follow-up content based on a preset Prompt: Input: Follow-up record; Prompt-guided extraction: Use a specially designed Prompt to guide the large model to identify and extract key medical information according to established rules; Structured information output: The extracted medical information is output in a standard format for subsequent storage, analysis, or display.

[0071] After the information extraction is completed, according to the predefined follow-up record template, the extracted key content will be standardized and structured follow-up records will be automatically generated. These follow-up records will adopt a unified format, including patient basic information, follow-up time, follow-up method, symptom evolution, medication compliance, abnormal conditions, doctor's suggestions, etc., to ensure that the information is complete and clear, facilitating quick access and analysis by doctors or medical staff.

[0072] The above intelligent follow-up method based on the large model obtains the patient's follow-up data, and based on the preset follow-up questions corresponding to the patient's disease type, uses imperative prompt words to guide the large model to generate patient follow-up questions for the patient's disease type. Then, it calls the large model to construct a BERT classification model based on the patient follow-up questions and the corresponding patient response content, and then calls the BERT classification model to determine whether the patient response content meets the preset standards, and generates reasonable feedback content when the patient response content meets the preset standards. Finally, it performs formatted information extraction on the reasonable feedback content and the patient follow-up questions to identify and extract key medical information, and standardizes the key medical information to generate structured follow-up records. This method uses artificial intelligence technology based on the large model to automatically process the follow-up work after the patient is discharged, accurately identifies the patient's needs and health status through multiple rounds of conversations, and adjusts the follow-up strategy in real time, improving the efficiency and flexibility of patient follow-up processing.

[0073] As Figure 3 shown, in one embodiment, the intelligent follow-up method based on the large model provided by the present invention, step S110 specifically includes the following steps: Step S111, using imperative prompt words to guide the large model to generate initial follow-up questions corresponding to the patient's disease type based on the preset follow-up questions.

[0074] Step S112, calling the large model to compare the quality of the response content corresponding to different questioning methods, and rewriting the initial follow-up questions to select the follow-up questions corresponding to the questioning method with the highest quality of the response content, obtaining the patient follow-up questions.

[0075] As Figure 4 shown, in one embodiment, the intelligent follow-up method based on the large model provided by the present invention, step S130 specifically includes the following steps: Step S131, taking the patient response content as the input of the BERT classification model to call the BERT classification model to determine whether the text corresponding to the patient response content is complete.

[0076] Step S132, when the patient response content is complete, calling the BERT classification model to determine whether the patient response content belongs to medical-related content, and at the same time detecting whether the patient response content contains preset sensitive information, and intercepting the patient response content when the patient response content contains sensitive information.

[0077] Step S133: Invoke the BERT classification model to identify the patient's core demands based on the patient's reply content, extract the patient's key intentions, and generate reasonable feedback content based on the key intentions.

[0078] Among them, the patient's key intentions include whether the symptoms have worsened, whether there are adverse drug reactions, and whether a follow-up visit is required.

[0079] As Figure 5 shown, in one embodiment, the intelligent follow-up method based on a large model provided by the present invention, step S130 specifically further includes the following steps: Step S134: Establish a medical background knowledge base and structurally store medical knowledge through the medical background knowledge base.

[0080] Step S135: When the patient's reply content contains medical knowledge, retrieve the medical background knowledge base based on the patient's reply content through RAG to extract medical knowledge fragments with a relevance exceeding the first threshold to the patient's reply content.

[0081] Step S136: Use the medical knowledge fragments as context information for the prompt dialog box of the large model, and use them together with the patient's reply content as the input to the large model to train the large model.

[0082] Among them, medical knowledge includes medical guidelines, disease diagnosis and treatment specifications, patient medication information, and rehabilitation suggestions.

[0083] As Figure 6 shown, in one embodiment, before step S140 of the intelligent follow-up method based on a large model provided by the present invention, the following steps are further included: Step S610: Obtain historical follow-up records corresponding to multiple patient disease types with a similarity exceeding the second threshold for multiple patients, establish an index based on the historical follow-up records and perform text vectorization processing to construct a historical dialogue library.

[0084] Step S620: Obtain the patient's reply content during the follow-up of the current patient, and retrieve historical dialogue records with a similarity exceeding the third threshold to the patient's reply content from the historical dialogue library through the RAG semantic matching algorithm.

[0085] Step S630: Use the historical dialogue records as context information for the prompt dialog box of the large model to train the large model.

[0086] As Figure 7 shown, in one embodiment, the intelligent follow-up method based on a large model provided by the present invention further includes the following steps: Step S710: Obtain historical follow-up records, where the historical follow-up records include the Q&A interaction content between doctors and patients, and perform structured annotation on the historical follow-up records to obtain an annotated dataset.

[0087] Step S720: Fine-tune and train the base large model based on the annotated dataset combined with SFT supervised fine-tuning. During the fine-tuning training process, input multiple groups of Q&A interaction content, and at the same time, use a structured reply format to split the model output.

[0088] As Figure 8 shown, in one embodiment, the intelligent follow-up method based on a large model provided by the present invention further includes the following steps: Step S810: Establish a historical question index, store historical follow-up questions based on the historical question index. When generating a new follow-up question, calculate the text similarity between the new follow-up question and the historical follow-up questions through BERT similarity, so as to identify and eliminate new follow-up questions whose text similarity with the historical follow-up questions exceeds the fourth threshold.

[0089] Step S820: Determine whether the patient follow-up questions generated by the large model match the corresponding patient reply content through rule matching combined with semantic analysis, and rewrite the patient follow-up questions or regenerate patient follow-up questions when the patient follow-up questions do not match the patient reply content.

[0090] The intelligent follow-up system based on a large model provided by the present invention is described below. The intelligent follow-up system based on a large model described below can be mutually corresponding and referred to the intelligent follow-up method described above.

[0091] As Figure 9 shown, in one embodiment, an intelligent follow-up system based on a large model includes a follow-up question generation module 910, a model construction module 920, a reply content determination module 930, and a follow-up record generation module 940.

[0092] The follow-up question generation module 910 is used to obtain the follow-up data of the patient, and based on the preset follow-up questions corresponding to the patient's disease type, use an imperative prompt to guide the large model to generate patient follow-up questions for the patient's disease type.

[0093] The model construction module 920 is used to call the large model to construct a BERT classification model based on the patient follow-up questions and the corresponding patient reply content.

[0094] The reply content determination module 930 is used to call the BERT classification model to determine whether the patient reply content meets the preset standard, and generate reasonable feedback content when the patient reply content meets the preset standard.

[0095] The follow-up record generation module 940 is used to extract formatted information from the reasonable feedback content and patient follow-up questions, identify and extract key medical information, and standardize the key medical information to generate a structured follow-up record.

[0096] Among them, the follow-up data includes the patient's personal information and medical record information, the preset standards include text integrity, medical relevance, sensitive information detection, and patient intention recognition, and the key medical information includes changes in patient symptoms, medication conditions, and abnormal feedback on disease types.

[0097] Figure 10 The schematic diagram of the physical structure of an electronic device is illustrated. The electronic device can be an intelligent terminal, and its internal structure diagram can be as Figure 10 shown. The electronic device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above-mentioned intelligent follow-up method based on a large model is realized.

[0098] Those skilled in the art can understand that Figure 10 the structure shown in

[0099] is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the electronic device to which the solution of the present invention is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.

[0100] On the other hand, the present invention also provides a computer storage medium storing a computer program, and when the computer program is executed by a processor, the above-mentioned intelligent follow-up method based on a large model is realized.

[0101] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided by the present invention can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory.

[0102] By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct rambus dynamic RAM (DRDRAM), and rambus dynamic RAM (RDRAM), etc.

[0103] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0104] The above-described embodiments merely represent several implementation manners of the present invention. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention should be subject to the appended claims.

Claims

1. An intelligent follow-up method based on a large model, characterized in that The method comprises: Obtain the follow-up data of the patient, and based on the preset follow-up questions corresponding to the patient's disease, use the command prompt words to guide the large model to generate the patient follow-up questions for the patient's disease; Calling the large model to build a BERT classification model based on the patient follow-up questions and corresponding patient response content; Calling the BERT classification model to determine whether the patient's response content meets the preset criteria, and generating reasonable feedback content when the patient's response content meets the preset criteria; Formatting information extraction of the reasonable feedback content and patient follow-up questions to identify and extract key medical information, and standardizing and arranging the key medical information to generate structured follow-up records; The follow-up data includes the patient's personal information and medical record information.

2. The intelligent follow-up method based on a large model according to claim 1, wherein The method of obtaining the follow-up data of the patient, based on the preset follow-up questions corresponding to the patient's disease, uses the command prompt words to guide the large model to generate the patient follow-up questions for the patient's disease, including: Guide the large model to generate initial follow-up questions corresponding to the patient's disease based on the preset follow-up questions through command prompt words; The large model is called to compare the quality of responses to different questioning methods, and the initial follow-up questions are rewritten to select follow-up questions corresponding to the questioning method with the highest response quality to obtain the patient follow-up questions.

3. The intelligent follow-up method based on a large model according to claim 1, wherein The calling of the BERT classification model to determine whether the patient's reply content meets the preset standard, and generating reasonable feedback content when the patient's reply content meets the preset standard, includes: Using the patient's reply content as input to the BERT classification model, so as to call the BERT classification model to determine whether the text corresponding to the patient's reply content is complete; When the patient's reply is complete, the BERT classification model is called to determine whether the patient's reply is medical-related content, and at the same time, whether the patient's reply contains preset sensitive information, so as to intercept the patient's reply if the patient's reply contains the sensitive information; The BERT classification model is called to identify the core demands of the patient based on the patient's response content to extract the patient's key intentions, and generate the reasonable feedback content based on the key intentions.

4. The intelligent follow-up method based on a large model according to claim 3, wherein The calling of the BERT classification model to determine whether the patient's reply content meets the preset standard, and generating reasonable feedback content when the patient's reply content meets the preset standard, also includes: Establishing a medical background knowledge base, and performing structured storage of medical knowledge through the medical background knowledge base; When the patient's reply content contains the medical knowledge, the medical background knowledge base is searched based on the patient's reply content through RAG to extract medical knowledge fragments whose relevance to the patient's reply content exceeds a first threshold; The medical knowledge fragment is used as the context information of the prompt dialog box of the big model, and together with the patient's reply content, is used as the input of the big model to train the big model.

5. The intelligent follow-up method based on a large model according to claim 4, wherein Before formatting information extraction of the reasonable feedback content and patient follow-up questions to identify and extract key medical information and standardize the key medical information to generate a structured follow-up record, it also includes: Obtain historical follow-up records corresponding to multiple patient disease types with a similarity exceeding a second threshold among multiple patients, and establish an index and perform text vectorization processing based on the historical follow-up records to construct a historical dialogue library; Obtain the patient response content during the follow-up of the current patient, and retrieve historical dialogue records with a similarity exceeding a third threshold to the patient response content from the historical dialogue library through the RAG semantic matching algorithm; Use the historical dialogue records as the context information of the prompt dialog box of the large model to train the large model.

6. The intelligent follow-up method based on a large model according to claim 5, wherein, The method also includes: Obtain historical follow-up records, which include the Q&A interaction content between the doctor and the patient, and perform structured annotation on the historical follow-up records to obtain an annotation data set; Based on the annotation data set, fine-tune and train the base large model by combining SFT supervised fine-tuning, input multiple groups of Q&A interaction content during the fine-tuning training process, and split the model output using a structured response format.

7. The intelligent follow-up method based on a large model according to claim 6, wherein The method also includes: Establish a historical question index, store historical follow-up questions based on the historical question index, and calculate the text similarity between the new follow-up question and the historical follow-up questions through BERT similarity when generating a new follow-up question, so as to identify and eliminate new follow-up questions with a text similarity exceeding a fourth threshold to the historical follow-up questions; Judge whether the patient follow-up questions generated by the large model match the corresponding patient response content through rule matching combined with semantic analysis, and rewrite the patient follow-up questions or regenerate patient follow-up questions when the patient follow-up questions do not match the patient response content.

8. An intelligent follow-up system based on a large model, characterized in that, The system includes: A follow-up question generation module, configured to obtain follow-up data of a patient, and use an imperative prompt word to guide a large model to generate patient follow-up questions for the patient's disease type based on preset follow-up questions corresponding to the patient's disease type; A model construction module, configured to call the large model to construct a BERT classification model based on the patient follow-up questions and the corresponding patient response content; A response content determination module, configured to call the BERT classification model to determine whether the patient response content meets a preset standard, and generate reasonable feedback content when the patient response content meets the preset standard; A follow-up record generation module, configured to perform formatted information extraction on the reasonable feedback content and patient follow-up questions to identify and extract key medical information, and standardize the key medical information to generate a structured follow-up record; Wherein, the follow-up data includes the personal information and medical record information of the patient.

9. An electronic device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer storage medium stores a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Follow-up visit data acquisition method and device

    CN113990422A

  • Follow-up visit method and related device

    CN118014078A

  • Follow-up visit method and device based on medical health management, electronic equipment and medium

    CN118800485A

  • Automatic follow-up visit method and equipment for discharged patients

    CN120015259A

Cited By

  • Large model-based element type appeal generation method and system

    CN120781849A