Personalized precise nutrition recipe recommendation method and system based on genetic algorithm
By constructing a food-nutrient database and a nutrient-gene database, combined with genetic algorithms, a precise nutritional recipe that meets personalized nutrition requirements is solved, and the problem of the inability of the existing technology to meet the nutritional needs caused by individual genetic differences is achieved, and comprehensive nutrition support is achieved for normal people and those with special nutritional risks.
Patent Information
- Application Number
- CN202510359343.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-06-27
AI Technical Summary
The prior art cannot provide precise nutritional dietary solutions without the participation of nutritionists and without the use of dietary supplements, and cannot effectively meet the needs of nutrient absorption and metabolic differences caused by genetic differences between individuals, especially users with special nutritional risks.
By constructing a food-nutrient database and a nutrient-gene database, combining genetic algorithms, quantitative nutrient needs are generated based on personal information, and through iterative optimization selection and combination of foods, precise nutritional recipes that meet personalized nutrition requirements are generated.
It has achieved the generation of precise nutritional recipes that meet personalized nutritional needs based on personal characteristics and genetic risks, which can not only meet the basic nutritional needs of normal people, but also meet the nutritional needs of people with special nutritional risks.
Smart Images

Figure CN120220975A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of recipe recommendation, and in particular, to a personalized and precise nutrition recipe recommendation method and system based on a genetic algorithm. Background Art
[0002] At present, food choices at the population level are mainly based on dietary guidelines, which are usually established based on the average population. However, due to differences in various factors such as gender, age, nutritional status, genetic background (genotype), and physiological characteristics among individuals, there are significant differences in the digestion, absorption, transport, and metabolism of nutrients in individuals. Therefore, a "one-size-fits-all" nutrition plan such as a dietary guideline is not applicable to specific individuals or sub-populations. An accurate nutrition diet plan based on individual physiological characteristics is the first choice for effectively maintaining good health and preventing metabolic diseases.
[0003] Differences in individual genotypes can lead to differences in nutrient absorption and metabolism in individuals, which is one of the causes of certain nutritional and metabolic diseases. For example, the variation of the folate metabolism enzyme gene MTHFR causes abnormal folate metabolism. When the same amount of folate is ingested, the amount of folate absorbed and metabolized by the MTHFR variant population is greatly reduced, which is related to heart disease, infertility, and certain cancers in the MTHFR variant population. Therefore, diet plans can be designed more specifically through genetic testing to prevent the occurrence of nutritional and metabolic diseases. At present, the design of accurate nutrition diet plans based on genetic testing technology is mainly that dietitians provide dietary supplements according to genetic test reports or manually design diet plans.
[0004] Based on the above analysis, there is currently a lack of a recommendation system that does not require the participation of dietitians, does not use dietary supplements, and can give a scientific, quantifiable, and easy-to-implement accurate nutrition diet plan to provide people with diet plans adapted to genetic differences among individuals and meet the needs of people to maintain good health and prevent nutritional and metabolic diseases.
[0005] Patent document CN116959667A (application number: 202210371571.0) discloses a recipe recommendation method and device based on genetic algorithm for grouped combination optimization. The method includes: obtaining a population of parent recipes; wherein, the population of parent recipes includes a first set of recipes within a preset time period, the first set of recipes includes a plurality of first recipes, and the dishes in each first recipe are set with tags corresponding to preset sub-time periods; for each first recipe, grouping and encoding the dishes in each first recipe according to the tags to obtain a second set of recipes; using the genetic algorithm to perform genetic iterative processing on the second set of recipes to determine a target population of offspring recipes that meets the genetic iterative stop condition; and selecting a target recipe that conforms to the preset rules from the target population of offspring recipes. This patent can only meet the basic nutritional needs of normal users and cannot meet the nutritional needs of users with special nutritional risks, such as users lacking specific nutrients or users with absorption disorders of specific nutrients due to carrying risk genes themselves. However, the recipes provided by the present invention can not only meet the basic nutritional needs of normal users but also meet the nutritional needs of users with the above special nutritional risks. Summary of the Invention
[0006] Aiming at the deficiencies in the prior art, the purpose of the present invention is to provide a personalized and precise nutritional recipe recommendation method and system based on genetic algorithm.
[0007] A personalized and precise nutritional recipe recommendation method based on genetic algorithm provided by the present invention includes:
[0008] Step S1: Construct a food-nutrient database;
[0009] Step S2: Construct a nutrient-gene database;
[0010] Step S3: Generate personalized quantitative nutrient requirements based on personal information according to the dietary reference intakes of nutrients and the gene-nutrient database;
[0011] Step S4: According to the personalized quantitative nutrient requirements, select and combine foods based on the food-nutrient database through genetic algorithm, and iteratively improve the combination of food types and food amounts to obtain a precise nutritional recipe that meets personalized nutritional requirements.
[0012] Preferably, the step S1 adopts:
[0013] Step S1.1: Collect data on foods and their nutrient compositions;
[0014] Step S1.2: Divide foods into n major categories according to nutritional characteristics;
[0015] Step S1.3: Divide the nutritional information of each food into m categories, and for each nutrient, standardize the data from different sources into the same unit;
[0016] Step S1.4: Sort the foods according to the content levels of each nutrient to form food-nutrient data.
[0017] Preferably, step S2 is as follows:
[0018] Step S2.1: Obtain the standard name of each nutrient, CAS Type 1Name, molecular formula, MeSH ID, PubChemID, DrugBank ID, Guide-to-Pharmacology Ligand ID, CHEBI ID, ChemIDplus, and synonymous names.
[0019] Step S2.2: Based on public databases and literature, obtain the genes that interact with the nutrient names and IDs, as well as the functional information of the genes.
[0020] Step S2.3: Standardize all gene names to the approved HGNC gene symbols.
[0021] Step S2.4: Obtain the relationship between gene mutations and nutrients, and label the gene mutation-nutrient relationship as absorption or excretion.
[0022] Step S2.5: Embed the interaction between genes and nutrients and the absorption or excretion information labeled by gene mutation-nutrients into the interaction between food nutrients and genes to construct a nutrient-gene interaction database.
[0023] Step S2.6: Obtain the SNPs located in the coding region of the gene, map the gene to the SNPs that can cause protein coding changes, and embed the mapping relationship into the constructed nutrient-gene interaction database to establish a nutrient-gene database.
[0024] Preferably, step S3 is as follows:
[0025] Step S3.1: Obtain the user's nutritional risk information, including nutrient deficiencies, risk genes, and risk SNPs.
[0026] Step S3.2: Set the corresponding special need nutrients according to the nutrient deficiencies; based on the risk genes and risk SNPs, obtain the special need nutrients that interact with the risk genes from the nutrient-gene database.
[0027] Step S3.3: Combine the individual's basic nutrient needs and special need nutrients to construct personalized nutrient needs.
[0028] Preferably, step S4 is as follows:
[0029] Step S4.1: Set the frequencies of food types in the preset food library;
[0030] Step S4.2: Iteratively optimize the recipe using a genetic algorithm based on personalized nutrient requirements.
[0031] Preferably, step S4.2 adopts:
[0032] Step S4.2.1: In the food-nutrient database, randomly select x foods from the m foods with the highest special requirement nutrient content rankings;
[0033] Step S4.2.2: Randomly select foods from n food categories according to the selection frequency of each food category, with at least y foods selected from each category, and combine them with the x foods to form a food pool;
[0034] Step S4.2.3: Randomly select at least s foods from the food pool according to the set selection frequency, and repeat k times to form k sets of initial food combinations;
[0035] Step S4.2.4: Calculate the food intake, energy, and intakes of various nutrient elements of each set of food combinations, and compare them with the individual nutrient requirements to obtain the nutrient difference multiples;
[0036] Nutrient difference multiple = Nutrient intake in the food combination / Individual nutrient requirement;
[0037] Step S4.2.5: Set the difference multiples of saturated fatty acids, calcium, sugar, and fat that may cause harm to the human body when ingested in excess to be less than a1; set the difference multiples of special requirement nutrients to be greater than or equal to a2, and screen the k sets of food combinations to obtain food combinations that meet the difference multiple requirements;
[0038] Step S4.2.6: Calculate the number of nutrient elements in the food combinations that meet the requirements and have difference multiples greater than the preset value, and sort the food combinations from largest to smallest according to the quantity. If the number of nutrient elements in the food combination with a difference multiple greater than the preset value is greater than a3, it is used as the recommended diet plan;
[0039] Step S4.2.7: When the number of recommended diet plans is greater than or equal to 1:
[0040] When the number of recommended diet plans is greater than or equal to 2, then combine the foods in all the obtained recommended diet plans; when the number of recommended diet plans is equal to 1, then obtain the foods in the recommended diet plan;
[0041] Take the nutrients with a difference multiple less than the preset value in the top-ranked diet plan as special-needs nutrients. If there is one nutrient with a difference multiple less than the preset value, randomly select x foods from the top m foods in terms of the content of this nutrient in the food-nutrient database. If there is more than one nutrient with a difference multiple less than the preset value, sum up the rankings of the above nutrient contents of each food, and sort the sums from small to large to obtain the top-ten foods.
[0042] Randomly select foods from n categories of foods according to the selection frequency of each category of foods, with at least y foods selected from each category, and combine them with the above foods to form a new food pool.
[0043] Repeat triggering steps S4.2.3 to S4.2.6 to obtain a new recommended diet plan; repeat triggering step S4.2.7 to perform iterative optimization of the diet plan. When the preset requirements are met, end the iteration to obtain the best recommended diet plan.
[0044] When the number of diet plans to be recommended is less than 1, repeat triggering steps S4.2.1 to S4.2.6 to obtain a new recommended diet plan, repeat triggering step S4.2.7 to perform iterative optimization of the diet plan. When the preset requirements are met, end the iteration to obtain the best recommended diet plan.
[0045] A personalized precise nutrition recipe recommendation system based on a genetic algorithm provided by the present invention includes:
[0046] Module M1: Construct a food-nutrient database;
[0047] Module M2: Construct a nutrient-gene database;
[0048] Module M3: Generate personalized quantitative nutrient requirements based on personal information according to the dietary reference intakes of residents and the gene-nutrient database;
[0049] Module M4: According to the personalized quantitative nutrient requirements, select and combine foods based on the food-nutrient database through a genetic algorithm, iteratively improve the combination of food types and food amounts, and obtain a precise nutrition recipe that meets the personalized nutrition requirements.
[0050] Preferably, the module M1 adopts:
[0051] Module M1.1: Collect data on foods and their nutrient compositions;
[0052] Module M1.2: Divide foods into n major categories according to nutritional characteristics;
[0053] Module M1.3: Divide the nutritional information of each food into m categories, and for each nutrient, standardize the data from different sources into the same unit;
[0054] Module M1.4: Sort foods according to the content level of each nutrient to form food-nutrient data.
[0055] Preferably, the module M2 adopts:
[0056] Module M2.1: Obtain the standard name of each nutrient, CAS Type 1Name, molecular formula, MeSH ID, PubChemID, DrugBank ID, Guide-to-Pharmacology Ligand ID, CHEBI ID, ChemIDplus, and synonymous names;
[0057] Module M2.2: Based on public databases and literature, obtain the genes that interact with the nutrient names and IDs, as well as the functional information of the genes;
[0058] Module M2.3: Standardize all gene names to the approved HGNC gene symbols;
[0059] Module M2.4: Obtain the relationship between gene mutations and nutrients, and label the gene mutation-nutrient relationship as absorption or excretion;
[0060] Module M2.5: Embed the interaction between genes and nutrients and the absorption or excretion information labeled by gene mutation-nutrients into the interaction between food nutrients and genes to construct a nutrient-gene interaction database;
[0061] Module M2.6: Obtain the SNPs located in the coding region of the gene, map the gene to the SNPs that can cause protein coding changes, and embed the mapping relationship into the constructed nutrient-gene interaction database to establish a nutrient-gene database;
[0062] The module M3 adopts:
[0063] Module M3.1: Obtain the user's nutritional risk information, including nutrient deficiencies, risk genes, and risk SNPs;
[0064] Module M3.2: Set the corresponding special need nutrients according to the nutrient deficiencies; based on the risk genes and risk SNPs, obtain the special need nutrients that interact with the risk genes from the nutrient-gene database;
[0065] Module M3.3: Combine the individual's basic nutrient needs and special need nutrients to construct personalized nutrient needs.
[0066] Preferably, the module M4 adopts:
[0067] Module M4.1: Set the frequency of food types in the preset food library;
[0068] Module M4.2: Iteratively optimize recipes using a genetic algorithm based on personalized nutrient requirements;
[0069] The module M4.2 adopts:
[0070] Module M4.2.1: Randomly select x foods from the foods with the top m rankings in terms of the content of special requirement nutrients in the food-nutrient database;
[0071] Module M4.2.2: Randomly select foods from n types of foods according to the selection frequency of each type of food, with at least y foods selected for each type, and combine them with the x foods to form a food pool;
[0072] Module M4.2.3: Randomly select at least s foods from the food pool according to the set selection frequency, and repeat k times to form k sets of initial food combinations;
[0073] Module M4.2.4: Calculate the food intake, energy, and the intake of various nutrient elements of each set of food combinations, and compare them with the individual nutrient requirements to obtain the nutrient difference multiple;
[0074] Nutrient difference multiple = Nutrient intake in the food combination / Individual nutrient requirement;
[0075] Module M4.2.5: Set the difference multiples of saturated fatty acids, calcium, sugar, and fat that may cause harm to the human body if over-intaken to be less than a1; set the difference multiple of special requirement nutrients to be greater than or equal to a2, and screen the k sets of food combinations to obtain food combinations that meet the difference multiple requirements;
[0076] Module M4.2.6: Calculate the number of nutrient elements in the food combinations that meet the requirements and have a difference multiple greater than the preset value, and sort the food combinations from largest to smallest according to the quantity. If the number of nutrient elements in the food combination with a difference multiple greater than the preset value is greater than a3, then it is used as a recommended diet plan;
[0077] Module M4.2.7: When the number of recommended diet plans is greater than or equal to 1:
[0078] When the number of recommended diet plans is greater than or equal to 2, then combine the foods in all the obtained recommended diet plans; when the number of recommended diet plans is equal to 1, then obtain the foods in the recommended diet plan;
[0079] Take the nutrients with a difference multiple less than the preset value in the top-ranked diet plan as special-needs nutrients. If there is one nutrient with a difference multiple less than the preset value, randomly select x foods from the top m foods in terms of the content of this nutrient in the food-nutrient database; if there are more than one nutrient with a difference multiple less than the preset value, sum up the rankings of the above nutrient contents of each food, and sort them from small to large to obtain the top-ten foods;
[0080] Randomly select foods from n types of foods according to the selection frequency of each type of food, with at least y selected for each type, and combine them with the above foods to form a new food pool;
[0081] Repeat triggering from module M4.2.3 to module M4.2.6 to obtain a new recommended diet plan; repeat triggering module M4.2.7 to perform iterative optimization of the diet plan. When the preset requirements are met, end the iteration to obtain the best recommended diet plan;
[0082] When the number of diet plans to be recommended is less than 1, repeat triggering from module M4.2.1 to step 4.2.6 to obtain a new recommended diet plan, repeat triggering module M4.2.7 to perform iterative optimization of the diet plan. When the preset requirements are met, end the iteration to obtain the best recommended diet plan.
[0083] Compared with the prior art, the present invention has the following beneficial effects:
[0084] 1. A personalized and precise nutrition recipe recommendation method and system based on a genetic algorithm provided by the present invention can generate precise nutrition recipes that meet personalized nutrition needs according to personal characteristics and genetic risks;
[0085] 2. The present invention establishes a food nutrient composition database and a nutrient-gene interaction database, generates quantitative nutrient requirements based on the dietary reference intakes of residents and the pre-constructed nutrient-gene interaction database, selects and combines foods by programming a genetic algorithm, iteratively improves the combination of food types and food amounts, and outputs precise nutrition recipes that meet personalized nutrition requirements, which can not only meet the basic nutrition needs of the normal population but also meet the nutrition needs of people with special nutrition risks (such as people with genetic defects in nutrient absorption and metabolism). BRIEF DESCRIPTION OF THE DRAWINGS
[0086] By reading the detailed description of the non-limiting embodiments with reference to the following drawings, other features, purposes, and advantages of the present invention will become more obvious:
[0087] Figure 1 It is a flowchart of the personalized and precise nutrition recipe recommendation method based on a genetic algorithm of the present invention.
[0088] Figure 2 It is a schematic diagram of the iterative optimization of the genetic algorithm. Specific implementation mode
[0089] The present invention will be described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but do not limit the present invention in any form. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several changes and improvements can still be made. These all belong to the protection scope of the present invention.
[0090] Example 1
[0091] According to a personalized precise nutrition recipe recommendation method and system based on the genetic algorithm provided by the present invention, it is based on a food nutrient composition database. By inputting various personal information, including gender, age, weight, height, nutritional risk (nutrient requirements, risk genes or risk SNP IDs), quantitative nutrient requirements are generated according to the dietary reference intakes of residents and a pre-constructed nutrient-gene interaction database. Finally, according to the personal quantitative nutrient requirements, a genetic algorithm is written to select and combine foods, iteratively improve the combination of food types and food amounts, and output a precise nutrition recipe that meets personalized nutritional requirements.
[0092] The personalized precise nutrition recipe recommendation method based on the genetic algorithm, as Figures 1 to 2 shown, includes:
[0093] Step S1: Construct a food-nutrient database;
[0094] Step S2: Construct a gene-nutrient interaction database;
[0095] Step S3: Based on personal information, including: gender, age, weight, height, nutritional risk (nutrient requirements, risk genes or risk SNP IDs), generate personal quantitative nutrient requirements according to the dietary reference intakes of residents and the constructed gene-nutrient interaction database;
[0096] Step S4: According to the personal quantitative nutrient requirements, select and combine foods through the genetic algorithm, iteratively improve the combination of food types and food amounts, and output a precise nutrition recipe that meets personalized nutritional requirements.
[0097] Specifically, the construction of the food-nutrient database in step S1 includes:
[0098] In this embodiment, data on the composition of 2,314 Chinese foods and their nutrients were collected from the "Chinese Food Composition Table" (2023 edition); data on the composition of 7,793 US foods and their nutrients were collected from the FoodData Central of the US Department of Agriculture (USDA SR); data on the composition of 1,216 Australian foods and their nutrients were collected from NUTTAB and the Australian Food Composition Database (AUS) respectively; and data on the composition of 2,192 Japanese foods and their nutrients were collected from the Ministry of Education, Culture, Sports, Science and Technology (MEXT) of Japan. The food information of the US and Australia was translated into Chinese, and the food information of Japan was translated into Chinese. Then the foods were divided into 16 major categories according to their nutritional characteristics, including staple foods, eggs, fruits, vegetables, nuts, meats, milk, fish, beans, tubers, fast foods, dairy products, yogurt, liver, fruit juices, and snacks. The nutritional information of each food was divided into 8 categories: including basic nutritional components, amino acids, chemical elements, fiber, lipids and fatty acids, sugars, vitamins, and others. For each nutrient, the data from different sources were standardized to the same unit. The basic nutritional component group includes energy (kcal and kJ), water (g), protein (g), fat (g), starch (g), ash (g), carbohydrates (g), and sugars (g). Amino acids include tryptophan (g), threonine (g), isoleucine (g), leucine (g), lysine (g), methionine (g), phenylalanine (g), valine (g), arginine (g), histidine (g), cystine (g), and tyrosine (g). Chemical elements include calcium (mg), iron (mg), magnesium (mg), phosphorus (mg), potassium (mg), sodium (mg), zinc (mg), copper (mg), manganese (mg), selenium (mg), and iodine (mg). Lipids and fatty acids include saturated fatty acids (g), unsaturated fatty acids (g), DHA (g), EPA (g), DPA (g), ALA (g), and ARA (g). Sugars include fructose (g), sucrose (g), glucose (g), and lactose (g). Vitamins include vitamin A (mg), carotene (mg), vitamin B6 (mg), vitamin B 12 (mg), vitamin C (mg), and vitamin D (mg). Finally, the foods were sorted according to the content of each nutrient to form a food-nutrient database.
[0099] Specifically, the construction of the gene-nutrient interaction database in step S2 includes:
[0100] In this embodiment, the standard names, CAS Type 1Names, molecular formulas, MeSH IDs, PubChem IDs, DrugBank IDs, Guide-to-Pharmacology Ligand IDs, CHEBI IDs, ChemIDplus, and synonymous names of each nutrient are collected. Then, all genes that interact with these names and IDs are collected by retrieving public databases and literature. From the Comparative Toxicogenomics Database (CTD), genes that interact with each nutrient component as follows are collected: binding, susceptibility, metabolism, chemical synthesis, hydrolysis, hydroxylation, uptake, transport, export, import, oxidation, secretion. From the Guide-to-Pharmacology, Drugbank, and PubChem databases, genes that interact with each nutrient as follows are collected: transporter, binder, inhibitor, substrate, channel blocker, target, receptor, agonist, antagonist, activator, ligand, enzyme, regulator. All gene names are standardized to the approved HGNC gene symbols. And the relationships between gene mutations and nutrients in the literature with human or mouse as the research object are collected, and the gene-nutrient relationships are marked as "absorption" and "excretion"; this means that once these genes mutate, they will affect the absorption or metabolism of nutrients in the human body, leading to nutritional metabolic diseases. By embedding all this information into 398 interactions between 55 food nutrients and 338 genes, a nutrient-gene interaction database is established. Next, SNPs located in the coding regions of the above 338 genes are collected from the dbSNP database (dbSNP144, genome version GRch37), and the genes are mapped to the SNPs that can cause protein-coding changes. Further, this information is embedded into the constructed nutrient-gene interaction database to construct a nutrient-gene database with 398 interactions between 55 food nutrients and 338 genes (3056 coding-effect SNPs).
[0101] Specifically, step S3 adopts:
[0102] Step S3.1: Determine individual nutrient requirements;
[0103] In this embodiment, the Dietary Reference Intakes for Chinese Residents (2023 Edition) is used as the standard to set the basic individual nutrient requirements. For users who input nutritional risk information (lack of nutrients, risk genes, risk SNPs), on the basis of the basic requirements, the requirements for the lacking nutrients are set to 1.5 times or more of the basic requirements for this nutrient, and the requirements for the nutrients that interact with the risk genes (or risk SNPs) are set to 1.5 times or more of the basic requirements for this nutrient. The lacking nutrients and the nutrients that interact with risk genes and risk SNPs are named special requirement nutrients.
[0104] Specifically, step S4 adopts: setting the frequency of food types in the diet plan
[0105] The selection frequencies of 16 types of foods in the food library are set. Among them, the frequencies of staple foods, eggs, fruits, vegetables, nuts, meats, milk, fish, beans, and tubers are 1, that is, the occurrence probabilities of these types of foods in the diet plan are 100%. At the same time, in order to increase the diversity of food types in the diet plan, the frequencies of other types of foods are: the frequency of fast foods is 0.7, dairy products is 0.3, yogurt is 0.3, liver is 0.1, fruit juices is 0.3, and snacks is 0.5.
[0106] Using the genetic algorithm to iteratively optimize the recipe includes:
[0107] Step S4.1: In the food-nutrient database, randomly select 10 foods from the top 100 foods ranked by the content of special-needs nutrients. (If there are no special-needs nutrients, directly proceed to step S4.2).
[0108] Step S4.2: Randomly select foods from 16 types of foods according to the selection frequency of each type of food. At least 5 foods of each type are selected and combined with the 10 foods in step S4.1 to form a food pool.
[0109] Step S4.3: Randomly select at least 10 foods from the food pool according to the set selection frequency and repeat 7 times to form 7 sets of initial food combinations.
[0110] Step S4.4: Calculate the food intake, energy, and intakes of various nutrient elements of each set of food combinations, and compare them with the individual nutrient requirements to obtain the nutrient difference multiple (fitness function).
[0111] Calculation of the difference multiple: Nutrient difference multiple = Nutrient intake in the food combination / Individual nutrient requirement.
[0112] Step S4.5: Set the difference multiples of saturated fatty acids, calcium, sugar, and fat that may cause harm to the human body due to excessive intake to be less than 1.3 (convergence condition 1); set the difference multiple of special-needs nutrients to be greater than or equal to 1.5 (convergence condition 2), and screen the 7 sets of food combinations in step S4.3 to obtain food combinations that meet the difference multiple requirements.
[0113] Step S4.6: Calculate the number of nutrient elements with a difference multiple greater than 0.8 in the food combinations that meet the requirements, and sort the food combinations from largest to smallest according to the quantity. If the number of nutrient elements with a difference multiple greater than 0.8 in the food combination is greater than 21 (convergence condition 3), it is used as the recommended diet plan.
[0114] Step S4.7:
[0115] Case 1: If the number of recommended diet plans obtained in step S4.6 is greater than or equal to 2, then:
[0116] ① Combine the foods in all the obtained recommended diet plans.
[0117] ② Take the nutrients with a difference multiple less than 0.8 in the diet plan ranked first as special requirement nutrients. If there is one nutrient with a difference multiple less than 0.8, randomly select 10 foods from the top 100 foods in terms of the content of this nutrient in the food - nutrient database; if there are more than one nutrient with a difference multiple less than 0.8, add up the rankings of the above - mentioned nutrient contents of each food (set the ranking of the nutrient content of 0 to 99999), and sort the sums from small to large to obtain the top ten foods.
[0118] ③ Randomly select foods from 16 categories of foods according to the selection frequency of each category of food, with at least 5 selected for each category, and combine them with the foods in ① and ② to form a new food pool. In this way, the foods in the better diet plans of the previous generation have a greater chance of being inherited by the next generation.
[0119] ④ Repeat steps S4.3 to S4.6 to obtain new recommended diet plans.
[0120] ⑤ Repeat step S4.7 to perform iterative optimization of the diet plan, with the number of iterations being 40 times. During the iteration process, the food combinations with more than 21 nutrient elements with a difference multiple greater than 0.8 will be recommended as diet plans.
[0121] Through the iterative method of the genetic algorithm, the diet of the offspring has a greater chance of inheriting the foods in the better diet plans of the previous generation, can meet personal nutritional needs to the greatest extent, and at the same time, new foods are added to the diet of the offspring to ensure the diversity of foods in the diet plan. After multiple iterations like this, the output diet plans that meet the conditions will meet most of the needs of personalized nutrition.
[0122] Case 2: If the number of recommended diet plans in step six is equal to 1, then:
[0123] ① Obtain the foods in the recommended diet plan.
[0124] ② Repeat steps ②, ③, ④, and ⑤ in Case 1.
[0125] Case 3: If the number of recommended diet plans in step S4.6 is less than 1, directly repeat steps S4.1 to S4.6 to obtain a new recommended diet plan. Then, perform step S4.7 according to the number of new diet recommendation plans until the number of iterations reaches 40. During the iteration process, food combinations with more than 21 nutrient elements whose difference multiples are greater than 0.8 will be recommended as diet plans.
[0126] The present invention also provides a personalized and precise nutrition recipe recommendation system based on a genetic algorithm. The personalized and precise nutrition recipe recommendation system based on a genetic algorithm can be implemented by executing the process steps of the personalized and precise nutrition recipe recommendation method based on a genetic algorithm. That is, those skilled in the art can understand the personalized and precise nutrition recipe recommendation method based on a genetic algorithm as a preferred implementation manner of the personalized and precise nutrition recipe recommendation system based on a genetic algorithm.
[0127] Example 2
[0128] Example 2 is a preferred example of Example 1.
[0129] The personalized and precise nutrition recipe recommendation system based on a genetic algorithm can be implemented through an online software. This software is divided into three layers: a data layer, a calculation layer, and a user interface.
[0130] The data layer includes data such as a food-nutrient database, a food-nutrient database, a nutrient-gene interaction database, and the recommended intake of personal dietary nutrient elements.
[0131] The calculation layer mainly uses R and Bioconductor packages to implement the above genetic algorithm. ggplot2 is used to generate result graphs.
[0132] The user interface is developed with html5, PHP, and JavaScript. Bootstrap is used to build the website framework. Interactive result visualization and plotting queries are developed with ECharts. The query information and personal data of users will be placed in a private directory and protected by private code, and will be immediately deleted after calculation.
[0133] Specifically, everyone can use this platform to formulate personalized nutritional diets. The software provides input options for users to enter their personal physical information (gender, age, height, weight) and personalized needs (nutrient requirements, risk genes, SNPs). The server uses encryption codes to shield the information to prevent personal data leakage. After entering the information and clicking the submit button, a list of dietary recommendation plans and the quantities of foods in each plan are output through a genetic algorithm. Clicking on each dietary recommendation plan will output three parts. The first part is the food combination and the intake of each food. Clicking on the food name can view the source of the food, the nutrient content and its ranking in the food, as well as the risk genes and SNP information associated with the nutrients in the food. The second part is the composition and intake of macronutrients and micronutrients in the dietary plan. The third part is the intake of nutrients with special requirements in the dietary plan and its comparison with the recommended intake and the intake of the pyramid diet randomly generated.
[0134] The present invention provides a precise nutrition plan for people with MTHFR deficiency or in need of folic acid:
[0135] Input of personal basic information: Gender: Female; Age: 20 years old; Height: 165 cm; Weight: 50 kg.
[0136] Input of risk genes: SNP: rs1801133, Risk gene: MTHFR. Or input of required nutrients: Folic acid.
[0137] After the input of personal information is completed and the system runs automatically, a list of dietary recommendation plans and the quantities of foods in each plan will be output.
[0138] Obtain the specific information of the dietary plan. The first part is the foods and their intakes. Clicking on the food name can view the source of the food, the nutrient content and its ranking in the food, as well as the risk genes and SNP information associated with the nutrients in the food. The second part is the intake of macronutrients and micronutrients in the dietary plan. The third part is the comparison of the intake of nutrients related to the required nutrients / risk genes in the dietary plan with the recommended intake and the intake of the pyramid diet.
[0139] Those skilled in the art know that, in addition to implementing the system and its various devices, modules, and units provided by the present invention in the form of pure computer-readable program code, the method steps can be logically programmed to enable the system and its various devices, modules, and units provided by the present invention to be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers, etc., to achieve the same functions. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a kind of hardware component, and the devices, modules, and units included therein for implementing various functions can also be regarded as the structures within the hardware component; the devices, modules, and units for implementing various functions can also be regarded as either software modules for implementing the method or structures within the hardware component.
[0140] The specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Without conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A personalized precise nutrition recipe recommendation method based on genetic algorithm, characterized in that: include: Step S1: constructing a food-nutrient database; Step S2: constructing a nutrient-gene database; Step S3: Generate individual quantitative nutrient requirements based on personal information, dietary nutrient reference intake and gene-nutrient database; Step S4: According to the individual's quantitative nutrient needs, foods are selected and combined through a genetic algorithm based on the food-nutrient database, and the combination of food types and food quantities is iteratively improved to obtain an accurate nutritional recipe that meets the personalized nutritional requirements.
2. The personalized precise nutrition recipe recommendation method based on genetic algorithm according to claim 1, characterized in that: The step S1 adopts: Step S1.1: Collect data on food and its nutrient composition; Step S1.2: Divide the food into n categories according to its nutritional characteristics; Step S1.3: Divide the nutritional information of each food into m categories, and for each nutrient, standardize the data from different sources to the same unit; Step S1.4: Sort the foods according to the content of each nutrient to form food-nutrient data.
3. The personalized precise nutrition recipe recommendation method based on genetic algorithm according to claim 1, characterized in that: The step S2 adopts: Step S2.1: Obtain the standard name, CAS Type 1Name, molecular formula, MeSH ID, PubChemID, DrugBank ID, Guide-to-Pharmacology Ligand ID, CHEBI ID, ChemIDplus, and synonymous name of each nutrient; Step S2.2: Obtain genes that interact with nutrient names and IDs, as well as gene function information based on public databases and literature; Step S2.3: All gene names were standardized to approved HGNC gene symbols; Step S2.4: Obtain the relationship between gene mutations and nutrients, and mark the gene mutation-nutrient relationship as absorption or excretion; Step S2.5: embedding the interaction between genes and nutrients and the absorption or excretion information of gene mutation-nutrient markers into the interaction between food nutrients and genes to construct a nutrient-gene interaction database; Step S2.6: Obtain SNPs located in the coding region of the gene, map the gene with the SNP that can cause protein coding changes, and embed the mapping relationship into the constructed nutrient-gene interaction database to establish a nutrient-gene database.
4. The personalized precise nutrition recipe recommendation method based on genetic algorithm according to claim 1, characterized in that: The step S3 adopts: Step S3.1: Obtaining user nutritional risk information, including nutrient deficiencies, risk genes, and risk SNPs; Step S3.2: setting corresponding special requirement nutrients according to the deficient nutrients; obtaining special requirement nutrients that interact with the risk genes based on the nutrient-gene database according to the risk genes and risk SNPs; Step S3.3: Construct personalized nutrient requirements based on individual basic nutrient requirements and special nutrient requirements.
5. The personalized precise nutrition recipe recommendation method based on genetic algorithm according to claim 1, characterized in that: The step S4 adopts: Step S4.1: Setting the frequency of food types in the preset food library; Step S4.2: Iteratively optimize the recipe using a genetic algorithm based on personalized nutrient requirements.
6. The personalized precise nutrition recipe recommendation method based on genetic algorithm according to claim 4, characterized in that: The step S4.2 adopts: Step S4.2.1: In the food-nutrient database, randomly select x foods from the top m foods in terms of special nutrient content; Step S4.2.2: Randomly select foods from n types of food according to the selection frequency of each type of food, select at least y types of food from each type, and merge them with x types of food to form a food pool; Step S4.2.3: Randomly select at least s foods from the food pool according to the set selection frequency, repeat k times, and form k sets of initial food combinations; Step S4.2.4: Calculate the food intake, energy, and various nutrient element intakes for each set of transaction combinations, and compare them with individual nutrient requirements to obtain the nutrient difference multiples; Nutrient difference multiple = nutrient intake in food combination / individual nutrient requirement; Step S4.2.5: Set the difference multiples of saturated fatty acids, calcium, sugars, and fats that may cause harm to the human body due to excessive intake to be less than a1; set the difference multiples of special requirement nutrients to be greater than or equal to a2, and screen k sets of food combinations to obtain food combinations that meet the difference multiple requirements; Step S4.2.6: Calculate the number of nutrients in the food combination that meets the requirements and whose difference multiple is greater than the preset value, and sort the food combinations from large to small according to the number. If the number of nutrients in the food combination that has a difference multiple greater than the preset value is greater than a3, it is used as a recommended diet plan; Step S4.2.7: When the number of recommended diet options is greater than or equal to 1: When the number of recommended diet plans is greater than or equal to 2, the foods in all the recommended diet plans are merged; when the number of recommended diet plans is equal to 1, the foods in the recommended diet plan are obtained; The nutrients with a difference multiple smaller than the preset value in the first-ranked diet plan are taken as special-need nutrients. If there is one nutrient with a difference multiple smaller than the preset value, x foods are randomly selected from the top m foods with the nutrient content in the food-nutrient database; If there is more than one nutrient whose difference multiple is less than the preset value, the ranking of the above nutrient content of each food is added up, and the sum is sorted from small to large to obtain the top ten foods; Randomly select food from n types of food according to the selection frequency of each type of food, select at least y types of each type of food, and merge them with the above food to form a new food pool; Repeat steps S4.2.3 to S4.2.6 to obtain a new recommended diet plan; Repeat step S4.2.7 to iteratively optimize the diet plan. When the preset requirements are met, the iteration is terminated to obtain the best recommended diet plan. When the number of recommended diet plans is less than 1, steps S4.2.1 to 4.2.6 are repeatedly triggered to obtain a new recommended diet plan, and step S4.2.7 is repeatedly triggered to iteratively optimize the diet plan. When the preset requirements are met, the iteration is terminated to obtain the best recommended diet plan.
7. A personalized precise nutrition recipe recommendation system based on genetic algorithm, characterized in that: include: Module M1: Building a food-nutrient database; Module M2: Construction of nutrient-gene database; Module M3: Generate individual quantitative nutrient requirements based on personal information, dietary nutrient reference intake and gene-nutrient database; Module M4: According to the individual's quantitative nutrient needs, foods are selected and combined through genetic algorithms based on the food-nutrient database, and the combination of food types and food quantities is iteratively improved to obtain an accurate nutritional recipe that meets personalized nutritional requirements.
8. The personalized precise nutrition recipe recommendation system based on genetic algorithm according to claim 7, characterized in that: The module M1 adopts: Module M1.1: Collect data on food and its nutrient composition; Module M1.2: Classify foods into n categories based on nutritional characteristics; Module M1.3: Categorize the nutritional information of each food into m categories and standardize the data from different sources to the same units for each nutrient; Module M1.4: Sort foods according to the content of each nutrient to form food-nutrient data.
9. The personalized precise nutrition recipe recommendation system based on genetic algorithm according to claim 7, characterized in that: The module M2 adopts: Module M2.1: Obtain the standard name, CAS Type 1Name, molecular formula, MeSH ID, PubChemID, DrugBank ID, Guide-to-Pharmacology Ligand ID, CHEBI ID, ChemIDplus, and synonymous name of each nutrient; Module M2.2: Obtain genes that interact with nutrient names and IDs, as well as gene function information based on public databases and literature; Module M2.3: All gene names were standardized to approved HGNC gene symbols; Module M2.4: Obtain the relationship between gene mutations and nutrients, and label the gene mutation-nutrient relationship as absorption or excretion; Module M2.5: embed the interaction between genes and nutrients and the absorption or excretion information of gene mutation-nutrient markers into the interaction between food nutrients and genes to build a nutrient-gene interaction database; Module M2.6: Obtain SNPs located in the coding region of genes, map genes with SNPs that can cause changes in protein coding, and embed the mapping relationship into the constructed nutrient-gene interaction database to establish a nutrient-gene database; The module M3 adopts: Module M3.1: Obtain user nutritional risk information, including nutrient deficiencies, risk genes, and risk SNPs; Module M3.2: Set corresponding special need nutrients according to the deficient nutrients; according to the risk genes and risk SNPs, obtain the special need nutrients that interact with the risk genes based on the nutrient-gene database; Module M3.3: Build personalized nutrient requirements based on individual basic nutrient requirements and special nutrient requirements.
10. The personalized precise nutrition recipe recommendation system based on genetic algorithm according to claim 7, characterized in that: The module M4 adopts: Module M4.1: Set the frequency of food types in the preset food library; Module M4.2: Iteratively optimize recipes based on personalized nutrient requirements using genetic algorithms; The module M4.2 adopts: Module M4.2.1: In the food-nutrient database, randomly select x foods from the top m foods in terms of the content of special required nutrients; Module M4.2.2: Randomly select foods from n food categories according to the selection frequency of each food category, select at least y foods from each category, and merge them with x foods to form a food pool; Module M4.2.3: Randomly select at least s foods from the food pool according to the set selection frequency, repeat k times, and form k sets of initial food combinations; Module M4.2.4: Calculate the food intake, energy and various nutrient elements intake for each set of transactions, and compare them with individual nutrient requirements to obtain the nutrient difference multiples; Nutrient difference multiple = nutrient intake in food combination / individual nutrient requirement; Module M4.2.5: Set the difference multiples of saturated fatty acids, calcium, sugars, and fats that may cause harm to the human body due to excessive intake to less than a1; set the difference multiples of nutrients with special needs to be greater than or equal to a2, and screen k sets of food combinations to obtain food combinations that meet the difference multiple requirements; Module M4.2.6: Calculate the number of nutrients in the food combination that meet the requirements and whose difference multiples are greater than the preset value, and sort the food combinations from large to small according to the number. If the number of nutrients in the food combination that have a difference multiple greater than the preset value is greater than a3, it is used as a recommended diet plan; Module M4.2.7: When the number of recommended dietary options is greater than or equal to 1: When the number of recommended diet plans is greater than or equal to 2, the foods in all the recommended diet plans are merged; when the number of recommended diet plans is equal to 1, the foods in the recommended diet plan are obtained; The nutrients with a difference multiple smaller than the preset value in the first-ranked diet plan are taken as special-need nutrients. If there is one nutrient with a difference multiple smaller than the preset value, x foods are randomly selected from the top m foods with the nutrient content in the food-nutrient database; If there is more than one nutrient whose difference multiple is less than the preset value, the ranking of the above nutrient content of each food is added up, and the sum is sorted from small to large to obtain the top ten foods; Randomly select food from n types of food according to the selection frequency of each type of food, select at least y types of each type of food, and merge them with the above food to form a new food pool; Repeat the triggering of modules M4.2.3 to M4.2.6 to obtain a new recommended diet plan; Repeat the triggering of module M4.2.7 to iteratively optimize the diet plan, and when the preset requirements are met, the iteration is terminated to obtain the best recommended diet plan; When the number of recommended diet plans is less than 1, the module M4.2.1 to step 4.2.6 is repeatedly triggered to obtain a new recommended diet plan, and the module M4.2.7 is repeatedly triggered to iteratively optimize the diet plan. When the preset requirements are met, the iteration is terminated to obtain the best recommended diet plan.
Citation Information
Patent Citations
Genetic algorithm-based recipe recommendation method and device for grouping, combining and optimizing
CN116959667A
Cited By
Nutritional diet management system and method
CN120432091A
Artificial intelligence-driven customized dietary nutrient supplement scheme generation method
CN121215180A