Intelligent menu generation method based on LLM large model and intelligent cooking utensil

Through the phased generation and user confirmation mechanism, combined with user habit files and collaborative filtering algorithm, the error transmission and personalized adaptation problems of the intelligent recipe system are solved, and more accurate ingredient recommendation and cooking step generation are achieved, improving the user experience.

CN120373476AActive Publication Date: 2025-07-25JIANGSU ZHICHU INFORMATION DIGITAL SERVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510867686.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-07-25
Estimated Expiration
2045-06-26

AI Technical Summary

Technical Problem

The existing intelligent recipe generation system has the risk of error transmission, it is difficult to personalize the user's behavioral habits, and the lack of dynamic update mechanism, which leads to the generation results being disconnected from user needs, and the processing of food replacement rules is not accurate enough, especially in new users or new dishes scenarios.

Method used

The phased generation mechanism is adopted to create a list of main and auxiliary ingredients and confirm it by users, and then generate cooking steps. Combined with user habitual files and collaborative filtering algorithms, dynamically adjust the amount of ingredients and replacement rules, and accurately recommend it through the API of the LLM big model.

Benefits of technology

It significantly reduces the chain reaction caused by initial data errors, improves the accuracy and interaction efficiency of recommendations, reduces the burden of repeated input by users, and improves the system's personalized adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120373476A_ABST
    Figure CN120373476A_ABST
Patent Text Reader

Abstract

The invention relates to the field of intelligent cooking, in particular to an intelligent menu generation method based on an LLM large model and an intelligent cooking utensil. The method comprises the following steps: constructing cue words according to dish names, regions and personalized requirements input by a user, calling api of an LLM large model, and generating an original main and auxiliary material list of dishes; providing the original main and auxiliary material list for the user, and obtaining an actual main and auxiliary material list after modification and confirmation of the user; according to an actual main and auxiliary material list, dish names, regions and personalized requirements, calling api of the LLM large model, and generating original cooking steps of dishes; the original cooking steps are provided for the user, and actual cooking steps are obtained after modification and confirmation of the user. According to the method, the main and auxiliary material list is decoupled from the cooking step through a staged generation mechanism, the list is generated firstly, and the step is generated after user correction, so that chain reaction caused by initial data errors is remarkably reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent cooking, and particularly relates to an intelligent recipe generation method and intelligent cooking utensils based on a large language model (LLM). Background Art

[0002] Currently, intelligent recipe generation technologies generally use large language models (LLMs) to output complete recipe content at once, including the list of main and auxiliary ingredients and cooking steps. However, this process has a significant risk of error propagation. Since LLMs may generate incorrect main and auxiliary ingredients due to context understanding biases or limitations in training data in complex tasks (such as omitting key seasonings or misjudging the amount of ingredients), such errors will directly affect the rationality of subsequent cooking steps. For example, the absence of "soy sauce" may make it impossible to implement the "marinating" step in the recipe, and users need to trace back and correct item by item, resulting in low interaction efficiency. In addition, existing systems rely on static rules or explicit user configurations (such as preset food intolerance lists) for personalized adaptation, making it difficult to dynamically capture implicit user behavior habits (such as the long-term tendency to replace pork with beef or systematically adjust the amount of chili peppers), and the habit update mechanism is rigid and cannot be automatically iteratively optimized through historical behavior data, leading to a disconnection between the recommended results and the user's true needs.

[0003] In the processing of ingredient substitution rules, traditional methods mostly rely on manually constructed rule libraries or keyword matching. For example, for users with "lactose intolerance", milk is forcibly replaced with soy milk. However, such methods cannot handle the substitution of non-homogeneous ingredients with similar semantics (such as replacing brown sugar with honey due to similar functions, although they have overlapping uses but belong to different categories), and lack the exploration of behavioral similarities among users. Although some systems introduce collaborative filtering algorithms, in the scenarios of new users or new dishes (data sparsity or cold start problems), the algorithms are difficult to effectively deduce substitution rules. For example, it is impossible to infer whether the same rule applies to the new dish "shredded pork with green peppers" from the behavior of users replacing shredded pork in the existing recipe "fish-flavored shredded pork". At the same time, when the user's real-time needs (such as a temporary requirement of "less salt") conflict with historical habits, most systems do not design a clear priority logic and still mechanically apply historical preferences, resulting in the generated results deviating from the user's current intention and a decline in the experience. The above defects jointly restrict the practicality and user stickiness of intelligent recipe systems. Summary of the Invention

[0004] In view of the above problems, the present invention proposes the following technical solutions:

[0005] An intelligent recipe generation method based on an LLM large model, comprising the following steps:

[0006] S1: Construct a prompt based on the dish name, region, and personalized requirements input by the user, call the API of the large LLM model, and generate the original list of main and auxiliary ingredients for the dish; provide the original list of main and auxiliary ingredients to the user, and after the user's modification and confirmation, obtain the actual list of main and auxiliary ingredients.

[0007] S2: According to the actual list of main and auxiliary ingredients, dish name, region, and personalized requirements, call the API of the large LLM model to generate the original cooking steps for the dish; provide the original cooking steps to the user, and after the user's modification and confirmation, obtain the actual cooking steps.

[0008] Preferably, during the process of generating the original list of main and auxiliary ingredients for the dish, a user habit file is also called, and the user habit file includes quantity change habits, addition and subtraction habits, and replacement habits; the specific calling method is as follows:

[0009] Use the quantity change habit directly as the content of the prompt for constructing the prompt.

[0010] According to the weights of the main and auxiliary ingredients in the addition and subtraction habits, when calling the API of the large LLM model, use the logit_bias parameter to correspondingly control the tendency of the corresponding main and auxiliary ingredients to appear.

[0011] According to the replacement habits of the current user and the replacement habits of other users, use the collaborative filtering algorithm to determine whether to use and which replacement rule in the replacement habits of the current user in the prompt for the current dish.

[0012] When the personalized requirements input by the user conflict with the replacement habits, the personalized requirements input by the user shall prevail.

[0013] Regularly execute the following steps to correct the user habit file. Initially, the content of the user habit file is empty:

[0014] 1) Read the content of the original list of main and auxiliary ingredients and the actual list of main and auxiliary ingredients of the n dishes that the user has recently actually used to obtain the differences in the list content of the n dishes; where n is the quantity threshold.

[0015] 2) According to the differences in the list content, obtain the names of the main and auxiliary ingredients whose usage amounts are adjusted by the user and the average value of the corresponding adjustment ranges, and correct the quantity change habits.

[0016] 3) According to the differences in the list content, count the names of the main and auxiliary ingredients added or deleted by the user. For the same type of main and auxiliary ingredients, it is considered a replacement relationship, and add the dish name and the corresponding replacement content as a replacement rule to the replacement habits; for non - same - type main and auxiliary ingredients, it is considered an addition and subtraction habit, and correct the content of the addition and subtraction habits.

[0017] Preferably, the method for determining whether the main and auxiliary ingredients belong to the same type of main and auxiliary ingredients is:

[0018] Use a pre-trained model to vectorize the names of the main and auxiliary ingredients. For the main and auxiliary ingredients with a similarity exceeding the threshold, they are considered to belong to the same category of main and auxiliary ingredients.

[0019] Preferably, the similarity is specifically the cosine similarity.

[0020] The present invention also provides a kitchen utensil for intelligent cooking. The steps for realizing the intelligent cooking of the kitchen utensil are as follows:

[0021] Use the above method to obtain the actual cooking steps, and according to the actual cooking steps and the instruction format of the kitchen utensil, call the API of the large LLM model to generate cooking instruction steps;

[0022] Cook using the cooking instruction steps.

[0023] Beneficial effects: Through a phased generation mechanism, the present invention decouples the main and auxiliary ingredient list from the cooking steps. First, the list is generated and then corrected by the user before generating the steps, significantly reducing the chain reaction caused by initial data errors. For example, after the user deletes "agaric", subsequent steps automatically avoid operations involving agaric, avoiding the cumbersome process of manual item-by-item modification in the traditional solution; at the same time, based on the multi-dimensional dynamic modeling of user behavior data (quantity change habits, weight increase and decrease, collaborative filtering replacement rules), the system can automatically learn user preferences, such as correcting by analyzing the average value of the usage adjustment in the recent n times, or judging whether "replacing shredded pork with shredded beef" is applicable across dishes by combining semantic vector similarity, which not only reduces the burden of repeated user input but also improves the accuracy of recommendations. Description of the Drawings

[0024] Figure 1 It is a flow chart of the present invention;

[0025] Figure 2 It is a user input interaction diagram in an embodiment of the present invention;

[0026] Figure 3 It is a main and auxiliary ingredient list interaction diagram in an embodiment of the present invention;

[0027] Figure 4 It is a cooking step interaction diagram in an embodiment of the present invention;

[0028] Figure 5 It is a cooking instruction step diagram in an embodiment of the present invention. Detailed Embodiments

[0029] To make the objectives, features, and advantages of the present invention more apparent and understandable, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the embodiments described below are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without making creative efforts fall within the scope of protection of the present invention.

[0030] As Figure 1 shown, an intelligent recipe generation method based on the LLM large model includes the following steps:

[0031] S1: According to the dish name, region, and personalized requirements input by the user, construct a prompt, call the API of the LLM large model (such as DeepSeek, Tongyi Qianwen), and generate the original list of main and auxiliary ingredients for the dish; provide the original list of main and auxiliary ingredients to the user, and after the user's modification and confirmation, obtain the actual list of main and auxiliary ingredients;

[0032] Among them, during the process of generating the original list of main and auxiliary ingredients for the dish, a user habit file is also called. The user habit file includes quantity change habits, addition and subtraction habits, and substitution habits; the specific calling method is:

[0033] Use the quantity change habit directly as the content of the prompt for constructing the prompt;

[0034] According to the weights of the main and auxiliary ingredients in the addition and subtraction habits, when calling the API of the LLM large model, use the logit_bias parameter to correspondingly control the tendency of the corresponding main and auxiliary ingredients to appear;

[0035] It can be understood that the logit_bias parameter here refers to the parameter in the API of the large LLM model used to control the generation probability of specific tokens (words). In different large LLM models, the specific parameter name may be different, and the specific name and usage of the parameter can be obtained from the official documentation of the large LLM model. The API parameters of DeepSeek are compatible with those of OpenAI, and the name of this parameter is logit_bias. For example, every time the user increases or decreases the main and auxiliary ingredients (non-replacement behavior), for the main and auxiliary ingredients increased or decreased by the user, each time one is deleted, the weight is decreased by one, and each time one is added, the weight is increased by 1. For example, in the user's current increase and decrease habits, the weight value of agaric is -1, and the weight value of white sugar is +4. Then, in the logit_bias parameter, the token_id of agaric is correspondingly decreased, and the token_id of white sugar is correspondingly increased. The specific usage method of the logit_bias parameter is as follows: For example, if the token_id of agaric is 9999, and -100 is the minimum value, when calling DeepSeek, add the parameter logit_bias={"9999":-100}, then the generation probability of the word "agaric" is completely suppressed, so "agaric" will not appear.

[0036] According to the replacement habits of the current user and other users, use the collaborative filtering algorithm to determine whether to use and which replacement rule in the replacement habits of the current user in the prompt words of the current dish.

[0037] The collaborative filtering algorithm belongs to the prior art. Here is a simple example. First, traverse all the replacement rules in the replacement habits of the current user, generate corresponding dish vectors according to the dishes used in each replacement rule, find the m most similar users to the current user for the dish vectors corresponding to the replacement rules, and determine whether to use the corresponding replacement rule for the current dish according to the dish vectors of the replacement rules of the m most similar users. For example, in the replacement habits of the current user, the dishes using shredded beef to replace shredded pork are a, b, d, e, forming a dish vector (a, b, d, e) for shredded beef replacing shredded pork; among other users, the dish vector of the 1 most similar user to the current user for shredded beef replacing shredded pork is (a, b, c, d, e). At this time, the current dish is c, so the current dish uses the replacement rule of shredded beef replacing shredded pork.

[0038] When the personalized requirements input by the user conflict with the replacement habits, the personalized requirements input by the user shall prevail.

[0039] S2: According to the actual list of main and auxiliary ingredients, dish name, region, and personalized requirements, call the API of the large LLM model to generate the original cooking steps of the dish; provide the original cooking steps to the user, and after the user's modification and confirmation, obtain the actual cooking steps.

[0040] Perform the following steps regularly to correct the user habit file. Initially, the content of the user habit file is empty:

[0041] 1) Read the original list of main and auxiliary ingredients and the content of the actual list of main and auxiliary ingredients for the n dishes that the user has actually used recently, and obtain the differences in the list content of the n dishes; where n is a quantity threshold, and in this embodiment, the value of n is 5;

[0042] 2) Based on the differences in the list content, obtain the names of the main and auxiliary ingredients for which the user has adjusted the dosage and the average value of the corresponding adjustment range, and correct the quantitative change habit;

[0043] For example, in the original list of main and auxiliary ingredients for the 5 dishes that the user has actually used recently, dried chili peppers appear in 2 dishes. The user increased the dosage of one dish by 5% and the dosage of the other dish by 15%. If there is no record of dried chili peppers in the quantitative change habit before correction, add an item "The dosage of dried chili peppers increases by 10% relative to the reference value" to the quantitative change habit. If there is a record of dried chili peppers in the quantitative change habit before correction, such as "The dosage of dried chili peppers increases by 100% relative to the reference value", then correct the quantitative change habit to "The dosage of dried chili peppers increases by 120% relative to the reference value".

[0044] 3) According to the differences in the list content, count the names of the main and auxiliary ingredients added or deleted by the user. For the same type of main and auxiliary ingredients, consider them as a substitution relationship, and add the dish name and the corresponding substitution content as a substitution rule into the substitution habit; for non-same type of main and auxiliary ingredients, consider them as an addition and subtraction habit, and correct the content of the addition and subtraction habit;

[0045] The method for determining whether the main and auxiliary ingredients belong to the same type of main and auxiliary ingredients is as follows:

[0046] Use a pre-trained model (such as Sentence-BERT) to vectorize the names of the main and auxiliary ingredients. For the main and auxiliary ingredients with a similarity exceeding the threshold, consider them as the same type of main and auxiliary ingredients; in this embodiment, the similarity is specifically the cosine similarity.

[0047] For example, in the original list of main and auxiliary ingredients for the 5 dishes that the user has actually used recently, in the list of main and auxiliary ingredients for one dish named Yuxiang shredded pork, the user deleted shredded pork and added shredded beef. Since the cosine similarity between shredded pork and shredded beef after vectorization exceeds the threshold, it is considered a substitution relationship. Therefore, add a substitution rule to the substitution habit: In the dish Yuxiang shredded pork, shredded pork is replaced by shredded beef; Another example is that in the original list of main and auxiliary ingredients for the 5 dishes that the user has actually used recently, in one dish, the user deleted agaric and added white sugar. Since the cosine similarity between agaric and white sugar after vectorization is lower than the threshold, it is considered an addition and subtraction habit. In the addition and subtraction habit, reduce the weight value of agaric and increase the weight value of white sugar.

[0048] On the other hand, the present invention also provides an intelligent cooking kitchenware. The implementation steps of the intelligent cooking are as follows:

[0049] Use the above method to obtain the actual cooking steps, and according to the actual cooking steps and the instruction format of the intelligent kitchenware, call the API of the large LLM model to generate cooking instruction steps;

[0050] Cook using the cooking instruction steps.

[0051] The following is a more specific example for illustration:

[0052] As Figure 2 shown, for an intelligent cooking kitchenware, first the user inputs the dish name: Tianmu Lake Fish Head, region: Liyang City, Jiangsu Province, personalized requirements: (application scenario: large banquet, cooking method: stir-fry first and then braise, operation difficulty: professional);

[0053] As Figure 3 shown, construct a prompt word based on the above information, call the API of the large LLM model (such as DeepSeek, Tongyi Qianwen) to generate the original list of main and auxiliary ingredients for the dish, and the user modifies and confirms according to the requirements; during the process of generating the original list of main and auxiliary ingredients for the dish, the user habit file is called;

[0054] As Figure 4 shown, according to the actual list of main and auxiliary ingredients, call the API of DeepSeek to generate the original cooking steps for the dish; provide the original cooking steps to the user, and after the user's modification and confirmation, obtain the actual cooking steps;

[0055] As Figure 5 shown, according to the actual cooking steps and the instruction format of the intelligent kitchenware, call the large LLM model to generate cooking instruction steps;

[0056] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. An intelligent recipe generation method based on the large LLM model, characterized in that, It includes the following steps: S1: According to the dish name, region, and personalized requirements input by the user, construct a prompt, call the API of the large LLM model to generate the original list of main and auxiliary ingredients for the dish; provide the original list of main and auxiliary ingredients to the user, and after the user's modification and confirmation, obtain the actual list of main and auxiliary ingredients; S2: According to the actual list of main and auxiliary ingredients, dish name, region, and personalized requirements, call the API of the large LLM model to generate the original cooking steps for the dish; provide the original cooking steps to the user, and after the user's modification and confirmation, obtain the actual cooking steps; During the process of generating the original list of main and auxiliary ingredients for the dish, the user habit file is also called, and the user habit file includes quantity change habits, addition and subtraction habits, and substitution habits; the specific calling method is as follows: Use the quantity change habit directly as the content of the prompt for constructing the prompt; According to the weights of the main and auxiliary ingredients in the addition and subtraction habits, when calling the API of the large LLM model, use the logit_bias parameter to correspondingly control the tendency of the corresponding main and auxiliary ingredients to appear; According to the substitution habits of the current user and the substitution habits of other users, use the collaborative filtering algorithm to determine whether to use and which substitution rule in the substitution habits of the current user in the prompt for the current dish; When the personalized requirements input by the user conflict with the substitution habits, the personalized requirements input by the user shall prevail; Periodically execute the following steps to correct the user habit file. Initially, the content of the user habit file is empty: 1) Read the content of the original list of main and auxiliary ingredients and the actual list of main and auxiliary ingredients of the n dishes that the user has actually used recently to obtain the differences in the list content of the n dishes; where n is the quantity threshold; 2) According to the differences in the list content, obtain the names of the main and auxiliary ingredients for which the user adjusts the dosage and the average value of the corresponding adjustment range, and correct the quantity change habits; 3) According to the differences in the list content, count the names of the main and auxiliary ingredients added or deleted by the user. For the same type of main and auxiliary ingredients, it is considered a substitution relationship, and add the dish name and the corresponding substitution content as a substitution rule into the substitution habits; for non-same type of main and auxiliary ingredients, it is considered an addition and subtraction habit, and correct the content of the addition and subtraction habits.

2. The intelligent recipe generation method based on the large LLM model according to claim 1, wherein The method for determining whether the main and auxiliary ingredients belong to the same type of main and auxiliary ingredients is: Use the pre-trained model to vectorize the names of the main and auxiliary ingredients. For the main and auxiliary ingredients with a similarity exceeding the threshold, it is considered that they belong to the same type of main and auxiliary ingredients.

3. The intelligent recipe generation method based on the large LLM model according to claim 2, wherein, The similarity is specifically the cosine similarity.

4. An intelligent cooking kitchenware, characterized in that, The intelligent cooking of the kitchen utensils is realized as follows: Use the method described in any one of claims 1 to 3 to obtain the actual cooking steps, and according to the actual cooking steps and the instruction format of the kitchen utensils, call the API of the large LLM model to generate the cooking instruction steps; Use the cooking instruction steps for cooking.

Citation Information

Patent Citations

  • Intelligent cooking method based on cooking equipment, cooking system and storage medium

    CN118429063A

  • Cooking system and method based on menu

    CN118690065A

  • Cooking assisting method and device based on recommended menu

    CN119128089A

  • Prompt word generation method and device, equipment, medium and program product

    CN119739834A

  • Matching method, apparatus and device for external medical material directory, and storage medium

    WO2022142022A1