Recipe query method and device, storage medium and electronic device

By defining query parameters and vectorizing them in the recipe query system, and combining user characteristics and scenario information, suitable recipes are recommended from the recipe graph database. This solves the problems of untimely and inaccurate recipe recommendations in existing technologies, and achieves personalized and comprehensive recipe recommendations.

CN114996563BActive Publication Date: 2026-01-23QINGDAO HAIER TECH +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210290745.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-23
Publication Date
2026-01-23
Estimated Expiration
2042-03-23

AI Technical Summary

Technical Problem

Existing technologies cannot recommend recipes to target objects based on time and context information, resulting in untimely and inaccurate recommendations.

Method used

By determining the client's query parameters, receiving feature information from the target database, calculating the matching degree between recipes and user features using vectorization processing, and querying recommended recipes from the recipe graph database in conjunction with user preferences and scenario information.

Benefits of technology

It provides more timely and accurate recipe recommendations, meets personalized needs, and improves the comprehensiveness and accuracy of recipe recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114996563B_ABST
    Figure CN114996563B_ABST
Patent Text Reader

Abstract

The application discloses a recipe query method and device, a storage medium and an electronic device, relates to the technical field of smart homes, and the recipe query method comprises the following steps: determining a query parameter according to a recipe recommendation request sent by a client, wherein the query parameter comprises at least one of the following: a target object identifier of the client, a scene of using a recipe, a date of using a recipe, and a keyword contained in a recipe; receiving characteristic information fed back by a target database according to the query parameter, wherein the characteristic information comprises at least one of the following: a characteristic portrait corresponding to the target object identifier, a keyword corresponding to the scene of using the recipe, and a festival or a solar term corresponding to the date of using the recipe; determining target recommendation parameters for querying a recipe in a recipe graph database according to the query parameter and the characteristic information, so as to determine a target recipe corresponding to the recipe recommendation request from the recipe graph database by using the target recommendation parameters.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of smart home, in particular to a recipe query method and device, a storage medium and an electronic device. BACKGROUND

[0002] With the development of the network, and various cooking teaching on the network into people's vision, people have more choices on cooking recipes. At the same time, in the face of dazzling recipes, users will be at a loss, and will fall into the selection difficulty syndrome. In the related recipe recommendation, the time information is not considered, the scene information and the taboo are not considered, and only the preferences of different users for the recipes are recommended.

[0003] In the related art, there is no effective technical solution to the problem that the target object cannot be recommended recipes from the time information and scene information. SUMMARY

[0004] The embodiments of the present application provide a recipe query method and device, a storage medium and an electronic device to at least solve the problem that the target object cannot be recommended recipes from the time information and scene information in the related art.

[0005] According to an embodiment of the present application, a recipe query method is provided, comprising: determining a query parameter according to a recipe recommendation request sent by a client, wherein the query parameter comprises at least one of the following: a target object identifier of a using client, a scene of using a recipe, a date of using a recipe, and a keyword contained in a recipe; receiving feature information fed back by a target database according to the query parameter, wherein the feature information comprises at least one of the following: a feature portrait corresponding to the target object identifier, a keyword corresponding to the scene of using the recipe, and a festival or solar term corresponding to the date of using the recipe; determining a target recommendation parameter used for querying a recipe in a recipe graph database according to the query parameter and the feature information, so as to determine a target recipe corresponding to the recipe recommendation request from the recipe graph database using the target recommendation parameter.

[0006] In an exemplary embodiment, determining a query parameter according to a recipe recommendation request sent by a client comprises: in the case of determining that the client has a recipe query right, parsing the recipe recommendation request sent by the client; in the case of determining that the recipe recommendation request carries query information of a target object currently using the client, determining the query parameter according to the query information.

[0007] In an example embodiment, after determining the recommended parameters for querying the recipe in the recipe graph database according to the query parameters and the feature information, and determining the target recipe corresponding to the recipe recommendation request from the recipe graph database using the recommended parameters, the method further comprises: in a case where the feature information includes a feature portrait, performing vectorization processing of the feature information and the target recipe in the same dimension to obtain a first vector corresponding to the target recipe and a second vector corresponding to the feature information; determining the cosine similarity between the first vector and the second vector to obtain a matching degree of the target recipe and the feature information; and in a case where the matching degree is greater than a first preset threshold, determining to feed back the target recipe to the client.

[0008] In an example embodiment, after determining to feed back the target recipe to the client in a case where the matching degree is greater than the first preset threshold, the method further comprises: in a case where there are multiple target recipes fed back to the client, obtaining click information of each target recipe on the client, wherein the click information is used to indicate the preference of a target object bound to the client for the target recipe; in a case where the number of occurrences of the same type of click information exceeds a preset threshold, determining dimension information corresponding to the click information, and updating the feature portrait corresponding to the target object using the dimension information.

[0009] In an example embodiment, after determining to feed back the target recipe to the client in a case where the matching degree is greater than the first preset threshold, the method further comprises: in a case where there is no click information on the client and an inquiry message is received, performing secondary recommendation based on the recipe recommendation request sent by the client again, and filtering out the target recipes that have been recommended; wherein the inquiry message is information obtained after the client receives surrounding voice data and identifies and confirms the voice data.

[0010] In an example embodiment, determining the target recommended parameters for querying the recipe in the recipe graph database according to the query parameters and the feature information comprises: in a case where the feature information includes a feature portrait corresponding to a target object identifier, determining first recommended parameters corresponding to age information, region information and taste preference of the target object according to the feature information; in a case where the feature information includes a keyword corresponding to a scene in which the recipe is used, determining second recommended parameters corresponding to the preparation requirements of the recipe to be recommended; in a case where the feature information includes a festival or solar term corresponding to a date in which the recipe is used, determining a dietary taboo corresponding to the festival or solar term to obtain third recommended parameters; in a case where the query parameters include a keyword included in the recipe, determining fourth recommended parameters based on the keyword; and determining the target recommended parameters for querying the recipe in the recipe graph database in combination with the first recommended parameters, the second recommended parameters, the third recommended parameters and the fourth recommended parameters.

[0011] In an example embodiment, after determining the target recipe corresponding to the recipe recommendation request from the recipe graph database using the target recommendation parameter, the method further comprises: receiving an evaluation result of the target recipe on the client side by the target object; determining a recipe preference of the target object in a preset period through the evaluation result; and adding the recipe preference to the feature portrait corresponding to the target object.

[0012] According to another embodiment of the present application, a recipe query device is provided, comprising: a determination module configured to determine a query parameter according to a recipe recommendation request sent by a client, wherein the query parameter comprises at least one of the following: a target object identifier of the client, a scenario of recipe use, a date of recipe use, and a keyword contained in a recipe; a receiving module configured to receive feature information fed back by a target database according to the query parameter, wherein the feature information comprises at least one of the following: a feature portrait corresponding to the target object identifier, a keyword corresponding to the scenario of recipe use, and a festival or solar term corresponding to the date of recipe use; and a query module configured to determine a target recommendation parameter for querying a recipe in a recipe graph database according to the query parameter and the feature information, so as to determine a target recipe corresponding to the recipe recommendation request from the recipe graph database using the target recommendation parameter.

[0013] In an example embodiment, the determination module is further configured to parse the recipe recommendation request sent by the client in a case where it is determined that the client has a recipe query right, and determine the query parameter according to the query information in a case where it is determined that the recipe recommendation request carries the query information of the target object using the current client.

[0014] In an example embodiment, the device further comprises: a vector module configured to, in a case where it is determined that the feature information comprises a feature portrait, perform vectorization processing of the same dimension on the feature information and the target recipe, to obtain a first vector corresponding to the target recipe and a second vector corresponding to the feature information; determine a cosine similarity between the first vector and the second vector, to obtain a matching degree of the target recipe and the feature information; and determine to feed back the target recipe to the client in a case where the matching degree is greater than a first preset threshold.

[0015] In an example embodiment, the vector module further comprises: a clicking unit configured to, in a case where there are multiple target recipes fed back to the client, acquire clicking information of each target recipe on the client side, wherein the clicking information is used to indicate a preference of the target object bound to the client for the target recipe; and determine dimension information corresponding to the clicking information and update the feature portrait corresponding to the target object using the dimension information in a case where it is determined that the number of occurrences of the same kind of clicking information exceeds a preset threshold.

[0016] In an example embodiment, the vector module further includes an inquiry unit configured to, in the case that there is no click information on the client and an inquiry message is received, perform secondary recommendation based on the recipe recommendation request sent by the client and filter out the target recipe that has been recommended.

[0017] In an example embodiment, the query module is further configured to, in the case that the feature information includes a feature portrait corresponding to the target object identification, determine a first recommendation parameter corresponding to age information, region information, and taste preference of the target object according to the feature information; in the case that the feature information includes a keyword corresponding to a scene in which a recipe is used, determine a second recommendation parameter corresponding to a preparation requirement of the recipe to be recommended; in the case that the feature information includes a festival or a solar term corresponding to a date in which a recipe is used, determine a third recommendation parameter corresponding to a dietary taboo of the festival or the solar term; in the case that the query parameter includes a keyword included in a recipe, determine a fourth recommendation parameter based on the keyword; and combine the first recommendation parameter, the second recommendation parameter, the third recommendation parameter, and the fourth recommendation parameter to determine a target recommendation parameter used to query the recipe in the recipe graph database.

[0018] In an example embodiment, the device further includes an evaluation module configured to receive an evaluation result of the target object on the target recipe on the client, determine a recipe preference of the target object in a preset period through the evaluation result, and add the recipe preference to a feature portrait corresponding to the target object.

[0019] According to another embodiment of the present application, a storage medium is also provided, and the storage medium has a computer program stored therein, where the computer program is configured to execute the steps in any of the above method embodiments when running.

[0020] According to another embodiment of the present application, an electronic device is also provided, which includes a memory and a processor, the memory has a computer program stored therein, and the processor is configured to execute the computer program to perform the steps in any of the above method embodiments.

[0021] According to the application, the query parameter is determined according to the recipe recommendation request sent by the client, wherein the query parameter comprises at least one of the following: target object identification of the client, scene of recipe use, date of recipe use, and keyword contained in the recipe; the feature information fed back by the target database according to the query parameter is received, wherein the feature information comprises at least one of the following: feature portrait corresponding to the target object identification, keyword corresponding to the scene of recipe use, and festival or solar term corresponding to the date of recipe use; the target recommendation parameter used for querying the recipe in the recipe graph database is determined according to the query parameter and the feature information, so as to determine the target recipe corresponding to the recipe recommendation request from the recipe graph database by using the target recommendation parameter. That is, the query parameter corresponding to the target object using the client is determined by the information carried in the recipe recommendation request, and the feature information of the target object is further determined, and the corresponding target recipe is found from the recipe graph database by combining the feature information and the query parameter, so that the problems in the prior art, such as the inability to recommend recipes for the target object from the time information and scene information, can be solved, and further, more timely and accurate recipe recommendation services can be provided, so that the needs of the public and individual preferences can be met, and the comprehensiveness of recipe recommendation is improved. BRIEF DESCRIPTION OF DRAWINGS

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

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced in the following. Obviously, for those skilled in the field, other drawings can also be obtained based on these drawings without creative labor.

[0024] Figure 1 It is a hardware environment schematic diagram of a recipe query method according to an embodiment of the application;

[0025] Figure 2 It is a flowchart of a recipe query method according to an embodiment of the application;

[0026] Figure 3 It is a recipe recommendation timing diagram according to an optional embodiment of the application;

[0027] Figure 4 It is a structural block diagram of a recipe query device according to an embodiment of the application (one);

[0028] Figure 5 It is a structural block diagram of a recipe query device according to an embodiment of the application (two). DETAILED DESCRIPTION

[0029] In order to enable persons skilled in the art to better understand the technical scheme of the present application, the technical scheme in the embodiments of the present application will be clearly and completely described in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative work should fall within the scope of protection of the present application.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units need not be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product or device.

[0031] According to an aspect of the embodiments of the present application, a recipe query method is provided. The recipe query method is widely applied to smart home, smart home, smart home device ecology, intelligence house ecology and other whole-house intelligent digital control application scenarios. Optionally, in the present embodiment, the above-mentioned recipe query method can be applied to the hardware environment composed of terminal device 102 and server 104 as shown in Figure 1 As shown in Figure 1 The server 104 is connected with the terminal device 102 through the network, which can be used to provide services (such as application services, etc.) for the terminal or the client installed on the terminal, a database can be set on the server or independently of the server, which is used to provide data storage services for the server 104, cloud computing and / or edge computing services can be configured on the server or independently of the server, which is used to provide data operation services for the server 104.

[0032] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 may not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart range hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projector, smart TV, smart clothes rack, smart curtains, smart audio-visual equipment, smart socket, smart speaker, smart speaker box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart robot vacuum cleaner, smart window cleaning robot, smart mopping robot, smart air purifier, smart steam oven, smart microwave oven, smart water heater, smart air purifier, smart water dispenser, smart door lock, etc.

[0033] This embodiment provides a method for searching recipes. Figure 2 This is a flowchart of a recipe query method according to an embodiment of the present invention, which includes the following steps:

[0034] Step S202: Determine query parameters based on the recipe recommendation request sent by the client, wherein the query parameters include at least one of the following: the target object identifier of the client, the scenario in which the recipe is used, the date in which the recipe is used, and the keywords contained in the recipe;

[0035] Step S204: Receive feature information fed back by the target database based on the query parameters, wherein the feature information includes at least one of the following: feature profile corresponding to the target object identifier, keywords corresponding to the scenario in which the recipe is used, and festivals or solar terms corresponding to the date the recipe is used;

[0036] For example, user profile data, such as user age, region, and taste preferences, can be obtained through user ID (equivalent to target object identifier). Current solar terms or festival information can be obtained through date. At the same time, for the scenario provided by the user, the corresponding keywords for the scenario need to be obtained. For example, for the scenario of 'watching TV', the keywords are snacks and drinks. The conversion between scenario and keywords is pre-configured.

[0037] Step S206: Determine the target recommendation parameters for querying recipes in the recipe database based on the query parameters and the feature information, so as to use the target recommendation parameters to determine the target recipe corresponding to the recipe recommendation request from the recipe database.

[0038] Through the above steps, query parameters are determined based on the recipe recommendation request sent by the client. These parameters include at least one of the following: the target object identifier used by the client, the scenario in which the recipe is used, the date the recipe is used, and keywords contained in the recipe. Feature information is received from the target database based on the query parameters. This feature information includes at least one of the following: a feature profile corresponding to the target object identifier, keywords corresponding to the scenario in which the recipe is used, and a festival or solar term corresponding to the date the recipe is used. Based on the query parameters and feature information, target recommendation parameters are determined for querying recipes in the recipe graph database. These target recommendation parameters are then used to determine the target recipe corresponding to the recipe recommendation request from the recipe graph database. In other words, by using the information carried in the recipe recommendation request to determine the query parameters corresponding to the target object currently using the client, and further determining the feature information of that target object, the corresponding target recipe is searched from the recipe graph database by combining the feature information and the query parameters. Therefore, this solves the problem in existing technologies where recipe recommendations cannot be made based on time or scenario information, thus providing a more timely and accurate recipe recommendation service that meets both general needs and individual preferences, improving the comprehensiveness of recipe recommendations.

[0039] In one exemplary embodiment, determining query parameters based on a recipe recommendation request sent by a client includes: parsing the recipe recommendation request sent by the client if it is determined that the client has recipe query permissions; and determining the query parameters based on the query information if it is determined that the recipe recommendation request carries query information about the target object currently using the client.

[0040] In short, to ensure the authorization and management of this recommendation method, client authorization will be implemented. This ensures that clients can only access the recipe recommendation function after they have query permissions, thus preventing the abuse of this recommendation function.

[0041] In an exemplary embodiment, after determining recommended parameters for querying recipes in a recipe database based on query parameters and feature information, and using the recommended parameters to determine the target recipe corresponding to the recipe recommendation request from the recipe database, the process includes: if the feature information includes a feature profile, performing vectorization processing on the feature information and the target recipe of the same dimension to obtain a first vector corresponding to the target recipe and a second vector corresponding to the feature information; determining the cosine similarity between the first vector and the second vector to obtain the matching degree between the target recipe and the feature information; and if the matching degree is greater than a first preset threshold, determining to feed the target recipe back to the client.

[0042] For example, to ensure that the identified target recipe is suitable for the target audience, the previously obtained user profile and the target recipe can be vectorized. Both can be processed into vectors of equal length, with each dimension having the same meaning. Optionally, the dimensions used can include region, age, and taste preferences. Furthermore, based on user or recipe characteristics such as region, cuisine, and flavor, corresponding dimensions can be set to 1, while others are set to 0, thus converting them into vectors. Once both the user profile and the target recipe are converted into vectors, their cosine similarity is calculated to determine the matching degree between the target recipe and the target audience.

[0043] Optionally, you can also set it so that only target recipes with a matching degree greater than a preset value are sent to the client. When there are multiple target recipes, they are sorted in descending order of similarity and the sorted recipes are returned to the client as recommendations.

[0044] In an exemplary embodiment, after determining that the target recipe should be fed back to the client when the matching degree is greater than a first preset threshold, the method further includes: when there are multiple target recipes to be fed back to the client, obtaining click information of each target recipe on the client, wherein the click information is used to indicate the preference of the target object bound to the client for the target recipe; when it is determined that the number of times the same click information appears exceeds a preset threshold, determining the dimension information corresponding to the click information, and using the dimension information to update the feature profile corresponding to the target object.

[0045] In an exemplary embodiment, after determining that the target recipe should be fed back to the client when the matching degree is greater than a first preset threshold, the method further includes: when there is no click information on the client and an inquiry message is received, performing a second recommendation based on the recipe recommendation request sent by the client, and filtering out the target recipe that has already been recommended; wherein the inquiry message is information obtained by the client after receiving surrounding voice data and recognizing and confirming the voice data.

[0046] For example, after receiving recommendations, a user clicks on a recipe based on their preferences. The recommendation engine then obtains this preference information and updates it to the user profile. For instance, if the user repeatedly clicks on spicy dishes, the 'spicy' value in the user profile is increased, allowing for more accurate recommendations in the future. If none of the recommended recipes satisfy the user, they can ask, "Are there any more?" The recommendation engine will then make recommendations again, filtering out previously recommended recipes in this round.

[0047] In an exemplary embodiment, determining target recommendation parameters for querying recipes in a recipe database based on query parameters and feature information includes: when the feature information includes a feature profile corresponding to a target object identifier, determining a first recommendation parameter corresponding to the target object's age, region, and taste preferences based on the feature information; when the feature information includes keywords corresponding to the scenario in which the recipe is used, determining a second recommendation parameter corresponding to the preparation requirements of the recipe to be recommended; when the feature information includes a festival or solar term corresponding to the date the recipe is used, determining dietary taboos corresponding to the festival or solar term to obtain a third recommendation parameter; when the query parameters include keywords contained in the recipe, determining a fourth recommendation parameter based on the keywords; and combining the first, second, third, and fourth recommendation parameters to determine the target recommendation parameters for querying recipes in the recipe database.

[0048] In an exemplary embodiment, after determining the target recipe corresponding to the recipe recommendation request from the recipe database using the target recommendation parameters, the method further includes: receiving the evaluation result of the target object on the client for the target recipe; determining the recipe preference of the target object within a preset period based on the evaluation result; and adding the recipe preference to the feature profile corresponding to the target object.

[0049] Understandably, in order to better align with the target audience and improve their user experience, the system can collect user feedback and reviews after they have used the target recipe. This feedback can then be used to recommend recipes that are easy for the target audience to use and that they will like, thereby increasing the frequency with which the target audience uses the recipe recommendation function.

[0050] To better understand the process of searching for recipes, the following describes the process using several optional embodiments.

[0051] As an optional embodiment, a recipe recommendation mechanism combining holiday and scenario information is proposed. Figure 3 is a recipe recommendation sequence diagram according to an optional embodiment of the present invention, which specifically includes the following steps:

[0052] Step 1: The client sends request data to the recommendation engine. The request data includes information such as user ID, scenario, date, positive and negative keywords. The positive keywords refer to the recipes that must contain positive keyword information, and the negative keywords refer to the recipes that must filter out dishes or ingredients that contain negative keyword information, which is equivalent to a blacklist.

[0053] Step 2: After receiving the request, the recommendation engine parses the parameters.

[0054] Step 3: Pass the parsed parameters into the MySQL database for further transformation. It should be noted that the parsed request data here refers to the query parameters, including the current date, scenario, user ID, etc.

[0055] Step 4: The MySQL database retrieves user profile data, such as user age, region, and taste preferences, using the user ID. It also retrieves the current solar term or festival information using the date. Furthermore, based on the scenario provided by the user, the MySQL database needs to further retrieve the corresponding keywords. For example, for the scenario of 'watching TV,' the keywords are snacks and drinks. The conversion between scenarios and keywords is pre-configured.

[0056] Step 5: The MySQL database returns the query results to the recommendation engine.

[0057] Step 6: The recommendation engine processes the results returned by the MySQL database into query parameters for the graph database.

[0058] Step 7: Pass the query parameters into the graph database, which stores a large amount of recipe data.

[0059] Step 8: After determining the recipes corresponding to the query parameters, the graph database returns the retrieved recipes to the recommendation engine.

[0060] Step 9: The recommendation engine processes user profiles and recipes into vectors and sorts them by similarity. The previously obtained user profiles and recipes are vectorized, ensuring they are all the same length and that each dimension has the same meaning. The dimensions used include region, age, and taste. Based on the characteristics of the user or recipe, such as region, cuisine, and taste, the corresponding dimension is set to 1, and the rest are set to 0, thus converting them into vectors. After both users and recipes are converted into vectors, their cosine similarity is calculated, and they are sorted from highest to lowest similarity.

[0061] Step 10: The recommendation engine returns the sorted recipes as recommendations to the client.

[0062] Step 11: The client can send the user's preferences for dishes after using the recipe back to the recommendation engine.

[0063] Step 12: The recommendation engine uses user preferences to instruct the MySQL database to update the user profile. For example, after receiving recommendations, the user clicks on the corresponding recipe based on their preferences. The recommendation engine then obtains the user's preference information and updates it in the user profile. For instance, if the user clicks on spicy dishes multiple times, the value for the 'spicy' dimension in the user profile will be increased, allowing for more accurate recommendations to the user in the future.

[0064] Step 13: If none of the recommended recipes satisfy the user, the user can ask, "Are there any more?" The recommendation engine will then make recommendations again, filtering out the recipes that have already been recommended in this round of recommendations.

[0065] It's important to note that a graph database is used as the medium for storing recipes because graph databases are well-suited for storing unstructured data like recipes. Furthermore, each user or recipe is represented as a vector, ensuring that all dimensions are equal and each dimension has the same meaning. This allows for the successful calculation of the similarity between users and recipes.

[0066] In summary, by using the methods described above, recipe recommendations are made by considering time information to suggest recipes suitable for specific times. The recommendations also take into account the context and potential restrictions; for example, in the context of "watching TV," snacks are recommended. When recommending dishes to people with high blood pressure, dishes harmful to their health are filtered out. Furthermore, the recommendations comprehensively consider holidays, contextual information, and restrictions, thus integrating personal and general preferences to recommend dishes that suit the user's taste and are more appropriate for a specific day or occasion, resulting in more diverse recipe recommendations.

[0067] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the recipe query method described in the various embodiments of the present invention.

[0068] This embodiment also provides a recipe query device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0069] Figure 4 This is a structural block diagram (a) of a recipe query device according to an embodiment of the present invention, as shown below. Figure 4 As shown, the device includes:

[0070] (1) Determine module 42, used to determine query parameters based on the recipe recommendation request sent by the client, wherein the query parameters include at least one of the following: the target object identifier of the client, the scenario in which the recipe is used, the date in which the recipe is used, and the keywords contained in the recipe;

[0071] (2) Receiving module 44 is used to receive feature information fed back by the target database according to the query parameters, wherein the feature information includes at least one of the following: feature profile corresponding to the target object identifier, keywords corresponding to the scenario in which the recipe is used, and festivals or solar terms corresponding to the date in which the recipe is used;

[0072] (3) Query module 46 is used to determine the target recommendation parameters for querying recipes in the recipe database based on the query parameters and the feature information, so as to use the target recommendation parameters to determine the target recipe corresponding to the recipe recommendation request from the recipe database.

[0073] The aforementioned device determines query parameters based on the recipe recommendation request sent by the client. These parameters include at least one of the following: the target object identifier used by the client, the scenario in which the recipe is used, the date the recipe is used, and keywords contained in the recipe. It then receives feature information from the target database based on the query parameters. This feature information includes at least one of the following: a feature profile corresponding to the target object identifier, keywords corresponding to the scenario in which the recipe is used, and a festival or solar term corresponding to the date the recipe is used. Based on the query parameters and feature information, target recommendation parameters are determined for querying recipes in the recipe database. These target recommendation parameters are then used to determine the target recipe corresponding to the recipe recommendation request from the recipe database. In other words, by using the information carried in the recipe recommendation request to determine the query parameters corresponding to the target object currently using the client, and further determining the feature information of the target object, the corresponding target recipe is searched from the recipe database using the feature information and query parameters. Therefore, this addresses the problem in existing technologies where recipe recommendations cannot be made based on time or scenario information, thus providing a more timely and accurate recipe recommendation service that meets both general public needs and individual preferences, improving the comprehensiveness of recipe recommendations.

[0074] In an exemplary embodiment, the determining module is further configured to, when determining that the client has recipe query permission, parse the recipe recommendation request sent by the client; and, when determining that the recipe recommendation request carries query information of the target object currently using the client, determine the query parameters based on the query information.

[0075] Optional, Figure 5 This is a structural block diagram (II) of a recipe query device according to an embodiment of the present invention, as shown below. Figure 5As shown, the device includes not only Figure 4 All the structures in it, including: vector module 48 and evaluation module 50.

[0076] In an exemplary embodiment, the above-described apparatus further includes: a vector module, configured to, when it is determined that the feature information includes a feature profile, perform vectorization processing on the feature information and the target recipe in the same dimension to obtain a first vector corresponding to the target recipe and a second vector corresponding to the feature information; determine the cosine similarity between the first vector and the second vector to obtain the matching degree between the target recipe and the feature information; and, if the matching degree is greater than a first preset threshold, determine to feed the target recipe back to the client.

[0077] In an exemplary embodiment, the vector module further includes: a click unit, configured to, when there are multiple target recipes fed back to the client, acquire click information of each target recipe on the client, wherein the click information is used to indicate the preference of the target object bound to the client for the target recipe; and, when it is determined that the number of times the same type of click information appears exceeds a preset threshold, determine the dimension information corresponding to the click information, and use the dimension information to update the feature profile corresponding to the target object.

[0078] In an exemplary embodiment, the vector module further includes: an inquiry unit, configured to, when there is no click information on the client and an inquiry message is received, perform a secondary recommendation based on the recipe recommendation request sent by the client, and filter out the target recipes that have already been recommended; wherein the inquiry message is information obtained by the client after receiving surrounding voice data and recognizing and confirming the voice data.

[0079] In an exemplary embodiment, the query module is further configured to: determine a first recommendation parameter corresponding to the target object's age, region, and taste preferences based on the feature information when the feature information includes a feature profile corresponding to the target object identifier; determine a second recommendation parameter corresponding to the preparation requirements of the recipe when the feature information includes keywords corresponding to the scenario in which the recipe is used; determine dietary taboos corresponding to the festival or solar term when the feature information includes a festival or solar term corresponding to the date the recipe is used, and obtain a third recommendation parameter; determine a fourth recommendation parameter based on the keywords when the query parameters include keywords contained in the recipe; and combine the first, second, third, and fourth recommendation parameters to determine the target recommendation parameters for querying the recipe in the recipe database.

[0080] In one exemplary embodiment, the apparatus further includes: an evaluation module, configured to receive the evaluation results of the target object on the client for the target recipe; determine the recipe preference of the target object within a preset period based on the evaluation results; and add the recipe preference to the feature profile corresponding to the target object.

[0081] In the description of this invention, it should be understood that the terms "center," "upper," "lower," "front," "rear," "left," and "right," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or component referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0082] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal communication between two components. When a component is referred to as being "fixed to" or "set on" another element, it can be directly on the other component or there may be an intervening component. When a component is considered to be "connected" to another element, it can be directly connected to the other element or there may be an intervening component. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0083] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0084] Embodiments of the present invention also provide a storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.

[0085] In one exemplary embodiment, the storage medium described above may be configured to store a computer program for performing the following steps:

[0086] S1, determine the query parameters based on the recipe recommendation request sent by the client, wherein the query parameters include at least one of the following: the target object identifier of the client, the scenario in which the recipe is used, the date in which the recipe is used, and the keywords contained in the recipe;

[0087] S2, receive feature information fed back by the target database according to the query parameters, wherein the feature information includes at least one of the following: feature profile corresponding to the target object identifier, keywords corresponding to the scenario in which the recipe is used, and festivals or solar terms corresponding to the date in which the recipe is used;

[0088] S3, determine the target recommendation parameters for querying recipes in the recipe database based on the query parameters and the feature information, and use the target recommendation parameters to determine the target recipe corresponding to the recipe recommendation request from the recipe database.

[0089] In one exemplary embodiment, the storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0090] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0091] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0092] In one exemplary embodiment, the processor described above may be configured to perform the following steps via a computer program:

[0093] S1, determine the query parameters based on the recipe recommendation request sent by the client, wherein the query parameters include at least one of the following: the target object identifier of the client, the scenario in which the recipe is used, the date in which the recipe is used, and the keywords contained in the recipe;

[0094] S2, receive feature information fed back by the target database according to the query parameters, wherein the feature information includes at least one of the following: feature profile corresponding to the target object identifier, keywords corresponding to the scenario in which the recipe is used, and festivals or solar terms corresponding to the date in which the recipe is used;

[0095] S3, determine the target recommendation parameters for querying recipes in the recipe database based on the query parameters and the feature information, and use the target recommendation parameters to determine the target recipe corresponding to the recipe recommendation request from the recipe database.

[0096] In an exemplary embodiment, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0097] It will be apparent to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. In one exemplary embodiment, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computing device. Furthermore, in some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be implemented as a single integrated circuit module. Thus, the present invention is not limited to any particular hardware and software combination.

[0098] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for searching recipes, characterized in that, include: The query parameters are determined based on the recipe recommendation request sent by the client. The query parameters include: the target object identifier of the client, the scenario in which the recipe is used, the date the recipe is used, and the keywords contained in the recipe. Receive feature information fed back by the target database based on the query parameters, wherein the feature information includes at least one of the following: feature profile corresponding to the target object identifier, keywords corresponding to the scenario in which the recipe is used, and festivals or solar terms corresponding to the date the recipe is used; Based on the query parameters and the feature information, target recommendation parameters are determined for querying recipes in the recipe database, so as to use the target recommendation parameters to determine the target recipe corresponding to the recipe recommendation request from the recipe database; When the target recipe is fed back to the client, the real-time data of the client is determined; If the real-time data indicates that there is no click information on the client and an inquiry message is received, a second recommendation is made based on the recipe recommendation request sent by the client, and the target recipes that have already been recommended are filtered out; wherein, the inquiry message is information obtained by the client after receiving surrounding voice data and recognizing and confirming the voice data.

2. The recipe query method according to claim 1, characterized in that, The query parameters are determined based on the recipe recommendation request sent by the client, including: If it is determined that the client has recipe query permission, the recipe recommendation request sent by the client is parsed. If it is determined that the recipe recommendation request carries query information about the target object of the currently used client, the query parameters are determined based on the query information.

3. The recipe query method according to claim 1, characterized in that, Based on the query parameters and the feature information, recommended parameters are determined for querying recipes in the recipe database. After using the recommended parameters to determine the target recipe corresponding to the recipe recommendation request from the recipe database, the process includes: If the feature information includes a feature profile, the feature information and the target recipe are vectorized in the same dimension to obtain the first vector corresponding to the target recipe and the second vector corresponding to the feature information. Determine the cosine similarity between the first vector and the second vector to obtain the matching degree between the target recipe and the feature information; If the matching degree is greater than a first preset threshold, the target recipe will be sent back to the client.

4. The recipe query method according to claim 3, characterized in that, After determining that the target recipe will be sent back to the client when the matching degree is greater than a first preset threshold, the method further includes: When there are multiple target recipes fed back to the client, the click information of each target recipe on the client is obtained, wherein the click information is used to indicate the preference of the target object bound to the client for the target recipe; If the number of times the same type of click information appears exceeds a preset threshold, the dimension information corresponding to the click information is determined, and the feature profile corresponding to the target object is updated using the dimension information.

5. The recipe query method according to claim 1, characterized in that, Based on the query parameters and the feature information, target recommendation parameters for querying recipes in the recipe database are determined, including: When the feature information includes a feature profile corresponding to the target object identifier, a first recommendation parameter corresponding to the target object's age information, region information, and taste preferences is determined based on the feature information. If the feature information includes keywords corresponding to the scenario in which the recipe is used, a second recommendation parameter corresponding to the preparation requirements of the recipe to be recommended is determined. If the feature information includes the festival or solar term corresponding to the date the recipe is used, determine the dietary taboos corresponding to the festival or solar term to obtain the third recommendation parameter; If the query parameters include keywords contained in the recipe, a fourth recommended parameter is determined based on the keywords; The target recommended parameters for querying recipes in the recipe database are determined by combining the first recommended parameter, the second recommended parameter, the third recommended parameter, and the fourth recommended parameter.

6. The recipe query method according to claim 1, characterized in that, After determining the target recipe corresponding to the recipe recommendation request from the recipe database using the target recommendation parameters, the method further includes: Receive the evaluation results of the target object on the client regarding the target recipe; The evaluation results are used to determine the target object's recipe preferences within a preset period. The recipe preferences are added to the feature profile corresponding to the target object.

7. A recipe query device, characterized in that, include: The determination module is used to determine query parameters based on the recipe recommendation request sent by the client. The query parameters include: the target object identifier of the client, the scenario in which the recipe is used, the date the recipe is used, and the keywords contained in the recipe. The receiving module is used to receive feature information fed back by the target database according to the query parameters, wherein the feature information includes at least one of the following: feature profile corresponding to the target object identifier, keywords corresponding to the scenario in which the recipe is used, and festivals or solar terms corresponding to the date in which the recipe is used; The query module is used to determine the target recommendation parameters for querying recipes in the recipe database based on the query parameters and the feature information, so as to use the target recommendation parameters to determine the target recipe corresponding to the recipe recommendation request from the recipe database; The device further includes: a vector module, used to determine the real-time data of the client when the target recipe is fed back to the client; The vector module further includes an inquiry unit, configured to, when the real-time data indicates that there is no click information on the client and an inquiry message is received, to perform a secondary recommendation based on the recipe recommendation request sent by the client, and to filter out the target recipes that have already been recommended; wherein, the inquiry message is information obtained by the client after receiving surrounding voice data and recognizing and confirming the voice data.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method of any one of claims 1 to 6.

9. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method of any one of claims 1 to 6 through the computer program.

Citation Information

Patent Citations

  • Diet information recommendation method and device

    CN110837552A

  • Menu recommendation method and device

    CN112199593A

  • Menu recommendation method and device, electronic equipment and storage medium

    CN112417272A

  • Information pushing method and device, electronic equipment and storage medium

    CN112464013A