Inquiring diagnosis and treatment and examination treatment suggestion method and device based on information updating management mechanism and storage medium

Through the information update management mechanism, fine-tuned large models and dynamic information management technology, the problem of insufficient utilization of historical diagnosis and treatment information in AI consultations is solved, the accuracy and efficiency of consultations are improved, and the personalized and interactive experience of diagnosis is enhanced.

CN120452845APending Publication Date: 2025-08-08SHANGHAI HUIHAO YISHENG INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510533096.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing AI consultation system has shortcomings in using patient history diagnosis and treatment information and understanding patient dialogue to extract patient condition information, resulting in limited personalization of diagnostic suggestions and single interactive experience, which affects the effectiveness of the consultation system and clinical application.

Method used

The information update management mechanism is adopted, and multiple rounds of consultation dialogue are established by obtaining patient identity information. The fine-tuning structured large model and fine-tuning dialogue large model are used to extract the condition information, and the information is divided into long-term memory and short-term memory. The dynamic domain control and forgetting mechanism are used for information management, and combined with importance scores and similarity assessment, consultation, diagnosis, treatment and examination and treatment suggestions are generated.

Benefits of technology

It significantly improves the accuracy and efficiency of consultation, realizes effective control of the amount of information, enhances the coherence and memory ability of AI consultation, and improves the personalized and interactive experience of diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120452845A_ABST
    Figure CN120452845A_ABST
Patent Text Reader

Abstract

The invention discloses an inquiry diagnosis and treatment and examination treatment suggestion method and device based on an information updating management mechanism and a storage medium. The method comprises the steps that patient identity information is acquired, and patient diagnosis and treatment information is acquired; establishing multiple rounds of inquiry dialogues, wherein the process comprises the following steps: initiating a first round of inquiry dialogue question; extracting patient condition information based on the patient answer information, and extracting associated information related to the patient condition information from the patient diagnosis and treatment information; summarizing the patient condition information and the associated information to obtain patient inquiry information; dividing patient inquiry information into long-term memory information and short-term memory information, and updating and maintaining based on an information updating management mechanism; calling the large model to give inquiry diagnosis and treatment based on the inquiry information of the patient, judging whether the inquiry is finished or not, and if not, obtaining a next round of inquiry dialogue problem through the large model; if yes, the large model gives final inquiry diagnosis and treatment, and the final inquiry diagnosis and treatment comprise examination and treatment suggestions. Therefore, historical diagnosis and treatment information of the patient is fully utilized, and inquiry accuracy and efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application provides a method, device and storage medium for consultation, diagnosis and treatment, and examination and treatment recommendation based on an information update management mechanism, relating to the technical field of large medical models. Background Art

[0002] AI-powered medical consultation is a key achievement in the development of modern medical information technology. It leverages artificial intelligence to conduct preliminary inquiries about a patient's condition and provide follow-up examination and treatment recommendations. This can help patients understand their health status earlier, replace doctor consultations, reduce the stress of medical consultations, and enhance the healthcare experience. With the continuous advancement of technology and its expanded application, AI-powered medical consultation will play an increasingly important role in improving public health. However, AI-powered medical consultation has gradually exposed some limitations in its application, such as insufficient storage and utilization of historical patient medical information, a monotonous interactive conversational experience, and limited personalization of diagnostic recommendations. These issues not only hinder the effectiveness of the consultation system but also limit its widespread adoption in clinical practice. Furthermore, during the consultation process, users may not provide all necessary information at once or may not express themselves clearly, making it difficult for the AI doctor to accurately understand their intent.

[0003] How to more effectively utilize patients' historical diagnosis and treatment information and how to more accurately understand patients' conversations and extract disease information have become technical problems that need to be solved urgently in this field. Summary of the Invention

[0004] The technical problem to be solved by this application is how to more effectively utilize the patient's historical diagnosis and treatment information in AI consultation and how to more accurately understand the patient's conversation and extract the condition information.

[0005] To solve the above technical problems, the technical solution of the present application provides a method for consultation, diagnosis, treatment and examination and treatment recommendation based on an information update management mechanism, the method comprising:

[0006] S1. Obtain patient identity information, and obtain patient diagnosis and treatment information based on the patient identity information;

[0007] S2. Establishing a multi-round consultation dialogue with the patient; the multi-round consultation dialogue process includes:

[0008] S21. Initiate the first round of consultation questions and guide the patient to answer;

[0009] S22, extracting the patient's condition information based on the patient's answer information, and extracting related information related to the patient's condition information from the patient's diagnosis and treatment information;

[0010] S23. Summarize the patient's condition information and related information to obtain patient consultation information; divide the patient consultation information into long-term memory information and short-term memory information, and update and maintain it based on the information update management mechanism;

[0011] S24: The big model is called to provide a consultation and treatment based on the patient's consultation information, and it is determined whether the consultation is completed. If not, the big model is used to obtain the next round of consultation dialogue questions, which the patient answers. If the consultation is completed, the big model provides a final consultation and treatment, which includes examination and treatment recommendations.

[0012] S25. Repeat steps S22-S24 until the consultation is completed.

[0013] Preferably, the extraction of the patient's condition information based on the patient's answer information is performed using a fine-tuned structured large model, wherein the fine-tuned structured large model is a large language model fine-tuned based on a medical condition dataset;

[0014] The process of extracting patient condition information based on the patient's answer information includes:

[0015] An information extraction prompt instruction for extracting the patient's condition information is constructed based on the patient's answer information, and the information extraction prompt instruction is input into the fine-tuned structured large model to generate the patient's condition information.

[0016] Preferably, the medical condition dataset is supplemented based on a plurality of patient condition information, and the medical condition dataset is used to perform fine-tuning training on the fine-tuned structured large model;

[0017] The fine-tuning training method of the fine-tuning structured large model is set to adopt the LoRA method to fine-tune the fine-tuning structured large model through the medical condition data set to obtain the fine-tuned fine-tuning structured large model.

[0018] Preferably, step S24 is performed using a fine-tuned dialogue model, where the fine-tuned dialogue model is a large language model fine-tuned based on a medical consultation and treatment dataset; step S24 includes:

[0019] Based on the patient's medical consultation information, a medical consultation and treatment prompt instruction is constructed for obtaining medical consultation and treatment, and the medical consultation and treatment prompt instruction is input into the fine-tuned dialogue model to generate medical consultation and treatment.

[0020] Preferably, step S24 further includes:

[0021] While calling the fine-tuning dialogue model to generate a medical consultation and treatment, the fine-tuning dialogue model is instructed to determine whether it is necessary to continue the medical consultation dialogue to obtain more patient medical information. If the medical consultation dialogue needs to continue, the fine-tuning dialogue model is used to obtain the next round of medical consultation questions. If the medical consultation dialogue does not need to continue, the fine-tuning dialogue model is used to obtain the final medical consultation and treatment.

[0022] Preferably, the medical consultation and treatment dataset is supplemented based on a plurality of medical consultations and treatments, and the medical consultation and treatment dataset is used to perform fine-tuning training on the fine-tuning dialogue model;

[0023] The fine-tuning training method of the fine-tuning dialogue model is set to adopt a combination of incremental learning + reinforcement fine-tuning and supervised fine-tuning (IL+RLFT, SFT) to fine-tune the fine-tuning dialogue model through the medical consultation and treatment data set to obtain the fine-tuned fine-tuning dialogue model.

[0024] Preferably, step S23 includes:

[0025] During the multi-round consultation dialogue process, each round of consultation dialogue will update and maintain the long-term memory information and short-term memory information;

[0026] All patient consultation information generated in this round was incorporated into short-term memory information;

[0027] Short-term memory information is filtered through a dynamic domain control mechanism;

[0028] The filtered information is integrated and updated with the long-term memory information through the information integration and updating mechanism to obtain new long-term memory information;

[0029] Short-term memory information is maintained based on the forgetting mechanism.

[0030] Preferably, the screening process of the dynamic domain control mechanism includes:

[0031] First, the importance of all information contained in the short-term memory is evaluated, and the importance of the information at time t is evaluated using the importance scoring function I(t);

[0032] The importance scoring function I(t) takes into account factors such as the frequency of recurrence of information, the contextual relevance of information, and user feedback;

[0033] The importance scoring function I(t) is set as: I(t) = α·f(t) + β·c(t) + γ·u(t)

[0034] Where α, β, and γ are weight coefficients, satisfying α + β + γ = 1, f(t) is the frequency of occurrence of information at time t, c(t) is the context relevance score of the information at time t, and u(t) is the user's feedback score on the information;

[0035] Then, the dynamic threshold control function D(t) is used to decide whether to transfer information from short-term memory to long-term memory. The dynamic threshold control function D(t) is implemented based on the importance score function I(t) and a distribution threshold θ:

[0036]

[0037] When D(t) = 1, the information is transferred to long-term memory; otherwise, the information remains in short-term memory or is forgotten;

[0038] The information integration and updating mechanism includes:

[0039] Update long-term memory information through integration function; long-term memory information is stored in the database in the form of weaviate vector library, and new information V that needs to be transferred to long-term memory information new By weighted averaging and existing long-term memory information V old After integration, the new long-term memory information is: V updated =η·V new +(1-η)·V old ; Among them, η is the integration weight, which controls the influence of new information on long-term memory information;

[0040] The forgetting mechanism includes:

[0041] For short-term memory information, a forgetting mechanism is defined to determine when the information is forgotten. The forgetting rate of the information is set to be proportional to time, and the forgetting function F(t) is defined as: F(t) = e -λt ; Where λ is the forgetting rate constant, when F(t) is lower than the threshold φ, the information is forgotten.

[0042] Preferably, the extraction of associated information related to the patient's condition information from the patient's diagnosis and treatment information includes:

[0043] The patient's condition information is vectorized and used as a query vector to search the patient's medical information. During the search process, a vector matching method based on cosine similarity is used to extract content related to the query vector from the patient's medical information.

[0044] A comprehensive ranking mechanism is adopted to evaluate the priority score by combining the importance score of information and the similarity measurement: P(t) = w1·I(t) + w2sim(q,v); where w1 and w2 are weight coefficients, satisfying w1+w2=1, I(t) represents the information importance scoring function, and sim(q,v) represents the cosine similarity value between the query vector and the retrieval vector. Based on the priority score P(t) and the preset threshold τ, low-priority information is filtered out, and only information with P(t) ≥ τ is extracted as relevant information.

[0045] The present application also provides a device including a storage module, a processing module and a human-computer interaction module. The storage module stores a computer program. When the processing module executes the computer program, the human-computer interaction module implements the steps of the aforementioned consultation, diagnosis and treatment and examination and treatment recommendation method based on the information update management mechanism.

[0046] The present application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the aforementioned method for consultation, diagnosis, treatment and examination and treatment recommendation based on the information update management mechanism.

[0047] The method for consultation, diagnosis, and treatment recommendation based on the information update management mechanism provided in this application stores the patient's condition description, medical history data, examination and test results and other treatment information in a structured manner, thereby making full use of the patient's historical diagnosis and treatment information, providing support for subsequent consultation, diagnosis, and treatment recommendations, and significantly improving the accuracy and efficiency of consultation. At the same time, based on the information update management mechanism, the patient's consultation information is managed to achieve effective control of the amount of information, significantly improving the coherence and memory ability of the AI consultation. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 This is a main flow chart of the method for consultation, diagnosis, treatment and examination and treatment recommendation provided in the embodiment of the present application;

[0049] Figure 2 A schematic diagram of a multi-round medical consultation process provided in an embodiment of the present application;

[0050] Figure 3 Schematic diagram for fine-tuning a large structured model based on a medical disease dataset;

[0051] Figure 4 Update and maintain schematic diagrams for patient consultation information based on the information update management mechanism;

[0052] Figure 5 Schematic diagram for fine-tuning the large dialogue model based on the medical consultation and treatment dataset;

[0053] Figure 6 This is a schematic diagram of the structure of the medical consultation device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] To make the present application more obvious and easy to understand, various exemplary embodiments will be introduced below. These examples are non-limiting, and it should be understood that they are used to illustrate the broader application aspects of the device, system and method. Without departing from the essence and scope of the present application, these embodiments can be subjected to various changes and can be replaced by equivalents. In addition, various changes can be carried out to adapt to the purpose, content or scope of the present application in order to adapt to special circumstances, materials, material components, treatment types, treatment actions or steps. All of these changes will be within the scope of protection of the present application.

[0055] Any materials, dimensions, or quantities described in the overview or detailed description are intended to be examples only and are not intended to limit the subject matter of this application. Furthermore, the various implementations of the embodiments described herein are intended to complement each other, rather than to replace each other, unless otherwise indicated. In other words, implementations from one embodiment can be freely combined with implementations from other embodiments, as those skilled in the art will readily appreciate, unless otherwise indicated.

[0056] In the description of this application, it should be noted that the terms "inner" and "outer" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, or the orientations or positional relationships in which the product of this application is typically placed when in use. These terms are intended solely to facilitate the description of this application and simplify the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limitations on this application. Furthermore, the terms "first" and "second" and the like are used solely for distinction and should not be construed as indicating or implying relative importance.

[0057] It should also be noted that, in the description of this application, unless otherwise expressly specified or limited, the terms "disposed" and "connected" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to direct connections, indirect connections through an intermediate medium, or internal connections between two components. Those skilled in the art will understand the specific meanings of the above terms in this application based on the specific circumstances.

[0058] Example

[0059] The present application embodiment provides a method for consultation and treatment (diagnosis) and examination and treatment recommendation based on an information update management mechanism, see Figure 1 , methods include:

[0060] Step S1: Obtain patient identity information, and obtain patient diagnosis and treatment information based on the patient identity information.

[0061] In one embodiment, step S1 obtains the patient's identity information by guiding the user to swipe the patient's medical insurance card to obtain the medical insurance number through a preset interactive interface, or guiding the user to enter the patient's identity information, such as ID number, age, gender, etc., to obtain the patient's identity information. Step S1 obtains the patient's medical information based on the patient's identity information. The patient's medical information refers to all the diagnosis, treatment, examination and other medical information of the patient that has been collected in the medical database system, especially the historical medical information and the medical information generated by the current medical treatment. It is understandable that in order to improve the efficiency of retrieving patient medical information, the data in the medical database should be pre-organized. The data in the medical database is complex and diverse, including the patient's chief complaint, medical history, examination and test reports, physical examination results, etc., involving various forms such as structured, semi-structured, and unstructured. In order to achieve the accuracy and reliability of intelligent AI consultation, the data can be effectively cleaned, labeled, coded and other pre-processing operations to improve the efficiency of retrieving patient medical information.

[0062] The present application embodiment provides a method for consultation, diagnosis, treatment, and examination and treatment recommendation based on an information update management mechanism, further comprising:

[0063] Step S2: Establish multiple rounds of consultation dialogues with the patient, obtain the patient's consultation information, and provide consultation, diagnosis, and examination and treatment suggestions;

[0064] See also Figure 2 The multi-round consultation dialogue process includes:

[0065] Step S21: Initiate the first round of consultation dialogue questions and guide the patient to answer;

[0066] Step S22: extracting the patient's condition information based on the patient's answer information, and extracting related information related to the patient's condition information from the patient's diagnosis and treatment information;

[0067] Step S23: Summarize the patient's condition information and related information to obtain patient consultation information; divide the patient consultation information into long-term memory information and short-term memory information, and update and maintain it based on the information update management mechanism;

[0068] Step S24: The large model is called to provide a consultation and treatment based on the patient's consultation information, and it is determined whether the consultation is completed. If not, the large model is used to obtain the next round of consultation dialogue questions, which the patient answers; if it is completed, the large model provides a final consultation and treatment, which includes examination and treatment recommendations;

[0069] Step S25: Repeat steps S22-S24 until the consultation is completed.

[0070] In one embodiment, establishing multiple rounds of consultation dialogues with the patient in step S2 is the consultation process of AI consultation, which requires the AI doctor role to conduct multiple rounds of consultation dialogues with the patient to conduct consultations, and finally give examination item recommendations on whether further examination is needed and treatment recommendations on whether treatment is needed based on the patient's condition.

[0071] Specifically, in step S21, the AI doctor character initiates the first round of medical consultation dialogue questions to guide the patient to answer; for example, the first fixed question is asked to the user through a preset medical consultation dialogue interface to start the consultation, such as "AI doctor: Hello, where does the patient feel uncomfortable?", thereby guiding the user to answer, or obtaining the patient's condition information from the user's answer. Specifically, the patient's condition information includes the patient's chief complaint and physical symptoms.

[0072] In step S22, the patient's condition information is first extracted based on the patient's answer information; the embodiment of the present application adopts a fine-tuned structured large model to extract the patient's condition information based on the patient's answer information, and constructs an information extraction prompt instruction for extracting the patient's condition information based on the patient's answer information, and inputs the information extraction prompt instruction into the fine-tuned structured large model to generate the patient's condition information.

[0073] For example, the information extraction prompt instruction for extracting the patient's condition information can be constructed according to the following information extraction prompt instruction template:

[0074]

[0075] In a further embodiment, since the user may express himself unclearly or non-standardly during the medical consultation dialogue, it is difficult for a general large model to extract the patient's condition information based on the user's answer. Therefore, the fine-tuned structured large model used in the embodiment of the present application to extract the patient's condition information based on the patient's answer information is a large language model fine-tuned based on a medical condition dataset.

[0076] Specifically, the medical condition dataset includes an initial medical condition dataset, which is constructed by collecting historical doctor consultation records and medical condition knowledge. An open-source large language model is used to obtain a corresponding dataset of the user's answer text and the corresponding medical description of the condition. Medical experts conduct manual review to ensure the accuracy of the dataset. Figure 3, based on the open source large language model Alibaba Cloud's open source Tongyi Qianwen Qwen-14B, the LoRA (low rank adaptation) method is used for efficient fine-tuning. The LoRA method refers to the use of low-rank decomposition technology to achieve efficient parameter updates without modifying the original model parameters. The specific implementation methods include: model architecture design, adding a dimensionality reduction-dimensionality increase structure in parallel to each layer of the open source large language model bypass. The structure consists of two serial linear transformation layers, the dimensionality reduction layer (matrix A), projects the input from the high-dimensional space (dimension d, usually ≥1024) to the low-dimensional space (dimension r, r<<d); the dimensionality increase layer (matrix B), maps the features from the low-dimensional space r back to the original dimension d; parameter initialization strategy, matrix A is initialized with a random Gaussian distribution, and matrix B is initialized to a zero matrix to ensure that the bypass output is zero in the initial stage of training; computational advantage, traditional fine-tuning requires updating the d×d parameter matrix, and LoRA decomposes it into the product of A(d×r) and B(r×d), and the total number of parameters is reduced from d 2 It is reduced to 2dr, and the computing resource requirements are significantly reduced when r<<d. This method introduces a low-rank adapter. While keeping the original model parameters frozen, only a small number of new parameters need to be trained to achieve effective model fine-tuning, which is particularly suitable for resource-constrained application scenarios.

[0077] The initial medical condition data set is a labeled set obtained through strict manual verification. A fine-tuned structured large model is obtained based on fine-tuning of the initial medical condition data set, which is used for structured information extraction. It is specifically used in the technical solution of this application to extract patient condition information based on user answers. After long-term application, the technical solution of this application can accumulate corresponding data of multiple user answers and patient condition information, and supplement the data to the initial medical condition data set to iteratively update the medical condition data set. After a period of iterative updates, the medical condition data set can be used for further fine-tuning training of the fine-tuned structured large model, so that the fine-tuned structured large model is continuously iteratively updated, thereby obtaining a fine-tuned structured large model that can fully and accurately understand the user's expression in each consultation interaction.

[0078] In step S22, associated information related to the patient's condition information is then extracted from the patient's medical information; wherein, the patient's medical information refers to all diagnosis, treatment, examination and other medical information of the patient that has been collected in the medical database system, especially historical medical information and medical information generated by this medical treatment, such as imaging reports, medical records, test reports, surgical records and other medical information obtained from databases such as hospital servers, electronic medical record systems, and LIS systems.

[0079] The types of medical information include but are not limited to the following:

[0080] Laboratory tests: refer to medical laboratory test data, such as chemical, biological, immunological, and microbiological analyses of blood, urine, feces, and secretions, which can reflect the patient's biochemical indicators, immune function, and infection status;

[0081] Imaging report: refers to medical imaging report data, such as X-rays, CT scans, MRI reports, etc., which can reflect the patient's pathological changes;

[0082] Documents: refers to medical text data, such as electronic medical records, diagnostic reports, surgical records, etc., which can reflect the patient's basic information, medical history, diagnosis and treatment process;

[0083] Audio and video: refers to the audio data input by doctors in clinical scenarios, including conversations between doctors and patients, or audio files dictated by doctors.

[0084] The patient medical information is pre-processed by cleaning, labeling, and encoding, and then stored in the server in the form of text vectors. The patient's condition information is vectorized and used as a query vector for retrieval within the patient medical information. During the retrieval process, a vector matching method based on cosine similarity is used to extract content related to the query vector from the patient medical information.

[0085] A comprehensive ranking mechanism is adopted to evaluate the priority score by combining the importance score of information and the similarity measurement: P(t) = w1·I(t) + w2sim(q,v); where w1 and w2 are weight coefficients, satisfying w1+w2=1, I(t) represents the information importance scoring function, and sim(q,v) represents the cosine similarity value between the query vector and the retrieval vector. Based on the priority score P(t) and the preset threshold τ, low-priority information is filtered out, and only information with P(t) ≥ τ is extracted as relevant information.

[0086] In step S23, the patient's condition information and related information are summarized to obtain the patient's consultation information. As the number of consultation dialogues increases, or as there is too much related information, the amount of patient consultation information data will easily increase. If a large model is used directly to conduct a consultation dialogue, information overload and memory loss may occur. The large model cannot conduct a coherent conversation. In order to control the amount of data, the embodiment of the present application divides the patient's consultation information into long-term memory information and short-term memory information, and updates and maintains it based on the information update management mechanism, and forgets unimportant information through the forgetting mechanism; see Figure 4 , specifically including:

[0087] During multiple rounds of consultation dialogue, each round of consultation dialogue will update and maintain the long-term memory information and short-term memory information:

[0088] All patient consultation information generated in this round was incorporated into short-term memory information;

[0089] Short-term memory information is filtered through a dynamic domain control mechanism;

[0090] The filtered information is integrated and updated with the long-term memory information through the information integration and updating mechanism to obtain new long-term memory information;

[0091] Short-term memory information is maintained based on the forgetting mechanism.

[0092] For example, when the patient conducts the first round of medical consultation, the patient's medical condition information and related information are obtained based on the first answer to obtain the patient's medical consultation information. The initial long-term memory information and short-term memory information are both empty. The patient's medical consultation information generated by the first round of medical consultation is stored in the short-term memory information, and then the long-term memory information and short-term memory information are updated and maintained.

[0093] In a further embodiment, the process of screening short-term memory information through the dynamic domain control mechanism includes:

[0094] First, the importance of all information contained in the short-term memory is evaluated, and the importance of the information at time t is evaluated using the importance scoring function I(t). In a possible implementation, the importance scoring function I(t) considers but is not limited to the following factors:

[0095] 1. Frequency of recurrence of information: Information that appears frequently is more important;

[0096] 2. Contextual relevance of information: Information that is highly relevant to the current conversation or patient condition is more important;

[0097] 3. User feedback: User confirmation or emphasis on information can increase its importance;

[0098] The importance scoring function I(t) is as follows:

[0099] I(t)=α·f(t)+β·c(t)+γ·u(t)

[0100] Where α, β, and γ are weight coefficients, satisfying α + β + γ = 1, f(t) is the frequency of occurrence of information at time t, c(t) is the context relevance score of the information at time t, and u(t) is the user's feedback score on the information;

[0101] Then, dynamic domain control is used to decide whether to transfer information from short-term memory to long-term memory, and this process is implemented using a dynamic threshold control function D(t); in a possible implementation, the dynamic threshold control function D(t) can be implemented based on the importance scoring function I(t) and a distribution threshold θ.

[0102]

[0103] When D(t) = 1, the information is transferred to long-term memory; otherwise, the information remains in short-term memory or is forgotten.

[0104] In a further embodiment, the short-term memory information filtered by the dynamic domain control mechanism is integrated and updated with the long-term memory information through an information integration and update mechanism to obtain new long-term memory information. The information integration and update mechanism includes:

[0105] When information is transferred to long-term memory, it needs to be integrated and updated with the existing long-term memory information to avoid redundancy; the long-term memory information is updated through the integration function; the long-term memory information is stored in the database in the form of a weaviate vector library, and the new information V that needs to be transferred to the long-term memory information new By weighted averaging and existing long-term memory information V old After integration, the new long-term memory information is obtained as follows:

[0106] V updated =η·V new +(1-η)·V old

[0107] Among them, η is the integration weight, which controls the influence of new information on long-term memory information.

[0108] In a further embodiment, short-term memory information is maintained based on a forgetting mechanism:

[0109] For the data in short-term memory, if it is not transferred to long-term memory, a forgetting mechanism is defined to determine when the information is forgotten. The forgetting rate of information is set to be proportional to time, and the forgetting function F(t) is defined as:

[0110] F(t)=e -λt

[0111] Where λ is the forgetting rate constant, and when F(t) is lower than the threshold φ, the information is forgotten.

[0112] It can be understood that the embodiment of the present application provides a method for consultation, diagnosis, treatment and examination and treatment recommendation based on an information update management mechanism. In multiple rounds of consultation dialogues, long-term memory information and short-term memory information are stored in a dedicated database and updated and maintained through an information update management mechanism. Long-term memory information and short-term memory information do not rely on large model memory, and can effectively avoid the memory loss phenomenon in multiple rounds of dialogues that is common in existing large models.

[0113] In step S24, the large model is called to provide a consultation and diagnosis based on the patient's consultation information, and to determine whether the consultation is completed. If not, the large model is used to obtain the next round of consultation dialogue questions, which the patient answers. If the consultation is completed, the large model provides a final consultation and diagnosis, which includes examination and treatment recommendations. The large model here is the second large model, and step S24 includes:

[0114] Based on the patient's medical consultation information, a medical consultation prompt instruction for obtaining medical consultation and treatment is constructed, and the medical consultation prompt instruction is input into the fine-tuning dialogue macro model to generate the medical consultation and treatment; while calling the fine-tuning dialogue macro model to generate the medical consultation and treatment, the fine-tuning dialogue macro model is instructed to determine whether it is necessary to continue the medical consultation dialogue to obtain more patient medical consultation information. If it is necessary to continue the medical consultation dialogue, the next round of medical consultation questions is obtained through the fine-tuning dialogue macro model. If it is not necessary to continue the medical consultation dialogue, the final medical consultation and treatment is obtained through the fine-tuning dialogue macro model.

[0115] For example, the medical consultation and treatment prompt instruction can be constructed as follows:

[0116]

[0117] In a further embodiment, in order to obtain more accurate medical consultation and treatment, the large dialogue model fine-tuned in step S24 adopts a large language model fine-tuned based on the medical consultation and treatment dataset.

[0118] Specifically, the consultation and treatment data set includes the initial consultation and treatment data set, which is constructed by collecting historical doctor consultation records and doctor consultation and treatment and examination and treatment plans. The open source large language model is called to obtain the corresponding data set of patient consultation information and the corresponding consultation and treatment and examination and treatment plans, and is manually reviewed by medical experts to ensure the accuracy of the data set.

[0119] In one embodiment, see Figure 5 , based on the open source large language model, the LoRA (low rank adaptation) method is used for efficient fine-tuning. The LoRA method refers to the use of low-rank decomposition technology to achieve efficient parameter updates without modifying the original model parameters. The specific implementation methods include: model architecture design, adding a dimensionality reduction-dimensionality increase structure in parallel to each layer of the open source large language model bypass. The structure consists of two serial linear transformation layers, the dimensionality reduction layer (matrix A), projects the input from the high-dimensional space (dimension d, usually ≥1024) to the low-dimensional space (dimension r, r<<d); the dimensionality increase layer (matrix B), maps the features from the low-dimensional space r back to the original dimension d; parameter initialization strategy, matrix A is initialized with a random Gaussian distribution, and matrix B is initialized to a zero matrix to ensure that the bypass output is zero in the initial stage of training; computational advantage, traditional fine-tuning requires updating the d×d parameter matrix, and LoRA decomposes it into the product of A(d×r) and B(r×d), and the total number of parameters is reduced from d2 It is reduced to 2dr, and the computing resource requirements are significantly reduced when r<<d. This method introduces a low-rank adapter. While keeping the original model parameters frozen, only a small number of new parameters need to be trained to achieve effective model fine-tuning, which is particularly suitable for resource-constrained application scenarios.

[0120] In another preferred embodiment, the fine-tuning training method of the fine-tuning dialogue large model adopts a combination of incremental learning + reinforcement fine-tuning and supervised fine-tuning (IL+RLFT, SFT) to fine-tune the fine-tuning dialogue large model through the medical condition dataset; through incremental learning (IL), on the basis of the open source model, the model is incrementally learned using the labeled medical condition dataset to adjust the model parameters to adapt to the new data distribution, and the new dataset provided by the medical condition dataset is merged into the existing model, which can improve the question-answering ability of the fine-tuning dialogue large model in the medical field; through reinforcement fine-tuning and supervised fine-tuning, the ability of the fine-tuning dialogue large model to answer difficult medical questions is enhanced, and the fine-tuned fine-tuning dialogue large model is obtained to solve the problem that the general model does not answer related questions in the medical field accurately. The answers after fine-tuning are more reasonable and more in line with medical scenarios.

[0121] The obtained fine-tuned dialogue macro model based on fine-tuning of the initial consultation and treatment data set is applied to the technical solution of this application to generate consultation and treatment as well as examination and treatment recommendations based on the patient's consultation information; after long-term application, the technical solution of this application can accumulate corresponding data of multiple patient consultation information and consultation and treatment as well as examination and treatment recommendations, and supplement the data to the initial consultation and treatment data set to iteratively update the consultation and treatment data set. After a period of iterative updates, the consultation and treatment data set can be used to further fine-tune the fine-tuned dialogue macro model, so that the fine-tuned dialogue macro model is continuously iteratively updated, thereby obtaining a fine-tuned dialogue macro model that can fully and accurately understand the patient's consultation information in each consultation and give more accurate consultation and treatment as well as examination and treatment recommendations.

[0122] It is understood that the fine-tuning of the structured large model and the fine-tuning of the conversational large model involved in the embodiments of this application mainly distinguish the instruction tasks performed by the large model. The large model involved in the embodiments of this application can include but is not limited to online large model APIs such as ChatGPT, Wenxinyiyan, and DeepSeek. When using the fine-tuned large language model in the preferred technical solution, a local large model deployed on a local server based on large model open source technology should be used.

[0123] In one embodiment, the large model involved in the embodiments of the present application uses a locally deployed large model, including a first server, a second server, ... an Mth server, where M ≥ 2, which are locally located. Each server is deployed with a local large model, for a total of M local large models for consultation. When executing the consultation, diagnosis, and examination and treatment recommendation method based on the information update management mechanism provided in the embodiments of the present application, instructions can be input into any idle large model. The advantage of multiple local large models is that when consulting multiple patients simultaneously, multiple local large models provide multi-line services, uniformly dispatching and processing instructions generated by the consultation, which can shorten patient waiting time and improve consultation efficiency.

[0124] Based on the information update management mechanism-based consultation and treatment and examination and treatment recommendation method provided by the embodiment of the present application, in order to execute the method, the embodiment of the present application also provides a consultation device, see Figure 6 , including a human-computer interaction module 100, a storage module 200 and a processing module 300.

[0125] The human-computer interaction module provides an interactive interface for guiding users to enter patient identity information and conduct consultation dialogues. The input of the interactive interface is set to text input mode and voice input mode. When the user selects the voice input mode, voice recognition technology is used to convert the voice into text information. The processing module includes a local server and multiple locally deployed large models. During the consultation process, the generated instructions are distributed to the idle large models for execution. The pre-consultation system conducts multiple rounds of dialogue with the user through the human-computer interaction module, gradually obtaining information about the patient's main symptoms and condition during the multiple rounds of dialogue, and ultimately generates a pre-consultation report in a specific format.

[0126] It can be understood that the implementation of the method for consultation, diagnosis, treatment and examination and treatment recommendation based on the information update management mechanism provided in the embodiment of the present application relies on computer programs to deploy or instruct corresponding hardware such as storage devices, servers, and display screens to complete. After reading and understanding all or part of the process of the method for consultation, diagnosis, treatment and examination and treatment recommendation based on the information update management mechanism provided in the embodiment of the present application, ordinary technicians in this field can easily implement all or part of the process through computer programs. There are no technical barriers for ordinary technicians in this field and no creative labor is required.

[0127] The present application also provides a computer program product, or computer program, or computer-readable storage medium, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and, when executing the computer instructions, implements the method for providing consultation, diagnosis, treatment, and examination and treatment recommendation based on an information update management mechanism provided in the present application.

[0128] The above description is only a preferred embodiment of the present application and does not limit the present application in any form or substance. It should be pointed out that ordinary technicians in this technical field can make several improvements and supplements without departing from the present application, and these improvements and supplements should also be regarded as the scope of protection of the present application. Any technician familiar with this profession can make some changes, modifications and equivalent changes made by using the technical content disclosed above without departing from the content and scope of the present application, which are all equivalent embodiments of the present application; at the same time, any equivalent changes, modifications and evolutions made to the above-mentioned embodiments based on the essential technology of the present application are still within the scope of the technical solution of the present application.

Claims

1. A method for consultation, diagnosis and treatment and examination and treatment recommendation based on an information update management mechanism, characterized in that: The method comprises: S1. Obtain patient identity information, and obtain patient diagnosis and treatment information based on the patient identity information; S2. Establishing a multi-round consultation dialogue with the patient; the multi-round consultation dialogue process includes: S21. Initiate the first round of consultation questions and guide the patient to answer; S22, extracting the patient's condition information based on the patient's answer information, and extracting related information related to the patient's condition information from the patient's diagnosis and treatment information; S23. Summarize the patient's condition information and related information to obtain patient consultation information; divide the patient consultation information into long-term memory information and short-term memory information, and update and maintain it based on the information update management mechanism; S24: The big model is called to provide a consultation and treatment based on the patient's consultation information, and it is determined whether the consultation is completed. If not, the big model is used to obtain the next round of consultation dialogue questions, which the patient answers. If the consultation is completed, the big model provides a final consultation and treatment, which includes examination and treatment recommendations. S25. Repeat steps S22-S24 until the consultation is completed.

2. A method for consultation, diagnosis and treatment and examination and treatment recommendation based on an information update management mechanism according to claim 1, characterized in that: The extraction of patient condition information based on the patient's answer information is performed using a fine-tuned structured large model, wherein the fine-tuned structured large model is a large language model fine-tuned based on a medical condition dataset; The process of extracting patient condition information based on the patient's answer information includes: An information extraction prompt instruction for extracting the patient's condition information is constructed based on the patient's answer information, and the information extraction prompt instruction is input into the fine-tuned structured large model to generate the patient's condition information.

3. A method for consultation, diagnosis and treatment and examination and treatment recommendation based on an information update management mechanism according to claim 2, characterized in that: Supplementing the medical condition dataset based on the plurality of patient condition information, wherein the medical condition dataset is used for fine-tuning the fine-tuned structured large model; The fine-tuning training method of the fine-tuning structured large model is set to adopt the LoRA method to fine-tune the fine-tuning structured large model through the medical condition data set to obtain the fine-tuned fine-tuning structured large model.

4. A method for consultation, diagnosis and treatment and examination and treatment recommendation based on an information update management mechanism according to claim 1, characterized in that: Step S24 is performed using a fine-tuned dialogue model, which is a large language model fine-tuned based on the medical consultation and treatment dataset. Step S24 includes: Based on the patient's medical consultation information, a medical consultation and treatment prompt instruction is constructed for obtaining medical consultation and treatment, and the medical consultation and treatment prompt instruction is input into the fine-tuned dialogue model to generate medical consultation and treatment.

5. A method for consultation, diagnosis and treatment and examination and treatment recommendation based on an information update management mechanism according to claim 4, characterized in that: Step S24 further includes: While calling the fine-tuning dialogue model to generate a medical consultation and treatment, the fine-tuning dialogue model is instructed to determine whether it is necessary to continue the medical consultation dialogue to obtain more patient medical information. If the medical consultation dialogue needs to continue, the fine-tuning dialogue model is used to obtain the next round of medical consultation questions. If the medical consultation dialogue does not need to continue, the fine-tuning dialogue model is used to obtain the final medical consultation and treatment.

6. A method for consultation, diagnosis, treatment and examination and treatment recommendation based on an information update management mechanism according to claim 4, characterized in that: Supplementing the medical consultation and treatment dataset based on a plurality of medical consultations and treatments, wherein the medical consultation and treatment dataset is used to fine-tune the fine-tuning dialogue model; The fine-tuning training method of the fine-tuning dialogue model is set to adopt a combination of incremental learning + reinforcement fine-tuning and supervised fine-tuning to fine-tune the fine-tuning dialogue model through the medical consultation and treatment data set to obtain the fine-tuned fine-tuning dialogue model.

7. A method for consultation, diagnosis, treatment and examination and treatment recommendation based on an information update management mechanism according to claim 1, characterized in that: Step S23 includes: During the multi-round consultation dialogue process, each round of consultation dialogue will update and maintain the long-term memory information and short-term memory information; All patient consultation information generated in this round was incorporated into short-term memory information; Short-term memory information is filtered through a dynamic domain control mechanism; The filtered information is integrated and updated with the long-term memory information through the information integration and updating mechanism to obtain new long-term memory information; Short-term memory information is maintained based on the forgetting mechanism.

8. A method for consultation, diagnosis, treatment and examination and treatment recommendation based on an information update management mechanism according to claim 1, characterized in that: The screening process of the dynamic domain control mechanism includes: First, the importance of all information contained in the short-term memory is evaluated, and the importance of the information at time t is evaluated using the importance scoring function I(t); The importance scoring function I(t) takes into account factors such as the frequency of recurrence of information, the contextual relevance of information, and user feedback; The importance scoring function I(t) is set as: I(t) = α·f(t) + β·c(t) + γ·u(t) Where α, β, and γ are weight coefficients, satisfying α + β + γ = 1, f(t) is the frequency of occurrence of information at time t, c(t) is the context relevance score of the information at time t, and u(t) is the user's feedback score on the information; Then, the dynamic threshold control function D(t) is used to decide whether to transfer information from short-term memory to long-term memory. The dynamic threshold control function D(t) is implemented based on the importance score function I(t) and a distribution threshold θ: When D(t) = 1, the information is transferred to long-term memory; otherwise, the information remains in short-term memory or is forgotten; The information integration and updating mechanism includes: Update long-term memory information through integration function; long-term memory information is stored in the database in the form of weaviate vector library, and new information V that needs to be transferred to long-term memory information new By weighted averaging and existing long-term memory information V old After integration, the new long-term memory information is: V updated =η·V new +(1-η)·V old ; Among them, η is the integration weight, which controls the influence of new information on long-term memory information; The forgetting mechanism includes: For short-term memory information, a forgetting mechanism is defined to determine when the information is forgotten. The forgetting rate of the information is set to be proportional to time, and the forgetting function F(t) is defined as: F(t) = e -λt ; Where λ is the forgetting rate constant, when F(t) is lower than the threshold φ, the information is forgotten.

9. A method for consultation, diagnosis, treatment and examination and treatment recommendation based on an information update management mechanism according to claim 1, characterized in that: The extraction of associated information related to the patient's condition information from the patient's diagnosis and treatment information includes: The patient's condition information is vectorized and used as a query vector to search the patient's medical information. During the search process, a vector matching method based on cosine similarity is used to extract content related to the query vector from the patient's medical information. A comprehensive ranking mechanism is adopted to evaluate the priority score by combining the importance score of information and the similarity measurement: P(t) = w1·I(t) + w2sim(q,v); where w1 and w2 are weight coefficients, satisfying w1+w2=1, I(t) represents the information importance scoring function, and sim(q,v) represents the cosine similarity value between the query vector and the retrieval vector. Based on the priority score P(t) and the preset threshold τ, low-priority information is filtered out, and only information with P(t) ≥ τ is extracted as relevant information.

10. A device comprising a storage module, a processing module and a human-computer interaction module, wherein the storage module stores a computer program, characterized in that: When the processing module executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented through the human-computer interaction module.

11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Cited By

  • Consultation result generation method and device and electronic equipment

    CN120670582A