Model training method, recommendation method and related products

By constructing the association between people with abnormal sugar metabolism, sugar metabolism targets and food, training large language models, and generating personalized diet plans, the problem of lack of professionalism in the existing diabetes diet plans is solved and the effect of blood sugar control is improved.

CN119314628APending Publication Date: 2025-01-14WUHAN POLYTECHNIC UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411461088.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The existing diabetes diet plan lacks professionalism, resulting in poor blood sugar control effect, making it difficult for patients to formulate a diet plan that suits their own situation.

Method used

By obtaining health indicators, dietary preferences and location information of people with abnormal sugar metabolism, as well as the correspondence between food origin information and sugar metabolism targets, we build a knowledge map, train large language models, and generate personalized dietary recommendation plans.

Benefits of technology

It improves the scientificity and accuracy of the diet plan, enhances the user's acceptance and practicality of the diet plan, and thus improves the sugar metabolism status and reduces the risk of complications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119314628A_ABST
    Figure CN119314628A_ABST
Patent Text Reader

Abstract

The invention provides a model training method, a recommendation method and a related product, and relates to the technical field of machine learning. The model training method comprises the steps of obtaining a training data set; constructing a knowledge graph for diet recommendation according to the training data set; and training an open-source large language model through the knowledge graph for diet recommendation to obtain a diet recommendation model. Therefore, the practicability and acceptability of diet scheme recommendation are enhanced by considering diet preference information (such as taste preference and allergy information), position information (relating to regional diet habits, available food materials and the like) and food production place information of the user, and the diet scheme recommendation accuracy is improved by considering the corresponding relation between the food and various glycometabolism targets. The scientificity and accuracy of diet scheme recommendation are improved, and then the blood glucose control effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine learning technology, and in particular to a model training method, a recommendation method and related products. Background Art

[0002] With the rapid development of social economy and the significant changes in people's lifestyles, diabetes has become an increasingly serious health problem. As a chronic metabolic disease, the management and control of diabetes requires not only traditional drug treatment, but also scientific dietary management.

[0003] However, current diet plans for diabetes mostly rely on the patient's self-exploration and limited guidance from doctors. Due to the patient's lack of professional nutrition knowledge and in-depth understanding of their own condition, the diet plans they develop are often inconsistent with their actual conditions, affecting blood sugar control effects. Summary of the invention

[0004] Based on the above problems, the present application provides a model training method, a recommendation method and related products, which can improve the scientificity and accuracy of dietary plan recommendations, thereby improving the effect of blood sugar control.

[0005] The embodiments of the present application disclose the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides a model training method, the method comprising:

[0007] Acquire a training data set, wherein the training data set includes health indicator information, dietary preference information, and location information of people with abnormal glucose metabolism, as well as origin information of multiple foods and corresponding relationships between the multiple foods and glucose metabolism targets;

[0008] constructing a knowledge graph for diet recommendation according to the training data set, wherein the knowledge graph for diet recommendation represents the association relationship between the population with abnormal glucose metabolism, the glucose metabolism target and the food;

[0009] The diet recommendation model is obtained by training an open source large language model through the knowledge graph for diet recommendation.

[0010] Optionally, constructing a knowledge graph for diet recommendation based on the training data set includes:

[0011] If there are multiple training data representing the same meaning in the training data set, the multiple training data are merged and a knowledge graph for diet recommendation is constructed according to the merged training data set.

[0012] Optionally, constructing a knowledge graph for diet recommendation based on the training data set includes:

[0013] If there is a certain training data in the training data set that represents multiple meanings, each meaning of the training data is attribute-labeled respectively, and a knowledge graph for diet recommendation is constructed according to the attribute-labeled training data set.

[0014] In a second aspect, an embodiment of the present application provides a recommendation method, the method comprising:

[0015] Acquire user information of the user to be recommended, wherein the user information includes at least one of health indicator information, dietary preference information, and location information of the user to be recommended;

[0016] A diet plan corresponding to the user information is determined through a diet recommendation model, wherein the diet recommendation model is obtained by training using the model training method described in the first aspect.

[0017] Optionally, determining a diet plan corresponding to the user information through a diet recommendation model includes:

[0018] The user information is input into the diet recommendation model, and after an initial diet plan is obtained through the knowledge graph for diet recommendation, the initial diet plan is updated through the natural language interaction capability of the diet recommendation model to obtain an updated diet plan.

[0019] In a third aspect, an embodiment of the present application provides a model training device, the device comprising: a data acquisition module, a graph construction module and a model training module;

[0020] The data acquisition module is used to acquire a training data set, wherein the training data set includes health indicator information, dietary preference information and location information of people with abnormal glucose metabolism, as well as origin information of multiple foods and corresponding relationships between the multiple foods and glucose metabolism targets;

[0021] The graph construction module is used to construct a knowledge graph for diet recommendation based on the training data set, wherein the knowledge graph for diet recommendation represents the association between the abnormal glucose metabolism population, the glucose metabolism target and the food;

[0022] The model training module is used to train the open source large language model through the knowledge graph for diet recommendation to obtain a diet recommendation model.

[0023] Optionally, the graph construction module is specifically used for: if there are multiple training data representing the same meaning in the training data set, the multiple training data are merged, and then a knowledge graph for diet recommendation is constructed according to the merged training data set.

[0024] Optionally, the graph construction module is specifically used for: if there is a training data in the training data set representing multiple meanings, each meaning of the training data is respectively attribute-labeled, and then a knowledge graph for diet recommendation is constructed according to the attribute-labeled training data set.

[0025] In a fourth aspect, an embodiment of the present application provides a recommendation device, the device comprising: an acquisition module and a determination module;

[0026] The acquisition module is used to acquire user information of the user to be recommended, wherein the user information includes at least one of health indicator information, dietary preference information and location information of the user to be recommended;

[0027] The determination module is used to determine a diet plan corresponding to the user information through a diet recommendation model, and the diet recommendation model is trained by the model training method described in the first aspect.

[0028] Optionally, the determining module is specifically used to:

[0029] The user information is input into the diet recommendation model, and after an initial diet plan is obtained through the knowledge graph for diet recommendation, the initial diet plan is updated through the natural language interaction capability of the diet recommendation model to obtain an updated diet plan.

[0030] In a fifth aspect, the present application discloses a computer device, the device comprising a processor and a memory:

[0031] The memory is used to store program code and transmit the program code to the processor;

[0032] The processor is used to execute the model training method described in the first aspect, or the steps of the recommendation method described in the second aspect according to the instructions in the program code.

[0033] In a sixth aspect, the present application discloses a computer-readable medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to execute the model training method described in the first aspect, or the steps of the recommendation method described in the second aspect.

[0034] Compared with the prior art, this application has the following beneficial effects:

[0035] The embodiment of the present application provides a model training method, a recommendation method and related products, and relates to the field of machine learning technology. The model training method includes: obtaining a training data set, the training data set includes health index information, dietary preference information and location information of people with abnormal glucose metabolism, as well as the origin information of various foods and the corresponding relationship between various foods and glucose metabolism targets; constructing a knowledge graph for diet recommendation according to the training data set, and the knowledge graph for diet recommendation characterizes the relationship between people with abnormal glucose metabolism, glucose metabolism targets and foods; training an open source large language model for diet recommendation through the knowledge graph for diet recommendation, and obtaining a diet recommendation model. Thus, not only by considering the user's dietary preference information (such as taste preference, allergy information, etc.), location information (involving regional dietary habits, available ingredients, etc.) and food origin information, the practicality and acceptability of the diet plan recommendation are enhanced, but also by considering the corresponding relationship between food and various glucose metabolism targets, the scientificity and accuracy of the diet plan recommendation are improved, thereby improving the blood sugar control effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0037] Figure 1 A flowchart of a model training method provided in an embodiment of the present application;

[0038] Figure 2 A flowchart of another model training method provided in an embodiment of the present application;

[0039] Figure 3 A flowchart of a recommended method provided for an embodiment of the present application;

[0040] Figure 4 A schematic diagram of a model training device provided in an embodiment of the present application;

[0041] Figure 5 A schematic diagram of a recommended device provided in an embodiment of the present application;

[0042] Figure 6 A schematic diagram of a computer-readable medium provided for an embodiment of the present application. DETAILED DESCRIPTION

[0043] As described above, current diet plans for diabetes mostly rely on the patient's self-exploration and limited guidance from doctors. Due to the patient's lack of professional nutrition knowledge and in-depth understanding of their own condition, the diet plans they develop are often inconsistent with their actual conditions, affecting blood sugar control effects.

[0044] After research, the inventor proposed a model training method, a recommendation method and related products, which relate to the field of machine learning technology. The model training method includes: obtaining a training data set, the training data set includes health indicator information, dietary preference information and location information of people with abnormal glucose metabolism, as well as the origin information of various foods and the correspondence between various foods and glucose metabolism targets; constructing a knowledge graph for diet recommendation based on the training data set, the knowledge graph for diet recommendation characterizes the association between people with abnormal glucose metabolism, glucose metabolism targets and foods; training an open source large language model through the knowledge graph for diet recommendation to obtain a diet recommendation model. Thus, not only by considering the user's dietary preference information (such as taste preference, allergy information, etc.), location information (involving regional dietary habits, available ingredients, etc.) and food origin information, the practicality and acceptability of diet plan recommendations are enhanced, but also by considering the correspondence between food and various glucose metabolism targets, the scientificity and accuracy of diet plan recommendations are improved, thereby improving the blood sugar control effect.

[0045] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0046] See also Figure 1 , which is a flow chart of a model training method provided in an embodiment of the present application. The method includes:

[0047] S101: Obtain a training data set, where the training data set includes health indicator information, dietary preference information, and location information of people with abnormal glucose metabolism, as well as origin information of various foods and correspondences between various foods and glucose metabolism targets.

[0048] The health indicator information for people with abnormal glucose metabolism includes key health indicators such as blood sugar level and glycosylated hemoglobin. Among them, blood sugar level is the main basis for diagnosing diabetes and its pre-conditions (such as impaired fasting glucose and impaired glucose tolerance), while glycosylated hemoglobin can reflect the blood sugar control of people with abnormal glucose metabolism in the past 8 to 12 weeks. Health indicator information helps the model understand the user's glucose metabolism status during the subsequent model training process, thereby providing more accurate dietary recommendations.

[0049] The dietary preference information of people with abnormal glucose metabolism includes taste preferences (such as sweet, salty, sour, spicy, etc.), allergy information (such as allergy to certain food ingredients), etc. Considering the user's dietary preferences can not only improve the practicality and acceptability of the diet plan, but also ensure the user's dietary safety by avoiding allergic foods.

[0050] The location information of people with abnormal glucose metabolism refers to the user's location (such as province, county, or township). By understanding the user's location information, we can understand the user's regional eating habits, the types of food available locally, and so on.

[0051] The origin information of food refers to the source and growth environment of the food, which helps the model understand the nutritional composition of different foods and possible regional differences in the subsequent model training process.

[0052] The correspondence between food and sugar metabolism targets refers to the interaction between various components in food (such as carbohydrates, fats, proteins, micronutrients, phytochemicals, etc.) and sugar metabolism targets (such as carbohydrate digestion, glucose production and transport, insulin function and other related targets).

[0053] By comprehensively considering the health indicator information, dietary preference information, and location information of people with abnormal glucose metabolism, as well as the origin information of various foods and the correspondence between foods and glucose metabolism targets, in the subsequent model training process, the model can recommend diet plans that are more in line with their health conditions and nutritional needs, easier to purchase, and more in line with the user's taste. This can not only enhance the practicality and acceptability of dietary plan recommendations, but also improve the scientificity and accuracy of the recommended plans, thereby helping users improve their glucose metabolism and reduce the risk of complications.

[0054] S102: Construct a knowledge graph for diet recommendation based on the training data set, wherein the knowledge graph for diet recommendation represents the association between people with abnormal glucose metabolism, glucose metabolism targets and foods.

[0055] The knowledge graph in the application scenario of the embodiment of the present application includes entities and relationships. Among them, entities mainly include people with abnormal glucose metabolism, glucose metabolism targets and foods. These entities are the basic units in the knowledge graph, and they are interconnected through relationships. Relationships describe the interactions and connections between entities. In the knowledge graph in the application scenario of the embodiment of the present application, relationships mainly include the following three types: the first, the relationship between the state of people with abnormal glucose metabolism and glucose metabolism targets, such as the relationship between blood sugar levels and insulin sensitivity of people with abnormal glucose metabolism. The second, the relationship between the state of people with abnormal glucose metabolism and food, such as the effect of specific foods on the blood sugar levels of people with abnormal glucose metabolism. The third, the relationship between food and glucose metabolism targets, such as the regulatory effect of a certain ingredient in food on insulin sensitivity.

[0056] Specifically, the method for constructing a knowledge graph for diet recommendation based on the training data set is as follows: First, the training data set is preprocessed, including data cleaning, format conversion, etc., to ensure the accuracy and consistency of the training data in the training data set. Secondly, entities such as people with abnormal glucose metabolism, glucose metabolism targets, and foods are identified and extracted from the training data set. Subsequently, natural language processing, machine learning and other technologies are used to extract the relationships between entities from the training data set. This may require complex processes such as analyzing text information and mining implicit relationships. Finally, the extracted entities and relationships are integrated together to form a complete knowledge graph.

[0057] It is understandable that the knowledge graph used for diet recommendation clearly shows the relationship between people with abnormal glucose metabolism, glucose metabolism targets and foods, and it can be used as one of the input data for subsequent model training. By introducing the relationship information in the knowledge graph, the model can better understand the user's health status, food ingredients and their interaction with glucose metabolism targets, thereby generating more accurate diet recommendations.

[0058] S103: A diet recommendation model is obtained by training an open source large language model through the knowledge graph for diet recommendation.

[0059] Specifically, the method of training an open source large language model through a knowledge graph for diet recommendation is as follows: First, a large language model with natural language processing capabilities and wide applicability is selected as the basis for training. Secondly, the information in the knowledge graph for diet recommendation is converted into a format suitable for large language model training. Exemplary, it can be to convert the entities and relationships in the knowledge graph for diet recommendation into vector representations that can be understood by the large language model, or to convert the entities and relationships in the knowledge graph for diet recommendation into text descriptions that can be understood by the large language model. Finally, the prepared data is input into the large language model for model training. During the model training process, the large language model will learn how to generate a reasonable diet plan based on the input information (such as at least one of health indicator information, diet preference information, and location information). These diet plans not only take into account the user's taste preferences and regional differences, but also fully consider the impact of food on sugar metabolism, thereby ensuring the practicality, acceptability, scientificity and accuracy of the diet plan.

[0060] It should be noted that during the model training process, the large language model needs to be evaluated regularly to check whether its performance meets expectations. For example, the consistency of the dietary recommendations generated by the large language model with the expert recommendations can be evaluated. Subsequently, the large language model is adjusted and optimized based on the evaluation results to generate a more accurate and practical dietary recommendation model.

[0061] In summary, the present application discloses a model training method, which not only enhances the practicality and acceptability of diet plan recommendations by considering the user's dietary preference information (such as taste preferences, allergy information, etc.), location information (involving regional dietary habits, available ingredients, etc.) and food origin information, but also improves the scientificity and accuracy of diet plan recommendations by considering the correspondence between food and multiple glucose metabolism targets, thereby improving the blood sugar control effect.

[0062] See also Figure 2 , which is a flow chart of another model training method provided in an embodiment of the present application. The method includes:

[0063] S201: Obtain health indicator information, required food energy, required nutrient ratios, dietary preference information, available food resources and health goals for people with abnormal glucose metabolism.

[0064] The food energy required by people with abnormal glucose metabolism refers to the daily energy required calculated based on factors such as their age, gender, weight, height, and activity level.

[0065] The ratio of nutrients required by people with abnormal glucose metabolism refers to the intake ratio of carbohydrates, proteins and fats calculated based on factors such as age, gender, weight, height, activity level and other factors of people with abnormal glucose metabolism.

[0066] The food resources available to people with abnormal glucose metabolism include local specialty ingredients or common foods. Specifically, the location information of people with abnormal glucose metabolism can be obtained first, and the available food resources and common dishes can be determined based on the location information. Understanding the food resources available to people with abnormal glucose metabolism can help adjust the diet plan in actual operation and ensure the feasibility and sustainability of the diet plan.

[0067] Health goals refer to health goals set according to the specific conditions and needs of people with abnormal glucose metabolism. These goals may include losing weight, maintaining a healthy body fat ratio, maintaining normal blood sugar levels, preventing the occurrence of glucose metabolism diseases, and improving the body's metabolic capacity and immunity.

[0068] Exemplarily, the health index information of diabetic user A living in Shaanxi Province may be: postprandial blood sugar 9.0. The required food energy may be: 1200-1500 kcal. The required nutrient ratio may be: 40%-50% of the total energy from carbohydrate intake (about 480-750 kcal), 20%-25% of the total energy from protein intake (about 240-375 kcal), and 25%-30% of the total energy from fat intake (about 300-450 kcal). Dietary preferences may be: pasta. Available food resources may be: beef resources, mutton resources. Health goals may be: first, lose weight and maintain a healthy body fat ratio; second, maintain blood sugar at a normal level to prevent the occurrence of sugar metabolism; third, improve the body's metabolic capacity and immunity, and improve overall health.

[0069] S202: Combine public databases such as a food nutrient database, a food glycemic index database, and a food library of dishes from different regions to obtain food glycemic index, food nutrient components, dietary matching principles based on health goals, regional food resources, and preference-based food resources.

[0070] The food nutrient database contains the nutrient data of various foods, such as energy, protein, fat, carbohydrates, vitamins and minerals. The food nutrient database can provide a scientific basis for formulating personalized diet plans to ensure that the diet meets nutritional needs. The food glycemic index database contains the glycemic index (GI) of different foods, that is, the speed and degree of blood sugar increase after the food enters the human body. Among them, for people who need to control blood sugar (such as diabetics), choosing low GI foods can help maintain blood sugar stability. Different regional menus cover local specialty dishes, providing materials for formulating diet plans that meet regional preferences.

[0071] The dietary matching principle based on health goals refers to the development of personalized dietary matching principles based on individual health goals (such as controlling blood sugar, reducing weight, maintaining a healthy body fat ratio, etc.) combined with nutritional principles. These principles may include controlling total calorie intake, optimizing nutrient ratios, and choosing low GI foods.

[0072] Regional-based food resources can be obtained through food origin information, and preference-based food resources refer to recommending food that suits an individual's personal preferences based on their dietary preferences (such as pasta, spicy flavors, etc.).

[0073] In one example, for diabetic user A living in Shaanxi, the above three public databases can be combined to further search for low-GI pasta that suits his dietary preferences (pasta) and meets his health goals, such as whole wheat noodles, buckwheat noodles, etc.

[0074] In another example, for user B with insulin resistance living in Sichuan, the above three public databases can be combined to further search for low-GI Sichuan cuisine that suits his dietary preferences (spicy flavor) and meets his health goals. For example, spicy hot pot made with tofu, vegetables and other ingredients (reducing the use of oil), and sweet potato vermicelli made with whole grains can be recommended.

[0075] S203: Input the constructed formatted question of “health indicator information” + “diet preference information” + “location information” into the large language model to obtain an answer corresponding to the formatted question.

[0076] One or more formatted questions are constructed based on health indicator information (such as fasting blood sugar value, postprandial blood sugar value, etc.), dietary preference information (such as pasta, vegetables, fruits, etc.) and location information. For example, a formatted question can be constructed for user A: "What foods are recommended for user A who lives in Shaanxi, is 45 years old, weighs 75 kg, has a blood sugar of 8.5, and prefers pasta?" Then, the constructed formatted question is input into the large language model, and the corresponding answer is collected using the conversational capabilities of the large language model. For example, the large language model can return a list of low-GI pasta suitable for user A, relevant nutritional information, dietary matching recommendations, etc.

[0077] S204: Establish a database of foods, their ingredients and sugar metabolism targets.

[0078] In some specific implementations, a cross-laboratory research team composed of nutrition, pharmacology, and food science can use methods such as literature retrieval and literature text mining to sort out the relationship between food and sugar metabolism targets from the literature, thereby establishing a database of food, its ingredients, and sugar metabolism targets.

[0079] In other specific implementations, a sugar metabolism target model can be established in the laboratory, typical food resources or functional food raw materials can be tested, and the empirical association between food and sugar metabolism targets can be obtained, thereby establishing a database of food, its ingredients and sugar metabolism targets.

[0080] In other specific implementations, molecular docking technology can be used to simulate the interaction between food ingredients and sugar metabolism targets, and predict their binding ability and mechanism of action. At the same time, combined with network pharmacology methods, the position and role of food ingredients in the sugar metabolism network can be analyzed to further verify and improve the association between food and sugar metabolism targets, and establish a database of food, its ingredients and sugar metabolism targets.

[0081] It should be noted that this application does not limit the specific database establishment method. The establishment of these databases is intended to describe the association between specific foods and sugar metabolism targets, thereby providing a scientific basis for personalized diet recommendations. For example, user A's main manifestation is abnormal postprandial blood sugar and other normal conditions. In addition to recommending a low GI diet, foods or food ingredients with α-glucosidase inhibitory effects can also be recommended; user B's main manifestation is insulin resistance, and foods or food ingredients with mechanisms to improve insulin resistance can be recommended.

[0082] S205: Construct a training data set based on the health indicator information, required food energy, required nutrient ratio, dietary preference information, available food resources and health goals of people with abnormal glucose metabolism, food glycemic index, food nutrients, dietary matching principles based on health goals, regional food resources and preference-based food resources, the answers output by the large language model, and the database of food and its ingredients and glucose metabolism targets.

[0083] It should be noted that in addition to integrating the various information collected in steps S201-S204 (such as food energy, nutrient ratio, dietary preferences, food resources, health goals, food glycemic index, food nutrients, dietary matching principles, etc.) and the answers output by the large language model and the database of food and its components and sugar metabolism targets, a training data set can also be constructed in combination with a public diabetes knowledge graph. In addition, after constructing the training data set, the training data in the training data set can also be cleaned and deduplicated to ensure the uniqueness and accuracy of the training data. Among them, the cleaning process may include data deduplication, missing value processing, outlier detection and processing, etc.

[0084] It is understandable that the above training data may be in the form of natural language text (such as articles, reports, conversations, etc.) or in the form of semi-structured data (such as tables, databases, etc.). This application does not limit the form of training data.

[0085] S206: Construct a knowledge graph for diet recommendation based on the training data set, wherein the knowledge graph for diet recommendation represents the association between people with abnormal glucose metabolism, glucose metabolism targets and foods.

[0086] First, for the natural language data or semi-structured data in the training data set, identify and extract key domain entities, including people with abnormal glucose metabolism, glucose metabolism targets, foods, dishes, and food ingredients, etc. For example, if there is a piece of training data in the training data set that is "diabetic patients should eat more foods rich in dietary fiber, such as oats and whole wheat bread." Then, the extracted entities may include: diabetic patients, dietary fiber, oats, and whole wheat bread.

[0087] Secondly, based on the extracted entities, the relationship information between entities is constructed. For example, the relationship may include: the relationship between people with abnormal glucose metabolism and food (e.g., "foods that diabetic patients should avoid"), the relationship between food and food ingredients (e.g., "whole-wheat bread contains whole-wheat dietary fiber"), the relationship between food and glucose metabolism targets ("tea inhibits starch digestion enzymes"), the relationship between food and improving abnormal glucose metabolism (e.g., "tea helps lower postprandial blood sugar levels"), etc.

[0088] Subsequently, based on the identified entity and relationship information, a triple is constructed as the basic building block of the knowledge graph. A triple is the basic building block of the knowledge graph, usually expressed in the form of (entity 1, relationship, entity 2). For example, (diabetics should avoid sweets), (whole-wheat bread contains whole-wheat dietary fiber), (tea helps lower postprandial blood sugar levels) (tea inhibits starch digestion enzymes), etc. are all triples.

[0089] Therefore, through multiple triples, a knowledge graph for diet recommendations can be constructed.

[0090] It should be noted that when constructing a knowledge graph, it is also necessary to consider the problem of homonymy and synonyms. Among them, homonymy refers to the same word or phrase having different meanings in different contexts or fields. Synonyms refer to different words or phrases that express the same or similar meanings.

[0091] In some specific implementations, if there are multiple training data representing the same meaning (i.e. synonyms) in the training data set, the multiple training data are merged and then a knowledge graph for diet recommendation is constructed based on the merged training data set.

[0092] Specifically, if different training data use different words to describe the same food or nutrient (such as "Vitamin C" and "Vitamin C"), the constructed knowledge graph may treat these synonyms as different entities, resulting in information redundancy and inaccurate recommendations. Therefore, it is necessary to normalize different words that express the same or similar meanings into a unified vocabulary. For example, "Vitamin C" and "Vitamin C" are normalized to "Vitamin C" to ensure that the entities in the knowledge graph are unique.

[0093] In other specific implementations, if a training data set contains multiple meanings (i.e., homonyms), each meaning of the training data is attributed (so that it can be accurately distinguished when constructing the knowledge graph), and a knowledge graph for dietary recommendations is constructed based on the attribute-labeled training data set. This processing method can not only improve the accuracy and interpretability of the knowledge graph, but also provide users with more personalized and accurate recommendation services.

[0094] S207: Train an open source large language model based on the knowledge graph for diet recommendation to obtain a diet recommendation model.

[0095] Using the open source large language model as a carrier, the knowledge graph for diet recommendation constructed in step S206 is connected and model training is performed to obtain a diet recommendation model.

[0096] It is understandable that the diet recommendation model has the natural language interaction advantage of the large language model, can accurately understand the user's complex questions, and give detailed and accurate answers with the help of the rich information of the diet recommendation knowledge graph constructed in step S206. At the same time, the diet recommendation model can also optimize the natural language expression of the answer to ensure that the user can easily understand and accept the recommended diet plan.

[0097] In summary, the present application discloses a model training method, which not only enhances the practicality and acceptability of diet plan recommendations by considering the user's dietary preference information (such as taste preferences, allergy information, etc.), location information (involving regional dietary habits, available ingredients, etc.) and food origin information, but also improves the scientificity and accuracy of diet plan recommendations by considering the correspondence between food and multiple glucose metabolism targets, thereby improving the blood sugar control effect.

[0098] See also Figure 3 , which is a flow chart of a recommended method provided in an embodiment of the present application. The method includes:

[0099] S301: Obtain user information of the user to be recommended, where the user information includes at least one of health indicator information, dietary preference information, and location information of the user to be recommended.

[0100] S302: Determine a diet plan corresponding to the user information through a diet recommendation model.

[0101] It should be noted that the dietary recommendation model is based on Figure 1 or Figure 2 The model is trained using a public model training method.

[0102] In some specific implementations, a diet plan corresponding to user information is determined through a diet recommendation model, including: inputting user information into a diet recommendation model, and obtaining an initial diet plan through a knowledge graph for diet recommendation. Subsequently, in order to improve the personalization and accuracy of the diet plan, the user can input modification opinions or special needs (such as adding certain nutrients, avoiding certain foods, etc.) into the diet recommendation model, so that the initial diet plan is updated through the natural language interaction capability of the diet recommendation model, and an updated diet plan that better meets the user's needs is obtained.

[0103] In summary, the present application discloses a recommendation method, which not only enhances the practicality and acceptability of diet plan recommendations by considering the dietary preference information (such as taste preference, allergy information, etc.) of the user to be recommended, location information (involving regional dietary habits, available ingredients, etc.) and food origin information, but also improves the scientificity and accuracy of diet plan recommendations by considering the correspondence between food and multiple sugar metabolism targets, thereby improving blood sugar control effects. Furthermore, users can also propose modification suggestions or special needs through natural language interaction, thereby enhancing the interactivity between users and the system while further improving the accuracy and pertinence of the diet plan, so that the recommendation results are more in line with user expectations.

[0104] See also Figure 4 , which is a schematic diagram of a model training device provided in an embodiment of the present application. The model training device 400 includes: a data acquisition module 401, a graph construction module 402 and a model training module 403;

[0105] The data acquisition module 401 is used to acquire a training data set, which includes health index information, dietary preference information and location information of people with abnormal glucose metabolism, as well as origin information of various foods and corresponding relationships between various foods and glucose metabolism targets;

[0106] A graph construction module 402 is used to construct a knowledge graph for diet recommendation based on the training data set, wherein the knowledge graph for diet recommendation represents the association between people with abnormal glucose metabolism, glucose metabolism targets and foods;

[0107] The model training module 403 is used to train an open source large language model through a knowledge graph for diet recommendation to obtain a diet recommendation model.

[0108] In some specific implementations, the graph construction module 402 is specifically used for: if there are multiple training data representing the same meaning in the training data set, the multiple training data are merged and processed, and then a knowledge graph for diet recommendation is constructed according to the merged training data set.

[0109] In some specific implementations, the graph construction module 402 is specifically used for: if there is a training data in the training data set that represents multiple meanings, each meaning of the training data is attribute-labeled respectively, and then a knowledge graph for diet recommendation is constructed according to the attribute-labeled training data set.

[0110] In summary, the present application discloses a model training device, which not only enhances the practicality and acceptability of diet plan recommendations by considering the user's dietary preference information (such as taste preferences, allergy information, etc.), location information (involving regional dietary habits, available ingredients, etc.) and food origin information, but also improves the scientificity and accuracy of diet plan recommendations by considering the correspondence between food and multiple glucose metabolism targets, thereby improving the blood sugar control effect.

[0111] See also Figure 5 , which is a schematic diagram of a recommendation device provided in an embodiment of the present application. The recommendation device 500 includes: an acquisition module 501 and a determination module 502;

[0112] An acquisition module 501 is used to acquire user information of the user to be recommended, where the user information includes at least one of health indicator information, dietary preference information and location information of the user to be recommended;

[0113] The determination module 502 is used to determine a diet plan corresponding to the user information through a diet recommendation model, where the diet recommendation model is trained using the model training method of the first aspect.

[0114] In some specific implementations, the determination module 502 is specifically used to: input user information into a diet recommendation model, obtain an initial diet plan through a knowledge graph for diet recommendation, and then update the initial diet plan through the natural language interaction capability of the diet recommendation model to obtain an updated diet plan.

[0115] In summary, the present application discloses a recommendation device, which not only enhances the practicality and acceptability of diet plan recommendations by considering the dietary preference information (such as taste preferences, allergy information, etc.) of the user to be recommended, location information (involving regional dietary habits, available ingredients, etc.) and food origin information, but also improves the scientificity and accuracy of diet plan recommendations by considering the correspondence between food and multiple sugar metabolism targets, thereby improving blood sugar control effects. Furthermore, users can also propose modification suggestions or special needs through natural language interaction, thereby enhancing the interactivity between users and the system while further improving the accuracy and pertinence of the diet plan, making the recommendation results more in line with user expectations.

[0116] The embodiments of the present application also provide corresponding computer devices and computer-readable media for implementing the model training method or recommendation method provided in the embodiments of the present application.

[0117] Among them, the computer device includes a processor and a memory: the memory is used to store program code and transmit the program code to the processor; the processor is used to execute the model training method of the first aspect, or the steps of the recommendation method of the second aspect according to the instructions in the program code.

[0118] See also Figure 6 , which is a schematic diagram of a computer readable medium provided in an embodiment of the present application. The computer readable medium 600 stores a computer program 611, which implements the above-mentioned Figure 1 or Figure 2 Model training method, or Figure 3 The steps of the recommended method.

[0119] It should be noted that in the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0120] It should be noted that the machine-readable medium mentioned above in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0121] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0122] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

[0123] Although several specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present application. Certain features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination.

[0124] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A model training method, characterized in that: The method comprises: Acquire a training data set, wherein the training data set includes health indicator information, dietary preference information, and location information of people with abnormal glucose metabolism, as well as origin information of multiple foods and corresponding relationships between the multiple foods and glucose metabolism targets; constructing a knowledge graph for diet recommendation according to the training data set, wherein the knowledge graph for diet recommendation represents the association relationship between the population with abnormal glucose metabolism, the glucose metabolism target and the food; The diet recommendation model is obtained by training an open source large language model through the knowledge graph for diet recommendation.

2. The method according to claim 1, characterized in that The step of constructing a knowledge graph for diet recommendation based on the training data set includes: If there are multiple training data representing the same meaning in the training data set, the multiple training data are merged and a knowledge graph for diet recommendation is constructed according to the merged training data set.

3. The method according to claim 1, characterized in that The step of constructing a knowledge graph for diet recommendation based on the training data set includes: If there is a certain training data in the training data set that represents multiple meanings, each meaning of the training data is attribute-labeled respectively, and a knowledge graph for diet recommendation is constructed according to the attribute-labeled training data set.

4. A recommendation method, characterized in that: The method comprises: Acquire user information of the user to be recommended, wherein the user information includes at least one of health indicator information, dietary preference information, and location information of the user to be recommended; A diet plan corresponding to the user information is determined through a diet recommendation model, wherein the diet recommendation model is obtained by training using the model training method described in any one of claims 1 to 3.

5. The method according to claim 4, characterized in that Determining a diet plan corresponding to the user information through a diet recommendation model includes: The user information is input into the diet recommendation model, and after an initial diet plan is obtained through the knowledge graph for diet recommendation, the initial diet plan is updated through the natural language interaction capability of the diet recommendation model to obtain an updated diet plan.

6. A model training device, characterized in that: The device comprises: a data acquisition module, a graph construction module and a model training module; The data acquisition module is used to acquire a training data set, wherein the training data set includes health indicator information, dietary preference information and location information of people with abnormal glucose metabolism, as well as origin information of multiple foods and corresponding relationships between the multiple foods and glucose metabolism targets; The graph construction module is used to construct a knowledge graph for diet recommendation based on the training data set, wherein the knowledge graph for diet recommendation represents the association between the abnormal glucose metabolism population, the glucose metabolism target and the food; The model training module is used to train the open source large language model through the knowledge graph for diet recommendation to obtain a diet recommendation model.

7. A recommendation device, characterized in that: The device comprises: an acquisition module and a determination module; The acquisition module is used to acquire user information of the user to be recommended, wherein the user information includes at least one of health indicator information, dietary preference information and location information of the user to be recommended; The determination module is used to determine a diet plan corresponding to the user information through a diet recommendation model, and the diet recommendation model is trained by the model training method according to any one of claims 1 to 3.

8. The device according to claim 7, characterized in that The determination module is specifically used for: The user information is input into the diet recommendation model, and after an initial diet plan is obtained through the knowledge graph for diet recommendation, the initial diet plan is updated through the natural language interaction capability of the diet recommendation model to obtain an updated diet plan.

9. A computer device, characterized in that: The device comprises a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the model training method described in any one of claims 1 to 3, or the steps of the recommendation method described in claim 4 or 5 according to the instructions in the program code.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program code, and the program code is used to execute the model training method described in any one of claims 1 to 3, or the steps of the recommendation method described in claim 4 or 5.