Diet recommendation method based on double-layer game model
By constructing a dietary recommendation method based on a two-layer game model, combining public health and individual needs, an optimal balance of dietary plans is achieved, which resolves the contradiction between public health and individual needs in the traditional model and improves the feasibility and rationality of dietary planning.
Patent Information
- Application Number
- CN202510868877.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-09-23
AI Technical Summary
Existing dietary recommendation plans are difficult to achieve the best balance between public health orientation and individual characteristics needs, and the traditional single-layer model cannot take into account both group health goals and individual interests.
A dietary recommendation method based on a two-level game model is constructed. Through nested upper and lower level objective functions and constraints, public health benefits are maximized and individual dietary costs are minimized, forming a two-way feedback system at the policy level and the individual level.
It achieves the Pareto optimal balance between public health goals and individual needs, improves the feasibility of dietary planning programs and the rationality of individual dietary choices, and avoids excessive standardization or personalization that deviates from health goals.
Smart Images

Figure CN120690384A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of health management information technology, and in particular relates to a diet recommendation method based on a double-layer game model. Background Art
[0002] In the field of global health management, scientific and reasonable dietary planning is an important means to prevent chronic diseases and improve public health. Current mainstream dietary recommendation programs are mainly divided into two categories: one is public health policies based on nutritional guidelines, such as the dietary pyramid and nutrient intake standards issued by various countries. Their core goal is to improve the health level of the group through unified nutritional standards, but there is a problem of insufficient consideration of personalized needs such as individual eating habits and economic costs; the other is individual dietary recommendation systems, which are mostly based on user-entered physiological indicators, dietary preferences and other data to optimize recommendations. However, such programs often lack effective connection with public health policies, which may lead to conflicts between individual dietary choices and group health goals.
[0003] Existing technologies exist, with significant hierarchical differences and conflicting objectives, between public health policies and individual dietary decisions: while the policy level focuses on balanced group nutrition and maximizing health benefits, the individual level prioritizes dietary cost control and satisfying personal preferences. Traditional single-layer models struggle to establish a dynamic coordination mechanism between the two. Consequently, recommendations are either overly standardized and detached from individual needs, or overly personalized, deviating from public health goals. This fails to achieve an optimal balance between overall societal welfare and individual interests.
[0004] With the increasing demand for precise health management, how to model the interaction between policy and individual strategies under the constraints of nutritional guidelines to form dietary recommendation plans that are both in line with public health orientation and meet individual characteristics has become a technical problem that needs to be solved urgently in this field. Summary of the Invention
[0005] The purpose of the present invention is to provide a diet recommendation method based on a two-layer game model. By constructing a nested structure of upper and lower objective functions and constraints, it overcomes the technical problem that the existing technology is difficult to take into account both public health orientation and individual user characteristics.
[0006] The dietary recommendation method based on the two-layer game model comprises the following steps:
[0007] S1. Collect data related to healthy eating. This step collects nutritional intake standards for different types of people, as well as dietary habits data for different types of people.
[0008] S2. Construct a two-level game model for dietary recommendations. The two-level game model includes an upper-level model that maximizes public health benefits and a lower-level model that meets individual dietary needs.
[0009] S3. Solve the two-layer game model. After the two-layer model is constructed, it is necessary to alternately iteratively solve the upper and lower models to obtain the diet recommendation strategy, and recommend the optimal solution as the optimal diet recommendation plan to the user.
[0010] Preferably, step S2 specifically includes:
[0011] S2.1. Construct a top-level model. The goal of the top-level model is to maximize public health benefits.
[0012] S2.2. Construct the lower-level model. The goal of the lower-level model is to minimize the diet cost.
[0013] S2.3. Based on the above model, the model results of the two-layer game structure are completed. The expression of the model results is as follows:
[0014]
[0015] Wherein, i represents the individual index and i={1,2,...,I}, I is the maximum value of the individual index, j represents the nutrient index and j={1,2,...,J}, J is the maximum value of the nutrient index, k represents the food index and k={1,2,...,K}, K is the maximum value of the food index; The upper-level developer recommends nutrient j for individual i. It represents the recommended energy intake for an individual i. It represents the arrangement of nutrient j by individual i according to his own needs. represents the energy intake arrangement of individual i according to his own needs, v i,k represents the amount of food k consumed by individual i; is the upper objective function, is the lower layer objective function, is the upper constraint, The lower constraint.
[0016] Preferably, in step S2.1, the objective function expression of the upper model is:
[0017]
[0018] Preferably, in step S2.1, the constraints of the upper model include:
[0019] 1) Nutrient upper and lower bound constraints, expressed as: in, represents the recommended minimum intake of nutrient j for individual i, represents the recommended maximum intake of nutrient j for individual i;
[0020] 2) The upper and lower bounds of the intake energy are expressed as: in, represents the recommended minimum energy intake for individual i, Represents the recommended maximum energy intake for individual i.
[0021] Preferably, in step S2.2, the objective function expression of the lower layer model is:
[0022]
[0023] Among them, c k The price of food k.
[0024] Preferably, in step S2.2, the constraints of the lower model include:
[0025] 1) Nutritional health standard constraints, the expression includes: Among them, a k,j is the amount of nutrient j contained in unit food k, e k is the energy contained in unit food k;
[0026] 2) Food exclusion constraint, expressed as: in, represents the food that individual i does not eat;
[0027] 3) Minimum food group intake constraints, the expression includes: Among them, K veg Represents vegetable food, K meat Represents meat food, K rice Represents grain-based foods; The minimum intake of vegetable food. The minimum intake of meat food, The minimum intake of cereal foods;
[0028] 4) Intake non-negative constraint, the expression is: v i,k ≥0, meaning the food intake was at least 0;
[0029] 5) Nutritional and energy equivalence constraints, including the following expressions:
[0030] Preferably, step S3 specifically includes:
[0031] S3.1. Solve the upper model and directly call the solver to solve the upper model to obtain the policy recommendation solution U k , k is the number of iterations;
[0032] S2.2. Solve the lower model. By calling the solver, the dietary recommendation plan D for each representative individual in the lower layer can be obtained. k , k is the number of iterations;
[0033] S2.3. Determine the optimal solution. When the upper target value of the upper model and the lower target value of the lower model converge and are less than the set threshold, the current solution is the optimal solution.
[0034] Preferably, step S3.1 specifically includes: wherein the variables in the upper model unknown, and the variables of the underlying model and v i,k It is known that when the upper model is first solved, k = 1. At this time, let the variables in the lower model be v i,k =0, and the solution passed from the previous lower model is directly used in the solution of the upper model.
[0035] Preferably, step S3.2 specifically includes: the variables of the lower model and v i,k is unknown, the variables of the upper model and It is known and included in the dietary recommendation plan of the policy layer passed from the upper layer. During the initial judgment, the judgment process of the optimal plan is skipped and the dietary recommendation plan of the lower-level individuals is directly passed to the upper-level model.
[0036] Preferably, step S3.3 specifically includes: when determining the optimal solution, it is necessary to calculate: the absolute difference between the upper target value of the current solution and the previous solution |F(U k ,D k )-F(U k-1 ,D k-1 )|; The absolute difference between the lower target value of the current solution and the previous solution|f(U k ,D k )-f(U k-1 ,D k-1 )|; Determine whether the two absolute differences corresponding to the upper target value and the lower target value are both less than the given threshold ξ; if the two absolute differences are both less than ξ, the calculation is completed and the recommendation is made to the user; otherwise, the dietary recommendation plan for the lower individual is directly passed to the upper model, and the iteration is continued, and the number of iterations is +1.
[0037] The advantages of the present invention are as follows: the two-layer game model proposed in the present invention constructs a nested structure of upper and lower objective functions and constraints. The upper model is the policy layer, which takes nutritional guidelines as constraints, generates scientific nutritional recommendation standards by maximizing public health benefits, and provides a top-level design for group health goals; the lower model is the individual layer, which takes minimizing dietary costs as the goal, and dynamically adjusts food choices and intake within the nutritional standards set by the policy layer. At the same time, a two-way constraint feedback system is constructed for the policy layer and the individual layer: the upper policy standards provide rigid nutritional boundaries (such as upper and lower limits of essential nutrients, etc.) for the decisions of the lower individuals, to prevent individual dietary choices from deviating from basic health requirements; the dietary habit data of the lower individuals (such as high-frequency food intake types, acceptable cost ranges, etc.) are reversely input into the policy layer optimization model to make the nutritional recommendation standards more in line with the real population behavior characteristics; in this way, both public health orientation and individual user characteristics and needs can be taken into account.
[0038] This hierarchical mechanism not only retains the guiding role of public policies on group health, but also gives individual autonomy in dietary decision-making. Through the coupled iteration and two-way constraint feedback of the upper and lower level objective functions, it achieves the Pareto optimal equilibrium of "maximizing public health" and "minimizing individual dietary costs", solving the technical difficulties of the separation of public goals and individual needs in the traditional single-layer model, significantly improving the feasibility of dietary planning schemes, avoiding the problem of difficult implementation of "idealized standards", and preventing the accumulation of health risks of individual dietary decisions. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 The figure is a flow chart of a diet recommendation method based on a double-layer game model according to the present invention. DETAILED DESCRIPTION
[0040] The specific implementation methods of the present invention will be further explained in detail below through the description of embodiments with reference to the accompanying drawings, so as to help those skilled in the art to have a more complete, accurate and in-depth understanding of the inventive concept and technical solution of the present invention.
[0041] like Figure 1 As shown, the present invention provides a diet recommendation method based on a double-layer game model, comprising the following steps.
[0042] S1. Collect data related to healthy eating.
[0043] This step collects nutritional intake standards for different population groups (e.g., different age groups, different genders), as well as dietary habits. Nutritional intake standards are generally based on publicly available nutrition standards, guidelines, and other policy documents. Dietary habits refer to food and nutritional intake preferences, such as the intake of different types of food and nutrients by different individuals, and the cost of different foods by different individuals.
[0044] S2. Construct a two-level game model for dietary recommendations. The two-level game model includes an upper-level model that maximizes public health benefits and a lower-level model that meets individual dietary needs.
[0045] This step specifically includes:
[0046] S2.1. Construct an upper-level model. The goal of the upper-level model is to maximize public health benefits. Its objective function expression is:
[0047]
[0048] Where F represents the objective function of the upper model, i represents the individual index and i = {1, 2, ..., I}, I is the maximum value of the individual index, j represents the nutrient index and j = {1, 2, ..., J}, J is the maximum value of the nutrient index, k represents the food index and k = {1, 2, ..., K}, K is the maximum value of the food index; The upper-level developer recommends nutrient j for individual i. It represents the recommended energy intake for an individual i. It represents the arrangement of nutrient j by individual i according to his own needs. represents the energy intake arrangement of individual i according to his own needs, v i,k represents the amount of food k consumed by individual i.
[0049] The constraints of the upper model include:
[0050] 1) Nutrient upper and lower bound constraints, expressed as: in, represents the recommended minimum intake of nutrient j for individual i, represents the recommended maximum intake of nutrient j for individual i.
[0051] 2) The upper and lower bounds of the intake energy are expressed as: in, represents the recommended minimum energy intake for individual i, Represents the recommended maximum energy intake for individual i.
[0052] S2.2. Construct the lower-level model. The goal of the upper-level model is to minimize the diet cost. Its objective function expression is:
[0053]
[0054] Among them, f represents the objective function of the lower model, c k The price of food k.
[0055] The constraints of the underlying model include:
[0056] 1) Nutritional health standard constraints, the expression includes: Among them, a k,j is the amount of nutrient j contained in unit food k, e k It is the energy contained in unit food k.
[0057] 2) Food exclusion constraint, expressed as: in, represents the food that individual i does not eat.
[0058] 3) Minimum food group intake constraints, the expression includes: Among them, K veg Represents vegetable food, K meat Represents meat food, K rice Represents grain-based foods; The minimum intake of vegetable food. The minimum intake of meat food, This is the minimum intake of grain foods.
[0059] 4) Intake non-negative constraint, the expression is: v i,k ≥0, that is, the food intake is at least 0.
[0060] 5) Nutritional and energy equivalence constraints, including the following expressions:
[0061] S2.3. Complete the model results of the two-layer game structure based on the above model.
[0062] The expression of the model result is as follows:
[0063]
[0064] in, is the upper-level objective function, which aims to maximize public health benefits. is the lower objective function, which aims to minimize the cost of diet. These are upper-level constraints, including upper and lower bounds on nutrients and upper and lower bounds on energy intake. The lower-level constraints include food nutritional standard constraints, food exclusion constraints, food group minimum intake constraints, intake non-negativity constraints, and nutrition and energy equivalence constraints.
[0065] S3. Solve the two-layer game model. After the two-layer model is constructed, it is necessary to alternately iteratively solve the upper and lower models to obtain the diet recommendation strategy. The process of this step includes:
[0066] S3.1. Solve the upper model: Solve the upper model, where the variables in the upper model unknown, and the variables of the underlying model and v i,k As is known, directly call the solver (such as SCIP) to solve the upper model to obtain the policy recommendation solution U k , k is the number of iterations. It should be noted that when the upper model is first solved, k = 1. At this time, let the variables in the lower model be v i,k = 0, and the upper-level model directly uses the solution passed from the lower-level model (i.e., the dietary recommendation plan for the lower-level individuals). After solving the upper-level model, the policy-level dietary recommendation plan is obtained, which needs to be passed to the lower-level model.
[0067] S3.2. Solve the lower model: Solve the lower model, where the variables of the lower model and v i,k is unknown, the variables of the upper model and It is known and included in the diet recommendation plan of the policy layer passed from the upper layer. By calling the solver, the diet recommendation plan D of each representative individual in the lower layer can be obtained. k , k is the number of iterations. During the initial judgment, the optimal solution is skipped and the dietary recommendation plan of the lower-level individual is directly passed to the upper-level model.
[0068] S3.3, Determine the optimal solution: In addition to the initial calculation, it is necessary to determine the optimal solution. When determining the optimal solution, it is necessary to calculate: the absolute difference between the upper target value of the current solution and the previous solution |F(U k ,D k )-F(U k-1 ,D k-1 )|; The absolute difference between the lower target value of the current solution and the previous solution|f(U k ,D k )-f(U k-1 ,D k-1)|; Determine whether the absolute differences between the upper and lower target values are both less than a given threshold ξ, typically set to 0.0001. If both absolute differences are less than ξ, the optimal diet recommendation has been found, the calculation is complete, and it is recommended to the user. Otherwise, the diet recommendation for the lower-level individual is directly passed to the upper-level model, and the iteration continues, with the number of iterations increased by 1.
[0069] The present invention is described above by way of example in conjunction with the accompanying drawings. It is obvious that the specific implementation of the present invention is not limited to the above-mentioned method. As long as various non-substantial improvements are made using the inventive concept and technical solution of the present invention, or the inventive concept and technical solution are directly applied to other occasions without improvement, they are all within the scope of protection of the present invention.
Claims
1. A diet recommendation method based on a two-layer game model, characterized by: The following steps are involved: S1. Collect data related to healthy eating. This step collects nutritional intake standards for different types of people, as well as dietary habits data for different types of people. S2. Construct a two-level game model for dietary recommendations. The two-level game model includes an upper-level model that maximizes public health benefits and a lower-level model that meets individual dietary needs. S3. Solve the two-layer game model. After the two-layer model is constructed, it is necessary to alternately iteratively solve the upper and lower models to obtain the diet recommendation strategy, and recommend the optimal solution as the optimal diet recommendation plan to the user.
2. The diet recommendation method based on a two-layer game model according to claim 1, characterized in that: Step S2 specifically includes: S2.
1. Construct a top-level model. The goal of the top-level model is to maximize public health benefits. S2.
2. Construct the lower-level model. The goal of the lower-level model is to minimize the diet cost. S2.
3. Based on the above model, the model results of the two-layer game structure are completed. The expression of the model results is as follows: Wherein, i represents the individual index and i={1,2,...,I}, I is the maximum value of the individual index, j represents the nutrient index and j={1,2,...,J}, J is the maximum value of the nutrient index, k represents the food index and k={1,2,...,K}, K is the maximum value of the food index; The upper-level developer recommends nutrient j for individual i. It represents the recommended energy intake for an individual i. It represents the arrangement of nutrient j by individual i according to his own needs. represents the energy intake arrangement of individual i according to his own needs, v i,k represents the amount of food k consumed by individual i; is the upper objective function, is the lower layer objective function, is the upper constraint, The lower constraint.
3. The diet recommendation method based on a two-layer game model according to claim 2, characterized in that: In step S2.1, the objective function expression of the upper model is:
4. The diet recommendation method based on a two-layer game model according to claim 2, characterized in that: In step S2.1, the constraints of the upper model include: 1) Nutrient upper and lower bound constraints, expressed as: in, represents the recommended minimum intake of nutrient j for individual i, represents the recommended maximum intake of nutrient j for individual i; 2) The upper and lower bounds of the intake energy are expressed as: in, represents the recommended minimum energy intake for individual i, Represents the recommended maximum energy intake for individual i.
5. The diet recommendation method based on a two-layer game model according to claim 2, characterized in that: In step S2.2, the objective function expression of the lower model is: Among them, c k The price of food k.
6. The diet recommendation method based on a two-layer game model according to claim 2, characterized in that: In step S2.2, the constraints of the lower model include: 1) Nutritional health standard constraints, the expression includes: Among them, a k,j is the amount of nutrient j contained in unit food k, e k is the energy contained in unit food k; 2) Food exclusion constraint, expressed as: v i,k∈K =0, where represents the food that individual i does not eat; 3) Minimum food group intake constraints, the expression includes: Among them, K veg Represents vegetable food, K meat Represents meat food, K rice Represents grain-based foods; The minimum intake of vegetable food. The minimum intake of meat food, The minimum intake of cereal foods; 4) Intake non-negative constraint, the expression is: v i,k ≥0, meaning the food intake was at least 0; 5) Nutritional and energy equivalence constraints, including the following expressions:
7. The diet recommendation method based on a two-layer game model according to claim 1, characterized in that: Step S3 specifically includes: S3.
1. Solve the upper model and directly call the solver to solve the upper model to obtain the policy recommendation solution U k , k is the number of iterations; S2.
2. Solve the lower model. By calling the solver, the dietary recommendation plan D for each representative individual in the lower layer can be obtained. k , k is the number of iterations; S2.
3. Determine the optimal solution. When the upper target value of the upper model and the lower target value of the lower model converge and are less than the set threshold, the current solution is the optimal solution.
8. The diet recommendation method based on a two-layer game model according to claim 7, characterized in that: Step S3.1 specifically includes: the variables in the upper model unknown, and the variables of the underlying model and v i,k It is known that when the upper model is first solved, k = 1. At this time, let the variables in the lower model be v i,k =0, and the solution passed from the previous lower model is directly used in the solution of the upper model.
9. The diet recommendation method based on a two-layer game model according to claim 7, characterized in that: Step S3.2 specifically includes: the variables of the lower model and v i,k is unknown, the variables of the upper model and It is known and included in the dietary recommendation plan of the policy layer passed from the upper layer. During the initial judgment, the judgment process of the optimal plan is skipped and the dietary recommendation plan of the lower-level individuals is directly passed to the upper-level model.
10. The diet recommendation method based on a two-layer game model according to claim 7, characterized in that: Step S3.3 specifically includes: when determining the optimal solution, it is necessary to calculate: the absolute difference between the upper target value of the current solution and the previous solution |F(U k ,D k )-F(U k-1 ,D k-1 )|; The absolute difference between the lower target value of the current solution and the previous solution|f(U k ,D k )-f(U k-1 ,D k-1 )|; Determine whether the two absolute differences corresponding to the upper target value and the lower target value are both less than the given threshold ξ; if the two absolute differences are both less than ξ, the calculation is completed and the recommendation is made to the user; otherwise, the dietary recommendation plan for the lower individual is directly passed to the upper model, and the iteration is continued, and the number of iterations is +1.