Recipe generation method and device, storage medium and intelligent electrical appliance
By building a pre-set ingredient library based on user profiles and external data sources, and replacing ingredients, the problem of users not meeting the criteria when searching for recipes on smart devices was solved, personalized menu recommendations were realized, and the user experience was improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NINGBO FOTILE KITCHEN WARE CO LTD
- Filing Date
- 2026-01-07
- Publication Date
- 2026-06-05
AI Technical Summary
In existing technologies, when users search for recipes through smart devices, the recommended recipes often do not meet the conditions or the corresponding recipes cannot be found when multiple ingredients or limited information are entered, resulting in a poor user experience.
By acquiring the initial ingredients input by the user, initial recipe information is generated. If the preset conditions are not met, the preset ingredient library is constructed based on the user profile and the target ingredients to be replaced in the preset ingredient library. The preset ingredient library is constructed using seasonal ingredient information, real-time market supply information and historical dietary information. The ingredients are replaced, and the replacement recipe information is generated. Finally, the target recipe information is determined.
When search results do not meet the criteria, personalized ingredient replacements can be made based on user profiles, providing more menu options that match the user's actual situation. This enhances the flexibility and practicality of ingredient recommendations and improves the user experience.
Smart Images

Figure CN122157983A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of information push technology, and in particular to recipe generation methods, devices, storage media and smart appliances. Background Technology
[0002] With the development of technology, smart devices have become increasingly common in homes. People can use a variety of smart devices to search for and filter the information they want. In recipe making, whether it is searching for recipes that can be made based on existing ingredients or users directly searching for recipes they want to eat, it can all be done through smart devices.
[0003] In existing technologies, corresponding menus can be retrieved and filtered based on user-input information. For example, recipes can be filtered by one or more ingredients; alternatively, recipes can be filtered directly by name, displaying information such as the required ingredients, preparation steps, and cooking time. During recipe recommendations, users mostly obtain recipes through information search. However, when users input multiple recipes or specific information, the recommended recipes often only contain one item or the corresponding recipe cannot be found, resulting in a poor user experience. Summary of the Invention
[0004] To address at least one of the aforementioned technical problems, this disclosure provides a recipe generation method, apparatus, storage medium, and smart appliance.
[0005] According to one aspect of this disclosure, a recipe generation method is provided, comprising: Get the initial ingredients input by the user; Initial recipe information is generated based on the initial input ingredients; If the initial recipe information does not meet the preset conditions, the target replacement ingredient corresponding to the target replacement ingredient in the preset ingredient library is determined based on the user profile. The target replacement ingredient is determined based on the initial input ingredient. The preset ingredient library is constructed based on seasonal ingredient information, real-time market supply information, and historical dietary information. Generate alternative recipe information based on the target replacement ingredients; The target recipe information is determined based on the initial recipe information and the replacement recipe information.
[0006] In some possible implementations, the method further includes: User profiles are constructed based on basic user information, health information, environmental information, and interactive behavior information. The basic information includes age, gender, weight, region, cuisine preference, historical dietary information, and religious beliefs. The health information includes chronic diseases, past medical history, allergens, physiological state, body type, health index, and fitness goals. The environmental information includes spatiotemporal information and device information. The interactive behavior information includes historical search information and historical click information.
[0007] In some possible implementations, the target ingredient to be replaced includes at least one key ingredient, the target replacement ingredient includes at least one candidate ingredient, and the method further includes: If the target key ingredient corresponds to multiple candidate ingredients, the substitutability of the target key ingredient and each candidate ingredient is determined based on a preset similarity model, wherein the target key ingredient is any key ingredient among the target ingredients to be replaced; The candidate ingredient with the highest substitutability is selected as the target ingredient corresponding to the target key ingredient; Based on the target key ingredient, the target selected ingredient is updated to replace the target ingredient.
[0008] In some possible implementations, the method further includes: Construct the preset similarity model, wherein the preset similarity model is:
[0009] Where i represents the key ingredient and j represents the candidate ingredients. For the substitutability of key ingredients and alternative ingredients, To assess the nutritional similarity between key ingredients and potential ingredients, To ensure the taste matching of key ingredients and candidate ingredients, The penalty is the difference in calories between the key ingredient and the alternative ingredients. The similarity of pharmacological properties between key ingredients and candidate ingredients. The price substitutability of key ingredients and alternative ingredients is represented by α, β, γ, δ, and ε, which are weighting parameters.
[0010] In some possible implementations, before determining the substitutability of the target key ingredient and each candidate ingredient based on a preset similarity model, the method further includes: Obtain existing ingredient information, wherein the existing ingredient information includes at least one existing ingredient; If the plurality of candidate ingredients includes existing ingredients, the plurality of candidate ingredients are updated based on the existing ingredient information to obtain at least one candidate ingredient.
[0011] In some possible implementations, generating replacement recipe information based on the target replacement ingredient includes: Obtain the historical cooking parameters corresponding to the target replacement ingredient, including historical cooking time and historical seasoning recipe; Replacement recipe information is generated based on the target replacement ingredients, the historical cooking time, and the historical seasoning recipes.
[0012] In some possible implementations, the method further includes: Based on the health information and the historical dietary information, a correlation prediction is made to obtain dietary risk assessment information; The process of generating replacement recipe information based on the target replacement ingredients also includes: Replacement recipe information is generated based on the target replacement ingredients and the dietary risk assessment information.
[0013] According to a second aspect of this disclosure, a recipe generation apparatus is provided, the apparatus comprising: The information acquisition module is used to acquire the initial input ingredients from the user. An initial recipe generation module is used to generate initial recipe information based on the initial input ingredients; The replacement module is used to determine the target replacement ingredient corresponding to the target ingredient to be replaced in the preset ingredient library based on the user profile if the initial recipe information does not meet the preset conditions. The target ingredient to be replaced is determined based on the initial input ingredient. The preset ingredient library is constructed based on seasonal ingredient information, real-time market supply information and historical dietary information. The recipe replacement generation module is used to generate replacement recipe information based on the target replacement ingredients; The target recipe generation module is used to determine the target recipe information based on the initial recipe information and the replacement recipe information.
[0014] According to a third aspect of this disclosure, a smart appliance is provided that employs the recipe generation device as described in the second aspect.
[0015] According to a fourth aspect of this disclosure, an electronic device is provided, including at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor implements the recipe generation method as described in any one of the first aspects by executing the instructions stored in the memory.
[0016] According to a fifth aspect of this disclosure, a computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored therein, the at least one instruction or at least one program being loaded and executed by a processor to implement the recipe generation method as described in any of the first aspects.
[0017] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure.
[0018] Implementing this disclosure will have the following beneficial effects: The system acquires initial input ingredients from the user; generates initial recipe information based on these ingredients; if the initial recipe information does not meet preset conditions, it determines target replacement ingredients from a preset ingredient library based on the user profile. These target replacement ingredients are determined based on the initial input ingredients, and the preset ingredient library is constructed based on seasonal ingredient information, real-time market supply information, and historical dietary information. External data sources, such as season, region, supply chain, and personal dietary habits, are introduced to build the preset ingredient library, enabling dynamic optimization of ingredient replacement and enhancing the flexibility and practicality of ingredient recommendations. When search results do not meet the conditions, personalized ingredient replacements are performed based on the user profile to meet various user needs. Replacement recipe information is generated based on the target replacement ingredients; target recipe information is determined based on the initial recipe information and replacement recipe information. The system provides users with more menus that match their actual situation, intelligently recommending personalized menus.
[0019] Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0021] Figure 1 A flowchart illustrating a recipe generation method according to an embodiment of the present disclosure is shown; Figure 2 A flowchart illustrating a method for generating a target replacement ingredient according to an embodiment of the present disclosure is shown. Figure 3 A flowchart illustrating a method for updating candidate ingredients according to an embodiment of the present disclosure is shown. Figure 4 A flowchart illustrating a method for generating alternative recipe information according to an embodiment of the present disclosure is shown. Figure 5 A flowchart illustrating a method for generating target recipe information according to an embodiment of the present disclosure is shown. Figure 6 This diagram shows a structural schematic of a recipe generation apparatus according to an embodiment of the present disclosure; Figure 7 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation
[0022] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0024] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0025] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.
[0026] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0027] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.
[0028] Figure 1 This diagram illustrates a flowchart of a recipe generation method according to an embodiment of the present disclosure, as shown below. Figure 1 As shown, the above method includes: S101. Obtain the initial ingredients input by the user; The recipe generation method is applied to a server that obtains initial input ingredients from a user based on a terminal device. The terminal device includes, but is not limited to, handheld computers, desktop computers, mobile phones, media players, personal digital assistants, terminal devices embedded in kitchen equipment, and various combinations of the aforementioned devices.
[0029] The initial input ingredients can include one or more ingredients. For example, the initial input ingredients include pork tenderloin and carrots.
[0030] S102. Generate initial recipe information based on the initial input ingredients; Initial recipe information includes recipe information for one or more recipes, including but not limited to recipe name, ingredient type, seasoning type, recipe image, recipe video, and recipe preparation steps; The recipe database is searched based on the initial input ingredients to generate initial recipe information including the initial input ingredients; alternatively, the initial recipe information is generated based on the initial input ingredients using knowledge graphs and natural language processing (NLP).
[0031] S103. If the initial recipe information does not meet the preset conditions, the target replacement ingredient corresponding to the target replacement ingredient in the preset ingredient library is determined based on the user profile. The target replacement ingredient is determined based on the initial input ingredient. The preset ingredient library is constructed based on seasonal ingredient information, real-time market supply information and historical dietary information. The preset condition can be that the number of recipes included in the initial recipe information is greater than or equal to a preset number. If the number of recipes in the initial recipe information does not meet the preset condition, the target ingredient to be replaced in the initial input ingredients will be replaced based on the user profile and the preset ingredient library.
[0032] The target ingredient to be replaced can be one or more key ingredients from the initial input ingredients. In some embodiments, if the target ingredient to be replaced has multiple key ingredients, the target substitute ingredient also has multiple substitute ingredients, and the two correspond one-to-one. The key ingredients can be determined based on their type; for example, meat can be designated as the first key ingredient, root vegetables as the second key ingredient, soy products as the third key ingredient, leafy vegetables as the fourth key ingredient, and other types as the fifth key ingredient. If the initial input ingredients include only one ingredient, that ingredient is the target ingredient to be replaced; if the initial input ingredients include two or more key ingredients, the first two key ingredients are selected as the target substitute ingredients. The target ingredient to be replaced can also be a substitute ingredient pre-marked by the user. Seasonal ingredient information is used to characterize seasonal ingredients; for example, root vegetables are the main ingredient in winter, and seasonal fruits and vegetables are the main ingredient in summer. Real-time market supply information is used to characterize the ingredients supplied by various food trading platforms / markets, and historical dietary information is used to characterize the ingredients used by the user in their past diet.
[0033] Building a pre-set ingredient database includes: acquiring seasonal ingredient information, real-time market supply information, and historical dietary information; cleaning, normalizing, and labeling the seasonal ingredient information, real-time market supply information, and historical dietary information to obtain target ingredient data; cleaning includes deduplication; and storing the target ingredient data in the pre-set ingredient database.
[0034] In some embodiments, the preset ingredient database is updated at preset time intervals by incorporating seasonal ingredient information, real-time market supply information, and historical dietary information. The target replacement ingredient is determined from the preset ingredient database by comprehensively considering the user's basic information, health information, environmental information, and interaction behavior information.
[0035] S104. Generate replacement recipe information based on the target replacement ingredients; The replaced recipe information includes recipe information corresponding to one or more recipes. The recipe information includes, but is not limited to, replacement labels, recipe name, ingredient type, seasoning type, recipe image, recipe video, and recipe preparation steps. The replacement labels include the words "recommended recipe". Search the recipe database based on the target replacement ingredient to generate replacement recipe information that includes the target replacement ingredient; or, generate replacement recipe information based on the target replacement ingredient using knowledge graphs and natural language processing (NLP).
[0036] S105. Determine the target recipe information based on the initial recipe information and the replacement recipe information.
[0037] The initial recipe information and the replacement recipe information are merged to obtain the target recipe information, which includes both the initial recipe information and the replacement recipe information.
[0038] The aforementioned technical solution, based on a pre-set ingredient database and external data sources such as season, region, supply chain, and individual dietary habits, dynamically optimizes ingredient replacement, enhancing the flexibility and practicality of ingredient recommendations. When search results do not meet the criteria, personalized ingredient replacements are made based on user profiles, catering to various user needs and providing users with more menus tailored to their individual circumstances, intelligently recommending personalized menus.
[0039] In some embodiments, the method further includes: User profiles are built based on basic user information, health information, environmental information, and interactive behavior information. Basic information includes age, gender, weight, region, cuisine preference, historical dietary information, and religious beliefs. Health information includes chronic diseases, past medical history, allergens, physiological status, body type, health index, and fitness goals. Environmental information includes spatiotemporal information and device information. Interactive behavior information includes historical search information and historical click information.
[0040] Physiological status includes, but is not limited to, menstrual cycle information, pregnancy information, and postpartum information; constitution categories include, but are not limited to, Yang excess constitution, phlegm-dampness constitution, damp-heat constitution, Yin deficiency constitution, Yang deficiency constitution, Qi deficiency constitution, special constitution, blood stasis constitution, and Qi stagnation constitution; past medical history includes the user's historical illness information, for example, past medical history includes, but is not limited to, diabetes, hypertension, and hyperlipidemia. Spatiotemporal information includes time dimension information, geographical dimension information, and solar term dimension information. Time dimension information includes weekdays / rest days, breakfast / lunch / dinner / late-night snacks; geographical dimension information includes home, office, and camping; solar term dimension information includes traditional dietary customs such as the Beginning of Summer, Winter Solstice, and Dragon Boat Festival. Device information includes refrigerator recommendation information and smart stove information. Historical search information is used to represent the food information entered by the user within a preset time period. Historical click information is used to represent the user's historical click records of browsing recipes.
[0041] In some embodiments, basic information, health information, and environmental information can be obtained based on user input, the user-bound health device interface, or smart kitchen devices. For example, health devices include, but are not limited to, smart bracelets and health code platforms.
[0042] In some embodiments, ingredients in a preset food library that do not meet health requirements are filtered based on health information to obtain the first ingredient. For example, ingredients corresponding to past medical history and allergens are filtered, or for users with fitness goals, ingredients that easily lead to fat gain are excluded, and beef is preferentially replaced with chicken breast or other low-calorie, low-fat ingredients. The second ingredient is determined from the first ingredient based on basic information. For example, children are given priority for easily digestible and nutritious ingredients, and the elderly are given priority for easy-to-chew ingredients; another example is analyzing the user's historical dietary information to determine the frequency of the user's intake of high-sodium recipes over 7 consecutive days. If the frequency exceeds the recommended threshold, such as 80%, the recommendation priority of low-sodium, low-oil recipes is increased. The second ingredient is prioritized based on environmental information and interaction behavior information, and the ingredient with the highest priority is selected as the target replacement ingredient.
[0043] In some embodiments, cluster analysis techniques can be used to cluster users' dietary choices across different solar terms, time dimensions, and device dimensions to obtain specific dietary habit analysis results. Based on these results, user preference patterns in specific scenarios can be extracted, such as "preferring high-calorie soups in winter evenings." For example, longer but more elaborate dishes can be recommended on rest days, while quick and simple meals can be recommended on weekdays. Secondary ingredients can be prioritized based on preference patterns and interaction behavior information, and the highest-priority ingredient can be used as the target replacement ingredient, achieving "spatiotemporal adaptation" and improving the scenario-based practicality of the recommendation system.
[0044] In some embodiments, the terminal device interacting with the user also includes a recipe priority display module. The recipe priority display module displays images and recipe names, and only after the user clicks on them will the corresponding instructions, ingredient preparation, and corresponding video recommendations be displayed. Based on the user's click history information obtained from the recipe priority display module, if the user's click behavior only stays at the image and recipe name stage, the priority of the corresponding recipe ingredients is set higher than if the user skips the recipe ingredients. When the user clicks on the recipe to view ingredient information and the preparation process, the priority of the corresponding recipe ingredients is further increased. When the user watches the video, the priority of the corresponding recipe ingredients is further increased. Secondly, user cuisine preferences take precedence over interaction behavior information. While using click-based information, the recipes themselves should be relatively simple; users can create them by following the steps without watching videos. Therefore, the priority of ingredients in a recipe can be adjusted based on its difficulty level. Furthermore, the user's historical dietary history can be used to determine the rationality of ingredient priority adjustments. For example, if cuisine preferences indicate a user prefers quick and easy dishes, then even if the user views the image multiple times, the priority of a dish that is more difficult to prepare than their usual choices will not change. The priority of the second ingredient should be ranked based on preference patterns, cuisine preferences, and interaction behavior information, with the highest-priority ingredient being the target replacement. Additionally, the priority of recipe recommendations viewed by the user can be used to make recommendations even when the user has not entered keywords.
[0045] The above technical solution achieves deep adaptation of personalized recommendations by integrating multi-dimensional data, such as basic information, health information and environmental information, covering the implicit dimensions of user needs and building accurate user profiles.
[0046] Please see Figure 2 In some embodiments, the target ingredient to be replaced includes at least one key ingredient, and the target replacement ingredient includes at least one candidate ingredient. The method further includes: S1031. If the target key ingredient corresponds to multiple candidate ingredients, determine the ingredient substitutability of the target key ingredient and each candidate ingredient based on a preset similarity model. The target key ingredient is any key ingredient among the target ingredients to be replaced. S1032. Select the candidate ingredient with the highest substitutability as the target key ingredient; S1033, Based on the target key ingredients corresponding to the target, select ingredients to update the target and replace ingredients.
[0047] If the key ingredient and candidate ingredients have a one-to-many relationship, meaning the key ingredient in the target replacement ingredients determined based on the user profile corresponds to multiple candidate ingredients in the target replacement ingredients, then the optimal candidate ingredient needs to be determined from these multiple candidate ingredients. The substitution degree between the target key ingredient and each corresponding candidate ingredient is calculated using a preset similarity model. The candidate ingredient with the highest substitution degree is selected as the target selection ingredient corresponding to the target key ingredient. Then, based on the target selection ingredients corresponding to the target key ingredient, other candidate ingredients corresponding to the target key ingredient in the target replacement ingredients are removed, retaining the optimal candidate ingredient, which is then paired one-to-one with the key ingredient to obtain the updated target replacement ingredients.
[0048] For example, the target substitute ingredients include key ingredients beef and white radish, and the target substitute ingredients include multiple alternative ingredients corresponding to beef, such as lamb leg meat, chicken breast meat and pork shoulder meat, and alternative ingredients corresponding to white radish meat, such as carrot meat. Beef, which has multiple alternative ingredients, is the target key ingredient. The substitute degree between beef and its corresponding lamb leg meat, chicken breast meat and pork shoulder meat is calculated according to a preset similarity model. The alternative ingredient with the highest substitute degree is taken as the target selected ingredient corresponding to beef.
[0049] In some embodiments, the ingredient information corresponding to the target key ingredient and the ingredient information of each candidate ingredient corresponding to the target key ingredient are obtained. The ingredient information includes nutritional value, taste value, calorie content, pharmacological properties and price. The ingredient information corresponding to the target key ingredient and the ingredient information of each candidate ingredient corresponding to the target key ingredient are input into a preset similarity model to calculate the substitutability between the two.
[0050] The above technical solution, when multiple alternative ingredients are available for a key ingredient, calculates the substitutability of each ingredient and selects the ingredient with the higher substitutability as the target ingredient. This improves the alignment between the alternative recipe and the user's initial intention while meeting the user's personalized needs.
[0051] In some embodiments, the method further includes: Construct a preset similarity model, which is as follows:
[0052] Where i represents the key ingredient and j represents the candidate ingredients. For the substitutability of key ingredients and alternative ingredients, To assess the nutritional similarity between key ingredients and potential ingredients, To ensure the taste matching of key ingredients and candidate ingredients, The penalty is the difference in calories between the key ingredient and the alternative ingredients. The similarity of pharmacological properties between key ingredients and candidate ingredients. The price substitutability of key ingredients and alternative ingredients is represented by α, β, γ, δ, and ε, which are weighting parameters.
[0053] The substitutability of a food ingredient is used to characterize how well a candidate food ingredient can substitute for a key food ingredient. The substitutability is calculated based on the price information provided for the food ingredient. When the price of a candidate food ingredient is higher than that of the key food ingredient, its suitability for substitution decreases, and the substitutability decreases; conversely, when the price of a candidate food ingredient is lower than that of the key food ingredient, its suitability for substitution increases, and the substitutability increases. In addition to price, the pharmacology, taste, calories, and nutritional value of the food ingredient are comprehensively considered for evaluation. The absolute values of α, β, γ, δ, and ε are summed to 1.
[0054] The above technical solution comprehensively considers multiple parameters of the two ingredients to evaluate their similarity and obtains a more similar replacement ingredient.
[0055] Please see Figure 3 In some embodiments, before determining the substitutability of the target key ingredient and each candidate ingredient based on a preset similarity model, the method further includes: S1035. Obtain existing ingredient information, which includes at least one existing ingredient; S1036. If multiple candidate ingredients include existing ingredients, update multiple candidate ingredients based on existing ingredient information to obtain at least one candidate ingredient.
[0056] Existing ingredients are used to represent the ingredients that the user currently has on hand. If multiple candidate ingredients include existing ingredients, then the existing ingredients among the multiple candidate ingredients are retained to obtain at least one candidate ingredient. If at least one candidate ingredient is a single candidate ingredient, then that candidate ingredient is determined as the target selection ingredient. If at least one candidate ingredient is multiple candidate ingredients, the ingredient substitutability between the target key ingredient and each candidate ingredient is determined based on a preset similarity model. The candidate ingredient with the highest ingredient substitutability is taken as the target selection ingredient corresponding to the target key ingredient.
[0057] For example, the existing ingredient information includes beef, pork shoulder, and chicken breast. Beef is matched with several alternative ingredients: lamb leg, chicken breast, and pork shoulder. Therefore, based on the existing ingredient information, these alternative ingredients are updated to include chicken breast and pork shoulder. The substitutability of beef and chicken breast, and beef and pork shoulder, is then compared.
[0058] The above technical solution takes into account the ingredients available to users, making the recommended recipes more practical and easy to use.
[0059] Please see Figure 4 In some embodiments, generating replacement recipe information based on the target replacement ingredient includes: S1041. Obtain the historical cooking parameters corresponding to the target replacement ingredient. The historical cooking parameters include historical cooking time and historical seasoning recipe. S1042. Generate replacement recipe information based on the target replacement ingredients, historical cooking time, and historical seasoning recipes.
[0060] Based on the user's historical cooking parameters for the target replacement ingredient, the system adjusts the cooking parameters in the recipes found based on the target replacement ingredient to obtain the replacement recipe information. The system can automatically update the cooking methods for personalized ingredients.
[0061] For example, if the target ingredient to be replaced includes yam, and the search results include recipes containing yam with a cooking time of 15-20 minutes, while the user's historical cooking time for yam is 2-5 minutes, it is determined that the user prefers a crisp and refreshing yam rather than a soft and delicate one. Therefore, the yam cooking time in the recipe information is updated based on the historical cooking time.
[0062] In some embodiments, based on machine learning models, the system automatically optimizes the cooking parameters for substitute ingredients according to historical cooking parameters or operations, such as manually adjusting cooking time and seasoning preferences. For example, after a user repeatedly shortens the steak cooking time, the system automatically recommends a cooking method that better suits their taste. Introducing an adaptive learning mechanism enables the recommendation system to have dynamic optimization capabilities, thereby enhancing user engagement.
[0063] The above technical solution updates the cooking parameters in the retrieved recipes based on the user's historical cooking parameters, obtains replacement recipe information, and provides personalized design that conforms to the user's eating habits, thereby improving the user experience.
[0064] Please see Figure 5 In some embodiments, the method further includes: S201. Based on health information and historical dietary information, correlation prediction is performed to obtain dietary risk assessment information; Generating replacement recipe information based on target replacement ingredients also includes: S1044. Generate alternative recipe information based on target replacement ingredients and dietary risk assessment information.
[0065] A health trend assessment is performed based on health information and historical dietary information to obtain dietary risk assessment information. If the dietary risk assessment information meets preset warning conditions, a health alert is issued, and the cooking parameters of recipes searched based on target replacement ingredients are updated according to the risk assessment information to obtain replacement recipe information. The replacement recipe information includes, but is not limited to, replacement annotations, cooking parameter replacement annotations, recipe name, ingredient type, seasoning type, recipe image, recipe video, and recipe preparation steps. The cooking parameter replacement annotations include normal cooking parameter data as well as cooking parameter data customized according to the user's preferences.
[0066] For example, if the target replacement ingredient includes beef, and the user's dietary risk assessment information indicates that the user's sodium and oil intake exceeds the warning value based on health information and historical dietary information, and a health reminder is issued, then the cooking parameters of the recipe information found for the target replacement ingredient beef will be updated, such as adding salt and oil amounts that meet the user's physical needs and reducing the amount added.
[0067] The above-mentioned technical solution can conduct health risk assessments based on users' historical dietary information and health information, such as chronic diseases and past medical history, provide early warnings of potential health problems caused by unbalanced dietary structures, and generate improved recipes to help users develop more reasonable eating habits.
[0068] Please see Figure 6 According to a second aspect of this disclosure, a recipe generation apparatus is provided, the apparatus comprising: Information acquisition module 10 is used to acquire the initial input ingredients from the user; The initial recipe generation module 20 is used to generate initial recipe information based on the initial input ingredients; The replacement module 30 is used to determine the target replacement ingredient corresponding to the target ingredient to be replaced in the preset ingredient library based on the user profile if the initial recipe information does not meet the preset conditions. The target ingredient to be replaced is determined based on the initial input ingredients, and the preset ingredient library is constructed based on seasonal ingredient information, real-time market supply information, and historical dietary information. The recipe generation module 40 is used to generate replacement recipe information based on the target replacement ingredients. The target recipe generation module 50 is used to determine the target recipe information based on the initial recipe information and the replacement recipe information.
[0069] In some embodiments, the apparatus further includes: The user profile building module is used to build user profiles based on users' basic information, health information, environmental information, and interaction behavior information. Basic information includes age, gender, weight, region, cuisine preference, historical dietary information, and religious beliefs. Health information includes chronic diseases, past medical history, allergens, physiological status, body type, health index, and fitness goals. Environmental information includes spatiotemporal information and device information. Interaction behavior information includes historical search information and historical click information.
[0070] In some embodiments, the target ingredient to be replaced includes at least one key ingredient, the target replacement ingredient includes at least one candidate ingredient, and the device further includes: The substitution degree calculation module is used to determine the substitution degree between the target key ingredient and each candidate ingredient based on a preset similarity model if the target key ingredient corresponds to multiple candidate ingredients. The target key ingredient is any key ingredient among the target ingredients to be replaced. The target ingredient selection module is used to select the candidate ingredients with the highest substitutability as the target key ingredients; The first update module is used to update the target by selecting ingredients based on the target key ingredients and replacing the target ingredients.
[0071] In some embodiments, the apparatus further includes: The similarity model building module is used to build a preset similarity model. The preset similarity model is as follows:
[0072] Where i represents the key ingredient and j represents the candidate ingredients. For the substitutability of key ingredients and alternative ingredients, To assess the nutritional similarity between key ingredients and potential ingredients, To ensure the taste matching of key ingredients and candidate ingredients, The penalty is the difference in calories between the key ingredient and the alternative ingredients. The similarity of pharmacological properties between key ingredients and candidate ingredients. The price substitutability of key ingredients and alternative ingredients is represented by α, β, γ, δ, and ε, which are weighting parameters.
[0073] In some embodiments, the apparatus further includes: The existing ingredient information acquisition module is used to acquire existing ingredient information, which includes at least one existing ingredient. The second update module is used to update multiple candidate ingredients based on existing ingredient information if multiple candidate ingredients include existing ingredients, so as to obtain at least one candidate ingredient.
[0074] In some embodiments, replacing the recipe generation module 40 includes: The cooking parameter acquisition unit is used to acquire the historical cooking parameters corresponding to the target replacement ingredient. The historical cooking parameters include historical cooking time and historical seasoning recipes. The recipe generation unit is used to generate replacement recipe information based on the target replacement ingredients, historical cooking time, and historical seasoning recipes.
[0075] In some embodiments, the apparatus further includes: The assessment module is used to make correlation predictions based on health information and historical dietary information to obtain dietary risk assessment information; The replacement recipe generation module 40 also includes: The generation unit is used to generate alternative recipe information based on the target replacement ingredients and dietary risk assessment information.
[0076] In some embodiments, a smart appliance is provided that employs the recipe generation device described above.
[0077] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0078] This application provides a recipe generation device, which can be a terminal or a server. The recipe generation device includes a processor and a memory. The memory stores at least one instruction or at least one program. The at least one instruction or at least one program is loaded and executed by the processor to implement the recipe generation method provided in the above method embodiments.
[0079] Memory is used to store software programs and modules. The processor executes these stored software programs and modules to perform various functional applications and data processing. Memory can primarily consist of a program storage area and a data storage area. The program storage area stores the operating system, application programs required for functionality, etc.; the data storage area stores data created based on device usage, etc. Furthermore, memory can include high-speed random access memory (RAM) and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory can also include a memory controller to provide the processor with access to the memory.
[0080] The methods and embodiments provided in this application can be executed in electronic devices such as mobile terminals, computer terminals, servers, or similar computing devices. Figure 7 This is a hardware structure block diagram of an electronic device for a recipe generation method provided in an embodiment of this application. For example... Figure 7As shown, the electronic device 900 can vary significantly due to differences in configuration or performance. It may include one or more central processing units (CPUs) 910 (CPUs 910 may include, but are not limited to, microprocessors such as MCUs or programmable logic devices such as FPGAs), a memory 930 for storing data, and one or more storage media 920 (e.g., one or more mass storage devices) for storing application programs 923 or data 922. The memory 930 and storage media 920 may be temporary or persistent storage. The program stored in the storage media 920 may include one or more modules, each module may include a series of instruction operations on the electronic device. Furthermore, the CPU 910 may be configured to communicate with the storage media 920 and execute the series of instruction operations in the storage media 920 on the electronic device 900. Electronic device 900 may also include one or more power supplies 960, one or more wired or wireless network interfaces 950, one or more input / output interfaces 940, and / or one or more operating systems 921, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0081] The input / output interface 940 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the electronic device 900. In one example, the input / output interface 940 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the input / output interface 940 may be a radio frequency (RF) module used for wireless communication with the Internet.
[0082] Those skilled in the art will understand that Figure 7 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device 900 may also include... Figure 7 The more or fewer components shown, or having the same Figure 7 The different configurations shown.
[0083] Embodiments of this application also provide a computer-readable storage medium, which can be disposed in an electronic device to store at least one instruction or at least one program related to implementing a recipe generation method in the method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the recipe generation method provided in the above method embodiment.
[0084] Optionally, in this embodiment, the storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0085] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations described above.
[0086] As can be seen from the embodiments of the recipe generation method, apparatus, equipment, terminal, server, storage medium, or computer program provided in this application, this application obtains initial input ingredients from the user; generates initial recipe information based on the initial input ingredients; if the initial recipe information does not meet preset conditions, it determines the target replacement ingredients corresponding to the target replacement ingredients in the preset ingredient library based on the user profile. The target replacement ingredients are determined based on the initial input ingredients, and the preset ingredient library is constructed based on seasonal ingredient information, real-time market supply information, and historical dietary information. External data sources, such as seasons, regions, supply chains, and personal dietary habits, are introduced to construct the preset ingredient library, achieving dynamic optimization of ingredient replacement and enhancing the flexibility and practicality of ingredient recommendations. When the search recipe results do not meet the conditions, personalized ingredient replacement is performed based on the user profile, meeting various user needs. Replacement recipe information is generated based on the target replacement ingredients; target recipe information is determined based on the initial recipe information and the replacement recipe information. More menus are provided to users that suit their needs, and personalized menus are intelligently recommended.
[0087] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous.
[0088] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device, equipment, and storage medium embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0089] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing the relevant hardware to implement them. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0090] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A recipe generation method, characterized in that, The method includes: Get the initial ingredients input by the user; Initial recipe information is generated based on the initial input ingredients; If the initial recipe information does not meet the preset conditions, the target replacement ingredient corresponding to the target replacement ingredient in the preset ingredient library is determined based on the user profile. The target replacement ingredient is determined based on the initial input ingredient. The preset ingredient library is constructed based on seasonal ingredient information, real-time market supply information, and historical dietary information. Generate alternative recipe information based on the target replacement ingredients; The target recipe information is determined based on the initial recipe information and the replacement recipe information.
2. The method according to claim 1, characterized in that, The method further includes: User profiles are constructed based on basic user information, health information, environmental information, and interactive behavior information. The basic information includes age, gender, weight, region, cuisine preference, historical dietary information, and religious beliefs. The health information includes chronic diseases, past medical history, allergens, physiological state, body type, health index, and fitness goals. The environmental information includes spatiotemporal information and device information. The interactive behavior information includes historical search information and historical click information.
3. The method according to claim 1, characterized in that, The target ingredient to be replaced includes at least one key ingredient, the target replacement ingredient includes at least one candidate ingredient, and the method further includes: If the target key ingredient corresponds to multiple candidate ingredients, the substitutability of the target key ingredient and each candidate ingredient is determined based on a preset similarity model, wherein the target key ingredient is any key ingredient among the target ingredients to be replaced; The candidate ingredient with the highest substitutability is selected as the target ingredient corresponding to the target key ingredient; Based on the target key ingredient, the target selected ingredient is updated to replace the target ingredient.
4. The method according to claim 3, characterized in that, The method further includes: Construct the preset similarity model, wherein the preset similarity model is: Where i represents the key ingredient and j represents the candidate ingredients. For the substitutability of key ingredients and alternative ingredients, To assess the nutritional similarity between key ingredients and potential ingredients, To ensure the taste matching of key ingredients and candidate ingredients, The penalty is the difference in calories between the key ingredient and the alternative ingredients. The similarity of pharmacological properties between key ingredients and candidate ingredients. The price substitutability of key ingredients and alternative ingredients is represented by α, β, γ, δ, and ε, which are weighting parameters.
5. The method according to claim 3, characterized in that, Before determining the substitutability of the target key ingredient and each candidate ingredient based on a preset similarity model, the method further includes: Obtain existing ingredient information, wherein the existing ingredient information includes at least one existing ingredient; If the plurality of candidate ingredients includes existing ingredients, the plurality of candidate ingredients are updated based on the existing ingredient information to obtain at least one candidate ingredient.
6. The method according to claim 1, characterized in that, The process of generating replacement recipe information based on the target replacement ingredient includes: Obtain the historical cooking parameters corresponding to the target replacement ingredient, including historical cooking time and historical seasoning recipe; Replacement recipe information is generated based on the target replacement ingredients, the historical cooking time, and the historical seasoning recipes.
7. The method according to claim 2, characterized in that, The method further includes: Based on the health information and the historical dietary information, a correlation prediction is made to obtain dietary risk assessment information; The process of generating replacement recipe information based on the target replacement ingredients also includes: Replacement recipe information is generated based on the target replacement ingredients and the dietary risk assessment information.
8. A recipe generation device, characterized in that, The device includes: The information acquisition module is used to acquire the initial input ingredients from the user. An initial recipe generation module is used to generate initial recipe information based on the initial input ingredients; The replacement module is used to determine the target replacement ingredient corresponding to the target ingredient to be replaced in the preset ingredient library based on the user profile if the initial recipe information does not meet the preset conditions. The target ingredient to be replaced is determined based on the initial input ingredient. The preset ingredient library is constructed based on seasonal ingredient information, real-time market supply information and historical dietary information. The recipe replacement generation module is used to generate replacement recipe information based on the target replacement ingredients; The target recipe generation module is used to determine the target recipe information based on the initial recipe information and the replacement recipe information.
9. A smart appliance, characterized in that, It employs the recipe generation device as described in claim 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction or at least one program, which is loaded and executed by a processor to implement the recipe generation method as described in any one of claims 1-7.