Menu recommendation method and device and storage medium

文档序号:1720418 发布日期:2019-12-17 浏览:15次 中文

阅读说明:本技术 菜谱推荐方法、装置及存储介质 (Menu recommendation method and device and storage medium ) 是由 程凡 于 2018-06-07 设计创作,主要内容包括:本发明实施例提供菜谱推荐方法、装置及存储介质,包括:获取菜谱的历史烹饪记录;根据所述历史烹饪记录确定各用户分别烹饪所述菜谱的烹饪概率;基于所述烹饪概率确定与待推荐用户对应的待推荐菜谱;推荐所述待推荐菜谱。该菜谱推荐方法针对任一待推荐用户进行菜谱推荐时,与该待推荐用户对应的待推荐菜谱均是基于烹饪概率进行聚类分析后的分组特性而实时确定的,被推荐菜谱的确定考虑了用户对菜谱的喜好相似度,从而推荐结果更加准确和高效。(The embodiment of the invention provides a menu recommendation method, a device and a storage medium, wherein the menu recommendation method comprises the following steps: acquiring a historical cooking record of a menu; determining the cooking probability of each user for cooking the menu according to the historical cooking record; determining a menu to be recommended corresponding to the user to be recommended based on the cooking probability; and recommending the menu to be recommended. When the menu recommendation method is used for recommending menus for any user to be recommended, the menus to be recommended corresponding to the user to be recommended are determined in real time based on grouping characteristics after clustering analysis is carried out on the cooking probability, and the preference similarity of the user to the menus is considered in the determination of the recommended menus, so that the recommendation result is more accurate and efficient.)

1. A menu recommendation method, comprising:

Acquiring a historical cooking record of a menu;

Determining the cooking probability of each user for cooking the menu according to the historical cooking record;

Determining a menu to be recommended corresponding to the user to be recommended based on the cooking probability;

And recommending the menu to be recommended.

2. the recipe recommendation method according to claim 1, wherein the determining of the recipe to be recommended corresponding to the user to be recommended based on the cooking probability includes:

And performing cluster analysis based on the cooking probability to determine the user similarity between users and/or the menu similarity between menus, and determining the menu to be recommended corresponding to the user to be recommended according to the cooking record of the user to be recommended and the user similarity and/or the menu similarity.

3. The recipe recommendation method according to claim 1, wherein the determining of the recipe to be recommended corresponding to the user to be recommended based on the cooking probability includes:

performing cluster analysis based on the cooking probability, and determining at least one user with the user similarity meeting the setting requirement with the user to be recommended according to the cooking probability of the user to be recommended for cooking the menu;

And determining a menu to be recommended corresponding to the user to be recommended according to the historical cooking record of the at least one user.

4. The recipe recommendation method according to claim 3, wherein performing cluster analysis based on the cooking probability, and determining at least one user whose user similarity to the user to be recommended meets a setting requirement according to the cooking probability of the user to be recommended cooking the recipe comprises:

respectively forming user cooking probability vectors corresponding to the users according to the cooking probabilities of the users for respectively cooking the menu;

And determining at least one user with the user similarity meeting the setting requirement with the user cooking probability vector of the user to be recommended according to the user similarity between the user cooking probability vector of the user to be recommended and the user cooking probability vectors of different users.

5. The recipe recommendation method according to claim 3, wherein performing cluster analysis based on the cooking probability, and determining at least one user whose user similarity to the user to be recommended meets a setting requirement according to the cooking probability of the user to be recommended cooking the recipe comprises:

Respectively forming user cooking probability vectors corresponding to the users according to the cooking probabilities of the users for respectively cooking the menu, and performing cluster analysis based on the user cooking probability vectors to determine the user categories;

According to the cooking probability of cooking the menu respectively by each user in the same user category, obtaining a user cooking probability vector corresponding to each user category;

According to the user similarity between the user cooking probability vector of the user to be recommended and the user cooking probability vectors of different user categories, determining a target user category which meets the setting requirement with the user similarity of the user to be recommended, and taking the user contained in the target user category as at least one user which meets the setting requirement with the user similarity of the user to be recommended.

6. the recipe recommendation method according to claim 3, wherein the determining the recipe to be recommended corresponding to the user to be recommended according to the historical cooking record of the at least one user comprises:

according to the historical cooking record of the at least one user, taking the menu which is cooked by the at least one user and is not cooked by the user to be recommended as the menu to be recommended corresponding to the user to be recommended; or

Taking a menu contained in the historical cooking record of the at least one user as a menu to be recommended corresponding to the user to be recommended; or

And taking the menu of the front preset position with higher cooking probability in the menus contained in the historical cooking records of the at least one user as the menu to be recommended corresponding to the user to be recommended.

7. the recipe recommendation method according to claim 1, wherein the determining of the recipe to be recommended corresponding to the user to be recommended based on the cooking probability includes:

performing cluster analysis based on the cooking probability, and determining at least one menu meeting the setting requirement with the menu similarity of the target menu according to the target menu of the user to be recommended;

And taking the at least one menu as a menu to be recommended corresponding to the user to be recommended.

8. The recipe recommendation method according to claim 7, wherein performing cluster analysis based on the cooking probability, and determining at least one recipe, which meets a setting requirement in terms of recipe similarity with a target recipe of a user to be recommended, includes:

respectively forming a menu cooking probability vector corresponding to the menu according to the cooking probability of each user for respectively cooking the menu;

And acquiring a current cooking record of a user to be recommended to determine a target menu, performing cluster analysis based on the menu cooking probability vector, and determining at least one menu of which the menu similarity accords with a setting requirement.

9. The recipe recommendation method of any one of claims 1-8, wherein said determining a cooking probability for each of said recipes by a respective user based on said historical cooking records comprises:

And determining the cooking probability of each user to each menu according to the ratio of the cooking times of each user to each menu to the total cooking times of each user to the menus.

10. A menu recommendation device, comprising:

the acquisition module is used for acquiring historical cooking records of the menu;

the probability determining module is used for determining the cooking probability of the menu cooked by each user according to the historical cooking record;

The menu determining module is used for determining a menu to be recommended corresponding to the user to be recommended based on the cooking probability;

and the recommending module is used for recommending the menu to be recommended.

11. A menu recommendation device, comprising: a processor and a memory for storing a computer program capable of running on the processor; wherein the processor is configured to implement the recipe recommendation method according to any one of claims 1 to 9 when running the computer program.

12. A storage medium having stored therein computer-executable instructions for performing the recipe recommendation method as recited in any one of claims 1 to 9.

Technical Field

the invention relates to the technical field of big data, in particular to a menu recommendation method, a menu recommendation device and a storage medium.

Background

With the improvement of living standard, people have higher and higher requirements on diet, and people want to taste fresh, delicious and different dishes, so that how to realize personalized recommendation of recipes becomes a research hotspot gradually.

The current menu recommendation method mainly comprises the following steps: firstly, recommending the current latest menu to a user; secondly, recommending the menu with the most current use times to the user; thirdly, setting classification rules of different taste categories or cuisine categories in advance, classifying the cuisine, obtaining personal information of the user, determining the taste category or cuisine category which the user probably likes, and then randomly recommending the cuisine in the same taste category or cuisine category to the user.

However, in the above manner, the menu which is the latest or most frequently used currently may not be preferred by the user; the preset classification rules of different taste categories or cuisine categories are difficult to ensure the accuracy and timeliness of the classification of the recipes, the recipes which are not classified into the corresponding category frames in time can not be recommended to the user in time, and the classification rules and classification levels of the recipes are difficult to ensure the accuracy and the recipes which are recommended to the user finally are not preferred by the user easily.

Disclosure of Invention

In order to solve the existing technical problems, embodiments of the present invention provide an accurate and efficient recipe recommendation method, apparatus, and storage medium.

in order to achieve the above purpose, the technical solution of the embodiment of the present invention is realized as follows:

a behavioral data analysis method, comprising: acquiring a historical cooking record of a menu; determining the cooking probability of each user for cooking the menu according to the historical cooking record; determining a menu to be recommended corresponding to the user to be recommended based on the cooking probability; and recommending the menu to be recommended.

A behavioural data analysis apparatus comprising: the acquisition module is used for acquiring historical cooking records of the menu; the probability determining module is used for determining the cooking probability of the menu cooked by each user according to the historical cooking record; the menu determining module is used for determining a menu to be recommended corresponding to the user to be recommended based on the cooking probability; and the recommending module is used for recommending the menu to be recommended.

A menu recommendation apparatus comprising a processor and a memory for storing a computer program operable on the processor; the processor is configured to implement the recipe recommendation method provided by any embodiment of the present invention when the computer program is executed.

a storage medium having stored therein computer-executable instructions for performing a recipe recommendation method provided by any one of the embodiments of the present invention.

in the recipe recommendation method, device and storage medium provided by the embodiments of the present invention, a server obtains a historical cooking record of a recipe from a terminal and/or a home appliance, determines a cooking probability of each user for cooking the recipe according to the historical cooking record, performs analysis based on the cooking probability, obtains a grouping characteristic of the cooking probability of each user for cooking the recipe according to a similarity between cooking probability data of each user for cooking the recipe, and determines a preference similarity of the user to the recipe according to the grouping characteristic of the cooking probability, so that a recipe to be recommended corresponding to a user to be recommended can be determined and recommended, and thus, for any user to be recommended, the recipe to be recommended corresponding to the user to be recommended is determined in real time based on the grouping characteristic of the cooking probability, and the determination of the recommended recipe takes into account the preference similarity of the user to the recipe, therefore, the recommendation result is more accurate and efficient.

drawings

FIG. 1 is a diagram of an application environment of a recipe recommendation method in an alternative embodiment of the invention;

FIG. 2 is a diagram of an application environment of a recipe recommendation method in another alternative embodiment of the present invention;

FIG. 3 is a flowchart of a recipe recommendation method in an embodiment of the invention;

FIG. 4 is a flowchart of a recipe recommendation method according to another embodiment of the invention;

FIG. 5 is a flowchart of a recipe recommendation method in accordance with yet another embodiment of the present invention;

FIG. 6 is a diagram illustrating a hardware configuration of a menu recommending apparatus according to an embodiment;

Fig. 7 is a schematic structural diagram of a menu recommending device according to another embodiment of the present invention.

Detailed Description

The technical scheme of the invention is further elaborated by combining the drawings and the specific embodiments in the specification.

Fig. 1 is a diagram illustrating an application environment of a recipe recommendation method according to an embodiment of the present application, and a server 100 is connected to a terminal 200 through a network. The server 100 stores a menu database, which includes menus and records of the user cooked the menus, that is, historical cooking records of the menus. The server 100 can recommend the menu to the terminal corresponding to the user according to the historical cooking record of the menu, the terminal 200 receives the menu recommended by the server, and the user can check the menu recommended by the server 100 through the terminal 200. The user can also send a menu query instruction to the server 100 through the terminal 200, the server 100 receives the menu query instruction to query in the menu database, and the corresponding menu is searched and returned to the terminal 200 as a query result. The server 100 may be a stand-alone physical server or a cluster of physical servers. The terminal 200 may be one or more, and may specifically include a smart phone, a portable computer, a personal computer, and the like.

Fig. 2 is a diagram illustrating an application environment of a recipe recommendation method in another embodiment of the present application, in which a server 100 is connected to a terminal 200 and a home appliance 300 through a network, respectively, where a user completes cooking a recipe through the home appliance 300, and the home appliance 300 may send a record of the recipe used by the user for cooking to the server 100 every time the user completes cooking the recipe through the home appliance 300. The server 100 receives the menu records of the user's cooking sent by the home appliance 300, and correspondingly stores the menu and the user's cooking records of each menu to form the historical cooking records of the menu, and stores the historical cooking records into the menu database. The server 100 may send the recommended recipe to the terminal corresponding to the user according to the historical cooking record of the recipe, and the terminal 200 receives the recipe recommended by the server 100, so that the user may view the recipe recommended by the server 100 through the terminal 200. The user may also send a recipe query instruction to the server 100 through the terminal 200 to find specific information of a recipe desired to be cooked. The server 100 receives the recipe query instruction to query in the recipe database, and finds a corresponding recipe as a query result to return to the terminal 200. The server 100 may be a stand-alone physical server or a cluster of physical servers. The terminal 200 may be one or more, and may specifically include a smart phone, a portable computer, a personal computer, and the like. The home device 300 is an intelligent home device that can perform cooking and perform communication interaction with the server 100.

Referring to fig. 3, a flowchart of a recipe recommendation method according to an embodiment of the present invention is applicable to the server shown in fig. 1 or fig. 2, and includes the following steps:

Step 101, obtaining a historical cooking record of a menu.

The historical cooking records of the recipes refer to the records of the user for cooking the recipes. Optionally, the historical cooking records of the recipes include corresponding relations among the user, the recipes and the cooking times of the recipes; or the corresponding relation among the user, the menu, the cooking times of the menu and the cooking time. Wherein, the recording of the cooking of each menu by the user can comprise: a user downloads a record of a menu through a terminal, namely a server receives a downloading request sent by the terminal and considers that the menu is cooked by the corresponding user once the user downloads the menu through the terminal; a user inquires about the record of the menu through a terminal, namely, a server receives an inquiry request sent by the terminal, and considers that the menu is cooked by the corresponding user once when the user inquires about the menu once through the terminal and adopts a corresponding inquiry result; the method comprises the steps that a user browses a record of a menu through a terminal, namely a server receives a browsing request sent by the terminal, and the fact that the menu is cooked by the corresponding user every time the user consults the menu details through the terminal is considered; the user records the menu evaluation through the terminal, namely the server receives the evaluation request sent by the terminal, and the user takes the menu praise, makes a comment, replies the comment and the like through the terminal as the menu is cooked by the corresponding user once. Optionally, the recording of the cooking of each menu by the user may further include: the method includes that a user carries out cooking record through the household appliance, namely, a server receives cooking related data sent by the household appliance, and a menu adopted by the user through the household appliance every time the user cooks is regarded as the menu to be cooked by the corresponding user once.

The recipe in the embodiment of the present application refers to a food cooking method that is understood in a broad sense, such as a method for making food such as dishes, pastries, cakes, rice, and beverages by using various cooking materials and various cooking parameters.

And 103, determining the cooking probability of each user for cooking the menu according to the historical cooking records.

specifically, the server respectively counts the total cooking times of all recipes by each user according to the corresponding relation among the users, the recipes and the cooking times of the recipes in the historical cooking records, and determines the cooking probability according to the ratio of the cooking times of each recipe to the total cooking times of all the recipes. Taking the case that the menu database comprises n menus, wherein the n menus are respectively menu 1, menu 2, menu 3 and menu … … menu n; assuming that there are m users, which are respectively a first user1, a second user2, a third user3, ….. the mth user; for the user1, the number of times of cooking with n recipes is 10, specifically, if the recipe 1 is used for cooking 3 times, the recipe 2 is used for cooking 4 times, and the recipe 3 is used for cooking 3 times, and other recipes are not cooked, the cooking probability of the user1 corresponding to the recipe 1 is 0.3(3/10), the cooking probability of the user1 corresponding to the recipe 2 is 0.4(4/10), the cooking probability of the user1 corresponding to the recipe 3 is 0.3(3/10), and the cooking probabilities of the user1 corresponding to other recipes are 0, for example, the cooking probability of the recipe n is 0. By analogy, the cooking probabilities of the user2, the user3 and the user … for the recipe can be determined respectively.

And 105, determining a menu to be recommended corresponding to the user to be recommended based on the cooking probability.

Optionally, the server determines the to-be-recommended menu corresponding to the to-be-recommended user based on the cooking probability, where the server analyzes the cooking probability and determines the to-be-recommended menu corresponding to the to-be-recommended user according to the grouping characteristic of the cooking probability. In an optional specific embodiment, the server determines the menu to be recommended corresponding to the user to be recommended by performing cluster analysis on the cooking probabilities. Cluster analysis refers to an analysis process that groups a set of physical or abstract objects into classes composed of similar objects. Through cluster analysis, data can be classified into different clusters by utilizing similarities between different data attributes. The server carries out cluster analysis based on the cooking probability, so that the grouping characteristics of the cooking probabilities of the cooking recipes respectively cooked by the user can be obtained, the preference similarity of the user to the recipes can be determined through the grouping characteristics of the cooking probabilities, and the recipes to be recommended corresponding to the user to be recommended can be determined.

and step 107, recommending the menu to be recommended.

The server recommending the menu to be recommended can be used for sending the menu to be recommended to a terminal corresponding to the user to be recommended, and the user can check the menu through the terminal. Optionally, for an intelligent household appliance with a voice playing function and/or a text display function, the server may also send a menu to be recommended to the household appliance corresponding to the user to be recommended, and the user may check the menu through the household appliance.

in the recipe recommendation method provided by the above embodiment of the present invention, the server obtains the historical cooking records of the recipes from the terminal and/or the household appliance, determines the cooking probabilities of the respective cooking recipes of the users according to the historical cooking records, performs analysis based on the cooking probabilities, and obtains the grouping characteristics of the cooking probabilities of the respective cooking recipes of the users according to the similarity between the cooking probability data of the respective cooking recipes of the users, and determines the preference similarity of the users to the recipes according to the grouping characteristics of the cooking probabilities, so as to determine and recommend the recipe to be recommended corresponding to the user to be recommended, so for any user to be recommended, the recipe to be recommended corresponding to the user to be recommended is determined in real time based on the grouping characteristics of the cooking probabilities, and the determination of the recommended recipe takes into account the preference similarity of the users to the recipes, therefore, the recommendation result is more accurate and efficient. Compared with the prior art, the menu recommendation method provided by the embodiment of the invention does not simply consider the updating degree of the menu or the total use times of all users, and does not need to preset classification rules of different taste categories or menu categories, so that the problems of untimely and inaccurate classification caused by the adoption of the method are avoided.

As an optional embodiment, in step 105, determining a to-be-recommended menu corresponding to the to-be-recommended user based on the cooking probability includes:

And performing cluster analysis based on the cooking probability to determine the user similarity between users and/or the menu similarity between menus, and determining the menu to be recommended corresponding to the user to be recommended according to the cooking record of the user to be recommended and the user similarity and/or the menu similarity.

The server carries out cluster analysis based on the cooking probabilities of the recipes cooked by the users respectively, and the data of the cooking probabilities of the users respectively cooking the recipes comprises the corresponding relations between the users and the cooking probabilities of the recipes respectively, so that the grouping characteristics of the users and the grouping characteristics of the recipes can be obtained through the cluster analysis, the user similarity between the users can be determined through the grouping characteristics of the users, and the recipe similarity between the recipes can be determined through the grouping characteristics of the recipes. Here, the cooking record of the user to be recommended may refer to a history cooking record or a current cooking record of the user to be recommended.

the server determines the menu to be recommended corresponding to the user to be recommended according to the cooking record of the user to be recommended and the user similarity and/or the menu similarity, and the method specifically comprises the following steps: the server determines the cooking probability of the menu cooked by the user to be recommended according to the historical cooking record of the user to be recommended, calculates the user similarity between the users according to the cooking probability of the menu cooked by the user to be recommended and the cooking probability of the menu cooked by other users, and determines the menu to be recommended corresponding to the user to be recommended according to the menu contained in the historical cooking record of other users with higher similarity to the user of the user to be recommended; or the server determines the menu which is liked by the user to be recommended currently as a target menu according to the current cooking record of the user to be recommended, calculates the menu similarity between the menus according to the cooking probability of the target menu cooked by each user and the cooking probability of other menus cooked by each user, determines other menus with higher menu similarity with the target menu, and determines the menu to be recommended corresponding to the user to be recommended according to other menus with higher menu similarity with the target menu. The other users with higher user similarity to the user to be recommended may be regarded as users with the same or similar preference similarity to the menu as the recommended user, and the other menus with higher menu similarity to the target menu may be regarded as menus with the same or similar preference similarity to the target user group.

the higher similarity may be that the similarity value is higher than the set value or the similarity with the top set number of bits in the sequence of the similarity values. The set number bit may be the first bit, i.e., the one with the highest similarity; or the nth bit, i.e., the first N with the highest similarity.

Wherein, the record of the cooking of each menu by the user can comprise at least one of the following records: the method comprises the steps that a user downloads a record of a menu through a terminal, the user inquires the record of the menu through the terminal, the user browses the record of the menu through the terminal, the user evaluates the menu through the terminal, and the user cooks through household appliances. Correspondingly, the server determines the menu currently favored by the user to be recommended as the target menu according to the current cooking record of the user to be recommended, and the method specifically includes: the method comprises the steps that a server receives a downloading request, an inquiring request, a browsing request or an evaluating request of a user to be recommended for a menu sent by a terminal, and the menu which is currently favored by the user to be recommended is determined according to menu information contained in the downloading request, the inquiring request, the browsing request or the evaluating request of the user to be recommended for the menu; or the server receives cooking related data sent by the household appliance equipment and used for cooking by the user to be recommended, and the menu which is currently favored by the user to be recommended is determined according to menu information contained in the cooking related data.

As another alternative embodiment, step 105, determining a menu to be recommended corresponding to the user to be recommended based on the cooking probability includes:

performing cluster analysis based on the cooking probability, and determining at least one user with the user similarity meeting the setting requirement with the user to be recommended according to the cooking probability of the user to be recommended for cooking the menu;

And determining a menu to be recommended corresponding to the user to be recommended according to the historical cooking record of the at least one user.

and the server performs cluster analysis based on the cooking probability, and calculates the user similarity according to the cooking probability of the menu cooked by the user to be recommended and the cooking probability of the menu cooked by other users, so as to determine at least one user with the user similarity meeting the setting requirement. The user similarity is high among the users with the same or similar cooking probabilities of the same menu, and the users have the same or similar preference degrees on the same menu, so that the menu to be recommended to the user to be recommended can be determined according to the menu contained in the historical cooking records of other users with the high user similarity to the user to be recommended, the accuracy is high, and the pertinence is stronger. The at least one user whose user similarity meets the setting requirement may refer to a user with the highest user similarity, N users whose user similarities are ranked in the top N digits, or one or more users whose user similarity is greater than a set value.

Optionally, the server determines, according to the historical cooking record of the at least one user, a to-be-recommended menu corresponding to the to-be-recommended user, which specifically includes: the server takes the menu contained in the historical cooking record of the at least one user as the menu to be recommended corresponding to the user to be recommended; or the server takes the menu of the front preset position with higher cooking probability in the menus contained in the historical cooking records of at least one user as the menu to be recommended corresponding to the user to be recommended; or the server takes the menu which is cooked by at least one user and is not cooked by the user to be recommended as the menu to be recommended corresponding to the user to be recommended. Specifically, the recipe which is cooked by the at least one user and uncooked by the user to be recommended may be a recipe in which the cooking probability included in the historical cooking record of the at least one user is greater than 0 and the cooking probability included in the historical cooking record of the user to be recommended is 0.

In a specific embodiment, performing cluster analysis based on the cooking probability, and determining at least one user whose user similarity to the user to be recommended meets a setting requirement according to the cooking probability of the user to be recommended cooking the menu includes:

Respectively forming user cooking probability vectors corresponding to the users according to the cooking probabilities of the users for respectively cooking the menu;

And determining at least one user with the user similarity meeting the setting requirement with the user cooking probability vector of the user to be recommended according to the user similarity between the user cooking probability vector of the user to be recommended and the user cooking probability vectors of different users.

The server respectively forms user cooking probability vectors corresponding to the users according to the cooking probabilities of the users respectively cooking the recipes, and taking n recipes as an example, the n recipes are recipe 1, recipe 2, recipe 3 and recipe … … respectively; assuming that there are m users, which are respectively a first user1, a second user2, a third user3, ….. the mth user; for the user1, as shown in the following table a, the number of times that the user has cooked n recipes is 10, specifically, the user has cooked 3 times with recipe 1, cooked 4 times with recipe 2, cooked 3 times with recipe 3, and has not cooked other recipes, the cooking probability of the user1 corresponding to recipe 1 is 0.3(3/10), the cooking probability of the user1 corresponding to recipe 2 is 0.4(4/10), the cooking probability of the user1 corresponding to recipe 3 is 0.3(3/10), the user1 corresponding to other recipes, and if the cooking probability of recipe n is 0, the user cooking probability vector corresponding to the user1 is [0.3, 0.4, 0.3, 0, … 0 ]. By analogy, the cooking probabilities of the recipes cooked by the users 2, 3 and … userm can be respectively determined, and the cooking probability vector of the user corresponding to the user2 is [0.5, 0.2, 0.2, 0, … 0.1], the cooking probability vector of the user corresponding to the user3 is [0, 0.1, 0, 0.2, … 0.7], and the cooking probability vector of the user corresponding to the userm is [0.1, 0.1, 0, 0, 0, … 0.8.8 ].

table one

the server may specifically be, according to the user similarity between the user cooking probability vector of the user to be recommended and the user cooking probability vectors of different users: and the server calculates the user similarity between the user cooking probability vector of the user to be recommended and the user cooking probability vectors of different users by adopting an Euclidean distance table. Still taking the above table one as an example, the expression for calculating the user similarity between the user1 and the user2 by using the euclidean distance table is as follows:

The larger the Euclidean distance value is, the smaller the similarity of the users is, and the larger the deviation of the preference degrees of the users to the same menu is; the smaller the Euclidean distance value is, the greater the user similarity is, and the smaller the deviation of the preference degree of the same menu among the users is.

In another specific embodiment, performing cluster analysis based on the cooking probability, and determining at least one user whose user similarity to the user to be recommended meets a setting requirement according to the cooking probability of the user to be recommended cooking the menu includes:

Respectively forming user cooking probability vectors corresponding to the users according to the cooking probabilities of the users for respectively cooking the menu, and performing cluster analysis based on the user cooking probability vectors to determine the user categories;

according to the cooking probability of cooking the menu respectively by each user in the same user category, obtaining a user cooking probability vector corresponding to each user category;

According to the user similarity between the user cooking probability vector of the user to be recommended and the user cooking probability vectors of different user categories, determining a target user category which meets the setting requirement with the user similarity of the user to be recommended, and taking the user contained in the target user category as at least one user which meets the setting requirement with the user similarity of the user to be recommended.

In this embodiment, the server forms user cooking probability vectors corresponding to the users according to the cooking probabilities of the users respectively cooking the recipes, and performs cluster analysis based on the user cooking probability vectors to determine the user categories. The same user category may include a plurality of users having the same or similar cooking probabilities for the same recipe, so that the users in the same user category may regard the same or similar preference degrees for the same recipe. The server obtains a user cooking probability vector corresponding to each user category according to the cooking probabilities of the recipes cooked by each user in the same user category, which may specifically be: and the server calculates one of an average value, a weighted average value, an average value after end value removal and a median value according to the cooking probability of each user in the same category to be used as the cooking probability of the user corresponding to the user category. The server determines a target user category which meets the setting requirement with the user similarity of the user to be recommended according to the user similarity between the user cooking probability vector of the user to be recommended and the user cooking probability vectors of different user categories, and takes the user contained in the target user category as at least one user which meets the setting requirement with the user similarity of the user to be recommended.

Still taking the above table one as an example, the user cooking probability vector corresponding to user1 is [0.3, 0.4, 0.3, 0, … 0], the user cooking probability vector corresponding to user2 is [0.5, 0.2, 0.2, 0, … 0.1], the user cooking probability vector corresponding to user3 is [0, 0.1, 0, 0.2, … 0.7.7 ], and the user cooking probability vector corresponding to userm is [0.1, 0.1, 0, 0, … 0.8 ]. The server calculates user similarity among users according to a Euclidean distance table and then performs cluster analysis to determine user categories, wherein both the user1 and the user2 belong to a first user category, and both the user3 and the user belong to a second user category, the server obtains user cooking probability vectors corresponding to the corresponding user categories according to average values of cooking probabilities of users respectively cooking the menu in the same user category, wherein the user cooking probability vector corresponding to the first user category is [0.4, 0.3, 0.25, 0, …, 0.05], and the user cooking probability vector corresponding to the second user category is [0.05, 0.1, 0, 0.1, …, 0.75 ]. The server calculates user similarity according to the user cooking probability vector of the user to be recommended and the user cooking probability vectors of different user categories, determines the user category with the highest user similarity with the user to be recommended or the user category with the similarity ranked at the top N as a target user category, and takes the user contained in the target user category as at least one user with the user similarity meeting the setting requirement with the user to be recommended.

the server respectively forms user cooking probability vectors corresponding to the users according to the cooking probabilities of the users respectively cooking the recipes to perform cluster analysis to determine the user categories, so that when other users with higher similarity of the users to be recommended are determined, the similarity of the users to be recommended and each user category can be calculated to determine, the calculation amount of the recipes to be recommended corresponding to the users to be recommended can be greatly reduced, and the recommendation efficiency is improved.

As another optional embodiment, in step 105, determining a to-be-recommended menu corresponding to the to-be-recommended user based on the cooking probability includes:

Performing cluster analysis based on the cooking probability, and determining at least one menu meeting the setting requirement with the menu similarity of the target menu according to the target menu of the user to be recommended;

And taking the at least one menu as a menu to be recommended corresponding to the user to be recommended.

Specifically, the server may determine the target menu of the user to be recommended according to the cooking record of the user to be recommended. The cooking record of the user to be recommended may be a current cooking record of the user to be recommended and/or a historical cooking record of the user to be recommended, and may specifically include at least one of the following records: the method comprises the steps that a user to be recommended downloads a record of a menu through a terminal, the user to be recommended inquires the record of the menu through the terminal, the user to be recommended browses the record of the menu through the terminal, the user to be recommended evaluates the menu through the terminal, and the user to be recommended cooks through household appliances. Correspondingly, the server determines the target menu of the user to be recommended according to the current cooking record of the user to be recommended, and the method specifically includes: the method comprises the steps that a server receives a downloading request, an inquiring request, a browsing request or an evaluating request of a user to be recommended for a menu sent by a terminal, and determines a target menu of the user to be recommended according to menu information contained in the downloading request, the inquiring request, the browsing request or the evaluating request of the user to be recommended for the menu; or the server receives cooking related data sent by the household appliance equipment and used for cooking by the user to be recommended, and determines a target menu of the user to be recommended according to menu information contained in the cooking related data.

The at least one recipe whose recipe similarity meets the setting requirement may be the one recipe with the highest recipe similarity, N recipes with the recipe similarity ranked in the top N digits, or one or more recipes with the recipe similarity value greater than a set value.

Further, the server performs cluster analysis based on the cooking probability, and determines at least one menu meeting setting requirements with the menu similarity of the target menu according to the target menu of the user to be recommended, specifically including:

Respectively forming a menu cooking probability vector corresponding to the menu according to the cooking probability of each user for respectively cooking the menu;

and acquiring a current cooking record of a user to be recommended to determine a target menu, performing cluster analysis based on the menu cooking probability vector, and determining at least one menu of which the menu similarity accords with a setting requirement.

And the server respectively forms a menu cooking probability vector corresponding to the menu according to the cooking probabilities of the users respectively cooking the menu. Taking n recipes as an example, the n recipes are recipe 1, recipe 2, recipe 3 and recipe …, respectively, in combination with the table one shown in the above table; assuming that m users are respectively a first user1, a second user2, a third user3 and a … mth user; for recipe 1, the cooking probabilities of recipe 1 being cooked by m users respectively include: the cooking probability of cooking by the user1 is 0.3, the cooking probability of cooking by the user2 is 0.5, the cooking probability of cooking by the user3 is 0, the cooking probability of cooking by the user … is 0.1, and the recipe cooking probability vector of recipe 1 is [0.3, 0.5, 0, … 0.1 ]. By analogy, the cooking probabilities of the recipes cooked by the user2, the user3 and the user … can be respectively determined, and the recipe cooking probability vector corresponding to the recipe 2 is [0.4, 0.2, 0.1, … 0.1.1 ], the recipe cooking probability vector corresponding to the recipe 2 is [0.3, 0.2, 0.. 0.2], and the recipe cooking probability vector corresponding to the recipe n is [0, 0.1, 0.7.. 0.8 ].

the server obtains a current cooking record of a user to be recommended to determine a target menu, performs cluster analysis based on the menu cooking probability vector, and determines at least one menu of which the menu similarity with the target menu meets the setting requirement. The server may specifically be, according to the recipe cooking probability vector of the target recipe of the user to be recommended and the recipe cooking probability vectors of different recipes, a recipe similarity between the recipe cooking probability vectors of the target recipe and the recipe cooking probability vectors of the different recipes: the server calculates the menu similarity between the menu cooking probability vector of the target menu and the menu cooking probability vectors of different menus by adopting an Euclidean distance calculation mode. Still taking the table one as an example, the Euclidean distance table is used to calculate the menu similarity between menu 1 and menu 2, and the specific expression may be

The larger the Euclidean distance value is, the smaller the similarity of the menu is; the smaller the Euclidean distance value is, the greater the similarity of the menu is.

in order to better understand the recipe recommendation method provided in the embodiment of the present application, please refer to fig. 4, which takes n recipes and m users shown in table one as an example, and describes the steps of the recipe recommendation method performed by determining the similarity of the users based on the clustering analysis of the cooking probabilities:

And S11, the server acquires the historical cooking record of the menu sent by the terminal and/or the household appliance.

the server receives a downloading request sent by the terminal, and considers that the menu is cooked by the corresponding user once every time the user downloads the menu through the terminal; the server receives an inquiry request sent by the terminal, and considers that the menu is cooked by the corresponding user once when the user inquires the menu once through the terminal and adopts the corresponding inquiry result; the server receives a browsing request sent by the terminal, and considers that the menu is cooked by the corresponding user once the user consults the menu details through the terminal; the server receives an evaluation request sent by the terminal, and considers that the menu is cooked by the corresponding user once when the user approves, makes comments, replies comments and the like on the menu through the terminal; and the server receives cooking related data sent by the household appliance, and regards the menu adopted by the user through the household appliance every time the household appliance cooks as the menu to be cooked by the corresponding user. The historical cooking records of the menu comprise the corresponding relation among the user name, the menu name and the menu cooking times. The server stores the historical cooking records of the menu in a menu database.

And S12, the server determines the cooking probability of each user for cooking the menu according to the historical cooking records of the menu.

and the server determines the cooking probability of each user to each menu according to the ratio of the cooking times of each user to each menu to the total cooking times of each user to the menus.

And S13, the server performs cluster analysis based on the cooking probability of the recipes cooked by each user respectively, determines the user category, and determines the user cooking probability vectors corresponding to the user category respectively.

And the server forms the cooking probability of each user for cooking the menu into a corresponding user cooking probability vector, calculates the user similarity based on the user cooking probability vector, and determines the users with the user similarity smaller than a set value as a same user category. And taking the average value of the cooking probabilities of the users in the same user category as the user cooking probability vector of the user category.

S14, the server determines the target user category with the maximum user similarity to the user to be recommended based on the user cooking probability vector of the user to be recommended and the user cooking probability vectors of the user categories.

and the server forms the cooking probability of the menu for the user to be recommended into a corresponding user cooking probability vector, calculates the user similarity according to the user cooking probability vector and the user cooking probability vectors of all user categories, and determines the target user category with the maximum user similarity to the user to be recommended.

and S15, the server takes the menu which is cooked by each user in the target user category and is not cooked by the user to be recommended as the menu to be recommended corresponding to the user to be recommended, and pushes the menu to be recommended to the terminal and/or the household appliance corresponding to the user to be recommended.

the server determines the recipes which are contained in the historical cooking records of the users in the target user category (the cooking probability is greater than 0) and are not contained in the historical cooking records of the users to be recommended (the cooking probability is equal to 0) as the recipes which are cooked by the users in the target user category and are not cooked by the users to be recommended. In an optional scene that a user to be recommended only communicates with a server through a terminal, the server sends a menu to be recommended to the terminal so that the user to be recommended can check the menu through the terminal; in an optional scene that a user to be recommended communicates with a server only through an intelligent household appliance with a communication function, the server sends a menu to be recommended to the household appliance for the user to be recommended to check through the household appliance; it can be understood that in an optional scene that the user to be recommended communicates with the server through the terminal and the intelligent household appliance, the server can send the menu to be recommended to the terminal and the household appliance at the same time, so that the user to be recommended can check the menu through the terminal or the household appliance.

in order to better understand the recipe recommendation method provided in the embodiment of the present application, please refer to fig. 5, which takes n recipes and m users shown in table one as an example, and describes steps of the recipe recommendation method performed by performing cluster analysis based on cooking probability to determine similarity of recipes, where the difference from the embodiment shown in fig. 4 is that after step S12, the method includes:

And S16, the server determines a target menu according to the cooking record of the user to be recommended. The server determines a target menu, wherein the server receives a download request, an inquiry request, a browsing request or an evaluation request of a user to be recommended to the menu, which is sent by a terminal, and menu information contained in the download request, the inquiry request, the browsing request or the evaluation request of the user to be recommended to the menu is determined as the target menu of the user to be recommended; or the server receives cooking related data sent by the household appliance equipment and used for cooking by the user to be recommended, and the menu information contained in the cooking related data is determined as the target menu of the user to be recommended.

and S17, the server obtains a menu cooking probability vector of each menu based on the cooking probability of each user for cooking the menu respectively, and performs cluster analysis based on the menu cooking probability vectors to determine the menu with the maximum menu similarity with the target menu of the user to be recommended. The recipe cooking probability vector is a vector formed by cooking probabilities of different users for cooking the recipe respectively.

And S18, the server pushes the menu with the maximum menu similarity with the target menu to the terminal and/or the household appliance corresponding to the user to be recommended. The specific implementation manner of pushing the menu to be recommended to the user to be recommended by the server may be the same as that in the embodiment shown in fig. 4, and details are not described here.

In the recipe recommendation method provided by the above embodiment of the present invention, the server obtains the historical cooking records of the recipes from the terminal and/or the home appliance, determines the cooking probabilities of the respective cooking recipes by the users according to the historical cooking records, performs cluster analysis based on the cooking probabilities, and performs cluster analysis based on the similarity between the cooking probability data of the respective cooking recipes by the users, wherein the cooking probability data of the respective cooking recipes by the users at least includes the correspondence between the users, the recipes, and the cooking times of the recipes, and the data attribute of each cooking probability at least includes two dimensions of the users and the recipes, so that the cluster analysis is performed after vectors of different dimensions are formed according to the cooking probabilities, thereby obtaining the similarity of the users representing the similarity of the same or similar preference between different users with the same recipe, and the similarity of the recipes representing the similarity of the same or similar preference between different recipes used by the same user with the same or similar preference between different users Similarity. That is, by obtaining the grouping characteristics of the cooking probabilities of the respective cooking recipes of the users, the preference similarity of the users to the recipes can be determined through the grouping characteristics of the cooking probabilities, so that the recipes to be recommended corresponding to the users to be recommended can be determined and recommended, for any user to be recommended, the recipes to be recommended corresponding to the users to be recommended are determined in real time based on the grouping characteristics of the cooking probabilities, the preference similarity of the users to the recipes is considered in the determination of the recommended recipes, and the recommendation result is more accurate and efficient.

the menu recommending device adopting the menu recommending method provided by the embodiment of the invention can be a server, and as for the hardware structure of the menu recommending device, please refer to fig. 6, which is an optional hardware structure schematic diagram of the menu recommending device, and the menu recommending device comprises a processor 110 and a memory 113 for storing a computer program capable of running on the processor 110; the processor 110 is configured to implement the recipe recommendation method provided in any embodiment of the present application when the computer program is executed.

in an exemplary embodiment, please refer to fig. 7, which is a schematic structural diagram of a menu recommending apparatus according to an embodiment of the present invention, the menu recommending apparatus includes: the acquisition module 11 is used for acquiring historical cooking records of the menu; a probability determining module 13, configured to determine, according to the historical cooking records, cooking probabilities of the recipes cooked by each user respectively; the menu determining module 15 is configured to determine a menu to be recommended corresponding to the user to be recommended based on the cooking probability; and the recommending module 17 is used for recommending the menu to be recommended.

The recipe determining module 15 is specifically configured to perform cluster analysis based on the cooking probability to determine user similarity between users and/or recipe similarity between recipes, and determine a to-be-recommended recipe corresponding to the to-be-recommended user according to the cooking record of the to-be-recommended user and the user similarity and/or recipe similarity.

The recipe determining module 15 includes a first clustering unit and a first recipe determining unit, where the first clustering unit is configured to perform clustering analysis based on the cooking probability, and determine, according to the cooking probability of the to-be-recommended user for cooking the recipe, at least one user whose user similarity to the to-be-recommended user meets a setting requirement; the first menu determining unit is used for determining a menu to be recommended corresponding to the user to be recommended according to the historical cooking record of the at least one user.

The first clustering unit is specifically configured to form user cooking probability vectors corresponding to the users according to the cooking probabilities of the users respectively cooking the recipes; and determining at least one user with the user similarity meeting the setting requirement with the user cooking probability vector of the user to be recommended according to the user similarity between the user cooking probability vector of the user to be recommended and the user cooking probability vectors of different users.

The first clustering unit is specifically configured to form user cooking probability vectors corresponding to the users according to the cooking probabilities of the users respectively cooking the recipes, and perform clustering analysis based on the user cooking probability vectors to determine user categories; according to the cooking probability of cooking the menu respectively by each user in the same user category, obtaining a user cooking probability vector corresponding to each user category; according to the user similarity between the user cooking probability vector of the user to be recommended and the user cooking probability vectors of different user categories, determining a target user category which meets the setting requirement with the user similarity of the user to be recommended, and taking the user contained in the target user category as at least one user which meets the setting requirement with the user similarity of the user to be recommended.

The first menu determining unit is specifically configured to use a menu which is cooked by the at least one user and is not cooked by the user to be recommended as a menu to be recommended corresponding to the user to be recommended according to the historical cooking record of the at least one user; or, taking a menu contained in the historical cooking record of the at least one user as a menu to be recommended corresponding to the user to be recommended; or, the menu of the preset position with higher cooking probability in the menus contained in the historical cooking records of the at least one user is used as the menu to be recommended corresponding to the user to be recommended.

the recipe determining module 15 includes a second clustering unit and a second recipe determining unit, where the second clustering unit is configured to perform clustering analysis based on the cooking probability, and determine, according to a target recipe of a user to be recommended, at least one recipe whose recipe similarity with the target recipe meets a setting requirement; the second menu determining unit is used for taking the at least one menu as a menu to be recommended corresponding to the user to be recommended.

The second clustering unit is specifically configured to form recipe cooking probability vectors corresponding to the recipes according to cooking probabilities of users respectively cooking the recipes; and acquiring a current cooking record of a user to be recommended to determine a target menu, performing cluster analysis based on the menu cooking probability vector, and determining at least one menu of which the menu similarity accords with a setting requirement.

The probability determining module 13 is specifically configured to determine the cooking probability of each user for each recipe according to a ratio of the number of times that each user cooks each recipe to the total number of times that each user cooks the recipe.

In an exemplary embodiment, the embodiment of the present invention further provides a readable storage medium, for example, a memory including an executable program, where the executable program is executable by a processor to complete the steps of the recipe recommendation method provided in any embodiment of the present application. The readable storage medium can be FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM; or may be various devices, such as computer devices, etc., including one or any combination of the above memories.

the above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and the present invention shall be covered thereby. The scope of the invention is to be determined by the scope of the appended claims.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种菜谱调整方法、装置及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!