Recipe recommendation method, device, electronic device and storage medium
By obtaining the user's basic information, exercise information and health information, calculating energy needs and adjusting the weight of food, and generating personalized recipe recommendations, the problem of inaccurate recipe recommendations in the existing technology is solved and user satisfaction is improved.
Patent Information
- Application Number
- CN202110065106.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-18
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2041-03-21
AI Technical Summary
Existing recipe recommendation techniques cannot personalize recipe recommendations to users, resulting in low user satisfaction with recommended recipes.
By obtaining the user's basic information, exercise information and health information, the user's energy needs are calculated, and candidate recipes are generated based on candidate foods, and finally the weight of each food is adjusted according to the energy needs to generate the target recommended recipe.
It realizes accurate and personalized recipe recommendations to users, and improves users' satisfaction with recommended recipes.
Smart Images

Figure CN112786154B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to the technical field of recipe recommendation, and more particularly to a recipe recommendation method, device, electronic device and storage medium. Background Art
[0002] As people's living standards gradually improve, healthy eating has become a major theme in people's diet. In related technologies, recipe recommendations are usually made based on the user's emotions, which only meets the user's taste preferences, emotional state, etc. Under the increasing user demand, the recommended recipes have limitations. For example, it is impossible to make accurate recommendations for user-personalized recipes, which seriously affects the user's satisfaction with the recommended recipes. Therefore, improvements are needed. Summary of the invention
[0003] In view of the above-mentioned defects or deficiencies in the prior art, it is desirable to provide a recipe recommendation method, device, electronic device and storage medium to provide users with more refined recommended recipes.
[0004] Some embodiments of the present disclosure provide a recipe recommendation method, comprising:
[0005] Obtain the user's basic information, exercise information and health information;
[0006] Acquire the energy demand of the user according to the basic information and the motion information;
[0007] Obtaining candidate foods according to the health information;
[0008] Generating candidate recipes based on the candidate foods;
[0009] According to the energy requirement, the weight of each candidate food in the candidate recipe is obtained, and a target recommended recipe is generated based on the weight and the candidate recipe.
[0010] In some embodiments, the exercise information includes the user's exercise level within a preset time period, and obtaining the user's energy demand based on the basic information and the exercise information includes:
[0011] Acquire the basal metabolic rate of the user according to the basic information;
[0012] According to the exercise level in the preset time period and the pre-stored mapping relationship between the exercise level and the physical activity level coefficient, obtaining the physical activity level coefficient corresponding to the exercise level;
[0013] The energy requirement of the user is obtained according to the basal metabolic rate and the body activity level coefficient.
[0014] In some embodiments, the basic information includes personality characteristic parameters of the user, and the personality characteristic parameters include the user's taste preference food. According to the health information, obtaining candidate food includes:
[0015] Access nutrition claims on foods;
[0016] Obtaining initial candidate foods based on the health information and the nutritional claims of the foods;
[0017] For each of the initial candidate foods, calculating the similarity between the initial candidate foods and the preferred taste foods;
[0018] The M initial candidate foods with the highest similarity are used as the candidate foods, where M is a natural number greater than or equal to 1.
[0019] In some embodiments, the personality characteristic parameter also includes the user's taboo foods, and before calculating the similarity between each of the initial candidate foods and the preferred food, the method further includes:
[0020] The initial candidate foods are filtered according to the taboo foods to obtain the filtered initial candidate foods.
[0021] In some embodiments, the nutritional claims of the food obtained include:
[0022] Obtaining an ingredient library including each ingredient and its nutritional claim, wherein the ingredient corresponds to at least one nutritional claim, and the nutritional claim includes a quantifiable nutritional claim and a non-quantifiable nutritional claim;
[0023] Obtain a list of ingredients corresponding to any of the foods and the weight of each ingredient in the list of ingredients;
[0024] Determine the weight proportion of the main ingredients and the auxiliary ingredients in the food according to the weight of each ingredient;
[0025] Determine whether the weight proportion of the auxiliary ingredients in the food is greater than a preset threshold;
[0026] If yes, then obtaining the quantifiable nutritional claims corresponding to the auxiliary ingredients, and using the nutritional claims corresponding to the main ingredients and the quantifiable nutritional claims corresponding to the auxiliary ingredients as the nutritional claims of the food;
[0027] If not, the nutritional claim of the main ingredient shall be used as the nutritional claim of the food.
[0028] In some embodiments, based on the main ingredient information, cooking methods and nutritional claims corresponding to the initial candidate food, the similarity between the initial candidate food and the preferred food is calculated using the following formula:
[0029] Similarity=Sim 主要食材 +Sim 烹饪方法 +Sim 营养声称
[0030] Wherein, Similarity is the similarity value between the initial candidate food and the preferred food, Sim 主要食材 is the similarity between the main ingredient information corresponding to the initial candidate food and the main ingredient information corresponding to the preferred food, Sim 烹饪方法 is the similarity between the cooking method corresponding to the initial food and the cooking method corresponding to the preferred food, Sim 营养声称 It is the similarity between the nutritional claim corresponding to the initial food and the nutritional claim corresponding to the taste preference food.
[0031] In some embodiments, generating a candidate recipe based on the candidate food includes:
[0032] Acquire a preset recipe combination strategy corresponding to the user, wherein the preset recipe combination strategy includes food types included in the candidate recipes for three meals of the user;
[0033] Obtaining three meal types corresponding to the candidate food to be recommended;
[0034] A candidate recipe is generated according to the preset recipe combination strategy, the three meal types and the candidate food.
[0035] In some embodiments, the three meals have an energy supply ratio that provides a total daily energy requirement, and obtaining the weight of each candidate food in the candidate recipe according to the energy requirement includes:
[0036] Determining the energy supply requirement of the candidate recipe according to the energy requirement and the energy supply ratio;
[0037] Constructing a nutrient weight equation of the candidate food according to the energy supply requirement and each candidate food in the candidate recipe;
[0038] The nutrient weight equation is solved to obtain the weight of each candidate food, and a target recommended recipe is generated based on the weight and the candidate recipes.
[0039] In some embodiments, the nutrient weight equation is:
[0040]
[0041] Among them, m is the number of candidate foods, x m is the weight of the mth food, fat m is the weight of fat contained in the mth food per unit weight, protein m The weight of protein contained in the mth food per unit weight, carbohydrate m is the weight of carbohydrates contained in the mth food per unit weight, and n is any one of the three meals.
[0042] In some embodiments, solving the nutrient weight equation to obtain the weight of each candidate food includes:
[0043] When the number of the candidate foods in the candidate recipe is greater than a preset number, the nutrient weight equation is solved using a particle swarm algorithm to obtain a preset number of candidate weight combinations, wherein the candidate weight combination is a weight set of each food in the candidate recipe;
[0044] Obtaining nutritional difference parameters of each of the candidate weight combinations;
[0045] Taking the candidate weight combination with the smallest nutritional difference parameter as the target weight combination;
[0046] The target recommended recipe is generated based on the candidate recipes and the target weight combination.
[0047] In some embodiments, the nutritional difference parameter of each candidate weight combination is obtained using the following formula:
[0048]
[0049] in, is the sum of the fat weight provided by each candidate food in the candidate recipe, is the sum of the protein weights provided by each candidate food in the candidate recipe, The sum of the carbohydrate weights provided by each candidate food in the candidate recipe.
[0050] In some embodiments, the obtaining of the user's basic information, exercise information, and health information includes:
[0051] Calling an editing interface for basic information, wherein the editing interface includes a collection control for the basic information;
[0052] Monitor the acquisition control to obtain basic information of the user;
[0053] Communicate with at least one service platform, and receive the exercise information and / or the health information of the user sent by the at least one service platform.
[0054] Some embodiments of the present disclosure provide a recipe recommendation device, comprising:
[0055] The first acquisition module is used to acquire the user's basic information, exercise information and health information;
[0056] A second acquisition module, configured to acquire the energy demand of the user according to the basic information and the motion information;
[0057] A third acquisition module, used to acquire candidate foods according to the health information;
[0058] A first generating module, used for generating a candidate recipe according to the candidate food;
[0059] The second generating module is used to obtain the weight of each candidate food in the candidate recipe according to the energy requirement, and generate a target recommended recipe based on the weight and the candidate recipe.
[0060] Some embodiments of the present disclosure provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a recipe recommendation method proposed in the present disclosure is implemented.
[0061] Some embodiments of the present disclosure provide a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements a recipe recommendation method proposed in the present disclosure.
[0062] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0064] Figure 1 A diagram showing an implementation environment architecture of a recipe recommendation method provided by some embodiments of the present application;
[0065] Figure 2 A schematic diagram showing a process flow of a recipe recommendation method provided in some embodiments of the present application is shown;
[0066] Figure 3 A schematic diagram showing a process flow of a recipe recommendation method provided in some embodiments of the present application is shown;
[0067] Figure 4 A schematic diagram showing a process flow of a recipe recommendation method provided in some embodiments of the present application is shown;
[0068] Figure 5 A schematic diagram showing a process flow of a recipe recommendation method provided in some embodiments of the present application is shown;
[0069] Figure 6 A schematic diagram showing a process flow of a recipe recommendation method provided in some embodiments of the present application is shown;
[0070] Figure 7 A schematic diagram showing a terminal device displaying a target recommended recipe according to an embodiment of the present application is shown;
[0071] Figure 8 A schematic diagram showing a process flow of a recipe recommendation method provided in some embodiments of the present application is shown;
[0072] Fig. 9 An exemplary structural block diagram of a recipe recommendation device provided in some embodiments of the present application is shown;
[0073] Fig.10 An exemplary structural block diagram of a recipe recommendation device provided in some other embodiments of the present application is shown;
[0074] Fig.11 A schematic diagram of the structure of a computer system of an electronic device or server suitable for implementing an embodiment of the present application is shown. DETAILED DESCRIPTION
[0075] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.
[0076] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0077] For the specific implementation environment of the recipe recommendation method proposed in this application, see Figure 1 . Figure 1 The following is a diagram showing the implementation environment architecture of the recipe recommendation method provided in an embodiment of the present application.
[0078] like Figure 1 As shown, the implementation environment architecture includes: a terminal device 101 and a server 102 .
[0079] The terminal device 101 is used to display an interactive interface for inputting basic information, exercise information, health information and other information data to the user, and to display the final target recommended recipe. The terminal device can be a desktop computer, a laptop computer, a smart phone, a tablet computer, smart glasses, a smart watch and other devices, but is not limited thereto.
[0080] The server 102 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server 102 is used to provide the terminal device 101 with target recommended recipes that meet the user's energy requirements.
[0081] For example, the recipe recommendation method provided in some embodiments of the present application can be executed by the above-mentioned terminal device 101, and can also be executed by the above-mentioned server 102. When executed by the server 102, the server 102 can send the target recommended recipe to the terminal device 101 for display, and the terminal device 101 can send at least one of the user's basic information, exercise information, and health information to the server 102.
[0082] For example, the terminal device 101 and the server 102 are directly or indirectly connected via wired or wireless communication. Optionally, the wireless network or wired network uses standard communication technology and / or protocols. The network is usually the Internet, and can also be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a private network or any combination of a virtual private network.
[0083] The recipe recommendation method proposed in the present application can be implemented by a recipe recommendation device, and the recipe recommendation device can be installed on a terminal device or a server.
[0084] In order to further illustrate the technical solution provided by the embodiment of the present application, this is described in detail below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiment of the present application provides the method operation instruction steps shown in the following embodiments or drawings, more or less operation instruction steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiment of the present application. The method may be executed in the order of the method shown in the embodiment or drawings or in parallel during the actual processing process or when the device is executed.
[0085] Please refer to Figure 2 , Figure 2 FIG. 1 is a flow chart of a recipe recommendation method provided by an embodiment of the present application. Figure 2 As shown, the method includes:
[0086] Step 201, obtaining the user's basic information, exercise information and health information.
[0087] The basic information of the user may include but is not limited to at least one of the user's nickname, gender, height, weight, age and personality characteristic parameters, wherein the personality characteristic parameters are used to express the user's taste preferences and / or food taboos, etc.
[0088] The exercise information may include the user's exercise level within a preset time period, wherein the exercise level may be obtained based on data such as exercise type, exercise time, and exercise frequency. The preset time period may be, for example, a week or a month, and is not limited here. For example, real-time updated exercise information may be obtained every preset time period, and calculation may be performed based on the latest exercise information.
[0089] Health information may include the user's medical history, current abnormal physiological state, etc.
[0090] It should be understood that the user's basic information and health information can be obtained, for example, through the interactive interface of the terminal device, that is, the user is required to input through the interactive interface of the terminal device. The user's health information can also be obtained by docking with the physical examination system, for example, to capture the user's health information in the physical examination system. The user's motion information can be collected through the terminal device and / or other motion information collection devices bound to the terminal device or the user account. For example, the terminal device obtains the user's motion information by transmitting data with a sports wristband worn by the user. For example, the collection and upload cycle can be set, for example, the acquired motion information is sent to the server or terminal device for calculation every preset time period.
[0091] It should also be understood that the interactive interface of the terminal device can be provided by an application App (Application) loaded in the terminal device, that is, when the user uses the terminal device, he or she touches the application App to open it, and the application App calls and displays an interactive interface that can receive the user's basic information and health information.
[0092] Specifically, obtaining the user's basic information, exercise information, and health information includes: calling the basic information editing interface, which includes a basic information collection control; monitoring the collection control to obtain the user's basic information; communicating with at least one business platform, and receiving the user's exercise information and / or health information sent by at least one business platform. The business platform may be a health assistant.
[0093] Among them, the executor of the acquisition operation can be a terminal device. The terminal device calls the editing interface of the basic information, and the user enters the basic information on the collection control of the editing interface. The terminal device obtains the user's basic information by monitoring the collection control. The business platform can be, for example, a data platform built into a sports bracelet, a data platform corresponding to a physical examination system, etc., so as to obtain the user's sports information through the sports bracelet, and obtain the user's health information through the physical examination system.
[0094] Step 202: Obtain the energy demand of the user based on the basic information and exercise information.
[0095] It should be noted that in order to maintain the user's physical health, it is necessary to determine the user's energy intake needs based on the user's basic information and exercise information, so as to prevent the user's recipe recommendations from providing excessive energy that causes the user to have overnutrition, or providing energy that does not meet the user's needs, causing the user to feel weak and unable to meet work and life needs.
[0096] Step 203, obtaining candidate foods based on the health information.
[0097] When selecting candidate foods, the user's health information is first considered. For example, if the user has a history of diabetes, the selected candidate foods do not include foods high in sugar or with a high glycemic index.
[0098] Optionally, the health information may also include the current abnormal physiological state, wherein the abnormal physiological state may include, for example, getting angry, etc. Specifically, when the user's facial expression is photographed and recognized by a camera to obtain the user's current health information, it may also be checked whether there are abnormalities on the user's face caused by getting angry, such as boils, mouth ulcers, etc. Of course, the health information may also be input by the user according to his or her own physical condition. It should be understood that when an abnormal physiological state exists, candidate foods also need to be excluded. For example, when the user gets angry, spicy and irritating foods are not included in the candidate foods.
[0099] Step 204, generating candidate recipes based on the candidate foods.
[0100] Specifically, generating candidate recipes based on candidate foods includes: obtaining a preset recipe combination strategy corresponding to the user, the preset recipe combination strategy including food types included in the candidate recipes for the user's three meals (for example, breakfast, lunch, and dinner in a day); obtaining the three meal types corresponding to the candidate foods to be recommended; generating candidate recipes based on the preset recipe combination strategy, the three meal types and the candidate foods.
[0101] Among them, the preset recipe combination strategy can be the food types included in the target recommended recipe. For example, the preset recipe combination strategy for breakfast may include eggs, milk and cereals, the preset recipe combination strategy for lunch may include staple foods, meat dishes, vegetarian dishes, soups and fruits, and the preset recipe combination strategy for dinner may include staple foods, meat dishes, vegetarian dishes, yogurt and nuts, etc.
[0102] Preferably, the preset recipe combination strategy can be formulated according to the "Dietary Guidelines for Chinese Residents", including daily combinations of cereals, vegetables, dairy products, meat, fruits, aquatic products, soy products, nuts, etc.
[0103] It should be understood that the preset recipe combination strategy can be set by users according to their dietary needs and preferences. Some users like Chinese breakfast, so the corresponding preset recipe combination strategy for breakfast is porridge, vegetables, or soy milk, eggs and fried dough sticks, etc. Some users like Western breakfast, so the corresponding preset recipe combination strategy for breakfast is eggs and milk, etc.
[0104] Specifically, food labels can be made according to the type of food. For example, food labels for rice, steamed buns, flower rolls, cakes, etc. are staple foods, foods containing more meat, such as sweet and sour spare ribs, have corresponding food labels as meat dishes, and foods cooked with vegetables, such as eggplant puree with garlic, have corresponding food labels as vegetarian dishes. After obtaining the candidate foods, the target recipe label set is extracted from the preset recipe combination strategy. For example, when recommending breakfast, the target recipe label set can be {eggs, milk, cereals}, and when recommending lunch, the target recipe label can be {staple food, meat dishes, vegetarian dishes, soup, fruit}. Foods that meet the target recipe labels are selected from the candidate foods to form a food set, and the food set is used as a candidate recipe. Thus, the present application can further improve the degree to which the candidate foods in the candidate recipes meet the user's personalization through the preset recipe combination strategy. The preset three meals a day food matching plan can not only meet the dietary nutritional needs, but also conform to people's daily eating habits, so as to achieve the goal of meat and vegetable matching and balanced nutrition.
[0105] Step 205, obtaining the weight of each candidate food in the candidate recipe according to the energy requirement, and generating a target recommended recipe based on the weight and the candidate recipe.
[0106] That is to say, after selecting candidate recipes based on the user's health information, it is necessary to further determine the intake weight when recommending recipes based on energy needs, so as to achieve refined recipe recommendations.
[0107] Specifically, when a user needs to make a recipe recommendation, the user's basic information, exercise information and health information can be obtained first, and then the energy requirement is determined based on the basic information and exercise information. Based on the health information, candidate foods are obtained, and then candidate recipes are generated based on the preset recipe combination strategy and candidate foods. After determining the candidate recipes, the weight of each food in the candidate recipes is further determined based on the energy requirement, thereby forming a multi-dimensional, high-precision target recommendation recipe that meets health, exercise and personal preferences.
[0108] Therefore, a recipe recommendation method proposed in an embodiment of the present application can comprehensively consider the user's basic information, exercise information and health information, so that the recommended target recipes can meet the user's personalized, precise and diversified healthy diet needs.
[0109] As a feasible embodiment, the exercise information includes the user's exercise level within a preset time period. Figure 3 As shown, based on the basic information and exercise information, the user's energy needs are obtained, including:
[0110] Step 301, obtaining the user's basal metabolic rate according to basic information.
[0111] Among them, the height, weight, age and gender information in the user's basic information are extracted, and then the user's basal metabolic rate BMR is calculated according to the following formula:
[0112]
[0113] For example, in the above formula, the unit of weight is kilogram (kg), the unit of height is meter (m), the unit of age is year, and the unit of BMR is kilocalorie (kcal).
[0114] Step 302, obtaining the body activity level coefficient corresponding to the exercise level according to the exercise level in the preset time period and the pre-stored mapping relationship between the exercise level and the body level coefficient.
[0115] Among them, the physical activity level coefficient It is a coefficient related to people's exercise / work status over a period of time. The period of time (i.e., a preset time period) is, for example, a week. If a person exercises a lot or does heavy physical work in a week, then the physical activity level coefficient If a person has little physical activity or does light physical work during the week, then the physical activity level coefficient Smaller. The change is [1.2, 1.9].
[0116] The level of exercise can be divided according to the actual exercise situation of the user. For example, people who sit in the office or classroom for a long time and rarely exercise or do not exercise at all, the level of exercise is determined to be level 1. People who occasionally exercise or walk, go shopping, go to the suburbs, and exercise a small amount of about 1-3 times a week have an exercise level of 2. People who have the habit of continuous exercise or go to the gym and exercise about 3-5 times a week have an exercise level of 3. People who love sports and exercise 6-7 times a week or have a considerable workload have an exercise level of 4. People whose work or daily routine requires a lot of labor and consumes a lot of energy have an exercise level of 5. Among them, the mapping relationship between the pre-stored exercise level and the physical activity level coefficient can be: The physical activity level coefficient corresponding to the exercise level 1 is: The physical activity level coefficient corresponding to the level 2 of exercise volume is The physical activity level coefficient corresponding to level 3 of exercise volume is The physical activity level coefficient corresponding to the level 4 of exercise volume is = 1.7, and the physical activity level coefficient corresponding to the level 5 of exercise volume is
[0117] It should be understood that the exercise level can be determined based on the frequency, time and type of user exercise sent by the service platform within a preset time, through a preset analysis function, analysis rules and / or a trained deep learning model, and this application does not make any specific limitations here.
[0118] It should be noted that since people's daily exercise / work status changes dynamically, it is necessary to adjust the physical activity level coefficient by obtaining the user's exercise / work status in real time. The size of the meal can be used to determine the total energy required by the user, making the recipe recommendation function more accurate.
[0119] Step 303, obtaining the energy requirement of the user according to the basal metabolic rate and the body activity level coefficient.
[0120] Among them, according to the metabolic basal metabolic rate BMR and physical activity level coefficient Obtain the user's energy demandEnergy 总 Use the following formula:
[0121]
[0122] Optional, the current energy demand Energy 总In order to make accurate recipe recommendations for the user's daily energy needs, it is also necessary to further determine the energy needs of each meal. For example, the energy supply ratio of breakfast, lunch, and dinner is 3:4:3. Therefore, the energy needs of each meal can be determined based on the user's daily energy needs and the energy supply ratio of the three meals.
[0123] As another feasible embodiment, the basic information includes the user's personality characteristic parameters, which are used to express the user's taste preference for food. Figure 4 As shown, based on health information, candidate foods are obtained, including:
[0124] Step 401, obtaining the nutritional claims of food.
[0125] Specifically, obtaining the nutritional claims of food includes: obtaining an ingredient library containing each ingredient and its nutritional claims, the ingredient corresponding to at least one nutritional claim, and the nutritional claims include quantifiable nutritional claims and non-quantifiable nutritional claims; obtaining an ingredient list corresponding to any food and the weight of each ingredient in the ingredient list; determining the weight proportion of the main ingredient and the auxiliary ingredient in the food according to the weight of each ingredient; judging whether the weight proportion of the auxiliary ingredient in the food is greater than a preset threshold; if so, obtaining the quantifiable nutritional claims corresponding to the auxiliary ingredient, and using the nutritional claims corresponding to the main ingredient and the quantifiable nutritional claims corresponding to the auxiliary ingredient as the nutritional claims of the food; if not, using the nutritional claims of the main ingredient as the nutritional claims of the food.
[0126] It should be noted that GB 28050 "General Rules for Nutrition Labeling of Prepackaged Foods, National Food Safety Standard" stipulates that nutrition claims are descriptions and statements of the nutritional characteristics of food, such as energy levels and protein content levels. Specifically, nutrition claims are divided into quantifiable and non-quantifiable. Quantifiable ones include high protein, high fat, high cholesterol, etc. Quantifiable ones also include the nutrient content of ingredients / food per unit weight, and non-quantifiable ones include the properties of ingredients / food, such as spicy stimulation, difficult to digest, cold, warm and dry, etc. Common nutrition claims include: high carbohydrates, high glycemic index, high fat, high cholesterol, high purine, high potassium, high sodium, dietary fiber, high vitamin C, etc. For example, non-quantifiable nutrition claims can be obtained based on the properties of food (for example, based on traditional Chinese medicine theory). Then, a food library is established based on various ingredients and their nutrition claims.
[0127] Specifically, a list of ingredients corresponding to the food is obtained, wherein the ingredients include main ingredients and auxiliary ingredients, and the auxiliary ingredients include oil, salt, sugar, etc. Then the nutritional claim of the food is obtained. For example, the nutritional claim of the main ingredients can be used as the nutritional claim of the food. For example, the nutritional claim of the food can also be determined according to the proportion of the main ingredients and auxiliary ingredients. For example, the nutritional claim of the food can also be determined by the cooking method, wherein the cooking methods mainly include steaming, boiling, cold dressing, stir-frying, deep-frying, pan-frying, baking, etc.
[0128] Specifically, when the weight proportion of auxiliary ingredients in food is less than or equal to the preset threshold, the nutritional claim of the main ingredient can be directly used as the nutritional claim of the food. When the weight proportion of auxiliary ingredients in food is greater than the preset threshold, the quantifiable nutritional claims corresponding to the auxiliary ingredients are further obtained, such as high fat, high sodium, high carbohydrates and high glycemic index, etc. For example, when the weight of salt in the auxiliary ingredients is greater than the preset threshold, the quantifiable nutritional claim obtained is high sodium, and then the nutritional claims corresponding to the main ingredients and the quantifiable nutritional claims corresponding to the auxiliary ingredients are used as the nutritional claims of the food. Among them, the preset threshold can be selected from 1 / 3 to 1 / 4. For example, when the food consists of a single ingredient and does not contain auxiliary ingredients (that is, the proportion of auxiliary ingredients is 0), the nutritional claim of the food is the nutritional claim of the ingredient. For example, when the cooking method is deep-frying or pan-frying, the nutritional claim of the food can also include quantifiable nutritional claims such as high fat.
[0129] For example, the ingredients of Yipin Garlic Eggplant Puree are: 200 grams of eggplant, 10 grams of salad oil, 5 grams of peppercorns, 2 cloves of garlic, 0.5 teaspoons of salt, and 1 handful of coriander. Among them, eggplant is the main ingredient, the weight of salad oil and salt is not high, there is no sugar, and the cooking method is cold salad. The nutritional claim of eggplant is {contains dietary fiber and cold nature}. After calculation, the proportion of auxiliary ingredients is less than 1 / 3, so the nutritional claim of Yipin Garlic Eggplant Puree is {contains dietary fiber and cold nature}.
[0130] Step 402, obtaining initial candidate foods based on health information and nutritional claims of the foods.
[0131] Specifically, after obtaining the nutritional claims of the food, the nutritional claims of the food are compared with the health information of the user. If the nutritional claims of the food contain nutritional claims that are not suitable for consumption in the user's health information, the food is not added to the initial candidate food list. If the nutritional claims of the food do not contain nutritional claims that are not suitable for consumption in the user's health information, the food is added to the initial candidate food list, thereby forming a final initial candidate food list. For example, when the health information shows that the user has diabetes, the nutritional claims that are not suitable for consumption correspond to high sugar and / or high glycemic index nutritional claims.
[0132] Step 403: For each initial candidate food, calculate the similarity between the initial candidate food and the food with preferred taste.
[0133] It should be noted that the personality characteristic parameters are pre-stored foods that meet the user's taste preferences, where taste preferences include the user's favorite foods and taboo foods. For example, if the user likes sweets, then the taste preferences in the stored personality characteristic parameters may be sweet and sour spare ribs, sweet and sour lotus root, etc. If the user likes spicy food, then the taste preferences in the stored personality characteristic parameters may be maoxuewang, boiled pork slices, etc. Taboo foods may be ingredients that the user does not like. For example, if the user does not like coriander, then the taboo foods in the stored personality characteristic parameters may be coriander. Among them, taboo foods and taste preference foods can be obtained by the user through the application APP or the health assistant business platform.
[0134] It should be understood that, before calculating the similarity between each initial candidate food and the food of taste preference, the process further includes: filtering the initial candidate food according to the taboo food to obtain the filtered initial candidate food.
[0135] That is to say, after using health information to filter the nutritional claims of all ingredients, it is necessary to use the taboo foods to filter the initial candidate foods again to ensure that the initial candidate foods finally selected contain neither the user's taboo foods nor nutritional claims that are not suitable for consumption.
[0136] It should also be understood that the present application does not limit the order in which health information and taboo foods are used to screen foods to obtain initial candidate foods. That is to say, the initial candidate foods can be screened using health information first and then filtered using taboo foods, or the initial candidate foods can be screened using taboo foods first and then filtered using health information.
[0137] Then, the similarity between each food and the user's personality characteristic parameters in terms of main ingredients, cooking methods and nutritional claims is calculated, that is, the similarity Sim between the food and the user's personality characteristic parameters in terms of main ingredients is calculated separately. 主要食材 , similarity in cooking methodsSim 烹饪方法 Similarity with nutrition claims 营养声称 Add the similarities of the three aspects together to get the similarity between the final food and the user's taste preference food:
[0138] Similarity=Sim 主要食材 +Sim 烹饪方法 +Sim 营养声称
[0139] Among them, Similarity is the similarity value between the initial candidate food and the food with taste preference, Sim主要食材 is the similarity between the main ingredient information corresponding to the initial candidate food and the main ingredient information corresponding to the taste preference food, Sim 烹饪方法 is the similarity between the cooking method corresponding to the initial food and the cooking method corresponding to the taste preference food, Sim 营养声称 It is the similarity between the nutritional claim corresponding to the initial food and the nutritional claim corresponding to the taste preference food.
[0140] Optionally, the cosine algorithm can be used to calculate the similarity between the main ingredient information corresponding to the above-mentioned initial candidate foods and the main ingredient information corresponding to the taste preference foods, the similarity between the cooking methods corresponding to the initial foods and the cooking methods corresponding to the taste preference foods, and the similarity between the nutritional claims corresponding to the initial foods and the nutritional claims corresponding to the taste preference foods.
[0141] For example, the first word vector of the main ingredient information corresponding to the initial candidate food and the second word vector of the main ingredient information corresponding to the taste preference food can be obtained respectively, and then the cosine value between the first word vector and the second word vector can be calculated, and the obtained cosine value can be used as the similarity between the main ingredient information corresponding to the initial candidate food and the main ingredient information corresponding to the taste preference food. Similarly, the third word vector corresponding to the cooking method of the initial food and the fourth word vector of the cooking method of the taste preference food can be used to obtain the similarity between the cooking method corresponding to the initial food and the cooking method corresponding to the taste preference food, and the fifth word vector corresponding to the nutritional claim of the initial food and the sixth word vector corresponding to the nutritional claim of the taste preference food can be used to obtain the similarity between the nutritional claim corresponding to the initial food and the nutritional claim corresponding to the taste preference food.
[0142] For example, common main ingredients include cereals and potatoes, fruits and vegetables, meat, milk and eggs, and the main cooking methods include steaming, boiling, mixing cold, stir-frying, deep-frying, pan-frying, and baking.
[0143] For example, assuming that the taste preference in the user's personality characteristic parameters is sweet and sour spare ribs, the similarity calculation can be performed using first-class eggplant puree with garlic and sweet and sour spare ribs to obtain the similarity value between first-class eggplant puree with garlic and sweet and sour spare ribs.
[0144] Step 404: select the M initial candidate foods with the highest similarity as candidate foods, where M is a natural number greater than or equal to 1.
[0145] Specifically, after calculating the similarity between the initial candidate food and the taste preference food for each initial candidate food, a similarity list can be generated, wherein the similarity list includes a mapping relationship between the initial candidate food and the similarity, and the similarity list is sorted in descending order of similarity, and then the M initial candidate foods with the highest similarity are selected, where M can be a positive integer greater than or equal to 1, such as 3 or 5.
[0146] For example, when the user's taste preference is boiled pork slices, the similarity of boiled fish in the initial candidate foods is 98%, the similarity of Maoxuewang is 97%, the similarity of chopped pepper fish head is 92%, and the similarity of greedy frog is 88%. If M is 2, the candidate foods are boiled fish and Maoxuewang. If M is 3, the candidate foods are boiled fish, Maoxuewang and chopped pepper fish head.
[0147] It should be understood that using the food with the highest similarity as the candidate food can make the candidate food satisfy the user's taste preferences, that is, the personality characteristic parameters, as much as possible, and effectively avoid the recommended food affecting the user's dining experience due to not satisfying the user's taste preferences.
[0148] Therefore, the embodiment of the present application can obtain candidate ingredients based on the user's health information, so that the ingredients used for food recommendations can meet the user's health needs as much as possible. At the same time, by comparing the similarity of food and taste preferences in personality characteristic parameters, the candidate food finally selected can further meet the user's personalized needs.
[0149] As a feasible embodiment, the energy supply ratio between the three meals is sufficient to provide the total energy required for the day, such as Figure 5 As shown, according to the energy requirement, the weight of each candidate food in the candidate recipe is obtained, and a target recommended recipe is generated based on the weight and the candidate recipe, including:
[0150] Step 501, determining the energy demand of the candidate recipe based on the energy demand and the energy supply ratio.
[0151] Specifically, based on basic information and exercise information, obtain the user's energy demand Energy 总 , then according to:
[0152] Energy 总 =ω1×Energy 早 +ω2×Energy 中 +ω3×Energy 晚
[0153] Among them, Energy 早 、Energy 中 and Energy 晚 represents the energy value that can be provided by breakfast, lunch and dinner, ω1, ω2 and ω3 represent the proportion of the three meals in the total energy of the day, preferably, ω1:ω2:ω3=3:4:3. By allocating the energy required for breakfast, lunch and dinner in proportion, the energy required for each of the three meals can be obtained, and the energy supply requirements corresponding to each candidate recipe can be obtained.
[0154] Step 502: construct a nutrient weight equation for the candidate food based on the energy demand and each candidate food in the candidate food.
[0155] It should be noted that the general nutrient weight equation is:
[0156]
[0157] Among them, m represents the number of candidate foods, x m Indicates the weight of the mth food, fat m Indicates the weight of fat contained in the mth food per unit weight, protein m Indicates the weight of protein contained in the mth food per unit weight, carbohydrate m Indicates the weight of carbohydrates contained in the mth food per unit weight, n represents any meal among breakfast, lunch and dinner, that is, the value range of n is {breakfast, lunch, dinner}. For example, when n is lunch, Fat n Represents the total amount of fat provided by all candidate foods in the lunch recipe.
[0158] It should also be understood that in the present embodiment, Fat n 、Protein n and Carbohydrate n All can be obtained according to the energy demand corresponding to the candidate recipe, that is, Fat n 、Protein n and Carbohydrate n The weights are those required to meet the functional requirements of fat, protein and carbohydrates for each meal respectively.
[0159] Specifically, for any meal, Energy n =Energy F +Energy P +Energy C That is, the energy that any meal n can provide is the sum of the fat energy, protein energy and carbohydrate energy of each food in the candidate recipe of the meal.
[0160] in, represents the sum of the fat weight provided by each candidate food in the candidate recipe, where θ F It is the conversion factor of fat weight into fat energy, and the unit is kcal / g or KJ / g. Protein and carbohydrates can also be converted into energy using the above formula. You only need to replace the corresponding energy conversion factor. For example, the conversion formula for protein is The conversion formula for carbohydrates is: Among them, Proteinn represents the sum of the protein weights provided by each candidate food in the candidate recipe, θ p It is the conversion factor of protein weight into protein energy. n represents the sum of the carbohydrate weights provided by each candidate food in the candidate recipe, θ C It is the conversion factor of protein weight into carbohydrate energy.
[0161] Furthermore, in order to better recommend recipes for each meal of the user, the present application analyzes the nutrient weight equation based on meals to obtain the weight of each candidate food in each meal.
[0162] Step 503, solving the nutrient weight equation to obtain the weight of each candidate food, and generating a target recommended recipe based on the weight and the candidate recipes.
[0163] Specifically, if Figure 6 As shown, the nutrient weight equation is solved to obtain the weight of each candidate food, and a target recommended recipe is generated based on the weight and the candidate recipes, including:
[0164] Step 601, when the number of candidate foods in the candidate recipe is greater than a preset number, the particle swarm algorithm is used to solve the nutrient weight equation to obtain a preset number of candidate weight combinations, where the candidate weight combination is a weight set of each food in the candidate recipe.
[0165] It should be noted that, since the nutrient weight equation is a multivariate linear equation, when the number of candidate foods in the candidate recipe is less than or equal to the preset number, the nutrient weight equation can be directly solved to obtain the weight of the determined candidate food. When the number of candidate foods in the candidate recipe is greater than the preset number, the weight of the determined candidate food cannot be directly obtained by solving the formula, so the particle swarm algorithm is used for solving. For example, in the above formula, when the number of candidate foods in the candidate recipe is equal to the number of equations, that is, when the number of candidate foods in the candidate recipe is 3 (m=3), the unique solution of the equation group can be directly obtained; and when the number of candidate foods in the candidate recipe is greater than the number of equations, that is, when the number of candidate foods in the candidate recipe is greater than 3 (m>3), the equation group may have no solution or countless solutions, and the particle swarm algorithm is used to solve it in some embodiments of the present application.
[0166] It should also be noted that the particle swarm algorithm is one of the swarm intelligence algorithms, also known as the bird flock foraging algorithm. The idea comes from simulating that birds will share food location information with each other during the foraging process to quickly find the food location. The particle swarm algorithm continuously follows the currently searched optimal value through a group of particles to seek the global optimal value. Its advantages are simple algorithm and fast operation speed. Its disadvantage is that it is easy to fall into the local optimal value for multimodal functions or large-scale optimization. The nutrient weight equation that needs to be resolved in this application is a multivariate linear equation. There are no high-order unknowns, so it is not a multimodal function and the scale is not large, so it is suitable to use the particle swarm algorithm for analysis.
[0167] Specifically, the particle swarm algorithm can be used to obtain multiple sets of candidate weight combinations that meet the energy needs of the user, that is, the recipes obtained according to the ratio of any candidate weight combination can provide energy supply that meets the energy needs of the user.
[0168] It should be noted that the nutritional difference parameter is the difference between the weight of nutrients that should be consumed in a meal and the weight of nutrients provided by the candidate foods in the recipe.
[0169] Among them, the preset nutrients are, for example, the aforementioned three major nutrients, namely, fat, protein and carbohydrates.
[0170] Among them, the weight of the three major nutrients corresponding to any candidate weight combination for:
[0171]
[0172] It should be understood that the weights of the three major nutrients corresponding to any candidate weight combination (i.e. any solution) It is calculated by the nutrient weight equation. Therefore, generally speaking, the weight of the three major nutrients corresponding to the candidate weight combination is The difference between the energy demand of the user is within the hysteresis range.
[0173] Step 602, obtaining the nutritional difference parameters of each candidate weight combination.
[0174] It should be noted that the standard value of nutrients is the standard value of fat in each meal determined based on the weight ratio of the three meals and the energy needs of the user. n Protein standard value n and carbohydrate standard value n .
[0175] Since the weight distribution of fat, protein and carbohydrates is different, each nutrient needs to be standardized separately to better measure the size of the nutrient weight difference. In addition, this application proposes not to use cosine distance as a standardized evaluation parameter because cosine distance is more about measuring the difference in the direction of two vectors, while this application needs to measure the size difference of each dimension of the two vectors.
[0176] Specifically, the present application utilizes the difference between the weight of any nutrient and the standard value to obtain the absolute value, and then compares the absolute value with the standard value to obtain the standardized evaluation parameters of the nutrient.
[0177] Specifically, the nutritional difference parameter can be expressed as follows:
[0178]
[0179] in, is the sum of the fat weights provided by each candidate food in the candidate weight combination, is the sum of the protein weights provided by each candidate food in the candidate weight combination, The sum of the carbohydrate weights provided by each candidate food in the candidate weight combination.
[0180] Step 603, taking the candidate weight combination with the smallest nutritional difference parameter as the target weight combination.
[0181] It should be noted that, for the nutritional difference parameter obtained by the method proposed in the embodiment of the present application, the larger the parameter value, the larger the difference between the nutrient weight of each nutrient and the standard value, the smaller the parameter value, the smaller the difference between the nutrient weight of each nutrient and the standard value, and the corresponding candidate weight combination is most likely to be the optimal solution. Therefore, the present application uses the candidate weight combination with the smallest nutritional difference parameter as the target weight combination. It should be understood that after obtaining the target weight combination, it is necessary to further determine whether the target weight combination is within the food weight threshold range. If the target weight combination is within the food weight threshold range, the step of generating a target recommended recipe according to the candidate recipe and the target weight combination is executed. If the target weight combination is not within the weight threshold range, the candidate food is selected from the candidate food list again to form a new candidate recipe, and the target weight combination is calculated for the new candidate recipe until a target weight combination that meets the weight threshold can be obtained. Among them, the weight threshold may include but is not limited to at least one of the weight ratio relationship between each food type in the candidate recipe, the maximum weight, and the minimum weight.
[0182] Step 604, generating a target recommended recipe based on the candidate recipes and the target weight combination.
[0183] That is to say, the target recommended diet should not only contain the recommended food names, but also the weight of each food, such as Figure 7 shown.
[0184] It should also be understood that the target recommended recipes may include multiple, for example, multiple candidate recipes are obtained according to multiple personality characteristic parameters of the user, and then multiple target recommended recipes are obtained, etc. Thus, multiple choices can be provided to the user, so that the user can choose a target recommended recipe that better meets the current needs from multiple target recommended recipes, thereby improving the user experience.
[0185] To sum up, the recipe recommendation method proposed in the embodiment of the present application can comprehensively consider the user's basic information, exercise information and health information, so that the recommended target recipes can meet the user's personalized, precise and diversified healthy diet needs.
[0186] In order to achieve the above objectives, the present application also proposes another recipe recommendation method.
[0187] Please refer to Figure 8 , Figure 8 The flowchart of the recipe recommendation method provided by an embodiment of the present application is shown. It should be noted that the execution subject of the recipe recommendation method of this embodiment is a recipe recommendation device, which can be implemented by software and / or hardware. The recipe recommendation device in this embodiment can be configured in an electronic device. The electronic device in this embodiment can include but is not limited to personal computing, platform computers, smart phones, smart speakers and other devices, and this embodiment does not specifically limit the electronic device.
[0188] like Figure 8 As shown, the method includes:
[0189] Step 801, receiving input of basic information, exercise information and health information of the user.
[0190] Step 802, receiving and displaying the returned target recommended recipe, where the target recommended recipe is generated based on the basic information, exercise information and health information.
[0191] That is to say, the electronic device in the embodiment of the present application is a terminal device, which can receive the input of the user's basic information and exercise information through the interactive interface of the loaded application App, and can obtain it by communicating with the business platform (such as a health assistant) that communicates with the application App, wherein the business platform can be set on a device that can collect the user's exercise information, such as a sports bracelet worn by the user. The user's health information can also be connected to the physical examination system through the terminal device to capture the user's health information in the physical examination system. Then, the terminal device can process the received user's basic information, exercise information, and health information through the terminal device's own processor or send it to the server to use the server to process it to generate a target recommended recipe, and then receive and display the returned target recommended recipe.
[0192] To sum up, the recipe recommendation method proposed in the embodiment of the present application can comprehensively consider the user's basic information, exercise information and health information, so that the recommended target recipes can meet the user's personalized, precise and diversified healthy diet needs.
[0193] Further references Fig. 9 , which shows an exemplary structural block diagram of a device for a recipe recommendation method according to an embodiment of the present application. The recipe recommendation device 10 includes:
[0194] The first acquisition module 11 is used to acquire the user's basic information, exercise information and health information;
[0195] The second acquisition module 12 is used to acquire the energy demand of the user according to the basic information and the motion information;
[0196] The third acquisition module 13 is used to acquire candidate foods according to the health information;
[0197] A first generating module 14 is used to generate candidate recipes based on the candidate foods;
[0198] The second generating module 15 is used to obtain the weight of each candidate food in the candidate recipe according to the energy requirement, and generate a target recommended recipe based on the weight and the candidate recipe.
[0199] In some embodiments, the second acquisition module 12 is further used to:
[0200] Obtain the user's basal metabolic rate based on basic information;
[0201] Obtaining the physical activity level coefficient corresponding to the physical activity level according to the physical activity level in the preset time period and the pre-stored mapping relationship between the physical activity level and the physical activity level coefficient;
[0202] Obtain the user's energy needs based on basal metabolic rate and physical activity level coefficient.
[0203] In some embodiments, the basic information includes a user's personality characteristic parameter, which is used to express the user's taste preference for food. The third acquisition module 13 is further used to:
[0204] Access nutrition claims on foods;
[0205] Obtain initial food candidates based on health information and nutritional claims of foods;
[0206] For each initial candidate food, calculate the similarity between the initial candidate food and the taste preference food;
[0207] The N initial candidate foods with the highest similarity are used as candidate foods, where N is a natural number greater than or equal to 1.
[0208] In some embodiments, the personality characteristic parameters also include the user's taboo foods. For each initial candidate food, the third acquisition module 13 is further used to:
[0209] The initial candidate foods are filtered according to the taboo foods to obtain filtered initial candidate foods.
[0210] In some embodiments, the third acquisition module 13 is further used to:
[0211] Obtain an ingredient library including each ingredient and its nutritional claim, wherein the ingredient corresponds to at least one nutritional claim, and the nutritional claims include quantifiable nutritional claims and non-quantifiable nutritional claims;
[0212] Get the ingredient list corresponding to any food and the weight of each ingredient in the ingredient list;
[0213] According to the corresponding weight of each ingredient, determine the weight proportion of the main ingredients and auxiliary ingredients in the food;
[0214] Determine whether the weight proportion of auxiliary ingredients in food is greater than a preset threshold;
[0215] If yes, obtain the quantifiable nutritional claims corresponding to the auxiliary ingredients, and use the nutritional claims corresponding to the main ingredients and the quantifiable nutritional claims corresponding to the auxiliary ingredients as the nutritional claims of the food;
[0216] If not, the nutrition claim of the main ingredient shall be used as the nutrition claim of the food.
[0217] In some embodiments, the third acquisition module 13 is further used to calculate the similarity between the initial candidate food and the food of taste preference using the following formula according to the main ingredient information, cooking method and nutritional claim corresponding to the initial candidate food:
[0218] Similarity=Sim 主要食材 +Sim 烹饪方法 +Sim 营养声称
[0219] Among them, Similarity is the similarity value between the initial candidate food and the food with taste preference, Sim 主要食材 is the similarity between the main ingredient information corresponding to the initial candidate food and the main ingredient information corresponding to the taste preference food, Sim 烹饪方法 is the similarity between the cooking method corresponding to the initial food and the cooking method corresponding to the taste preference food, Sim 营养声称 It is the similarity between the nutritional claim corresponding to the initial food and the nutritional claim corresponding to the taste preference food.
[0220] In some embodiments, the first generating module 14 is further configured to:
[0221] Obtaining a preset recipe combination strategy corresponding to the user, where the preset recipe combination strategy includes food types included in the user's three meals candidate recipes;
[0222] Obtain the three meal types corresponding to the candidate foods to be recommended;
[0223] Generate candidate recipes based on preset recipe combination strategies, three meal types and candidate foods.
[0224] In some embodiments, the three meals have an energy supply ratio that provides the total energy required for a day, and the second generation module 15 is further used to:
[0225] Determine the energy demand of the candidate recipes based on the energy demand and energy supply ratio;
[0226] Constructing a nutrient weight equation of the candidate food according to the energy requirement and each candidate food in the candidate diet;
[0227] The nutrient weight equation is solved to obtain the weight of each candidate food, and a target recommended recipe is generated based on the weight and the candidate recipes.
[0228] In some embodiments, the second generating module 15 is further configured to:
[0229] The nutrient weight equation is:
[0230]
[0231] Among them, m is the number of candidate foods, x m is the weight of the mth food, fat m is the weight of fat contained in the mth food per unit weight, protein mThe weight of protein contained in the mth food per unit weight, carbohydrate m is the weight of carbohydrates contained in the mth food per unit weight, and n is any one of the three meals.
[0232] In some embodiments, the second generating module 15 is further configured to:
[0233] When the number of candidate foods in the candidate recipe is greater than a preset number, the particle swarm algorithm is used to solve the nutrient weight equation to obtain a preset number of candidate weight combinations, where the candidate weight combination is a weight set of each food in the candidate recipe;
[0234] Obtaining nutritional difference parameters for each candidate weight combination;
[0235] The candidate weight combination with the smallest nutritional difference parameter is taken as the target weight combination;
[0236] Based on the combination of candidate recipes and target weights, a target recommended recipe is generated.
[0237] In some embodiments, the second generating module 15 is further configured to:
[0238] The nutritional difference parameters of each candidate weight combination are obtained using the following formula:
[0239]
[0240] in, is the sum of the fat weights provided by each candidate food in the candidate weight combination, is the sum of the protein weights provided by each candidate food in the candidate weight combination, The sum of the carbohydrate weights provided by each candidate food in the candidate weight combination.
[0241] In some embodiments, the first acquisition module 11 is further used to:
[0242] Calling the editing interface of basic information, which includes a collection control of basic information;
[0243] Monitor the collection controls to obtain basic information of users;
[0244] Communicate with at least one service platform, and receive the user's exercise information and / or health information sent by at least one service platform.
[0245] It should be understood that the units or modules described in the recipe recommendation device 10 are similar to those described in the reference Figure 2The steps in the described method correspond to each other. Therefore, the operations and features described above for the method are also applicable to the recipe recommendation device 10 and the modules contained therein, and will not be repeated here. The recipe recommendation device 10 can be pre-implemented in a browser or other security application of an electronic device, or loaded into a browser or its security application of an electronic device by downloading or the like. The corresponding modules in the recipe recommendation device 10 can cooperate with the modules in the electronic device to implement the solution of the embodiment of the present application. The above-mentioned modules can be implemented by hardware, software or firmware, etc., which is not limited here.
[0246] To sum up, a recipe recommendation device proposed in an embodiment of the present application can comprehensively consider the user's basic information, exercise information and health information, so that the recommended target recipes can meet the user's personalized, precise and diversified healthy dietary needs.
[0247] Further references Fig.10 , which shows an exemplary structural block diagram of an apparatus for a recipe recommendation method according to another embodiment of the present application. The recipe recommendation apparatus 20 includes:
[0248] The receiving module 21 is used to receive the basic information, exercise information and health information of the user.
[0249] The display module 22 is used to receive and display the returned target recommended recipe, which is generated based on the basic information, exercise information and health information.
[0250] To sum up, a recipe recommendation device proposed in an embodiment of the present application can comprehensively consider the user's basic information, exercise information and health information, so that the recommended target recipes can meet the user's personalized, precise and diversified healthy dietary needs.
[0251] It should be understood that the units or modules described in the recipe recommendation device 20 are similar to those described in the reference Figure 8 The various steps in the described method correspond to each other. Therefore, the operations and features described above for the method are also applicable to the recipe recommendation device 20 and the units contained therein, and will not be repeated here. The recipe recommendation device 20 can be pre-implemented in a browser or other security application of an electronic device, or can be loaded into a browser or its security application of an electronic device by downloading or the like. The corresponding units in the recipe recommendation device 20 can cooperate with the units in the electronic device to implement the solution of the embodiment of the present application.
[0252] Reference below Fig.11 , which shows a schematic diagram of the structure of a computer system of a terminal device or server suitable for implementing an embodiment of the present application.
[0253] like Fig.11 As shown, the computer system 1100 includes a central processing unit (CPU) 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage part 1108 into a random access memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation of the system 1100 are also stored. The CPU 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0254] The following components are connected to the I / O interface 1105: an input section 1106 including a keyboard, a mouse, etc.; an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as needed, so that a computer program read therefrom is installed into the storage section 1108 as needed.
[0255] For example, the user's basic information, exercise information, health information, etc. can be acquired through the input part 1106 of the keyboard, mouse, etc. The target recommended recipe can be provided to the user through the key output part 1107.
[0256] In particular, according to the embodiments of the present disclosure, the above reference Figure 2 The described processes may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising a computer program for executing Figure 2 In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 1109 and / or installed from the removable medium 1111.
[0257] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a different order from the order marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0258] As another aspect, the present application further provides a computer-readable storage medium, which may be a computer-readable storage medium included in the device described in the above embodiment; or a computer-readable storage medium that exists independently and is not assembled into the device. The computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the formula input method described in the present application.
[0259] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the present application.
Claims
1. A recipe recommendation method, characterized in that: The following steps are involved: Obtain the user's basic information, exercise information and health information; Acquire the energy demand of the user according to the basic information and the motion information; Obtaining candidate foods according to the health information; Generating candidate recipes based on the candidate foods; According to the energy requirement, obtaining the weight of each candidate food in the candidate recipe, and generating a target recommended recipe based on the weight and the candidate recipe; The health information also includes the current abnormal physiological state and the user's past medical history. The current abnormal physiological state is obtained by taking a photo of the user's facial expression and identifying it with a camera; The basic information includes the user's personality characteristic parameters, and the personality characteristic parameters include the user's taste preference food. According to the health information, obtaining candidate food includes: Access to nutrition claims on foods; Obtaining initial candidate foods based on the health information and the nutritional claims of the foods; For each of the initial candidate foods, calculating the similarity between the initial candidate foods and the preferred taste foods; Taking the M initial candidate foods with the highest similarity as the candidate foods, where M is a natural number greater than or equal to 1; The nutrition claims are divided into quantifiable and non-quantifiable ones, and the non-quantifiable ones include the properties of ingredients / foods; The non-quantifiable nutrients are claimed to be obtained through traditional Chinese medicine theories.
2. The recipe recommendation method according to claim 1, characterized in that: The exercise information includes the exercise level of the user in a preset time period, and obtaining the energy demand of the user according to the basic information and the exercise information includes: Acquire the basal metabolic rate of the user according to the basic information; According to the exercise level in the preset time period and the pre-stored mapping relationship between the exercise level and the body activity level coefficient, obtaining the body activity level coefficient corresponding to the exercise level; The energy requirement of the user is obtained according to the basal metabolic rate and the body activity level coefficient.
3. The recipe recommendation method according to claim 1, characterized in that: The personality characteristic parameters also include the user's taboo foods. Before calculating the similarity between each of the initial candidate foods and the preferred food, the method further includes: The initial candidate foods are filtered according to the taboo foods to obtain the filtered initial candidate foods.
4. The recipe recommendation method according to claim 1, characterized in that: The nutritional claims of the food include: Obtaining an ingredient library including each ingredient and its nutritional claim, wherein the ingredient corresponds to at least one nutritional claim, and the nutritional claim includes a quantifiable nutritional claim and a non-quantifiable nutritional claim; Obtain a list of ingredients corresponding to any of the foods and the weight of each ingredient in the list of ingredients; Determine the weight proportion of the main ingredients and the auxiliary ingredients in the food according to the weight of each ingredient; Determine whether the weight proportion of the auxiliary ingredients in the food is greater than a preset threshold; If yes, then obtaining the quantifiable nutritional claims corresponding to the auxiliary ingredients, and using the nutritional claims corresponding to the main ingredients and the quantifiable nutritional claims corresponding to the auxiliary ingredients as the nutritional claims of the food; If not, the nutritional claim of the main ingredient shall be used as the nutritional claim of the food.
5. The recipe recommendation method according to claim 1, characterized in that: Based on the main ingredient information, cooking methods and nutritional claims corresponding to the initial candidate food, the similarity between the initial candidate food and the preferred food is calculated using the following formula: in, is the similarity value between the initial candidate food and the preferred taste food, is the similarity between the main ingredient information corresponding to the initial candidate food and the main ingredient information corresponding to the preferred taste food, is the similarity between the cooking method corresponding to the initial candidate food and the cooking method corresponding to the preferred food, It is the similarity between the nutritional claim corresponding to the initial candidate food and the nutritional claim corresponding to the taste preference food.
6. The recipe recommendation method according to claim 1, characterized in that: Generating candidate recipes according to the candidate foods includes: Acquire a preset recipe combination strategy corresponding to the user, wherein the preset recipe combination strategy includes food types included in the candidate recipes for three meals of the user; Obtaining three meal types corresponding to the candidate food to be recommended; A candidate recipe is generated according to the preset recipe combination strategy, the three meal types and the candidate food.
7. The recipe recommendation method according to claim 6, characterized in that: The energy supply ratio between the three meals is sufficient to provide the total energy required for one day, and obtaining the weight of each candidate food in the candidate recipe according to the energy requirement includes: Determining the energy supply requirement of the candidate recipe according to the energy requirement and the energy supply ratio; Constructing a nutrient weight equation of the candidate food according to the energy supply requirement and each candidate food in the candidate recipe; The nutrient weight equation is solved to obtain the weight of each candidate food, and a target recommended recipe is generated based on the weight and the candidate recipes.
8. The recipe recommendation method according to claim 7, characterized in that: The nutrient weight equation is: in, is the number of candidate foods, For the The weight of food, Unit weight The weight of fat in a food, Unit weight The weight of protein contained in each food, Unit weight The weight of carbohydrates contained in a food, n is any one of the three meals.
9. The recipe recommendation method according to claim 8, characterized in that: The step of solving the nutrient weight equation to obtain the weight of each candidate food, and generating a target recommended recipe based on the weight and the candidate recipes includes: When the number of the candidate foods in the candidate recipe is greater than a preset number, the nutrient weight equation is solved using a particle swarm algorithm to obtain a preset number of candidate weight combinations, wherein the candidate weight combination is a weight set of each food in the candidate recipe; Obtaining nutritional difference parameters of each of the candidate weight combinations; Taking the candidate weight combination with the smallest nutritional difference parameter as the target weight combination; The target recommended recipe is generated based on the candidate recipes and the target weight combination.
10. The recipe recommendation method according to claim 9, characterized in that: The nutritional difference parameter of each candidate weight combination is obtained using the following formula: in, is the sum of the fat weights provided by each candidate food in the candidate weight combination, is the sum of the protein weights provided by each candidate food in the candidate weight combination, The sum of the carbohydrate weights provided by each candidate food in the candidate weight combination.
11. The recipe recommendation method according to claim 1, characterized in that: The obtaining of the user's basic information, exercise information and health information includes: Calling an editing interface for basic information, wherein the editing interface includes a collection control for the basic information; Monitor the acquisition control to obtain basic information of the user; Communicate with at least one service platform, and receive the exercise information and / or the health information of the user sent by the at least one service platform.
12. A recipe recommendation device, characterized in that: include: The first acquisition module is used to acquire the user's basic information, exercise information and health information; A second acquisition module, configured to acquire the energy demand of the user according to the basic information and the motion information; A third acquisition module, used to acquire candidate foods according to the health information; A first generating module, used for generating a candidate recipe according to the candidate food; A second generating module, configured to obtain the weight of each candidate food in the candidate recipe according to the energy requirement, and generate a target recommended recipe based on the weight and the candidate recipe; The health information also includes the current abnormal physiological state, which is obtained by taking a photo of the user's facial expression and identifying it through a camera; The basic information includes the user's personality characteristic parameters, which are used to express the user's taste preference for food. The third acquisition module is also used to: Access to nutrition claims on foods; Obtain initial food candidates based on health information and nutritional claims of foods; For each initial candidate food, calculate the similarity between the initial candidate food and the taste preference food; The N initial candidate foods with the highest similarity are used as candidate foods, where N is a natural number greater than or equal to 1; The nutrition claims are divided into quantifiable and non-quantifiable ones, and the non-quantifiable ones include the properties of ingredients / foods; The non-quantifiable nutrients are claimed to be obtained through traditional Chinese medicine theories.
13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, it implements the recipe recommendation method as described in any one of claims 1-11.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, it implements the recipe recommendation method as described in any one of claims 1-11.
Citation Information
Patent Citations
Food material recommending method and device, household electrical appliance and machine readable memory medium
CN110021403A
Diet prescription system and method using u-healthcare personalized services
KR1020110052196A