Personalized diet and exercise combined recommendation method based on dynamic multi-objective optimization

Through the dynamic multi-objective optimization of personalized dietary exercise joint recommendation method, the static and isolation problems of nutrition and exercise goals in the existing system are solved, and a personalized and safe diet and exercise plan is achieved, ensuring energy balance and physiological synergy, and improving the safety and accuracy of recommendations.

CN120452691APending Publication Date: 2025-08-08DALIAN NEUSOFT UNIV OF INFORMATION
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510567445.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing health recommendation system cannot dynamically adjust nutrition and exercise goals according to the user's real-time status, resulting in waste of resources and potential risks. Diet and exercise recommendations are independent of each other, ignoring the energy balance and physiological synergy effects, which poses safety risks.

Method used

A joint recommendation method for personalized dietary exercise based on dynamic multi-objective optimization is adopted. By acquiring the user's multi-objective set, the activation target set is constructed, nutrients and exercise weights are obtained, and personalized diet and exercise plans are generated using the improved NSGA-II algorithm and a mixed fitness evaluation model, and the recommendation strategy is dynamically adjusted through medical safety-oriented cross-mutation operations.

Benefits of technology

The safety improvement of personalized dietary exercise joint recommendations has been achieved, and the immediate compliance of nutrition and exercise goals has been achieved, which avoids resource waste and metabolic disorders in traditional solutions, and improves the accuracy and safety of recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120452691A_ABST
    Figure CN120452691A_ABST
Patent Text Reader

Abstract

The invention discloses a personalized diet and exercise combined recommendation method based on dynamic multi-objective optimization. The method comprises the following steps: acquiring a user multi-objective set; constructing a dynamically activated user target set according to the user multi-target set; on the basis of a user health file, according to the activated nutrient target set and the activated motion target set, respectively obtaining a nutrient weight and a motion weight; according to the nutrient weight and the exercise weight, obtaining an initial recommendation scheme of personalized diet and exercise joint recommendation of a plurality of groups of users; based on an improved NSGA-II algorithm, obtaining an optimal recommendation scheme according to the initial recommendation scheme; feedback data of the optimal recommendation scheme executed by the user is obtained, and the balance coefficient of the recommendation strategy is adjusted according to the activated biochemical index target set. The problems that according to an existing health recommendation system or method, dynamic adjustment cannot be conducted according to the real-time state of a user, resource waste and potential risks are caused, diet recommendation and exercise recommendation of a traditional health management recommendation system are mutually independent, the energy balance and the physiological synergistic effect are ignored, and the safety risk is high are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intersectional technology of artificial intelligence and health management, and in particular to a personalized diet and exercise joint recommendation method based on dynamic multi-objective optimization. Background Art

[0002] Currently, diet is one of the most important aspects of people's lives. With the development and popularization of the internet, a number of recipe websites and applications have emerged that provide recipe information. However, these websites and applications only contain fixed entry information for each dish and provide keyword-based search functions. Without a deep connection between dynamics and nutrition, machines have difficulty understanding and processing the semantic knowledge related to these recipes, and cannot provide good human-computer interaction functions, resulting in people being unable to efficiently obtain and utilize recipe knowledge. Current mainstream technical solutions for user health management recommendations include static multi-objective optimization methods, isolated recommendation systems, and rule-based engine-driven solutions. Static multi-objective optimization methods, such as the NSGA-II-based diet recommendation system, generate solutions based on fixed nutritional targets (such as protein and fat) but cannot dynamically adjust the target set based on the user's real-time status. Isolated recommendation systems operate independently through diet and exercise recommendation modules, such as MyFitness Pal, which only provides calorie calculations and does not consider energy balance and physiological synergies. Rule-based engine-driven solutions generate recommendations based on if-then medical rules (such as a low-sugar diet for diabetics), but rely on expert experience and have difficulty handling multiple conflicting objectives.

[0003] Existing health recommendation systems or methods have the following defects:

[0004] Static goals: Nutrition and exercise goals are fixed and cannot be dynamically adjusted based on the user's real-time status (such as disease contraindications and food / exercise attributes). Furthermore, irrelevant goals cannot be dynamically excluded (such as optimizing dairy intake for lactose-intolerant users), resulting in wasted resources and potential risks.

[0005] Isolated optimization: Traditional health management recommendation systems make independent recommendations for diet and exercise, ignoring energy balance and physiological synergy.

[0006] Safety risks: Existing evolutionary algorithms lack a mechanism for embedding medical constraints, and may generate solutions that violate contraindications, which means there is a risk of recommending unsafe solutions (such as a high-sodium diet for hypertensive patients). Summary of the Invention

[0007] The present invention provides a personalized diet and exercise joint recommendation method based on dynamic multi-objective optimization to overcome the above technical problems.

[0008] In order to achieve the above object, the technical solution of the present invention is:

[0009] A personalized diet and exercise joint recommendation method based on dynamic multi-objective optimization, specifically comprising the following steps:

[0010] S1: Obtain user multi-goal set for personalized diet and exercise joint recommendation;

[0011] The user multi-target set includes user health records, nutrient preference data, and exercise preference data;

[0012] S2: Based on the constructed goal activation strategy, obtain a user activation goal set according to the user's multi-goal set; the goal activation strategy includes a nutrient activation strategy, a biochemical indicator activation strategy, and an exercise activation strategy; the user goal set includes an activated nutrient goal set, an activated biochemical indicator goal set, and an activated exercise goal set;

[0013] S3: Based on the user's health profile, according to the activated nutrient target set and the activated exercise target set, respectively obtain the nutrient weight that introduces the balance coefficient of the user's exercise preference and health factors and the exercise weight that introduces the balance coefficient of the user's exercise preference and exercise safety;

[0014] The nutrient weight is used to characterize the entity connection relationship between the disease and the nutrient in the disease-nutrient relationship knowledge graph;

[0015] The exercise weight is used to represent the entity connection relationship between the disease and the exercise type in the disease-exercise relationship knowledge graph;

[0016] S4: Based on the nutrient weights and exercise weights, an initial recommendation plan for personalized diet and exercise recommendations for several groups of users is obtained;

[0017] The initial recommended plan includes an initial recommended diet plan and an initial recommended exercise plan for the user for one week;

[0018] S5: Construct a hybrid fitness evaluation model;

[0019] And the hybrid fitness evaluation model includes multi-objective vector functions and energy deviation constraints;

[0020] Based on the improved NSGA-II algorithm and combined with the hybrid fitness evaluation model, the optimal recommendation scheme is obtained based on the initial recommendation scheme;

[0021] S6: Obtain feedback data on the user's execution of the optimal recommendation plan, adjust the balance coefficient of the recommendation strategy according to the activated biochemical indicator target set, and repeat steps S4 to S5.

[0022] Furthermore, the S2 specifically includes the following steps:

[0023] S21: Based on the nutrient activation strategy, the activated nutrient target set is obtained according to the user's health profile and nutrient preference data;

[0024] And the expression of nutrient activation strategy is

[0025] T diet ={j|F ij ≠0∧p j =1}

[0026] Where: T diet represents the activated nutrient target set; p represents the nutrient preference data; j represents the nutrient type; p j represents the user's preference labeling decision variable for nutrient type j, and p j =1 means the user needs this nutrient, otherwise p j =0 means ignoring the nutrient; F ij represents the content of nutrient j in food i;

[0027] S22: Based on the biochemical indicator activation strategy, the activation biochemical indicator target set is obtained according to the user's health record;

[0028] And the expression of biochemical indicator activation strategy is

[0029] T bio ={k|k∈Indicator m (C)}

[0030] Where: T bio Indicates activation of biochemical indicator target set; Indicator m (C) represents the mth set of key biochemical indicators of disease C; k represents the key biochemical indicator;

[0031] S23: Based on the exercise activation strategy, obtain the activated exercise target set according to the user's health profile and exercise preference data;

[0032] And the expression of motion activation strategy is

[0033] T exercise ={m|E m强度 ≤I max (C)∧q m =1}

[0034] Where: T exercise Indicates the activated motion target set; E m强度 Indicates the intensity level of exercise type m; I max (C) represents the maximum exercise intensity threshold allowed by the user's health status; C represents the disease type; q m represents the user's preference labeling decision variable for sport type m, and q m=1 means accepting the movement; q m =0 means rejecting the movement.

[0035] Furthermore, the S3 specifically includes the following steps:

[0036] S31: Based on the user's health profile, the nutrient weights are obtained and constructed according to the activated nutrient target set, which introduces the balance coefficient of the user's exercise preference and health factors;

[0037] The nutrient weight is used to characterize the entity connection relationship between the disease and the nutrient in the disease-nutrient relationship knowledge graph;

[0038] The formula for obtaining nutrient weight is

[0039]

[0040] Where: w j represents the dietary weight of nutrient j; λ represents the balance coefficient between user exercise preference and health factors, λ∈[0,1], and when λ→1, it means that the dietary weight is determined by user preference p j When λ→0, it means that the dietary weight is determined by the medical experience rule leading; represents the decision-making amount of whether nutrients need to be supplemented given the user's health profile and index j, and Indicates that the user needs to supplement nutrient j; otherwise, Indicates that the user needs to limit the supplementation of nutrients j;

[0041] S32: Based on the user's health profile, an exercise weight is constructed according to the activated exercise goal set, which introduces the user's exercise preference and exercise safety balance coefficient;

[0042] The exercise weight is used to represent the entity connection relationship between the disease and the exercise type in the disease-exercise relationship knowledge graph;

[0043] And the formula for obtaining motion weight is

[0044]

[0045] Where: v m represents the weight of the exercise type m; μ represents the balance coefficient between the user's exercise preference and exercise safety, μ∈[0,1]; and when μ→1, it means that the exercise weight is determined by the user's preference q m Dominant; when μ→0, it means that the motion weight is determined by the medical safety experience rule Decide; represents a safety scoring function for exercise type m based on health state C; and Indicates that the user is encouraged to do exercise type m; otherwise, Indicates that the user needs to be restricted from exercising type m.

[0046] Furthermore, the S4 specifically includes the following steps:

[0047] S41: Define the user's personalized diet plan x diet ,and

[0048]

[0049] Among them, x n,d,m,i Indicates the proportion of ingredient i in group n, day d, meal m;

[0050] S42: Based on planned diet plan x diet , according to the activated nutrient target set T diet Filter and obtain a set of candidate ingredients corresponding to nutrients ;

[0051] And the candidate food collection The screening formula is

[0052]

[0053] Where: fi represents the candidate food corresponding to nutrient j;

[0054] S43: Based on candidate food collection , according to the content F of nutrient j in food i i,j With nutrient weight w j , calculate and obtain the weighted attractiveness score of each candidate ingredient;

[0055] And the expression of weighted attractiveness score is

[0056]

[0057] Where: Score i represents the weighted attractiveness score of food i; t j represents the daily target amount of nutrient j;

[0058] S44: Normalize the weighted attractiveness score to the probability distribution p of the candidate food, where p=(p1, p2, ..., p n ), whose expression is

[0059] p i =softmax(Score i )

[0060] Where: p i represents the selection probability of the i-th candidate food and i∈n;

[0061] And under the given probability distribution p descending order list, the first k candidate foods in the probability distribution p descending order list are selected based on the roulette wheel selection method, and then the initial recommended diet plan x of the user's personalized diet is obtained. diet ;

[0062] And the expression for obtaining the first k candidate foods is

[0063] x n,d,m,i ~Dirichlet(α1, α2, α3)

[0064] S45: Based on the initial recommended diet plan x diet , obtain the user's personalized exercise plan x that meets the energy balance constraint exercise , and then we can get the initial recommendation plan of personalized diet and exercise for several groups of users;

[0065] User-personalized exercise planx exercise The methods for obtaining , specifically include:

[0066] S451: Define the user's personalized exercise plan x exercise ,and

[0067]

[0068] Among them, y n,d,Q,m It represents the time proportion of m types of exercise in the nth group, the dth day, the Qth time;

[0069] S452: Based on the plan of exercise program x exercise , according to the activation motion target set T exercise With exercise weight v m Obtain weighted scores for each candidate sport type;

[0070] And the expression of the weighted score of the candidate motion type is

[0071]

[0072] Where: Score m represents the weighted score of the candidate motion type m; BaseCalorie represents the variable that satisfies the energy balance constraint, and ΔE represents the energy balance constraint i.e. ΔE = total intake - total expenditure; represents the intake x of food i i Calories in CalorieBurn m represents the calories consumed per minute by the candidate exercise type m; x i represents the proportion of food i in the diet plan;

[0073] S453: normalizing the weighted scores of the candidate motion types into a motion probability distribution of the candidate motions; and obtaining motion time distribution according to the motion probability distribution;

[0074] And the expression of motion time distribution is

[0075] e m =P m ·T max

[0076] p m =softmax(Score m )

[0077]

[0078] Where: e m represents the weekly exercise allocation time of the mth candidate exercise and e m ≥0; P m represents the probability of the mth candidate motion; T max Indicates the maximum exercise duration that the user can tolerate;

[0079] S454: Based on the exercise allocation time, several groups of user-personalized exercise initial recommended exercise plans x that meet energy balance constraints can be obtained. exercise .

[0080] Furthermore, the S5 specifically includes the following steps:

[0081] S51: Based on nutrient weights and exercise weights, a hybrid fitness evaluation model of the improved NSGA-II algorithm is constructed;

[0082] And the hybrid fitness evaluation model includes the multi-objective vector function F(X) and the energy deviation constraint ΔE, which is expressed as

[0083] F(X)=|f diet (X), f exercise (X)|

[0084]

[0085] Where: F(X) represents the multi-objective vector function; f diet (X) represents the dietary fitness function; f exercise represents the exercise fitness function; Cal m Indicates the calories burned per minute for exercise type m; t cal represents the weekly metabolic gap target, and t cal =0.1·BMR·7, BMR stands for basal metabolic rate; represents total intake; Indicates total consumption;

[0086] S52: Define the population P0 and maximum number of iterations T of the NSGA-II algorithm max And the initial recommendation scheme of the user's personalized diet and exercise joint recommendation is used as the population individual X i , whose expression is

[0087] P0={X1,X2,...,X a , X b ,...,X N}

[0088] X i =[x diet , x exercise ]

[0089] S53: Based on the multi-objective vector function and the energy deviation constraint ΔE, a global dominance condition for obtaining the non-dominated sorting generation frontier set is constructed, which includes

[0090]

[0091] f diet (X a )≤f diet (X b )and

[0092]

[0093] Where: X a < diet X b represents the population individual X a Dominate the population individual X on the diet goal b ;X a < exercise Xb represents the population individual X a Dominate the population individual X on the moving target b ; ΔE(X a )≤ΔE(X b ) represents the population individual X a The better the difference between total energy intake and expenditure, the closer it is to the energy balance target;

[0094] S54: Initialize the population P0 according to the global dominance condition:

[0095] And initialization operation: Get population individual X a The number of individuals in the dominated population n(Xa);

[0096] Get population individual X a The dominating set S(Xa ), if the population individual X b As a dominated individual in the population, the population individual X b The number of individuals in the dominated population is defined as;

[0097] Screen the population individuals that satisfy ΔE≤∈ and obtain the feasible solution set P feasible , where ∈ represents the preset energy balance threshold;

[0098] S55: According to the population P0 after the initialization operation, obtain the population individual X a The non-dominated sorting generates the frontier set {F1, F2, ...}, and the frontier set is the Pareto frontier set;

[0099] Specifically include:

[0100] S551: Get population individual X a The first frontier layer F1 is represented by

[0101] F1={X a ∈P feasible |n(Xa)=0}

[0102]

[0103] S552: For the current frontier layer F k The population individual X in a , traverse its dominating set S(X a ) and randomly assign individuals X b The number of individuals in the dominated population n(X b ) minus 1, and obtain the new population, the frontier layer F k Candidate set of

[0104] Until the number of individuals in the dominated population n(X b ) is 0;

[0105] Then the population individual X b As the candidate set H for the next frontier layer, we can obtain the k+1th frontier layer F k+1 , and the frontier layer F k+1 Expressed as

[0106] F k+1 ={X b ∈H|ΔE(X b )≤∈}

[0107] Then obtain information about individual X in the population i The non-dominated sorting generates the frontier set {F1, F2, ...};

[0108] S56: Obtain the frontier layer F in the frontier set generated by non-dominated sortingk The individual crowding degree of the population that satisfies the energy deviation constraint ΔE;

[0109] And the method to obtain the individual crowding degree of the population is

[0110] S561: According to the multi-objective vector function, the normalized objective function values of the individuals in each frontier layer of the non-dominated sorting generation frontier set are obtained respectively. Its expression is

[0111]

[0112] Where: represents the minimum value of the diet fitness or exercise fitness function; Indicates the maximum value of the diet fitness or exercise fitness function;

[0113] S562: And according to the normalized objective function value Sort the population individuals in each frontier layer in ascending order to obtain a population individual sequence list;

[0114] And based on the population individual sequence table, the crowding degree of the population individuals in the frontier layer is obtained, and the crowding degree CD(X a ) is expressed as

[0115]

[0116] Where: Indicates the population individual sequence list and the population individual X a Normalized objective function values of adjacent population individuals;

[0117] S57: According to the crowding degree of the population individuals, obtain the population individuals in each frontier layer that satisfy ΔE≤∈ and have the largest crowding degree of the population individuals, and use them as elite individuals;

[0118] And the formula for obtaining elite individuals is

[0119]

[0120] Where: P elite Represents elite individuals; N elite represents the number of elite individuals; and N elite = P represents the number of parent populations in the current frontier layer;

[0121] S58: Merge except elite individuals P elite The remaining non-elite individuals are used to obtain the non-elite individual population;

[0122] And the merging method of non-elite individuals is

[0123] S581: Generate a frontier set according to the non-dominated sorting and perform hierarchical sorting on each frontier layer, i.e., F1>F2>...;

[0124] S582: After the hierarchical sorting, the non-elite individuals in each frontier layer are sorted in descending order of crowding to obtain the non-elite individual population P rest ;

[0125] S59: Use the binary tournament selection method to select individuals from the non-elite individual population, obtain the optimal population individuals and use them as the parent population individuals, specifically including:

[0126] From the non-elite individual population P rest Randomly select two individuals X from the population a , X b ∈P rest ;

[0127] And based on the priority selection strategy, obtain the population individual X a , X b The preferred population individuals;

[0128] And the expression of the priority selection strategy is

[0129]

[0130] Where: X parent represents the preferred population individual; Indicates the selection of population individual X a , X b The population individual with a better frontier level in parent ; represents the population individual X a , X b When the frontier levels are the same, the population individual with smaller crowding degree is selected as the preferred population individual X parent ;

[0131] S60: Through a medical safety-oriented crossover operation, crossover mutation is performed on the parent population individuals of S59 to obtain the offspring population individuals;

[0132] The medical safety-oriented crossover operation includes diet plan crossover operation, exercise plan crossover operation, diet variation operation and exercise variation operation;

[0133] The expression of the diet crossover operation is

[0134]

[0135] Where: k represents the random cut point; I 非禁忌represents the set of non-taboo food indexes obtained based on the known nutrient-disease relationship map; X A Represents the diet plan of individual A in the parent population, including the ingredients it chooses and the nutrient distribution; It represents the content of the dth nutrient in the i-th food in the parent population individual A; It represents the final content of the dth nutrient in the i-th food after the offspring population individual C inherits the diet plan of the parent population individual A or B; represents the content of the dth nutrient in the i-th food in the parent population individual B; d represents the dimension of the nutrient; A represents food; B represents the diet plan of the parent population individual B;

[0136] The expression of the motion scheme crossover operation is

[0137]

[0138] Where: II(·) represents the indicator function that ensures that only crossing between common safe motion types is allowed; e C,m represents the duration of the offspring population individual C in motion type m; e A,m represents the duration of individual A in the parent population on movement type m; e B,m represents the duration of individual B in the parent population on movement type m; X B Represents the movement plan of individual B in the parent population;

[0139] The expression of the diet variation operation is

[0140]

[0141] Where: represents the content of the dth nutrient in the i-th food in the offspring population individual C after the diet variation; δ represents the random perturbation value of the uniform distribution used to fine-tune the nutrient content; U(-0.1, 0.1) represents the uniform distribution interval that limits the variation range to avoid drastic changes;

[0142] The expression of the motion mutation operation is:

[0143]

[0144] Where: Risk score (C, m) represents the risk score of movement type m in the offspring population individual C; P replace (m) represents the probability of replacing the high-risk sport m and if the replacement occurs, then e C,m ←0 and increase the safe exercise time e C,m′ ←e C,m′ +Δt;e C,m′Indicates the duration of the newly added safety movement type m′ after replacement; Δt indicates the preset safety movement duration increment;

[0145] S61: Through the energy balance constraint correction strategy, the population individuals obtained in S60 are subjected to energy balance constraints to obtain the offspring population generated by crossover mutation;

[0146] The energy balance constraint correction strategy includes the dietary adjustment rules and exercise compensation rules selected based on ΔE;

[0147] If ΔE>1.1BMR is confirmed, dietary adjustment rules are selected;

[0148] The expression of the diet adjustment rule is

[0149]

[0150] Where: I represents the content of the dth nutrient in the i-th high-calorie food in the offspring population; high-cal Represents an index set of high-calorie foods, which filters out high-calorie foods based on the nutrients they contain; ΔE represents the difference between energy intake and energy expenditure;

[0151] If ΔE<0.9BMR, select the motion compensation rule

[0152] The expression of the motion compensation rule is:

[0153]

[0154] Where: e child,m Indicates the duration or intensity of the offspring population individuals in the movement type m; Cal m Indicates the calorie consumption per unit time of exercise type m; Represents a set of safe motion types;

[0155] S62: Merge the offspring population individuals and elite individuals as the new generation population;

[0156] S63: Confirm whether the new generation population meets the iteration termination condition;

[0157] The iteration termination condition includes whether any one of the Pareto front stability index, the maximum number of iterations index or the fitness convergence condition is met;

[0158] The Pareto front stability index is: the frontier similarity of the population for five consecutive generations exceeds the similarity threshold θ and θ = 0.9;

[0159] Maximum number of iterations: t≥T max =200;

[0160] Fitness convergence condition: judge the fitness standard deviation σ(f diet ),σ(f exercise ) satisfies the fitness convergence condition: σ(f diet ),σ(f exercise )<0.05;

[0161] If satisfied, then output the optimal solution set F1;

[0162] Otherwise, return to S54.

[0163] Furthermore, the expression for the balance coefficient of the recommended strategy adjusted according to the activated biochemical indicator target set in S6 is:

[0164] λ new =λ old +η·(α·R compliance +(1-α)·Δ bio )

[0165] μ new =μ old +η·(β·R compliance +(1-β)·Δ exercise )

[0166] Where: η represents the learning rate that limits the adjustment range; α, β represent the feedback weight coefficients of the feedback data of the user executing the optimal recommendation solution; Δ bio Indicates the normalized improvement of biochemical indicators; Δ exercise represents the deviation in movement completion, and R compliance Indicates the actual execution days / recommended days of the user, and according to R compliance With Δ bio Constructing a balance coefficient update strategy, which includes positive feedback strategy and negative feedback strategy;

[0167] Positive feedback strategy: R compliance ≥0.8 and Δ bio >0, increase user preference weight based on expert experience (↑λ, ↑μ); negative feedback strategy: R compliance <0.5 and Δ bio <-0.1, the user preference weight is reduced based on expert experience (↓λ, ↓μ); and no adjustment is made in other cases except the positive feedback strategy and the negative feedback strategy.

[0168] The present invention provides a personalized diet and exercise combined recommendation method based on dynamic multi-objective optimization, which has the following beneficial effects:

[0169] (1) Recommendation safety is significantly improved: By introducing a medical safety-oriented evolutionary cross-mutation operation, high-risk options are dynamically shielded. By real-time detection of contraindications (such as diabetes and arthritis) in the user's health record, dangerous items such as refined sugar and high-impact exercise are automatically excluded in the cross-mutation. Through the risk-driven mutation probability, the risk score of exercise / food is calculated based on the clinical rule base. The mutation probability of high-risk items is increased by 3-5 times, effectively improving the safety of personalized diet and exercise combined recommendations;

[0170] (2) Design a hybrid fitness evaluation model: ensure that nutrition and exercise goals are met immediately through multi-objective optimization (e.g., protein intake error ≤ 10%), and adjust the recommendation strategy component based on user feedback and biochemical indicators. Based on user historical feedback (execution rate, biochemical indicators), adjust the balance coefficient of the recommendation strategy to achieve personalized recommendation effect and recommendation accuracy;

[0171] (3) Improvement rate of clinical indicators: The combined optimization of diet and exercise was achieved. By introducing energy balance constraints and synchronously regulating intake and consumption, the problem of metabolic disorders caused by the traditional "low-calorie diet + excessive exercise" was avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0172] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0173] Figure 1 This is a flow chart of the personalized diet and exercise combined recommendation method based on dynamic multi-objective optimization of the present invention. DETAILED DESCRIPTION

[0174] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0175] This embodiment provides a personalized diet and exercise joint recommendation method based on dynamic multi-objective optimization. Figure 1 As shown, the specific steps include:

[0176] S1: Obtain user multi-goal set for personalized diet and exercise joint recommendation;

[0177] The user multi-target set includes user health records, nutrient preference data, and exercise preference data;

[0178] S2: Based on the constructed goal activation strategy, obtain a user activation goal set according to the user's multi-goal set; the goal activation strategy includes a nutrient activation strategy, a biochemical indicator activation strategy, and an exercise activation strategy; the user goal set includes an activated nutrient goal set, an activated biochemical indicator goal set, and an activated exercise goal set;

[0179] The specific steps include:

[0180] S21: Based on the nutrient activation strategy, the activated nutrient target set is obtained according to the user's health profile and nutrient preference data;

[0181] And the expression of nutrient activation strategy is

[0182] T diet ={j|F ij ≠0∧p j =1}

[0183] Where: T diet represents the activated nutrient target set; p represents the nutrient preference data; j represents the nutrient type (such as protein, carbohydrate, sodium, etc.); p j represents the user's preference labeling decision variable for nutrient type j, and p j =1 means the user needs this nutrient, otherwise p j =0 means ignoring the nutrient; F ij Indicates the content of nutrient j in food i (e.g., 100g of chicken breast contains 31g of protein);

[0184] Specifically, the dynamic activation logic of the nutrient activation strategy in this embodiment is as follows:

[0185] Existence condition F ij ≠0, for example, if the user selects chicken breast (containing protein) and spinach (containing iron), protein and iron will be activated as goals;

[0186] User preference condition p j =1, it is included in the optimization target;

[0187] For example: patients with hypertension

[0188] Protein = 1 prefers protein intake

[0189] Dietary fiber = 1 to ensure dietary fiber

[0190] Based on known nutrient-disease relationships, sodium causes increased blood pressure, so sodium is forced to be set to 0;

[0191] S22: Based on the biochemical indicator activation strategy, the activation biochemical indicator target set is obtained according to the user's health record; and the expression of the biochemical indicator activation strategy is

[0192] T bio ={k|k∈Indicator m (C)}

[0193] Where: T bio Indicates activation of biochemical indicator target set; Indicator m (C) represents the mth set of key biochemical indicators of disease C; k represents the key biochemical indicators; C represents the user's disease type (such as diabetes, hypertension, liver disease, etc.);

[0194] For example: Diabetes:

[0195] Key indicators: fasting blood sugar, blood sugar 2 hours after meal, glycosylated hemoglobin (HbAlc), triglycerides (TG), low-density lipoprotein (LDL)

[0196] Formula Example: T bio ={HbA1c,GLU fast,TG};

[0197] S23: Based on the exercise activation strategy, obtain the activated exercise target set according to the user's health profile and exercise preference data;

[0198] And the expression of motion activation strategy is

[0199] T exercise ={m|E m强度 ≤I max (C)∧q m =1}

[0200] Where: T exercise Indicates the activated motion target set; E m强度 Indicates the intensity level of exercise type m (usually divided into 1-5 levels, 1 is the lowest intensity, such as yoga; 5 is the highest intensity, such as sprinting); I max (C) represents the maximum exercise intensity threshold allowed by the user's health status; C represents the disease type; q m represents the user's preference labeling decision variable for sport type m, and q m =1 means accepting the movement; q m =0 means rejecting the exercise; m means the type of exercise (such as swimming, running, weightlifting, etc.);

[0201] The dynamic activation logic of the nutrient activation strategy in this embodiment is as follows:

[0202] Strength safety condition Em强度 ≤I max (C), (such as diabetes, arthritis) set the maximum allowable intensity; for example: diabetic patients: I maxx =3 (only low to moderate intensity exercise allowed);

[0203] Postoperative knee surgery patients: I max =2 (jumping sports prohibited);

[0204] The user preference condition is q m =1, it will be included in the candidate; for example, the user may set q 游泳 =1,q 跑 step = 0;

[0205] Example: Assume that the user is a patient with hypertension (I max =3), and prefer swimming (q 游泳 =1) and q 跑步 =1; exercise intensity: E 游泳强度 =2,E 跑步强度 =4, then:

[0206] T exercise = {Swimming} (Running was excluded due to excessive intensity)

[0207] Example 1:

[0208] Hypertensive patients;

[0209] Swimming = 1: The user accepts this type of exercise;

[0210] Yoga = 1 prefers low-intensity activities;

[0211] Cycling = 0: The user rejects this type of exercise;

[0212] S3: Based on the user's health profile, according to the activated nutrient target set and the activated exercise target set, respectively obtain the nutrient weight that introduces the balance coefficient of the user's exercise preference and health factors and the exercise weight that introduces the balance coefficient of the user's exercise preference and exercise safety;

[0213] The nutrient weight is used to characterize the entity connection relationship between the disease and the nutrient in the disease-nutrient relationship knowledge graph;

[0214] The exercise weight is used to represent the entity connection relationship between the disease and the exercise type in the disease-exercise relationship knowledge graph;

[0215] The specific steps include:

[0216] S31: Based on the user's health profile, the nutrient weights are obtained and constructed according to the activated nutrient target set, which introduces the balance coefficient of the user's exercise preference and health factors;

[0217] The nutrient weight is used to characterize the entity connection relationship between the disease and the nutrient in the disease-nutrient relationship knowledge graph;

[0218] The formula for obtaining nutrient weight is

[0219]

[0220] Where: w j represents the dietary weight of nutrient j; λ represents the balance coefficient between user exercise preference and health factors, λ∈[0,1], and when λ→1, it means that the dietary weight is mainly determined by user preference p j Determine (suitable for healthy users); when λ→0, it means that the diet weight is determined by medical experience rules Dominant (suitable for patients with chronic diseases); activation flag for nutrient j (1 = activated, 0 = inactivated); Indicates the decision quantity of whether nutrients need to be supplemented given the user's health profile and index j, and its output value belongs to the set of positive real numbers ,and Indicates that the user needs to supplement nutrient j; otherwise, Indicates that the user needs to limit the supplementation of nutrients j;

[0221] For example: Hypertensive patients:

[0222]

[0223] Diabetic patients:

[0224]

[0225] The specific examples in this embodiment are as follows:

[0226] A diabetic patient (λ=0.3) pays attention to protein (p 蛋白 =1), then:

[0227]

[0228] If the user does not pay attention to carbohydrates (p 碳水 =0), but medical rules require control:

[0229]

[0230] And medical rules can be obtained from disease-nutrient relationships, for example:

[0231] Sodium-mediated hypertension;

[0232] Potassium - helps with - high blood pressure;

[0233] S32: Based on the user's health profile, an exercise weight is obtained and constructed according to the activated exercise goal set, which introduces the user's exercise preference and exercise safety balance coefficient;

[0234] The exercise weight is used to represent the entity connection relationship between the disease and the exercise type in the disease-exercise relationship knowledge graph;

[0235] And the formula for obtaining motion weight is

[0236]

[0237] Where: v m represents the weight of the exercise type m; μ represents the balance coefficient between the user's exercise preference and exercise safety, μ∈[0,1]; and when μ→1, it means that the exercise weight is determined by the user's preference q m Dominant (suitable for healthy users with stable exercise habits); when μ→0, it means that the exercise weight is determined by the medical safety experience rule. Decision (suitable for patients in recovery); Indicates the activation flag of the movement type m (1 = activated, 0 = inactivated); represents a safety scoring function for exercise type m based on health state C; and Indicates that the user is encouraged to do exercise type m; otherwise, Indicates that the user needs to be restricted from exercising type m;

[0238] For example, patients with arthritis:

[0239]

[0240] Patients with osteoporosis:

[0241]

[0242] The specific examples in this embodiment are as follows:

[0243] A patient with osteoporosis (μ = 0.2) prefers yoga (qyoga = 1), then:

[0244]

[0245] If the user does not select resistance training (q 阻力 =0), but medical rules recommend:

[0246] v 阻力 =0.2+0.8.1.3=1.04 (security needs supplement user preferences)

[0247] Medical rules can be obtained from the disease-motion relationship map, for example:

[0248] Swimming - helps - arthritis;

[0249] Running - detrimental to - arthritis;

[0250] S4: Obtaining, based on the nutrient weights and the exercise weights, an initial recommendation plan for personalized diet and exercise combined recommendations for several groups of users; wherein the initial recommendation plan includes an initial recommended diet plan and an initial recommended exercise plan for each user for one week;

[0251] The specific steps include:

[0252] S41: The number of ingredients per meal k=3, the default is 3;

[0253] Define a user's personalized diet plan x diet ,and

[0254]

[0255] Among them, x n,d,m,i Indicates the proportion of ingredients in group n, day d, meal m, and the proportion of ingredients in 3 categories, satisfying

[0256] S42: Based on planned diet plan x diet , according to the activated nutrient target set T diet Filter and obtain a set of candidate ingredients corresponding to nutrients And the candidate food collection This is the dietary nutrient matrix F, which contains the nutrient values of each diet;

[0257] And the candidate food collection The screening formula is

[0258]

[0259] Where: f i represents the candidate ingredients corresponding to nutrient j; that is, only the target set T containing at least one activated nutrient is retained diet A collection of ingredients;

[0260] S43: Based on candidate food collection According to the content of nutrient j in food i, F i,j With nutrient weight w j , calculate and obtain the weighted attractiveness score of each candidate ingredient;

[0261] And the expression of weighted attractiveness score is

[0262]

[0263] Where: Score i represents the weighted attractiveness score of food i; tj Indicates the daily target amount of nutrient j (e.g. sodium 2000 mg / day);

[0264] S44: Normalize the weighted attractiveness score to the probability distribution p of the candidate food, where p=(p1, p2, ..., p n ), whose expression is

[0265] p i =softmax(Score i )

[0266] Where: p i represents the selection probability of the i-th candidate food and i∈n;

[0267] And under the given probability distribution p descending order list, the first k (k=3) candidate foods in the probability distribution p descending order list are selected based on the roulette wheel selection method, and then the initial recommended diet plan x of the user's personalized diet is obtained. diet ;

[0268] And the expression for obtaining the first k candidate foods is

[0269] x n,d,m,i ~Dirichlet(α1, α2, α3)

[0270] The specific examples in this embodiment are as follows:

[0271] Assume that the activation target is T diet =Protein, dietary fiber, weight w 蛋白 =1.2, w 纤维 =1.5;

[0272] Chicken breast (30g protein, 0g fiber): Score = 1.2*(30 / 50)+1.5*0=0.72;

[0273] Quinoa (8g protein, 5g fiber): Score = 1.2*(8 / 50)+1.5*(5 / 25)=0.192+0.3=0.492;

[0274] Broccoli (3g protein, 3g fiber): Score = 1.2*(3 / 50)+1.5*(3 / 25)=0.072+0.18

[0275] =0.252;

[0276] Normalized probability: chicken breast 48.5%, quinoa 33.2%, broccoli 18.3%;

[0277] This embodiment also includes Dirichlet distribution sampling (weight correction):

[0278] By using the modified Dirichlet parameter a i =Score i +1 generates a proportion vector, as shown in Table 1, which makes high-scoring foods account for a higher proportion:

[0279] x diet ~Dirichlet(a1,a2,...,a k )

[0280] Table 1. Food proportion

[0281]

[0282] Example of sampling results: Possible proportions: chicken breast 52%, quinoa 33%, broccoli 15%;

[0283] Among them, after the weight correction in this embodiment, the proportion of high-scoring food (chicken breast) is significantly increased, but a certain degree of randomness is still retained. Based on the above cycle execution of N groups * 7 days, N groups of 7 days a week × 3 meals ingredient combinations are generated to obtain the user's personalized diet plan x diet , as shown in Table 2;

[0284] Table 2. User-personalized diet plan

[0285]

[0286] S45: Based on the initial recommended diet plan x diet , obtain the user's personalized exercise plan x that meets the energy balance constraint exercise , and then we can get the initial recommendation plan of personalized diet and exercise for several groups of users;

[0287] User-personalized exercise planx exercise The methods for obtaining , specifically include:

[0288] S451: Based on the user's maximum tolerable exercise time: T max =300 minutes / week;

[0289] Energy balance constraint: ΔE = total intake − total expenditure ∈ [BMR·0.9, BMR·1.1] kcal / day;

[0290] Define user-defined exercise plans exercise ,and

[0291]

[0292] Among them, y n,d,Q,mIt represents the time proportion of m types of exercise in the nth group, the dth day, the Qth time; the exercise types and exercise methods can be obtained from the known exercise library; each group satisfies the energy balance constraint ΔE and the exercise duration ≤T max ;

[0293] S452: Based on the plan of exercise program x exercise , according to the activation motion target set T exercise With exercise weight v m Obtain weighted scores for each candidate sport type;

[0294] And the expression of the weighted score of the candidate motion type is

[0295]

[0296] Where: Score m represents the weighted score of the candidate motion type m; BaseCalorie represents the variable that satisfies the energy balance constraint, and represents the intake x of food i i Calories in CalorieBurn m represents the calories consumed per minute by the candidate exercise type m (k cal / min); x i represents the proportion of food i in the diet plan;

[0297] S453: normalizing the weighted scores of the candidate motion types into a motion probability distribution of the candidate motions; and obtaining motion time distribution according to the motion probability distribution;

[0298] And the expression of motion time distribution is

[0299] e m =P m ·T max

[0300] p m =softmax(Score m )

[0301]

[0302] Where: e m represents the weekly exercise allocation time of the mth candidate exercise and e m ≥0, daily exercise amount e d,m =e m / 7;P m represents the probability of the mth candidate motion; T max Indicates the maximum exercise duration that the user can tolerate;

[0303] S454: Based on the exercise allocation time, several groups of user-personalized exercise initial recommended exercise plans x that meet energy balance constraints can be obtained. exercise ; That is, by looping the above steps N times, N sets of weekly exercise plans x are generated exercise ;

[0304] S5: Construct a hybrid fitness evaluation model;

[0305] And the hybrid fitness evaluation model includes multi-objective vector functions and energy deviation constraints;

[0306] Based on the improved NSGA-II algorithm and combined with the hybrid fitness evaluation model, the optimal recommendation scheme is obtained based on the initial recommendation scheme. The specific steps include:

[0307] S51: Based on nutrient weights and exercise weights, a hybrid fitness evaluation model of the improved NSGA-II algorithm is constructed;

[0308] And the hybrid fitness evaluation model includes the multi-objective vector function F(X) and the energy deviation constraint ΔE, which is expressed as

[0309] F(X)=|f diet (X), f exercise (X)|

[0310]

[0311] Where: F(X) represents the multi-target vector; f diet (X) represents the dietary fitness function; f exercise represents the exercise fitness function; Cal m Indicates the calories burned per minute for exercise type m; t cal represents the weekly metabolic gap target, and t cal =0.1·BMR·7, BMR stands for basal metabolic rate; represents total intake; represents the total consumption; x i represents the content of the i-th food;

[0312] S52: Define the population P0 and maximum number of iterations T of the NSGA-II algorithm max And the initial recommendation scheme of the user's personalized diet and exercise joint recommendation is used as the population individual X i , whose expression is

[0313] P0={X1,X2,...,X a , X b ,...,X N}

[0314] Xi =[x diet ,x exercise ]

[0315] S53: Based on the multi-objective vector function and the energy deviation constraint ΔE, a global dominance condition for obtaining the non-dominated sorting generation frontier set is constructed, which includes

[0316]

[0317] Dietary goals govern relationships:

[0318] f diet (X a )≤f diet (X b )and

[0319] Movement goal dominance relationship:

[0320]

[0321] Where: X a < diet X b represents the population individual X a Dominate the population individual X on the diet goal b ;X a < exercise X b represents the population individual X a Dominate the population individual X on the moving target b ;e a,m represents the population individual X a duration or intensity of exercise type m; e b,m represents the population individual X b Duration or intensity of exercise type m; ΔE(X a )≤ΔE(X b ) represents the population individual X a The difference between total energy intake and expenditure is better, that is, closer to the energy balance target; a,j represents the population individual X a The nutrient content of the jth high-calorie food in x b,j Population individual X b The nutrient content of the jth high-calorie food in m Indicates the calorie consumption per unit time of exercise type m;

[0322] S54: Initialize the population P0 according to the global dominance condition:

[0323] And initialization operation: Get population individual X aThe number of individuals in the dominated population n(Xa);

[0324] Get population individual X a The dominating set S(X a ), if the population individual X b As a dominated individual in the population, the population individual X b The number of individuals in the dominated population is defined as n(X b );

[0325] Screen the population individuals that satisfy ΔE≤∈ and obtain the feasible solution set P feasible , where ∈ represents the preset energy balance threshold;

[0326] S55: According to the population P0 after the initialization operation, obtain the population individual X a The non-dominated sorting generates the frontier set {F1, F2, ...};

[0327] Specifically include:

[0328] S551: Get population individual X a The first frontier layer F1 is represented by

[0329] F1={X a ∈P feasible |n(X a )=0}

[0330]

[0331] S552: For the current frontier layer F k The population individual X in a , traverse its dominating set S(X a ) and randomly assign individuals X b The number of individuals in the dominated population n(X b ) minus 1, and obtain the new population, the frontier layer F k Candidate set of

[0332] Until the number of individuals in the dominated population n(X b ) is 0;

[0333] Then the population individual X bb As the candidate set H for the next frontier layer, we can obtain the k+1th frontier layer F k+1 , and the frontier layer F k+1 Expressed as

[0334] F k+1 ={X b ∈H|ΔE(X b )≤∈}

[0335] Then obtain information about individual X in the populationi The non-dominated sorting generates the frontier set {F1, F2, ...};

[0336] S56: Obtain the frontier layer F in the frontier set generated by non-dominated sorting k The individual crowding degree of the population that satisfies the energy deviation constraint ΔE;

[0337] And the method to obtain the individual crowding degree of the population is

[0338] S561: According to the multi-objective vector function, the normalized objective function values of the individuals in each frontier layer of the non-dominated sorting generation frontier set are obtained respectively. Its expression is

[0339]

[0340] Where: represents the minimum value of the diet fitness or exercise fitness function; Indicates the maximum value of the diet fitness or exercise fitness function;

[0341] S562: And according to the normalized objective function value Sort the population individuals in each frontier layer in ascending order to obtain a population individual sequence list;

[0342] And based on the population individual sequence table, the crowding degree of the population individual in the frontier layer is obtained, and the crowding degree CD(X a ) is expressed as

[0343]

[0344] Where: Indicates the population individual sequence list and the population individual X a Normalized objective function values of adjacent population individuals;

[0345] S57: According to the crowding degree of the population individuals, obtain the population individuals in each frontier layer that satisfy ΔE≤∈ and have the largest crowding degree of the population individuals, and use them as elite individuals;

[0346] And the formula for obtaining elite individuals is

[0347]

[0348] Where: P elite Represents elite individuals; N elite represents the number of elite individuals; and N elite = P represents the number of parent populations in the current frontier layer;

[0349] S58: Merge except elite individuals P eliteFor the remaining non-elite individuals, obtain the non-elite individual population;

[0350] And the merging method of non-elite individuals is

[0351] S581: Generate a frontier set according to non-dominated sorting and perform hierarchical sorting on each frontier layer, that is, F1>F2>...;

[0352] S582: For the non-elite individuals in each frontier layer after hierarchical sorting, arrange them in descending order of crowding degree to obtain the non-elite individual population P rest ;

[0353] S59: Use the binary tournament selection method to select individuals from the non-elite individual population, obtain the preferred population individuals and use them as the parental population individuals;

[0354] Specifically including: [[ID=十八]]

[0355] Randomly select two population individuals X rest from the non-elite individual population P a , X b ∈P rest ;

[0356] And based on the priority selection strategy, obtain the preferred population individuals of the population individuals X a , X b ;

[0357] And the expression of the priority selection strategy is

[0358]

[0359] In the formula: X parent represents the preferred population individual; represents selecting the population individual X a , X b in which the population individual in the more optimal frontier level is used as the preferred population individual; for example, if the frontier level Rank(X a ) where the population individual X a is F G is better than the frontier level Rank(X b ) where the population individual X b is F , and G<Q, then select the population individual X a as the preferred population individual X parent ; if the frontier level Rank(X a ) where the population individual X a is F G is inferior to the frontier level Rank(X b ) where the population individual X b is F Q ​, and G>Q, then select individual X from the population b As the preferred population individual X parent ; represents the population individual X a , X b When the frontier levels are the same, the population individual with smaller crowding degree is selected as the preferred population individual X parent ; Among them, from the non-elite individual population P rest When randomly selecting individuals from a population, if the randomly selected individuals from the population violate known medical contraindications, the population individuals need to be reselected.

[0360] In this embodiment, the medical contraindications D contraindications (nutrient-disease relationship map) and the exercise risk coefficient (exercise-disease relationship map) are both known;

[0361] S60: Through a medical safety-oriented crossover operation, crossover mutation is performed on the parent population individuals of S59 to obtain the offspring population individuals;

[0362] The medical safety-oriented crossover operation includes diet plan crossover operation, exercise plan crossover operation, diet variation operation and exercise variation operation;

[0363] The expression of the diet crossover operation is

[0364]

[0365] Where: k represents the random cut point; I 非禁忌 Represents the parent generation non-taboo food index set (i.e., the food index set obtained from the nutrient-disease relationship map); X A Represents the diet plan of individual A in the parent population, including the ingredients and nutrient distribution selected by it; Indicates the content of the dth nutrient (such as protein content, fat content, etc.) of the i-th food in the parent population individual A; It represents the final content of the dth nutrient in the i-th food after the offspring population individual C inherits the diet plan of the parent population individual A or B; represents the content of the dth nutrient in the i-th food in the parent population individual B; d represents the dimension of the nutrient (for example, d=1 represents calories, d=2 represents protein, etc.); A represents food; B represents the dietary plan of the parent population individual B; for example: assuming that the parent population individual A is on a low-fat and high-protein diet, the parent population individual B is on a high-fiber Mediterranean diet, and the random cut point k=3 (corresponding to the first three nutrients being protein, fat, and carbohydrates): then the nutritional plan of the offspring population individual C is: d=1 (protein), d=2 (fat), d=3 (carbohydrate) inherits the configuration of parent A; d=4 (dietary fiber) and subsequent nutrients inherit the high-fiber strategy of parent B, thereby achieving a balance between the retention of dominant genes and diversity;

[0366] The expression of the motion scheme crossover operation is

[0367]

[0368] Where: II(·) represents the indicator function that ensures that only crossing between common safe motion types is allowed; e C,m represents the duration of the offspring population individual C in motion type m; e A,m represents the duration of individual A in the parent population on movement type m; e B,m represents the duration of individual B in the parent population on movement type m; X B Represents the movement plan of individual B in the parent population;

[0369] The diet variation operation is to perform the diet variation operation with probability p mutate =0.1 replaces a food i, and its expression is

[0370] And i∈I 非禁忌

[0371] Where: represents the content of the dth nutrient in the i-th food in the offspring population individual C after the diet variation; δ represents a uniformly distributed random perturbation value used to fine-tune the nutrient content; U(-0.1, 0.1) represents the uniform distribution interval, which limits the variation range to avoid drastic changes;

[0372] The motion variation operation is to perform high-risk actions m(Risk score (C, m)>0.5) is replaced by probability, and its expression is

[0373]

[0374] Where: Risk score (C, m) represents the risk score of exercise type m in the offspring population individual C (based on user health data, such as joint load, heart rate threshold, etc.), and the score is obtained from the known exercise and disease knowledge graph; Preplace (m) represents the probability of replacing high-risk sport m. The higher the risk score, the greater the replacement probability.

[0375] If substitution occurs, then e C,m ←0 and increase the safe exercise time e C,m′ ←e C,m′ +Δt

[0376] e C,m′ Indicates the duration of the newly added safe exercise type m′ after replacement; Δt indicates the preset safe exercise duration increment (e.g., 10 minutes each time);

[0377] S61: Through the energy balance constraint correction strategy, the energy balance constraint is applied to the individuals in the population obtained in S60 to obtain the offspring population generated by crossover mutation;

[0378] The energy balance constraint correction strategy includes the dietary adjustment rules and exercise compensation rules selected based on ΔE;

[0379] If ΔE>1.1BMR is confirmed, dietary adjustment rules are selected;

[0380] The expression of the diet adjustment rule is

[0381]

[0382] Where: I represents the content of the dth nutrient (such as calories, protein, etc.) of the i-th high-calorie food in the offspring population; high-cal Represents an index set of high-calorie foods, which filters out high-calorie foods (such as fried foods, desserts, etc.) based on the nutrients they contain; ΔE represents the difference between energy intake and energy expenditure;

[0383] If ΔE<0.9BMR, the motion compensation rule is selected;

[0384] The expression of the motion compensation rule is:

[0385]

[0386] Where: e child,m Indicates the duration or intensity of the offspring population individuals in exercise type m (such as running for 30 minutes); Cal m Indicates the calorie consumption per unit time of exercise type m (e.g. running consumes 8 kcal per minute); Represents a set of safe exercise types, low-risk exercises (such as swimming and brisk walking) filtered based on the user's health status, which can be obtained based on the known exercise and disease knowledge graph;

[0387] S62: Merge the offspring population individuals and the elite individuals as the new generation population, which is expressed as

[0388] P new =P elite ∪{offspring generated by crossover mutation},|P new |=|P|, where |P new |=|P0| means that the size of the new generation population is the same as the initial population P0 to ensure the computational efficiency of the algorithm;

[0389] S63: Confirm whether the new generation population meets the iteration termination condition;

[0390] The iteration termination condition includes whether any one of the Pareto front stability index, the maximum number of iterations index or the fitness convergence condition is met;

[0391] The Pareto front stability index is: the front similarity of the population for five consecutive generations exceeds the similarity threshold θ and θ=0.9; specifically, the front similarity in this embodiment is the target space overlap rate; and the target space overlap rate is calculated by a method known in the art, and the specific calculation steps include:

[0392] Frontier projection: Obtain the Pareto solution of each generation of population and map the Pareto solution of each generation of population to the preset target space;

[0393] Region partitioning: Obtain the hypervolume (HV) or coverage grid of each generation of solution sets in the target space;

[0394] Calculation of target space overlap rate: Frontier similarity = the union volume of the frontier layers in the frontier sets of two generations, for example, the intersection volume of the frontiers of the nth generation and the n-1th generation. If the frontier similarity of five consecutive generations of populations is ≥0.9, it means that the frontier coverage areas of five consecutive generations of populations overlap by more than 90%, and the frontier is considered stable;

[0395] Maximum number of iterations: t≥T max =200;

[0396] Fitness convergence condition: judge the fitness standard deviation σ(f diet ),σ(f exercise ) satisfies the fitness convergence condition: σ(f diet ),σ(f exercise )<0.05;

[0397] If satisfied, the optimal solution set F1 is output; specifically, in multi-objective optimization, the Pareto front stratifies the solution set through non-dominated sorting:

[0398] The frontier layer F1 represents the first level of Pareto frontier, that is, all solutions are non-dominated solutions (no other solution is better than them in all objectives);

[0399] The frontier layers F2, F3, ... represent suboptimal layers (e.g., the frontier layer is dominated by the solution in F1 but not dominated by other solutions). Similarly, at the end of the iteration, the algorithm only outputs the optimal layer frontier layer F1, because it is the set of global optimal solutions, while the solutions of subsequent layers (F2, F3, etc.) are suboptimal solutions and do not meet the "optimal" termination condition.

[0400] Otherwise, return to S54;

[0401] S6: Obtain feedback data on the user's execution of the optimal recommendation plan, adjust the balance coefficient of the recommendation strategy according to the activated biochemical indicator target set, and repeat steps S4 to S5;

[0402] Specifically, the expression for the balance coefficient of the recommended strategy adjusted according to the activated biochemical indicator target set is:

[0403] λ new =λ old +η·(α·R compliance +(1-α)·Δ bio )

[0404] μ new =μ old +η·(β·R compliance +(1-β)·Δ exercise )

[0405] Where: η represents the learning rate that limits the adjustment range; α, β represent the feedback weight coefficients of the feedback data of the user executing the optimal recommendation solution; Δ bio Indicates the normalized improvement of biochemical indicators; Δ exercise represents the deviation in the degree of movement completion, and R compliance Indicates the actual execution days / recommended days of the user, and according to R compliance With Δ bio Constructing a balance coefficient update strategy, which includes positive feedback strategy and negative feedback strategy;

[0406] Positive feedback strategy: R compliance ≥0.8 and Δ bio >0, increase the user preference weight based on expert experience (↑λ, ↑μ);

[0407] Negative feedback strategy: R compliance <0.5 and Δ bio <-0.1, reduce the user preference weight based on expert experience (↓λ, ↓μ);

[0408] Except for the other cases of positive feedback strategy and negative feedback strategy (such as 0.8 <R compliance ≥0.5 and Δ bio >0 or 0.8 <R compliance ≥0.5 and Δ bio <-0.1 or .......), no adjustment is made; wherein the parameter boundary constraints of the balance coefficient in this embodiment are: λ, μ∈[0.2, 0.8] (to avoid excessive bias towards the user or medical end);

[0409] Emergency intervention mechanism: If the user triggers a health warning (e.g., biochemical indicators deteriorate by more than 20%), the mandatory settings are: λ = 0.2, μ = 0.2 (entering medical-dominated mode);

[0410] Long-term stability: Reset λ and μ to their initial values every quarter to prevent drift:

[0411] μ can be obtained in the same way

[0412] Where: current Indicates the current balance coefficient; λ default Indicates the default initial balance coefficient; λ reset Indicates the balance coefficient after quarterly reset, taking the average of the current balance coefficient value and the default initial balance coefficient value;

[0413] Specific examples in this embodiment are as follows:

[0414] User background: Type 2 diabetes mellitus, initial λ = 0.5, μ = 0.6;

[0415] Cycle 1 Feedback:

[0416] Execution rate R compliance =0.7

[0417] Biochemical improvement: fasting blood glucose from 8.2 to 7.5 mmol / L (target < 7.0), Δ bio =(7.5-7.0) / 7.0=0.071

[0418] Movement completion: Δ exercise =0.9-1=-0.1

[0419] Parameter update calculation:

[0420] λ new =0.5+0.1·(0.7·0.7+0.3·0.071)=0.5+0.1·(0.49+0.021)≈0.55

[0421] μ new=0.6+0.1·(0.6·0.7+0.4·(-0.1))=0.6+0.1·(0.42-0.04)

[0422] =0.638

[0423] Results: λ↑ (user preference increased), μ↑ (motor autonomy increased);

[0424] This embodiment also includes an example algorithm: generating a personalized health plan for patients with type 2 diabetes:

[0425] Step S1: Target activation

[0426] S11: Activate nutrient target set

[0427] Input: Diabetes (C), user preference p (protein = 1, dietary fiber = 1, sodium = 0)

[0428] As shown in Table 3, it is known that:

[0429] Table 3. Example of food nutrient matrix F

[0430]

[0431] Dynamic activation logic:

[0432] Protein (F≠0 and p=1): Chicken breast, broccoli, and quinoa meet the criteria;

[0433] Dietary fiber (F≠0 and p=1): Broccoli and quinoa meet the criteria;

[0434] Carbohydrates (p = 0, medical rules forcibly exclude);

[0435] Output:

[0436] T diet ={Protein, dietary fiber}

[0437] S12: Activate biochemical indicator target set

[0438] Input: diabetes (C);

[0439] Known: Diabetes-related biochemical indicators include HbA1c, fasting blood glucose (GLU fast), and triglycerides (TG);

[0440] Output:

[0441] T bio ={HbA1c, GLUfast, TG}

[0442] S13: Activate motion target set

[0443] Input: diabetes (C), user preference q (swimming = 1, yoga = 1, cycling = 0);

[0444] Known:

[0445] Exercise intensity example: swimming = 2, yoga = 1, running = 4;

[0446] The maximum permissible intensity for diabetes is I max = 3;

[0447] Dynamic activation logic:

[0448] Swim (E = 2 ≤ 3, q = 1) → retain;

[0449] Yoga (E=1≤3, q=1) → retain;

[0450] Running (E=4>3) → excluded;

[0451] Output:

[0452] T exercise ={swimming, yoga}

[0453] Step S2: Weight calculation

[0454] S21: Nutrient weight calculation

[0455] Input: Diabetes (C), T diet = protein, dietary fiber, λ = 0.5

[0456] Medical rules:

[0457] protein:

[0458] Dietary fiber:

[0459] carbohydrate:

[0460] Nutrient weight calculation:

[0461] Protein weight:

[0462] w 蛋白 =0.5×1+0.5×1.0=1.0

[0463] Dietary fiber weight:

[0464] w 纤维 =0.5×1+0.5×1.3=1.15

[0465] Carbohydrate weighting (not active but medical rules in effect):

[0466] w 碳水=0.5×0+0.5×(-2.0)=-1.0

[0467] Output:

[0468] w = {Protein: 1.0, Dietary Fiber: 1.15, Carbohydrate: -1.0}

[0469] S22: Motion weight calculation

[0470] Input: Diabetes (C), T exercise ={swimming, yoga}, μ=0.6

[0471] Medical rules:

[0472] swim:

[0473] Yoga:

[0474] Motion weight calculation:

[0475] Swimming weights:

[0476] v 游泳 =0.6×1+0.4×1.5=1.2

[0477] Yoga Weights:

[0478] v 瑜伽 =0.6×1+0.4×1.2=1.08

[0479] Output:

[0480] v = {Swimming: 1.2, Yoga: 1.08}

[0481] Step S3: Initial solution generation

[0482] S31: Diet plan generation

[0483] Known:

[0484] Daily target values: 50g protein, 25g dietary fiber;

[0485] Candidate foods: chicken breast, broccoli, quinoa;

[0486] Calculate and obtain the diet weighted attractiveness table, as shown in Table 4:

[0487] Table 4. Weighted attractiveness of diets

[0488]

[0489] Roulette wheel selection probabilities:

[0490] Chicken breast: 0.62 / (0.62+0.198+0.39)≈51%

[0491] Broccoli: 0.198 / 1.208 ≈ 16%

[0492] Quinoa: 0.39 / 1.208 ≈ 33%

[0493] Sample one-week breakfast plan:

[0494] Chicken breast 40% + quinoa 35% + broccoli 25%

[0495] Protein: 40% × 31 + 35% × 8 + 25% × 3 = 15.05g

[0496] Dietary fiber: 35% x 5 + 25% x 3 = 2.5g

[0497] S32: Movement plan generation

[0498] Known:

[0499] User BMR = 1500kcal / day;

[0500] Exercise consumption: swimming 8kcal / min, yoga 5kcal / min;

[0501] Sports Weighted Score Calculation:

[0502] Swimming: 1.2 × (8 / 8) = 1.2;

[0503] Yoga: 1.08 × (5 / 5) = 1.08;

[0504] Assuming the total dietary intake is 1500kcal / day (generated based on S31), the total consumption must meet:

[0505] 1500-1650≤Total consumption≤1500-1350

[0506] Right now:

[0507] -150≤Total consumption≤150kcal / day

[0508] Converted into exercise consumption target:

[0509] Exercise consumption = total consumption - BMR = [0, 150] kcal / day

[0510] Time allocation:

[0511] Maximum swimming time: 150kcal ÷ 8kcal / min = 18.75 minutes / day;

[0512] Maximum yoga duration: 150kcal ÷ 5kcal / min = 30 minutes / day;

[0513] Step S4: Optimization Iteration

[0514] Randomly generate 3 groups of solutions (N=3) and calculate the fitness:

[0515]

[0516] Non-dominated sorting:

[0517] Scheme 1 (ΔE=1450∈[1350,1650], lowest fitness) → F1

[0518] Crossover and mutation:

[0519] Scheme 1 and Scheme 2 are cross-generated to generate offspring, and the food ratio and exercise duration are adjusted;

[0520] Termination condition: After 5 generations, the frontier similarity is greater than 0.9, and the optimal solution 1 is output;

[0521] Step S5: Parameter update

[0522] Assume that the user execution rate R compliance =0.8, biochemical index improvement Δ bio =0.1 (HbA1c from 7.5 to 7.0):

[0523] λ new =0.5+0.1×(0.7×0.8+0.3×0.1)=0.5+0.059=0.559

[0524] μ new =0.6+0.1×(0.6×0.8+0.4×0.9)=0.6+0.084=0.684

[0525] The adjusted plan is more inclined towards user preferences, but still retains medical constraints;

[0526] Final output:

[0527] Optimal diet plan: 50% chicken breast, 40% whole wheat bread, 10% spinach

[0528] Optimal exercise plan: swimming 33 minutes / day, yoga 10 minutes / day

[0529] Update parameters: λ = 0.56, μ = 0.62.

[0530] The beneficial effects of the method described in the embodiment of the present invention are as follows:

[0531] (1) Recommendation safety is significantly improved: By introducing a medical safety-oriented evolutionary cross-mutation operation, high-risk options are dynamically shielded. By real-time detection of contraindications (such as diabetes and arthritis) in the user's health record, dangerous items such as refined sugar and high-impact exercise are automatically excluded in the cross-mutation. Through the risk-driven mutation probability, the risk score of exercise / food is calculated based on the clinical rule base. The mutation probability of high-risk items is increased by 3-5 times, effectively improving the safety of personalized diet and exercise combined recommendations;

[0532] (2) Design a hybrid fitness evaluation model: ensure that nutrition and exercise goals are met immediately through multi-objective optimization (e.g., protein intake error ≤ 10%); adjust the recommendation strategy component based on user feedback and biochemical indicators: adjust the balance coefficient of the recommendation strategy based on user historical feedback (execution rate, biochemical indicators) to achieve personalized recommendation effect and recommendation accuracy;

[0533] (3) Improvement rate of clinical indicators: The combined optimization of diet and exercise was achieved. By introducing energy balance constraints and synchronously regulating intake and consumption, the problem of metabolic disorders caused by the traditional "low-calorie diet + excessive exercise" was avoided.

[0534] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A personalized diet and exercise joint recommendation method based on dynamic multi-objective optimization, characterized by: The specific steps include: S1: Obtain user multi-goal set for personalized diet and exercise joint recommendation; The user multi-target set includes user health records, nutrient preference data, and exercise preference data; S2: Based on the constructed target activation strategy, the user activation target set is obtained according to the user's multi-target set; And the target activation strategies include nutrient activation strategy, biochemical indicator activation strategy and exercise activation strategy; The user goal set includes an activated nutrient goal set, an activated biochemical indicator goal set, and an activated exercise goal set; S3: Based on the user's health profile, according to the activated nutrient target set and the activated exercise target set, respectively obtain the nutrient weight that introduces the balance coefficient of the user's exercise preference and health factors and the exercise weight that introduces the balance coefficient of the user's exercise preference and exercise safety; The nutrient weight is used to characterize the entity connection relationship between the disease and the nutrient in the disease-nutrient relationship knowledge graph; The exercise weight is used to represent the entity connection relationship between the disease and the exercise type in the disease-exercise relationship knowledge graph; S4: Based on the nutrient weights and exercise weights, an initial recommendation plan for personalized diet and exercise recommendations for several groups of users is obtained; The initial recommended plan includes an initial recommended diet plan and an initial recommended exercise plan for the user for one week; S5: Construct a hybrid fitness evaluation model; And the hybrid fitness evaluation model includes multi-objective vector functions and energy deviation constraints; Based on the improved NSGA-II algorithm and combined with the hybrid fitness evaluation model, the optimal recommendation scheme is obtained based on the initial recommendation scheme; S6: Obtain feedback data on the user's execution of the optimal recommendation plan, adjust the balance coefficient of the recommendation strategy according to the activated biochemical indicator target set, and repeat steps S4 to S5.

2. The personalized diet and exercise joint recommendation method based on dynamic multi-objective optimization according to claim 1, characterized in that: The S2 specifically includes the following steps: S21: Based on the nutrient activation strategy, the activated nutrient target set is obtained according to the user's health profile and nutrient preference data; And the expression of nutrient activation strategy is T diet ={j|F ij ≠0∧p j =1} Where: T diet represents the activated nutrient target set; p represents the nutrient preference data; j represents the nutrient type; p j represents the user's preference labeling decision variable for nutrient type j, and p j =1 means the user needs this nutrient, otherwise p j =0 means ignoring the nutrient; F ij represents the content of nutrient j in food i; S22: Based on the biochemical indicator activation strategy, the activation biochemical indicator target set is obtained according to the user's health record; And the expression of biochemical indicator activation strategy is T bio ={k|k∈Indicator m (C)} Where: T bio Indicates activation of biochemical indicator target set; Indicator m (C) represents the mth set of key biochemical indicators of disease C; k represents the key biochemical indicators; S23: Based on the exercise activation strategy, obtain the activated exercise target set according to the user's health profile and exercise preference data; And the expression of motion activation strategy is T exercise ={m|E m强度 ≤I max (C)∧q m =1} Where: T exercise Indicates the activated motion target set; E m强度 Indicates the intensity level of exercise type m; I max (C) represents the maximum exercise intensity threshold allowed by the user's health status; C represents the disease type; q m represents the user's preference labeling decision variable for sport type m, and q m =1 means accepting the movement; q m =0 means rejecting the movement.

3. The personalized diet and exercise joint recommendation method based on dynamic multi-objective optimization according to claim 2, characterized in that: The S3 specifically includes the following steps: S31: Based on the user's health profile, the nutrient weights are obtained and constructed according to the activated nutrient target set, which introduces the balance coefficient of the user's exercise preference and health factors; The nutrient weight is used to characterize the entity connection relationship between the disease and the nutrient in the disease-nutrient relationship knowledge graph; The formula for obtaining nutrient weight is Where: w j represents the dietary weight of nutrient j; λ represents the balance coefficient between user exercise preference and health factors, λ∈[0,1], and when λ→1, it means that the dietary weight is determined by user preference p j When λ→0, it means that the dietary weight is determined by the medical experience rule leading; represents the decision-making amount of whether nutrients need to be supplemented given the user's health profile and index j, and Indicates that the user needs to supplement nutrient j; otherwise, Indicates that the user needs to limit the supplementation of nutrients j; S32: Based on the user's health profile, an exercise weight is constructed according to the activated exercise goal set, which introduces the user's exercise preference and exercise safety balance coefficient; The exercise weight is used to represent the entity connection relationship between the disease and the exercise type in the disease-exercise relationship knowledge graph; And the formula for obtaining motion weight is Where: v m represents the weight of the exercise type m; μ represents the balance coefficient between the user's exercise preference and exercise safety, μ∈[0,1]; and when μ→1, it means that the exercise weight is determined by the user's preference q m Dominant; when μ→0, it means that the motion weight is determined by the medical safety experience rule Decide; represents a safety scoring function for exercise type m based on health status, i.e., disease type C; and Indicates that the user is encouraged to do exercise type m; otherwise, Indicates that the user needs to be restricted from exercising type m.

4. The personalized diet and exercise joint recommendation method based on dynamic multi-objective optimization according to claim 3, characterized in that: The S4 specifically includes the following steps: S41: Define the user's personalized diet plan x diet ,and Among them, x n,d,m,i Indicates the proportion of ingredient i in group n, day d, meal m; S42: Based on planned diet plan x diet , according to the activated nutrient target set T diet Filter and obtain a set of candidate ingredients corresponding to nutrients And the candidate food collection The screening formula is Where: f i represents the candidate food corresponding to nutrient j; S43: Based on candidate food collection According to the content of nutrient j in food i, F i,j With nutrient weight w j , calculate and obtain the weighted attractiveness score of each candidate ingredient; And the expression of weighted attractiveness score is Where: Score i represents the weighted attractiveness score of food i; t j represents the daily target amount of nutrient j; S44: Normalize the weighted attractiveness score to the probability distribution p of the candidate food, where p=(p1, p2, ..., p n ), whose expression is p i =softmax(Score i ) Where: p i represents the selection probability of the i-th candidate food and i∈n; And under the given probability distribution p descending order list, the first k candidate foods in the probability distribution p descending order list are selected based on the roulette wheel selection method, and then the initial recommended diet plan x of the user's personalized diet is obtained. diet ; And the expression for obtaining the first k candidate foods is x n,d,m,i ~Dirichlet(α1,α2,α3) S45: Based on the initial recommended diet plan x diet , obtain the user's personalized exercise plan x that meets the energy balance constraint exercise , and then we can get the initial recommendation plan of personalized diet and exercise for several groups of users; User-personalized exercise planx exercise The method for obtaining , specifically including: S451: Define the user's personalized exercise plan x exercise ,and Among them, y n,d,Q,m It represents the time proportion of m types of exercise in the nth group, the dth day, the Qth time; S452: Based on the plan of exercise program x exercise , according to the activation motion target set T exercise With exercise weight v m Obtain weighted scores for each candidate sport type; And the expression of the weighted score of the candidate motion type is Where: Score m represents the weighted score of the candidate motion type m; BaseCalorie represents the variable that satisfies the energy balance constraint, and ΔE represents the energy balance constraint i.e. ΔE = total intake - total expenditure; represents the intake x of food i i Calories in CalorieBurn m represents the calories consumed per minute by the candidate exercise type m; x i represents the proportion of food i in the diet plan; S453: normalizing the weighted scores of the candidate motion types into a motion probability distribution of the candidate motions; and obtaining motion time distribution according to the motion probability distribution; And the expression of motion time distribution is e m =P m ·T max p m =softmax(Score m ) Where: e m represents the weekly exercise allocation time of the mth candidate exercise and e m ≥0; P m represents the probability of the mth candidate motion; T max Indicates the maximum exercise duration that the user can tolerate; S454: Based on the exercise allocation time, several groups of user-personalized exercise initial recommended exercise plans x that meet energy balance constraints can be obtained. exercise .

5. The personalized diet and exercise joint recommendation method based on dynamic multi-objective optimization according to claim 4, characterized in that: The S5 specifically includes the following steps: S51: Based on nutrient weights and exercise weights, a hybrid fitness evaluation model of the improved NSGA-II algorithm is constructed; And the hybrid fitness evaluation model includes the multi-objective vector function F(X) and the energy deviation constraint ΔE, which is expressed as F(X)=|f diet (X),f exercise (X)| Where: F(X) represents the multi-objective vector function; f diet (X) represents the dietary fitness function; f exercise represents the exercise fitness function; Cal m Indicates the calories burned per minute for exercise type m; t cal represents the weekly metabolic gap target, and t cal =0.1·BMR·7, BMR stands for basal metabolic rate; represents total intake; represents the total consumption; x i represents the content of the i-th food; S52: Define the population P0 and maximum number of iterations T of the NSGA-II algorithm max And the initial recommendation scheme of the user's personalized diet and exercise joint recommendation is used as the population individual X i , whose expression is P0={X1,X2,…,X a ,X b ,…,X N } X i =[x diet ,x exercise ] S53: Based on the multi-objective vector function and the energy deviation constraint ΔE, a global dominance condition for obtaining the non-dominated sorting generation frontier set is constructed, which includes f diet (X a )≤f diet (X b )and f exercise (X a )≤f exercise (X b )and ΔE(x a )≤ΔE(X b ) Where: represents the population individual X a Dominate the population individual X on the diet goal b ; represents the population individual X a Dominate the population individual X on the moving target b ;e a,m represents the population individual X a duration or intensity of exercise type m; e b,m represents the population individual X b Duration or intensity of exercise type m; ΔE(X a )≤ΔE(X b ) represents the population individual X a The difference between total energy intake and expenditure is better, that is, closer to the energy balance target; a,j represents the population individual X a The nutrient content of the jth high-calorie food in x b,j Population individual X b The nutrient content of the jth high-calorie food in m Indicates the calorie consumption per unit time of exercise type m; S54: Initialize the population P0 according to the global dominance condition: And initialization operation: Get population individual X a The number of individuals in the dominated population n(Xa); Get population individual X a The dominating set S(X a ), if the population individual X b As a dominated individual in the population, the individual X b The number of individuals in the dominated population is defined as n(X b ); Screen the population individuals that satisfy ΔE≤∈ and obtain the feasible solution set P feasible , where ∈ represents the preset energy balance threshold; S55: According to the population P0 after the initialization operation, obtain the population individual X a The non-dominated sorting generates the frontier set {F1, F2, ...}, and the frontier set is the Pareto frontier set; Specifically include: S551: Get population individual X a The first frontier layer F1 is represented by F1={X a ∈P feasible |n(Xa)=0} ...... S552: For the current frontier layer F k The population individual X in a , traverse its dominating set S(X a ) and randomly assign individuals X b The number of individuals in the dominated population n(X b ) minus 1, and obtain the new population, the frontier layer F k Candidate set of Until the number of individuals in the dominated population n(X b ) is 0; Then the population individual X b As the candidate set H for the next frontier layer, we can obtain the k+1th frontier layer F k+1 , and the frontier layer F k+1 Expressed as F k+1 ={X b ∈H|ΔE(X b )≤ε} Then obtain the information about the individual X in the population i The non-dominated sorting generates the frontier set {F1, F2, ...}; S56: Obtain the frontier layer F in the frontier set generated by non-dominated sorting k The individual crowding degree of the population that satisfies the energy deviation constraint ΔE; And the method to obtain the individual crowding degree of the population is S561: According to the multi-objective vector function, the normalized objective function values of the individuals in each frontier layer of the non-dominated sorting generation frontier set are obtained respectively. Its expression is Where: represents the minimum value of the diet fitness or exercise fitness function; Indicates the maximum value of the diet fitness or exercise fitness function; S562: And according to the normalized objective function value Sort the population individuals in each frontier layer in ascending order to obtain a population individual sequence list; And based on the population individual sequence table, the crowding degree of the population individual in the frontier layer is obtained, and the crowding degree CD(X a ) is expressed as Where: Indicates the population individual sequence list and the population individual X a Normalized objective function values of individuals in adjacent populations; S57: According to the crowding degree of the population individuals, obtain the population individuals in each frontier layer that satisfy ΔE≤∈ and have the largest crowding degree of the population individuals, and use them as elite individuals; And the formula for obtaining elite individuals is Where: P elite Represents elite individuals; N elite represents the number of elite individuals; and P represents the number of parent populations in the current frontier layer; S58: Merge except elite individuals P elite The remaining non-elite individuals are used to obtain the non-elite individual population; And the merging method of non-elite individuals is S581: Generate a frontier set according to the non-dominated sorting and perform hierarchical sorting on each frontier layer, i.e., F1>F2>…; S582: After the hierarchical sorting, the non-elite individuals in each frontier layer are sorted in descending order of crowding to obtain the non-elite individual population P rest ; S59: Use the binary tournament selection method to select individuals from the non-elite individual population, obtain the optimal population individuals and use them as the parent population individuals, specifically including: From the non-elite individual population P rest Randomly select two individuals X from the population a ,X b ∈P rest ; And based on the priority selection strategy, obtain the population individual X a ,X b The preferred population individuals; And the expression of the priority selection strategy is Where: X patent represents the preferred population individual; Indicates the selection of population individual X a ,X b The population individual with a better frontier level in parent ; represents the population individual X a ,X b When the frontier levels are the same, the population individual with smaller crowding degree is selected as the preferred population individual X parent ; S60: Through a medical safety-oriented crossover operation, crossover mutation is performed on the parent population individuals of S59 to obtain the offspring population individuals; The medical safety-oriented crossover operation includes diet plan crossover operation, exercise plan crossover operation, diet variation operation and exercise variation operation; The expression of the diet crossover operation is Where: k represents the random cut point; I 非禁忌 represents the set of non-taboo food indexes obtained based on the known nutrient-disease relationship map; X A Represents the diet plan of individual A in the parent population, including the ingredients it chooses and the nutrient distribution; It represents the content of the dth nutrient in the i-th food in the parent population individual A; It represents the final content of the dth nutrient in the i-th food after the offspring population individual C inherits the diet plan of the parent population individual A or B; represents the content of the dth nutrient in the i-th food in the parent population individual B; d represents the dimension of the nutrient; A represents food; B represents the diet plan of the parent population individual B; The expression of the motion scheme crossover operation is Where: II(·) represents the indicator function that ensures that only crossing between common safe motion types is allowed; e C,m represents the duration of the offspring population individual C in motion type m; e A,m represents the duration of individual A in the parent population on movement type m; e B,m represents the duration of individual B in the parent population on movement type m; X B Represents the movement plan of individual B in the parent population; The expression of the diet variation operation is And i∈I 非禁忌 Where: represents the content of the dth nutrient in the i-th food in the offspring population individual C after the diet variation; δ represents the random perturbation value of the uniform distribution used to fine-tune the nutrient content; U(-0.1, 0.1) represents the uniform distribution interval that limits the variation range to avoid drastic changes; The expression of the motion mutation operation is: Where: Risk score (C,m) represents the risk score of movement type m in the offspring population individual C; P replace (m) represents the probability of replacing the high-risk sport m and if the replacement occurs, then e C,m ←0 and increase the safe exercise time e C,m′ ←e C,m' +Δt;e C,m′ Indicates the duration of the newly added safe movement type m′ after replacement; Δt indicates the preset safe movement duration increment; S61: Through the energy balance constraint correction strategy, the energy balance constraint is applied to the individuals in the population obtained in S60 to obtain the offspring population generated by crossover mutation; The energy balance constraint correction strategy includes the dietary adjustment rules and exercise compensation rules selected based on ΔE; If ΔE>1.1BMR is confirmed, dietary adjustment rules are selected; The expression of the diet adjustment rule is Where: I represents the content of the dth nutrient in the i-th high-calorie food in the offspring population; high-cal Represents an index set of high-calorie foods, which filters out high-calorie foods based on the nutrients they contain; ΔE represents the difference between energy intake and energy expenditure; If ΔE<0.9BMR, select the motion compensation rule The expression of the motion compensation rule is: Where: e child,m Indicates the duration or intensity of the offspring population individuals in the movement type m; Cal m Indicates the calorie consumption per unit time of exercise type m; Represents a set of safe motion types; S62: Merge the offspring population individuals and elite individuals as the new generation population; S63: Confirm whether the new generation population meets the iteration termination condition; The iteration termination condition includes whether any one of the Pareto front stability index, the maximum number of iterations index or the fitness convergence condition is met; The Pareto front stability index is: the frontier similarity of the population for five consecutive generations exceeds the similarity threshold θ and θ = 0.9; Maximum number of iterations: t≥T max =200; Fitness convergence condition: judge the fitness standard deviation σ(f diet ),σ(f exerfcise ) satisfies the fitness convergence condition: σ(f diet ),σ(f exercise )<0.05; If satisfied, then output the optimal solution set F1; Otherwise, return to S54.

6. The personalized diet and exercise combined recommendation method based on dynamic multi-objective optimization according to claim 5, characterized in that: The expression of the balance coefficient of the recommended strategy adjusted according to the activated biochemical indicator target set in S6 is: l new =λ old +η·(α·R compliance +(1-a)·D bio ) m new =μ old +η·(β·R compliance +(1-β)·D exercise ) Where: η represents the learning rate that limits the adjustment range; α, β represent the feedback weight coefficients of the feedback data of the user executing the optimal recommendation solution; Δ bio It indicates the normalized improvement of biochemical indicators; Δ exercise represents the deviation in movement completion, and R compliance Indicates the actual execution days / recommended days of the user, and according to R compliance With Δ bio Constructing a balance coefficient update strategy, which includes positive feedback strategy and negative feedback strategy; Positive feedback strategy: R compliance ≥0.8 and Δ bio >0, increase user preference weight (↑λ,↑μ) based on expert experience; negative feedback strategy: R compliance <0.5 and Δ bio <-0.1, the user preference weight is reduced (↓λ,↓μ) based on expert experience; and no adjustment is made in other cases except the positive feedback strategy and the negative feedback strategy.

Citation Information

Cited By

  • Dynamic recommendation and update evaluation system and method for personalized health management scheme

    CN121393934A