Large model medical diagnosis and treatment plan generation method based on memory and retrieval enhancement
By using multiple large models and memory retrieval mechanisms in the generation of medical diagnosis and treatment plans, it solves the problem that existing technology fails to fully utilize historical patient information and that a single large model is difficult to handle complex diseases, and achieves more comprehensive and accurate generation of diagnosis and treatment plans. .
Patent Information
- Application Number
- CN202411178359.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-08-27
AI Technical Summary
The prior art fails to make full use of historical patient information when generating medical treatment plans, and a single large model is difficult to fully capture multi-dimensional information of complex diseases, resulting in the lack of comprehensiveness and accuracy of the generated treatment plans.
A large model medical diagnosis and treatment plan generation method based on memory and retrieval enhancement is used to generate intermediate diagnosis and treatment plans from different aspects through multiple large models, and the diagnosis and treatment plan integration module is used to synthesize these plans to generate the final diagnosis and treatment plan. When generating an intermediate diagnosis and treatment plan, the memory and retrieval mechanism is used to retrieve other patient information similar to the current patient, and the information is encoded and differentially utilized to guide the large model to generate an intermediate diagnosis and treatment plan.
Through the collaborative work of multiple large models and the application of memory retrieval mechanisms, the generated diagnosis and treatment plans are more comprehensive and accurate, improving the processing capabilities of complex diseases and the personalization of diagnosis and treatment plans.
Smart Images

Figure CN118692663B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of diagnosis and treatment plan generation, and in particular to a large-model medical diagnosis and treatment plan generation method based on memory and retrieval enhancement. Background Art
[0002] In the medical field, the generation of diagnosis and treatment plans is a crucial part of medical services. Its core goal is to provide patients with personalized and accurate diagnosis and treatment plans based on given patient information in text form, such as medical records, test results, symptom descriptions, etc. However, with the continuous advancement of medical technology and the explosive growth of medical data, traditional diagnosis and treatment plan generation methods based on manual experience have gradually failed to meet clinical needs.
[0003] Existing methods for automatically generating treatment plans mainly rely on a single large model, which uses advanced technologies such as deep learning to train a large amount of medical data in order to automatically generate treatment plans based on patient information. However, this method has obvious limitations. First, it fails to fully utilize historical patient information stored in the medical system. This historical information contains rich disease characteristics and treatment experience, which is of great significance for improving the accuracy and effectiveness of treatment plans. However, due to the lack of effective utilization mechanisms in existing methods, these valuable historical data are ignored.
[0004] Secondly, using a single large model to generate diagnosis and treatment plans is not enough when dealing with complex diseases. Complex diseases often involve lesions in multiple systems and organs, and their clinical manifestations and pathological characteristics are also diverse. A single large model often finds it difficult to fully capture this complex information, and lacks information references in multiple dimensions when dealing with complex diseases, resulting in the lack of comprehensiveness and accuracy of the generated diagnosis and treatment plans. Summary of the invention
[0005] In order to solve the above technical problems, the present invention provides a large-model medical treatment plan generation method based on memory and retrieval enhancement; for the same patient, the present invention uses multiple large models to generate intermediate treatment plans from different aspects, and uses a treatment plan integration module to integrate different intermediate treatment plans to generate a final treatment plan. When generating intermediate treatment plans, for each large model, a memory and retrieval enhancement mechanism is used to retrieve other patient information similar to the current patient, encode this information and use it differently to guide the large model to generate intermediate treatment plans.
[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0007] A method for generating a medical diagnosis and treatment plan based on a large model with memory and retrieval enhancement, wherein patient information text is input into a trained generation model to obtain a final diagnosis and treatment plan; the generation model includes a retrieval module, a memory module, a large medical model and a diagnosis and treatment plan integration module; the training process of the generation model includes the following steps:
[0008] Step 1: Use the search module to search for patient information text The closest Similar patient information text ; For the Similar patient information texts, ;
[0009] Step 2: Translate patient information text and similar patient information text Input the memory module to obtain similar patient information representation ;
[0010] Step 3: Text the patient information and similar patient information representation as soft prompts Input into N different large medical models to generate N intermediate diagnosis and treatment plans respectively ; For the An intermediate treatment plan, ;
[0011] Step 4: Use the diagnosis and treatment plan integration module to generate the intermediate diagnosis and treatment plan Integrate and get the final diagnosis and treatment plan ;
[0012] Step 5: Manually annotated treatment plans Intermediate treatment plan And the final treatment plan Compare and calculate the cross entropy loss; among them, the manually annotated diagnosis and treatment plan With each intermediate treatment plan The cross entropy loss is recorded as ; Manually annotated treatment plans And the final treatment plan The cross entropy loss is recorded as ;Will The sum is taken as the overall loss, and the generative model is trained using the overall loss.
[0013] Furthermore, the memory module includes a memory encoder and a memory weighting module, and step 2 specifically includes the following steps:
[0014] S21, use the memory encoder to sequentially read the patient information text and similar patient information text Encode to get the patient representation vector and M similar patient representation vectors ; represents the Mth similar patient representation vector;
[0015] S22, use two different fully connected layers to represent M similar patients in vectors Mapped to M key representations respectively And M values represent ; and Represent the Mth key representation and the Mth value representation respectively;
[0016] S23, using patient representation vector and the mth bond characterization Calculate the corresponding weight , thus determining the mth value representation The contribution of the corresponding similar patient information text to the generation of diagnosis and treatment plans:
[0017] ;
[0018] S24, repeat step S23 for each m, , get the weights corresponding to all key representations ;
[0019] S25, the memory weighting module will weight Applied to the corresponding value representation , similar patient information representation is obtained by calculating the weighted average :
[0020] .
[0021] Compared with the prior art, the beneficial technical effects of the present invention are:
[0022] For the same patient, the present invention uses multiple large models to generate intermediate treatment plans from different aspects, and uses a treatment plan integration module to integrate different intermediate treatment plans to generate a final treatment plan, so that multiple large models can generate treatment plans from different aspects, thereby improving the comprehensiveness of the final report.
[0023] For each large model, a memory and retrieval enhancement mechanism is used to retrieve information about other patients similar to the current patient, encode this information and use it differently to guide the large model to generate intermediate diagnosis and treatment plans, thereby enhancing the report generation capability of a single large model. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a schematic diagram of the overall process of the present invention. DETAILED DESCRIPTION
[0025] A preferred embodiment of the present invention is described in detail below with reference to the accompanying drawings.
[0026] The present invention is divided into two parts: intermediate diagnosis and treatment plan generation, and final diagnosis and treatment plan generation. The following introduces these two parts separately, and the overall process is shown in Figure 1 .
[0027] The generation of intermediate diagnosis and treatment plans includes three parts: Different medical models , a retrieval module, and a memory module. The retrieval module is used to extract patient information similar to the current patient information from the existing patient information database; the memory module is used to encode the extracted patient information and compare the encoding results with the Combine different medical big models to guide them to generate intermediate diagnosis and treatment plans .
[0028] The N different large medical models here refer to any two large medical models being different from each other.
[0029] The final diagnosis and treatment plan is generated, including a diagnosis and treatment plan integration module, which generates intermediate diagnosis and treatment plans Integrate and obtain the final diagnosis and treatment plan.
[0030] The following introduces the training and prediction processes of the generative model respectively.
[0031] The training process includes the following steps:
[0032] Step A1: Use the retrieval module to retrieve text related to patient information in the training set The closest Similar patient information text .
[0033] Patient information text includes medical records, test results, symptom descriptions and other texts.
[0034] The retrieval module uses a method based on the BERT model to encode the patient information text and the patient information text in the training set to obtain a vector representation of each patient information text. By calculating the cosine similarity of the vector representation, the similarity between the patient information text and the patient information text in the training set is measured, and then the patient information text is sorted based on the cosine similarity to obtain the M most similar patient information texts.
[0035] Step A2: Translate patient information into text , similar patient information text Input the memory module to obtain similar patient information representation .
[0036] Specifically, the memory module in step A2 includes a memory encoder and a memory weighting module. The processing process is as follows.
[0037] A21: Use the memory encoder to read the patient information text in sequence , similar patient information text Encode to get the patient representation vector , and similar patient representation vectors .
[0038] In a preferred embodiment, the memory encoder can adopt the BERT model.
[0039] A22: Use two different fully connected layers to vectorize similar patient representations Mapped to key representations And value representation .
[0040] A23: Using Patient Characterization Vectors and the mth bond characterization Calculate the corresponding weight Value Representation Weighted, so that the judgment value represents the contribution of the corresponding similar patient information text to the generation of diagnosis and treatment plans:
[0041] ;
[0042] A24: Repeat step A23 for each m to obtain the weights corresponding to all key representations. .
[0043] A25: The memory weighted module will weight Applied to the corresponding value representation , calculate the weighted average to get similar patient information representation :
[0044] .
[0045] Step A3: For each medical model , with patient information text and similar patient information representation is the input, where similar patient information represents Generate intermediate treatment plans for soft prompts .
[0046] In a preferred embodiment, the medical macro model may adopt ChiMed, Benstao, MedicalGPT, etc.
[0047] Step A4: Repeat step A3 for each large medical model to obtain all intermediate diagnosis and treatment plans .
[0048] Step A5: Use the diagnosis and treatment plan integration module to generate the intermediate diagnosis and treatment plan Integrate and get the final diagnosis and treatment plan .
[0049] In a preferred embodiment, the diagnosis and treatment plan integration module can adopt any one of the large models such as ChiMed, Benstao, MedicalGPT, etc.
[0050] Step A6: Manually annotated treatment plans Intermediate treatment options And the final treatment plan Compare and calculate the cross entropy loss. Among them, the manually annotated diagnosis and treatment plan Intermediate treatment options The loss of comparison is recorded as ; Manually annotated treatment plans And the final treatment plan The loss of comparison is recorded as Calculate the above loss The sum of the losses is used to train and optimize the generated model.
[0051] The prediction process is basically the same as the training process, which includes the following steps:
[0052] Step B1: Use the search module to retrieve the actual patient information text The closest Similar patient information text .
[0053] Step B2: Translate patient information into text , similar patient information text Input the memory module to obtain similar patient information representation .
[0054] Step B3: For each medical model , with patient information text and similar patient information representation is the input (where similar patient information represents is a soft prompt), generating an intermediate diagnosis and treatment plan .
[0055] Step B4: Repeat step B3 for each large medical model to obtain all intermediate diagnosis and treatment plans .
[0056] Step B5: Use the treatment plan integration module (also a large model) to generate the intermediate treatment plan Integrate and get the final diagnosis and treatment plan .
[0057] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention, and any reference numerals in the claims should not be regarded as limiting the claims involved.
[0058] In addition, it should be understood that although this specification is described in terms of implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
Claims
1. A method for generating a large-model medical diagnosis and treatment plan based on memory and retrieval enhancement, characterized in that: The patient information text is input into the trained generative model to obtain the final diagnosis and treatment plan; the generative model includes a retrieval module, a memory module, a large medical model and a diagnosis and treatment plan integration module; the training process of the generative model includes the following steps: Step 1: Use the search module to search for patient information text The closest Similar patient information text ; For the Similar patient information texts, ; Step 2: Translate patient information text and similar patient information text Input the memory module to obtain similar patient information representation ; Step 3: Text the patient information and similar patient information representation as soft prompts Input into N different large medical models to generate N intermediate diagnosis and treatment plans respectively ; For the An intermediate treatment plan, ; Step 4: Use the diagnosis and treatment plan integration module to generate the intermediate diagnosis and treatment plan Integrate and get the final diagnosis and treatment plan ; Step 5: Manually annotated treatment plans Intermediate treatment plan And the final treatment plan Compare and calculate the cross entropy loss; among them, the manually annotated diagnosis and treatment plan With each intermediate treatment plan The cross entropy loss is recorded as ; Manually annotated treatment plans And the final treatment plan The cross entropy loss is recorded as ;Will The sum is taken as the overall loss, and the generative model is trained using the overall loss; The memory module includes a memory encoder and a memory weighting module, and step 2 specifically includes the following steps: S21, use the memory encoder to sequentially read the patient information text and similar patient information text Encode to get the patient representation vector and M similar patient representation vectors ; represents the Mth similar patient representation vector; S22, use two different fully connected layers to represent M similar patients into vectors Mapped to M key representations respectively And M values represent ; and Represent the Mth key representation and the Mth value representation respectively; S23, using patient representation vector and the mth bond characterization Calculate the corresponding weight , thus determining the mth value representation The contribution of the corresponding similar patient information text to the generation of diagnosis and treatment plans: ; S24, repeat step S23 for each m, , get the weights corresponding to all key representations ; S25, the memory weighting module will weight Applied to the corresponding value representation , similar patient information representation is obtained by calculating the weighted average : 。
Citation Information
Patent Citations
Breast cancer clinical data analysis diagnosis and treatment platform based on artificial intelligence large language model
CN118016280A
Cross-modal antagonistic noise generation system and method for medical diagnosis and treatment data
CN118116583A