Diet recommendation method, device, electronic device and storage medium

By obtaining and analyzing users' dietary information, using pre-trained network models to splice data and recommend personalized diet plans, it solves the problem of difficulty in recommending a balanced diet based on user habits in the existing technology, and improves the execution difficulty and user experience of diet plans. .

CN112735562BActive Publication Date: 2024-09-06GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 15 Cites 0 Cited by

Patent Information

Application Number
CN202110102626.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-25
Publication Date
2024-09-06
Estimated Expiration
2041-01-25

AI Technical Summary

Technical Problem

It is difficult for existing nutritional matching tools to make differentiated recommendations based on users’ eating habits, making it more difficult for users to adhere to their dietary plans.

Method used

By obtaining the user's current diet information and diet-related information, using a pre-trained network model (such as the GRU model) to splice the data, determine the user's intake and lack of nutrients, and then recommend a personalized target diet plan.

Benefits of technology

It achieves accurate recommendation of suitable diet plans based on the user's dietary trajectory data, taking into account the user's eating habits, and improves the execution difficulty and user experience of a balanced diet.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112735562B
    Figure CN112735562B
Patent Text Reader

Abstract

The present application relates to a diet recommendation method, device, electronic device and storage medium, the method comprising: obtaining the user's current diet information and diet-related information, if the pre-trained network model has a previous output, using the pre-trained network model to splice the current diet information with the previous data of the network model to obtain the spliced ​​diet trajectory data, if the pre-trained network model does not have a previous output, using the pre-trained network model to splice the current diet information with the preset initial data to obtain the spliced ​​diet trajectory data, and then determining the target diet plan according to the diet-related information and the diet trajectory data, and then recommending the target diet plan in a preset manner. In this way, the diet trajectory data can take into account the user's eating habits and accurately push a diet plan suitable for the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data recommendation, and in particular to a diet recommendation method, device, electronic device and storage medium. Background Art

[0002] As people's living standards improve, they have higher and higher requirements for nutritional balance in their diet. However, due to lack of nutritional knowledge, people are often unable to achieve nutritional balance in their diet. Therefore, people often use some nutritional matching tools to determine their diet plans.

[0003] However, current nutrition matching tools often provide dietary recommendations for a period of time, such as providing a diet plan for a period of one month, so that users can follow the diet plan to eat daily and achieve a balanced diet in the future. However, such plans often ignore the user's eating habits and are unable to make differentiated recommendations for balanced diet plans, which increases the difficulty for users to adhere to the diet plan. Summary of the invention

[0004] In order to overcome the problem in the related art that it is impossible to recommend a differentiated balanced diet plan, which increases the difficulty for users to adhere to the diet plan, the present application provides a diet recommendation method, device, electronic device and storage medium.

[0005] According to a first aspect of the present application, a diet recommendation method is provided, the method comprising:

[0006] Obtain the user's current diet information and diet-related information;

[0007] If the pre-trained network model has a previous output, the pre-trained network model is used to splice the current diet information with the previous output of the network model to obtain spliced ​​diet trajectory data;

[0008] If the pre-trained network model does not have a previous output, the pre-trained network model is used to splice the current diet information with the preset initial data to obtain spliced ​​diet trajectory data;

[0009] Determine a target diet plan according to the diet-related information and the diet trajectory data;

[0010] The target diet plan is recommended in a preset manner.

[0011] In an optional embodiment, determining a target diet plan according to the diet association information and the diet trajectory data includes:

[0012] Determining nutrients consumed by the user based on the dietary trajectory data;

[0013] Determining the recommended nutritional components to be consumed according to the diet-related information;

[0014] Determining the nutrients that the user lacks based on the recommended nutrients and the nutrients that the user has already consumed;

[0015] The target diet plan is determined according to the nutritional components that the user lacks.

[0016] In an optional embodiment, the diet trajectory data includes historical foods consumed by the user within a preset time range;

[0017] Determining the nutrients ingested by the user according to the diet trajectory data includes:

[0018] Determining the nutritional components in the historical food according to a pre-stored mapping relationship table of food components and nutritional components;

[0019] The nutritional components in the historical food are determined as the nutritional components that the user has ingested.

[0020] In an optional embodiment, the diet-related information includes user physiological parameters, environmental parameters and user information;

[0021] Determining the recommended nutritional components to be taken according to the diet-related information includes:

[0022] Determining a first target nutrient component corresponding to the user's physiological parameter according to a preset first mapping relationship;

[0023] Determine a second target nutrient component corresponding to the environmental parameter according to a preset second mapping relationship;

[0024] Determining a third target nutrient component corresponding to the user information according to a preset third mapping relationship;

[0025] The first target nutrient component, the second target nutrient component and the third target nutrient component are integrated to obtain the recommended nutrient component intake.

[0026] In an optional embodiment, the pre-trained network model is a GRU model, and the dietary information includes at least one category of information;

[0027] If the pre-trained network model has a previous output, the pre-trained network model is used to splice the current diet information with the previous output of the network model to obtain spliced ​​diet trajectory data, including:

[0028] Determine information in the previous output of the GRU model that matches the category in the current diet information as target information;

[0029] The target information and the current diet information are spliced ​​to obtain spliced ​​diet trajectory data.

[0030] In an optional implementation, the obtaining of the user's current dietary information includes:

[0031] Get the diet picture currently uploaded by the user;

[0032] Using a preset algorithm to identify food data in the food picture, the food data includes food ingredients and the proportion of each food ingredient;

[0033] Determine the nutritional components in the food data and the proportion of each nutritional component according to the food components and the proportion of each food component in all food components;

[0034] The food ingredients, the proportion of each of the food ingredients, the nutritional ingredients, and the proportion of each of the nutritional ingredients are determined as the current dietary information of the user.

[0035] In an optional embodiment, the recommending the target diet plan in a preset manner includes:

[0036] Displaying the target diet plan through a preset display device;

[0037] and / or,

[0038] The target diet plan is played through a preset voice device.

[0039] According to a second aspect of the present application, a diet recommendation device is provided, the device comprising:

[0040] The acquisition module is used to obtain the user's current diet information and diet-related information;

[0041] A first splicing module is used to splice the current diet information with the previous output of the pre-trained network model using the pre-trained network model if there is a previous output of the network model, so as to obtain spliced ​​diet trajectory data;

[0042] A second splicing module is used to splice the current diet information with the preset initial data using the pre-trained network model if the pre-trained network model does not have a previous output, so as to obtain spliced ​​diet trajectory data;

[0043] A determination module, configured to determine a target diet plan according to the diet association information and the diet trajectory data;

[0044] The recommendation module is used to recommend the target diet plan in a preset manner.

[0045] In an optional implementation, the determining module includes:

[0046] A first determining unit, configured to determine the nutrients that the user has ingested based on the diet trajectory data;

[0047] A second determining unit, configured to determine the recommended nutritional components to be taken according to the diet-related information;

[0048] A third determining unit, configured to determine the nutritional components that the user lacks based on the recommended nutritional components and the nutritional components that the user has already ingested;

[0049] The fourth determining unit is used to determine the target diet plan according to the nutritional components that the user lacks.

[0050] In an optional embodiment, the diet trajectory data includes historical foods consumed by the user within a preset time range;

[0051] The first determining unit includes:

[0052] A first determination subunit, configured to determine the nutritional components in the historical food according to a pre-stored mapping relationship table between food components and nutritional components;

[0053] The second determining subunit is used to determine the nutritional components in the historical food as the nutritional components that the user has ingested.

[0054] In an optional embodiment, the diet-related information includes user physiological parameters, environmental parameters and user information;

[0055] The second determining unit includes:

[0056] A third determining subunit, configured to determine a first target nutrient component corresponding to the user's physiological parameter according to a preset first mapping relationship;

[0057] a fourth determining subunit, configured to determine a second target nutrient component corresponding to the environmental parameter according to a preset second mapping relationship;

[0058] a fifth determining subunit, configured to determine a third target nutrient component corresponding to the user information according to a preset third mapping relationship;

[0059] The integration subunit is used to integrate the first target nutrient component, the second target nutrient component and the third target nutrient component to obtain the recommended nutrient component.

[0060] In an optional embodiment, the pre-trained network model is a GRU model, and the dietary information includes at least one category of information;

[0061] The first splicing module includes:

[0062] A fifth determining unit, configured to determine information in a previous output of the GRU model that matches a category in the current diet information as target information;

[0063] The splicing unit is used to splice the target information and the current diet information to obtain spliced ​​diet trajectory data.

[0064] In an optional implementation, the acquisition module includes:

[0065] An acquisition unit, used to acquire the food picture currently uploaded by the user;

[0066] an identification unit, used to identify food data in the food picture using a preset algorithm, wherein the food data includes food ingredients and the proportion of each food ingredient;

[0067] a sixth determining unit, configured to determine the nutritional components in the food data and the proportion of each nutritional component according to the food components and the proportion of each food component in all food components;

[0068] The seventh determining unit is used to determine the food ingredients, the proportion of each of the food ingredients, the nutritional ingredients, and the proportion of each of the nutritional ingredients as the current dietary information of the user.

[0069] In an optional implementation, the recommendation module includes:

[0070] A first recommendation unit, configured to display the target diet plan through a preset display device;

[0071] and / or

[0072] The second recommendation unit is used to play the target diet plan through a preset voice device.

[0073] According to a third aspect of the present application, there is provided an electronic device, comprising: at least one processor and a memory;

[0074] The processor is used to execute the diet recommendation program stored in the memory to implement the diet recommendation method described in the first aspect of the present application.

[0075] According to a fourth aspect of the present application, a storage medium is provided, wherein the storage medium stores one or more programs, and when the one or more programs are executed, the dietary recommendation method described in the first aspect of the present application is implemented.

[0076] The technical solution provided by the present application may include the following beneficial effects: first, the user's current dietary information and dietary-related information are obtained. If the pre-trained network model has a previous output, the current dietary information is spliced ​​with the previous data of the network model using the pre-trained network model to obtain the spliced ​​dietary trajectory data. If the pre-trained network model does not have a previous output, the current dietary information is spliced ​​with the preset initial data using the pre-trained network model to obtain the spliced ​​dietary trajectory data. Then, the target dietary plan is determined based on the dietary-related information and the dietary trajectory data, and the target dietary plan is recommended in a preset manner. In this way, the dietary trajectory data can be used to take into account the user's dietary habits and accurately push a dietary plan suitable for the user.

[0077] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0079] Figure 1 is a flowchart of a diet recommendation method provided by an embodiment of the present application;

[0080] Figure 2 This is a schematic diagram of a process for obtaining a user's current dietary information provided by an embodiment of the present application;

[0081] Figure 3 is a schematic diagram of a process for determining a target diet plan provided by an embodiment of the present application;

[0082] Figure 4 is a structural schematic diagram of a diet recommendation device provided by another embodiment of the present application;

[0083] Figure 5 It is a structural schematic diagram of an electronic device provided in another embodiment of the present application. DETAILED DESCRIPTION

[0084] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0085] As people's living standards improve, they have higher and higher requirements for nutritional balance in their diet. However, due to lack of nutritional knowledge, people are often unable to achieve nutritional balance in their diet. Therefore, people often use some nutritional matching tools to determine their diet plans.

[0086] However, current nutrition matching tools often provide dietary recommendations for a period of time, such as providing a diet plan for a period of one month, so that users can follow the diet plan to eat daily and achieve a balanced diet in the future. However, such plans often ignore the user's eating habits and are unable to make differentiated recommendations for balanced diet plans, which increases the difficulty for users to adhere to the diet plan.

[0087] In order to overcome the problem that the prior art cannot recommend a differentiated balanced diet plan, the present application provides a diet recommendation method, device, electronic device and storage medium, which are described below in the form of embodiments.

[0088] See also Figure 1 , Figure 1 It is a flowchart of a diet recommendation method provided by an embodiment of the present application.

[0089] like Figure 1 As shown, the dietary recommendation method provided by this application may include:

[0090] Step S101: Acquire the user's current diet information and diet-related information.

[0091] It should be noted that the user's current dietary information may include data of different categories, such as food ingredients, nutritional ingredients, etc.

[0092] For details, please refer to the process of obtaining the user's current diet information. Figure 2 , Figure 2 It is a flowchart of obtaining a user's current dietary information provided by an embodiment of the present application.

[0093] like Figure 2 As shown, the process of obtaining the user's current diet information provided by this embodiment may include:

[0094] Step S201: Obtain the food picture currently uploaded by the user.

[0095] It should be noted that food pictures can be crawled from the user's related social software or from the user's electronic photo album. Of course, in order to protect the user's privacy, the user can also actively upload the food pictures to a preset storage location. This step periodically obtains the food pictures uploaded by the user from the storage location.

[0096] Step S202: using a preset algorithm to identify food data in the food picture, the food data including food ingredients and the proportion of each food ingredient.

[0097] In this step, the preset algorithm may be a deep learning algorithm that can be trained to identify food data in a picture. The process of training the preset algorithm may refer to related technologies and will not be described in detail here.

[0098] Since the photo space occupied by each food ingredient in the picture may be different, the identified food data may include, in addition to multiple food ingredients, the proportion of each food ingredient in all food ingredients.

[0099] In a specific example, for example, a food picture contains three food ingredients: potatoes, tomatoes, and green peppers. Among them, the proportion of potatoes in the food picture is 0.75, the proportion of tomatoes in the food picture is 0.1, and the proportion of green peppers in the food picture is 0.05. Then the proportion of potatoes in all food ingredients is 0.75 / (0.75+0.05+0.1)=0.83. Similarly, the proportion of tomatoes in all food ingredients is 0.1 / (0.75+0.05+0.1)=0.11, and the proportion of green peppers in all foods is 0.05 / (0.75+0.05+0.1)=0.06. Therefore, the following table can be obtained:

[0100] Food ingredients Proportion Potato 0.83 tomato 0.11 Green pepper 0.06

[0101] Table 1

[0102] Step S203: Determine the nutritional components in the food data and the proportion of each nutritional component according to the food components and the proportion of each food component in all food components.

[0103] In this step, the calculation can be based on the preset mapping relationship between food ingredients and nutritional components. The following is an example of the nutritional components contained in every 100 grams of food ingredients (Table 2). It should be noted that the nutritional components and the content of the nutritional components given in this example are not accurate. They are only examples to clearly illustrate the technical solution. In actual applications, calculations should be based on the actual content.

[0104]

[0105] Table 2

[0106] It can be seen from Table 2 that the nutrients contained in the diet picture may include protein, fat, carbohydrates, dietary fiber, and monounsaturated fatty acids. Taking protein as an example, the process of calculating the protein ratio can be 1.9 / 100*0.83+0.9 / 100*0.11+1.1 / 100*0.06, which is approximately equal to 0.162. The calculation of other nutrients is similar and will not be repeated here.

[0107] Step S204: determine the food ingredients, the proportion of each food ingredient, the nutritional ingredients, and the proportion of each nutritional ingredient as the user's current dietary information.

[0108] After obtaining the food ingredients, the ratio of food ingredients, the nutritional ingredients and the ratio of nutritional ingredients in the aforementioned process, these data constitute the user's current dietary information.

[0109] Step S102: If the pre-trained network model has a previous output, the pre-trained network model is used to splice the current diet information with the previous output of the network model to obtain spliced ​​diet trajectory data.

[0110] It should be noted that the pre-trained network model can be a GRU model, and the dietary information includes at least one category of information. When using the pre-trained network model to splice the current dietary information with the previous output of the network model, it is necessary to use the update gate and reset gate of the GRU model. Among them, the functions of the update gate and the reset gate can refer to the relevant technology and will not be repeated here. After the dietary information is input into the GRU model, the information in the previous output of the GRU model that matches the category in the current dietary information will be determined as the target information. For example, the previous output contains information of category A, information of category B, and information of category C, and the user's current dietary information only contains information of category A and information of category C. Therefore, the information of category A and information of category C in the previous output will be first determined as the target information.

[0111] It should be noted that the architecture of the GRU model can be two layers of GRU, a fully connected layer, and a softmax output layer according to the direction of data flow.

[0112] The target information and the current dietary information are then spliced ​​together to obtain spliced ​​dietary trajectory data, wherein the specific splicing process can be splicing according to categories, such as splicing together information of category A and splicing together information of category C, and then obtaining dietary trajectory data containing the spliced ​​information of category A and category C.

[0113] Step S103: If the pre-trained network model does not have a previous output, the pre-trained network model is used to splice the current diet information with the preset initial data to obtain spliced ​​diet trajectory data.

[0114] In this step, the preset initial data can be empty or a mark, and the splicing here can be to directly splice the information of each category in the dietary information with the empty space or the mark.

[0115] Step S104: determining a target diet plan according to the diet-related information and the diet trajectory data.

[0116] In this step, the specific process of determining the target diet plan can be referred to Figure 3 , Figure 3 It is a flowchart of determining a target diet plan provided by an embodiment of the present application.

[0117] like Figure 3 As shown, the target diet plan provided in this embodiment may include:

[0118] Step S301: Determine the nutrients that the user has ingested based on the diet trajectory data.

[0119] In this step, the dietary trajectory data may include historical foods consumed by the user within a preset time range, that is, the food ingredients mentioned in the aforementioned process.

[0120] In addition, the preset time range can be one week, one month, or even the entire time range included in the diet trajectory data.

[0121] When determining the nutrients that the user has ingested, first, the nutrients in the historical food can be determined based on the pre-stored mapping relationship table between food ingredients and nutrients (such as Table 2). If the historical food consumed by the user within a preset time range included in the diet trajectory data includes potatoes, then in Table 2, the protein, fat, carbohydrates and dietary fiber corresponding to potatoes are the nutrients of the historical food.

[0122] Step S302: Determine the recommended nutritional components to be consumed according to the diet-related information.

[0123] It should be noted that diet-related information may include user physiological parameters, environmental parameters and user information. User physiological parameters may be but are not limited to the user's sleep index, environmental parameters may be but are not limited to the ambient temperature, and user information may be but is not limited to the user's age, height, weight, etc.

[0124] When determining the recommended nutritional components to be taken, the first target nutritional components corresponding to the user's physiological parameters may be determined according to a preset first mapping relationship. Taking the sleep index as an example, the first mapping relationship may be a mapping relationship between the sleep index range and the nutritional components, as shown in Table 3 below:

[0125]

[0126]

[0127] Table 3

[0128] In a specific example, if the user's sleep index is 85, then it corresponds to nutrient C.

[0129] Then, the second target nutrient component corresponding to the environmental parameter is determined according to the preset second mapping relationship, and the third target nutrient component corresponding to the user information is determined according to the preset third mapping relationship. These two processes are consistent with the aforementioned process of determining the first target nutrient component, and will not be repeated here.

[0130] After obtaining the first target nutrient, the second target nutrient and the third target nutrient, the first target nutrient, the second target nutrient and the third target nutrient are integrated to obtain the recommended nutrient intake. It should be noted that the integration here can be a union, because the first target nutrient, the second target nutrient and the third target nutrient may have the same nutrients.

[0131] Step S303: Determine the nutrients that the user lacks based on the recommended nutrients and the nutrients that the user has already consumed.

[0132] In this step, since the nutrients obtained in step S301 are already the nutrients that the user has already ingested, the recommended nutrients obtained in step S302 are personalized nutrients recommended based on the user's basic situation (such as user information, user physiological parameters) and current environmental parameters. At this time, the nutrients that the user has already ingested can be removed from the recommended nutrients to obtain the nutrients that the user lacks in this step.

[0133] For example, if a user has already consumed nutrients A, B, and C, and the recommended nutrients are A, B, D, E, and F, then the nutrients the user lacks can be the remaining nutrients D, E, and F after deducting the nutrients A, B, and C that the user has already consumed.

[0134] It should be noted that the nutrients that the user has already consumed may include nutrients that are not included in the recommended nutrients. In this case, the nutrients that are common to both can be removed from the recommended nutrients.

[0135] Step S304: Determine a target diet plan based on the nutrients that the user lacks.

[0136] It should be noted that after obtaining the nutritional components that the user lacks, the target diet plan can be determined based on the nutritional components. In this step, the diet plan can refer to food ingredients or recipes.

[0137] Specifically, in the process of determining the target diet plan, the food ingredients can be determined first with the help of the mapping relationship between nutrients and food ingredients. The mapping relationship can still refer to Table 2 mentioned in the above process. For example, if the nutrient that the user lacks is monounsaturated fatty acids, then it can be obtained from Table 2 that the food ingredient containing monounsaturated fatty acids is green pepper. For another example, in addition to monounsaturated fatty acids, the nutrient that the user lacks also includes dietary fiber. Then it can be obtained from Table 2 that the food ingredients containing dietary fiber are potatoes, tomatoes and green peppers. At this time, the three food ingredients of potatoes, tomatoes and green peppers can be determined.

[0138] At this time, these three food ingredients can be directly recommended to users as target diet plans, and users can freely choose how to cook and eat these three foods.

[0139] Of course, in order to reduce the time that the user spends in deciding the cooking method, the present embodiment can further determine the recipe according to the aforementioned determined food ingredients. At this time, the food ingredients contained in each recipe in the preset multiple recipes can be used.

[0140] Still taking the determined food ingredients as potatoes, tomatoes and green peppers as an example, the three food ingredients of potatoes, tomatoes and green peppers can be used as search conditions to search for at least one recipe that contains the three food ingredients of potatoes, tomatoes and green peppers, and then the searched recipes and the aforementioned determined food ingredients are recommended to the user for the user to select or customize.

[0141] Step S105: recommending a target diet plan in a preset manner.

[0142] In this step, the target diet plan can be displayed by a preset display device, or the target diet plan can be played by a preset voice device. Of course, these two recommendation methods can coexist or be used alone. In addition, the user can also be notified of the nutritional components that the user lacks through the display device and / or the voice device, so that the user can understand his or her own needs.

[0143] In this embodiment, the user's current diet information and diet-related information are first obtained. If the pre-trained network model has a previous output, the pre-trained network model is used to splice the current diet information with the previous data of the network model to obtain the spliced ​​diet trajectory data. If the pre-trained network model does not have a previous output, the pre-trained network model is used to splice the current diet information with the preset initial data to obtain the spliced ​​diet trajectory data. Then, the target diet plan is determined based on the diet-related information and the diet trajectory data, and the target diet plan is recommended in a preset manner. In this way, the diet trajectory data can be used to take into account the user's eating habits and accurately push a diet plan suitable for the user.

[0144] See also Figure 4 , Figure 4 It is a structural schematic diagram of a diet recommendation device provided in another embodiment of the present application.

[0145] like Figure 4 As shown, the diet recommendation device provided in this embodiment may include:

[0146] The acquisition module 401 is used to acquire the user's current diet information and diet-related information;

[0147] A first splicing module 402 is used to splice the current diet information with the previous output of the network model using the pre-trained network model if there is a previous output of the pre-trained network model to obtain spliced ​​diet trajectory data;

[0148] The second splicing module 403 is used to splice the current diet information with the preset initial data using the pre-trained network model to obtain spliced ​​diet trajectory data if the pre-trained network model does not have a previous output;

[0149] A determination module 404 is used to determine a target diet plan according to the diet association information and the diet trajectory data;

[0150] The recommendation module 405 is used to recommend a target diet plan in a preset manner.

[0151] In an optional implementation, the determining module includes:

[0152] A first determination unit, configured to determine the nutrients that the user has ingested based on the diet trajectory data;

[0153] A second determining unit, configured to determine the recommended nutritional components to be taken according to the diet-related information;

[0154] A third determining unit, configured to determine the nutrients that the user lacks based on the recommended nutrients and the nutrients that the user has already consumed;

[0155] The fourth determining unit is used to determine a target diet plan according to the nutrients that the user lacks.

[0156] In an optional embodiment, the dietary trajectory data includes historical foods consumed by the user within a preset time range;

[0157] The first determining unit includes:

[0158] A first determination subunit is used to determine the nutritional components in the historical food according to a pre-stored mapping relationship table between food components and nutritional components;

[0159] The second determining subunit is used to determine the nutritional components in the historical food as the nutritional components that the user has ingested.

[0160] In an optional embodiment, the diet-related information includes user physiological parameters, environmental parameters and user information;

[0161] The second determining unit includes:

[0162] A third determination subunit is used to determine a first target nutrient component corresponding to the user's physiological parameter according to a preset first mapping relationship;

[0163] A fourth determining subunit, configured to determine a second target nutrient component corresponding to the environmental parameter according to a preset second mapping relationship;

[0164] a fifth determining subunit, configured to determine a third target nutrient component corresponding to the user information according to a preset third mapping relationship;

[0165] The integration subunit is used to integrate the first target nutrient component, the second target nutrient component and the third target nutrient component to obtain the recommended nutrient component intake.

[0166] In an optional embodiment, the pre-trained network model is a GRU model, and the dietary information includes at least one category of information;

[0167] The first splicing module includes:

[0168] a fifth determination unit, configured to determine information in a previous output of the GRU model that matches a category in the current diet information as target information;

[0169] The splicing unit is used to splice the target information and the current diet information to obtain spliced ​​diet trajectory data.

[0170] In an optional implementation, the acquisition module includes:

[0171] An acquisition unit, used to acquire the food picture currently uploaded by the user;

[0172] An identification unit, used to identify food data in the food picture using a preset algorithm, the food data including food ingredients and the proportion of each food ingredient;

[0173] a sixth determining unit, for determining the nutritional components in the food data and the proportion of each nutritional component according to the food components and the proportion of each food component in all food components;

[0174] The seventh determining unit is used to determine the food ingredients, the proportion of each food ingredient, the nutritional ingredients, and the proportion of each nutritional ingredient as the user's current diet information.

[0175] In an optional embodiment, the recommendation module includes:

[0176] A first recommendation unit, configured to display the target diet plan through a preset display device;

[0177] and / or

[0178] The second recommendation unit is used to play the target diet plan through a preset voice device.

[0179] See also Figure 5 , Figure 5 It is a structural schematic diagram of an electronic device provided in another embodiment of the present application.

[0180] like Figure 5 As shown, the electronic device 500 provided in this embodiment includes: at least one processor 501, a memory 502, at least one network interface 503 and other user interfaces 504. The various components in the electronic device 500 are coupled together through a bus system 505. It can be understood that the bus system 505 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 505 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Figure 5 Various buses are labeled as bus system 505 .

[0181] The user interface 504 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).

[0182] It can be understood that the memory 502 in the embodiment of the present invention can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DRRAM). The memory 502 described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0183] In some implementations, the memory 502 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 5021 and a second application 5022 .

[0184] The operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks. The second application 5022 includes various second application programs, such as a media player (Media Player), a browser (Browser), etc., for implementing various application services. The program for implementing the method of the embodiment of the present invention can be included in the second application 5022.

[0185] In the embodiment of the present invention, by calling the program or instruction stored in the memory 502, specifically, the program or instruction stored in the second application 5022, the processor 501 is used to execute the method steps provided by each method embodiment, for example, including:

[0186] Obtain the user's current diet information and diet-related information;

[0187] If the pre-trained network model has a previous output, the pre-trained network model is used to splice the current diet information with the previous output of the network model to obtain spliced ​​diet trajectory data;

[0188] If the pre-trained network model does not have the previous output, the pre-trained network model is used to splice the current diet information with the preset initial data to obtain spliced ​​diet trajectory data;

[0189] Determine a target diet plan based on diet association information and diet trajectory data;

[0190] Recommend targeted diet plans in a preset manner.

[0191] In an optional embodiment, determining a target diet plan according to diet association information and diet trajectory data includes:

[0192] Determine the nutrients the user has consumed based on the dietary trajectory data;

[0193] Determine recommended nutrient intake based on dietary association information;

[0194] Determine the nutrients that the user lacks based on the recommended nutrients and the nutrients the user has already consumed;

[0195] Determine the target diet plan based on the nutrients that the user lacks.

[0196] In an optional embodiment, the dietary trajectory data includes historical foods consumed by the user within a preset time range;

[0197] Determine the nutrients the user has consumed based on the dietary trajectory data, including:

[0198] Determine the nutritional components of historical food according to the pre-stored mapping relationship table between food components and nutritional components;

[0199] The nutritional components in historical food are determined as the nutritional components that the user has consumed.

[0200] In an optional embodiment, the diet-related information includes user physiological parameters, environmental parameters and user information;

[0201] Recommended nutrient intakes are determined based on dietary association information, including:

[0202] Determine a first target nutrient component corresponding to the user's physiological parameter according to a preset first mapping relationship;

[0203] Determine a second target nutrient component corresponding to the environmental parameter according to a preset second mapping relationship;

[0204] Determine a third target nutrient component corresponding to the user information according to a preset third mapping relationship;

[0205] The first target nutrient component, the second target nutrient component and the third target nutrient component are integrated to obtain the recommended nutrient component intake.

[0206] In an optional embodiment, the pre-trained network model is a GRU model, and the dietary information includes at least one category of information;

[0207] If the pre-trained network model has a previous output, the pre-trained network model is used to splice the current diet information with the previous output of the network model to obtain spliced ​​diet trajectory data, including:

[0208] The information in the previous output of the GRU model that matches the category in the current diet information is determined as the target information;

[0209] The target information and the current diet information are spliced ​​together to obtain spliced ​​diet trajectory data.

[0210] In an optional implementation, obtaining the user's current diet information includes:

[0211] Get the diet picture currently uploaded by the user;

[0212] Using a preset algorithm to identify food data in a food picture, the food data includes food ingredients and the proportion of each food ingredient;

[0213] Determine the nutrients and the proportion of each nutrient in the food data based on the food components and the proportion of each food component in all food components;

[0214] The food ingredients, the proportion of each food ingredient, the nutritional ingredients, and the proportion of each nutritional ingredient are determined as the user's current dietary information.

[0215] In an optional embodiment, a target diet plan is recommended in a preset manner, including:

[0216] Displaying the target diet plan through a preset display device;

[0217] and / or

[0218] Play the target diet plan through the preset voice device.

[0219] The method disclosed in the above embodiment of the present invention can be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 501 or the instruction in the form of software. The above processor 501 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the above method in combination with its hardware.

[0220] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions of the present application, or a combination thereof.

[0221] For software implementation, the technology of this article can be implemented by a unit that performs the functions of this article. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0222] The embodiment of the present invention also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.

[0223] When one or more programs in the storage medium can be executed by one or more processors, the diet recommendation method executed on the diet recommendation device side can be implemented.

[0224] The processor is used to execute the diet recommendation program stored in the memory to implement the following steps of the diet recommendation method executed on the diet recommendation device side:

[0225] Obtain the user's current diet information and diet-related information;

[0226] If the pre-trained network model has a previous output, the pre-trained network model is used to splice the current diet information with the previous output of the network model to obtain spliced ​​diet trajectory data;

[0227] If the pre-trained network model does not have the previous output, the pre-trained network model is used to splice the current diet information with the preset initial data to obtain spliced ​​diet trajectory data;

[0228] Determine a target diet plan based on diet association information and diet trajectory data;

[0229] Recommend targeted diet plans in a preset manner.

[0230] In an optional embodiment, determining a target diet plan according to diet association information and diet trajectory data includes:

[0231] Determine the nutrients the user has consumed based on the dietary trajectory data;

[0232] Determine recommended nutrient intake based on dietary association information;

[0233] Determine the nutrients that the user lacks based on the recommended nutrients and the nutrients the user has already consumed;

[0234] Determine the target diet plan based on the nutrients that the user lacks.

[0235] In an optional embodiment, the dietary trajectory data includes historical foods consumed by the user within a preset time range;

[0236] Determine the nutrients the user has consumed based on the dietary trajectory data, including:

[0237] Determine the nutritional components of historical food according to the pre-stored mapping relationship table between food components and nutritional components;

[0238] The nutritional components in historical food are determined as the nutritional components that the user has consumed.

[0239] In an optional embodiment, the diet-related information includes user physiological parameters, environmental parameters and user information;

[0240] Recommended nutrient intakes are determined based on dietary association information, including:

[0241] Determine a first target nutrient component corresponding to the user's physiological parameter according to a preset first mapping relationship;

[0242] Determine a second target nutrient component corresponding to the environmental parameter according to a preset second mapping relationship;

[0243] Determine a third target nutrient component corresponding to the user information according to a preset third mapping relationship;

[0244] The first target nutrient component, the second target nutrient component and the third target nutrient component are integrated to obtain the recommended nutrient component intake.

[0245] In an optional embodiment, the pre-trained network model is a GRU model, and the dietary information includes at least one category of information;

[0246] If the pre-trained network model has a previous output, the pre-trained network model is used to splice the current diet information with the previous output of the network model to obtain spliced ​​diet trajectory data, including:

[0247] The information in the previous output of the GRU model that matches the category in the current diet information is determined as the target information;

[0248] The target information and the current diet information are spliced ​​together to obtain spliced ​​diet trajectory data.

[0249] In an optional implementation, obtaining the user's current diet information includes:

[0250] Get the diet picture currently uploaded by the user;

[0251] Using a preset algorithm to identify food data in a food picture, the food data includes food ingredients and the proportion of each food ingredient;

[0252] Determine the nutrients and the proportion of each nutrient in the food data based on the food components and the proportion of each food component in all food components;

[0253] The food ingredients, the proportion of each food ingredient, the nutritional ingredients, and the proportion of each nutritional ingredient are determined as the user's current dietary information.

[0254] In an optional embodiment, a target diet plan is recommended in a preset manner, including:

[0255] Displaying the target diet plan through a preset display device;

[0256] and / or

[0257] Play the target diet plan through the preset voice device.

[0258] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0259] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.

[0260] It should be noted that, in the description of this application, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" refers to at least two.

[0261] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0262] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0263] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0264] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0265] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0266] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0267] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A diet recommendation method, characterized in that: The method comprises: Obtain the user's current diet information and diet-related information; If the pre-trained network model has a previous output, the current diet information is spliced ​​with the previous output of the network model using the pre-trained network model to obtain spliced ​​diet trajectory data, and the pre-trained network model is a GRU model; If the pre-trained network model does not have a previous output, the pre-trained network model is used to splice the current diet information with the preset initial data to obtain spliced ​​diet trajectory data; Determine a target diet plan according to the diet-related information and the diet trajectory data; recommending the target diet plan in a preset manner; Wherein, determining a target diet plan according to the diet association information and the diet trajectory data includes: Determining nutrients consumed by the user based on the dietary trajectory data; Determining the recommended nutritional components to be consumed according to the diet-related information; Determining the nutrients that the user lacks based on the recommended nutrients and the nutrients that the user has already consumed; Determining the target diet plan according to the nutritional components that the user lacks; The diet-related information includes user physiological parameters, environmental parameters and user information, wherein the environmental parameters include the temperature of the environment; Determining the recommended nutritional components to be taken according to the diet-related information includes: Determining a first target nutrient component corresponding to the user's physiological parameter according to a preset first mapping relationship; Determine a second target nutrient component corresponding to the environmental parameter according to a preset second mapping relationship; Determining a third target nutrient component corresponding to the user information according to a preset third mapping relationship; Integrate the first target nutrient component, the second target nutrient component, and the third target nutrient component to obtain a recommended nutrient component; The dietary trajectory data includes historical foods consumed by the user within a preset time range; Determining the nutrients ingested by the user according to the diet trajectory data includes: Determining the nutritional components in the historical food according to a pre-stored mapping relationship table of food components and nutritional components; The nutritional components in the historical food are determined as the nutritional components that the user has ingested.

2. The method according to claim 1, characterized in that The dietary information includes at least one category of information; If the pre-trained network model has a previous output, the pre-trained network model is used to splice the current diet information with the previous output of the network model to obtain spliced ​​diet trajectory data, including: Determine information in the previous output of the GRU model that matches the category in the current diet information as target information; The target information and the current diet information are spliced ​​to obtain spliced ​​diet trajectory data.

3. The method according to claim 1, characterized in that The obtaining of the user's current diet information includes: Get the diet picture currently uploaded by the user; Using a preset algorithm to identify food data in the food picture, the food data includes food ingredients and the proportion of each food ingredient; Determine the nutritional components in the food data and the proportion of each nutritional component according to the food components and the proportion of each food component in all food components; The food ingredients, the proportion of each of the food ingredients, the nutritional ingredients, and the proportion of each of the nutritional ingredients are determined as the current dietary information of the user.

4. The method according to claim 1, characterized in that: The method of recommending the target diet plan in a preset manner includes: Displaying the target diet plan through a preset display device; and / or, The target diet plan is played through a preset voice device.

5. A diet recommendation device, characterized in that: The device comprises: The acquisition module is used to obtain the user's current diet information and diet-related information; A first splicing module is used to splice the current diet information with the previous output of the pre-trained network model using the pre-trained network model to obtain spliced ​​diet trajectory data if the pre-trained network model has a previous output, and the pre-trained network model is a GRU model; A second splicing module is used to splice the current diet information with the preset initial data using the pre-trained network model if the pre-trained network model does not have a previous output, so as to obtain spliced ​​diet trajectory data; A determination module, configured to determine a target diet plan according to the diet association information and the diet trajectory data; A recommendation module, used for recommending the target diet plan in a preset manner; Wherein, the determination module is further used for: Determining nutrients consumed by the user based on the dietary trajectory data; Determining the recommended nutritional components to be consumed according to the diet-related information; Determining the nutrients that the user lacks based on the recommended nutrients and the nutrients that the user has already consumed; Determining the target diet plan according to the nutritional components that the user lacks; The diet-related information includes user physiological parameters, environmental parameters and user information, wherein the environmental parameters include the temperature of the environment; The determining module is further used for: Determining a first target nutrient component corresponding to the user's physiological parameter according to a preset first mapping relationship; Determine a second target nutrient component corresponding to the environmental parameter according to a preset second mapping relationship; Determining a third target nutrient component corresponding to the user information according to a preset third mapping relationship; Integrate the first target nutrient component, the second target nutrient component, and the third target nutrient component to obtain a recommended nutrient component; The dietary trajectory data includes historical foods consumed by the user within a preset time range; Determining the nutrients ingested by the user according to the diet trajectory data includes: Determining the nutritional components in the historical food according to a pre-stored mapping relationship table of food components and nutritional components; The nutritional components in the historical food are determined as the nutritional components that the user has ingested.

6. An electronic device, characterized in that: include: at least one processor and memory; The processor is used to execute the diet recommendation program stored in the memory to implement the diet recommendation method described in any one of claims 1-4.

7. A storage medium, characterized in that: The storage medium stores one or more programs, and when the one or more programs are executed, the dietary recommendation method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Diet health detection and guide system

    CN106709220A

  • Recurrent neural network-based diet recommendation system

    CN107705834A

  • Nutrition diet recommendation method based on personal characteristic

    CN108198604A

  • Recipe recommendation method and system

    CN108648802A

  • Diet recommending method based on nutrient component analysis

    CN110097946A