Daily medical task personalized formulation method and system based on large-scale language model

Through a large-scale language model-based approach, using patients' health sign data and medical task records to generate personalized today's treatment tasks, solving the problem that treatment plans cannot be updated simultaneously, and improving the flexibility of treatment plans and the rigor and completeness of candidate tasks.

CN120412965APending Publication Date: 2025-08-01ZHONGDIAN YAOMING DATA TECH (CHENGDU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410133322.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-31
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

In the prior art, treatment plans cannot be updated simultaneously based on the patient's health indication information, resulting in insufficient flexibility of treatment plans strategies and the rigor and completeness of candidate treatment tasks.

Method used

A large-scale language model is used to generate a pre-trained model through template prefab and model pre-training, combined with incremental data training, and a personalized treatment task today is generated using patient health sign data, medical task execution strategies and execution records.

Benefits of technology

This has achieved the generation of personalized today's treatment tasks based on the latest patient information, which has improved the flexibility of treatment plan strategies and the rigor and completeness of candidate treatment tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120412965A_ABST
    Figure CN120412965A_ABST
Patent Text Reader

Abstract

The invention discloses a daily medical task personalized formulation method and system based on a large-scale language model, and the method comprises the steps: obtaining the newest health sign data, medical task execution strategies and medical task execution records of a patient according to a medical task personalized customization request, and carrying out the personalized customization of the medical task based on a model optimization template; and according to the latest health sign data, the medical task execution strategy and the medical task execution record, generating an optimized medical task generation problem and a medical task evaluation optimization problem, and inputting the medical task evaluation optimization problem into the large-scale language model. And generating a candidate medical task and a candidate medical task evaluation result, and determining a personalized medical task execution strategy meeting the medical task personalized customization request according to the candidate medical task and the candidate medical task evaluation result. By applying the method and the system provided by the invention, the flexibility of a treatment scheme strategy and the preciseness and completeness of candidate treatment tasks are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical fields of the Internet of Things, smart health, and artificial intelligence. More specifically, it relates to a method and system for personalized daily medical task formulation based on large language models. Background Art

[0002] Today's treatment task refers to the intervention actions that a patient should complete on time today according to the doctor's order during the treatment cycle. Abstractly speaking, it is an organic combination of intervention time, intervention means, and dosage.

[0003] Taking the daily treatment task of medicine as an example, the intervention time is 9:00, the intervention means is taking aspirin, and the dosage is 0.3g; the intervention time is 14:00, the intervention means is taking aspirin, and the dosage is 0.3g; the intervention time is 19:00, the intervention means is taking aspirin, and the dosage is 0.3g.

[0004] Taking the daily treatment task of rehabilitation training as an example, the intervention time is 20:00, the intervention means is completing the cat arch back, and the dosage is 15 per group, with a total of 2 groups; the intervention means is completing the supine spinal side rotation, and the dosage is 10 per group, with a total of 1 group.

[0005] The personalized generation of daily treatment tasks for common diseases aims to provide a mechanism for generating daily treatment tasks applicable to multiple diseases, rather than a single solution for a specific disease. Under the existing outpatient model, when a patient goes to the hospital to see a doctor, the doctor issues a static prescription with a specific duration, indicating what medicine to take, the frequency of taking, the dosage, the duration of taking, and the stopping conditions, etc. The patient mechanically decomposes it into daily medical tasks to be performed according to this prescription. The static prescription is formulated by the doctor based on the health indication information of the patient when seeing the doctor. However, obviously, during the treatment process, the health indication information of the patient will change continuously over time. At this time, this static prescription is very likely no longer the optimal treatment plan at this time. Therefore, it is impossible to achieve daily-level precise treatment task recommendation or adjustment.

[0006] In summary, it is necessary to introduce a new method and system. This method and system are applicable to the general disease daily treatment task generation mechanism for multiple diseases, and can generate personalized today's treatment tasks for patients based on the patient's latest health indication information, treatment plan strategy, and the completion records of daily treatment tasks in previous days, achieving the effect of a daily short prescription equivalent to having the doctor diagnose the patient once a day, so as to solve the technical problem in the existing technology that the treatment plan cannot be updated synchronously according to the patient's health indication information, thereby improving the flexibility of the treatment plan strategy, as well as the rigor and completeness of candidate treatment tasks. Summary of the Invention

[0007] In view of the above-mentioned technical problems, the present invention provides a method and system for personalized formulation of daily medical tasks based on a large-scale language model. The method is applicable to the general disease daily treatment task generation mechanism for various diseases, and can generate personalized today's treatment tasks for patients according to the latest health indication information, treatment plan strategies, and daily treatment task completion records of patients, achieving the effect of a daily short prescription equivalent to having a doctor diagnose the patient once a day, so as to solve the technical problem in the prior art that the treatment plan cannot be synchronously updated according to the patient's health indication information.

[0008] The present invention provides a method for personalized formulation of daily medical tasks based on a large-scale language model, and the method includes: S1, template prefabrication and model pre-training: constructing a large-scale language model according to the large-scale language model structure, prefabricating a model optimization template according to the template structure, and performing incremental training on the large-scale language model using incremental data to generate a pre-trained large-scale language model; S2, determining the medical task optimization problem: receiving and parsing a personalized customization request for medical tasks, and obtaining the latest health sign data, medical task execution strategies, and medical task execution records of the patient according to the parsing result; based on the model optimization template, generating an optimized medical task generation problem and a medical task evaluation optimization problem according to the latest health sign data, medical task execution strategies, and medical task execution records; S3, candidate medical task evaluation: inputting the medical task evaluation optimization problem into the large-scale language model to generate candidate medical tasks and candidate medical task evaluation results; S4, determining the personalized execution strategy: determining a personalized medical task execution strategy that meets the personalized customization request for medical tasks according to the candidate medical tasks and candidate medical task evaluation results.

[0009] Preferably, the health sign data includes: patient basic information, medical record information, and sign monitoring data; the patient basic information includes: patient number, patient name, gender, and age; the sign monitoring data includes: physical examination data, auxiliary examination data, diagnosis results, and diagnosis dates; the medical task execution strategies include: medical task names, medical task types, medical task actions, the number of actions, and priorities; the medical task execution records include: time, medical task names, medical task action execution times, the number of completed actions, and medical task execution results; the template structure includes the health sign data, the medical task execution strategies, the medical task execution records, the personalized medical task execution strategies, optimized medical task generation problems, medical task evaluation optimization problems, and optimized medical task evaluation results.

[0010] Preferably, the step S1 further includes: S11, template prefabrication and model encapsulation: prefabricate the model optimization template according to the template structure, and use the model optimization template to encapsulate the large-scale language model to generate the encapsulated large-scale language model, and initialize the model parameters; S12, incremental data processing: according to the application scenario of the large-scale language model, obtain the corresponding incremental data, and perform cleaning and annotation processing on the incremental data to obtain an annotated data set; S13, model incremental training: use the annotated data set to perform incremental training on the encapsulated large-scale language model, and adjust the model parameters according to the training results and the test data set to generate the pre-trained large-scale language model; wherein, the annotated data set includes a validation data set and the test data set.

[0011] Preferably, the step S2 further includes: S21, receiving the medical task personalized customization request, parsing the medical task personalized customization request, and determining the patient number according to the parsing result; S22, according to the patient number, obtaining the patient's latest health sign data, the medical task execution strategy, and the medical task execution record; S23, based on the model optimization template, generating the optimized medical task generation problem according to the patient's latest health sign data, the medical task execution strategy, and the medical task execution record, and inputting the optimized medical task generation problem into the pre-trained large-scale language model to generate the candidate medical task; S24, inputting the candidate medical task, as well as the patient's latest health sign data, the medical task execution strategy, and the medical task execution record into the model optimization template for medical task evaluation to obtain the medical task evaluation optimization problem; S25, inputting the medical task evaluation optimization problem into the pre-trained large-scale language model to obtain the optimized medical task evaluation result; wherein, the optimized medical task evaluation result includes satisfied and not satisfied.

[0012] Preferably, in step S4, the step of determining the personalized medical task execution strategy that meets the medical task personalized customization request according to the candidate medical task and the candidate medical task evaluation result further includes: S41, if the optimized medical task evaluation result is not satisfied, then the patient's latest health sign data, the medical task execution strategy, the medical task execution record, the model optimization template, and the pre-trained large-scale language model are used to generate a new candidate medical task and a new candidate medical task evaluation result, and the personalized medical task execution strategy is determined according to the new candidate medical task and the new candidate medical task evaluation result; S42, if the optimized medical task evaluation result is satisfied, then determine the personalized medical task execution strategy as the candidate medical task.

[0013] Preferably, the step S41 further includes: S411, inputting the latest health sign data, the medical task execution strategy, and the medical task execution record of the patient into the model optimization template to generate a new optimized medical task generation problem, and inputting the new optimized medical task generation problem into the pre-trained large language model to generate a new candidate medical task; S412, inputting the new candidate medical task, the latest health sign data, the medical task execution strategy, and the medical task execution record of the patient into the model optimization template for medical task evaluation to obtain a new medical task evaluation optimization problem, and inputting the new medical task evaluation optimization problem into the pre-trained large language model to obtain a new optimized medical task evaluation result; S413, determining the personalized medical task execution strategy according to the new candidate medical task and the new candidate medical task evaluation result.

[0014] Preferably, in step S2, before generating the optimized medical task generation problem and the medical task evaluation optimization problem based on the model optimization template according to the latest health sign data, the medical task execution strategy, and the medical task execution record, it further includes a key information matching process step, specifically: 1) extracting features from the latest health sign data, the medical task execution strategy, and the medical task execution record of the patient according to the template structure to obtain corresponding feature data; 2) respectively extracting key information from the feature data corresponding to the health sign data, the medical task execution strategy, and the medical task execution record according to preset key information, and reorganizing the extracted data in a preset format to obtain the reorganized health sign data, the medical task execution strategy, and the medical task execution record; wherein, the preset key information is set according to the parsing result of the medical task personalization customization request; the preset format is determined based on the template structure.

[0015] Preferably, in step S3, the step of inputting the medical task evaluation optimization problem into the large language model to generate a candidate medical task and a candidate medical task evaluation result further includes a file processing step, specifically: S311, calling a file transfer interface and sending the data corresponding to the candidate medical task to the large model service node; S312, the large model service node, based on the large language model, continues to write the context text of all medical tasks corresponding to the candidate medical task to generate the text corresponding to the candidate medical task; wherein, the format of the text corresponding to the candidate medical task is a semi-structured JSON text.

[0016] Preferably, in step S3, after generating the candidate medical tasks, it further includes the step of entity processing, specifically: S321, analyzing the health sign data and the text corresponding to the candidate medical tasks, identifying key entities, and determining the association relationship between the key entities based on the characteristics of the key entities; S322, reorganizing the health sign data again in a preset format according to the association relationship between the key entities.

[0017] Correspondingly, the present invention also provides a system for personalized daily medical task formulation based on a large language model. The system includes a model training module, a medical task optimization module, a medical task evaluation module, and a personalized strategy determination module; wherein, the model training module is used for template prefabrication and model pre-training: constructing a large language model according to the large language model structure, prefabricating a model optimization template according to the template structure, and performing incremental training on the large language model using incremental data to generate a pre-trained large language model; the medical task optimization module is used for determining the medical task optimization problem: receiving and parsing the medical task personalized customization request, obtaining the latest health sign data, medical task execution strategy, and medical task execution record of the patient according to the parsing result; based on the model optimization template, generating an optimized medical task generation problem and a medical task evaluation optimization problem according to the latest health sign data, medical task execution strategy, and medical task execution record; the medical task evaluation module is used for evaluating candidate medical tasks: inputting the medical task evaluation optimization problem into the large language model to generate candidate medical tasks and candidate medical task evaluation results; the personalized strategy determination module is used for determining the personalized execution strategy: determining the personalized medical task execution strategy that meets the medical task personalized customization request according to the candidate medical tasks and candidate medical task evaluation results.

[0018] By applying the above technical solutions, the present invention realizes providing an optimized personalized medical task execution strategy for patients daily based on a model optimization template and a large language model, using the latest health sign data, medical task execution strategy, and medical task execution record, provides a general disease daily treatment task generation mechanism applicable to various diseases, can generate personalized today's treatment tasks for patients according to the patients' latest health indication information, treatment plan strategy, and daily treatment task completion records, solves the technical problem in the prior art that the treatment plan cannot be updated synchronously according to the patients' health indication information, thereby improving the flexibility of the treatment plan strategy, as well as the rigor and completeness of the candidate treatment tasks. Description of the Drawings

[0019] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those skilled in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0020] Figure 1 It shows a schematic flow diagram of the method for personalized customization of daily medical tasks based on a large language model proposed in an embodiment of the present invention;

[0021] Figure 2 It shows a schematic diagram of the execution process of the method for personalized customization of daily medical tasks based on a large language model proposed in an embodiment of the present invention;

[0022] Figure 3 It shows a schematic flow diagram of the model fine-tuning process of the method for personalized customization of daily medical tasks based on a large language model proposed in an embodiment of the present invention;

[0023] Figure 4 It shows a schematic flow diagram of the treatment task generation process of the method for personalized customization of daily medical tasks based on a large language model proposed in an embodiment of the present invention;

[0024] Figure 5 It shows a schematic structural diagram of a system for personalized customization of daily medical tasks based on a large language model proposed in an embodiment of the present invention. Detailed implementation manners

[0025] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0026] The present invention provides a method for personalized customization of daily medical tasks based on a large language model, as Figure 1 shown, the method includes the following steps:

[0027] S1, template prefabrication and model pre-training: Construct a large language model according to the large language model structure, prefabricate a model optimization template according to the template structure, and perform incremental training on the large language model using incremental data to generate a pre-trained large language model.

[0028] In this embodiment, the health sign data includes: patient basic information, medical record information, and sign monitoring data;

[0029] The basic patient information includes: patient number, patient name, gender, and age;

[0030] The physical sign monitoring data includes: physical examination data, auxiliary examination data, diagnosis results, and diagnosis date;

[0031] The medical task execution strategy includes: medical task name, medical task type, medical task actions, number of actions, and priority;

[0032] The medical task execution record includes: time, medical task name, medical task action execution time, number of actions completed, and medical task execution result;

[0033] The template structure includes the health sign data, the medical task execution strategy, the medical task execution record, the personalized medical task execution strategy, the optimization medical task generation problem, the medical task evaluation optimization problem, and the optimization medical task evaluation result.

[0034] In this embodiment, the steps of S1 further include:

[0035] S11, template prefabrication and model encapsulation: Prefabricate the model optimization template according to the template structure, and use the model optimization template to encapsulate the large language model to generate the encapsulated large language model, and initialize the model parameters;

[0036] S12, incremental data processing: Obtain the corresponding incremental data according to the application scenario of the large language model, and perform cleaning and annotation processing on the incremental data to obtain the annotated data set;

[0037] S13, model incremental training: Use the annotated data set to perform incremental training on the encapsulated large language model, and adjust the model parameters according to the training results and the test data set to generate the pre-trained large language model;

[0038] Among them,

[0039] The annotated data set includes the validation data set and the test data set.

[0040] S2, determine the medical task optimization problem: Receive and parse the medical task personalized customization request, and obtain the patient's latest health sign data, medical task execution strategy, and medical task execution record according to the parsing result; Based on the model optimization template, generate the optimization medical task generation problem and the medical task evaluation optimization problem according to the latest health sign data, the medical task execution strategy, and the medical task execution record.

[0041] In this embodiment, the steps of S2 further include:

[0042] S21: Receive the personalized customization request for the medical task, parse the personalized customization request for the medical task, and determine the patient number according to the parsing result;

[0043] S22: According to the patient number, obtain the latest health sign data, the medical task execution strategy, and the medical task execution record of the patient;

[0044] S23: Based on the model optimization template, generate the optimized medical task generation problem according to the latest health sign data, the medical task execution strategy, and the medical task execution record of the patient, and input the optimized medical task generation problem into the pre-trained large-scale language model to generate the candidate medical task;

[0045] S24: Input the candidate medical task, as well as the latest health sign data, the medical task execution strategy, and the medical task execution record of the patient into the model optimization template for medical task evaluation to obtain the medical task evaluation optimization problem;

[0046] S25: Input the medical task evaluation optimization problem into the pre-trained large-scale language model to obtain the optimized medical task evaluation result;

[0047] Among them,

[0048] The optimized medical task evaluation result includes satisfied and dissatisfied.

[0049] In this embodiment, in step S2, before generating the optimized medical task generation problem and the medical task evaluation optimization problem based on the model optimization template according to the latest health sign data, the medical task execution strategy, and the medical task execution record, it further includes a key information matching and processing step, specifically:

[0050] 1) Extract features from the latest health sign data, the medical task execution strategy, and the medical task execution record of the patient according to the template structure to obtain corresponding feature data;

[0051] 2) Extract key information from the feature data corresponding to the health sign data, the medical task execution strategy, and the medical task execution record respectively according to the preset key information, and reorganize the extracted data in a preset format to obtain the reorganized health sign data, the medical task execution strategy, and the medical task execution record;

[0052] Among them,

[0053] The preset key information is set according to the parsing result of the personalized customization request for the medical task.

[0054] It is determined based on the template structure according to a preset format.

[0055] To enable those skilled in the art to better understand the method for personalized formulation of daily medical tasks based on a large language model provided by the present invention, the above steps will be supplemented and explained below by taking a scoliosis patient as an example.

[0056] Such as Figure 2 and Figure 3 As shown, the large language model is pre-trained for domain-specific disease knowledge and fine-tuned with specific task supervision.

[0057] The large language base model can be GPT, BERT, T5 or other self-developed LLM models. The large language model is encapsulated with a prompt template (i.e., the model optimization template), which contains examples of norms, details, and input-output formats written in natural language conventions, so that the large language model can more accurately understand the comprehensive information of patients and treatment plan strategies, and generate personalized today's treatment tasks that conform to medical logic.

[0058] Among them, the incremental pre-training of the large language model includes: enhancing the domain knowledge of the base large language model using a medical knowledge corpus. The medical knowledge corpus includes general medical textbooks, medical textbooks in specific fields, clinical guidelines, expert consensus, academic papers, etc. These data can provide the latest knowledge and guiding principles on treatment plans. This stage aims to let the model learn the natural language structure and rules of new domain knowledge, and requires a large amount of data. In order to improve the understanding ability of the large language model in domain-specific disease knowledge, data cleaning, domain knowledge annotation, and data augmentation are performed on medical textbooks, medical textbooks in specific fields, clinical guidelines, expert consensus, academic papers, etc., to improve the quality of the medical knowledge corpus.

[0059] The supervised fine-tuning of the large language model refers to the process of fine-tuning the already trained model on a specific task after the incremental pre-training. In this process, some labeled data sets usually need to be collected for the specific task.

[0060] The data set is collected, for example, through the following processing process:

[0061] First, extract relevant data from professional literature, medical databases, or patient records in the relevant field; then clean, annotate, and organize this data to ensure data quality and consistency. Specific tasks are determined through expert knowledge, task requirements, or the guidance of domain experts. For example, in the medical field, specific tasks can be medication dosage, medication duration, rehabilitation exercise recommendations, etc.), and then use these datasets to fine-tune the pre-trained model so that the model can better adapt to the requirements of specific tasks.

[0062] When fine-tuning the pre-trained model, the processing of these datasets by the model is as follows: The model uses existing pre-trained knowledge and annotated data for supervised learning, and adjusts the model parameters through the backpropagation algorithm to make it better adapt to the requirements of specific tasks. This process can be achieved by minimizing the loss function of the model on the annotated data. The key lies in balancing the generalization ability of the model and its adaptability to specific tasks. For this purpose, techniques such as regularization and learning rate adjustment are required. Regularization can help prevent overfitting and improve the generalization ability of the model. Adjusting the learning rate can control the parameter update speed of the model during fine-tuning to balance the retention of pre-trained knowledge and the adaptation to specific tasks.

[0063] Since the pathogenesis of different diseases, the physiological and biochemical characteristics of patients, disease treatment methods, the dosage of various methods, etc. are all different, the key points of dataset annotation required for model fine-tuning in different disease fields are also different. Therefore, the key points of dataset annotation can be determined through expert knowledge. Taking adolescent spinal health as an example, the indicators that need to be focused on when preparing the dataset are: posture and body shape, spinal curvature, muscle balance, pain and discomfort, exercise and activity level, sleep posture and sleep environment, etc.; the treatment methods that need to be focused on are: cat camel, supine spinal rotation, left hip, lateral thigh muscle training, right hip + lateral thigh muscle training, supine core training, abdominal core training, back muscle training, diaphragmatic breathing, etc. Usually, only a small amount of annotated data is required at this stage to obtain good results on specific tasks. In this embodiment, only three specific task scenarios, namely generating for today's treatment task (i.e., the personalized medical task execution strategy), treatment task evaluation, and treatment task optimization, need to be fine-tuned. The reason is that large language models have learned rich language knowledge and context understanding ability during the pre-training stage. During the fine-tuning stage, only annotated data is needed to adjust the model parameters to make it adapt to the requirements of specific tasks.

[0064] Fine-tune for the scenarios generated for treatment tasks. The technical process is to collect an annotated dataset related to treatment tasks, such as medical record information of adolescent idiopathic scoliosis patients, corresponding treatment plans, and detailed combinations of exercise rehabilitation actions. Then, input these data into a pre-trained large model, and update the model's parameters through a fine-tuning algorithm to make it more accurate and reasonable when generating text related to treatment tasks.

[0065] Fine-tune for treatment task evaluation. The technical process is to collect an annotated dataset related to treatment task evaluation, such as treatment effect evaluation data of adolescent idiopathic scoliosis patients. Then, input these data into a pre-trained large model, and update the model's parameters through a fine-tuning algorithm to make it more accurate and comprehensive when evaluating treatment tasks; Fine-tune for treatment task optimization. The technical process is to collect an annotated dataset related to treatment plan optimization, such as optimization suggestions for the combination of exercise rehabilitation actions of adolescent idiopathic scoliosis patients. Then, input these data into a pre-trained large model, and update the model's parameters through a fine-tuning algorithm to make it more targeted and effective when providing treatment task optimization suggestions.

[0066] The treatment task mentioned above is a medical task.

[0067] S3. Candidate medical task evaluation: Input the medical task evaluation optimization problem into the large-scale language model to generate candidate medical tasks and candidate medical task evaluation results.

[0068] In this embodiment, in step S3, the step of inputting the medical task evaluation optimization problem into the large-scale language model to generate candidate medical tasks and candidate medical task evaluation results further includes a file processing step, specifically:

[0069] S311. Call the file transfer interface and send the data corresponding to the candidate medical task to the large model service node;

[0070] S312. The large model service node, based on the large-scale language model, continues to write the context text for the text corresponding to all medical tasks according to the candidate medical task to generate the text corresponding to the candidate medical task;

[0071] Among them, the format of the text corresponding to the candidate medical task is semi-structured JSON text.

[0072] In this embodiment, in step S3, after generating the candidate medical task, it further includes an entity processing step, specifically:

[0073] S321. Analyze the health sign data and the text corresponding to the candidate medical tasks, identify key entities, and determine the association relationships between the key entities based on the characteristics of the key entities;

[0074] S322. Reorganize the health sign data again in a preset format according to the association relationships between the key entities.

[0075] S4. Determine a personalized execution strategy: Determine a personalized medical task execution strategy that meets the personalized customization request of the medical task according to the candidate medical task and the candidate medical task evaluation result.

[0076] In this embodiment, in step S4, the step of determining a personalized medical task execution strategy that meets the personalized customization request of the medical task according to the candidate medical task and the candidate medical task evaluation result further includes:

[0077] S41. If the optimized medical task evaluation result is not satisfied, generate a new candidate medical task and a new candidate medical task evaluation result using the patient's latest health sign data, the medical task execution strategy, the medical task execution record, the model optimization template, and the pre-trained large-scale language model, and determine the personalized medical task execution strategy according to the new candidate medical task and the new candidate medical task evaluation result;

[0078] S42. If the optimized medical task evaluation result is satisfied, determine the personalized medical task execution strategy as the candidate medical task.

[0079] In this embodiment, the step of S41 further includes:

[0080] S411. Input the patient's latest health sign data, the medical task execution strategy, and the medical task execution record into the model optimization template to generate a new optimized medical task generation problem, and input the new optimized medical task generation problem into the pre-trained large-scale language model to generate a new candidate medical task;

[0081] S412. Input the new candidate medical task, the patient's latest health sign data, the medical task execution strategy, and the medical task execution record into the model optimization template for medical task evaluation to obtain a new medical task evaluation optimization problem, and input the new medical task evaluation optimization problem into the pre-trained large-scale language model to obtain a new optimized medical task evaluation result;

[0082] S413. Determine the personalized medical task execution strategy according to the new candidate medical task and the new candidate medical task evaluation result.

[0083] To enable those skilled in the art to better understand the method for personalized daily medical task formulation based on large language models provided by the present invention, the above steps will now be further illustrated by taking scoliosis patients as an example.

[0084] As Figure 4 shown, generally, the system has collected the current medical record information of patients in a specific disease field, including but not limited to patient age, gender, past medical history, allergy history, vital sign information related to the disease field target, examinations, biochemical test results, etc., the medical history related to the disease field, the current treatment plan strategy, and the execution status of daily treatment tasks under the current treatment plan and other factual information. For these information, in order to improve the system's treatment task generation, evaluation, and optimization effects in a specific disease field, the following technical processing will be performed on these information: data preprocessing, feature extraction, and data augmentation. Data preprocessing includes operations such as data cleaning, denoising, and standardization to ensure the accuracy and consistency of the data. Feature extraction involves extracting useful features from the original data, such as extracting indicators such as height, weight, bone age, and spinal curvature (Cobb angle) from the medical record description. Data augmentation can be achieved by synthesizing new samples or expanding existing samples to increase the diversity and quantity of the data and improve the generalization ability of the model.

[0085] Step 1, query the complete course of disease information of a patient from the patient information library by a certain patient id. It includes but not limited to patient basic information, the latest health indication information, treatment plan strategy, and the completion records of daily treatment tasks, etc. This course of disease information has been structured and entered into the database in advance.

[0086] Step 2: Incorporate the patient's complete course of disease information into the pre-designed prompt template for generating today's treatment tasks (i.e., the model optimization template) through key information extraction and format reorganization, and complete the problem organization of the prompt for generating today's treatment tasks. The prompt template for generating today's treatment tasks (i.e., the model optimization template) is pre-designed according to the characteristics of treatment plans for different diseases and is used to guide the problem organization of the prompt for generating today's treatment tasks. When using it, the closer the content characteristics of the questions are to the corpus characteristics during training, the more accurate the recommended today's treatment tasks will be. To incorporate information such as the patient's complete medical record information, treatment plan strategies, and records of completed daily treatment tasks into the pre-designed prompt template for generating daily tasks (i.e., the model optimization template) through key information extraction and format reorganization, the following technical processing procedures need to be carried out: Extract key information from the patient's medical record information and extract important information related to task generation, such as disease diagnosis, symptom description, past treatment records, etc. Then, reorganize the format of this information to meet the requirements of the pre-designed prompt template for generating plans (i.e., the model optimization template); Determine the available treatment means for the patient's daily tasks according to the doctor's treatment plan strategies, such as medications, diets, exercise rehabilitation actions, etc. Reorganize the format of this information to meet the requirements of the pre-designed prompt template for generating plans (i.e., the model optimization template); Extract key information from the records of completed daily treatment tasks of the patient and extract important information related to task generation, such as actual medication doses, actual completion times of exercise rehabilitation actions, actual action accuracy scores, etc. Then, reorganize the format of this information to meet the requirements of the pre-designed prompt template for generating tasks (i.e., the model optimization template), so as to ultimately achieve incorporation into the pre-designed prompt template for generating tasks (i.e., the model optimization template).

[0087] Taking adolescent spinal health as an example, the main constituent elements of its prompt template for generating today's treatment tasks (i.e., the model optimization template) are exemplified as follows:

[0088]

[0089] Step 3: Send the prompt data for generating today's treatment tasks (i.e., the optimized data) to the fine-tuned large language model service endpoint to obtain the generated candidate today's treatment tasks (i.e., candidate medical tasks).

[0090] In order to send the prompt data (i.e., optimized data) generated by the solution to the fine-tuned large-scale language model service endpoint and obtain the generated candidate today's treatment tasks, the following technical processing process is included: the pre-processed prompt data (i.e., optimized data) generated by today's treatment tasks is sent to the fine-tuned large-scale language model service endpoint through the RestAPI; in the fine-tuned large-scale language model, the API for generating text is called, and the model will continue to write the text based on the input information and context, thereby obtaining the text of the candidate today's treatment tasks. As the candidate today's treatment tasks, the candidate today's treatment tasks are expressed in the form of semi-structured JSON text.

[0091] In step 4, the patient's complete medical history information and the candidate treatment tasks for today generated in step 3 are integrated into the pre-designed treatment task evaluation prompt template (i.e., model optimization template) by extracting key information and reformatting it, completing the prompt question organization for the treatment task evaluation (i.e., medical task optimization problem). The treatment task evaluation prompt template (i.e., model optimization template) is also pre-designed based on the characteristics of treatment plans for different diseases and is used to guide the prompt question organization for treatment task evaluation. When used, the closer the content characteristics of the questions are to the characteristics of the training corpus, the more accurate the generated evaluation conclusions. In order to integrate the patient's complete medical history information and the candidate today's treatment tasks generated in step 3 into the pre-designed treatment task evaluation prompt template (i.e., model optimization template) through key information extraction and format reorganization, and complete the question organization of the treatment task evaluation prompt, the following technical processing processes need to be performed: text analysis, entity recognition, and relationship extraction; text organization, structuring, and annotation; generating a question organization of the treatment task evaluation prompt containing key information and sufficient format. The question organization of the treatment task evaluation prompt refers to the question organization expressed in a certain structure and annotation form after the key information such as the patient's medical history information and candidate today's treatment tasks are extracted and formatted. Therefore, through the question organization of the treatment task evaluation prompt, the purpose of effectively evaluating today's treatment tasks is achieved.

[0092] Key information extraction includes the following technical processing procedures: using text analysis technology to analyze texts such as patient medical history information and candidate treatment tasks for today, identifying key entities such as disease name, condition characteristics, treatment goals, drug name, drug dosage, exercise rehabilitation movements, exercise intensity, etc., and using relationship extraction technology to extract the relationships between them, such as the correlation between treatment goals, drug dosage, exercise intensity and condition characteristics.

[0093] Format reorganization includes the following technical processing procedures: For medical record information, organize it according to different medical record parts. For example, organize the past medical history, current medical history, physical examination results, laboratory test results, etc. into different paragraphs respectively; for treatment plan strategies, organize them according to different aspects or priorities to clarify the scope of treatment means; for the record of completed treatment tasks, list the task execution time of each day and the actual completion status of each means in sequence, such as the actual number of completed sets / numbers of each action; for candidate treatment tasks today, organize tasks in formats such as time, means, dose / intensity, etc. For example, training time, action name, action goal, number of action sets / numbers, etc.

[0094] Taking adolescent spinal health as an example, the main components of its treatment task evaluation prompt template (i.e., model optimization template) are exemplified as follows:

[0095] Among them, the treatment plan strategy: (medical task execution strategy), the medical task execution record includes the record of completed treatment tasks and the completion status of treatment tasks, and the exercise rehabilitation action plan is the medical task execution strategy.

[0096]

[0097]

[0098] Step 5: Send the treatment task evaluation prompt data to the fine-tuned large language model service endpoint to obtain the treatment task evaluation result, including the conclusion (satisfied / not satisfied) and the inference reason for the conclusion.

[0099] Step 6: If the evaluation result generated in Step 5 is not passed (i.e., not satisfied), then integrate information such as the patient's complete course of disease information, treatment goals, candidate treatment tasks today generated in Step 3, and the evaluation result generated in Step 5 into the pre-designed today's treatment task optimization prompt template (i.e., model optimization template) through key information extraction and format reorganization to complete the problem organization of today's treatment task optimization prompt. The today's treatment task optimization prompt template (i.e., model optimization template) is also pre-designed according to the treatment plan characteristics of different diseases and is used to guide the problem organization of today's treatment task optimization tasks. When using it, the closer the content characteristics of the questions are to the corpus characteristics during training, the more accurate the generated optimization tasks will be. Taking adolescent spinal health as an example, the main components of its today's treatment task optimization prompt template (i.e., model optimization template) are exemplified as follows:

[0100] Among them, the treatment plan strategy: (medical task execution strategy), the medical task execution record includes the treatment task completion record and the treatment task completion status. The exercise rehabilitation action plan is the medical task execution strategy, and the treatment task evaluation result is the candidate medical task evaluation result.

[0101]

[0102]

[0103] Step 7: Send the optimized prompt data of today's treatment tasks to the fine-tuned large language model service endpoint to obtain the candidate optimized today's treatment tasks.

[0104] Repeat steps 4 to 7 until a candidate today's treatment task with a satisfied evaluation result is obtained.

[0105] Step 8: Format the satisfied candidate today's treatment tasks in JSON format, combined with information such as the recommended reasons in the evaluation results, and output them to the downstream system interface.

[0106] By applying the above technical solutions, an optimized personalized medical task execution strategy is provided for patients daily based on the model optimization template and the large language model, using the latest health sign data, medical task execution strategy, and medical task execution record. A general disease daily treatment task generation mechanism applicable to multiple diseases is provided, which can generate personalized today's treatment tasks for patients according to the patient's latest health indication information, treatment plan strategy, and daily treatment task completion records of previous days. This solves the technical problem in the prior art that the treatment plan cannot be synchronously updated according to the patient's health indication information, thereby improving the flexibility of the treatment plan strategy, as well as the rigor and completeness of the candidate treatment tasks.

[0107] In addition, by applying the above technical solutions, introducing a large language model to generate candidate today's treatment tasks can describe the patient's basic information and the treatment plan strategy formulated by the doctor in natural language, with higher flexibility. At the same time, adding the patient's daily treatment task completion status makes the formulated today's treatment tasks more in line with the patient's current state. Introducing a large language model to evaluate candidate today's treatment tasks can effectively improve the rigor and completeness of the candidate treatment tasks. Using the Prompt template (i.e., the model optimization template) to specify examples of the writing norms, details, and input-output formats of natural language enables the large language model to more accurately understand the patient's situation and treatment goals, thereby generating today's treatment tasks that conform to the patient's current characteristics. For different disease fields, different fine-tuning training corpora can be prepared in the same way and obtained by targeted fine-tuning of open-source large models.

[0108] Corresponding to the method for personalized daily medical task formulation based on a large-scale language model in an embodiment of the present invention, the present invention also discloses a system for personalized daily medical task formulation based on a large-scale language model, as Figure 5 shown. The system includes a model training module, a medical task optimization module, a medical task evaluation module, and a personalized policy determination module;

[0109] Among them,

[0110] The model training module is used for template prefabrication and model pre-training: constructing a large-scale language model according to the large-scale language model structure, prefabricating a model optimization template according to the template structure, and performing incremental training on the large-scale language model using incremental data to generate a pre-trained large-scale language model;

[0111] The medical task optimization module is used to determine the medical task optimization problem: receiving and parsing the medical task personalized customization request, and obtaining the patient's latest health sign data, medical task execution strategy, and medical task execution record according to the parsing result; based on the model optimization template, generating an optimized medical task generation problem and a medical task evaluation optimization problem according to the latest health sign data, medical task execution strategy, and medical task execution record;

[0112] The medical task evaluation module is used for candidate medical task evaluation: inputting the medical task evaluation optimization problem into the large-scale language model to generate candidate medical tasks and candidate medical task evaluation results;

[0113] The personalized policy determination module is used to determine the personalized execution policy: determining a personalized medical task execution policy that meets the medical task personalized customization request according to the candidate medical tasks and candidate medical task evaluation results.

[0114] Each embodiment in this specification is described in a related manner. The same or similar parts among the embodiments can be referred to each other, and the differences between each embodiment and other embodiments are emphasized.

[0115] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A method for personalizing daily medical tasks based on a large-scale language model, characterized by: The method includes: S1, Template prefabrication and model pre-training: Construct a large-scale language model according to the large-scale language model structure, prefabricate a model optimization template according to the template structure, and perform incremental training on the large-scale language model using incremental data to generate a pre-trained large-scale language model; S2, Determine the medical task optimization problem: Receive and parse the personalized customization request for the medical task, and obtain the latest health sign data, medical task execution strategy, and medical task execution record of the patient according to the parsing result; Based on the model optimization template, generate an optimized medical task generation problem and a medical task evaluation optimization problem according to the latest health sign data, medical task execution strategy, and medical task execution record; S3, Candidate medical task evaluation: Input the medical task evaluation optimization problem into the large-scale language model to generate candidate medical tasks and candidate medical task evaluation results; S4, Determine the personalized execution strategy: Determine the personalized medical task execution strategy that meets the personalized customization request of the medical task according to the candidate medical tasks and candidate medical task evaluation results.

2. The method according to claim 1, characterized in that The health sign data includes: patient basic information, medical record information, and sign monitoring data; The patient basic information includes: patient number, patient name, gender, and age; The sign monitoring data includes: physical examination data, auxiliary examination data, diagnosis result, and diagnosis date; The medical task execution strategy includes: medical task name, medical task type, medical task action, number of actions, and priority; The medical task execution record includes: time, medical task name, medical task action execution time, number of actions completed, and medical task execution result; The template structure includes the health sign data, the medical task execution strategy, the medical task execution record, the personalized medical task execution strategy, the optimized medical task generation problem, the medical task evaluation optimization problem, and the optimized medical task evaluation result.

3. The method according to claim 1, wherein The steps of S1 further include: S11, Template prefabrication and model encapsulation: Prefabricate the model optimization template according to the template structure, and use the model optimization template to encapsulate the large-scale language model to generate an encapsulated large-scale language model, and initialize the model parameters; S12, Incremental data processing: Obtain the corresponding incremental data according to the application scenario of the large-scale language model, and perform cleaning and annotation processing on the incremental data to obtain an annotated data set; S13, Model incremental training: Use the annotated data set to perform incremental training on the encapsulated large-scale language model, and adjust the model parameters according to the training results and the test data set to generate the pre-trained large-scale language model; Wherein, The annotated data set includes a validation data set and the test data set.

4. The method according to claim 1, characterized in that, The steps of S2 further include: S21, Receive the personalized customization request for the medical task, parse the personalized customization request for the medical task, and determine the patient number according to the parsing result; S22. Obtain the latest health sign data, medical task execution strategy, and medical task execution record of the patient according to the patient number. S23. Based on the model optimization template, generate an optimized medical task generation problem according to the latest health sign data, medical task execution strategy, and medical task execution record of the patient, and input the optimized medical task generation problem into the pre-trained large-scale language model to generate the candidate medical task. S24. Input the candidate medical task, as well as the latest health sign data, medical task execution strategy, and medical task execution record of the patient, into the model optimization template for medical task evaluation to obtain the medical task evaluation optimization problem. S25. Input the medical task evaluation optimization problem into the pre-trained large-scale language model to obtain the optimized medical task evaluation result. Among them, the optimized medical task evaluation result includes satisfied and unsatisfied.

5. The method according to claim 1, wherein In step S4, the step of determining the personalized medical task execution strategy that meets the medical task personalized customization request according to the candidate medical task and the candidate medical task evaluation result further includes: S41. If the optimized medical task evaluation result is unsatisfied, generate a new candidate medical task and a new candidate medical task evaluation result from the latest health sign data, medical task execution strategy, and medical task execution record of the patient, the model optimization template, and the pre-trained large-scale language model, and determine the personalized medical task execution strategy according to the new candidate medical task and the new candidate medical task evaluation result. S42. If the optimized medical task evaluation result is satisfied, determine the personalized medical task execution strategy as the candidate medical task.

6. The method according to claim 5, wherein The step of S41 further includes: S411. Input the latest health sign data, medical task execution strategy, and medical task execution record of the patient into the model optimization template to generate a new optimized medical task generation problem, and input the new optimized medical task generation problem into the pre-trained large-scale language model to generate a new candidate medical task. S412. Input the new candidate medical task, as well as the latest health sign data, medical task execution strategy, and medical task execution record of the patient, into the model optimization template for medical task evaluation to obtain a new medical task evaluation optimization problem, and input the new medical task evaluation optimization problem into the pre-trained large-scale language model to obtain a new optimized medical task evaluation result. S413. Determine the personalized medical task execution strategy according to the new candidate medical task and the new candidate medical task evaluation result.

7. The method according to claim 1, characterized in that, In step S2, before generating the optimized medical task generation problem and the medical task evaluation optimization problem based on the model optimization template according to the latest health sign data, medical task execution strategy, and medical task execution record, it further includes a key information matching process step, specifically: 1) extracting features from the patient's latest health sign data, the medical task execution strategy, and the medical task execution record according to the template structure to obtain corresponding feature data; 2) extracting key information from the health sign data, the medical task execution strategy, and the feature data corresponding to the medical task execution record based on preset key information, and reorganizing the extracted data according to a preset format to obtain the reorganized health sign data, the medical task execution strategy, and the medical task execution record; in, The preset key information is set according to the analysis result of the medical task personalized customization request; The predetermined format is determined based on the template structure.

8. The method according to claim 1, characterized in that, In step S3, the step of inputting the medical task evaluation optimization problem into the large-scale language model to generate candidate medical tasks and candidate medical task evaluation results also includes the step of file processing, specifically: S311, calling a file transfer interface and sending the data corresponding to the candidate medical task to the large model service node; S312, the large model service node performs context text continuation on the texts corresponding to all medical tasks according to the candidate medical tasks based on the large-scale language model to generate texts corresponding to the candidate medical tasks; The text corresponding to the candidate medical tasks is in the form of semi-structured JSON text.

9. The method according to claim 3, wherein In step S3, after generating candidate medical tasks, the entity processing step is also included, specifically: S321, analyzing the health sign data and the text corresponding to the candidate medical tasks, identifying key entities, and determining association relationships between the key entities based on the characteristics of the key entities; S322: reorganize the health sign data according to a preset format based on the association relationship between the key entities.

10. A system for implementing the method for personalized formulation of daily medical tasks based on a large language model according to claim 1, characterized in that, The system includes a model training module, a medical task optimization module, a medical task evaluation module and a personalized strategy determination module; in, The model training module is used for template prefabrication and model pre-training: constructing a large-scale language model according to the large-scale language model structure, prefabricating a model optimization template according to the template structure, and performing incremental training on the large-scale language model using incremental data to generate a pre-trained large-scale language model; The medical task optimization module is used to determine the medical task optimization problem: receive and parse the medical task customization request, obtain the patient's latest health sign data, medical task execution strategy and medical task execution record based on the parsing result; based on the model optimization template, generate the optimized medical task generation problem and the medical task evaluation optimization problem according to the latest health sign data, the medical task execution strategy and the medical task execution record; The medical task evaluation module is configured to evaluate candidate medical tasks by inputting the medical task evaluation optimization problem into the large-scale language model to generate candidate medical tasks and candidate medical task evaluation results; The personalized policy determination module is used to determine a personalized execution policy: determining a personalized medical task execution policy that meets the personalized customization request of the medical task according to the candidate medical tasks and the evaluation results of the candidate medical tasks.