CN117174253A - Personalized ketogenic diet recommendation method and system - Google Patents

Personalized ketogenic diet recommendation method and system Download PDF

Info

Publication number
CN117174253A
CN117174253A CN202311137362.0A CN202311137362A CN117174253A CN 117174253 A CN117174253 A CN 117174253A CN 202311137362 A CN202311137362 A CN 202311137362A CN 117174253 A CN117174253 A CN 117174253A
Authority
CN
China
Prior art keywords
user
current user
information
score
candidate
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
CN202311137362.0A
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.)
First People's Hospital Of Zunyi Third Affiliated Hospital Of Zunyi Medical College
Original Assignee
First People's Hospital Of Zunyi Third Affiliated Hospital Of Zunyi Medical College
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 First People's Hospital Of Zunyi Third Affiliated Hospital Of Zunyi Medical College filed Critical First People's Hospital Of Zunyi Third Affiliated Hospital Of Zunyi Medical College
Priority to CN202311137362.0A priority Critical patent/CN117174253A/en
Publication of CN117174253A publication Critical patent/CN117174253A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Medical Treatment And Welfare Office Work (AREA)

Abstract

The application provides a personalized ketogenic diet recommendation method and a personalized ketogenic diet recommendation system, wherein the method comprises the following steps: basic information, disease information, food preference information and executive force information of a current user are obtained, wherein the basic information reveals the basic condition of the current user, the disease information reveals the disease condition of the current user, the food preference information reveals the food preference of the current user, and the executive force information reveals the executive force of the current user for eating according to a recommended recipe; determining a candidate user set based on basic information, disease information and food preference information of the current user, wherein the candidate user set comprises a plurality of candidate users similar to the current user; determining a matched target user from candidate users based on the execution force information of the current user; and recommending the ketogenic recipes for the current user based on the food preference information of the current user and the ketogenic recipes of the target user.

Description

Personalized ketogenic diet recommendation method and system
Technical Field
The application relates to the technical field of diet recommendation, in particular to a personalized ketogenic diet recommendation method and system.
Background
According to the related reports and professional data, the ketogenic diet plays an important role in promoting weight loss, preventing epileptic seizure, controlling diabetes, treating or preventing diseases such as parkinsonism, senile dementia, sleep disorder and even some cancer treatments. However, due to the differences among the individual conditions, disease types and other factors, it is difficult for individuals to clearly select a ketogenic diet regimen that is suitable for individuals in a truly defined manner. In the face of such a realistic environment, there are few related techniques and means for promoting weight loss without guidance of the related techniques or means in controlling or treating diseases so far, but these few related techniques and means have some common problems.
For example, traditional ketogenic diet guidance requires residents to medical institutions to consult doctors or nutritionists and other professionals, and the implementation process is tedious and inconvenient; however, the current intelligent management system for ketogenic diet is usually aimed at weight loss or disease in a certain aspect, and the demands of vast residents cannot be comprehensively summarized, so that the number of customers is small. The current ketogenic diet recommendation does not take into account the execution force difference problem of different users.
Disclosure of Invention
The embodiment of the application aims to provide a personalized ketogenic diet recommendation method and a personalized ketogenic diet recommendation system, which take the execution force difference of different users into consideration, combine the idea of collaborative filtering, conduct targeted ketogenic diet recommendation and improve the recommendation effect of ketogenic diets.
In order to achieve the above object, an embodiment of the present application is achieved by:
in a first aspect, an embodiment of the present application provides a personalized ketogenic diet recommendation method, including: basic information, disease information, food preference information and executive force information of a current user are obtained, wherein the basic information reveals the basic condition of the current user, the disease information reveals the disease condition of the current user, the food preference information reveals the food preference of the current user, and the executive force information reveals the executive force of the current user for eating according to a recommended recipe; determining a candidate user set based on basic information, disease information and food preference information of the current user, wherein the candidate user set comprises a plurality of candidate users similar to the current user; determining a matched target user from candidate users based on the execution force information of the current user; and recommending the ketogenic recipes for the current user based on the food preference information of the current user and the ketogenic recipes of the target user.
With reference to the first aspect, in a first possible implementation manner of the first aspect, determining the candidate user set based on the basic information, the disease information, and the food preference information of the current user includes: determining a first user group matched with the disease information based on the disease information of the current user; calculating the similarity between the current user and each first user based on the basic information and the food preference information of the current user and the basic information and the food preference information of each first user in the first user group; a set of candidate users is determined based on the similarity of the current user to each of the first users.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the basic information includes gender, age, height, weight, and basal metabolic rate, the food preference information includes food material category, taste, cooking mode, and the calculating the similarity between the current user and each first user based on the basic information and the food preference information of the current user and the basic information and the food preference information of each first user in the first user group includes: for each first user: matching the gender, age, height, weight and basic metabolic rate of the current user with the gender, age, height, weight and basic metabolic rate of the first user, and respectively calculating a gender matching score, an age matching score, a height matching score, a weight matching score and a basic metabolic rate matching score; matching the food material category, taste and cooking mode preferred by the current user with the food material category, taste and cooking mode preferred by the first user, and respectively calculating a food material matching score, a taste matching score and a cooking matching score; and carrying out weighted summation on the gender matching score, the age matching score, the height matching score, the weight matching score, the basic metabolic rate matching score, the food material matching score, the taste matching score and the cooking matching score, and calculating the similarity between the current user and the first user.
With reference to the first aspect, in a third possible implementation manner of the first aspect, the execution effort information of the candidate user includes an initial questionnaire execution effort score and daily ketogenic diet information, and the determining, based on the execution effort information of the current user, the matched target user from the candidate users includes: if the execution force information of the current user comprises an initial questionnaire execution force score but does not comprise daily ketogenic diet information, calculating a similarity index of the current user and the candidate user based on the initial questionnaire execution force score of the current user, the initial questionnaire execution force score of the candidate user and the daily ketogenic diet information; if the execution force information of the current user comprises an initial questionnaire execution force score and daily ketogenic diet information, calculating a similarity index of the current user and the candidate user based on the initial questionnaire execution force score and daily ketogenic diet information of the current user; and determining a matched target user from the candidate users based on the similarity index of the current user and the candidate users.
With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, calculating a similarity index between the current user and the candidate user based on the initial questionnaire execution force score of the current user, the initial questionnaire execution force score of the candidate user, and daily ketogenic diet information includes: for each candidate user: calculating a ketogenic diet executive force score of the candidate user based on daily ketogenic diet information of the candidate user; and calculating the similarity index of the current user and the candidate user based on the initial questionnaire execution force score and the ketogenic diet execution force score of the candidate user and the initial questionnaire execution force score of the current user.
With reference to the fourth possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, calculating a similarity index between the current user and the candidate user based on the initial questionnaire execution force score and the ketogenic diet execution force score of the candidate user, and the initial questionnaire execution force score of the current user includes: calculating an estimated diet executive score for the current user using the following formula:
wherein P is p Representing estimated diet executive force scores of the current user, n being the total number of candidate users and P o Performing a force score, P ', for an initial questionnaire of a current user' oi Performing a force score, P ', for an initial questionnaire of an ith candidate user' si Performing a force score, P, for the ketogenic diet of the ith candidate user total Is the set total score; the similarity index of the current user and the candidate user is calculated by adopting the following formula:
wherein delta i For the similarity index of the current user and the i-th candidate user, a and b are weights, and a+b=1 is satisfied.
With reference to the third possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, calculating a similarity index between the current user and the candidate user based on the initial questionnaire execution force score and the daily ketogenic diet information of the current user, the initial questionnaire execution force score and the daily ketogenic diet information of the candidate user includes: for each candidate user: calculating a questionnaire execution force fit index of the current user and the candidate user based on the initial questionnaire execution force score of the current user and the initial questionnaire execution force score of the candidate user; calculating a diet executive force fitting index of the current user and the candidate user based on the daily ketogenic diet information of the current user and the daily ketogenic diet information of the candidate user; and calculating the similarity index of the current user and the candidate user based on the questionnaire execution force fit index and the diet execution force fit index.
With reference to the sixth possible implementation manner of the first aspect, in a seventh possible implementation manner of the first aspect, calculating a questionnaire execution force fit index of the current user and the candidate user based on the initial questionnaire execution force score of the current user and the initial questionnaire execution force score of the candidate user includes: converting the initial questionnaire execution force score of the current user into an initial questionnaire score vector of the current user, wherein the initial questionnaire score vector reflects the score of each questionnaire topic of the initial questionnaire; converting the initial questionnaire execution force score of the candidate user into an initial questionnaire score vector of the candidate user; and calculating the vector similarity between the initial questionnaire score vector of the current user and the initial questionnaire score vector of the candidate user, and taking the vector similarity as a questionnaire execution force fit index of the current user and the candidate user.
With reference to the sixth possible implementation manner of the first aspect, in an eighth possible implementation manner of the first aspect, the daily ketogenic diet information includes a ketogenic diet of three meals and a corresponding weight, and the calculating the diet execution performance compliance index of the current user and the candidate user based on the daily ketogenic diet information of the current user and the daily ketogenic diet information of the candidate user includes: converting daily ketogenic diet information of a current user into an input vector of 3m multiplied by t dimensions, wherein m is the number of types of calibrated ketogenic diets, t is time, and the time is taken as a unit of day; converting daily ketogenic diet information of candidate users into input vectors of 3m multiplied by t dimensions; respectively inputting the input vector of the current user and the input vector of each candidate user into a preset feature extraction model to obtain the feature vector of the current user and the feature vector of the candidate user; and calculating the vector similarity between the characteristic vector of the current user and the characteristic vector of the candidate user, and taking the vector similarity as a diet execution force fit index of the current user and the candidate user.
In a second aspect, an embodiment of the present application provides a personalized ketogenic diet recommendation system, including a server and a plurality of terminals, where each terminal corresponds to a user, and the server is configured to run the personalized ketogenic diet recommendation method in the first aspect or any one of the possible implementation manners of the first aspect to determine a ketogenic diet of the user, and push the ketogenic diet to the corresponding terminal.
The beneficial effects are that:
1. and determining a candidate user set (a first matched user group is determined by using the disease information and similarity is calculated by using the basic information and the food preference information) through the basic information, the disease information and the food preference information of the current user, so that the consistency of the condition of the user can be ensured, the proximity degree of physique and taste can be ensured as much as possible, and the tabu diet is prevented from being recommended for the user. And determining a matched target user from candidate users by using the executive force information, wherein the executive force among different users (such as whether food is ingested according to recommended diet, the size of a stomach opening and the like) can be considered; the ketogenic recipes are recommended to the current user according to the food preference information of the current user and the ketogenic recipes of the target user, so that the recommendation effect of the ketogenic recipes can be improved, and the effect of positively guiding the diet intake of the user can be achieved to a certain extent.
2. The method comprises the steps that differentiated similarity index calculation is conducted aiming at the collection condition of executive force information of a current user (comprising an initial questionnaire executive force score but not comprising daily ketogenic diet information, or comprising the initial questionnaire executive force score and daily ketogenic diet information) so as to determine a proper target user, and the problem of entering recipe recommendation of the new user can be solved to a certain extent (in the prior art, the recipe recommendation of the new user is set in a recommendation mode or is high in recommendation heat degree, the actual condition of the user is hardly considered, the recommendation effect of the previous recipe recommendation is not improved, the effectiveness of the recipe recommendation of the later period is also not facilitated, and the fact that the recommended recipe of the previous period lacks effectiveness easily leads to poor executive force of the user, and the proper recipe is difficult to accurately recommend under the data support in the middle and later period, so that the recommendation effect is poor).
3. Aiming at the situation that the executive force information of the current user comprises an initial questionnaire executive force score but does not comprise daily ketogenic diet information, a corresponding index calculation mode is designed, through a large number of data supports, the estimated diet executive force score of the current user is estimated under the condition that the daily ketogenic diet information is absent, and the estimated diet executive force score is used as a calculation basis, so that the similarity among users can be reasonably calculated, and a target user is determined, so that a ketogenic diet is recommended for the current user.
4. Aiming at the situation that the executive force information of the current user comprises an initial questionnaire executive force score and daily ketogenic diet information, calculating a questionnaire executive force fit index by utilizing the initial questionnaire executive force score of the current user and the initial questionnaire executive force score of the candidate user; calculating a diet executive force fit index by using the daily ketogenic diet information of the current user and the daily ketogenic diet information of the candidate user; therefore, the similarity index of the current user and the candidate user is calculated, and the accuracy and the effectiveness of the similarity index can be ensured. When the diet execution force fitting index is calculated, the daily ketogenic diet information of the current user and the candidate user is respectively converted into input vectors with the dimension of 3m multiplied by t, m is the number of the types of calibrated ketogenic diets, t is the time, and the daily is taken as a unit; the designed feature extraction model is utilized to extract the feature vector of the current user and the feature vector of the candidate user respectively, the vector similarity is calculated to serve as the diet execution force fitting index of the current user and the candidate user, so that the feature vector is extracted by the light feature extraction model, the processing efficiency is greatly improved, the diet execution force fitting index calculated on the basis of the extracted feature vector can effectively reflect the similarity between the current user and the candidate user, and the target user is determined to ensure the recommendation effect of the ketogenic diet.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and should not be considered as limiting the scope, and other related drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a personalized ketogenic diet recommendation system provided in an embodiment of the present application.
Fig. 2 is a flowchart of a personalized ketogenic diet recommendation method provided in an embodiment of the present application.
Fig. 3 is a schematic diagram of a feature extraction model according to an embodiment of the present application.
Icon: 10-personalized ketogenic diet recommendation system; 11-a server; 12-terminal; 20-feature extraction model; 21-an input layer; 22-a feature extraction layer; 23-feature fusion layer; 24-output layer.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
Referring to fig. 1, fig. 1 is a schematic diagram of a personalized ketogenic diet recommendation system 10 according to an embodiment of the application. In this embodiment, the personalized ketogenic diet recommendation system 10 may include a server 11 (e.g. cloud server 11, server 11 cluster, etc.) and several terminals 12 (e.g. smart phone, tablet computer, etc.), each terminal 12 corresponds to one user, and the server 11 may operate the personalized ketogenic diet recommendation method to determine the ketogenic diet of the user and push the ketogenic diet to the corresponding terminal 12.
Referring to fig. 2, fig. 2 is a flowchart of a personalized ketogenic diet recommendation method according to an embodiment of the present application. In this embodiment, the personalized ketogenic diet recommendation method may include step S10, step S20, step S30, and step S40.
First, the server 11 may run step S10.
Step S10: basic information, disease information, food preference information and execution force information of a current user are obtained, wherein the basic information reveals basic conditions of the current user, the disease information reveals disease conditions of the current user, the food preference information reveals food preference of the current user, and the execution force information reveals execution force of eating according to a recommended recipe by the current user.
In the present embodiment, the server 11 may acquire basic information, disease information, food preference information, and execution force information of the current user collected through the user terminal 12. Basic information reveals basic conditions of the current user, such as gender, age, height, weight, basic metabolic rate and the like; the disease information reveals the current user's disease conditions, such as those of hypertension, hyperlipidemia, hyperglycemia, etc.; the food preference information reveals the food preference of the current user, such as meat, fish, vegetables, fruits, etc., or specific food types, etc., as well as favorite tastes such as sweet, spicy, sour, spicy, etc., and cooking modes such as steaming, braising, dry frying, stewing, cold dishes, etc.; the executive force information reveals the executive force of the current user eating according to the recommended recipe, various scores comprising executive force information collected through questionnaires can also be collected into daily ketogenic diet information for the user after a period of use, such as the type, the quantity and the like of ketogenic diets of three meals a day, and for reducing false checks of false alarms of the user, sectional weight statistics such as a plurality of different weight sections such as 50 g, 100 g, 150 g, 200 g and the like are adopted for ketogenic diets, so that the user can also conveniently estimate and report.
After obtaining the basic information, the disease information, the food preference information, and the execution force information of the current user, the server 11 may perform step S20.
Step S20: and determining a candidate user set based on the basic information, the disease information and the food preference information of the current user, wherein the candidate user set comprises a plurality of candidate users similar to the current user.
In this embodiment, in order to ensure consistency of disease conditions of the target user and the current user, and avoid recommending contraindicated diets to the current user (e.g. certain diseases cannot eat certain foods or minimize occurrence of such foods), the server 11 may determine, from the existing user library, a first user group with matching (preferably consistent) disease information based on the disease information of the current user.
Then, the server 11 may calculate the similarity of the current user to each first user based on the basic information and the food preference information of the current user, and the basic information and the food preference information of each first user in the first user group.
Illustratively, for each first user:
the server 11 may match the sex, age, height, weight and basal metabolic rate of the current user with the sex, age, height, weight and basal metabolic rate of the first user, and calculate a sex match score, an age match score, a height match score, a weight match score and a basal metabolic rate match score, respectively; and matching the food material category, taste and cooking mode preferred by the current user with the food material category, taste and cooking mode preferred by the first user, and respectively calculating a food material matching score, a taste matching score and a cooking matching score.
And then carrying out weighted summation on the gender matching score, the age matching score, the height matching score, the weight matching score, the basic metabolic rate matching score, the food material matching score, the taste matching score and the cooking matching score, and calculating the similarity between the current user and the first user. The design of each weight can be set according to the actual requirement, and will not be described here.
After determining the similarity between the current user and the first users, the server 11 may determine the candidate user set based on the similarity between the current user and each of the first users. For example, a fixed number or fixed proportion of the first users with the highest similarity are determined as similar candidate users, thereby generating a candidate user set.
After determining the candidate user set, the server 11 may perform step S30.
Step S30: and determining the matched target user from the candidate users based on the execution force information of the current user.
In this embodiment, the server 11 may differentially measure the similarity index according to the collection condition of the execution force information of the current user.
If the execution force information of the current user comprises the initial questionnaire execution force score but does not comprise daily ketogenic diet information, calculating the similarity index of the current user and the candidate user based on the initial questionnaire execution force score of the current user, the initial questionnaire execution force score of the candidate user and the daily ketogenic diet information.
For example, the server 11 may calculate the ketogenic diet performance score of the candidate user based on the daily ketogenic diet information of the candidate user. Here, the method of calculating the ketogenic diet performance score based on the daily ketogenic diet information may be a method of classifying the food types (e.g., meats, vegetables, fruits) of each meal in the daily ketogenic diet information of the candidate user, assigning a score by the classified weight, and calculating the average value of the scores of each meal, thereby obtaining the ketogenic diet performance score of the candidate user.
After calculating the ketogenic diet performance score of the candidate user, the server 11 may calculate the similarity index of the current user to the candidate user based on the initial questionnaire performance score and the ketogenic diet performance score of the candidate user, and the initial questionnaire performance score of the current user.
Specifically, the server 11 may calculate the estimated diet execution force score of the current user using the following formula:
wherein P is p Representing estimated diet executive force scores of the current user, n being the total number of candidate users and P o Performing a force score, P ', for an initial questionnaire of a current user' oi Performing a force score, P ', for an initial questionnaire of an ith candidate user' si Performing a force score, P, for the ketogenic diet of the ith candidate user total Is the set total score.
After calculating the estimated diet performance score of the current user, the server 11 may further calculate the similarity index between the current user and the candidate user using the following formula:
wherein delta i For the similarity index of the current user and the i-th candidate user, a and b are weights, and a+b=1 is satisfied.
If the execution force information of the current user includes an initial questionnaire execution force score and daily ketogenic diet information, the server 11 may calculate the similarity index of the current user and the candidate user based on the initial questionnaire execution force score and daily ketogenic diet information of the current user.
Illustratively, for each candidate user:
the server 11 may calculate a questionnaire execution force fit index of the current user with the candidate user based on the initial questionnaire execution force score of the current user and the initial questionnaire execution force score of the candidate user.
For example, the server 11 may convert an initial questionnaire execution force score (each item score containing execution force information of a survey in a questionnaire) of the current user into an initial questionnaire score vector of the current user, wherein the initial questionnaire score vector reflects a score of each questionnaire topic of the initial questionnaire. For example, the questionnaire contains 100 questions, each question has a score, and then the initial questionnaire score vector of the current user can be a 1×100 vector, and the value of each element in the initial questionnaire score vector is 0 or 1; of course, other types may be devised, for example, the score comprises multiple categories, such as 0, 0.2, 0.4, 0.6, 0.8, 1.0, with each element in the initial questionnaire score vector having a value of 0, 0.2, 0.4, 0.6, 0.8, 1.0.
Similarly, the server 11 may convert the initial questionnaire performance score of the candidate user into an initial questionnaire score vector of the candidate user.
After that, the server 11 can calculate the vector similarity between the initial questionnaire score vector of the current user and the initial questionnaire score vector of the candidate user as the questionnaire execution force fit index of the current user and the candidate user. The specific calculation method may be calculated by adopting a cosine similarity, a euclidean distance, a manhattan distance, and the like, and the embodiment uses the cosine similarity as an example, but is not limited thereto.
After calculating the questionnaire execution force fitting index of the current user and the candidate user, the server 11 may calculate the diet execution force fitting index of the current user and the candidate user based on the daily ketogenic diet information of the current user and the daily ketogenic diet information of the candidate user
For example, the server 11 converts the daily ketogenic diet information of the current user into an input vector of 3m×t dimensions, where 3 represents three meals a day (for the case of adding or subtracting meals such as fattening and losing weight, the details are not described here, 3 is changed to the corresponding number of meals), m is the number of kinds of rated ketogenic diets, t is time, and the unit of day. In this embodiment, the last 30 days are taken as an example, but not limited thereto, and in general, the data volume is preferably recorded throughout the year, but there is a problem that the data collection time is long, so this embodiment takes the last 30 days as an example, but the time length can be designed as needed in practice.
For example, if the number of kinds of rated ketogenic diets is 3, namely meat, vegetables and fruits, and t is 30, the server 11 may convert the daily ketogenic diet information of the current user into a 9×30-dimensional input vector.
Similarly, the server 11 may convert the daily ketogenic diet information of the candidate user into an input vector of 3m×t dimensions.
Then, the server 11 may input the input vector of the current user and the input vector of each candidate user into the preset feature extraction model 20, respectively, to obtain the feature vector of the current user and the feature vector of the candidate user.
Here, the designed feature extraction model 20 is an extremely lightweight feature extraction model 20, and as shown in fig. 3, the feature extraction model 20 may include an input layer 21, a feature extraction layer 22, a feature fusion layer 23, and an output layer 24.
An input layer 21 for generating different vector components based on the input vector, and inputting into the corresponding channels of the feature extraction layer 22.
And the feature extraction layer 22 includes a plurality of channels to perform convolution-pooling processing of different scales to extract feature components at different scales.
The feature fusion layer 23 is used for fusing the feature components extracted by each channel to obtain feature vectors. The output layer 24 outputs the extracted feature vector.
For example, taking a 9×30-dimensional input vector as an example, the feature extraction layer 22 of the feature extraction model 20 includes 7 channels, and each channel is provided with convolution units and pooling units (the number of convolution units and pooling units of different channels may be different or the same, but when the number of convolution units and pooling units of different channels is the same, the sizes of the convolution units and pooling unit designs of different channels are different).
Based on this, the input layer 21 can input an input vector of 9×30 dimensions into the first channel. The input layer 21 may extract a row combination corresponding to each meal to generate 3 feature components of 3×30 dimensions (each feature component of 3×30 dimensions corresponds to one meal), that is, a feature component of 3×30 dimensions for breakfast, a feature component of 3×30 dimensions for lunch, and a feature component of 3×30 dimensions for dinner, and input the feature components of the second, third, and fourth channels, respectively. And, the input layer 21 may extract the row combinations corresponding to each ketogenic diet, generate 3 3×30-dimensional feature components (each 3×30-dimensional feature component corresponds to one type of ketogenic diet), that is, the fifth channel, the sixth channel and the seventh channel are respectively input by the meat corresponding to one 3×30-dimensional feature component, the vegetable corresponding to one 3×30-dimensional feature component, and the fruit corresponding to one 3×30-dimensional feature component.
For example, the first channel has 2 convolution units and pooling units, the first convolution unit has a size of 3×3, the first pooling unit has a size of 3×1, the second convolution unit has a size of 3×3, and the second pooling unit has a size of 3×1. Then, the feature extraction process of the first channel is: the input vector of 9×30 is subjected to convolution of 3×3 (step size is 1), and 7×28 features are obtained; the characteristics of 5 multiplied by 28 are obtained through 3 multiplied by 1 average pooling; then, the characteristic of 3 multiplied by 26 is obtained through convolution of 3 multiplied by 3 (the step length is 1); and the one-dimensional characteristic of 1 multiplied by 26 is obtained through 3 multiplied by 1 average pooling.
The second channel has 2 convolution units, without using a pooling unit, the first convolution unit has a size of 2×3, and the second convolution unit has a size of 2×3. Then, the feature extraction process of the second channel is: the input vector of 3×30 is subjected to convolution of 2×3 (step size is 1), so as to obtain a feature of 2×28; and then convolved by 2×3 (step length of 1) to obtain 1×26 one-dimensional features.
The third channel, the fourth channel, the fifth channel, the sixth channel and the seventh channel are all similar to the second channel in design, the number of convolution units is 2, no pooling unit is used, the size of the first convolution unit is 2×3, and the size of the second convolution unit is 2×3. Then, the feature extraction process of the second channel is: the input vector of 3×30 is subjected to convolution of 2×3 (step size is 1), so as to obtain a feature of 2×28; and then convolved by 2×3 (step length of 1) to obtain 1×26 one-dimensional features.
And the feature fusion layer 23 is used for fusing the feature components extracted by each channel to obtain feature vectors. For example, taking serial fusion as an example, 7 1×26 one-dimensional features are respectively connected in series according to channel numbers, and a feature vector of 1×182 is obtained.
For each candidate user's input vector, the feature extraction model 20 (which may be a plurality of identical feature extraction models 20 to improve feature extraction efficiency) is used to perform identical feature extraction, so as to obtain the feature vector of each candidate user.
After that, the server 11 may calculate the vector similarity between the feature vector of the current user and the feature vector of the candidate user as the diet execution force fit index of the current user and the candidate user. For example, the cosine similarity between the feature vector of the current user and the feature vector of the candidate user is calculated, so as to obtain the diet execution force fit index of the current user and the candidate user.
After obtaining the questionnaire execution force fitting index and the diet execution force fitting index, the server 11 may calculate the similarity index between the current user and the candidate user based on the questionnaire execution force fitting index and the diet execution force fitting index. For example, the similarity index of the current user and the candidate user is calculated by a weighted summation mode, which is not limited herein.
In this way, the similarity index of the current user and each candidate user can be calculated, and then the matched target user is determined from the candidate users, for example, the candidate user with the highest similarity index is determined as the target user.
After determining the target user, the server 11 may perform step S40.
Step S40: and recommending the ketogenic recipes for the current user based on the food preference information of the current user and the ketogenic recipes of the target user.
After determining the target user, the server 11 may obtain the ketogenic recipes of the target user as a recommendation basis, and may further consider food preference information of the current user, such as specific meats, vegetables, fruits, tastes, etc., to determine recipes meeting the tastes of the current user, and recommend the ketogenic recipes to the current user.
Because the target user uses longer, the recipe is generally wider (e.g., the recipe is more than 25 in months), so a certain filtering (e.g., selecting 15 recommendations to the current user that better match the current user's taste) can be done. If the number of recipes of the target user does not meet the set condition (for example, only 12-15 recipes are used, and 25 recipes are not used), screening is not required. Or after a certain screening (for example, selecting 10 kinds), adding a part (for example, 5 kinds) of recipes meeting various requirements (for example, disease conditions, taste preferences and the like) of the user from the system, and recommending the recipes to the current user in combination.
In summary, the embodiment of the application provides a personalized ketogenic diet recommendation method and a personalized ketogenic diet recommendation system:
1. and determining a candidate user set (a first matched user group is determined by using the disease information and similarity is calculated by using the basic information and the food preference information) through the basic information, the disease information and the food preference information of the current user, so that the consistency of the condition of the user can be ensured, the proximity degree of physique and taste can be ensured as much as possible, and the tabu diet is prevented from being recommended for the user. And determining a matched target user from candidate users by using the executive force information, wherein the executive force among different users (such as whether food is ingested according to recommended diet, the size of a stomach opening and the like) can be considered; the ketogenic recipes are recommended to the current user according to the food preference information of the current user and the ketogenic recipes of the target user, so that the recommendation effect of the ketogenic recipes can be improved, and the effect of positively guiding the diet intake of the user can be achieved to a certain extent.
2. The method comprises the steps that differentiated similarity index calculation is conducted aiming at the collection condition of executive force information of a current user (comprising an initial questionnaire executive force score but not comprising daily ketogenic diet information, or comprising the initial questionnaire executive force score and daily ketogenic diet information) so as to determine a proper target user, and the problem of entering recipe recommendation of the new user can be solved to a certain extent (in the prior art, the recipe recommendation of the new user is set in a recommendation mode or is high in recommendation heat degree, the actual condition of the user is hardly considered, the recommendation effect of the previous recipe recommendation is not improved, the effectiveness of the recipe recommendation of the later period is also not facilitated, and the fact that the recommended recipe of the previous period lacks effectiveness easily leads to poor executive force of the user, and the proper recipe is difficult to accurately recommend under the data support in the middle and later period, so that the recommendation effect is poor).
3. Aiming at the situation that the executive force information of the current user comprises an initial questionnaire executive force score but does not comprise daily ketogenic diet information, a corresponding index calculation mode is designed, through a large number of data supports, the estimated diet executive force score of the current user is estimated under the condition that the daily ketogenic diet information is absent, and the estimated diet executive force score is used as a calculation basis, so that the similarity among users can be reasonably calculated, and a target user is determined, so that a ketogenic diet is recommended for the current user.
4. Aiming at the situation that the executive force information of the current user comprises an initial questionnaire executive force score and daily ketogenic diet information, calculating a questionnaire executive force fit index by utilizing the initial questionnaire executive force score of the current user and the initial questionnaire executive force score of the candidate user; calculating a diet executive force fit index by using the daily ketogenic diet information of the current user and the daily ketogenic diet information of the candidate user; therefore, the similarity index of the current user and the candidate user is calculated, and the accuracy and the effectiveness of the similarity index can be ensured. When the diet execution force fitting index is calculated, the daily ketogenic diet information of the current user and the candidate user is respectively converted into input vectors with the dimension of 3m multiplied by t, m is the number of the types of calibrated ketogenic diets, t is the time, and the daily is taken as a unit; the designed feature extraction model 20 is utilized to extract the feature vector of the current user and the feature vector of the candidate user respectively, so that the vector similarity is calculated and is used as the diet execution force fitting index of the current user and the candidate user, the feature vector is extracted by the light feature extraction model 20, the processing efficiency is greatly improved, and the diet execution force fitting index calculated on the basis of the extracted feature vector can effectively reflect the similarity between the current user and the candidate user, so that the target user is determined, and the recommendation effect of the ketogenic diet is ensured.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and variations will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. A personalized ketogenic diet recommendation method, comprising:
basic information, disease information, food preference information and executive force information of a current user are obtained, wherein the basic information reveals the basic condition of the current user, the disease information reveals the disease condition of the current user, the food preference information reveals the food preference of the current user, and the executive force information reveals the executive force of the current user for eating according to a recommended recipe;
determining a candidate user set based on basic information, disease information and food preference information of the current user, wherein the candidate user set comprises a plurality of candidate users similar to the current user;
determining a matched target user from candidate users based on the execution force information of the current user;
and recommending the ketogenic recipes for the current user based on the food preference information of the current user and the ketogenic recipes of the target user.
2. The personalized ketogenic diet recommendation method of claim 1, wherein determining the candidate user set based on the basic information, the disease information, the food preference information of the current user comprises:
determining a first user group matched with the disease information based on the disease information of the current user;
calculating the similarity between the current user and each first user based on the basic information and the food preference information of the current user and the basic information and the food preference information of each first user in the first user group;
a set of candidate users is determined based on the similarity of the current user to each of the first users.
3. The personalized ketogenic diet recommendation method of claim 2, wherein the basic information comprises gender, age, height, weight and basal metabolic rate, the food preference information comprises food category, taste, cooking mode, and the calculating of the similarity of the current user to each first user based on the basic information and the food preference information of the current user and the basic information and the food preference information of each first user in the first user group comprises:
for each first user:
matching the gender, age, height, weight and basic metabolic rate of the current user with the gender, age, height, weight and basic metabolic rate of the first user, and respectively calculating a gender matching score, an age matching score, a height matching score, a weight matching score and a basic metabolic rate matching score;
matching the food material category, taste and cooking mode preferred by the current user with the food material category, taste and cooking mode preferred by the first user, and respectively calculating a food material matching score, a taste matching score and a cooking matching score;
and carrying out weighted summation on the gender matching score, the age matching score, the height matching score, the weight matching score, the basic metabolic rate matching score, the food material matching score, the taste matching score and the cooking matching score, and calculating the similarity between the current user and the first user.
4. The personalized ketogenic diet recommendation method of claim 1, wherein the performance information of the candidate users comprises an initial questionnaire performance score and daily ketogenic diet information, and wherein determining the matched target user from the candidate users based on the performance information of the current user comprises:
if the execution force information of the current user comprises an initial questionnaire execution force score but does not comprise daily ketogenic diet information, calculating a similarity index of the current user and the candidate user based on the initial questionnaire execution force score of the current user, the initial questionnaire execution force score of the candidate user and the daily ketogenic diet information;
if the execution force information of the current user comprises an initial questionnaire execution force score and daily ketogenic diet information, calculating a similarity index of the current user and the candidate user based on the initial questionnaire execution force score and daily ketogenic diet information of the current user;
and determining a matched target user from the candidate users based on the similarity index of the current user and the candidate users.
5. The personalized ketogenic diet recommendation method of claim 4, wherein calculating a similarity index of the current user to the candidate user based on the initial questionnaire performance score of the current user, the initial questionnaire performance score of the candidate user, and the daily ketogenic diet information comprises:
for each candidate user:
calculating a ketogenic diet executive force score of the candidate user based on daily ketogenic diet information of the candidate user;
and calculating the similarity index of the current user and the candidate user based on the initial questionnaire execution force score and the ketogenic diet execution force score of the candidate user and the initial questionnaire execution force score of the current user.
6. The personalized ketogenic diet recommendation method of claim 5, wherein calculating a similarity index of the current user to the candidate user based on the initial questionnaire performance score and the ketogenic diet performance score of the candidate user, and the initial questionnaire performance score of the current user, comprises:
calculating an estimated diet executive score for the current user using the following formula:
wherein P is p Representing estimated diet executive force scores of the current user, n being the total number of candidate users and P o Performing a force score, P ', for an initial questionnaire of a current user' oi Performing a force score, P ', for an initial questionnaire of an ith candidate user' si Performing a force score, P, for the ketogenic diet of the ith candidate user total Is the set total score;
the similarity index of the current user and the candidate user is calculated by adopting the following formula:
wherein delta i For the similarity index of the current user and the i-th candidate user, a and b are weights, and a+b=1 is satisfied.
7. The personalized ketogenic diet recommendation method of claim 4, wherein calculating a similarity index of the current user to the candidate user based on the initial questionnaire performance score and the daily ketogenic diet information of the current user, the initial questionnaire performance score and the daily ketogenic diet information of the candidate user comprises:
for each candidate user:
calculating a questionnaire execution force fit index of the current user and the candidate user based on the initial questionnaire execution force score of the current user and the initial questionnaire execution force score of the candidate user;
calculating a diet executive force fitting index of the current user and the candidate user based on the daily ketogenic diet information of the current user and the daily ketogenic diet information of the candidate user;
and calculating the similarity index of the current user and the candidate user based on the questionnaire execution force fit index and the diet execution force fit index.
8. The personalized ketogenic diet recommendation method of claim 7, wherein calculating a questionnaire performance compliance index of the current user with the candidate user based on the initial questionnaire performance score of the current user and the initial questionnaire performance score of the candidate user comprises:
converting the initial questionnaire execution force score of the current user into an initial questionnaire score vector of the current user, wherein the initial questionnaire score vector reflects the score of each questionnaire topic of the initial questionnaire;
converting the initial questionnaire execution force score of the candidate user into an initial questionnaire score vector of the candidate user;
and calculating the vector similarity between the initial questionnaire score vector of the current user and the initial questionnaire score vector of the candidate user, and taking the vector similarity as a questionnaire execution force fit index of the current user and the candidate user.
9. The personalized ketogenic diet recommendation method of claim 7, wherein the daily ketogenic diet information comprises a ketogenic diet of three meals and a corresponding weight, and calculating a diet executive force compliance index of the current user and the candidate user based on the daily ketogenic diet information of the current user and the daily ketogenic diet information of the candidate user comprises:
converting daily ketogenic diet information of a current user into an input vector of 3m multiplied by t dimensions, wherein m is the number of types of calibrated ketogenic diets, t is time, and the time is taken as a unit of day;
converting daily ketogenic diet information of candidate users into input vectors of 3m multiplied by t dimensions;
respectively inputting the input vector of the current user and the input vector of each candidate user into a preset feature extraction model to obtain the feature vector of the current user and the feature vector of the candidate user;
and calculating the vector similarity between the characteristic vector of the current user and the characteristic vector of the candidate user, and taking the vector similarity as a diet execution force fit index of the current user and the candidate user.
10. A personalized ketogenic diet recommendation system comprising a server and a plurality of terminals, each terminal corresponding to a user, wherein the server is configured to run the personalized ketogenic diet recommendation method according to any one of claims 1-9 to determine a ketogenic recipe of the user and push the ketogenic recipe to the corresponding terminal.
CN202311137362.0A 2023-09-05 2023-09-05 Personalized ketogenic diet recommendation method and system Pending CN117174253A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311137362.0A CN117174253A (en) 2023-09-05 2023-09-05 Personalized ketogenic diet recommendation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311137362.0A CN117174253A (en) 2023-09-05 2023-09-05 Personalized ketogenic diet recommendation method and system

Publications (1)

Publication Number Publication Date
CN117174253A true CN117174253A (en) 2023-12-05

Family

ID=88929424

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311137362.0A Pending CN117174253A (en) 2023-09-05 2023-09-05 Personalized ketogenic diet recommendation method and system

Country Status (1)

Country Link
CN (1) CN117174253A (en)

Similar Documents

Publication Publication Date Title
US20230255520A1 (en) Glucose management recommendations based on nutritional information
De Choudhury et al. Characterizing dietary choices, nutrition, and language in food deserts via social media
US10817778B2 (en) Customized cooking utilizing deep learning neuromorphic computing of hyperspectral input
Vartanian et al. Modeling of food intake: a meta-analytic review
Ueda et al. Recipe recommendation method by considering the users preference and ingredient quantity of target recipe
Achananuparp et al. Extracting food substitutes from food diary via distributional similarity
Rokicki et al. Plate and prejudice: Gender differences in online cooking
Chavan et al. A recommender system for healthy food choices: building a hybrid model for recipe recommendations using big data sets
US20210057077A1 (en) Systems and methods for arranging transport of adapted nutrimental artifacts with user-defined restriction requirements using artificial intelligence
Karikome et al. A system for supporting dietary habits: planning menus and visualizing nutritional intake balance
KR102326540B1 (en) Methods for management of nutrition and disease using food images
JP7361358B2 (en) Recipe extraction device, recipe extraction method, and program
Nag et al. Pocket dietitian: Automated healthy dish recommendations by location
US12001796B2 (en) Methods and systems for personal recipe generation
CN117174253A (en) Personalized ketogenic diet recommendation method and system
Al-Saffar et al. Nutrition information estimation from food photos using machine learning based on multiple datasets
Nakamoto et al. Prediction of mental state from food images
CN114388102A (en) Diet recommendation method and device and electronic equipment
Nadamoto et al. Clustering for similar recipes in user-generated recipe sites based on main ingredients and main seasoning
Akkoyunlu et al. Exploring eating behaviours modelling for user clustering
Mejova et al. Comfort Foods and Community Connectedness: Investigating Diet Change during COVID-19 Using YouTube Videos on Twitter
Kusu et al. Searching cooking recipes by focusing on common ingredients
Rani et al. Product or Item‐Based Recommender System
Qiao et al. Privacy‐preserving dish‐recommendation for food nutrition through edging computing
KR102656629B1 (en) Dietary pattern setting system and method

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