CN111209453A - Menu recommendation method and device, computer equipment and storage medium - Google Patents

Menu recommendation method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111209453A
CN111209453A CN202010005908.7A CN202010005908A CN111209453A CN 111209453 A CN111209453 A CN 111209453A CN 202010005908 A CN202010005908 A CN 202010005908A CN 111209453 A CN111209453 A CN 111209453A
Authority
CN
China
Prior art keywords
menu
dish
score
information
basic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010005908.7A
Other languages
Chinese (zh)
Inventor
曾钢欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Shuliantianxia Intelligent Technology Co Ltd
Original Assignee
Shenzhen Shuliantianxia Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Shuliantianxia Intelligent Technology Co Ltd filed Critical Shenzhen Shuliantianxia Intelligent Technology Co Ltd
Priority to CN202010005908.7A priority Critical patent/CN111209453A/en
Publication of CN111209453A publication Critical patent/CN111209453A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9035Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H20/00ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance
    • G16H20/60ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance relating to nutrition control, e.g. diets

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Medical Informatics (AREA)
  • Primary Health Care (AREA)
  • Public Health (AREA)
  • General Health & Medical Sciences (AREA)
  • Epidemiology (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Nutrition Science (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

The embodiment of the invention discloses a menu recommendation method, which comprises the following steps: acquiring input basic information, and acquiring a target efficacy corresponding to the basic information according to the basic information; acquiring a menu efficacy dimension table, wherein the menu efficacy dimension table records the corresponding relation between dishes and efficacies; determining a basic score corresponding to each dish in the menu according to the target efficacy and the menu efficacy dimension table to obtain a menu basic score table; acquiring input existing food material information; adjusting the basic score corresponding to each dish in the menu according to the existing food material information to obtain an adjusted menu score table; and recommending the menu according to the score of each dish in the menu score table. The menu recommendation method is wide in applicability and high in recommendation accuracy. In addition, a menu recommending device, a computer device and a storage medium are also provided.

Description

Menu recommendation method and device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of intelligent recommendation, in particular to a menu recommendation method and device, computer equipment and a storage medium.
Background
With the gradual maturity of artificial intelligence technology, new development power is injected into the society, various product applications pay more and more attention to details, and the recommendation for users is more and more accurate. The dietary recommendation demand of people is more and more, and the demand is higher and more. The traditional menu recommendation method has the disadvantages that the recommendation accuracy is low due to single considered factor; or too narrow applicability, e.g. to be recommended only for pregnant women.
Therefore, a menu recommendation method with wide applicability and high recommendation accuracy is needed.
Disclosure of Invention
In view of the above, it is necessary to provide a recipe recommendation method, device, computer device, and storage medium with wide applicability and high recommendation accuracy.
A method of recipe recommendation, the method comprising:
acquiring input basic information, and acquiring a target efficacy corresponding to the basic information according to the basic information;
acquiring a menu efficacy dimension table, wherein the menu efficacy dimension table records the corresponding relation between dishes and efficacies;
determining a basic score corresponding to each dish in the menu according to the target efficacy and the menu efficacy dimension table to obtain a menu basic score table;
acquiring input existing food material information;
adjusting the basic score corresponding to each dish in the menu according to the existing food material information to obtain an adjusted menu score table;
and recommending the menu according to the score of each dish in the menu score table.
A menu recommendation device, the device comprising:
the first acquisition module is used for acquiring input basic information and acquiring a target efficacy corresponding to the basic information according to the basic information;
the second acquisition module is used for acquiring a menu efficacy dimension table, and the menu efficacy dimension table records the corresponding relation between dishes and efficacies;
the determining module is used for determining the basic score corresponding to each dish in the menu according to the target efficacy and the menu efficacy dimension table to obtain a menu basic score table;
the third acquisition module is used for acquiring the input existing food material information;
the adjusting module is used for adjusting the basic score corresponding to each dish in the menu according to the existing food material information to obtain an adjusted menu score table;
and the recommending module is used for recommending the menu according to the score of each dish in the menu score table.
A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of:
acquiring input basic information, and acquiring a target efficacy corresponding to the basic information according to the basic information;
acquiring a menu efficacy dimension table, wherein the menu efficacy dimension table records the corresponding relation between dishes and efficacies;
determining a basic score corresponding to each dish in the menu according to the target efficacy and the menu efficacy dimension table to obtain a menu basic score table;
acquiring input existing food material information;
adjusting the basic score corresponding to each dish in the menu according to the existing food material information to obtain an adjusted menu score table;
and recommending the menu according to the score of each dish in the menu score table.
A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
acquiring input basic information, and acquiring a target efficacy corresponding to the basic information according to the basic information;
acquiring a menu efficacy dimension table, wherein the menu efficacy dimension table records the corresponding relation between dishes and efficacies;
determining a basic score corresponding to each dish in the menu according to the target efficacy and the menu efficacy dimension table to obtain a menu basic score table;
acquiring input existing food material information;
adjusting the basic score corresponding to each dish in the menu according to the existing food material information to obtain an adjusted menu score table;
and recommending the menu according to the score of each dish in the menu score table.
According to the menu recommendation method, firstly, the input basic information is obtained, the target efficacy corresponding to the basic information is obtained, the basic score of each dish is calculated according to the target efficacy and the efficacy dimension table, the menu basic score table is obtained, then the basic score of each dish in the menu is adjusted according to the input existing food material information on the basis of the menu basic score table, the adjusted menu score table is obtained, and then corresponding menu recommendation is carried out according to the adjusted menu score table. The menu recommendation method considers not only basic information under general conditions, but also existing food materials, namely, recommendation is carried out by combining the existing food materials, so that the recommendation result can better meet the requirements of users, the recommendation accuracy is improved, in addition, the basic information in the method is information input by the users, different recommendations can be carried out aiming at different users, and the method has the characteristic of wide applicability.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Wherein:
FIG. 1 is a diagram of an application environment of a recipe recommendation method in one embodiment
FIG. 2 is a flow diagram of a recipe recommendation method in one embodiment;
FIG. 3 is a flow diagram of a method for determining a base score based on a target efficacy and a recipe efficacy dimension table in one embodiment;
FIG. 4 is a flowchart illustrating a method for adjusting a base score according to an existing food material according to an embodiment;
FIG. 5 is a flow diagram of a method for making recipe recommendations based on a recipe score table in one embodiment;
FIG. 6 is a flowchart of a method of recipe recommendation in another embodiment;
FIG. 7 is a flowchart illustrating a recipe recommendation method according to an embodiment;
FIG. 8 is a block diagram showing the configuration of a menu recommending apparatus according to an embodiment;
FIG. 9 is a block diagram showing the construction of a menu recommending apparatus according to another embodiment;
FIG. 10 is a block diagram showing the construction of a menu recommending apparatus in still another embodiment;
FIG. 11 is a block diagram of a computer device in one embodiment.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is an application environment diagram of a recipe recommendation method in one embodiment. Referring to fig. 1, the recipe recommendation method is applied to a recipe recommendation system. The menu recommendation system includes a terminal 110 and a server 120. The terminal 110 and the server 120 are connected through a network, the terminal 110 may be specifically a desktop terminal or a mobile terminal, and the mobile terminal may be specifically at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The server 120 may be implemented as a stand-alone server or a server cluster composed of a plurality of servers. The terminal 110 is configured to obtain basic information and existing food material information input by a user, send the obtained basic information and the existing food material information to the server 120, after the server 120 obtains the basic information, obtain a target efficacy corresponding to the basic information according to the basic information, obtain a menu efficacy dimension table, where a corresponding relationship between dishes and efficacies is recorded in the menu efficacy dimension table, determine a basic score corresponding to each dish in a menu according to the target efficacy and the efficacy dimension table, and obtain a menu basic score table; and then, adjusting the basic score corresponding to each dish in the menu according to the obtained existing food material information to obtain an adjusted menu score table, obtaining a recommended menu according to the score of each dish in the menu score table, and then sending the recommended menu to the terminal 110 for displaying.
In another embodiment, the recipe recommendation method may be directly applied to the terminal 110, where the terminal 110 is configured to obtain input basic information, obtain a target efficacy corresponding to the basic information according to the basic information, obtain a recipe efficacy dimension table, where a correspondence between dishes and efficacies is recorded in the recipe efficacy dimension table, determine a basic score corresponding to each dish in the recipe according to the target efficacy and efficacy dimension table, obtain a recipe basic score table, obtain input existing food material information, adjust the basic score corresponding to each dish in the recipe according to the existing food material information, obtain an adjusted recipe score table, and recommend the recipe according to the score of each dish in the recipe score table.
As shown in fig. 2, a recipe recommendation method is provided, where the recipe recommendation method may be applied to a terminal or a server, and in this embodiment, taking application to a terminal as an example, the recipe recommendation method specifically includes the following steps:
step 202, acquiring the input basic information, and acquiring the target efficacy corresponding to the basic information according to the basic information.
The basic information refers to general information input by the user for recommendation, for example, the basic information may be at least one of weather, season, geographic information, personal information of the user, and the like. The user personal information may be preference information of the user, sleep state information of the user, or the like. Different basic information corresponds to different target efficacies. For example, for the seasonal dimension, if the current season is spring, the corresponding target efficacy is to eliminate dampness, if the current season is summer, the corresponding target efficacy is to reduce internal heat, if the current season is autumn, the corresponding target efficacy is to reduce dryness, and if the current season is winter, the corresponding target efficacy is to dispel cold.
And 204, acquiring a menu efficacy dimension table, wherein the menu efficacy dimension table records the corresponding relation between dishes and efficacies.
Wherein, the menu efficacy dimension table records the corresponding relation between the dishes (the dishes can be simply understood as dish names) and the efficacies. For example, tomato-egg soup-Jianghuo, lettuce-Liaoning and Jiangya.
And step 206, determining the basic score corresponding to each dish in the menu according to the target efficacy and the menu efficacy dimension table to obtain a menu basic score table.
After the target efficacy corresponding to the basic information is determined, the basic score of each dish can be obtained according to whether the dish in the menu efficacy dimension table corresponds to the corresponding target efficacy.
In one embodiment, the base score for each dish is positively correlated with the number of target effects the dish comprises. For example, assuming a total of 5 target efficacies, the score corresponding to 1 target efficacy may be 20 points, the score corresponding to 2 target efficacies is 40 points, the score corresponding to 3 target efficacies is 60 points, and so on, so as to obtain the basic score corresponding to each dish in the recipe, and thus obtain the basic score table of the recipe, in which the corresponding relationship between the dish of each dish and the corresponding basic score is recorded.
And step 208, acquiring the input existing food material information.
The existing food material information refers to the food material which the user currently has and is input by the user. If the existing food material information is not considered, as long as the food materials are lacked, the user needs to spend a large amount of time to purchase the related food materials, and if the corresponding food materials are not purchased, the recommended menu is meaningless in practice. Therefore, if the existing food material information of the user can be obtained before recommendation, the recommendation is carried out according to the existing food material information, and the recommendation accuracy is improved, so that the satisfaction degree of the user is improved.
And step 210, adjusting the basic score corresponding to each dish in the menu according to the existing food material information to obtain an adjusted menu score table.
In order to improve the accuracy of recommendation, the basic score of each dish needs to be adjusted according to the existing food material information. In one embodiment, the number of the food materials lacking in each dish can be adjusted, and the more the number of the food materials lacking, the more the corresponding basic score needs to be adjusted downward. For example, the food materials required by each dish are respectively obtained, the number of the food materials lacking in each dish is counted according to the existing food materials, if one food material is lacking, the corresponding score is adjusted downward by 5 points, if 2 food materials are lacking, the corresponding score is adjusted downward by 10 points, and the like. And adjusting the basic score corresponding to each dish to obtain the adjusted score of each dish. The corresponding relation between each dish and the adjusted score is recorded in the adjusted dish score table.
And 212, recommending the menu according to the score of each dish in the menu score table.
Wherein, the menu score table records the corresponding relationship between the dishes of each dish and the corresponding score. The higher the score is, the more the dish meets the requirements of the user. In one embodiment, dishes in the menu are ranked from high to low according to the score of each dish, and then the ranking result is used for recommending the corresponding menu. For example, if 6 dishes are recommended at one time, the top 6 ordered dishes are recommended to the user as a recommended menu.
According to the menu recommendation method, firstly, the input basic information is obtained, the target efficacy corresponding to the basic information is obtained, the basic score of each dish is calculated according to the target efficacy and the efficacy dimension table, the menu basic score table is obtained, then the basic score of each dish in the menu is adjusted according to the input existing food material information on the basis of the menu basic score table, the adjusted menu score table is obtained, and then corresponding menu recommendation is carried out according to the adjusted menu score table. The menu recommendation method considers not only basic information under general conditions, but also existing food materials, namely, recommendation is carried out by combining the existing food materials, so that the recommendation result can better meet the requirements of users, the recommendation accuracy is improved, in addition, the basic information in the method is information input by the users, different recommendations can be carried out aiming at different users, and the method has the characteristic of wide applicability.
As shown in fig. 3, in one embodiment, the basic information includes: at least one base dimension, each base dimension corresponding to a respective target efficacy; determining a basic score corresponding to each dish in the menu according to the target efficacy and the menu efficacy dimension table to obtain a menu basic score table, wherein the menu basic score table comprises the following steps:
step 206A, a weight corresponding to each basic dimension in the basic information is obtained.
The basic information includes one or more basic dimensions, and each basic dimension corresponds to a corresponding weight. For example, it is assumed that the basic information includes three basic dimensions of season, region, and ultraviolet ray, and the specific input basic information is spring, south region, and ultraviolet ray weak. Different weights can be set for different basic dimensions because different basic dimensions have different influences on users, for example, the weight of season can be set to 5, the weight of region can be set to 2, and the weight of ultraviolet can be set to 3.
And step 206B, determining a basic dimension matrix corresponding to the basic dimension according to the target efficacy corresponding to each basic dimension.
Wherein the target efficacies corresponding to different basic dimensions are different. The basic dimension matrix is a matrix obtained by performing digital conversion on the input basic dimension.
For example, the seasonal dimension assumes that the effect in spring is to eliminate dampness, the effect in summer is to reduce internal heat, the effect in autumn is to humidify, and the effect in winter is to keep warm. The regional dimension assumes that the efficacy of the southern region is body building and the efficacy of the northern region is cold dispelling. The ultraviolet dimension, the strong ultraviolet function is to improve the resistance, and the weak ultraviolet function is to whiten the skin.
The basic dimension matrix is expressed as [ season-spring-damp, season-summer-fire-reducing, season-autumn-humidifying, south region-body building, north region-cold dispelling, ultraviolet ray strengthening-resistance improving, ultraviolet ray weakening-whitening ];
if the dimensions of the input are: in spring, southern areas, weak ultraviolet rays; then correspondingly, season-spring-damp is represented as 1, season-summer-fire-reducing is represented as 0, season-fall-humidifying is represented as 0, south area-body building is represented as 1, north area-cold-dispelling is represented as 0, uv-strong-resistance-improvement is represented as 0, uv-weak-whitening is represented as 1, then the corresponding basis dimension matrix is represented as a number of [1,0,0,0,1,0,0,1], i.e., if the corresponding condition is met, the corresponding setting is 1, otherwise it is 0.
And step 206C, determining an efficacy matrix corresponding to each dish in the menu according to the menu efficacy dimension table and the target efficacy.
Wherein, the efficacy matrix is expressed in a corresponding number matrix form according to the target efficacy contained in each dish. Corresponding to the basic dimension matrix, for example, it is assumed that tomato egg soup (dish) contains the target effects of eliminating dampness and whitening skin, and eggplant fried meat (dish) contains the target effects of eliminating dampness and strengthening body. Then the efficacy matrix of tomato egg soup is represented as [1,0,0,0,0,0,0,1] and the efficacy matrix of eggplant fried meat is represented as [1,0,0,0,1,0,0,0 ].
And step 206D, calculating to obtain a basic score corresponding to each dish according to the basic dimension matrix, the weight corresponding to each basic dimension and the efficacy matrix.
Wherein, the basic dimension matrix and the efficacy matrix are matrixes with the same format. In one embodiment, the basic dimension matrix and the efficacy matrix may be subjected to matrix dot multiplication to obtain a basic score for each dish. For example, the base dimension matrix is [1,0,0,0,1,0,0,1], the efficacy matrix corresponding to the tomato egg soup is [1,0,0,0,0,0, 1], the season corresponds to weight 5, the region corresponds to weight 2, the ultraviolet ray corresponds to weight 3, the base dimension matrix is [5,0,0,0,2,0,0,3], and then the base dimension matrix is dot-multiplied with the efficacy matrix [1,0,0,0,0,0,0, 0,1], so as to obtain 5 + 1+ 0+3 + 8 points. Similarly, if the efficacy matrix of the fried eggplant meat is [1,0,0,0,1,0,0,0], then the corresponding score of the fried eggplant meat is 5 × 1+0 × 0+2 × 1+ 0+3 × 0 — 7.
In another embodiment, for the convenience of subsequent sorting, the score obtained for each dish may be converted into a percentage system, that is, the obtained score is integrally amplified, for example, by 10 times, so that the score of the tomato egg soup obtained by calculation is 80 minutes, and the score of the eggplant fried meat is 70 minutes.
In the above embodiment, when calculating the basic score, not only the weight of each basic dimension is considered, but also the basic score of each dish is determined according to the basic dimension matrix, the weight corresponding to each basic dimension and the efficacy matrix, and the calculation method is favorable for improving the accuracy of basic score calculation, so that the accuracy of subsequent recommendation is favorable for improving.
In one embodiment, before acquiring the input existing food material information, the method further comprises: acquiring input screening information; screening the dishes in the menu according to the screening information to obtain a target menu;
adjusting the basic score corresponding to each dish in the menu according to the existing food material information to obtain an adjusted menu score table, which comprises the following steps: and adjusting the basic score corresponding to each dish in the target menu according to the existing food material information to obtain an adjusted menu score table.
The screening information refers to information with personalized characteristics input by a user. The screening information may be exclusionary information input by the user, for example, if the user does not like to eat eggs, the input screening information may be that the user does not contain eggs, and then all dishes containing eggs are screened out according to the screening information. The screening information may also be information that the user specifies to include, for example, to screen dishes that include a certain food material, for example, if the user likes to eat beef, all dishes that include beef are screened. And selecting the dishes in the menu according to the input selection information, and taking the dishes left after selection as the target menu. The target recipe is the recipe remaining after the screening on the basis of the original recipe.
In one embodiment, the corresponding screening conditions are determined according to the screening information input by the user, and then the corresponding screening is performed according to the screening conditions. The screening condition can be directly obtained according to the screening information, and can also be determined by searching a database according to the screening information. For example, if the screening information is the date information, it may be directly determined that the screening condition is dishes containing the date labels, and if the screening information is the disease information, it is necessary to search the disease-contraindicated food material corresponding to the disease information from the database, and then screen the dishes containing the disease-contraindicated food material by using the disease-contraindicated food material as the screening condition.
In one embodiment, the screening information includes: at least one of birthday information, religious information, disease information, and dietary nutritional balance information; screening the dishes in the menu according to the screening information to obtain a target menu, comprising: when the screening information is birthday information, screening dishes without birthday labels from the menu to obtain a target menu; when the screening information is religious information, obtaining religious contra-indicated food materials corresponding to the religious information, and screening dishes containing the religious contra-indicated food materials from the menu to obtain a target menu; when the screening information is disease information, searching disease contra-indicated food materials corresponding to the disease information from the knowledge graph, and screening dishes containing the disease contra-indicated food materials from the menu to obtain a target menu; and when the screening information is the balanced dietary nutrition information, searching the category corresponding to each dish from the knowledge graph, and respectively acquiring a preset number of dishes corresponding to each category from the menu according to the basic score of each dish to obtain the target menu.
For the convenience of the user, several optional screening information can be provided for the user, including: birthday information, religious information, disease information, and dietary nutrition balance information. The user may input one or more of them as the filtering condition. And when the screening information is the daily information, screening the dishes containing the birthday labels from the menu to obtain the target menu. When the screening information is religious information, corresponding religious contra-food materials are obtained by searching the knowledge graph, and then dishes containing the religious contra-food materials are deleted from the menu to obtain the target menu. The disease information may be a name of a certain disease or may be information on allergy to a certain food material. Searching disease contraindicated food materials corresponding to the disease information from a pre-constructed knowledge graph, and then screening dishes containing the disease contraindicated food materials to obtain a target menu. In addition, the screening information may also be dietary nutrition balance information, for example, in order to achieve nutrition balance, it is recommended that dishes including grain and potato, vegetables and meat are required in the recipe. The category of each dish is constructed in the knowledge map in advance, for example, steamed bread belongs to cereals and potatoes. In order to achieve nutrition balance, the recommended menu needs to include all categories, and in order to make the recommended menu more balanced, the categories of the dishes in the menu are firstly divided, then each category is sorted according to the basic score of each dish, then a preset number of dishes are respectively selected for each category, for example, the dish with the top 10 ranking is selected for each category and added into the target menu, if one category is divided into 5 categories, then 50 dishes are selected as the target menu.
The knowledge graph can be understood as a database, that is, corresponding relations are stored, for example, corresponding relations between disease information and disease contraindicated food materials, corresponding relations between religious information and religious contraindicated food materials, categories of each dish, and the like are stored. In one embodiment, a more compact database is used, which facilitates faster query and supports more stored knowledge. For example, a knowledge base composed of triples (subject, relationship, object) may support the storage of large amounts of data, such as: the three-element mode (steamed bread, types, grain and potato types), (diseases, contraindications, food materials) and the like is convenient for quick query, and simultaneously supports the storage of more contents. In another embodiment, we can also use graph database ArangoDB (an open source NoSQL database) as the storage tool of the knowledge graph, but of course, other databases can be used, such as Neo4j (high performance NoSQL graph database), SQL (structured query language) database, MongoDB (distributed document storage database), etc.
As shown in fig. 4, in an embodiment, adjusting the basic score corresponding to each dish in the recipe according to the existing food material information to obtain an adjusted recipe score table includes:
step 210A, obtaining the number of missing food materials corresponding to each dish in the menu according to the existing food material information.
The missing food material number refers to the number of food materials which are not contained in the existing food materials contained in each dish. For example, 5 food materials are needed for one dish, and only 3 of the 5 food materials are needed in the existing food materials, so that the number of the food materials missing in the dish is 2. Under the condition that the existing food materials are known, the number of the food materials missing in each dish can be quickly calculated by acquiring the food materials contained in each dish.
And step 210B, adjusting the basic score according to the basic score and the number of the missing food materials corresponding to each dish to obtain the adjusted score of each dish.
And adjusting the corresponding basic score according to the calculated number of the missing food materials corresponding to each dish, wherein generally, the more the number of the missing food materials is, the more the corresponding basic score is reduced. In addition, considering that the score is not accurate enough only by adjusting the number of the missing food materials, the number of the missing food materials and the basic score can be adjusted in a combined manner, and the higher the basic score is, the higher the efficacy of the dish is, and accordingly, the influence of the number of the missing food materials can be reduced. In one embodiment, the influence coefficient of the number of the missing food materials is first calculated according to the basic score, the influence coefficient and the basic score are inversely related, that is, the higher the basic score is, the lower the corresponding influence coefficient is, and then the basic score is adjusted according to the influence coefficient and the number of the missing food materials.
In an embodiment, the step 210B of adjusting the basic score according to the basic score and the number of missing food materials corresponding to each dish to obtain an adjusted score of each dish includes: acquiring weight parameters corresponding to the number of missing food materials; and calculating to obtain an adjustment coefficient according to the number of the missing food materials, the weight parameters and the basic score, and adjusting the basic score according to the adjustment coefficient to obtain an adjusted score.
The weight parameters can be set by self-definition according to actual conditions, and the purpose of setting the weight parameters is to control the influence of the missing food material quantity. The higher the basic score, the greater the efficacy of the corresponding dish, and at this time, the influence of the number of missing food materials should be reduced accordingly, i.e. the higher the basic score, the weaker the influence of the number of corresponding missing food materials. The adjustment coefficient is a coefficient for adjusting the base score.
In one embodiment, the product of the adjustment factor and the base score is taken as the adjusted score. Obviously, if the adjustment factor is larger, the corresponding adjusted score is larger. The higher the basic score is, the larger the adjustment coefficient is, the more the missing food materials are, and the smaller the adjustment coefficient is, that is, at this time, the basic score is positively correlated with the adjustment coefficient, and the missing food materials are inversely correlated with the adjustment coefficient.
In one embodiment, the adjustment may be made using an innovative exponential function:
Score_new=[e- (α x missing material number/Score _ old)]*Score_old
wherein, Score _ new is the Score after adjustment, Score _ old is the base Score before adjustment, α is the weighting parameter- (α x missing material number/Score _ old)To adjust the coefficients.
for example, assuming that the basic score of tomato egg soup (dish) is 90 points and the basic score of chili fried meat (dish) is 100 points, and α is 10, and assuming that the number of missing food materials of two dishes is 10, the adjusted score of tomato egg soup is [ e ]-(10*10/90)]90-0.329-90, for fried chili meat, the adjusted score was: [ e ] a-(10*10/100)]100 ═ 0.367 ═ 100. Even if the number of the missing food materials is the same, the adjustment coefficients of the missing food materials are different, and the higher the basic score is, the larger the corresponding adjustment coefficient is.
In the above embodiment, the influence of the number of the missing food materials and the basic score is comprehensively considered, not only is the adjustment performed according to the number of the missing food materials, but also the effect of the basic score is considered, and the higher the basic score is, the higher the efficacy of the corresponding dish is, the influence of the number of the missing food materials should be properly reduced, so that the obtained result is more in line with the user requirement, and the recommendation accuracy is improved.
As shown in fig. 5, in one embodiment, the recipe recommendation is performed according to the score of each dish in the recipe score table, including:
and step 212A, sorting the dishes according to the scores of the dishes in the sequence from high to low to obtain a menu list.
The dishes in the menu are sorted from high to low according to the score of each dish, namely, the dish with the high score is arranged in the front, and the dish with the low score is arranged in the back, so that a menu list which is sorted from high to low is obtained.
And 212B, calculating the similarity between every two dishes in the menu list, and when the similarity of the two dishes is greater than a preset threshold value, removing the dish with lower score from the two dishes from the menu list to obtain a menu recommendation list.
In order to avoid the recommended menu containing similar dishes, the similarity between every two dishes in the menu list is calculated, namely the similarity between the dishes and the dishes is calculated, if the similarity exceeds a preset threshold value, the dishes with lower scores are deleted from the menu list, if the similarity does not exceed the threshold value, the menu recommendation list is obtained finally, the similarity between any two dishes in the menu recommendation list is not greater than the preset threshold value, the accuracy of subsequent recommendation is improved, and the satisfaction degree of a user is improved.
The similarity may be calculated by using a Jaccard (Jaccard coefficient) similarity coefficient as a measure of the similarity between two dishes, and in other embodiments, other similarity calculation methods may be used, for example, cosine similarity, edit distance, euclidean distance, manhattan distance, pearson correlation coefficient, and the like as measures of the similarity between recipes.
And 212C, recommending the menu according to the score of each dish in the menu recommendation list.
The menu recommendation list records the dishes that can be recommended and the scores of each dish, the dishes in the menu recommendation list can be sorted according to the scores, and then a preset number of dishes are selected for recommendation, for example, the first 6 dishes are selected for recommendation.
According to the method, the similarity between every two dishes in the menu is calculated, and when the similarity is high, the dishes with lower scores are removed, so that the appearance of similar dishes is avoided, the diversity of menu recommendation is improved, and the satisfaction degree of a user can be improved to the greatest extent.
In one embodiment, the making of the menu recommendation according to the score of each dish in the menu score table comprises: sorting according to the scores of each dish from high to low to obtain a menu list; adding a first dish in the menu list into the menu recommendation list; acquiring a second dish in the menu list, and taking the second dish as the current dish; calculating the similarity between the current dish and the dish arranged in front of the current dish; when the similarity is smaller than a preset threshold value, adding the current dish into the menu recommendation list, and when the similarity is larger than the preset threshold value, not adding the current dish into the menu recommendation list; and acquiring the next dish of the current dish from the menu list as the current dish, and entering a step of calculating the similarity between the current dish and the dishes in front of the current dish until the dishes in the menu recommendation list reach a preset number.
In order to improve the efficiency of acquiring the menu recommendation list, firstly, adding a first menu in the menu list into the menu recommendation list, then, starting from a second menu, calculating the similarity between the second menu and a previous menu, if the similarity between the second menu and the previous menu is smaller than a preset threshold, adding the second menu into the menu recommendation list, if the calculated similarity is larger than the preset threshold, deleting the menu with lower score, then, jumping to a third menu, judging the similarity between the third menu and the previous menu, and analogizing in turn until the menus contained in the menu recommendation list reach a preset number. For example, if the preset number is 10, the calculation is stopped when 10 dishes are included in the menu recommendation list. By the method, the efficiency of obtaining the menu recommendation list can be greatly improved.
In one embodiment, calculating the similarity between every two dishes in the menu list comprises: acquiring a food material set corresponding to each dish, and acquiring an intersection set and a union set of the food material sets of the two dishes; and taking the ratio of the intersection set and the union set of the food material sets of the two dishes as the similarity of the corresponding two dishes.
In order to improve the efficiency of similarity calculation, the similarity calculation can be performed by acquiring the food material sets corresponding to each dish, then calculating the intersection and union of the food material sets of the two dishes respectively, and then taking the ratio of the intersection to the union as the similarity of the two dishes. For example, assuming that there are two food material sets a and B, a similarity is defined as a i B/a B, i.e. the ratio of the food material common to a and B to all non-repeating food materials in a and B.
In one embodiment, before making the recipe recommendation according to the score of each dish in the recipe score table, the method further comprises: acquiring a historical recommended menu; down-regulating scores corresponding to the historical recommended dishes in the historical recommended menu to obtain the down-regulated scores; and updating the scores of the historical recommended dishes after being adjusted downwards into a menu score table.
Since the user does not want the result of each recommendation to be the same, the historical recommendation menu is obtained before recommendation. The historical recommended dishes are recorded in the historical recommended menu. And (3) the scores corresponding to the historical recommended dishes are reduced to obtain the scores after the reduction, and then the scores after the reduction are updated into the menu score table, so that the similarity of the recommendation results every time can be greatly avoided. In one embodiment, the historical recommended recipes in the preset number of times or within the preset time period before the acquisition are obtained, that is, all the historical recommended recipes do not need to be obtained, only the historical recommended recipes in the last preset number of times (for example, the last 20 times) need to be obtained, or the historical recommended recipes in the set preset time (for example, the last year) need to be obtained. The scores of the dishes recommended by history are adjusted downwards, so that the requirements of the user can be met, and the recommendation accuracy is improved.
As shown in fig. 6, in one embodiment, a menu recommendation method is provided, which includes the following steps:
step 601, acquiring the input basic information, and acquiring the target efficacy corresponding to the basic information according to the basic information.
Step 602, a menu efficacy dimension table is obtained, and the corresponding relation between the dishes and the efficacies is recorded in the menu efficacy dimension table.
Step 603, determining a basic score corresponding to each dish in the menu according to the target efficacy and the menu efficacy dimension table to obtain a menu basic score table.
Step 604, the input screening information is obtained.
And 605, screening the dishes in the menu according to the screening information to obtain the target menu.
And 606, acquiring the input existing food material information.
And 607, adjusting the basic score corresponding to each dish in the target menu according to the existing food material information to obtain an adjusted menu score table.
Step 608, obtaining the historical recommended menu.
And step 609, adjusting the score corresponding to the historical recommended dishes in the historical recommended menu down to obtain the adjusted score.
And step 610, updating the scores of the historical recommended dishes after being adjusted downwards into a menu score table.
And 611, sorting the dishes in sequence from high to low according to the scores of the dishes to obtain a menu list.
And step 612, calculating the similarity between every two dishes in the menu list, and when the similarity of the two dishes is greater than a preset threshold value, removing the dish with lower score from the two dishes from the menu list to obtain a menu recommendation list.
Step 613, recommending the menu according to the score of each dish in the menu recommendation list.
In this embodiment, the recipe recommendation method not only considers basic information (e.g., weather, geographical location, etc.) required for recommendation, but also considers screening information (e.g., whether birthday, religious belief, whether balanced diet nutrition is required, etc.) meeting the user's requirements, thereby not only meeting the general user requirements, but also meeting the individual requirements of the user, in addition, considering the existing food material information, the recommendation is carried out according to the existing food material information, the requirements of users can be better met, in addition, in order to avoid the recommendation of the same reason, the scores of historical recommended dishes are adjusted downwards, more diversified recipes can be recommended for the user, and in order to avoid similar dishes being recommended at the same time, before recommendation, the dishes with lower scores in the two dishes with high similarity are screened out through the calculation of the similarity, so that the recommended menu can better meet the requirements of users. In the embodiment, various factors are integrated to recommend the menu for the user, and the recommendation accuracy is greatly improved.
Fig. 7 is a flowchart illustrating a recipe recommendation method in a specific embodiment. And acquiring input basic information, wherein the basic information comprises input basic dimensions, each basic dimension corresponds to a target effect, and then, calculating to obtain a menu basic score table by combining the menu effect dimension table and the weight of each basic dimension. Then, there are four screening channels, respectively: birthday information, religion information, disease information, and dietary nutrition balance information. The user can select one or more screening channels to screen the menu to obtain the target menu. And then, acquiring the input existing food material information, and adjusting the basic score of each dish in the target menu according to the existing food material information to obtain an adjusted menu score table. And then, the scores of the historically recommended dishes are adjusted downwards, a menu score table is updated, then the similarity between every two dishes is calculated according to the ranking of the scores of each dish from high to low, when the similarity exceeds a preset threshold value, the dish with the lower score is deleted, and finally the dish combination needing to be recommended is output.
As shown in fig. 8, in one embodiment, a menu recommendation apparatus is provided, the apparatus comprising:
a first obtaining module 802, configured to obtain input basic information, and obtain a target efficacy corresponding to the basic information according to the basic information;
a second obtaining module 804, configured to obtain a menu efficacy dimension table, where a corresponding relationship between dishes and efficacies is recorded in the menu efficacy dimension table;
a determining module 806, configured to determine a basic score corresponding to each dish in the recipe according to the target efficacy and the recipe efficacy dimension table, so as to obtain a recipe basic score table;
a third obtaining module 808, configured to obtain input existing food material information;
an adjusting module 810, configured to adjust a basic score corresponding to each dish in the recipe according to the existing food material information to obtain an adjusted recipe score table;
and the recommending module 812 is used for recommending the menu according to the score of each dish in the menu score table.
In one embodiment, the base information includes: at least one base dimension, each base dimension corresponding to a respective target efficacy; the determining module 806 is further configured to obtain a weight corresponding to each basic dimension in the basic information; determining a basic dimension matrix corresponding to each basic dimension according to the target efficacy corresponding to the basic dimension; determining an efficacy matrix corresponding to each dish in the menu according to the menu efficacy dimension table and the target efficacy; and calculating to obtain a basic score corresponding to each dish according to the basic dimension matrix, the weight corresponding to each basic dimension and the efficacy matrix.
As shown in fig. 9, in an embodiment, the recipe recommending apparatus further includes:
the screening module 807 is configured to obtain input screening information, and screen dishes in the recipe according to the screening information to obtain a target recipe.
The adjusting module 810 is further configured to adjust a basic score corresponding to each dish in the target recipe according to the existing food material information to obtain an adjusted recipe score table.
In one embodiment, the screening information includes: at least one of birthday information, religious information, disease information, and dietary nutritional balance information;
the screening module 807 is further configured to screen out dishes without birthday tags from the recipe to obtain a target recipe when the screening information is birthday information; when the screening information is religious information, obtaining religious contra-food materials corresponding to the religious information, and screening dishes containing the religious contra-food materials from the menu to obtain a target menu; when the screening information is disease information, searching a disease contra-indicated food material corresponding to the disease information from a knowledge graph, and screening dishes containing the disease contra-indicated food material from the menu to obtain a target menu; and when the screening information is the dietary nutrition balance information, searching the category corresponding to each dish from the knowledge graph, and screening a preset number of dishes corresponding to each category from the menu according to the basic score of each dish to obtain a target menu.
In an embodiment, the adjusting module 810 is further configured to obtain the number of missing food materials corresponding to each dish according to the existing food material information; and adjusting the basic score according to the basic score corresponding to each dish and the quantity of the missing food materials to obtain the adjusted score of each dish.
In an embodiment, the adjusting module 810 is further configured to obtain a weight parameter corresponding to the number of the missing food materials; calculating to obtain an adjustment coefficient according to the number of the missing food materials, the weight parameter and the basic score; and adjusting the basic score according to the adjustment coefficient to obtain the adjusted score.
In one embodiment, the recommending module 812 is further configured to sort the dishes in order from high to low according to the scores of the dishes, so as to obtain a menu list; calculating the similarity between every two dishes in the menu list, and when the similarity of the two dishes is greater than a preset threshold value, removing the dish with lower score from the two dishes in the menu list to obtain a menu recommendation list; and recommending the menu according to the score of each dish in the menu recommendation list.
In one embodiment, the recommending module 812 is further configured to sort the dishes according to the scores of the dishes in the order from high to low to obtain a menu list, and add the first dish in the menu list to the menu recommending list; acquiring a second dish in the menu list, and taking the second dish as the current dish; calculating the similarity between the current dish and the dish arranged in front of the current dish; when the similarity is smaller than the preset threshold value, adding the current dish into the menu recommendation list, and when the similarity is larger than the preset threshold value, not adding the current dish into the menu recommendation list; and acquiring a next dish of the current dish from the menu list as the current dish, and entering the step of calculating the similarity between the current dish and the dish arranged in front of the current dish until the dishes in the menu recommendation list reach a preset number.
In one embodiment, the recommending module 812 is further configured to obtain a food material set corresponding to each dish, and obtain an intersection and a union of the food material sets of the two dishes; and taking the ratio of the intersection of the food material sets of the two dishes to the union as the similarity of the corresponding two dishes.
As shown in fig. 10, in an embodiment, the recipe recommending apparatus further includes:
a history down-regulation module 811 for obtaining a history recommended menu; down-regulating scores corresponding to the historical recommended dishes in the historical recommended menu to obtain the down-regulated scores; and updating the scores of the historical recommended dishes after being adjusted downwards into the score table of the menu.
FIG. 11 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be a server and a terminal device, where the server includes but is not limited to a high-performance computer and a high-performance computer cluster; the terminal devices include, but are not limited to, mobile terminal devices including, but not limited to, mobile phones, tablet computers, smart watches, and laptops, and desktop terminal devices including, but not limited to, desktop computers and in-vehicle computers. As shown in fig. 11, the computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program that, when executed by the processor, causes the processor to implement a recipe recommendation method. The internal memory may also have stored therein a computer program that, when executed by the processor, causes the processor to perform a recipe recommendation method. Those skilled in the art will appreciate that the architecture shown in fig. 11 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the recipe recommendation method provided by the present application may be implemented in the form of a computer program that is executable on a computer device as shown in fig. 11. The memory of the computer device can store various program templates which form the menu recommending device. For example, the first obtaining module 802, the second obtaining module 804, the determining module 806, the third obtaining module 808, the adjusting module 810, and the recommending module 812.
A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the following steps when executing the computer program: acquiring input basic information, and acquiring a target efficacy corresponding to the basic information according to the basic information; acquiring a menu efficacy dimension table, wherein the menu efficacy dimension table records the corresponding relation between dishes and efficacies; determining a basic score corresponding to each dish in the menu according to the target efficacy and the menu efficacy dimension table to obtain a menu basic score table; acquiring input existing food material information; adjusting the basic score corresponding to each dish in the menu according to the existing food material information to obtain an adjusted menu score table; and recommending the menu according to the score of each dish in the menu score table.
In one embodiment, the base information includes: at least one base dimension, each base dimension corresponding to a respective target efficacy; the step of determining the basic score corresponding to each dish in the menu according to the target efficacy and the menu efficacy dimension table to obtain a menu basic score table comprises the following steps: acquiring the weight corresponding to each basic dimension in the basic information; determining a basic dimension matrix corresponding to each basic dimension according to the target efficacy corresponding to the basic dimension; determining an efficacy matrix corresponding to each dish in the menu according to the menu efficacy dimension table and the target efficacy; and calculating to obtain a basic score corresponding to each dish according to the basic dimension matrix, the weight corresponding to each basic dimension and the efficacy matrix.
In an embodiment, before the obtaining of the input existing food material information, the computer program is further configured to, when executed by the processor, perform the following steps: acquiring input screening information; screening the dishes in the menu according to the screening information to obtain a target menu; the adjusting the basic score corresponding to each dish in the menu according to the existing food material information to obtain the adjusted menu score table comprises the following steps: and adjusting the basic score corresponding to each dish in the target menu according to the existing food material information to obtain an adjusted menu score table.
In one embodiment, the screening information includes: at least one of birthday information, religious information, disease information, and dietary nutritional balance information; the method for screening the dishes in the menu according to the screening information to obtain the target menu comprises the following steps: when the screening information is birthday information, screening dishes without birthday labels from the menu to obtain a target menu; when the screening information is religious information, obtaining religious contra-food materials corresponding to the religious information, and screening dishes containing the religious contra-food materials from the menu to obtain a target menu; when the screening information is disease information, searching a disease contra-indicated food material corresponding to the disease information from a knowledge graph, and screening dishes containing the disease contra-indicated food material from the menu to obtain a target menu; and when the screening information is the dietary nutrition balance information, searching the category corresponding to each dish from the knowledge graph, and screening a preset number of dishes corresponding to each category from the menu according to the basic score of each dish to obtain a target menu.
In an embodiment, the adjusting the basic score corresponding to each dish in the recipe according to the existing food material information to obtain an adjusted recipe score table includes: acquiring the number of missing food materials corresponding to each dish according to the existing food material information; and adjusting the basic score according to the basic score corresponding to each dish and the quantity of the missing food materials to obtain the adjusted score of each dish.
In an embodiment, the adjusting the basic score according to the basic score corresponding to each dish and the number of the missing food materials to obtain the adjusted score of each dish includes: acquiring a weight parameter corresponding to the quantity of the missing food materials; calculating to obtain an adjustment coefficient according to the number of the missing food materials, the weight parameter and the basic score; and adjusting the basic score according to the adjustment coefficient to obtain the adjusted score.
In one embodiment, the making of the menu recommendation according to the score of each dish in the menu score table comprises: sorting according to the scores of each dish from high to low to obtain a menu list; calculating the similarity between every two dishes in the menu list, and when the similarity of the two dishes is greater than a preset threshold value, removing the dish with lower score from the two dishes from the menu list to obtain a menu recommendation list; and recommending the menu according to the score of each dish in the menu recommendation list.
In one embodiment, the making of the menu recommendation according to the score of each dish in the menu score table comprises: sorting according to the scores of each dish from high to low to obtain a menu list; adding a first dish in the menu list into a menu recommendation list; acquiring a second dish in the menu list, and taking the second dish as the current dish; calculating the similarity between the current dish and the dish arranged in front of the current dish; when the similarity is smaller than the preset threshold value, adding the current dish into the menu recommendation list, and when the similarity is larger than the preset threshold value, not adding the current dish into the menu recommendation list; and acquiring the next dish of the current dish from the menu list as the current dish, and entering the step of calculating the similarity between the current dish and the dish arranged in front of the current dish until the dishes contained in the menu recommendation list reach a preset number.
In one embodiment, the calculating the similarity between every two dishes in the menu list comprises: acquiring a food material set corresponding to each dish, and acquiring an intersection set and a union set of the food material sets of the two dishes; and taking the ratio of the intersection of the food material sets of the two dishes to the union as the similarity of the corresponding two dishes.
In one embodiment, before said making a recipe recommendation based on the score of each dish in said recipe score table, said computer program, when executed by said processor, is further adapted to perform the steps of: acquiring a historical recommended menu; down-regulating scores corresponding to the historical recommended dishes in the historical recommended menu to obtain the down-regulated scores; and updating the scores of the historical recommended dishes after being adjusted downwards into the score table of the menu.
A computer-readable storage medium storing a computer program, the computer program when executed by a processor implementing the steps of: acquiring input basic information, and acquiring a target efficacy corresponding to the basic information according to the basic information; acquiring a menu efficacy dimension table, wherein the menu efficacy dimension table records the corresponding relation between dishes and efficacies; determining a basic score corresponding to each dish in the menu according to the target efficacy and the menu efficacy dimension table to obtain a menu basic score table; acquiring input existing food material information; adjusting the basic score corresponding to each dish in the menu according to the existing food material information to obtain an adjusted menu score table; and recommending the menu according to the score of each dish in the menu score table.
In one embodiment, the base information includes: at least one base dimension, each base dimension corresponding to a respective target efficacy; the step of determining the basic score corresponding to each dish in the menu according to the target efficacy and the menu efficacy dimension table to obtain a menu basic score table comprises the following steps: acquiring the weight corresponding to each basic dimension in the basic information; determining a basic dimension matrix corresponding to each basic dimension according to the target efficacy corresponding to the basic dimension; determining an efficacy matrix corresponding to each dish in the menu according to the menu efficacy dimension table and the target efficacy; and calculating to obtain a basic score corresponding to each dish according to the basic dimension matrix, the weight corresponding to each basic dimension and the efficacy matrix.
In an embodiment, before the obtaining of the input existing food material information, the computer program is further configured to, when executed by the processor, perform the following steps: acquiring input screening information; screening the dishes in the menu according to the screening information to obtain a target menu; the adjusting the basic score corresponding to each dish in the menu according to the existing food material information to obtain the adjusted menu score table comprises the following steps: and adjusting the basic score corresponding to each dish in the target menu according to the existing food material information to obtain an adjusted menu score table.
In one embodiment, the screening information includes: at least one of birthday information, religious information, disease information, and dietary nutritional balance information; the method for screening the dishes in the menu according to the screening information to obtain the target menu comprises the following steps: when the screening information is birthday information, screening dishes without birthday labels from the menu to obtain a target menu; when the screening information is religious information, obtaining religious contra-food materials corresponding to the religious information, and screening dishes containing the religious contra-food materials from the menu to obtain a target menu; when the screening information is disease information, searching a disease contra-indicated food material corresponding to the disease information from a knowledge graph, and screening dishes containing the disease contra-indicated food material from the menu to obtain a target menu; and when the screening information is the dietary nutrition balance information, searching the category corresponding to each dish from the knowledge graph, and screening a preset number of dishes corresponding to each category from the menu according to the basic score of each dish to obtain a target menu.
In an embodiment, the adjusting the basic score corresponding to each dish in the recipe according to the existing food material information to obtain an adjusted recipe score table includes: acquiring the number of missing food materials corresponding to each dish according to the existing food material information; and adjusting the basic score according to the basic score corresponding to each dish and the quantity of the missing food materials to obtain the adjusted score of each dish.
In an embodiment, the adjusting the basic score according to the basic score corresponding to each dish and the number of the missing food materials to obtain the adjusted score of each dish includes: acquiring a weight parameter corresponding to the quantity of the missing food materials; calculating to obtain an adjustment coefficient according to the number of the missing food materials, the weight parameter and the basic score; and adjusting the basic score according to the adjustment coefficient to obtain the adjusted score.
In one embodiment, the making of the menu recommendation according to the score of each dish in the menu score table comprises: sorting according to the scores of each dish from high to low to obtain a menu list; calculating the similarity between every two dishes in the menu list, and when the similarity of the two dishes is greater than a preset threshold value, removing the dish with lower score from the two dishes from the menu list to obtain a menu recommendation list; and recommending the menu according to the score of each dish in the menu recommendation list.
In one embodiment, the making of the menu recommendation according to the score of each dish in the menu score table comprises: sorting according to the scores of each dish from high to low to obtain a menu list; adding a first dish in the menu list into a menu recommendation list; acquiring a second dish in the menu list, and taking the second dish as the current dish; calculating the similarity between the current dish and the dish arranged in front of the current dish; when the similarity is smaller than the preset threshold value, adding the current dish into the menu recommendation list, and when the similarity is larger than the preset threshold value, not adding the current dish into the menu recommendation list; and acquiring the next dish of the current dish from the menu list as the current dish, and entering the step of calculating the similarity between the current dish and the dish arranged in front of the current dish until the dishes contained in the menu recommendation list reach a preset number.
In one embodiment, the calculating the similarity between every two dishes in the menu list comprises: acquiring a food material set corresponding to each dish, and acquiring an intersection set and a union set of the food material sets of the two dishes; and taking the ratio of the intersection of the food material sets of the two dishes to the union as the similarity of the corresponding two dishes.
In one embodiment, before said making a recipe recommendation based on the score of each dish in said recipe score table, said computer program, when executed by said processor, is further adapted to perform the steps of: acquiring a historical recommended menu; down-regulating scores corresponding to the historical recommended dishes in the historical recommended menu to obtain the down-regulated scores; and updating the scores of the historical recommended dishes after being adjusted downwards into the score table of the menu.
It should be noted that the recipe recommendation method, the recipe recommendation apparatus, the computer device and the computer readable storage medium described above belong to a general inventive concept, and the contents in the embodiments of the recipe recommendation method, the recipe recommendation apparatus, the computer device and the computer readable storage medium may be mutually applicable.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (13)

1. A method for menu recommendation, the method comprising:
acquiring input basic information, and acquiring a target efficacy corresponding to the basic information according to the basic information;
acquiring a menu efficacy dimension table, wherein the menu efficacy dimension table records the corresponding relation between dishes and efficacies;
determining a basic score corresponding to each dish in the menu according to the target efficacy and the menu efficacy dimension table to obtain a menu basic score table;
acquiring input existing food material information;
adjusting the basic score corresponding to each dish in the menu according to the existing food material information to obtain an adjusted menu score table;
and recommending the menu according to the score of each dish in the menu score table.
2. The method of claim 1, wherein the basic information comprises: at least one base dimension, each base dimension corresponding to a respective target efficacy;
the step of determining the basic score corresponding to each dish in the menu according to the target efficacy and the menu efficacy dimension table to obtain a menu basic score table comprises the following steps:
acquiring the weight corresponding to each basic dimension in the basic information;
determining a basic dimension matrix corresponding to each basic dimension according to the target efficacy corresponding to the basic dimension;
determining an efficacy matrix corresponding to each dish in the menu according to the menu efficacy dimension table and the target efficacy;
and calculating to obtain a basic score corresponding to each dish according to the basic dimension matrix, the weight corresponding to each basic dimension and the efficacy matrix.
3. The method of claim 1, further comprising, prior to the obtaining the input existing food material information:
acquiring input screening information;
screening the dishes in the menu according to the screening information to obtain a target menu;
the adjusting the basic score corresponding to each dish in the menu according to the existing food material information to obtain the adjusted menu score table comprises the following steps:
and adjusting the basic score corresponding to each dish in the target menu according to the existing food material information to obtain an adjusted menu score table.
4. The method of claim 3, wherein the screening information comprises: at least one of birthday information, religious information, disease information, and dietary nutritional balance information;
the method for screening the dishes in the menu according to the screening information to obtain the target menu comprises the following steps:
when the screening information is birthday information, screening dishes without birthday labels from the menu to obtain a target menu;
when the screening information is religious information, obtaining religious contra-food materials corresponding to the religious information, and screening dishes containing the religious contra-food materials from the menu to obtain a target menu;
when the screening information is disease information, searching a disease contra-indicated food material corresponding to the disease information from a knowledge graph, and screening dishes containing the disease contra-indicated food material from the menu to obtain a target menu;
and when the screening information is the dietary nutrition balance information, searching the category corresponding to each dish from the knowledge graph, and screening a preset number of dishes corresponding to each category from the menu according to the basic score of each dish to obtain a target menu.
5. The method of claim 1, wherein the adjusting the base score corresponding to each dish in the recipe according to the existing food material information to obtain an adjusted recipe score table comprises:
acquiring the number of missing food materials corresponding to each dish in the menu according to the existing food material information;
and adjusting the basic score according to the basic score corresponding to each dish and the quantity of the missing food materials to obtain the adjusted score of each dish.
6. The method of claim 5, wherein the adjusting the base score according to the base score corresponding to each dish and the number of the missing food materials to obtain the adjusted score for each dish comprises:
acquiring a weight parameter corresponding to the quantity of the missing food materials;
calculating to obtain an adjustment coefficient according to the number of the missing food materials, the weight parameter and the basic score;
and adjusting the basic score according to the adjustment coefficient to obtain the adjusted score.
7. The method of claim 1, wherein making a recipe recommendation based on the score for each dish in the recipe score table comprises:
sorting according to the scores of each dish from high to low to obtain a menu list;
calculating the similarity between every two dishes in the menu list, and when the similarity of the two dishes is greater than a preset threshold value, removing the dish with lower score from the two dishes from the menu list to obtain a menu recommendation list;
and recommending the menu according to the score of each dish in the menu recommendation list.
8. The method of claim 1, wherein making a recipe recommendation based on the score for each dish in the recipe score table comprises:
sorting according to the scores of each dish from high to low to obtain a menu list;
adding a first dish in the menu list into a menu recommendation list;
acquiring a second dish in the menu list, and taking the second dish as the current dish;
calculating the similarity between the current dish and the dish arranged in front of the current dish;
when the similarity is smaller than the preset threshold value, adding the current dish into the menu recommendation list, and when the similarity is larger than the preset threshold value, not adding the current dish into the menu recommendation list;
and acquiring the next dish of the current dish from the menu list as the current dish, and entering the step of calculating the similarity between the current dish and the dish arranged in front of the current dish until the dishes contained in the menu recommendation list reach a preset number.
9. The method of claim 7, wherein calculating the similarity between two of the dishes in the menu list comprises:
acquiring a food material set corresponding to each dish, and acquiring an intersection set and a union set of the food material sets of the two dishes;
and taking the ratio of the intersection of the food material sets of the two dishes to the union as the similarity of the two dishes.
10. The method of claim 1, further comprising, prior to said making a recipe recommendation based on the score for each dish in the recipe score table:
acquiring a historical recommended menu;
down-regulating scores corresponding to the historical recommended dishes in the historical recommended menu to obtain the down-regulated scores;
and updating the scores of the historical recommended dishes after being adjusted downwards into the score table of the menu.
11. A menu recommendation device, characterized in that the device comprises:
the first acquisition module is used for acquiring input basic information and acquiring a target efficacy corresponding to the basic information according to the basic information;
the second acquisition module is used for acquiring a menu efficacy dimension table, and the menu efficacy dimension table records the corresponding relation between dishes and efficacies;
the determining module is used for determining the basic score corresponding to each dish in the menu according to the target efficacy and the menu efficacy dimension table to obtain a menu basic score table;
the third acquisition module is used for acquiring the input existing food material information;
the adjusting module is used for adjusting the basic score corresponding to each dish in the menu according to the existing food material information to obtain an adjusted menu score table;
and the recommending module is used for recommending the menu according to the score of each dish in the menu score table.
12. Computer arrangement comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor realizes the steps of the recipe recommendation method according to any one of claims 1 to 10 when executing the computer program.
13. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the recipe recommendation method according to any one of claims 1 to 10.
CN202010005908.7A 2020-01-03 2020-01-03 Menu recommendation method and device, computer equipment and storage medium Pending CN111209453A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010005908.7A CN111209453A (en) 2020-01-03 2020-01-03 Menu recommendation method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010005908.7A CN111209453A (en) 2020-01-03 2020-01-03 Menu recommendation method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111209453A true CN111209453A (en) 2020-05-29

Family

ID=70788321

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010005908.7A Pending CN111209453A (en) 2020-01-03 2020-01-03 Menu recommendation method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111209453A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112199406A (en) * 2020-09-30 2021-01-08 聚好看科技股份有限公司 Information recommendation method, food material storage device and server
CN112802578A (en) * 2020-12-23 2021-05-14 四川长虹电器股份有限公司 Food and menu recommendation method based on food health characteristic knowledge base

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106288634A (en) * 2016-08-04 2017-01-04 海信集团有限公司 Menu recommends method, device and intelligent refrigerator
CN108806770A (en) * 2018-05-16 2018-11-13 北京豆果信息技术有限公司 A kind of diet recommendation method based on user
CN109166614A (en) * 2018-08-14 2019-01-08 四川虹美智能科技有限公司 A kind of system and method for recommending personal health menu
CN109285597A (en) * 2018-10-08 2019-01-29 北京健康有益科技有限公司 A kind of dietotherapy recipe recommendation method, apparatus and readable medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106288634A (en) * 2016-08-04 2017-01-04 海信集团有限公司 Menu recommends method, device and intelligent refrigerator
CN108806770A (en) * 2018-05-16 2018-11-13 北京豆果信息技术有限公司 A kind of diet recommendation method based on user
CN109166614A (en) * 2018-08-14 2019-01-08 四川虹美智能科技有限公司 A kind of system and method for recommending personal health menu
CN109285597A (en) * 2018-10-08 2019-01-29 北京健康有益科技有限公司 A kind of dietotherapy recipe recommendation method, apparatus and readable medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112199406A (en) * 2020-09-30 2021-01-08 聚好看科技股份有限公司 Information recommendation method, food material storage device and server
CN112802578A (en) * 2020-12-23 2021-05-14 四川长虹电器股份有限公司 Food and menu recommendation method based on food health characteristic knowledge base
CN112802578B (en) * 2020-12-23 2022-03-15 四川长虹电器股份有限公司 Food and menu recommendation method based on food health characteristic knowledge base

Similar Documents

Publication Publication Date Title
Horgan et al. Achieving dietary recommendations and reducing greenhouse gas emissions: modelling diets to minimise the change from current intakes
CN108763502B (en) Information recommendation method and system
Mottaleb et al. Changing food consumption of households in developing countries: a Bangladesh case
WO2020098120A1 (en) Food ordering information recommendation method and apparatus, electronic device and storage medium
CN108806770A (en) A kind of diet recommendation method based on user
WO2021017306A1 (en) Personalized search method, system, and device employing user portrait, and storage medium
CN111209453A (en) Menu recommendation method and device, computer equipment and storage medium
Fashogbon et al. Heterogeneity in rural household food demand and its determinants in Ondo State, Nigeria: An application of quadratic almost ideal demand system
CN105468598A (en) Friend recommendation method and device
CN104317920A (en) Information pushing method and information pushing system based on intelligent user demand matching
Regnier et al. Competition between farmed and wild fish: the French sea bass and sea bream markets
KR20190122100A (en) Apparatus and method for providing customized diet and recipe for companion animal
US20210313039A1 (en) Systems and Methods for Diet Quality Photo Navigation Utilizing Dietary Fingerprints for Diet Assessment
Akuffo et al. Analysis of the determinants of fish consumption by households in Ghana
Ereifej et al. Effect of barley flour on quality of balady bread
Volk et al. Western Balkans agriculture and European integration: unused potential and policy failures?
Oduro Akrasi et al. Food security in Northern Ghana: Does income from shea based livelihoods matter?
CN110852299A (en) Method and device for determining eating habits of customers
Milioni et al. Hyperbolic frontier model: A parametric DEA approach for the distribution of a total fixed output
CN111259272A (en) Search result ordering method and device
van Zonneveld et al. Forgotten food crops in sub-Saharan Africa for healthy diets in a changing climate
Mitra Nonlinear impact of rain on foodgrain production in India
Yercan et al. International competitiveness of Turkish agriculture: a case for horticultural products
CN116843403A (en) Student catering preference recommendation system based on deep learning algorithm
CN111640485A (en) Diet information recommendation method and device, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200529