Diet plan generation method, device, equipment and medium
By obtaining real-time body indicators and user input information and using natural language generation models to generate personalized diet plans, the problems of existing systems being unable to meet personalized needs and insufficient data real-time performance are solved, and a more real-time and reliable diet plan generation is achieved.
Patent Information
- Application Number
- CN202410465140.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-17
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2044-04-17
AI Technical Summary
The existing diet plan generation system cannot meet personalized needs, the data is not real-time enough, and user trust is low, which leads to users not strictly implementing the diet plan.
Real-time body indicator data is obtained through health monitoring equipment or software, combined with user input information, and a pre-trained natural language generation model is used to generate a personalized diet plan, including nutrient intake constraints and plan instructions, to ensure the adaptability of the diet plan to the patient's information.
The generated diet plan is more real-time and credible, and patients can better implement the diet plan to ensure nutritional balance and dietary conditioning effects.
Smart Images

Figure CN118262869B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of medical health, and in particular to a method, device, equipment and medium for generating a diet plan. Background Art
[0002] Diet is crucial to human health, especially for individuals with medical conditions. Developing a scientific and reasonable diet plan is particularly important. However, the diet plan generation systems currently available on the market are often generic and fail to meet the personalized needs of patients with conditions such as diabetes, hypertension, and obesity. The few targeted diet analysis systems that exist can only list recommended and non-recommended ingredients. These systems rely on historical user recipes, which differ from the user's current basic situation. Furthermore, the generated diet plans often fail to convince users, leading to them not strictly following the plans and affecting dietary conditioning results. Summary of the Invention
[0003] In view of this, the present application provides a diet plan generation method, device, medium and equipment, which solve the problems that the patient data analyzed by the existing methods is not real-time enough and the user trust in the output results is low.
[0004] In a first aspect of the present application, a method for generating a diet plan is provided, the method comprising:
[0005] In response to the diet plan generation request, a data acquisition request is sent to the health detection device or health detection software, and feedback of real-time monitored body index data is received;
[0006] Display the information input page on the patient client to receive user input information;
[0007] Combining the physical indicator data and the user input information into patient information, and inputting the information into a pre-trained diet plan generation model, wherein the diet plan generation model is a natural language generation model, the diet plan generation model includes a constraint construction unit and a plan generation unit, and the patient information includes basic personal information, diet preference information, and disease information;
[0008] In the diet plan generation model, the constraint construction unit is used to process the patient information based on a pre-constructed health knowledge base to obtain nutrient element intake constraints;
[0009] In the diet plan generation model, the plan generation unit is used to determine a target diet plan and a plan description corresponding to the target diet plan according to the nutrient element intake constraint, wherein the diet plan includes a menu for each meal within a preset time period, and each menu includes the type of ingredients, the quantity of ingredients, and the cooking method, and the plan description is used to indicate the compatibility of the target diet plan with the patient information;
[0010] The target diet plan and the plan description are sent to the patient client to guide the patient to implement the target diet plan.
[0011] In a second aspect of the present application, a diet plan generating device is provided, the device comprising:
[0012] The data receiving module is used to send a data acquisition request to the health detection device or health detection software in response to the diet plan generation request, and receive the feedback of the real-time monitored body index data; and display the information input page on the patient client to receive the user input information
[0013] a data input module, configured to combine the physical indicator data and the user input information into patient information, and input the information into a pre-trained diet plan generation model, wherein the diet plan generation model is a natural language generation model, the diet plan generation model includes a constraint construction unit and a plan generation unit, and the patient information includes basic personal information, dietary preference information, and disease information;
[0014] a plan formulation module for, in the natural language processing model, utilizing the constraint construction unit to process the patient information based on a pre-constructed health knowledge base to obtain nutrient element intake constraints; and, in the natural language processing model, utilizing the plan generation unit to determine, based on the nutrient element intake constraints, a target diet plan and a plan description corresponding to the target diet plan, wherein the diet plan includes a menu for each meal within a preset time period, each menu including ingredient types, ingredient quantities, and cooking methods, and the plan description is used to indicate the compatibility of the target diet plan with the patient information;
[0015] A data output module is used to send the target diet plan and the plan description to the patient client to guide the patient to implement the target diet plan.
[0016] In a third aspect of the present application, a device is provided, comprising a storage medium, a processor, and instructions or codes stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned diet plan generation method when executing the instructions or codes.
[0017] In a fourth aspect of the present application, a medium is provided on which instructions or codes are stored, and when the instructions or codes are executed by a processor, the above-mentioned diet plan generation method is implemented.
[0018] The solution implemented by the above-mentioned diet plan generation method, device, equipment and medium not only distinguishes between recommended and non-recommended ingredients, but also designs nutrient intake constraints, thereby enabling the use of recommended ingredients to formulate corresponding recipes. Compared to methods that can only list recommended and non-recommended ingredients, patients can obtain specific food combinations and food intake amounts, and can directly purchase and prepare according to the menu, saving time and energy. In addition, the assembled menu for each meal takes into account the combination and balance of food, ensuring that patients obtain adequate nutrition while avoiding repeated intake of a single food. Patients can try new ingredients, recipes and cooking methods, increasing the fun and diversity of their diet. On this basis, since the target diet plan formulation process uses information input by the user in real time and real-time monitoring data obtained from health monitoring equipment or health monitoring software, it can better reflect the patient's current physical condition. Compared to methods that plan based on the user's historical recipes and disease information, this embodiment comprehensively analyzes the patient's current condition, preferences, and disease information, etc., and the resulting target diet plan is more real-time, avoiding deviations between the diet plan and the patient's current basic condition due to information lag. Furthermore, in addition to the target diet plan, this embodiment also generates corresponding plan instructions. According to the plan instructions, patients can know how much nutrients they should consume according to their health status, and how much nutrients each ingredient in each meal menu can provide. Therefore, the generated diet plan is reasonable and well-founded, and can gain the trust of patients, prompting patients to be willing to strictly implement the diet plan and ensure the results of dietary conditioning.
[0019] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0021] Figure 1 A schematic diagram showing a flow chart of a method for generating a diet plan provided in an embodiment of the present application is shown;
[0022] Figure 2 A flowchart of another method for generating a diet plan provided in an embodiment of the present application is shown;
[0023] Figure 3 A flowchart of another method for generating a diet plan provided in an embodiment of the present application is shown;
[0024] Figure 4 A structural block diagram of a diet plan generating device provided in an embodiment of the present application is shown;
[0025] Figure 5 FIG1 is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0027] The diet plan generation method provided in the embodiments of this application can be applied to electronic devices capable of executing instructions or programs. These electronic devices include, but are not limited to, various servers, workstations, personal computers, and laptop computers. Running the program on different computing devices merely differs in the execution of the program. Those skilled in the art can foresee that running the program on different computing devices can produce the same technical effects. The present invention is described in detail below using specific embodiments.
[0028] See also Figure 1 As shown, Figure 1 A flowchart of a method for generating a diet plan according to an embodiment of the present invention includes the following steps:
[0029] S101: In response to a request to generate a diet plan, a data acquisition request is sent to a health detection device or health detection software, and real-time monitored body index data is fed back; and an information input page is displayed on the patient client to receive user input information.
[0030] The method provided by the present invention is used to provide patients with targeted diet plans based on the patient's health information, comprehensively consider nutritional balance, and ensure that patients obtain adequate nutrition while meeting the needs of the disease. Specifically, health detection equipment, health detection software, etc. can monitor the patient's physical indicators in real time, such as blood pressure, sleep records, weight, body fat percentage, etc. After receiving the diet plan generation request, a data acquisition request can be sent to the health detection equipment or health detection software to request the real-time monitored physical indicator data, that is, health monitoring data. In addition to the physical indicator data sent by the health detection equipment or health detection software, user input information is also received at the same time, and the real-time physical condition and more comprehensive information input by the user are comprehensively analyzed to improve the accuracy of the target diet plan.
[0031] S102: Combine the physical indicator data and user input information into patient information, and input it into a pre-trained diet plan generation model, wherein the diet plan generation model is a natural language generation model, the diet plan generation model includes a constraint construction unit and a plan generation unit, and the patient information includes personal basic information, diet preference information and disease information.
[0032] In this step, the two pieces of information, physical indicator data and user input information, are integrated to obtain patient information. Patient information includes three categories of content: basic personal information, dietary preference information, and disease information. Among them, physical indicator data belongs to the basic personal information category. After obtaining the patient information, this information is preprocessed and converted into a vector representation that can be understood by a natural language model. It is then input into a pre-trained diet plan generation model, which is used to parse and process the patient information. The diet plan generation model is a natural language generation model. It is understood that the natural language generation model is a natural language processing technology based on machine learning and artificial intelligence that is used to generate natural language text. This technology allows a computer to automatically generate natural language text that conforms to grammatical and semantic rules, such as articles, paragraphs, sentences, or phrases, based on the input content and contextual information. Natural language generation models are typically based on deep learning technologies such as neural networks, and can improve the accuracy and quality of the generated text through data training. In this embodiment, the natural language processing model can be a GPT (Generative Pre-trained Transformer) model, the core of which is the Transformer architecture, consisting of a self-attention mechanism and a feedforward neural network layer. The self-attention mechanism effectively captures the dependencies between different words in a sentence, while the feedforward neural network layer is used for feature extraction and representation transformation. After pre-training, the GPT model can be fine-tuned for various downstream tasks such as text classification, named entity recognition, and text generation.
[0033] S103: In the diet plan generation model, a constraint construction unit is used to process patient information based on a pre-constructed health knowledge base to obtain nutrient element intake constraints. A plan generation unit is used to determine a target diet plan and a plan description corresponding to the target diet plan based on the nutrient element intake constraints. The diet plan includes a menu for each meal within a preset time period, and each meal menu includes the type of ingredients, the quantity of ingredients, and the cooking method. The plan description is used to indicate the adaptability of the target diet plan to the patient information.
[0034] In this step, the pre-trained diet plan generation model is used to process the patient information to obtain the target diet plan. Specifically, the diet plan generation model includes a constraint construction unit and a plan generation unit. During the processing, the constraint construction unit refers to the health knowledge information in the health knowledge base, combines the patient's own health condition and the nutritional requirement reference data corresponding to different diseases and different physical indicators in the health knowledge information, and calculates the corresponding nutrient element intake constraints for the patient. Among them, the health knowledge base is a pre-constructed database, including a large amount of health data, medical professional literature and diet nutrition related databases, etc. These data contain medical information, treatment plans, dietary recommendations and other content for various diseases. Nutrient element intake constraints may include constraints such as daily energy, protein, carbohydrates, fat, various vitamins and trace elements. They can be specific values or value ranges to guide the formulation of target diet plans.
[0035] After that, the plan generation unit determines the intake targets of various nutrients required by the patient for each meal based on the calculated nutrient intake constraints, and then formulates a menu for each meal in combination with the dietary nutrition database to obtain a target diet plan that meets the constraints to guide the patient to eat rationally. Among them, the target diet plan includes a menu for each meal and may also include a menu for snacks between meals. It is understandable that the type, quantity and cooking method of ingredients will lead to changes in nutrients. Therefore, the menu details the type, quantity and cooking method of ingredients. Patients can implement the target diet plan according to the menu for each meal to achieve the purpose of controlling their diet.
[0036] In addition, since the GPT model is a black box model, it cannot provide a specific explanation or reasoning process for generating a diet plan. This may make it difficult for patients to understand how the model generates a diet plan, limiting their understanding and acceptance of the diet plan, causing users to not strictly follow the diet plan, and affecting the results of diet conditioning. Based on this, in addition to the target diet plan, this step also generates a plan description corresponding to the target diet plan, using the plan description to indicate the adaptability of the target diet plan to the patient's information. The plan description may include explanatory text or graphics to help patients understand the basis for generating the diet plan.
[0037] S104: Send the target diet plan and plan instructions to the patient client to guide the patient to implement the target diet plan.
[0038] In this step, the target diet plan and plan instructions are sent to the patient, allowing them to understand the diet plan they need to follow, including the food combinations for each meal and the recommended nutrient content. They are also informed of the rationale for each meal menu and the nutrient ratios. While ensuring that the diet plan and instructions are accurate and personalized, they strive to meet the patient's needs and preferences.
[0039] This embodiment not only distinguishes between recommended and non-recommended ingredients, but also designs nutrient intake constraints, allowing the use of recommended ingredients to formulate corresponding recipes. Compared to methods that only list recommended and non-recommended ingredients, patients can obtain specific food combinations and food intake amounts, and can directly purchase and prepare according to the menu, saving time and energy. In addition, the assembled menu for each meal takes into account the combination and balance of foods, ensuring that patients obtain adequate nutrition while avoiding repeated intake of a single food. Patients can try new ingredients, recipes, and cooking methods, increasing the fun and diversity of their diet. On this basis, since the target diet plan formulation process uses real-time user input information and real-time monitoring data obtained from health monitoring equipment or health monitoring software, it can better reflect the patient's current physical condition. Compared to methods that plan based on the user's historical recipes and disease information, this embodiment comprehensively analyzes the patient's current condition, preferences, and disease information, etc., and the resulting target diet plan is more real-time, avoiding deviations from the patient's current basic condition due to information lag. Furthermore, in addition to the target diet plan, this embodiment also generates corresponding plan instructions. According to the plan instructions, patients can know how much nutrients they should consume according to their health status, and how much nutrients each ingredient in each meal menu can provide. Therefore, the generated diet plan is reasonable and well-founded, and can gain the trust of patients, prompting patients to be willing to strictly implement the diet plan and ensure the results of dietary conditioning.
[0040] Furthermore, as a refinement and expansion of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, other diet plan generation methods are provided, such as Figure 2 As shown, another method for generating a diet plan includes the following steps:
[0041] S201: Acquire health knowledge information and construct a health knowledge information database using the health knowledge information, wherein the health knowledge information includes disease knowledge and dietary health knowledge, and the disease knowledge includes knowledge corresponding to the disease type in the patient information.
[0042] S202: Build a GPT model, input the preprocessed health knowledge information database into the GPT model, and use the constraint construction unit in the GPT model to learn the dietary requirements and nutritional requirements corresponding to the disease type, so that the constraint construction unit can obtain the ability to construct nutrient element intake constraints.
[0043] S203: Obtain patient training data, wherein the patient training data corresponds to the disease type in the patient information; input the preprocessed patient training data into the GPT model, and generate a training diet plan in the GPT model using a plan generation unit, so that the plan generation module acquires the ability to generate a target diet plan.
[0044] In steps S201-S203, before using the GPT model to generate a target diet plan, the model is first built and pre-trained. The GPT model can be built using a deep learning framework (such as TensorFlow, PyTorch), and the established GPT model consists of multiple Transformer layers. The preprocessed training data is then input into the GPT model, and the GPT model is trained using the training data. In the specific training process, health knowledge information is first obtained to build a health knowledge information library. Health knowledge information includes disease knowledge and dietary knowledge, such as medical professional literature, treatment plans, dietary recommendations, etc., which can be obtained from international, national or local health organizations and agency websites, medical journals and research articles, academic databases, etc. Among them, disease knowledge may include knowledge of multiple different types of diseases, including at least the disease type corresponding to the disease information input by the patient.
[0045] The health knowledge database is fed into the GPT model, which then uses this information to learn the model. The GPT model includes a constraint-building unit, which allows for the design of specific pre-training tasks, such as predicting dietary requirements or nutritional content for a specific disease. This allows the constraint-building unit to learn the characteristics and knowledge related to diet for a specific disease during the pre-training phase.
[0046] In addition, the GPT model also includes a plan generation unit, which can be trained using patient training data, wherein the patient training data includes patient information, the patient's corresponding diet plan, and the results of the diet plan execution. After the constraint construction unit training is completed, the GPT model uses the constraint construction unit to establish the nutrient element intake constraints corresponding to the patient training data, and then uses the plan generation unit to generate the corresponding diet plan based on the nutrient element intake constraints. Thereafter, the advantages and disadvantages of the diet plan can be analyzed according to the execution results of each diet plan, and then it can be learned which diet plan is more suitable for different patient information, so as to achieve the purpose of self-learning of the GPT model and enable it to learn how to formulate a diet plan that is more suitable for the patient. In addition, an unsupervised training method can also be used to realize the learning of the plan generation unit, that is, without obtaining the results of the diet plan execution, the training is completed only by generating the corresponding diet plan based on the patient training data.
[0047] After that, you can also obtain verification data to verify the GPT model, adjust and improve the model based on the verification results, and retrain the GPT model until the verification results that meet the requirements are obtained.
[0048] Before model pre-training, patient training data and health knowledge information can also be pre-processed, including the following steps:
[0049] S2021: Perform text cleaning on the health knowledge information, perform word segmentation on the cleaned health knowledge information to obtain multiple words, identify the named entities in each word respectively, and mark the part of speech of each word respectively.
[0050] In step S2021, the knowledge in the health knowledge base is preprocessed. The preprocessing process includes text cleaning, word segmentation, and part-of-speech tagging. Text cleaning can remove special characters, etc.; word segmentation can break down sentences into words. For example, "A study reported that consuming large amounts of vitamin C can help improve immune system function and thus reduce the incidence of colds" -> ["a", "study", "report", "found", "intake", "large amounts", "of", "vitamin C", "can", "help", "improve", "immune system", "function", "thus", "reduce", "cold", "of", "incidence"]; part-of-speech tagging can be used to mark the part of speech of each word, thereby facilitating text analysis. For example, the above text can be tagged as ["numeral", "noun", "verb", "verb", "verb", "noun", "particle", "noun", "particle", "verb", "verb", "noun", "noun", "noun", "conjunction", "verb", "noun", "particle", "noun"]. After this, each word can also be converted into a vector representation for easy processing by the GPT model.
[0051] S2031: performing data cleaning on the patient training data and adding noise to the patient training data to obtain enhanced patient training data;
[0052] S2032: Converting the patient training data into a preset standard unit, and performing normalization and standardization processing on the patient training data to obtain pre-processed patient training data;
[0053] In steps S2031-S2032, the patient training data is preprocessed. Specifically, the patient training data is first cleaned to remove data with obvious errors, such as data on patients with heights of 15 cm. The patient training data is then augmented to expand the training dataset. Specifically, new samples can be generated by adding noise to the patient training data, such as adding a random number offset to the patient's age or adding some perturbation to the patient's geographic location.
[0054] After that, unit conversion, normalization and standardization are performed on the patient training data. For example, for patient A: weight 150 pounds, height 5 feet 7 inches; patient B: weight 65 kg, height 1.75 m, first convert patient A's weight 150 pounds to 68 kilograms and convert A's height 5 feet 7 inches to 1.70 meters through unit conversion. Then normalization is performed so that comparison can be made on the same scale. Specifically, both height and weight can be scaled to the range of 0-1, for example, by using the minimum-maximum scaling method. Assuming that the minimum and maximum values are 0 and 1 respectively, then A's standardized weight is approximately 0.70 and the standardized height is approximately 0.80. Finally, standardization is performed, and statistical methods are used to convert the data into a normal distribution or other standard distribution with a mean of 0 and a standard deviation of 1, which is conducive to data analysis and model training.
[0055] S204: In response to the diet plan generation request, a data acquisition request is sent to the health monitoring device or health monitoring software, and the real-time monitored body index data is fed back; an information input page is displayed on the patient client to receive user input information; the body index data and user input information are merged into a diet plan generation model pre-trained for patient information input.
[0056] The diet plan generation model is a natural language generation model, consisting of a constraint construction unit and a plan generation unit. Patient information includes basic personal information, dietary preferences, and disease information. Basic personal information includes physical indicators, geographic location, and daily physical exertion information. Dietary preferences include preferred ingredients, disliked ingredients, allergic ingredients, and no preferred ingredients. Disease information includes disease diagnosis information and medication information.
[0057] Specifically, patient information includes three categories of content: basic personal information, dietary preference information, and disease information. Basic personal information includes physical indicators, geographic location, and daily physical exertion information, for example: 40 years old, male, weight 65 kg, height 1.75 meters, uric acid serum concentration 13 mg / dL, Beijing, light physical labor. Dietary preference information includes favorite and disliked ingredients, as well as ingredients for which there is no obvious preference, and allergic ingredients, for example: favorite ingredient tofu, disliked ingredient coriander, allergic ingredient mango, and no preference for cabbage. Disease information includes the doctor's diagnosis, that is, disease diagnosis information, and also includes medication information. For example: the doctor diagnosed the disease as gout, and the patient is currently taking ibuprofen and sodium valproate.
[0058] This embodiment lists the specific content that patient information may contain. In actual application, the patient's characteristics are comprehensively analyzed from multiple aspects such as disease type, personal physical characteristics, and dietary preferences and dislikes, and then the medical professional information in the knowledge base is used to generate a personalized and more targeted diet plan.
[0059] S205: In the diet plan generation model, a constraint construction unit is used to read health knowledge information from a pre-built health knowledge base, and nutrient element intake constraints are established based on the health knowledge information, physical indicators, daily physical exertion information, and disease diagnosis information.
[0060] S206: In the diet plan generation model, the plan generation unit is used to obtain the current date information, and seasonal ingredient information and regional ingredient information are determined based on the current date information and the geographical location; recommended ingredients are determined based on the diet preference information, seasonal ingredient information and regional ingredient information, wherein the recommended ingredients do not include allergic ingredients and adverse reaction ingredients corresponding to the medication information.
[0061] S207: In the diet plan generation model, a plan generation unit is used to determine a target diet plan based on nutrient intake constraints and recommended ingredients, wherein the diet plan includes a menu for each meal within a preset time period, and each menu includes ingredient types, ingredient quantities, and cooking methods.
[0062] In steps S205-S207, the constraint construction unit in the diet plan generation model is used to establish nutrient intake constraints based on the health knowledge information in the health knowledge base, physical indicators, daily physical exertion information, and disease diagnosis information. It can be understood that, when other indicators are the same, the greater the height and weight, the more nutrients are required; the greater the daily physical exertion, the more nutrients are required; and the different types of diseases and disease-related physical indicator data of patients have different requirements for various nutrients. For example, for patients with uric acid, purine intake should be reduced. Therefore, intake constraints corresponding to purine can be set in a targeted manner to limit the amount of purine ingested in the patient's diet.
[0063] After establishing the nutrient intake constraints, the plan generation unit in the diet plan generation model is used to determine the recommended and non-recommended ingredients based on the nutrient intake constraints, and then the target diet plan is generated using the recommended ingredients. Specifically, the current date information is obtained, and the seasonal ingredient information and regional ingredient information are determined based on the current date information and the geographical location in the personal basic information. Among them, seasonal ingredients are naturally matured under normal growth conditions, with higher maturity, usually containing more vitamins, minerals and other nutrients, and better in taste and nutritional value. In addition, the price is usually relatively low, which can save cooking costs; local ingredients in regional ingredient information are often grown locally and do not undergo long-distance transportation after picking, so they maintain better freshness. Fresh ingredients are usually better in taste, aroma and nutritional value, and can provide a better eating experience. Therefore, when determining recommended ingredients, reference can be made to dietary preference information, seasonal ingredient information, and regional ingredient information, and more patient-favorite ingredients, seasonal ingredients, and local ingredients can be included in the recommended ingredients, and the weight of these ingredients when formulating the menu can be increased. The probability of including foods that patients dislike and off-season ingredients in the recommended ingredients can be minimized, and the weight of these ingredients when formulating the menu can be reduced. Furthermore, users may suffer from allergies if they consume allergic ingredients, and consuming adverse reaction ingredients corresponding to medication information may affect the efficacy of the medication, or even cause adverse reactions to cause other diseases. Therefore, to ensure the health of users, allergic ingredients and adverse reaction ingredients corresponding to medication information are not included in the recommended ingredients. For example, according to the aforementioned allergic ingredient information, the patient is allergic to mangoes, so mangoes are not recommended; and because beer may interfere with the efficacy of sodium valproate, beer is not recommended.
[0064] After determining the recommended ingredients, menus are created based on nutrient intake constraints, forming a target diet plan. Preferred, seasonal, and local ingredients are weighted higher, resulting in a higher probability of being selected for menus, while disliked and out-of-season ingredients are weighted lower, resulting in a lower probability of being selected for menus.
[0065] The menu formulated in this embodiment is more in line with the patient's preferences on the basis of meeting the constraints on nutrient intake, and uses more local and seasonal ingredients, and abandons allergic ingredients and adverse reaction ingredients that may have negative effects. Therefore, the final target diet plan comprehensively considers disease characteristics, nutritional balance, patient preferences, taste, cost and other factors, ensuring that patients can taste more delicious food at a lower cost and obtain adequate nutrition while meeting their disease needs.
[0066] S208: In the diet plan generation model, the plan generation unit is used to adjust the nutrient element intake constraints according to the health adjustment goal, and it is determined whether the target diet plan meets the adjusted nutrient element intake constraints; if not, the target diet plan is adjusted according to the adjusted nutrient element intake constraints.
[0067] In this step, the user input information may also include health adjustment goals. For example, for the aforementioned gout patient, the user input information also includes a health adjustment goal of muscle gain. After formulating the nutrient intake constraints, the constraints can be fine-tuned according to the health adjustment goals, and the input constraints corresponding to protein can be adjusted accordingly. After that, it is determined whether the generated target diet plan meets the adjusted nutrient intake constraints. If so, the target diet plan and the corresponding plan description can be directly output; if not, the target diet plan needs to be adjusted, for example, replacing the stewed cabbage in a meal menu in the target diet plan with fried chicken breast, and ensuring that the adjusted target diet plan meets the new nutrient intake constraints.
[0068] This embodiment introduces health adjustment goals, allowing patients to adjust their diet to meet their disease needs while also meeting their set goals, thus achieving personalized dietary plans. Setting personalized health adjustment goals can boost self-confidence, help cope with the physical and psychological stress of the disease, and improve quality of life.
[0069] S209: Based on the health knowledge information, a plan description corresponding to the target diet plan is generated according to the association between the patient information, nutrient element intake constraints and recommended ingredients, and the target diet plan and the plan description are sent to the patient client so that the patient can execute the target diet plan, wherein the plan description is used to indicate the adaptability of the target diet plan to the patient information.
[0070] S210: During the execution of the target diet plan, the diet plan feedback information sent by the patient client is received in real time, the target diet plan is adjusted in real time according to the diet plan feedback information, and the adjusted target diet plan is sent to the patient client.
[0071] In this step, during the execution of the target diet plan, that is, after the patient has completed the target diet plan, the patient's feedback information is received, and the target diet plan is further optimized based on the feedback information. Specifically, the diet plan feedback information sent by the patient client may include the patient's score for the entire diet plan or the score for each meal menu, adjustment opinions for the entire diet plan or each meal menu, diet plan execution records, physical indicator change information, new disease diagnosis information, etc. If the patient's score is low, it can be considered that the target diet plan does not meet the patient's needs. Therefore, the target diet plan can be adjusted in real time according to the adjustment opinions, and the adjusted target diet plan can be sent to the patient client to further improve the match between the patient and the target diet plan.
[0072] This embodiment provides a feedback mechanism that can continuously optimize based on user feedback to improve the practicality and adaptability of the diet plan.
[0073] S211: After the preset time period ends, a prompt message is sent to the patient client, wherein the prompt message is used to prompt the patient to input new input information so as to generate a new target diet plan according to the new input information.
[0074] In this step, after the preset period ends, a new round of target diet plan can be formulated. Specifically, a prompt message is sent to the patient client, prompting the patient to enter new input information through the prompt message. At the same time, new health monitoring data is obtained through health monitoring equipment or health monitoring software. Then, a new target diet plan is generated based on the new input information and health monitoring data. The specific generation method is the same as the previous process and will not be repeated here.
[0075] Furthermore, in another embodiment, before inputting the received patient information into the pre-trained natural language processing model, the natural language processing model is pre-trained, wherein the specific steps of pre-training are as follows:
[0076] Furthermore, in another embodiment, a method for generating a diet plan is provided, such as Figure 3 As shown, the method comprises the following steps:
[0077] 301. Data Collection: The system collects users' personal health information, including but not limited to disease diagnosis results, physical indicators, lifestyle, etc. At the same time, the system accesses a large amount of medical professional literature and diet and nutrition-related databases to build a huge knowledge base.
[0078] 302. Data Preprocessing: Through data preprocessing technology, the system standardizes the health data provided by users and converts information in medical professional literature and databases into a form that can be understood by the GPT algorithm.
[0079] 303. GPT model training: The system uses pre-processed data to perform deep learning training on the GPT algorithm, enabling it to understand user input and analyze disease characteristics and dietary requirements.
[0080] 304. User Interaction: Users enter personal health information, dietary preferences, and target diseases through the system-provided interface. The system analyzes user input using the GPT model to gain a deep understanding of user needs.
[0081] 305. Diet Plan Generation: Based on user input and a trained GPT model, the system leverages medical expertise from a knowledge base to generate personalized, targeted diet plans. These plans take into account the user's disease type, physical characteristics, dietary preferences, and other relevant factors.
[0082] 306. Nutritional balance: The generated diet plan will take into account nutritional balance based on the characteristics of the disease to ensure that the patient obtains adequate nutrition while meeting the needs of the disease.
[0083] 307. Feedback Optimization: Users can provide real-time feedback during the implementation of their diet plan through the system's feedback function. Based on this feedback, the system will continuously optimize the diet plan to improve its practicality and adaptability.
[0084] In one embodiment, the entire process of developing a diet plan for a patient is provided. Specifically, a middle-aged man named "Mr. Zhang" with diabetes and hypertension uses a diet plan generation method based on GPT technology to plan his diet. Mr. Zhang first provides his personal health information, including diagnosis results, physical indicators, and lifestyle. He also answers questions regarding dietary preferences, food allergies, and target disease management. The system also accesses a large amount of medical literature and dietary nutrition databases related to diabetes and hypertension. In addition, a blood pressure monitor or health record app can provide Mr. Zhang's historical blood pressure measurement records over a period of time.
[0085] Before using the GPT model to generate a target diet plan, training data is collected and preprocessed. This preprocessed data is then used to train the GPT model. The model uses a large dataset to learn dietary knowledge and nutritional requirements related to conditions like diabetes and hypertension, allowing it to take the characteristics of these conditions into account when generating diet plans.
[0086] Mr. Zhang entered his personal information and target diseases (diabetes and hypertension). He also provided his favorite foods and intolerances to certain foods. The pre-trained GPT model analyzed this information and, combined with medical literature and dietary nutrition databases, generated a personalized diet plan. The generated diet plan was optimized for Mr. Zhang's disease characteristics. The plan recommends that he consume low-sugar, low-fat, and low-salt foods every day, and encourages him to increase his intake of fresh fruits, vegetables, and whole grains. Based on his personal preferences, the system also recommended daily menus and healthy snacks that meet his requirements. The generated diet plan not only takes into account Mr. Zhang's disease needs, but also ensures that he gets adequate nutrition. This plan can help him control his blood sugar and blood pressure while maintaining good health.
[0087] During the actual diet plan implementation, Mr. Zhang uses the feedback function to provide real-time feedback. He can record his diet and physical condition and feed this information back to the system. The system uses this feedback data to optimize, continuously adjust, and improve the diet plan to better meet Mr. Zhang's personalized needs.
[0088] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0089] As can be seen, in this solution, patients input personal health information, dietary preferences, and target disease information. This textual input is preprocessed and converted into a vector representation understandable by the GPT model. This input then interacts with the GPT model. Based on the user input and the medical information in its knowledge base, combined with its own pre-trained knowledge, the model generates a personalized, disease-specific diet plan. The generated diet plan includes menus, including food choices and recommended intake amounts for breakfast, lunch, dinner, and two snack times. Furthermore, to better perform the diet plan generation task, this solution also incorporates specific pre-training tasks, such as predicting dietary requirements or nutritional content for specific diseases. These pre-training tasks utilize pre-processed data to enhance pre-training effectiveness. This approach allows the model to learn dietary-related features and knowledge during the pre-training phase, resulting in a diet plan that better meets the needs of patients with specific diseases and is more scientific and reasonable. While meeting disease needs, this solution fully considers the individual characteristics and dietary preferences of patients, providing them with more personalized and practical dietary advice. On this basis, this program also designs a real-time feedback mechanism, which can receive diet plan feedback information sent by the patient client in real time, and adjust the target diet plan in real time according to the feedback information, ensuring the compatibility of the patient with the target diet plan and improving the practicality of the diet plan.
[0090] In one embodiment, a diet plan generating device is provided, which corresponds to the diet plan generating method in the above embodiment. Figure 4 As shown, the diet plan generating device includes: a data receiving module, a data input module, a plan making module and a data output module. The functional modules are described in detail as follows:
[0091] The data receiving module is used to send a data acquisition request to the health detection device or health detection software in response to the diet plan generation request, and receive the feedback of the real-time monitored body index data; and display the information input page on the patient client to receive the user input information
[0092] A data input module is used to combine physical indicator data and user input information into patient information and input it into a pre-trained diet plan generation model, wherein the diet plan generation model is a natural language generation model, the diet plan generation model includes a constraint construction unit and a plan generation unit, and the patient information includes basic personal information, dietary preference information, and disease information;
[0093] a plan formulation module for processing patient information based on a pre-built health knowledge base using a constraint construction unit in a natural language processing model to obtain nutrient intake constraints; and, for determining a target diet plan and a plan description corresponding to the target diet plan based on the nutrient intake constraints using a plan generation unit in the natural language processing model, wherein the diet plan includes a menu for each meal within a preset time period, each menu including ingredient types, ingredient quantities, and cooking methods, and the plan description is used to indicate the compatibility of the target diet plan with the patient information;
[0094] The data output module is used to send the target diet plan and plan instructions to the patient client to guide the patient to implement the target diet plan.
[0095] In one embodiment, the apparatus further comprises a pre-training module for:
[0096] Acquire health knowledge information and use the health knowledge information to build a health knowledge information database, wherein the health knowledge information includes disease knowledge and dietary health knowledge, and the disease knowledge includes knowledge corresponding to the disease type in the patient information;
[0097] Build a GPT model, input the preprocessed health knowledge database into the GPT model, and use the constraint construction unit in the GPT model to learn the dietary requirements and nutritional requirements corresponding to the disease type, so that the constraint construction module can acquire the ability to construct nutrient element intake constraints;
[0098] Acquire patient training data, wherein the patient training data corresponds to the disease type in the patient information;
[0099] The preprocessed patient training data is input into the GPT model, and in the GPT model, a training diet plan is generated using a plan generation unit so that the plan generation module acquires the ability to generate a target diet plan.
[0100] In one embodiment, the pre-training module is used to:
[0101] Perform data cleaning on the patient training data and add noise to the patient training data to obtain enhanced patient training data;
[0102] Converting the patient training data into a preset standard unit, and normalizing and standardizing the patient training data to obtain preprocessed patient training data;
[0103] Before inputting the preprocessed health knowledge information database into the GPT model, it also includes:
[0104] The health knowledge information is cleaned and the cleaned health knowledge information is segmented to obtain multiple words. The named entities in each word are identified and the part of speech of each word is marked.
[0105] In one embodiment, the basic personal information includes physical index information, geographic location information, and daily physical exertion information, wherein the physical index information includes real-time monitored physical index data and physical index data input by the user; the dietary preference information includes preferred ingredients, disliked ingredients, allergic ingredients, and no preferred ingredients; and the disease information includes disease diagnosis information and medication information;
[0106] Accordingly, the planning module is used to:
[0107] Read health knowledge information from a pre-built health knowledge database and establish nutrient intake constraints based on health knowledge information, physical indicators, daily physical exertion information, and disease diagnosis information;
[0108] Obtain the current date information, and determine seasonal ingredient information and regional ingredient information based on the current date information and geographic location;
[0109] Determine recommended ingredients based on dietary preference information, seasonal ingredient information, and regional ingredient information. Recommended ingredients do not include allergic ingredients or ingredients with adverse reactions corresponding to medication information;
[0110] According to the nutrient intake constraints and recommended ingredients, the target diet plan is determined, and based on health knowledge information, a plan description corresponding to the target diet plan is generated according to the association between patient information, nutrient intake constraints and recommended ingredients.
[0111] In one embodiment, the patient information also includes health adjustment goals;
[0112] Accordingly, the planning module is used to:
[0113] Adjust the nutrient intake constraints according to the health adjustment goals, and determine whether the target diet plan meets the adjusted nutrient intake constraints;
[0114] If not, the target diet plan will be adjusted according to the adjusted nutrient intake constraints, and an adjusted plan description corresponding to the adjusted target diet plan will be generated based on the relationship between the patient information, the adjusted nutrient intake constraints, and the recommended ingredients.
[0115] In one embodiment, the apparatus further comprises an optimization module for:
[0116] During the execution of the target diet plan, the diet plan feedback information sent by the patient client is received in real time, and the target diet plan is adjusted in real time according to the diet plan feedback information, and the adjusted target diet plan is sent to the patient client.
[0117] In one embodiment, the data sending module is used to:
[0118] After the preset time period ends, a prompt message is sent to the patient client, wherein the prompt message is used to prompt the patient to input new input information so as to generate a new target diet plan according to the new input information.
[0119] In one embodiment, an electronic device is provided. The electronic device may be a computer, a server, a workstation, or a mobile device such as a mobile phone, a tablet, or a vehicle-mounted mobile terminal. The electronic device may also be any other device capable of executing a program. The internal structure of the electronic device may be as shown below. Figure 5 As shown. The electronic device includes a processor, a memory and a network module. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, instructions or code. The internal memory provides an environment for the operation of the operating system and instructions or codes in the non-volatile storage medium. When the instructions or codes are executed by the processor, they implement a function or step of the above-mentioned diet plan generation method. The network module of the electronic device may include a network interface and / or a wireless network module, and the electronic device may communicate with other devices or service platforms through the network module. In addition, the electronic device may also include a display screen and an input device, etc.
[0120] In one embodiment, an electronic device is provided, including a memory, a processor, and instructions or codes stored in the memory and executable on the processor. When the processor executes the instructions or codes, the following steps are implemented:
[0121] In response to the diet plan generation request, a data acquisition request is sent to the health detection device or health detection software, and feedback of real-time monitored body index data is received;
[0122] Display the information input page on the patient client to receive user input information;
[0123] The physical indicator data and user input information are combined into patient information, which is input into a pre-trained diet plan generation model. The diet plan generation model is a natural language generation model, which includes a constraint construction unit and a plan generation unit. The patient information includes basic personal information, dietary preference information, and disease information.
[0124] In the diet plan generation model, the constraint construction unit is used to process patient information based on the pre-built health knowledge base to obtain nutrient element intake constraints;
[0125] In the diet plan generation model, a plan generation unit is used to determine a target diet plan and a plan description corresponding to the target diet plan based on the nutrient intake constraints. The diet plan includes a menu for each meal within a preset time period, and each menu includes the type of ingredients, the quantity of ingredients, and the cooking method. The plan description is used to indicate the adaptability of the target diet plan to the patient's information.
[0126] The target diet plan and the plan instructions are sent to the patient client to guide the patient to implement the target diet plan.
[0127] In one embodiment, a storage medium is provided on which instructions or codes are stored. When the instructions or codes are executed by a processor, the following steps are implemented:
[0128] In response to the diet plan generation request, a data acquisition request is sent to the health detection device or health detection software, and feedback of real-time monitored body index data is received;
[0129] Display the information input page on the patient client to receive user input information;
[0130] The physical indicator data and user input information are combined into patient information, which is input into a pre-trained diet plan generation model. The diet plan generation model is a natural language generation model, which includes a constraint construction unit and a plan generation unit. The patient information includes basic personal information, dietary preference information, and disease information.
[0131] In the diet plan generation model, the constraint construction unit is used to process patient information based on the pre-built health knowledge base to obtain nutrient element intake constraints;
[0132] In the diet plan generation model, a plan generation unit is used to determine a target diet plan and a plan description corresponding to the target diet plan based on the nutrient intake constraints. The diet plan includes a menu for each meal within a preset time period, and each menu includes the type of ingredients, the quantity of ingredients, and the cooking method. The plan description is used to indicate the adaptability of the target diet plan to the patient's information.
[0133] The target diet plan and the plan instructions are sent to the patient client to guide the patient to implement the target diet plan.
[0134] It should be noted that the functions or steps that can be implemented by the above-mentioned storage medium or electronic device can be referred to the relevant description in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0135] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through instructions or codes, and the instructions or codes can be stored in a non-volatile readable storage medium. When the instructions or codes are executed, they may include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0136] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0137] Those skilled in the art will appreciate that the accompanying drawings are merely schematic diagrams of a preferred implementation scenario, and that the units or processes in the accompanying drawings are not necessarily required for the implementation of this application. Those skilled in the art will appreciate that the units in the system in the implementation scenario can be distributed in the system of the implementation scenario according to the implementation scenario description, or can be changed accordingly and located in one or more systems different from the implementation scenario. The units of the above-mentioned implementation scenario can be combined into one unit, or can be further split into multiple sub-units.
[0138] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.
Claims
1. A method for generating a diet plan, characterized in that: The method comprises: Acquire health knowledge information and construct a health knowledge information database using the health knowledge information, wherein the health knowledge information includes disease knowledge and dietary health knowledge, and the disease knowledge includes knowledge corresponding to the disease type in the patient information; Building a GPT model, wherein the GPT model includes a constraint construction unit and a plan generation unit; Inputting the preprocessed health knowledge information database into the GPT model, and using the constraint construction unit in the GPT model to learn the dietary requirements and nutritional requirements corresponding to the disease type, so that the constraint construction unit acquires the ability to construct nutrient element intake constraints; Obtaining patient training data, wherein the patient training data corresponds to the disease type in the patient information; and inputting the preprocessed patient training data into the GPT model, and generating a training diet plan in the GPT model using the plan generation unit, so that the plan generation unit acquires the ability to generate a target diet plan; Use the trained GPT model as a diet plan generation model; In response to the diet plan generation request, a data acquisition request is sent to the health detection device or health detection software, and feedback of real-time monitored body index data is received; Display the information input page on the patient client to receive user input information; The physical indicator data and the user input information are combined into patient information and input into a pre-trained diet plan generation model, wherein the patient information includes basic personal information, dietary preference information, and disease information; the basic personal information includes physical indicator information, geographic location information, and daily physical exertion information; the physical indicator information includes the real-time monitored physical indicator data and the physical indicator data in the user input information; the dietary preference information includes preferred ingredients, disliked ingredients, allergic ingredients, and no preferred ingredients; and the disease information includes disease diagnosis information and medication information; In the diet plan generation model, the constraint construction unit is used to read the health knowledge information from a pre-constructed health knowledge information database, and establish nutrient element intake constraints based on the health knowledge information, the physical index information, the daily physical exertion information, and the disease diagnosis information; In the diet plan generation model, the plan generation unit is utilized to obtain current date information, and seasonal ingredient information and regional ingredient information are determined based on the current date information and the geographic location information; recommended ingredients are determined based on the diet preference information, the seasonal ingredient information and the regional ingredient information, wherein the recommended ingredients do not include the allergic ingredients and the adverse reaction ingredients corresponding to the medication information; a target diet plan is determined based on the nutrient element intake constraints and the recommended ingredients, and a plan description corresponding to the target diet plan is generated based on the health knowledge information and the association between the patient information, the nutrient element intake constraints and the recommended ingredients, wherein the diet plan includes a menu for each meal within a preset time period, and the menu for each meal includes the type of ingredients, the quantity of ingredients and the cooking method, and the plan description is used to indicate the adaptability of the target diet plan to the patient information; The target diet plan and the plan description are sent to the patient client to guide the patient to implement the target diet plan.
2. The method according to claim 1, characterized in that Before inputting the pre-processed patient training data into the GPT model, the following steps are also included: performing data cleaning on the patient training data and adding noise to the patient training data to obtain enhanced patient training data; Converting the patient training data into a preset standard unit, and performing normalization and standardization processing on the patient training data to obtain preprocessed patient training data; Before inputting the pre-processed health knowledge information database into the GPT model, it also includes: The health knowledge information is subjected to text cleaning, and the cleaned health knowledge information is subjected to word segmentation processing to obtain multiple words, and the named entities in each of the words are respectively identified, and the part of speech of each of the words is marked.
3. The method according to claim 1, characterized in that The patient information also includes health adjustment goals; Accordingly, after determining the target diet plan, the method further includes: adjusting the nutrient intake constraint according to the health adjustment goal, and determining whether the target diet plan satisfies the adjusted nutrient intake constraint; If not, the target diet plan is adjusted according to the adjusted nutrient intake constraints, and an adjusted plan description corresponding to the adjusted target diet plan is generated based on the patient information, the adjusted nutrient intake constraints, and the association between the recommended ingredients.
4. The method according to claim 1, wherein After obtaining the target diet plan and a plan description corresponding to the target diet plan, the method further includes: During the execution of the target diet plan, the diet plan feedback information sent by the patient client is received in real time, and the target diet plan is adjusted in real time according to the diet plan feedback information, and the adjusted target diet plan is sent to the patient client.
5. The method according to claim 4, characterized in that The method further comprises: After the preset time period ends, a prompt message is sent to the patient client, wherein the prompt message is used to prompt the patient to input new input information so as to generate a new target diet plan according to the new input information.
6. A diet plan generating device, characterized in that: The device comprises: A knowledge base construction module is used to obtain health knowledge information and construct a health knowledge information base using the health knowledge information, wherein the health knowledge information includes disease knowledge and dietary health knowledge, and the disease knowledge includes knowledge corresponding to the disease type in the patient information; A model construction module is used to build a GPT model, wherein the GPT model includes a constraint construction unit and a plan generation unit; and inputting a preprocessed health knowledge information library into the GPT model, and using the constraint construction unit in the GPT model to learn the dietary requirements and nutritional requirements corresponding to the disease type, so that the constraint construction unit acquires the ability to construct nutrient element intake constraints; and obtaining patient training data, wherein the patient training data corresponds to the disease type in the patient information; and inputting the preprocessed patient training data into the GPT model, and using the plan generation unit in the GPT model to generate a training diet plan, so that the plan generation unit acquires the ability to generate a target diet plan; and using the trained GPT model as a diet plan generation model; The data receiving module is used to send a data acquisition request to the health detection device or health detection software in response to the diet plan generation request, and receive the feedback of the real-time monitored body index data; and display the information input page on the patient client to receive the user input information a data input module, configured to combine the physical indicator data and the user input information into patient information and input the information into a pre-trained diet plan generation model, wherein the patient information includes basic personal information, dietary preference information, and disease information; the basic personal information includes physical indicator information, geographic location information, and daily physical exertion information; the physical indicator information includes the real-time monitored physical indicator data and the physical indicator data in the user input information; the dietary preference information includes preferred ingredients, disliked ingredients, allergic ingredients, and non-preferred ingredients; and the disease information includes disease diagnosis information and medication information; a plan formulation module, used in the diet plan generation model, utilizing the constraint construction unit to read the health knowledge information from a pre-constructed health knowledge information database, and establishing nutrient element intake constraints based on the health knowledge information, the physical index information, the daily physical exertion information, and the disease diagnosis information; and, in the diet plan generation model, utilizing the plan generation unit to obtain current date information, and determine seasonal ingredient information and regional ingredient information based on the current date information and the geographic location information; determining recommended ingredients based on the dietary preference information, the seasonal ingredient information, and the regional ingredient information, wherein the recommended ingredients do not include the allergic ingredients and the adverse reaction ingredients corresponding to the medication information; determining a target diet plan based on the nutrient element intake constraints and the recommended ingredients, and generating a plan description corresponding to the target diet plan based on the health knowledge information, the patient information, the nutrient element intake constraints, and the association relationship between the recommended ingredients, wherein the diet plan includes a menu for each meal within a preset time period, and each menu includes the type of ingredients, the quantity of ingredients, and the cooking method, and the plan description is used to indicate the adaptability of the target diet plan to the patient information; A data output module is used to send the target diet plan and the plan description to the patient client to guide the patient to implement the target diet plan.
7. A storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
8. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Diet mode intervention method, terminal equipment and computer readable storage medium
CN112071396A
Menu recommendation method and device and healthy diet system
CN117747061A