CN112069382A - Multi-food nutrition proportioning method based on genetic algorithm - Google Patents

Multi-food nutrition proportioning method based on genetic algorithm Download PDF

Info

Publication number
CN112069382A
CN112069382A CN202010736982.6A CN202010736982A CN112069382A CN 112069382 A CN112069382 A CN 112069382A CN 202010736982 A CN202010736982 A CN 202010736982A CN 112069382 A CN112069382 A CN 112069382A
Authority
CN
China
Prior art keywords
food
genetic algorithm
probability
food material
food materials
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010736982.6A
Other languages
Chinese (zh)
Inventor
周凡
林格
邓贤杰
曾泓熹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sun Yat Sen University
National Sun Yat Sen University
Original Assignee
National Sun Yat Sen University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by National Sun Yat Sen University filed Critical National Sun Yat Sen University
Priority to CN202010736982.6A priority Critical patent/CN112069382A/en
Publication of CN112069382A publication Critical patent/CN112069382A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H20/00ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance
    • G16H20/60ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance relating to nutrition control, e.g. diets

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Genetics & Genomics (AREA)
  • Software Systems (AREA)
  • Biomedical Technology (AREA)
  • Computational Linguistics (AREA)
  • Evolutionary Computation (AREA)
  • Physiology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Nutrition Science (AREA)
  • Epidemiology (AREA)
  • Medical Informatics (AREA)
  • Primary Health Care (AREA)
  • Public Health (AREA)
  • Medical Treatment And Welfare Office Work (AREA)
  • General Preparation And Processing Of Foods (AREA)

Abstract

The invention discloses a multi-food nutrition proportioning method based on a genetic algorithm. The method comprises the following steps: creating a food material database; inputting required nutrients and recommended intake thereof by a user, and selecting alternative food materials; searching the food materials input by the user in a food material database, deriving corresponding nutrient components of the food materials, and constructing a linear programming equation by combining the nutrients input by the user and the recommended intake amount of the nutrients; solving the equation by using a genetic algorithm with improved cross probability and mutation probability, then eliminating food materials with too small weight and too close weight, and outputting a final food material proportioning scheme. The invention can improve the accuracy of nutritional catering and give the accurate quality of each food material; based on the improved genetic algorithm, the convergence rate of the algorithm can be effectively improved; the method overcomes the defect that the traditional algorithm can only provide one optimal solution, can generate a plurality of non-inferior solutions, and accordingly outputs diversified food material nutrition configuration schemes.

Description

Multi-food nutrition proportioning method based on genetic algorithm
Technical Field
The invention relates to the technical field of chronic disease management and control and intelligent catering, in particular to a multi-food nutrition proportioning method based on a genetic algorithm.
Background
The reasonable matching of diet has very important effect on the health of human body. Although food material matching can be reasonably carried out according to various national grade nutrition guidelines in theory, in the actual use process, the food material selected by the user may meet individual diet preference, but does not necessarily contain all required nutrients. The food materials specified by the traditional algorithm can meet the requirements of the nutrients of the user, but cannot necessarily meet the dietary preference of the user.
One of the prior arts at present is a technical scheme provided by "a method for matching specified food materials to achieve a specific nutritional goal", and the technology uses a gradient ascending algorithm to achieve the matching of the specified food materials to achieve the specific nutritional goal, thereby providing an effective way for intelligent food material matching. The technology has the defects that the obtained food material proportioning scheme is not high in accuracy and unstable, the nutrients of the specified food materials are not comprehensive, and the problem cannot be solved even if the quality of the food materials is changed.
Disclosure of Invention
The invention aims to overcome the defects of the existing method and provides a multi-food nutrition proportioning method based on a genetic algorithm. The invention solves the main problems that (1) how to combine the characteristics of various nutrient contents in food materials and accurately obtain the proper quality of each food material by utilizing a genetic algorithm so as to improve the accuracy of nutritional catering; (2) how to generate a plurality of non-inferior solutions instead of generating only one optimal solution, thereby enriching the selection of food material proportioning schemes and providing possibility for diversified catering.
In order to solve the problems, the invention provides a multi-food nutrition proportioning method based on a genetic algorithm, which comprises the following steps:
creating a food material database for storing the names of food materials and corresponding nutrient components thereof;
inputting required nutrients and recommended intake amount thereof by a user according to health guide, and selecting m food materials as alternative food materials;
searching the food material database for the m food materials input by the user and deriving corresponding nutrient components of the m food materials, and constructing a linear programming equation representing a single-target optimization problem by combining the nutrients input by the user and the recommended intake amount of the nutrients;
improving the cross probability and the variation probability of a genetic algorithm, and solving the linear programming equation by using the improved genetic algorithm to obtain an original food material proportioning scheme meeting the nutrients and the recommended intake thereof;
optimizing the original food material proportioning scheme, excluding food materials with too small weight and too close weight, and outputting a final food material proportioning scheme.
Preferably, the improvement of the cross probability of the genetic algorithm is specifically as follows:
cross probability PcThe method comprises the following steps:
Pc=0.8×(1-s)
where s is the similarity of two individuals, i.e., the crossover probability is negatively correlated with the similarity of two individuals, for increasing the probability that a superior individual will be inherited to the next generation.
Preferably, the improving the mutation probability of the genetic algorithm specifically comprises:
the dynamic variation probability calculation method is adopted, and the formula is as follows:
Figure BDA0002605440910000031
wherein p ismAs the mutation probability, pminTo the minimum mutation probability, pmaxIs the maximum variation probability, f is the current individual fitness, faveAverage fitness of all individuals, fminIs the minimum fitness in the current population, fmaxIs the maximum fitness in the current population.
The multi-food nutrition proportioning method based on the genetic algorithm can improve the accuracy of nutrition catering and give the accurate quality of each food material; based on the improved genetic algorithm, the convergence rate of the algorithm can be effectively improved; the method overcomes the defect that the traditional algorithm can only provide one optimal solution, can generate a plurality of non-inferior solutions, and accordingly outputs diversified food material nutrition configuration schemes.
Drawings
Fig. 1 is a general flow chart of a multi-food nutrition proportioning method based on a genetic algorithm according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a general flowchart of a multi-food nutrition proportioning method based on a genetic algorithm according to an embodiment of the present invention, as shown in fig. 1, the method comprising:
s1, creating a food material database for storing names of food materials and corresponding nutrient components;
s2, inputting required nutrients and recommended intake thereof by a user according to health guidelines, and selecting m food materials as alternative food materials;
s3, searching the food material database for the m food materials input by the user and deriving corresponding nutrient components, and constructing a linear programming equation representing a single-target optimization problem by combining the nutrients input by the user and the recommended intake amount of the nutrients;
s4, improving the crossover probability and the variation probability of the genetic algorithm, and solving the linear programming equation by using the improved genetic algorithm to obtain an original food material proportioning scheme meeting the nutrients and the recommended intake thereof;
and S5, optimizing the original food material proportioning scheme, excluding too-small and too-close food materials, and outputting a final food material proportioning scheme.
Step S3 is specifically as follows:
according to the m kinds of alternative food materials selected by the user and the recommended intake of n kinds of total nutrients, x is ordered1,x2,x3,…,xmRepresenting the respective weights of the m food materials, order AijWherein i is 1,2,3, …, m, j is 1,2,3, …, n represents the ithContent (percentage) of j-th group of nutrients in the breeding material, y1,y2,y3,…,ynRepresents the recommended intake of n nutrients.
To minimize the relative error D of each nutrient from the recommended intake, the optimization objective is:
Figure BDA0002605440910000041
at the same time, it is desirable that the relative error of each nutrient does not exceed 15%, for which the constraint:
0.85≤Dj≤1.15
finally, the multi-objective optimization problem is changed into a single objective, and a simple addition is adopted here, so that a final optimization problem is obtained:
Figure BDA0002605440910000051
Figure BDA0002605440910000052
step S4 is specifically as follows:
the method solves the single-target optimization problem by using a genetic algorithm and outputs an original food material proportioning scheme. In order to improve performance, the genetic algorithm is improved in cross probability and mutation probability.
And S4-1, initializing, and randomly initializing 100 individuals as an initial population.
S4-2, decoding the population, decoding the genotype of each individual to obtain the phenotype x epsilon RmPart of the food material (e.g. oil) only needs to be selected from one of the various alternatives, so a special encoding/decoding scheme is used.
For general food materials, a natural binary code-real number decoding scheme is adopted, and the genotype of a natural binary code form is mapped into the phenotype of real number with specified precision.
For the selected special food material, the decoding scheme is illustrated by taking oil as an example. Assume a total of 8 alternative oils and an upper limit of 20g per day for oil intake. Let xrawFor the real number obtained by the corresponding binary code transcoding, o represents the respective quantity of 8 alternative oils, and o is equal to R8,xraw∈[0,160]And then:
Figure BDA0002605440910000053
finally, the decoded o is put back to the correct corresponding position to obtain the decoded phenotype x.
And S4-3, calculating the fitness of each individual. Calculating the value of f (x), wherein the larger the value is, the smaller the fitness is
And S4-4, calculating the infeasibility and the infeasibility threshold. The formula is as follows:
Figure BDA0002605440910000061
Figure BDA0002605440910000062
wherein SpopRepresenting population number, z denotes infeasibility, zcrisRefers to the threshold of infeasibility, and 1/T refers to the annealing factor. The infeasibility threshold is a product of a stepwise decreasing annealing factor and the average infeasibility value of the current population.
And S4-5, rejecting the individuals with the infeasibility degree exceeding the infeasibility degree threshold value, and equivalently replacing the individuals with legal solutions with the minimum contemporary feasibility degrees.
S4-6, if the iteration number is larger than the maximum number or the improvement amount of the objective function is too small, go to step S4-9.
S4-7, executing a selection algorithm:
firstly, the fitness of all individuals of the population is calculated one by one. And then, the population is sorted from small to large according to the fitness. And dividing the sequencing result into three equal parts, wherein the first part is an individual with the highest fitness, the second part is an individual with the medium fitness, and the third part is an individual with lower fitness. And finally, directly eliminating the third individual, copying the first individual with high fitness, and entering the next generation along with the individuals which are not eliminated to offset the image of the reduction of the individuals generated by the elimination operation on the parent population. Due to the convenience of selection, the convergence speed of the algorithm can be greatly improved.
S4-8, executing a cross algorithm and a cross probability PcThe method comprises the following steps:
Pc=0.8×(1-s)
where s is the similarity of two individuals.
The crossing probability is not a fixed value, but is a value which changes continuously according to the difference of the similarity of the two individuals, the higher the similarity of the individuals is, the lower the crossing probability is, and the lower the similarity of the individuals is, the higher the crossing probability is. The operation speed of the algorithm is increased to a certain extent, but the probability of inheritance of excellent individuals to the next generation is increased, and the superiority of the population is ensured.
Then exchanging partial gene fragments of the two individuals according to the cross probability.
S4-9, in order to avoid the algorithm from converging to the local optimal solution, the method adopts a calculation method of dynamic variation probability, and the calculation formula is as follows:
Figure BDA0002605440910000071
wherein p ismAs the mutation probability, pminTo the minimum mutation probability, pmaxIs the maximum variation probability, f is the current individual fitness, faveAverage fitness of all individuals, fminIs the minimum fitness in the current population, fmaxIs the maximum fitness in the current population. Setting pmin0.01 and pmax=0.1。
S4-10, return to S4-2.
Step S5 is specifically as follows:
s5-1, selecting the non-seasoning-material-removing proportion to be less than 20g, and rounding to 1 g.
S5-2, excluding solutions that are too close. Only one of the main food materials (meat, cereal, fish, dairy products, bean products, fruits) is selected from the same food materials.
And S5-3, outputting a plurality of final food material proportioning schemes.
According to the multi-food nutrition proportioning method based on the genetic algorithm, the accuracy of nutrition catering can be improved, and the accurate quality of each food material is given; based on the improved genetic algorithm, the convergence rate of the algorithm can be effectively improved; the method overcomes the defect that the traditional algorithm can only provide one optimal solution, can generate a plurality of non-inferior solutions, and accordingly outputs diversified food material nutrition configuration schemes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
In addition, the method for matching multi-food nutrition based on genetic algorithm provided by the embodiment of the invention is described in detail above, and the principle and the implementation mode of the invention are explained by applying specific embodiments in the text, and the description of the above embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (3)

1. A multi-food nutrition proportioning method based on a genetic algorithm is characterized by comprising the following steps:
creating a food material database for storing the names of food materials and corresponding nutrient components thereof;
inputting required nutrients and recommended intake amount thereof by a user according to health guide, and selecting m food materials as alternative food materials;
searching the food material database for the m food materials input by the user and deriving corresponding nutrient components of the m food materials, and constructing a linear programming equation representing a single-target optimization problem by combining the nutrients input by the user and the recommended intake amount of the nutrients;
improving the cross probability and the variation probability of a genetic algorithm, and solving the linear programming equation by using the improved genetic algorithm to obtain an original food material proportioning scheme meeting the nutrients and the recommended intake thereof;
optimizing the original food material proportioning scheme, excluding food materials with too small weight and too close weight, and outputting a final food material proportioning scheme.
2. The multi-food nutrition proportioning method based on genetic algorithm as claimed in claim 1, wherein the improvement of the genetic algorithm for cross probability is specifically:
cross probability PcThe method comprises the following steps:
Pc=0.8×(1-s)
where s is the similarity of two individuals, i.e., the crossover probability is negatively correlated with the similarity of two individuals, for increasing the probability that a superior individual will be inherited to the next generation.
3. The multi-food nutrition proportioning method based on genetic algorithm as claimed in claim 1, wherein the improvement of the genetic algorithm for variation probability is specifically as follows:
the dynamic variation probability calculation method is adopted, and the formula is as follows:
Figure FDA0002605440900000021
wherein p ismAs the mutation probability, pminTo the minimum mutation probability, pmaxIs the maximum variation probability, f is the current individual fitness, faveIs average of all individualsAverage degree of adaptation, fminIs the minimum fitness in the current population, fmaxIs the maximum fitness in the current population.
CN202010736982.6A 2020-07-28 2020-07-28 Multi-food nutrition proportioning method based on genetic algorithm Pending CN112069382A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010736982.6A CN112069382A (en) 2020-07-28 2020-07-28 Multi-food nutrition proportioning method based on genetic algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010736982.6A CN112069382A (en) 2020-07-28 2020-07-28 Multi-food nutrition proportioning method based on genetic algorithm

Publications (1)

Publication Number Publication Date
CN112069382A true CN112069382A (en) 2020-12-11

Family

ID=73656753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010736982.6A Pending CN112069382A (en) 2020-07-28 2020-07-28 Multi-food nutrition proportioning method based on genetic algorithm

Country Status (1)

Country Link
CN (1) CN112069382A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11600375B2 (en) 2021-07-30 2023-03-07 Reviv Global Ltd Genetically personalized food recommendation systems and methods
US11894121B2 (en) 2021-08-06 2024-02-06 Reviv Global Ltd Prescriptive nutrition-based IV and IM infusion treatment formula creation systems and methods

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104615869A (en) * 2015-01-22 2015-05-13 广西大学 Multi-population simulated annealing hybrid genetic algorithm based on similarity expelling
CN105677852A (en) * 2016-01-07 2016-06-15 陕西师范大学 Personalized healthy diet recommendation service method
WO2019244508A1 (en) * 2018-06-21 2019-12-26 日本電信電話株式会社 Menu recommendation device, menu recommendation method, and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104615869A (en) * 2015-01-22 2015-05-13 广西大学 Multi-population simulated annealing hybrid genetic algorithm based on similarity expelling
CN105677852A (en) * 2016-01-07 2016-06-15 陕西师范大学 Personalized healthy diet recommendation service method
WO2019244508A1 (en) * 2018-06-21 2019-12-26 日本電信電話株式会社 Menu recommendation device, menu recommendation method, and program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李宁: ""基于多目标线性规划的智能营养配餐系统研究"", 《中国优秀硕士学位论文全文数据库 医药卫生科技辑》, no. 2020, pages 2 - 1 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11600375B2 (en) 2021-07-30 2023-03-07 Reviv Global Ltd Genetically personalized food recommendation systems and methods
US11894121B2 (en) 2021-08-06 2024-02-06 Reviv Global Ltd Prescriptive nutrition-based IV and IM infusion treatment formula creation systems and methods

Similar Documents

Publication Publication Date Title
CN106227722B (en) A kind of extraction method based on listed company's bulletin abstract
Oluwatayo et al. Comparative analysis of technical efficiency of catfish farms using different technologies in Lagos State, Nigeria: a Data Envelopment Analysis (DEA) approach
CN112069382A (en) Multi-food nutrition proportioning method based on genetic algorithm
Yasutomi The emergence and collapse of money
CN109727590A (en) Music generating method and device based on Recognition with Recurrent Neural Network
CN102163249B (en) Interactive evolution optimization method for curtain design
CN109816438A (en) Information-pushing method and device
CN1524460A (en) Method for establishing mixed expert system of maintaining cigarette leaf group formulation
CN108665322A (en) The construction method of grain ration Consumption forecast model, Consumption forecast method and device
García-Hernández et al. A novel multi-objective interactive coral reefs optimization algorithm for the unequal area facility layout problem
CN107220708A (en) Adaptive simulated annealing genetic algorithm for sleep cerebral electricity feature selecting by stages
CN117198466B (en) Diet management method and system for kidney disease patients
CN116434915A (en) Management method and system for guaranteeing balanced dietary nutrition of children
Rusdiyanto et al. Analysis of decision support systems on recommended sales of the best ornamental plants by type
CN114329233A (en) Cross-region cross-scoring collaborative filtering recommendation method and system
CN116170328A (en) Method and device for predicting bandwidth used for graphic coding
CN111986779A (en) Menu recommendation method combining multi-target linear programming and genetic algorithm
CN101419454B (en) Cigarette recipe maintenance method based on artificial immunity method
Kaldirim et al. Application of a multi-objective genetic algorithm to the modified diet problem
Chen et al. Forecasting Nonlinear Time Series Using an Adaptive Nonlinear Grey Bernoulli Model: Cases of Energy Consumption.
CN106815656A (en) Picture capturing method is dispatched in a kind of step reservoir accumulation of energy
Kong et al. Ecological multi-objective joint optimized scheduling of cascade hydropower plants based on improved marine predators algorithm
Turekulova et al. Improvement of indicators of socio-economic development of the regions of Kazakhstan
Sipahutar et al. Determining fish features decision support system (DSS) with oreste method
CN110659362A (en) Recommendation method and system for automatically adjusting candidate range

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination