Food path recommendation method and device, electronic equipment and storage medium
By generating visual recommendation path description text using a user-food preference model and a food knowledge graph, the problem of unclear recommendation reasons in recipe recommendation systems is solved, thereby improving the accuracy and interpretability of food recommendations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MIDEA GRP (SHANGHAI) CO LTD
- Filing Date
- 2022-07-13
- Publication Date
- 2026-05-08
AI Technical Summary
Existing recipe recommendation systems cannot explain the reasons for recommending recipes to users, resulting in low accuracy and interpretability of recommendation paths.
By acquiring user-food preference models and food knowledge graphs, a candidate path set is determined. Combining recall strategies, natural language generation models, and food expert systems, a visual description of the recommended path is generated, improving the accuracy and interpretability of food recommendations.
It enables flexible and targeted push of recommendation paths to users, improving the accuracy and interpretability of food recommendations and enhancing the user experience.
Smart Images

Figure CN115237966B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer and artificial intelligence algorithm technology, and in particular to food route recommendation methods, devices, electronic devices and storage media. Background Technology
[0002] As living standards continue to improve, people's demands for quality of life are also increasing, such as the quality of their food. Therefore, people often use recipe recommendation systems to find recipes for themselves. However, while these systems can ensure the speed and accuracy of recipe recommendations, they cannot explain the reasons for recommending a particular recipe to the user. Therefore, how to explain recommended recipes to users has become a hot research topic. Summary of the Invention
[0003] This application aims to address at least one of the technical problems existing in related technologies. To this end, this application proposes a food route recommendation method that flexibly and specifically pushes recommended routes to different users while recommending food, thereby improving the accuracy and interpretability of food recommendation routes.
[0004] This application also proposes an electronic device.
[0005] This application also proposes a non-transitory computer-readable storage medium.
[0006] This application also proposes a computer program product.
[0007] The food route recommendation method according to the first aspect of this application includes:
[0008] Based on the food recommendation request of the target user, a set of candidate paths for recommending the target food to the target user is obtained. Different candidate paths in the set are used to represent different reasons for recommending the target food.
[0009] Based on the candidate path set, the target recommended path is determined;
[0010] Food recommendations are made based on the target recommendation path.
[0011] According to the food recommendation method provided in this application, the terminal device first obtains a set of candidate paths for recommending target foods to the target user in response to the target user's food recommendation request, and then determines the target recommendation path based on the candidate path set. Since different candidate paths in the candidate path set are used to represent different recommendation routes for recommending target foods, when there are multiple target foods and at least two target foods are repeated, the target recommendation path can be determined from the candidate path set by deduplication, filtering and merging. This achieves the purpose of flexibly and specifically pushing recommendation paths to different users while recommending food, thus improving the accuracy and interpretability of food recommendation paths.
[0012] According to one embodiment of this application, obtaining a candidate path set for recommending target food to the target user based on the target user's food recommendation request includes:
[0013] Based on the user-food preference model and the target user's food recommendation request, determine the food recommendation result for the target user; the user-food preference model is a model obtained by training different users on historical operation records of different foods;
[0014] Obtain a food knowledge graph, which represents a graph that associates relationships between users, food, and cooking equipment from different dimensions;
[0015] Based on the food knowledge graph and the food recommendation results, a set of candidate paths for recommending target foods to the target user is obtained.
[0016] According to one embodiment of this application, obtaining a candidate path set for recommending target food to the target user based on the food knowledge graph and the food recommendation results includes:
[0017] Obtain the entity relationship confidence graph corresponding to the food knowledge graph, wherein the entity relationship confidence graph is a graph determined after quantifying the relationships between entities in the food knowledge graph;
[0018] Based on the food path reasoning model and the food recommendation results, a set of candidate paths for recommending target foods to the target user is determined; wherein, the food path reasoning model is a model obtained by training the initial recommendation model based on the entity relationship confidence graph.
[0019] According to one embodiment of this application, after obtaining the entity relationship confidence graph corresponding to the food knowledge graph, the method further includes:
[0020] Based on the food path reasoning model, the food recommendation results, and the food knowledge graph, a set of candidate paths for recommending target foods to the target user is determined.
[0021] According to one embodiment of this application, determining the target recommended path based on the candidate path set includes:
[0022] Based on the recall strategy, the candidate path set is recalled. The recall strategy represents recommending food based on the relationship between users, the relationship between food, the relationship between users and food, and the relationship between food labels and food.
[0023] The recalled candidate path set is sorted and denoised to determine the target recommended path.
[0024] According to one embodiment of this application, the step of sorting and denoising the recalled candidate path set to determine the target recommended path includes:
[0025] The recalled candidate path set is sorted and denoised to determine the path to be recommended;
[0026] Obtain the review score results for the path to be recommended;
[0027] Based on the review and scoring results, the path to be recommended is revised to determine the target recommended path.
[0028] According to one embodiment of this application, after obtaining the review score result for the path to be recommended, the method further includes:
[0029] Based on the review and scoring results, the user-food preference model is updated.
[0030] According to one embodiment of this application, after making food recommendations based on the target recommendation path, the method further includes:
[0031] Obtain feedback information from the target user regarding the target recommended path;
[0032] Based on the feedback information, the recalled candidate path set is updated.
[0033] According to one embodiment of this application, the food recommendation based on the target recommendation path includes:
[0034] Based on the natural language description template and the target recommendation path, a visual recommendation path description text for the target food is determined, and the recommendation is pushed based on the visual recommendation path description text.
[0035] According to one embodiment of this application, the food recommendation based on the target recommendation path includes:
[0036] Based on a natural language generation model, the target recommendation path is processed with visual text description to determine the visual recommendation path description text for the target food, and the recommendation is pushed based on the visual recommendation path description text; wherein, the natural language generation model is a model obtained by training a neural network with entity language labels of different corpora.
[0037] According to one embodiment of this application, the process of acquiring the food knowledge graph includes:
[0038] Based on the personal and demand information of different users, obtain user sub-graphies;
[0039] Based on food information and cooking information of different foods, obtain food sub-maps;
[0040] Based on the models and categories of different cooking equipment, obtain equipment sub-maps;
[0041] By performing graph coupling on the user subgraph, the food subgraph, and the device subgraph, a food knowledge graph is obtained.
[0042] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 This is a flowchart illustrating the food route recommendation method provided in an embodiment of this application;
[0045] Figure 2 This is one of the candidate path diagrams provided in the embodiments of this application;
[0046] Figure 3 This is a schematic diagram of a partial entity relationship confidence map provided in an embodiment of this application;
[0047] Figure 4 This is the second schematic diagram of the candidate paths provided in the embodiments of this application;
[0048] Figure 5 This is a schematic diagram illustrating the food and cooking information of the brain-boosting walnut porridge provided in the embodiments of this application;
[0049] Figure 6 This is a schematic diagram of the overall process of the food recommendation route method provided in the embodiments of this application;
[0050] Figure 7 This is a schematic diagram of the food recommendation path device provided in the embodiments of this application;
[0051] Figure 8 This is a schematic diagram of the physical structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0053] The following is combined Figures 1-8 This application describes a food route recommendation method, apparatus, electronic device, and storage medium. The execution entity of the food route recommendation method can be a terminal device, which can be a personal computer (PC), portable device, laptop computer, smartphone, tablet computer, portable wearable device, or other electronic device. It is understood that the execution entity of the food route recommendation method can also be a server. This application does not limit the specific form of the terminal device or server. The following method embodiments are illustrated using a terminal device as an example.
[0054] Figure 1 A flowchart illustrating the food route recommendation method provided in this application is shown below. Figure 1 As shown, this food route recommendation method includes the following steps:
[0055] Step 110: Based on the target user's food recommendation request, obtain a set of candidate paths for recommending target food to the target user. Different candidate paths in the set are used to represent different reasons for recommending the target food.
[0056] The target user can be any user who requires food recommendations. Food recommendation requests can be automatically generated based on the target user's voice or text input to the terminal device. For example, if the target user's voice input request is "Recommend a recipe," the terminal device can automatically generate a recipe recommendation request. The food recommendation request can also include ingredients, which can be obtained through voice or text input from the target user, or automatically through image recognition, such as by automatically scanning and recognizing ingredients in the refrigerator. The request can also include the target user's username, user attribute information, ID number, request sending time, etc. User attribute information can include user location, place of origin, gender, age, and physical condition (e.g., fitness, illness, pregnancy). Furthermore, there can be one or more target foods, which can correspond to the same or different food categories, including but not limited to stir-fries, soups, pastries, and noodles. The target food can include, but is not limited to, the name of the ingredient, the name of the dish in the recipe, the name of the pastry in the pastry recipe, and the name of the soup or porridge in the soup or porridge recipe. For example, if the number of target foods is one, it can be garlic roasted white clams. If the number of target foods is multiple, it can include, but is not limited to, steamed ribs, cake, and rib and winter melon soup.
[0057] Understandably, when a terminal device receives a food recommendation request from a target user, it can combine the request to obtain target foods that can be recommended to the target user, and then further obtain different reasons for recommending the target foods to the target user. For example, first, based on the user's food recommendation request, it can obtain the target food "garlic roasted clams" that can be recommended to the target user. When recommending "garlic roasted clams" to the target user, the reasons for the recommendation could be "User A from the same region as you has made garlic roasted clams", "garlic roasted clams have anti-aging, blood pressure lowering and trace element supplementation characteristics", and "garlic roasted clams taste similar to the baked mussels you made before", etc., thereby obtaining a set of candidate paths for recommending target foods to the target user.
[0058] Step 120: Determine the target recommended path based on the candidate path set.
[0059] Understandably, for the candidate path set of recommending target foods to target users, the terminal device can adjust and denoise the candidate path set by denoising and adjusting the recommended path between the user and the food. Since there are multiple target foods being recommended, the candidate path set may contain candidate paths with different explanations for the same target food, candidate paths generated from repeated recommendations of the same target food, and candidate paths generated from different dimensions of content description for the same target food. These different dimensions can include, but are not limited to, food nutritional information, cooking information, and other food information. Food information includes, but is not limited to, nutritional components, suitable population information, cuisine information, dish information, ingredient quantities, efficacy information, flavor information, and suitable season information for each food item. Cooking information can include, but is not limited to, the preparation process and recipe information, and illustrated steps for each food item. Food nutritional information includes, but is not limited to, the content of nutrients such as energy, protein, fat, carbohydrates, sodium, vitamins, and dietary fiber contained in each food item. Therefore, adjustments to the candidate path set are necessary, including filtering, deduplication, and merging. This involves filtering candidate paths with insufficiently explained reasons, deduplicating duplicate recommended target foods and their corresponding candidate paths, and merging different dimensions of content descriptions for the same target food. For example, when the target food is garlic-baked clams, the nutritional information, cooking time, and other dimensions of the garlic-baked clams recipe can be merged into a recommended path specifically for garlic-baked clams. This determines the target recommended path.
[0060] Step 130: Recommend food based on the target recommendation path.
[0061] Understandably, when a terminal device determines a target recommended path based on a set of candidate paths, it can present the target recommended path for the target food in a structured and / or unstructured display format to make the reasons for the recommendation more intuitive for the target user. For example, it can push the target recommended path for the target food to the target user using visual text descriptions, audio output, or a combination of both. The specific method for recommending the target recommended path is not specifically limited here.
[0062] Understandably, existing recipe recommendation methods typically involve pre-setting multiple recommendation rules, such as "Users frequently cook Sichuan cuisine, so we recommend **" and "Users often eat low-fat, low-sugar dishes, so we recommend **," etc. A recipe recommendation system then outputs recipes to be recommended, selects the most suitable rule from these rules, and uses this selected rule as the recommendation path for recipe recommendation. However, because each recommendation rule can explain the reasons for recommending multiple different recipes, and the rules themselves are fixed, the recommendation path for the same recipe is usually fixed and has a single interpretation, leading to low accuracy and weak interpretability in recipe recommendation paths. Our research has found that by first obtaining multiple candidate paths for the target food, and then determining and recommending the target path, the accuracy and interpretability of the food recommendation path can be effectively improved.
[0063] The food route recommendation method provided in this application involves a terminal device first obtaining a set of candidate routes for recommending target foods to a target user in response to the user's food recommendation request. Then, it determines the target recommendation route based on the candidate route set. Since different candidate routes in the candidate route set are used to represent different recommendation routes for recommending target foods, when there are multiple target foods and at least two target foods are repeated, the target recommendation route can be determined from the candidate route set by deduplication, filtering, and merging. This achieves the goal of flexibly and specifically pushing recommendation routes to different users while recommending food, thus improving the accuracy and interpretability of the food recommendation route.
[0064] Understandably, considering that different users have different preferences for food, a set of candidate paths for recommending target foods to target users can be obtained based on each user's different preferences for different foods and a pre-established food knowledge graph. Based on this, the specific implementation process of step 110 may include:
[0065] First, based on the user-food preference model and the target user's food recommendation request, the food recommendation results for the target user are determined. The user-food preference model is a model obtained by training different users on historical operation records of different foods. Second, a food knowledge graph is obtained, which represents the graph that associates the relationships between users, food and cooking equipment from different dimensions. Finally, based on the food knowledge graph and the food recommendation results, a set of candidate paths for recommending target foods to the target user is obtained.
[0066] It is understandable that the process of acquiring a food knowledge graph can be performed simultaneously with the process of determining food recommendations for the target user, or it can be performed before determining food recommendations for the target user; no specific limitation is made here.
[0067] It is understandable that users who have used the food recommendation system all have historical operation records for at least one food item. These historical operation records can include, but are not limited to, clicks, favorites, multiple views, and viewing durations. Therefore, a user-food preference model can be determined by training the system using historical operation record data from different users for different foods. This user-food preference model is designed for multiple different users and is obtained by training a user-food preference matrix. In this matrix, rows represent different foods, columns represent different users, and values represent the corresponding user's preference for the corresponding food. Therefore, the process of determining the user-food preference model can include: first, based on historical operation record data... A user-food preference matrix is defined, where each row represents a different food item, each column represents a different user, and each value represents a user's preference for that food item. Each preference value can be a score assigned by the user manually or randomly assigned by the terminal device based on the user's click frequency, collection duration, browsing frequency, and browsing duration; the specific limitations are not specified here. The user-food preference matrix is then trained by identifying which users have higher preference values for which foods, i.e., training with the preference values of different users for different foods. This establishes a user-food preference model that reflects the functional relationship between users, foods, and preference values. The user-food preference model can characterize the degree of preference different users have for different foods. Based on this, when the terminal device receives a food recommendation request from a target user, it can determine the food recommendation result for the target user based on the user-food preference model. This means recommending foods based on the values corresponding to the target user's column in the user-food preference matrix.
[0068] At this point, although the food recommendation result is determined and represents recommending the target food to the target user, it is unclear why the target food is recommended to the target user. In this situation, a food knowledge graph can be invoked. Since a food knowledge graph represents a graph that associates relationships between users, food, and cooking equipment from different dimensions, multi-hop queries on the food knowledge graph based on the food recommendation result can obtain a set of candidate paths for recommending the target food to the target user. For example, when the food recommendation result includes recommending garlic-baked clams to the target user, multi-hop queries on the food knowledge graph can determine that the target user and garlic-baked clams are linked through user 1, clams, microwave-steamed and roasted, and baked mussels. This can be represented as a candidate path in the candidate path set, such as... Figure 2 As shown.
[0069] The food path recommendation method in this application first determines the food recommendation results for the target user based on a user-food preference model, and then obtains a candidate path set for recommending the target food to the target user by combining a food knowledge graph. Since the user-food preference model is a model obtained by training different users on historical operation records of different foods, and the food knowledge graph represents a graph that associates the relationships between users, food and cooking equipment from different dimensions, the food recommendation results can be linked together with candidate paths by querying the food knowledge graph in a multi-hop manner, thereby improving the accuracy of the target food recommendation and the reliability of the candidate path set determination.
[0070] Understandably, since food knowledge graphs connect users, food, and cooking equipment from different dimensions, when there are multiple relationships between users, food, and cooking equipment, one relationship can be selected based on confidence levels. Therefore, based on the food knowledge graph and food recommendation results, a candidate path set for recommending target foods to target users is obtained. The implementation process may include:
[0071] First, an entity relationship confidence graph corresponding to the food knowledge graph is obtained. The entity relationship confidence graph is determined after quantifying the relationships between entities in the food knowledge graph. Then, based on the food path reasoning model and the food recommendation results, a set of candidate paths for recommending target foods to target users is determined. The food path reasoning model is a model obtained by training the initial recommendation model based on the entity relationship confidence graph.
[0072] Understandably, the entity relationship confidence graph reflects the confidence of entity relationships in the food knowledge graph. It is pre-determined and stored by quantifying the relationships between entities in the food knowledge graph. For example, the relationships between garlic-roasted clams and different cooking equipment and ingredients in the food knowledge graph, after entity relationship quantification, can be obtained as follows: Figure 3 The diagram shows a partial entity relationship confidence graph. Further, an initial recommendation model is determined. This model can include, but is not limited to, a dual-tower model, a deep learning model, or a reinforcement learning model. The initial recommendation model is trained using the entity relationship confidence graph corresponding to the food knowledge graph to learn the order and generation path of dependencies between different users and foods. Furthermore, inferences are made regarding different levels of paths, such as user preferences for food, the relationship between cooking equipment and food, similarity between foods, and similarity between users, thus determining the food path inference model. At this point, based on the food path inference model and the food recommendation results, a set of candidate paths for recommending target foods to target users can be quickly determined. For example, when targeting... Figure 3The partial entity relationship confidence map of garlic-roasted clams shown can be obtained by using the magnitude of the confidence between entities, as follows: Figure 4 The candidate paths shown.
[0073] Understandably, quantifying the relationships between entities in a food knowledge graph can be achieved by inputting the food knowledge graph into a Long Short-Term Memory (LSTM) artificial neural network to calculate the confidence of interactions between entities. This determines the confidence of paths between entities in the food knowledge graph, thereby obtaining an entity relationship confidence graph corresponding to the food knowledge graph. For example, in Figure 3 In the partial entity relationship confidence graph shown, the confidence levels for the relationship between garlic-roasted clams and rice cookers are 0.3, 0.5, 0.9, 0.1, 0.6, 0.7, 0.9, 0.8, 0.9, and 0.7 respectively. This application does not specify a particular method for quantifying entity relationships in food knowledge graphs.
[0074] The food path recommendation method provided in this application embodiment achieves the purpose of quantifying the relationships between entities in the food knowledge graph with confidence by using the entity relationship confidence graph corresponding to the food knowledge graph. This ensures that each candidate path in the candidate path set is the path with the highest confidence, thereby improving the reliability and stability of food path recommendation.
[0075] It is understandable that, in addition to using food path reasoning models and food recommendation results to determine the candidate path set, a food knowledge graph can also be used to further determine the candidate path set, thereby ensuring the richness of the candidate path set and the completeness of the paths. Based on this, after obtaining the entity relationship confidence graph corresponding to the food knowledge graph, the method of this application may further include:
[0076] Based on the food path reasoning model, food recommendation results, and food knowledge graph, a set of candidate paths for recommending target foods to target users is determined.
[0077] Understandably, considering the comprehensiveness and richness of food knowledge graphs, a set of candidate paths for recommending target foods to target users can be determined by combining food path reasoning models, food recommendation results, and food knowledge graphs. For example, for... Figure 3 Although the partial entity relationship confidence map of the garlic-roasted white clams shown can yield results such as Figure 4The candidate paths shown are as follows, but the food knowledge graph reveals that User 1 has previously made baked mussels, and baked mussels and garlic-baked clams are similar recipes. Therefore, [the following path is not specified]. Figure 4 The generated candidate paths are further refined to obtain, as follows: Figure 2 The candidate path shown is garlic-roasted clams recommended to user 1.
[0078] The food path recommendation method provided in this application improves the completeness and richness of the content of each candidate path by combining a food path reasoning model and a food knowledge graph to jointly determine the set of candidate paths for recommending target foods to target users. This also provides a reliable guarantee for the accuracy and interpretability of the food recommendation path.
[0079] It is understandable that, due to the similarities between users and the complementarity between food items, the target recommended path can be determined by first performing a coarse ranking and then a fine ranking on the candidate path set. Based on this, the implementation process of step 120 may include:
[0080] First, based on the recall strategy, the candidate path set is recalled. The recall strategy is characterized by recommending food based on the relationship between users, the relationship between food, the relationship between users and food, and the relationship between food labels and food. Then, the recalled candidate path set is sorted and denoised to determine the target recommended path.
[0081] Understandably, for a candidate path set, multiple recall strategies can be used simultaneously in multiple threads to compensate for the deficiencies in the candidate path set. Recall strategies can include food-to-food recommendations, user-to-food recommendations, user-to-food-to-similar-food recommendations, user-to-similar-user-to-food recommendations, and food feature tag-to-food recommendations. Food-to-food recommendations can use similarity recommendation and collaborative filtering methods to recommend food based on food content similarity and similar user behavior. User-to-food recommendations can abstract a food preference matrix based on the target user's historical food selections and then combine it with an existing recipe nutritional function complementarity matrix for food recommendations. User-to-food-to-similar-food recommendations can first perform collaborative filtering on the target food and then expand the food list generated by collaborative filtering with similar food to achieve food clustering recommendations. User-to-similar-user-to-food recommendations can first perform similarity analysis on the user information of different users, then cluster multiple users with similarity, and then recommend foods with high selection degree after user clustering. Food feature tag-to-food recommendations can directly recommend corresponding foods to users based on special need tags or preference feature tags. This approach employs multiple recall strategies to generate inference paths from the candidate path set using methods such as similarity-based recommendation, collaborative filtering recommendation, and neighborhood-based recommendation, achieving a coarse-grained recommendation of the candidate path set. Further, the recalled candidate path set undergoes refined ranking. This refined ranking can utilize recall voting, dynamic weighting, machine learning, and deep learning methods to rank the recalled candidate path set separately, and the ranking results from multiple methods are averaged to determine the final ranking. The top N paths from this final ranking are then selected as candidate recommendation paths. Finally, the candidate recommendation paths are denoised to remove duplicates, filter already pushed content, and merge multi-dimensional content such as food nutrition information, cooking information, and recipe information for the same target food, thereby determining the target recommendation path. The target recommendation path can also be determined using other methods that sort, adjust, and denoise the candidate path set; no specific limitations are specified here.
[0082] The food route recommendation method provided in this application determines the target recommended route from the candidate route set by first recalling, then sorting and denoising the candidate route set. This not only handles overloaded information but also saves manpower and improves the rationality and accuracy of determining the target recommended route.
[0083] Understandably, in order to enable target users to clearly and intuitively understand the recommended path for the target food, the recommended path can be visualized using an unstructured recommendation path approach. Based on this, the specific implementation process of step 130 may include:
[0084] Based on natural language description templates and target recommendation paths, the system determines the visual recommendation path description text for the target food and pushes the product based on the visual recommendation path description text.
[0085] It is understandable that the terminal device can pre-store structured natural language description templates, such as "We recommend ** dish to you because other users... / because the dish has the characteristics of...". By filling the entities in the target recommendation path into the natural language description template, the visual recommendation path description text for the target recipe is determined, and then the recommendation is pushed based on the visual recommendation path description text.
[0086] The food route recommendation method provided in this application determines the visual recommendation route description text for push notifications by using natural language description templates to visualize the target recommendation route. This not only improves the readability of the target recommendation route but also eliminates irrelevant information. Combined with natural language generation methods to automatically generate recommendation messages, this method solves the problems of monotony and aesthetic fatigue caused by a single recommendation language template, optimizes the user experience, and can also achieve the purpose of recommending foods of interest to users when their goals are unclear.
[0087] It is understandable that, in addition to using pre-stored natural language description templates to determine the visual recommendation path description text, a structured recommendation path approach can also be used to visualize the target recommendation path. Based on this, the specific implementation process of step 130 may further include:
[0088] Based on a natural language generation model, the target recommendation path is processed into a visual text description to determine the visual recommendation path description text for the target food, and the recommendation is pushed based on the visual recommendation path description text; the natural language generation model is a model obtained by training a neural network with entity language labels of different corpora.
[0089] Understandably, the neural network is trained based on entity language labels of different discourse corpora, enabling the entity language labels of different discourse corpora to generate complete text description sentences. When the accuracy of the text description sentences generated by the trained model reaches the preset accuracy requirement, it is determined that the neural network is trained and is identified as a natural language generation model. The natural language generation model is pre-stored in the terminal device. When the target recommendation path is determined, each entity in the target recommendation path can be input into the natural language generation model, thereby outputting a visual recommendation path description text and pushing it.
[0090] It should be noted that this application, by visualizing the target recommendation path, not only ensures a more intuitive interpretability of the target recommendation path, but also facilitates effective parameter tuning by maintenance personnel in the event of unexpected failures during the operation of the food knowledge graph. Furthermore, visualizing the recommendation path description text avoids the loss of intermediate information caused by methods such as black-box model word vector embedding, and can uncover less common long-tail data, addressing issues such as the neglect of niche and less popular long-tail data and hidden discrimination in the food recommendation path generation process, thereby ensuring the comprehensiveness of the food recommendation results and food recommendation paths.
[0091] The food route recommendation method provided in this application determines the visual recommendation route description text for push notification by using a pre-trained natural language generation model to visualize the target recommendation route. Since the natural language generation model is a model obtained by training a neural network with entity language labels of different corpora, it can generate highly interpretable visual recommendation route description text without templates, thereby improving the convenience, speed, reliability, and accuracy of the target users in intuitively understanding the reasons for the recommendation.
[0092] Understandably, since the user-food preference matrix is obtained by scoring the preferences of different foods in historical operation records by the target user, it is highly subjective and lacks professional expertise. Therefore, it can reduce the feasibility and accuracy of the user-food preference model trained on the user-food preference matrix. In this case, incorporating expert opinions can improve the rationality and reliability of the target recommendation path. Based on this, the recalled candidate path set is sorted and denoised to determine the target recommendation path. The implementation process may include:
[0093] First, the recalled candidate path set is sorted and denoised to determine the path to be recommended; then, the review score results for the path to be recommended are obtained; further, based on the review score results, the path to be recommended is corrected to determine the target recommended path.
[0094] The review and scoring results include, but are not limited to, scores for the reasonableness of the recommended path, explanations for low scores, and suggestions for path modification. Furthermore, the process of sorting and denoising the recalled candidate path set can be referred to the aforementioned method implementation examples, and will not be repeated here.
[0095] Understandably, in order to improve the rationality and professionalism of the route recommendation, after sorting and denoising the candidate route set after recall, the route to be recommended can be sent to the food expert system to obtain the review score results of the food expert system on the route to be recommended. Then, the route to be recommended is corrected in combination with the review score results, and the corrected route is determined as the target recommended route.
[0096] The food route recommendation method provided in this application improves the automation and efficiency of determining the target recommended route by combining the evaluation and correction suggestions of the generated recommended route with a food expert system, while also significantly improving the interpretability and reliability of the target recommended route.
[0097] Understandably, to improve the accuracy of food recommendation results, while correcting the recommended path based on the review scores from the food expert system, the user-food preference model can also be adaptively modified. Therefore, after obtaining the review scores for the recommended path, the method in this application may further include:
[0098] The user-food preference model was updated based on the review and scoring results.
[0099] Understandably, since the user-food preference model is designed for multiple different users and is trained on a user-food preference matrix (where rows represent different foods, columns represent different users, and values represent the user's preference for a particular food), the user-food preference model is subjective and lacks professionalism. Therefore, it can be updated by combining the review and scoring results of the recommended path from a food expert system, making the updated model more objective and professional.
[0100] This application provides a food route recommendation method that updates the user-food preference model by combining the review and scoring results of the recommended route feedback from a food expert system, thereby improving the reliability and accuracy of subsequent food recommendation results and enhancing the accuracy and interpretability of the recommended food routes.
[0101] Understandably, to make food route recommendations more personalized and flexible, the retrieved candidate route set can be modified by incorporating feedback from target users after they have used the target recommended route. Based on this, after making food recommendations based on the target recommended route, the method of this application may further include:
[0102] First, obtain feedback from target users regarding the target recommended path; then, based on the feedback, update the retrieved candidate path set.
[0103] Understandably, after the terminal device pushes the target recommended path, it can also obtain feedback information from the target user regarding the target recommended path. This feedback information can include, but is not limited to, positive feedback, negative feedback, and implicit feedback. For example, positive feedback could indicate adopting the target recommended path, negative feedback could indicate rejecting the terminal device from pushing the target recommended path, and implicit feedback could be the relationship between browsing time for a specific food item and previously selected foods, implicitly indicating positive or negative feedback to the target recommended path. Then, based on the target user's feedback on the target recommended path, the retrieved candidate path set is updated to improve the scoring ability of the retrieved recommended path. Alternatively, the ranking model can be optimized. This ranking model can use methods such as recall voting, dynamic weighting, machine learning, and deep learning to rank the paths separately and then average the ranking results from multiple methods. This improves the scoring ability of the retrieved recommended path by updating the weights of the recommended paths between users and food items, thus making the food path recommendations more interpretable.
[0104] The food route recommendation method provided in this application ensures the personalization and applicability of the recommended routes obtained after recall by updating the candidate route set based on the feedback information of the target users for the target recommended routes, thereby improving the interpretability and adoptability of subsequent food route recommendations.
[0105] Understandably, the process of acquiring a food knowledge graph includes:
[0106] Based on the personal and demand information of different users, a user subgraph is obtained; based on the food information and cooking information of different foods, a food subgraph is obtained; based on the models and categories of different cooking equipment, an equipment subgraph is obtained; and the user subgraph, food subgraph, and equipment subgraph are coupled to obtain a food knowledge graph.
[0107] It is understandable that personal information and needs information of different users can be collected through vital sign measurement equipment and smart wearable devices, or through question and answer methods. Personal information may include, but is not limited to, information on the user's nutritional status, dietary restrictions, and allergens. Needs information may include, but is not limited to, information on muscle gain or weight loss. Then, based on the personal information and needs information of different users, a user subgraph is obtained. The nodes in the user subgraph include, but are not limited to, gender, protein type, grain, seafood, dish name, etc., and the edges in the user subgraph include, but are not limited to, gender, allergen, used, unused, and dietary restrictions, etc.
[0108] Similarly, the model and category of each cooking device are collected through equipment detection and voice input. A sub-map of the equipment is then created based on each model and category. When a cooking device has multiple functions, it can have multiple categories, each corresponding to a model. For example, a washer-dryer combo has both washing and drying functions, so it can have two categories, each corresponding to a model. Clicking on a model of a cooking device in the sub-map displays the various foods that can be prepared using that model. For instance, clicking on model 00000027 of a rice cooker category displays the foods that can be prepared using rice cooker model 00000027, including but not limited to pork rib and winter melon soup, winter melon, pork rib, and red date soup, beef porridge, fig and lean meat soup, cake, night-blooming cereus and pig's trotter soup, mixed grain rice, steamed pork ribs, steamed pork ribs, crispy rice, clay pot rice, corn, kelp, and pork bone soup, and fish head and tofu soup.
[0109] Similarly, food and cooking information for different foods can be collected through equipment detection, ingredient input, and voice input. Food information includes, but is not limited to, nutritional information, suitable population information, cuisine information, dish information, ingredient quantities, efficacy information, flavor information, and suitable seasonal information for each food. Cooking information can include, but is not limited to, the preparation process and recipe information, including illustrated steps, for each food. For example, when the food is radish and beef brisket stew, the food and cooking information for radish and beef brisket stew could be as follows: Figure 5 As shown. Then, based on the food information and cooking information of different foods, a food sub-graph is obtained. Finally, by combining the internet dietary database and expert system, graph coupling is performed on the user sub-graph, food sub-graph, and device sub-graph to obtain a food knowledge graph. Graph coupling includes, but is not limited to, entity recognition, relation extraction, knowledge fusion, and semantic matching. That is, semantic fusion can be performed on descriptions that are substantially the same but inconsistent in expression in various sub-graphs, such as denoising and semantic disambiguation. For example, when "high blood sugar" appears in the user sub-graph and "high blood sugar" appears in the food sub-graph, semantic disambiguation can be performed to unify their expression; graph coupling can also be performed by entity recognition and semantic matching, for example, assuming... When the description "suitable for diabetics" appears in the subgraph, the entity "diabetes" in the description is first extracted, and then the extracted entity "diabetes" is associated with the feature "diabetes" in the user subgraph, which can also achieve the purpose of graph coupling. Graph coupling can also be achieved through relation extraction and knowledge fusion. For example, if "vegetable A has a blood sugar lowering effect on diabetics" appears in the food subgraph, the entity "diabetes" and the relation "blood sugar lowering effect" are extracted. Then, the extracted entity "diabetes" and relation "blood sugar lowering effect" are matched with other subgraphs to achieve the purpose of graph coupling.
[0110] The food path recommendation method provided in this application defines a food knowledge graph by coupling the user subgraph, device subgraph, and food subgraph. This graph associates the relationships between users, food, and cooking equipment from different dimensions, ensuring that the recommended content is multi-dimensional while also addressing information overload. This guarantees the accuracy and feasibility of the recommended content and is also applicable to graph decoupling situations. It has strong cross-platform applicability, thereby ensuring the reliability and interpretability of the food recommendation path.
[0111] It is understood that the overall flowchart of the food route recommendation method provided in the embodiments of this application is as follows: Figure 6 As shown, the process includes three steps: constructing a food knowledge graph, generating an interpretable target recommendation path, and generating a visual representation of the target recommendation path. The processes of constructing the food knowledge graph, generating the target recommendation path, and generating the visual representation of the target recommendation path can all be referred to in conjunction with the aforementioned embodiments, but are not limited to the implementation methods of the aforementioned embodiments.
[0112] The food path recommendation device provided in this application is described below. The food path recommendation device described below can be referred to in correspondence with the food path recommendation method described above.
[0113] Reference Figure 7 The above is a schematic diagram of the food pathway recommendation device provided in this application. Figure 7 As shown, the food route recommendation device 700 includes:
[0114] The acquisition module 710 is used to acquire a set of candidate paths for recommending target food to the target user based on the target user's food recommendation request. Different candidate paths in the candidate path set are used to represent different reasons for recommending the target food. The determination module 720 is used to determine the target recommendation path based on the candidate path set. The recommendation module 730 is used to make food recommendations based on the target recommendation path.
[0115] It is understandable that the acquisition module 710 can be used to determine the food recommendation results for the target user based on the user-food preference model and the target user's food recommendation request; the user-food preference model is a model obtained based on the historical operation record data of different users on different foods; acquire the food knowledge graph, which represents the graph that associates the relationship between users, food and cooking equipment from different dimensions; and acquire the candidate path set for recommending the target food to the target user based on the food knowledge graph and the food recommendation results.
[0116] It is understandable that the acquisition module 710 can also be used to acquire the entity relationship confidence graph corresponding to the food knowledge graph. The entity relationship confidence graph is a graph determined after quantifying the relationships between entities in the food knowledge graph. Based on the food path reasoning model and the food recommendation results, a set of candidate paths for recommending target foods to target users is determined. The food path reasoning model is a model obtained by training the initial recommendation model based on the entity relationship confidence graph.
[0117] It is understandable that the acquisition module 710 can also be used to acquire user sub-graphes based on the personal and demand information of different users; acquire food sub-graphes based on the food and cooking information of different foods; acquire equipment sub-graphes based on the models and categories of different cooking equipment; and perform graph coupling between user sub-graphes, food sub-graphes and equipment sub-graphes to acquire a food knowledge graph.
[0118] It is understandable that module 720 can be used to determine the candidate path set for recommending target foods to target users based on the food path reasoning model, food recommendation results, and food knowledge graph.
[0119] It is understandable that the determination module 720 can also be used to recall candidate path sets based on recall strategies. The recall strategy represents recommending food based on the relationship between users, the relationship between food, the relationship between users and food, and the relationship between food labels and food. The recalled candidate path set is sorted and denoised to determine the target recommended path.
[0120] It is understandable that the determination module 720 can also be used to sort and denoise the recalled candidate path set to determine the path to be recommended; obtain the review score results for the path to be recommended; and based on the review score results, correct the path to be recommended to determine the target recommended path.
[0121] It is understood that the device in this application may also include an update module, which can be used to update the user-food preference model based on the review score results.
[0122] Understandably, the update module can also be used to obtain feedback information from target users regarding the target recommended path; based on the feedback information, the retrieved candidate path set is updated.
[0123] It is understood that the recommendation module 730 can be specifically used to determine the visual recommendation path description text for the target food based on the natural language description template and the target recommendation path, and to push the recommendation based on the visual recommendation path description text.
[0124] It is understandable that the recommendation module 730 can also be used to perform visual text description processing on the target recommendation path based on the natural language generation model, determine the visual recommendation path description text for the target food, and push it based on the visual recommendation path description text; wherein, the natural language generation model is a model obtained by training a neural network with entity language labels of different corpora.
[0125] Figure 8 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 8 As shown, the electronic device 800 may include a processor 810, a communication interface 820, a memory 830, and a communication bus 840. The processor 810, communication interface 820, and memory 830 communicate with each other via the communication bus 840. The processor 810 can call logical instructions stored in the memory 830 to execute the following methods:
[0126] Based on the target user's food recommendation request, obtain a set of candidate paths to recommend the target food to the target user. Different candidate paths in the set are used to represent different reasons for recommending the target food.
[0127] Based on the candidate path set, determine the target recommended path;
[0128] Food recommendations based on target recommendation paths.
[0129] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to related technologies, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0130] On the other hand, embodiments of this application disclose a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer can perform the methods provided in the above-described method embodiments, such as including:
[0131] Based on the target user's food recommendation request, obtain a set of candidate paths to recommend the target food to the target user. Different candidate paths in the set are used to represent different reasons for recommending the target food.
[0132] Based on the candidate path set, determine the target recommended path;
[0133] Food recommendations based on target recommendation paths.
[0134] In another aspect, embodiments of this application also provide a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is implemented to perform the transmission methods provided in the above embodiments, including, for example:
[0135] Based on the target user's food recommendation request, obtain a set of candidate paths to recommend the target food to the target user. Different candidate paths in the set are used to represent different reasons for recommending the target food.
[0136] Based on the candidate path set, determine the target recommended path;
[0137] Food recommendations based on target recommendation paths.
[0138] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0139] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of software products. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0140] Finally, it should be noted that the above embodiments are only used to illustrate this application and are not intended to limit this application. Although this application has been described in detail with reference to the embodiments, those skilled in the art should understand that various combinations, modifications, or equivalent substitutions of the technical solutions of this application do not depart from the spirit and scope of the technical solutions of this application and should be covered within the scope of the claims of this application.
Claims
1. A food route recommendation method, characterized in that, include: Based on the food recommendation request of the target user, a set of candidate paths for recommending the target food to the target user is obtained. Different candidate paths in the set of candidate paths are used to represent different reasons for recommending the target food. Based on the candidate path set, the target recommended path is determined; Food recommendations are made based on the target recommendation path; The step of obtaining a candidate path set for recommending target food to the target user based on the target user's food recommendation request includes: Based on the user-food preference model and the target user's food recommendation request, determine the food recommendation result for the target user; the user-food preference model is a model obtained by training different users on historical operation records of different foods; Obtain a food knowledge graph, which represents a graph that associates relationships between users, food, and cooking equipment from different dimensions; Obtain the entity relationship confidence graph corresponding to the food knowledge graph, wherein the entity relationship confidence graph is a graph determined after quantifying the relationships between entities in the food knowledge graph; Based on the food path reasoning model and the food recommendation results, a set of candidate paths for recommending target foods to the target user is determined; wherein, the food path reasoning model is a model obtained by training the initial recommendation model based on the entity relationship confidence graph.
2. The food route recommendation method according to claim 1, characterized in that, After obtaining the entity relationship confidence graph corresponding to the food knowledge graph, the method further includes: Based on the food path reasoning model, the food recommendation results, and the food knowledge graph, a set of candidate paths for recommending target foods to the target user is determined.
3. The food route recommendation method according to claim 1, characterized in that, The step of determining the target recommended path based on the candidate path set includes: Based on the recall strategy, the candidate path set is recalled. The recall strategy represents recommending food based on the relationship between users, the relationship between food, the relationship between users and food, and the relationship between food labels and food. The recalled candidate path set is sorted and denoised to determine the target recommended path.
4. The food route recommendation method according to claim 3, characterized in that, The step of sorting and denoising the recalled candidate path set to determine the target recommended path includes: The recalled candidate path set is sorted and denoised to determine the path to be recommended; Obtain the review score results for the path to be recommended; Based on the review and scoring results, the path to be recommended is revised to determine the target recommended path.
5. The food route recommendation method according to claim 4, characterized in that, After obtaining the review score result for the path to be recommended, the method further includes: Based on the review and scoring results, the user-food preference model is updated.
6. The food route recommendation method according to claim 3, characterized in that, After making food recommendations based on the target recommendation path, the method further includes: Obtain feedback information from the target user regarding the target recommended path; Based on the feedback information, the recalled candidate path set is updated.
7. The food route recommendation method according to any one of claims 1 to 3, characterized in that, The food recommendation based on the target recommendation path includes: Based on the natural language description template and the target recommendation path, a visual recommendation path description text for the target food is determined, and the recommendation is pushed based on the visual recommendation path description text.
8. The food route recommendation method according to any one of claims 1 to 3, characterized in that, The food recommendation based on the target recommendation path includes: Based on a natural language generation model, the target recommendation path is processed with visual text description to determine the visual recommendation path description text for the target food, and the recommendation is pushed based on the visual recommendation path description text; wherein, the natural language generation model is a model obtained by training a neural network with entity language labels of different corpora.
9. The food route recommendation method according to any one of claims 1 to 3, characterized in that, The process of acquiring the food knowledge graph includes: Based on the personal and demand information of different users, obtain user sub-graphies; Based on food information and cooking information of different foods, obtain food sub-maps; Based on the models and categories of different cooking equipment, obtain equipment sub-maps; By performing graph coupling on the user subgraph, the food subgraph, and the device subgraph, a food knowledge graph is obtained.
10. 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 food route recommendation method as described in any one of claims 1 to 9.
11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the food route recommendation method as described in any one of claims 1 to 9.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the food route recommendation method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Recipe recommendation method and device, computing device and computer storage medium
CN110706783A
Product recommendation method and device, medium and electronic equipment
CN114385828A