Method, system, device and medium for generating medical plan

By jointly encoding patient complaint information and medical monitoring data, and using diagnostic direction recognition models and large language models to generate medical plans, the problem of inaccurate medical plan generation in existing technologies is solved, achieving higher targeting and matching.

CN120413053BActive Publication Date: 2025-09-16ANHUI UNIVERSITY OF TRADITIONAL CHINESE MEDICINE +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510912191.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-03
Publication Date
2025-09-16
Estimated Expiration
2045-07-03

AI Technical Summary

Technical Problem

Existing medical plan generation methods are unable to accurately understand the patient's semantic description, resulting in the generated diagnosis results being less compatible with the patient's own condition.

Method used

By obtaining the patient's chief complaint information and medical monitoring data for joint encoding, the diagnostic direction is identified using the diagnostic direction recognition model, and a medical plan is generated under the guidance of a large language model, including condition explanation information and intervention recommendations.

Benefits of technology

The targetedness and accuracy of medical plans are improved, the generated content is highly matched with patient characteristics, and the problems of existing plans being vague and lacking in targetedness are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120413053B_ABST
    Figure CN120413053B_ABST
Patent Text Reader

Abstract

The present invention provides a method, system, device and medium for generating a medical plan. The method includes: obtaining the patient's chief complaint information and corresponding medical monitoring data; jointly encoding the chief complaint information and the medical monitoring data to obtain a joint encoding vector; inputting the joint encoding vector into a diagnostic direction recognition model to identify the diagnostic direction corresponding to the patient's current health status, and determining the corresponding prompt vector sequence based on the diagnostic direction; wherein the diagnostic direction recognition model is a semantic analysis model; inputting the prompt vector sequence and the joint encoding vector into a large language model, and under the guidance of the prompt vector sequence, performing semantic analysis on the joint encoding vector to generate a medical plan associated with the health status information; wherein the medical plan includes condition explanation information corresponding to the diagnostic direction, and intervention suggestions generated for the condition explanation information. The present invention greatly improves the matching degree between the generated content and the patient's characteristics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of natural language processing technology, and in particular to a method, system, device and medium for generating a medical plan. Background Art

[0002] In the medical field, treatment plans for patients are often determined by doctors based on their personal experience, combined with the patient's complaints and test results. However, this approach is susceptible to subjective factors, resulting in low accuracy in the resulting treatment plan.

[0003] In recent years, with the rapid development of natural language processing technology and large language models, some research has begun exploring the application of artificial intelligence technologies in medical service systems. Examples include intelligent question-answering and conversational robots that provide disease knowledge and auxiliary diagnostic recommendations; clinical decision support systems that provide diagnosis and treatment assistance based on structured electronic medical records; health education systems that push content based on keyword tags; and remote rehabilitation support systems that recommend training plans based on sensors and rule-based logic. However, these medical service systems typically respond using rule engines, fixed templates, or simple models, lacking semantic understanding capabilities, making it difficult to truly understand individual patient descriptions and provide accurate feedback. Therefore, there is a need for a method, system, device, and medium for generating medical plans. Summary of the Invention

[0004] The present invention provides a method, system, device and medium for generating a medical plan to solve the technical problem that the existing technology cannot accurately understand the patient's semantic description, resulting in a low degree of compatibility between the final generated diagnosis result and the patient's own condition.

[0005] The present invention provides a method for generating a medical plan, which includes: obtaining a patient's chief complaint information and corresponding medical monitoring data; jointly encoding the chief complaint information and the medical monitoring data to obtain a joint encoding vector; inputting the joint encoding vector into a diagnostic direction recognition model to identify the diagnostic direction corresponding to the patient's current health status, and determining a corresponding prompt vector sequence based on the diagnostic direction; wherein the diagnostic direction recognition model is a semantic analysis model; inputting the prompt vector sequence and the joint encoding vector into a large language model, and under the guidance of the prompt vector sequence, performing semantic analysis on the joint encoding vector to generate a medical plan associated with the health status information; wherein the medical plan includes condition explanation information corresponding to the diagnostic direction, and intervention suggestions generated based on the condition explanation information.

[0006] In one embodiment of the present invention, the joint encoding of the chief complaint information and the medical monitoring data to obtain a joint coding vector includes: encoding the chief complaint information to obtain a chief complaint coding vector; calculating the similarity between the chief complaint coding vector and each standard chief complaint coding vector in the information library, and selecting the standard chief complaint coding vector with the highest similarity as the final chief complaint coding vector; encoding the medical monitoring data to obtain a monitoring data vector; and fusing the final chief complaint coding vector with the monitoring data vector to obtain a joint coding vector.

[0007] In one embodiment of the present invention, the joint coding vector is input into a diagnostic direction recognition model to identify the corresponding diagnostic direction, and the corresponding prompt vector sequence is determined based on the diagnostic direction, including: inputting the joint coding vector into the diagnostic direction recognition model, parsing the semantic features of the joint coding vector, and identifying at least one diagnostic direction that matches the patient's condition; and calling the corresponding prompt vector sequence based on the identified diagnostic direction.

[0008] In one embodiment of the present invention, the prompt vector sequence is learned when the large language model is trained by pre-acquired training samples and corresponding real medical plans. The generation process of the prompt vector sequence includes: jointly encoding the chief complaint information to be trained and the corresponding medical monitoring data to be trained to obtain a joint encoding vector; based on the diagnostic direction of the chief complaint information to be trained, obtaining a corresponding initialized prompt vector sequence; inputting the joint encoding vector and the initialized prompt vector sequence into the large language model to be trained to generate a predicted medical plan; based on the difference between the predicted medical plan and the real medical plan, updating the parameters of the large language model and the prompt vector sequence, obtaining and saving the trained large language model and the learned prompt vector sequence; wherein, the chief complaint information to be trained and the corresponding medical monitoring data to be trained carry the real medical plan.

[0009] In one embodiment of the present invention, the joint coding vector and the initialized prompt vector sequence are jointly input into the large language model to be trained to generate a predicted medical plan, including: splicing the joint coding vector and the initialized prompt vector sequence to obtain a spliced ​​sequence; inputting the spliced ​​sequence into a BiLSTM model, performing bidirectional modeling on each prompt vector in the spliced ​​sequence to obtain a final spliced ​​sequence; and inputting the final spliced ​​sequence into the large language model to be trained to generate a predicted medical plan.

[0010] In one embodiment of the present invention, based on the difference between the predicted medical plan and the actual medical plan, the parameters of the large language model are updated to obtain and save the trained large language model, including: inputting the joint coding vector into the main network of the large language model to be trained to extract the health status semantic features; inputting the health status semantic features into each sub-network of the large language model to generate predicted disease explanation information and corresponding intervention suggestions corresponding to the diagnostic direction; wherein each sub-network corresponds to a diagnostic direction, and the main network and each sub-network are cascaded; based on each predicted disease explanation information and corresponding intervention suggestions, a predicted medical plan is obtained; based on the difference between the predicted medical plan and the actual medical plan, the parameters of each sub-network are updated, and the parameters of the main network are kept unchanged to obtain and save the trained large language model.

[0011] In one embodiment of the present invention, the large language model includes a main module and various subtask modules cascaded therewith, each subtask module corresponding to generating a diagnostic direction of the disease explanation information and intervention suggestions, and the updating of the parameters of the large language model based on the difference between the predicted medical plan and the actual medical plan, and obtaining and saving the trained large language model include: inputting the joint coding vector into the main module of the large language model to be trained, calling the main network of the main module to extract semantic features of the joint coding vector, and regulating the attention calculation results through the subnetworks embedded in the attention layer of the main network to obtain health status semantic features carrying diagnostic direction features; wherein each subnetwork corresponds to a diagnostic direction in advance; inputting the health status semantic features carrying diagnostic direction features into the subtask modules of the large language model to obtain the corresponding diagnostic direction of the disease explanation information and intervention suggestions; summarizing the disease explanation information and intervention suggestions of each diagnostic direction to obtain a predicted medical plan; updating the parameters of the subnetwork and the corresponding subtask module based on the difference between the predicted medical plan and the actual medical plan, and keeping the parameters of the main network unchanged to obtain a trained large language model.

[0012] The present invention also provides a medical plan generation system, which includes: a data acquisition module for acquiring the patient's chief complaint information and corresponding medical monitoring data; an encoding module for jointly encoding the chief complaint information and the medical monitoring data to obtain a joint encoding vector; a prompt vector determination module for inputting the joint encoding vector into a diagnostic direction recognition model to identify the diagnostic direction corresponding to the patient's current health status, and determine the corresponding prompt vector sequence based on the diagnostic direction; wherein the diagnostic direction recognition model is a semantic analysis model; a medical plan generation module for inputting the prompt vector sequence and the joint encoding vector into a large language model, and under the guidance of the prompt vector sequence, performing semantic analysis on the joint encoding vector to generate a medical plan associated with the health status information; wherein the medical plan includes condition explanation information corresponding to the diagnostic direction, and intervention suggestions generated for the condition explanation information.

[0013] The present invention also provides an electronic device comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device implements any of the above-mentioned methods for generating a medical plan.

[0014] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor of a computer, the computer is caused to execute any of the above-mentioned methods for generating a medical plan.

[0015] Beneficial effects of the present invention: The present invention proposes a method, system, device and medium for generating a medical plan, which jointly encodes the patient's chief complaint information and medical monitoring data, and inputs the joint code into a diagnostic direction recognition model to identify the diagnostic direction that needs to be focused on for the current health status, so that subsequent generation tasks have clear target guidance. A corresponding prompt vector sequence is obtained according to the diagnostic direction, so that the large language model, under the guidance of the prompt vector sequence, focuses on the semantic area related to the corresponding diagnostic direction when generating a medical plan, thereby making the generated medical plan more targeted at the patient's own characteristics, greatly improving the matching degree between the generated content and the patient's characteristics. It improves the problem that the existing medical plan content is vague and lacks specificity. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be derived from these drawings without inventive effort.

[0017] In the attached figure:

[0018] Figure 1 A schematic flow chart of a method for generating a medical plan according to an embodiment of the present invention;

[0019] Figure 2 This is a structural block diagram of a system for generating a medical plan provided in one embodiment of the present invention;

[0020] Figure 3 A schematic structural diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0021] The following describes the embodiments of the present invention through specific examples. Those skilled in the art will readily understand the other advantages and benefits of the present invention from the disclosure herein. The present invention may also be implemented or applied through various other specific embodiments. The details in this specification may be modified or altered based on different viewpoints and applications without departing from the spirit of the present invention. The following embodiments and features therein may be combined with one another without conflict.

[0022] It should be noted that the illustrations provided in the following embodiments are merely schematic illustrations of the basic concept of the present invention. The drawings only show components related to the present invention and are not drawn according to the number, shape, and size of components in actual implementation. In actual implementation, the type, quantity, and proportion of each component may be changed arbitrarily, and the component layout may also be more complex.

[0023] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the embodiments of the present invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring the embodiments of the present invention.

[0024] The present invention provides a method for generating a medical plan, which jointly encodes the patient's chief complaint information and medical monitoring data, and inputs the joint code into a diagnostic direction recognition model to identify the diagnostic direction that needs to be focused on for the current health status, so that subsequent generation tasks have clear target guidance. According to the diagnostic direction, a corresponding prompt vector sequence is obtained, so that the large language model, under the guidance of the prompt vector sequence, focuses on the semantic area related to the corresponding diagnostic direction when generating a medical plan, thereby making the generated medical plan more targeted at the patient's own characteristics, greatly improving the matching degree between the generated content and the patient's characteristics. The problem that the existing medical plan content is empty and lacks specificity is improved.

[0025] like Figure 1As shown, the method for generating a medical plan includes the following steps:

[0026] S11. Obtain the patient's chief complaint information and corresponding medical monitoring data.

[0027] Chief complaint information includes natural language textual content such as the patient's self-described symptoms, duration, triggers, and medication reactions. Medical monitoring data represents structured or semi-structured data from wearable devices or medical systems, such as lung function indicators, blood oxygen saturation, heart rate changes, and previous medication records. By acquiring chief complaint information and the corresponding medical monitoring data, we can construct raw input information that comprehensively reflects the patient's current health status.

[0028] S12. Jointly encode the chief complaint information and the medical monitoring data to obtain a joint encoding vector.

[0029] Joint coding aims to transform the unstructured chief complaint information of patients and the structured or semi-structured medical monitoring data into a unified vector representation to achieve the fusion expression of multi-source health information. Specifically, the chief complaint information can be semantically encoded through a pre-trained language model to extract contextual feature vectors reflecting the patient's symptoms, course of disease, and medication response. In addition, the medical monitoring data is normalized and converted into a structured feature vector through a language model. These two vectors are combined together by splicing or weighted fusion to form a joint coding vector, such as ,in, express Hint vectors, is the patient's context feature vector. It should be noted that the language model can be any neural network model capable of text encoding or structured data processing, including but not limited to BERT, LSTM, Transformer, etc., as long as it can extract features from input information and output semantic vectors. This is not limited here.

[0030] In an optional embodiment of the present invention, step S12 includes the following processes: encoding the chief complaint information to obtain a chief complaint coding vector; calculating the similarity between the chief complaint coding vector and each standard chief complaint coding vector in the information library, and selecting the standard chief complaint coding vector with the highest similarity as the final chief complaint coding vector; encoding the medical monitoring data to obtain a monitoring data vector; and fusing the final chief complaint coding vector and the monitoring data vector to obtain a joint coding vector.

[0031] To enhance the stability and standardization of the chief complaint information during subsequent semantic processing, preliminary semantic encoding can be performed on the chief complaint information to obtain a chief complaint encoding vector. This chief complaint encoding vector is then compared to various standard chief complaint encoding vectors in a pre-built database. The standard chief complaint encoding vector with the highest similarity is selected as the final chief complaint encoding vector. This avoids semantic drift due to differences in expression and improves the consistency and robustness of subsequent processing results. Similarity calculation methods include, but are not limited to, cosine similarity, Euclidean distance, and Manhattan distance. Preferably, cosine similarity is used in this embodiment to improve computational efficiency. Furthermore, the standard chief complaint encoding vector is obtained by encoding a set of standardized chief complaint terms (e.g., persistent cough, morning shortness of breath, etc.) compiled from the medical knowledge system. Furthermore, medical monitoring data from wearable devices or electronic medical records is normalized and structurally mapped, then converted into monitoring data vectors using a language model. The final chief complaint encoding vector is then fused with the monitoring data vectors by concatenation or weighting to obtain a joint encoding vector.

[0032] S13. Input the joint coding vector into a diagnostic direction recognition model to identify the corresponding diagnostic direction, and determine a corresponding prompt vector sequence based on the diagnostic direction; wherein the diagnostic direction recognition model is a semantic analysis model.

[0033] The joint coding vector is input into the diagnostic direction recognition model to extract the semantic features of the joint coding vector and identify one or more diagnostic directions that need to be focused on for the patient's current health status, wherein the diagnostic direction refers to the content area that the medical plan to be generated focuses on, including but not limited to explanation of the condition, health management or rehabilitation advice. The diagnostic direction recognition model includes but is not limited to a multi-label classification model based on a Transformer structure, a lightweight semantic matching network, an attention-enhanced text classifier, etc. As long as the corresponding semantic information can be captured from the input vector, no limitation is made here. According to the recognition result, a prompt vector sequence that matches the identified diagnostic direction is selected from the prompt vector library, thereby providing semantic guidance for the subsequent generation process of the large language model. The prompt vector sequence is used as a guiding signal and is input into the large language model together with the patient's joint coding vector to clarify the semantic goal and content direction of the generation task.

[0034] In an optional embodiment of the present invention, step S13 includes the following processing procedures: inputting the joint coding vector into a diagnostic direction recognition model, parsing the semantic features of the joint coding vector, and identifying at least one diagnostic direction that matches the patient's condition; and calling the corresponding prompt vector sequence based on the identified diagnostic direction.

[0035] In order to achieve an accurate match between the generated content and the patient's specific health status, the joint encoding vector of the chief complaint information and the medical monitoring data is input into the diagnostic direction recognition model, and its semantic features are analyzed to identify the health semantic themes contained in the current input, and based on this, determine one or more diagnostic directions that the patient needs to pay most attention to. For example, the diagnostic direction is whether it focuses on the explanation of the condition, health management or rehabilitation advice, etc. According to the diagnostic direction, the prompt vector sequence corresponding to it is searched and called in the prompt vector library, wherein the prompt vector sequence is input into the large language model together with the joint encoding vector as a guiding signal to clarify the semantic goal of content generation, ensure that the output medical plan has a clear structure, targeted content, and is consistent with the patient's real health needs.

[0036] S14. Input the prompt vector sequence and the joint encoding vector into the large language model together. Under the guidance of the prompt vector sequence, perform semantic analysis on the joint encoding vector to generate a medical plan associated with the health status information; wherein the medical plan includes condition explanation information corresponding to the diagnostic direction, and intervention suggestions generated based on the condition explanation information.

[0037] The identified prompt vector sequence and the joint encoding vector are input into the large language model together. The prompt vector sequence plays a guiding role, enabling the large language model to focus on a specific diagnostic direction when processing the input content, thereby performing targeted semantic analysis of the joint encoding vector. Through this structured guidance method, the large language model can more accurately understand the patient's health status semantics and generate disease explanation information and intervention recommendations that meet their current diagnosis and treatment needs. The final generated medical plan is associated with the patient's health status information. The content includes disease explanation information corresponding to the diagnostic direction, such as explanations of the possible causes and development trends of symptoms, as well as personalized intervention recommendations generated on this basis, such as lifestyle adjustments, medication reminders, or rehabilitation training guidelines.

[0038] In an optional embodiment of the present invention, the process of generating a prompt vector sequence includes: jointly encoding the chief complaint information to be trained and the corresponding medical monitoring data to be trained to obtain a joint encoding vector; based on the diagnostic direction of the chief complaint information to be trained, obtaining a corresponding initialized prompt vector sequence; inputting the joint encoding vector and the initialized prompt vector sequence into the large language model to be trained to generate a predicted medical plan; based on the difference between the predicted medical plan and the actual medical plan, updating the parameters of the large language model and the prompt vector sequence to obtain and save the trained large language model and the learned prompt vector sequence; wherein, the chief complaint information to be trained and the corresponding medical monitoring data to be trained carry the actual medical plan.

[0039] The chief complaint information to be trained and its corresponding medical monitoring data are jointly encoded as training samples to obtain a joint encoding vector. This vector serves as a semantic representation of the patient's health status and is used to guide the generation of subsequent medical plans. Since each training sample corresponds to one or more diagnostic directions in advance, the initialized prompt vector sequence corresponding to the diagnostic direction is extracted from the vector library according to the diagnostic direction corresponding to the training sample. The prompt vector sequence and the joint encoding vector are input together into the large language model to be trained to generate a predicted medical plan. The difference between the predicted medical plan and the actual medical plan corresponding to the training sample is calculated, and the parameters of the large language model and the prompt vector sequence itself are simultaneously updated by backpropagation, so that the prompt vector can more accurately guide the large language model to focus on the key semantic features under the diagnostic direction. After the training is completed, the learned prompt vector sequence is saved to the vector library for subsequent call according to the diagnostic direction.

[0040] In an optional embodiment of the present invention, the above-mentioned joint coding vector and the initialized prompt vector sequence are jointly input into the large language model to be trained to generate a predicted medical plan, including: splicing the joint coding vector and the initialized prompt vector sequence to obtain a spliced ​​sequence; inputting the spliced ​​sequence into a BiLSTM model, performing bidirectional modeling on each prompt vector in the spliced ​​sequence to obtain a final spliced ​​sequence; and inputting the final spliced ​​sequence into the large language model to be trained to generate a predicted medical plan.

[0041] In order to enhance the guiding effect of the prompt vector on the generation of medical plans, a bidirectional modeling mechanism of the prompt vector and the joint encoding vector is introduced before the training of the large language model. Specifically, the joint encoding vector is spliced ​​with the initialized prompt vector sequence to form a spliced ​​sequence containing the patient's semantic information and guidance information. The spliced ​​sequence is input into the BiLSTM model, and the forward and backward contextual relationships in the sequence are captured at the same time. The role of the prompt vector in the overall semantic expression is dynamically modeled, so that the prompt vector not only retains its original guiding function, but also integrates the semantic context information of the joint encoding vector, thereby obtaining a final spliced ​​sequence with more complete semantic expression and stronger contextual consistency. The final spliced ​​sequence is input into the large language model to be trained to generate a predicted medical plan corresponding to the input spliced ​​sequence. The medical plan may include the multi-dimensional intervention content required for the patient's current diagnosis and treatment stage, including but not limited to a health awareness and medication guidance module, a daily management and intervention plan module, a rehabilitation suggestion module, etc. Each module corresponds to a diagnostic direction. For example, the Health Awareness and Medication Guidance module provides disease information, inhaled medication usage instructions, smoking cessation advice, environmental risk warnings, and methods for identifying signs of acute exacerbations, tailored to the patient's current condition. The Daily Management and Intervention Plan module provides patients with strategies for coping with dyspnea, personalized medication adjustment recommendations, emergency symptom management procedures, vaccination recommendations, and complication prevention. The Rehabilitation Recommendations module includes endurance and strength training programs, breathing exercises (such as pursed lip breathing), daily energy conservation techniques, nutritional interventions, and psychosocial support recommendations. This approach provides comprehensive support from understanding the condition to proactive intervention.

[0042] In an optional embodiment of the present invention, based on the difference between the predicted medical plan and the actual medical plan, the parameters of the large language model are updated to obtain and save the trained large language model, including: inputting the joint coding vector into the main network of the large language model to be trained to extract health status semantic features; inputting the health status semantic features into each sub-network of the large language model to generate predicted disease explanation information and corresponding intervention suggestions corresponding to the diagnostic direction; wherein each sub-network corresponds to a diagnostic direction, and the main network and each sub-network are cascaded; based on each predicted disease explanation information and corresponding intervention suggestions, a predicted medical plan is obtained; based on the difference between the predicted medical plan and the actual medical plan, the parameters of each sub-network are updated, and the parameters of the main network are kept unchanged to obtain and save the trained large language model.

[0043] To effectively train the medical plan generation model, this application also employs a difference-driven parameter optimization mechanism to improve the quality of the large language model's generation of semantic expressions and intervention recommendations for multiple diagnostic categories. Specifically, a joint encoding vector is input into the large language model to be trained, and its main network is invoked to extract health status semantic features reflecting the patient's health status. These health status semantic features are then input into multiple subnetworks within the large language model corresponding to each diagnostic category, which then generate disease explanation information and intervention recommendations matching that specific diagnostic category. Each subnetwork is responsible for modeling and outputting disease explanation information and intervention recommendations related to a specific diagnostic category. For example, a subnetwork might generate disease status descriptions, daily management recommendations, rehabilitation training prompts, and so on. All predicted disease explanation information and intervention recommendations are integrated to produce a complete predicted medical plan. The difference between the predicted medical plan and the pre-annotated real-world medical plan is calculated and used as a supervisory signal to update only the parameters of each subnetwork, while keeping the parameters of the main network unchanged. This effectively improves the expressive power of each subnetwork for its corresponding content type, enabling precise tuning of the large language model for medical tasks and resulting in a well-trained large language model.

[0044] In an optional embodiment of the present invention, the large language model includes a main module and various subtask modules cascaded therewith, each subtask module corresponding to generating a diagnostic direction of the disease explanation information and intervention suggestions, and the updating of the parameters of the large language model based on the difference between the predicted medical plan and the actual medical plan to obtain and save the trained large language model includes: inputting the joint coding vector into the main module of the large language model to be trained, calling the main network of the main module to extract semantic features of the joint coding vector, and regulating the attention calculation results through the subnetworks embedded in the attention layer of the main network to obtain health status semantic features carrying diagnostic direction features; wherein each subnetwork corresponds to a diagnostic direction in advance; inputting the health status semantic features carrying diagnostic direction features into the subtask modules of the large language model to obtain the disease explanation information and intervention suggestions corresponding to the diagnostic direction; summarizing the disease explanation information and intervention suggestions of each diagnostic direction to obtain a predicted medical plan; updating the parameters of the subnetwork and the corresponding subtask module based on the difference between the predicted medical plan and the actual medical plan, and keeping the parameters of the main network unchanged to obtain the trained large language model.

[0045] In order to improve the adaptability of large language models in multi-diagnostic medical generation tasks, this application uses a low-rank adaptation (LoRA) method to perform lightweight parameter fine-tuning on locally deployed large language models (such as DeepSeek, Chat GPT, etc.) to obtain a trained large language model. The large language model includes a main module and multiple sub-task modules cascaded with it, and each sub-task module corresponds to a diagnostic direction (such as disease explanation, health management, and rehabilitation advice). During specific training, the joint coding vector is input into the main module of the large language model to be trained, and the main network in the main module is called to extract semantic features from the joint coding vector to obtain the initial health status semantic features. Multiple sub-networks are embedded in the attention layer of the main network to regulate the attention weight according to different diagnostic directions. The sub-network is constructed using the LoRA insertion method, and its attention weight matrix for ,in, The pre-trained weight matrix is ​​frozen for fine-tuning training. is the incremental parameter obtained through training. , where A is the basic low-rank matrix shared by all tasks, Task adjustment matrices specific to each diagnostic direction (e.g. 、 、 Corresponding to the three diagnostic directions of disease explanation, health management, and rehabilitation advice respectively), n is the number of diagnostic directions. The health status semantic features carrying diagnostic direction characteristics are input into the corresponding subtask modules respectively, and the disease explanation information and intervention suggestions for the corresponding diagnostic direction are generated. All disease explanation information and intervention suggestions are summarized to obtain the predicted medical plan. According to the difference between the predicted medical plan and the actual medical plan, the parameters of all sub-networks and sub-task modules are optimized, and the main network parameters are maintained. Unchanged to obtain a trained large language model.

[0046] like Figure 2As shown, the medical plan generation system 200 includes: a data acquisition module 210, an encoding module 220, a prompt vector determination module 230 and a medical plan generation module 240. The data acquisition module 210 is used to obtain the patient's chief complaint information and the corresponding medical monitoring data. The encoding module 220 is used to jointly encode the chief complaint information and the medical monitoring data to obtain a joint encoding vector. The prompt vector determination module 230 is used to input the joint encoding vector into a diagnostic direction recognition model to identify the diagnostic direction corresponding to the patient's current health status, and determine the corresponding prompt vector sequence based on the diagnostic direction; wherein the diagnostic direction recognition model is a semantic analysis model. The medical plan generation module 240 is used to input the prompt vector sequence and the joint encoding vector into a large language model, and under the guidance of the prompt vector sequence, perform semantic analysis on the joint encoding vector to generate a medical plan associated with the health status information; wherein the medical plan includes the condition explanation information corresponding to the diagnostic direction, and the intervention suggestions generated based on the condition explanation information.

[0047] The specific limitations of the medical plan generation system can be found in the limitations of the power battery capacity trajectory prediction method mentioned above, and will not be repeated here. The various modules in the above-mentioned power battery capacity trajectory prediction system can be implemented in whole or in part through software, hardware, and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware format, or can be stored in the memory of the computer device in software format to facilitate the processor to call the corresponding operations of the above modules.

[0048] It should be noted that, in order to highlight the innovative part of the present invention, this embodiment does not introduce modules that are not closely related to solving the technical problems raised by the present invention, but this does not mean that there are no other modules in this embodiment.

[0049] like Figure 3 As shown, the electronic device 3 may include a memory 31 , a processor 32 and a bus, and may also include a computer program stored in the memory 31 and executable on the processor 32 , such as a program for generating a medical plan.

[0050] The memory 31 includes at least one type of readable storage medium, including flash memory, a removable hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the memory 31 may be an internal storage unit of the electronic device 3, such as a removable hard disk of the electronic device 3. In other embodiments, the memory 31 may also be an external storage device of the electronic device 3, such as a plug-in removable hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, and the like. Furthermore, the memory 31 may include both an internal storage unit of the electronic device 3 and an external storage device. The memory 31 can be used not only to store application software installed on the electronic device 3 and various data, such as the generated code for a medical plan, but also to temporarily store data that has been output or is about to be output.

[0051] In some embodiments, processor 32 may be comprised of an integrated circuit, such as a single packaged integrated circuit or multiple packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips. Processor 32 is the control core (control unit) of electronic device 3. It utilizes various interfaces and circuits to connect the various components of electronic device 3. It executes programs or modules stored in memory 31 (such as a medical plan generation program) and accesses data stored in memory 31 to perform various functions and process data.

[0052] The processor 32 executes the operating system and various installed application programs of the electronic device 3. The processor 32 executes the application programs to implement the steps in the above-mentioned method for generating a medical plan.

[0053] Exemplarily, the computer program may be divided into one or more modules, one or more of which are stored in the memory 31 and executed by the processor 32 to complete the present application. One or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device 3. For example, the computer program may be divided into a data acquisition module 210, an encoding module 220, a hint vector determination module 230, and a medical plan generation module 240.

[0054] The above-mentioned integrated unit implemented in the form of a software functional module can be stored in a computer-readable storage medium, which can be either non-volatile or volatile. The above-mentioned software functional module is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, computer device, or network device, etc.) or a processor to perform part of the functions of the method for generating a medical plan in various embodiments of the present application.

[0055] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the present invention. Anyone skilled in the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by one of ordinary skill in the art without departing from the spirit and technical principles disclosed herein are intended to be covered by the claims of the present invention.

Claims

1. A method for generating a medical plan, characterized in that: The method comprises: Obtain the patient's chief complaint information and corresponding medical monitoring data; Jointly encoding the chief complaint information and the medical monitoring data to obtain a joint encoding vector; Inputting the joint coding vector into a diagnostic direction recognition model to identify the diagnostic direction corresponding to the patient's current health status, and determining a corresponding prompt vector sequence based on the diagnostic direction; wherein the diagnostic direction recognition model is a semantic analysis model; Inputting the prompt vector sequence and the joint encoding vector into a large language model, and performing semantic analysis on the joint encoding vector under the guidance of the prompt vector sequence to generate a medical plan associated with the health status information; wherein the medical plan includes condition explanation information corresponding to the diagnosis direction and intervention suggestions generated based on the condition explanation information; The prompt vector sequence is obtained by learning the large language model through pre-acquired training samples and corresponding real medical plans. The generation process of the prompt vector sequence includes: Jointly encoding the chief complaint information to be trained and the corresponding medical monitoring data to be trained to obtain a joint encoding vector; Based on the diagnostic direction of the chief complaint information to be trained, a corresponding initialized prompt vector sequence is obtained; The joint encoding vector and the initialized prompt vector sequence are input into the large language model to be trained to generate a predicted medical plan; The step of inputting the joint encoding vector and the initialized prompt vector sequence into the large language model to be trained to generate a predicted medical plan includes: Concatenate the joint encoding vector and the initialized prompt vector sequence to obtain a concatenated sequence; Input the spliced ​​sequence into the BiLSTM model, perform bidirectional modeling on each prompt vector in the spliced ​​sequence, and obtain the final spliced ​​sequence; The final concatenated sequence is input into the large language model to be trained to generate a predicted medical plan.

2. The method for generating a medical plan according to claim 1, wherein: The jointly encoding the chief complaint information and the medical monitoring data to obtain a joint encoding vector includes: Encoding the chief complaint information to obtain a chief complaint encoding vector; Calculating similarity between the chief complaint coding vector and each standard chief complaint coding vector in the information database, and selecting the standard chief complaint coding vector with the highest similarity as the final chief complaint coding vector; Encoding the medical monitoring data to obtain a monitoring data vector; The final chief complaint coding vector and the monitoring data vector are fused to obtain a joint coding vector.

3. The method for generating a medical plan according to claim 1, wherein: Inputting the joint encoding vector into a diagnostic direction recognition model to identify the corresponding diagnostic direction, and determining a corresponding prompt vector sequence based on the diagnostic direction, includes: Inputting the joint coding vector into a diagnostic direction recognition model, parsing the semantic features of the joint coding vector, and identifying at least one diagnostic direction that matches the patient's condition; The corresponding hint vector sequence is called based on the identified diagnostic direction.

4. The method for generating a medical plan according to claim 1, wherein: The generation process of the hint vector sequence also includes: Based on the difference between the predicted medical plan and the actual medical plan, the parameters of the large language model and the prompt vector sequence are updated to obtain and save the trained large language model and the learned prompt vector sequence; wherein the chief complaint information to be trained and the corresponding medical monitoring data to be trained carry the actual medical plan.

5. The method for generating a medical plan according to claim 4, wherein: Based on the difference between the predicted medical plan and the actual medical plan, updating the parameters of the large language model, and obtaining and saving the trained large language model includes: Input the joint encoding vector into the main network of the large language model to be trained to extract the semantic features of health status; Inputting the health status semantic features into each sub-network of the large language model to generate predicted condition explanation information and corresponding intervention suggestions corresponding to the diagnostic direction; wherein each sub-network corresponds to a diagnostic direction, and the main network and each sub-network are cascaded; Obtain a predicted medical plan based on each predicted condition explanation information and corresponding intervention recommendations; Based on the difference between the predicted medical plan and the actual medical plan, the parameters of each sub-network are updated, and the parameters of the main network are kept unchanged to obtain and save the trained large language model.

6. The method for generating a medical plan according to claim 4, wherein: The large language model includes a main module and various subtask modules cascaded therewith. Each subtask module generates corresponding diagnostic explanation information and intervention suggestions. Based on the difference between the predicted medical plan and the actual medical plan, the parameters of the large language model are updated. Obtaining and saving the trained large language model includes: The joint encoding vector is input into the main module of the large language model to be trained, the main network of the main module is called to extract semantic features from the joint encoding vector, and the attention calculation results are regulated by each sub-network embedded in the attention layer of the main network to obtain the health status semantic features carrying diagnostic direction features; wherein each sub-network is pre-assigned to a diagnostic direction; Inputting the health status semantic features carrying diagnostic direction features into the subtask module of the large language model to obtain the disease explanation information and intervention suggestions corresponding to the diagnostic direction; Summarize the disease explanation information and intervention suggestions of each diagnostic direction to obtain a predictive medical plan; Based on the difference between the predicted medical plan and the actual medical plan, the parameters of the sub-network and the corresponding sub-task module are updated, and the parameters of the main network are kept unchanged to obtain a trained large language model.

7. A system for generating a medical plan, characterized in that: The system comprises: A data acquisition module is used to obtain the patient's chief complaint information and corresponding medical monitoring data; an encoding module, configured to jointly encode the chief complaint information and the medical monitoring data to obtain a joint encoding vector; a prompt vector determination module, configured to input the joint coding vector into a diagnostic direction recognition model, identify the diagnostic direction corresponding to the patient's current health status, and determine a corresponding prompt vector sequence based on the diagnostic direction; wherein the diagnostic direction recognition model is a semantic analysis model; a medical plan generation module, configured to input the prompt vector sequence and the joint encoding vector into a large language model, and, under the guidance of the prompt vector sequence, perform semantic analysis on the joint encoding vector to generate a medical plan associated with the health status information; wherein the medical plan includes condition explanation information corresponding to the diagnosis direction and intervention suggestions generated based on the condition explanation information; The prompt vector sequence is obtained by learning the large language model through pre-acquired training samples and corresponding real medical plans. The generation process of the prompt vector sequence includes: Jointly encoding the chief complaint information to be trained and the corresponding medical monitoring data to be trained to obtain a joint encoding vector; Based on the diagnostic direction of the chief complaint information to be trained, a corresponding initialized prompt vector sequence is obtained; The joint encoding vector and the initialized prompt vector sequence are input into the large language model to be trained to generate a predicted medical plan; The step of inputting the joint encoding vector and the initialized prompt vector sequence into the large language model to be trained to generate a predicted medical plan includes: Concatenate the joint encoding vector and the initialized prompt vector sequence to obtain a concatenated sequence; Input the spliced ​​sequence into the BiLSTM model, perform bidirectional modeling on each prompt vector in the spliced ​​sequence, and obtain the final spliced ​​sequence; The final concatenated sequence is input into the large language model to be trained to generate a predicted medical plan.

8. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the method for generating a medical plan as claimed in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a processor of a computer, the computer is caused to execute the method for generating a medical plan according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Medication scheme generation method based on large language model and related equipment

    CN117194630A

  • Disease diagnosis result evaluation method, device and equipment and storage medium

    CN119864148A