Menu generation method and device based on multiple agents, terminal, medium and product

By using a multi-agent architecture for menu generation, combined with multimodal input and feedback mechanisms, the problem of existing technologies being unable to generate creative recipes that meet individual tastes and nutritional balance has been solved. This enables the rapid generation of creative recipes that meet user needs and improves the user experience.

CN122117248APending Publication Date: 2026-05-29CHINA AGRI UNIV +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA AGRI UNIV
Filing Date
2026-01-14
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies cannot quickly generate feasible creative recipes that both suit individual tastes and maintain nutritional balance, thus impacting user experience.

Method used

A menu generation method based on a multi-agent architecture is adopted. The first agent obtains user input information, the second agent uses RAG technology to determine supplementary information, and the third agent optimizes the recipe information. By combining multimodal input and feedback mechanisms, creative recipes that meet user needs are generated.

Benefits of technology

It enables the rapid generation of creative dish recipes that suit individual tastes while maintaining nutritional balance, thus improving the accuracy, creativity, and personalization of the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122117248A_ABST
    Figure CN122117248A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of data processing, and provides a menu generation method and device based on multiple agents, a terminal, a storage medium and a computer program product, the method comprising: obtaining input information of a user, analyzing the input information, and determining demand information and dining scene information of the user; based on the recipe demand information and the dining scene information, determining supplementary information by using RAG technology; generating recipe information according to the recipe demand information, the dining scene information and the supplementary information; determining nutritional information of the recipe information; and optimizing the recipe information according to the nutritional demand information and the nutritional information to obtain target recipe information required as a menu generated based on multiple agents. The present application can combine user demand of multiple modal inputs and multiple scene constraints, generate an executable creative menu scheme that meets individual tastes and takes into account nutritional balance through a feedback mechanism and continuous learning ability, and improve user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, specifically to a menu generation method, apparatus, terminal, storage medium, and computer program product based on a multi-agent architecture, and particularly to a personalized creative menu generation method, apparatus, terminal, storage medium, and computer program product based on a multi-agent architecture oriented towards precise nutritional needs. Background Technology

[0002] Users' dietary needs are shifting from "eating enough and eating safely" to "eating nutritiously, eating precisely, and eating creatively," especially in diverse scenarios such as daily meals, holiday gatherings, and impromptu meals, where the demand for immediate, personalized, and creative meal plans has increased significantly. However, in reality, users' eating behaviors are immediate, diverse, and context-dependent. Examples include impromptu arrangements for daily meals and snacks, brainstorming menus for holiday gatherings, meals for specific medical conditions, efficient use of refrigerator stock, and prioritizing the consumption of near-expiry ingredients. These scenarios often require systems to quickly generate executable creative meal plans that cater to individual tastes while maintaining nutritional balance. However, the inability to quickly generate executable creative meal plans that meet both individual tastes and nutritional balance significantly impacts the user experience.

[0003] Therefore, there is an urgent need to develop a menu generation method, device, terminal, storage medium, and computer program product based on multi-agent intelligence. In particular, there is a method, device, terminal, storage medium, and computer program product based on a multi-agent architecture to generate personalized creative dishes for precise nutritional needs. This product can combine user needs with multimodal input and multi-scenario constraints, and through feedback mechanisms and continuous learning capabilities, quickly generate executable creative dish solutions that meet individual tastes and take into account nutritional balance, thereby significantly improving the user experience.

[0004] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The purpose of this invention is to provide a menu generation method, device, terminal, storage medium, and computer program product based on multi-agent architecture. In particular, it relates to a personalized creative menu generation method, device, terminal, storage medium, and computer program product based on multi-agent architecture and oriented towards precise nutritional needs. By combining user needs from multimodal input with multi-scenario constraints, and through feedback mechanisms and continuous learning capabilities, it can quickly generate executable creative menu solutions that meet individual tastes and take into account nutritional balance, thereby significantly improving the user experience.

[0006] To address the aforementioned technical problems, as one aspect of the present invention, a multi-agent-based menu generation method is provided, applicable to generating menus based on multiple agents, wherein the multiple agents include a first agent, a second agent, and a third agent; the multi-agent-based menu generation method includes: acquiring user input information through the first agent; parsing the input information to determine user needs and dining scenario information; the user needs information includes recipe requirements and nutritional requirements; determining supplementary information using RAG technology based on the recipe requirements and dining scenario information through the second agent; generating recipe information based on the recipe requirements, dining scenario information, and supplementary information; determining the nutritional information of the recipe information through the third agent; and optimizing the recipe information based on the nutritional requirements and nutritional information to obtain the desired target recipe information, which serves as the menu generated based on the first agent, the second agent, and the third agent.

[0007] According to an exemplary embodiment of the present invention, obtaining user input information includes: obtaining at least one of text information, voice information, and image information input by the user through dialogue and / or input method, as user input information; and / or, parsing the input information to determine user demand information and dining scenario information, including: converting the voice information in the input information into text information and aligning the timestamps, extracting semantic feature information from the image information in the input information, and using only the text information in the input information, the parsed text information and its timestamps, and the parsed semantic feature information as user demand information.

[0008] According to an exemplary embodiment of the present invention, based on the recipe demand information and the dining scenario information, supplementary information is determined using RAG technology, including: identifying whether a target scenario is involved based on the recipe demand information and the dining scenario information; the target scenario includes at least one of the following scenarios: festivals, health, personalized creativity, and ingredient constraints; if the target scenario is identified, a pre-built local knowledge base is searched using RAG technology to obtain search results; the pre-built local knowledge base includes at least one of the following information: cuisine culture, nutritional balance, festival diet, and ingredient alternatives; after evaluating the confidence level of the search results, redundant entries and entries that do not meet the target confidence level are filtered out to obtain target entries as supplementary information.

[0009] According to an exemplary embodiment of the present invention, generating recipe information based on the recipe requirement information, the dining scenario information, and the supplementary information includes: generating a user data requirement package conforming to preset rules based on the recipe requirement information, the dining scenario information, and the supplementary information; using a preset LLM model, determining the menu planning information required by the user based on the dining scenario information and recipe requirement information included in the user data requirements; the menu planning information includes: directional information and / or structural information; using a preset large voice model, generating preliminary menu information based on the menu planning information and the supplementary information; using a preset evaluation model, evaluating and adjusting the preliminary menu information to obtain the recipe information; the recipe information includes: names and quantities of main and auxiliary ingredients, cooking steps and techniques, and seasoning suggestions.

[0010] According to an exemplary embodiment of the present invention, determining the nutritional information of the recipe information includes: parsing the nutrient content contained in the amount of each ingredient in the recipe information according to a preset ingredient-nutrient mapping table; thereby obtaining the nutrient content contained in the amount of all ingredients in the recipe information as the nutritional information of the recipe information; and / or optimizing the recipe information according to the nutritional requirements information and the nutritional information to obtain the desired target recipe information includes: executing a preset optimization algorithm based on the nutritional requirements information and the user's historical dietary records to optimize the nutritional information to obtain optimized nutritional information; and adjusting the recipe information based on the optimized nutritional information to obtain the desired target recipe information.

[0011] According to an exemplary embodiment of the present invention, the method further includes: collecting user feedback information based on the target recipe information, collecting user health information, and user preference information; generating user profile information based on the accumulated collected feedback information, health information, and preference information; and cumulatively optimizing the recipe information based on the profile information to further obtain the required target recipe information, which serves as a menu further generated based on the first intelligent agent module, the second intelligent agent module, and the third intelligent agent module.

[0012] As a second aspect of the present invention, the present invention provides a menu generation device based on multiple intelligent agents, comprising: a first intelligent agent module, configured to acquire user input information; and parse the input information to determine user demand information and dining scenario information; the user demand information includes: recipe demand information and nutritional demand information; a second intelligent agent module, configured to determine supplementary information using RAG technology based on the recipe demand information and the dining scenario information; and generate recipe information according to the recipe demand information, the dining scenario information, and the supplementary information; and a third intelligent agent module, configured to determine the nutritional information of the recipe information; and optimize the recipe information according to the nutritional demand information and the nutritional information to obtain the desired target recipe information, which serves as the menu generated based on the first intelligent agent module, the second intelligent agent module, and the third intelligent agent module.

[0013] As a third aspect of the present invention, the present invention provides a terminal, comprising: the menu generation device based on multiple agents described above.

[0014] As a fourth aspect of the present invention, the present invention provides a storage medium comprising a stored program, wherein, when the program is executed, the device on which the storage medium is located executes the above-described multi-agent-based menu generation method.

[0015] As a fifth aspect of the present invention, the present invention provides a computer program that, when executed by a processor, implements the steps of the multi-agent-based menu generation method described above.

[0016] The beneficial effects of this invention are: The method of this invention combines multimodal input user needs with multi-scenario constraints to generate recipes that meet users' personalized needs, health goals, and creative requirements. Through feedback mechanisms and continuous learning capabilities, it improves the accuracy, creativity, feasibility, and personalization of the generated results. As a result, it can quickly generate feasible creative recipes that meet individual tastes and take into account nutritional balance, greatly improving the user experience. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating an embodiment of the multi-agent-based menu generation method of the present invention; Figure 2 This is a flowchart illustrating an embodiment of the method of the present invention that utilizes RAG technology to determine supplementary information; Figure 3 This is a flowchart illustrating an embodiment of the method for generating recipe information according to the present invention; Figure 4This is a flowchart illustrating an embodiment of the method of the present invention for obtaining the desired target recipe information; Figure 5 This is a flowchart illustrating an embodiment of the method for updating the target recipe information according to the present invention; Figure 6 This is a schematic diagram of an embodiment of the multi-agent-based menu generation device of the present invention; Figure 7 This is a flowchart illustrating a method for generating personalized creative dishes based on a multi-agent architecture and targeting precise nutritional needs. Figure 8 This is a schematic diagram of the core business architecture of a personalized creative dish generation system based on a multi-agent architecture and oriented towards precise nutritional needs.

[0018] Among them, 100 is the first intelligent agent module, 200 is the second intelligent agent module, and 300 is the third intelligent agent module. Detailed Implementation

[0019] The embodiments of the present invention will be described in detail below, but the present invention can be implemented in many different ways as defined and covered by the claims.

[0020] Considering that the existing solutions cannot quickly generate executable creative recipes that both suit individual tastes and maintain nutritional balance, significantly impacting user experience, the available technical approaches for personalized recipe recommendations and generation mainly fall into the following categories: Retrieval and recommendation based on static recipe databases (e.g., Haussmann S, Seneviratne O, Chen Y, et al. FoodKG: A Semantics-Driven Knowledge Graph for Food Recommendation[M].2019.): Based on tags and content features, combined with collaborative filtering, matrix factorization, or lightweight knowledge graphs for sorting, existing recipes are pushed to users; some systems support inverted search and simple filtering based on keywords and ingredients.

[0021] Rule-driven nutritional meal planning (such as personalized and precise nutritional recipe recommendation methods and systems based on genetic algorithms): encodes dietary guidelines and intake thresholds into rule, linear programming, and integer programming models to provide meal plans that balance energy and macronutrients; the advantages are strong compliance and reproducibility, while the disadvantages are weak expression of taste and cultural preferences and difficulty in covering a large number of family scenarios.

[0022] The recipe generation and planning combined with generative large model (LLM), such as a healthy diet planning method and system based on multimodal fusion, mentions using multimodal parsing technology to parse food images, extract food names, and collect user health information to build user profiles. Then, based on the image parsing results and user profiles, a large model is used to generate candidate combinations of food ingredients. The advantage of this patented method is that it considers the user's nutritional needs and provides an idea of ​​using a large model to generate recommended food ingredients based on nutritional needs. However, it does not provide users with complete recipes and preparation methods. The patented method, system, and device for personalized recipe recommendation using a large-scale model and dual-generation mode collect catering data, construct a knowledge graph of recipes using a large-scale model, and then combine it with user profiles, using feature engineering and similarity calculation methods to generate a recommended list of recipes. Mathematical programming is then used to find the most suitable recipe for the user among the recommended recipe combinations. This patented method provides an approach to constructing a knowledge graph using catering data. However, the recommended recipes are limited to those included in the pre-constructed knowledge graph and cannot provide recipes that meet user needs, taste preferences, and dietary restrictions. A smart recipe generation method and smart cooking appliances based on an LLM large-scale model employ a two-stage interactive generation mechanism based on a large-scale model. First, an original list is generated for user confirmation and modification. Then, the large-scale model generates cooking steps and continuously modifies the "user habit file" based on the user's editing history. This has certain advantages in habit adaptation, but if the user does not know how to cook, the modification of the main and auxiliary ingredient list in the first step becomes meaningless.

[0023] Overall, these existing studies and related solutions tend to focus on "personalization and nutritional optimization within existing recipe libraries." There is a lack of a comprehensive approach that can meet users' precise nutritional needs, consider their multiple requirements regarding "special scenarios, limited ingredients, special preferences, dietary restrictions, etc.", and provide complete recipe execution solutions for users (even beginners with little cooking experience).

[0024] Therefore, the present invention proposes a menu generation method based on multi-agent technology, specifically a personalized creative dish generation method based on a multi-agent architecture oriented towards precise nutritional needs. By combining user needs from multimodal inputs with multi-scenario constraints, and through feedback mechanisms and continuous learning capabilities, it can quickly generate executable creative dish solutions that both meet personal tastes and take into account nutritional balance, thereby significantly improving the user experience.

[0025] As a first embodiment of the present invention, a menu generation method based on multiple agents is provided, such as... Figure 1 The diagram shows a flowchart of an embodiment of the method of the present invention. This multi-agent-based menu generation method is applied to generating menus based on multiple agents, wherein the multiple agents include a first agent, a second agent, and a third agent; in the solution of the present invention, as... Figure 1 As shown, the menu generation method based on multi-agent includes steps S110 to S130.

[0026] In step S110, the first intelligent agent acquires the user's input information and parses the input information to determine the user's needs and dining scenario information; the user's needs include: recipe needs and nutritional needs.

[0027] The nutritional needs target is calculated based on user vital signs information, including gender, height, weight, age, and physical activity level. The calculation formula can be found in the 2023 edition of the Chinese Dietary Guidelines for Nutrient Intake. Therefore, the application only requires users to fill out a form beforehand or provide their vital signs information through a conversation.

[0028] In step S120, the second intelligent agent determines supplementary information using RAG technology based on the recipe requirement information and the dining scenario information; and generates recipe information based on the recipe requirement information, the dining scenario information, and the supplementary information.

[0029] In step S130, the nutritional information of the recipe information is determined by the third intelligent agent; and the recipe information is optimized according to the nutritional requirements information and the nutritional information to obtain the required target recipe information, which serves as the menu generated based on the first intelligent agent, the second intelligent agent, and the third intelligent agent.

[0030] In the solution of this invention, the creative dish generation process is deeply linked with precise dietary needs. By analyzing the user's nutritional intake gaps and health goals, a personalized recipe solution that takes into account both nutritional balance and innovative expression is generated through intelligent agents, thereby improving the user experience.

[0031] In some implementations, step S110, obtaining user input information includes: obtaining at least one of the user's input information, such as text information, voice information, and image information, through dialogue and / or input methods, as user input information.

[0032] And / or, in step S110, the input information is parsed to determine the user's needs information and dining scenario information, including: converting the voice information in the input information into text information and aligning the timestamps, extracting semantic feature information from the image information in the input information, and using the text information in the input information, the parsed text information and its timestamps, and the parsed semantic feature information only as the user's needs information.

[0033] Figure 7This is a flowchart illustrating a method for generating personalized creative dishes based on a multi-agent architecture and tailored to precise nutritional needs. Figure 7 As shown, the overall workflow of a personalized creative dish generation system based on a multi-agent architecture and geared towards precise nutritional needs includes: Step 1: User Input: First, the user input phase utilizes a unified multimodal entry point. Users can submit text, voice, or images. The input is fed into the Creative Cuisine Restaurant Manager agent A1, which possesses multimodal understanding capabilities. Creative Cuisine Restaurant Manager agent A1 has built-in speech recognition and visual understanding capabilities. Speech is converted to text and timestamp-aligned via end-to-end ASR (such as a decoder based on a Transformer architecture). Images have semantic features extracted via a visual encoder, and then mapped to a unified embedding space (multimodal embedding) along with the text through cross-modal projection. Afterward, the parsed multimodal features, along with the original input, are written into the session context. The entire process does not require independent deployment of traditional Natural Language Processing (NLP) or Machine Vision (CV) services; instead, it utilizes the end-to-end capabilities of a Multimodal Large Language Model (MLLM) for parsing.

[0034] Here, "text" refers to the user's natural language input, which is entered into the system in text form. The unified embedding space means that data from different modalities, such as images, audio, or text, will have semantic features extracted through a dedicated encoder and then mapped into high-dimensional vectors with consistent dimensions; all modal vectors ultimately reside within the same vector space. Cross-modal semantic alignment can be achieved by calculating similarity among all modal vectors, which are then combined with the user's natural language input to form rich conversational context.

[0035] In the solution of this invention, through multimodal system interaction design, multiple input methods such as voice, text, and images are supported, which greatly reduces the user threshold and enables non-professional users to easily generate creative recipes.

[0036] In some implementations, the specific process of determining supplementary information using RAG technology based on the recipe demand information and the dining scenario information in step S120 is illustrated in the following exemplary description.

[0037] The following is combined with Figure 2 The flowchart shown is a schematic diagram of an embodiment of the method of the present invention that uses RAG technology to determine supplementary information. It further illustrates the specific process of determining supplementary information using RAG technology in step S120, including steps S210 to S230.

[0038] Step S210: Based on the recipe demand information and the dining scenario information, identify whether a target scenario is involved; the target scenario includes at least one of the following scenarios: festival, health, personalized creativity, and ingredient constraints.

[0039] Step S220: If the target scene is identified, the RAG technology is used to search the pre-built local knowledge base to obtain the search results; the pre-built local knowledge base includes at least one of the following information: cuisine culture, nutritional matching, festival diet, and food alternatives.

[0040] Step S230: After evaluating the confidence level of the search results, redundant entries and entries that do not meet the target confidence level are filtered out to obtain the target entries as supplementary information.

[0041] like Figure 7 As shown, the overall workflow of the personalized creative dish generation system based on a multi-agent architecture and geared towards precise nutritional needs also includes: Step 2: The Creative Cuisine Restaurant Manager AI Agent A1 receives user input, analyzes user needs, identifies the type of user dining scenario, and retrieves information from the locally constructed knowledge base based on Retrieval-Augmented Generation (RAG) technology to obtain supplementary knowledge related to user needs.

[0042] Step 21: Retrieve Enhanced Generation (RAG) knowledge base preparation.

[0043] During system startup, a local knowledge base is built, containing content such as culinary culture, nutritional balance, holiday diets, and ingredient alternatives. The FAISS vector database is used to store embedded documents; the index is generated by OpenAIembeddings or a multimodal encoder to support unified retrieval of text, images, and voice descriptions. A Retriever is configured for use by the Creative Cuisine Restaurant Manager agent A1 node. FAISS (Facebook AI Similarity Search) is an open-source vector retrieval engine developed by Meta (formerly Facebook), designed specifically for "efficient similarity search of massive vectors."

[0044] Step 22: Define and configure the Creative Cuisine Restaurant Manager agent A1.

[0045] Choose a multimodal LLM (such as GPT-4o, Gemini, Claude 3 Opus) and connect it through LangGraph's tool interface. Define the role and objectives of the Creative Cuisine Restaurant Manager agent A1: responsible for parsing user input, identifying scenarios, retrieving supplementary knowledge, and generating structured requirement packages. Configure environment variables (API Key of the large model, model endpoints) and external tools (RAG retrieval, timestamp generator, etc.).

[0046] Step 23: State modeling of the Creative Cuisine Restaurant Manager agent A1 (State definition).

[0047] The TypedDict model is used to describe the state fields of the restaurant manager's agent, including user input, dining scenario, parsed user needs, supplementary knowledge retrieved by RAG, constraints, JSON output template, summary, and timestamp. These state fields are the sole carriers of information transmission.

[0048] Step 24: Design the work nodes and task flow of the Creative Dishes Restaurant Manager AI agent A1.

[0049] The Plan node parses user input and generates a preliminary task plan, calling the model to identify whether it involves scenarios related to holidays, health, free creativity, or food constraints.

[0050] Act node (i.e., action or execution node): If a constraint or menu requirement is detected, the RAG retrieval tool is invoked to obtain supplementary information from the knowledge base; if the input contains images or voice, it is first converted to text by a multimodal encoder before retrieval.

[0051] Think node (i.e., reflection node): Summarizes and assesses the confidence level of the search results, and filters out redundant or low-confidence entries.

[0052] The Finalize node (i.e., the integration node) integrates requirements, scenarios, constraints, supplementary knowledge, trusted sources, and timestamps to generate a "user requirement data package" that conforms to the JSON Schema, and updates the status.

[0053] Each node is essentially a function, invoking the LLM to complete tasks by setting a prompt word for each node. In LangGraph, node flow is defined using `add_edge`: from plan to act (tool call), then to think (reflection and summary), and finally to finalize (generating the final output). When an act node fails to trigger the RAG retrieval tool or lacks sufficient information, it reverts to the plan via a conditional edge for retry. The result of each step is written to a checkpointer to support recovery and tracing.

[0054] Step 25, Output Results Once the finalize node is complete, it outputs structured JSON (containing requirements, scenarios, constraints, supplementary knowledge, trusted sources, and timestamps), writes it to the state graph, and triggers the downstream agent (i.e., chef agent A2). Simultaneously, it generates a dialogue summary and displays it in the front-end window, realizing a multi-turn, memory-based intelligent restaurant management workflow.

[0055] In this invention, a creative recipe generation scheme based on a multi-agent architecture is proposed. It utilizes a large language model (LLM) and external tool calls, combined with user needs and multi-scenario constraints, to generate recipes that meet users' personalized needs, health goals, and creative requirements, thereby improving the user experience.

[0056] In some implementations, the specific process of generating menu information based on the menu requirement information, the dining scenario information, and the supplementary information in step S120 is illustrated in the following exemplary description.

[0057] The following is combined with Figure 3 The flowchart of an embodiment of the method of the present invention for generating recipe information is shown below. It further illustrates the specific process of generating recipe information in step S120, including steps S310 to S340.

[0058] Step S310: Based on the recipe requirement information, the dining scenario information, and the supplementary information, generate a user data requirement package that conforms to preset rules.

[0059] Step S320: Using a preset LLM model, based on the dining scenario information and menu requirement information included in the user data requirements, determine the menu planning information required by the user; the menu planning information includes: directional information and / or structural information.

[0060] Step S330: Using a preset large voice model, preliminary menu information is generated based on the menu planning information and the supplementary information.

[0061] Step S340: Using a preset evaluation model, the preliminary menu information is evaluated and adjusted to obtain recipe information; the recipe information includes: the names and quantities of main and auxiliary ingredients, cooking steps and techniques, and seasoning suggestions.

[0062] like Figure 7 As shown, the overall workflow of the personalized creative dish generation system based on a multi-agent architecture and geared towards precise nutritional needs also includes: Step 3: Chef AI A2 receives the "user demand data package" generated by Creative Cuisine Restaurant Manager AI A1 and generates creative dishes: Based on user demand, supplementary knowledge and dining scenario, it generates a complete and executable creative recipe (including a list of main and auxiliary ingredients, ingredient quantities, cooking steps, seasoning suggestions and cooking techniques).

[0063] Step 31: Receive input and define the status fields of the chef agent A2.

[0064] Define the state fields of the chef agent, including user requirements, dining scenario, constraints, supplementary knowledge, recipe draft, and timestamp. Receive the "user data requirement package" output by the Creative Cuisine Restaurant Manager agent A1 and map its content to the state fields for storage.

[0065] Step 32: Configure the large model and design the work nodes and task flow of the chef agent A2.

[0066] Given that generating creative dishes is a complex task combining structured long text generation with multi-constraint reasoning, it requires logically consistent "executable recipe design" under multi-dimensional constraints (nutritional goals, health restrictions, ingredient constraints, flavor preferences, scenario requirements, etc.). The chef agent A2 is configured with high-performance large models such as GPT-5, Claude 3.5 Sonnet, or Qwen2-72B, and model access is achieved by calling large model APIs.

[0067] The work nodes and task flow of the chef agent A2 are set as follows: The first step is the planning stage (Plan node): set the prompt word Prompt, call the configured large model LLM, and determine the overall direction and structure of the creative dishes based on the input scene type and nutritional constraints, such as "festival fusion dishes", "low-fat and high-protein healthy meals", "creative dishes with ingredient substitutions", etc.

[0068] The second step is the execution generation phase (Act node): This involves calling a pre-configured high-performance large language model (such as GPT-5, Claude 3.5 Sonnet, or Qwen2-72B) to create a recipe based on the planned content. The model combines scene information, supplementary knowledge, and nutritional limitations to generate a complete creative dish plan, including the dish name, a list of main and auxiliary ingredients, ingredient quantities, cooking steps, seasoning suggestions, and tips.

[0069] The third step is reflection and evaluation (Think node): After generating the initial draft, A2 performs a self-review, sets the working prompt word "Prompt," and calls the large model to check the initial draft content for logical flaws in accordance with the constraints and health standards mentioned by the user, such as ingredient conflicts or missing key steps. If the large model review result is unsatisfactory, the system will automatically transfer the task to the second step execution node (Act node) for regeneration.

[0070] The fourth step is the finalization stage: When the reflection results meet the requirements, the process enters the finalization stage. Chef AI A2 integrates all generated information into a structured output, forming a clear recipe draft, including key fields such as dish name, main and auxiliary ingredient list, ingredient quantities, cooking steps, seasoning suggestions, and tips, along with a timestamp. It also generates a short "Chef's Thought Summary" as memory storage for the current session, for subsequent agent calls.

[0071] In the solution of this invention, user personalized preferences are supported as system constraints to guide the intelligent agent to balance user personality and nutritional needs, realize creative dish discovery and recommendation under complex constraints, and improve user experience.

[0072] In some implementations, step S130, determining the nutritional information of the recipe information, includes: parsing the nutrient content contained in the amount of each ingredient in the recipe information according to a preset ingredient-nutrient mapping table; thereby obtaining the nutrient content contained in the amount of all ingredients in the recipe information, which is used as the nutritional information of the recipe information.

[0073] And / or, in step S130, the specific process of optimizing the recipe information based on the nutritional requirements information and the nutritional information to obtain the required target recipe information is described in the following exemplary description.

[0074] The following is combined with Figure 4 The flowchart of an embodiment of the method of the present invention for obtaining the required target recipe information is shown below. The specific process of obtaining the required target recipe information in step S130 is further explained, including steps S410 to S420.

[0075] Step S410: Based on the nutritional needs information and the user's historical dietary records, execute a preset optimization algorithm to optimize the nutritional information and obtain optimized nutritional information; wherein, the preset optimization algorithm is, for example, the Pareto optimization algorithm.

[0076] Step S420: Based on the optimized nutritional information, adjust the recipe information to obtain the desired target recipe information.

[0077] like Figure 7 As shown, the overall workflow of the personalized creative dish generation system based on a multi-agent architecture and geared towards precise nutritional needs also includes: Step 4: After obtaining the creative recipe generated by Chef Agent A2, Nutritionist Agent A3 calculates the nutrient content of the recipe based on the ingredients and portion sizes, and calculates the user's required nutritional goals based on the user's physical characteristics (age, gender, height, weight, and physical activity level). It also needs to understand from the user's original input whether adjustments or optimizations to the recipe's nutrients are necessary.

[0078] Step 41: Receive input and set the status fields of the Nutrition and Gourmet Smart Agent A3.

[0079] Define the state fields of the Nutritionist agent A3, including recipe draft fields (dish name, main and auxiliary ingredients, ingredient quantities, cooking steps, seasoning techniques), nutrient analysis result fields, user individual information fields (age, gender, height, weight, activity level), user nutrient goals, adjusted recipe (dish name, main and auxiliary ingredients, ingredient quantities, cooking steps, seasoning techniques), and a timestamp. The Nutritionist agent A3 automatically receives creative recipes output by the Chef agent A2 through the LangGraph state transition mechanism and maps them to the recipe draft fields.

[0080] Step 42: Configure the tool and model interface.

[0081] The nutrition and gourmet food expert agent A3 needs to call multiple computing modules, therefore the following interfaces are registered in the LangGraph tool layer: Nutrient calculation tool: By constructing a standard ingredient-nutrient mapping table, it analyzes the nutrient content contained in the amount of each ingredient in the recipe, and summarizes the total energy, protein, fat, carbohydrate and micronutrient values.

[0082] User nutrition goal calculation tool: Based on individual user characteristics, this tool uses predefined calculation functions to calculate the Recommended Daily Intake (RNI) of energy and nutrients. Specifically, based on the user's characteristics (age, gender, weight, height, physical activity level, etc.), it estimates the Estimated Energy Requirement (EER), Recommended Nutrient Intake (RNI), and Tolerable Upper Intake Level (UL) according to the calculation formula proposed in the "Chinese Dietary Reference Intakes (2023 Edition)".

[0083] The predefined calculation functions mentioned above can be the nutrient calculation formulas mentioned in the "2023 Edition of Chinese Dietary Reference Intakes" published by the Chinese Nutrition Society. For example: EER=(k1W+k2H-k3)×PAL+k4×PAL; EER represents the user's nutritional goals, W represents the user's weight, H represents the user's height, PAL represents the user's physical activity level, and k1, k2, k3, and k4 are calculation coefficients set for different user groups.

[0084] For example: Population grouping - Energy requirement calculation formula - Formula explanation.

[0085] (1) Age group of 1-3 years old: Male: EER=(0.118W+3.59H-1.55)×PAL+1.01×PAL; Female: EER = (0.127W + 2.94H - 1.20) × PAL + 1.01 × PAL; W: Weight, in kg. H: Height, in m. S: Gender, male = 0, female = 1. PAL: Physical activity level.

[0086] (2) Age group of 3-10 years old: Male: EER=(0.0632W+1.31H+1.28)×PAL+1.01×PAL; Female: EER=(0.0666W+0.878H+1.46)×PAL+1.01×PAL.

[0087] (3) People aged 10 to 17: Male: EER=(0.0651W+1.11H+1.25)×PAL+1.01×PAL; Female: EER=(0.0393W+1.04H+1.93)×PAL+1.01×PAL.

[0088] (4) People aged 18 to 49: EER=(14.52W-155.88S+565.79)×PAL.

[0089] (5) People aged 50-64: EER=(14.52W-155.88S+565.79)×PAL×0.95.

[0090] (6) People aged 65 to 74: EER=(14.52W-155.88S+565.79)×PAL×0.925.

[0091] (7) People aged ≥75 years: EER=(14.52W-155.88S+565.79)×PAL×0.90.

[0092] (8) Pregnant women in early pregnancy: EER=(14.52W-155.88+565.79)×PAL.

[0093] (9) Women in the second trimester: EER=(14.52W-155.88+565.79)×PAL+250.

[0094] (10) Late pregnancy group: EER=(14.52W-155.88+565.79)×PAL+400.

[0095] (11) Lactating mothers: EER=(14.52W-155.88+565.79)×PAL+400.

[0096] Recipe nutrient content optimization and adjustment tool: Based on the user's historical dietary records and individual nutrient requirements, it executes the Pareto optimization algorithm to achieve dynamic balance adjustment of the nutrient content of creative recipes.

[0097] Step 43: Work node design and task flow.

[0098] The task flow of the nutrition and gourmet intelligence agent A3 mainly consists of four nodes: The first is the tool call node (Act-1 node): it calls the nutrient calculation tool, parses the A2 recipe draft content and calculates the nutrient content, and stores it in the nutrient analysis result status field.

[0099] The second is the tool call node (Act-2 node): it calls the user nutrient target calculation tool, calculates the individual nutrient requirement target based on the user's physical condition information, and stores it in the user nutrient target field.

[0100] The third node is the Planning node: It sets a prompt word (Prompt), calls the large model to perform semantic judgment, and identifies whether the user's original input contains the intent of "dynamic nutritional adjustment" (e.g., "optimize recipes based on my historical diet records"). If it determines "no optimization needed," the LangGraph's conditional edges will directly jump to downstream nodes for output integration. If it determines "optimization needed," the system enters the Optimize node, calls the recipe nutrient content optimization and adjustment tool, calculates the total amount of nutrients ingested in the user's historical diet records, and then calculates the difference between this and the user's nutrient target, obtaining the deviation value between a single nutrient and the recommended intake. Then, it uses a Pareto multi-objective optimization algorithm to dynamically adjust the recipe portion size. For example, if there is a gap in the user's main macronutrient intake target, the overall portion size of the creative recipe can be adjusted to meet the nutritional gap; if there is an excess, the portion size can be reduced.

[0101] The fourth node is the Finalize node: it integrates all nutritional calculation results and recipe structure information to generate the final creative recipe. Output fields include the dish name, main and auxiliary ingredient list, ingredient quantities, cooking steps, seasoning suggestions, nutrient content, and timestamp. LangGraph performs data consistency verification before output and writes the final result to the global state graph for subsequent health assessment or recommendation systems to use, realizing an intelligent closed loop from creative recipe generation to nutritional optimization.

[0102] Step 5, Output the results: Deliver the final recipe to the user.

[0103] In step 5, the system transforms the creative recipes optimized by the nutritionist AI A3 from internally stored structured data (including dish name, main and auxiliary ingredient list, ingredient quantities, cooking steps, seasoning suggestions, nutrient content, and timestamps) into human-readable text format. This process is handled by a Large Language Model (LLM), which performs formatting and language rendering. Based on a preset output template, the model sequentially transcribes the data fields into natural language descriptions, generating a clear and well-formatted recipe text, which is then displayed in the user's dialog window.

[0104] In this invention, multimodal input, feedback mechanisms, and continuous learning capabilities further enhance the accuracy, creativity, executability, and personalization of the generated results. Compared to related solutions, this invention does not rely on a static recipe library but can dynamically generate unique and creative recipes that meet users' nutritional needs based on real-time user input and multiple constraints.

[0105] In some embodiments, the multi-agent-based menu generation method of the present invention further includes: a process of updating the target recipe information. The following is combined with Figure 5 The schematic diagram shown is a flowchart of an embodiment of the method of the present invention for updating the target recipe information, which further illustrates the specific process of updating the target recipe information, including steps S510 to S530.

[0106] Step S510: Collect user feedback information based on the target recipe information, collect user health information, and user preference information.

[0107] Step S520: Based on the accumulated feedback information, health information, and preference information, generate user profile information.

[0108] Step S530: Based on the portrait information, the recipe information is cumulatively optimized to further obtain the required target recipe information, which serves as the menu further generated based on the first intelligent agent module, the second intelligent agent module, and the third intelligent agent module.

[0109] like Figure 7 As shown, the overall workflow of the personalized creative dish generation system based on a multi-agent architecture and geared towards precise nutritional needs also includes: Step 6, Memory Update: Record user input, constraints, tool calls and feedback, update user preferences and long-term memory, and improve subsequent generation results.

[0110] The system collects, processes, and writes all data from this interaction through a multi-layered memory update mechanism. This process is automatically triggered by the agent at the task's end, and multi-level memory updates and synchronization are achieved through pipelined operations. First, the system calls the session tracking module to summarize the input content, system parsing, tool call logs, and user feedback generated in this task, and generate a structured interaction summary. Subsequently, this data is written to three types of memory storage based on semantic importance and temporal characteristics: short-term memory saves the dialogue summary and task status in real time through caching; working memory records the key contextual information of the current recipe; and long-term memory updates the user's preferences, health goals, and behavioral patterns through vectorization and relational storage. During the update process, the system performs memory merging and vector recalculation operations to ensure a weight balance between historical preferences and new information. Old data is dynamically downweighted according to a time decay coefficient, allowing long-term memory to gradually converge to the user's latest behavioral patterns. Application Scenario Examples

[0111] Example 1: Theme-Driven Scene Example The user inputs into the system: "I want to cook a lucky dish for my family gathering during the Spring Festival, something that the elderly and children can enjoy, with a light flavor." Upon receiving the text, the Creative Cuisine Restaurant Manager agent A1 initiates the semantic parsing node. Based on its natural language understanding capabilities using a large language model, Creative Cuisine Restaurant Manager agent A1 identifies the input as belonging to a "theme-driven scenario" and generates a structured result: {"scene": "Spring Festival family gathering", "theme": "lucky dish", "taste": "light", "audience": "family members (elderly, children)", "health_target": "low salt, low fat", "timestamp": "2025-01-23 19:45:00"}. Subsequently, Creative Cuisine Restaurant Manager agent A1 calls the Retrieval Enhanced Generation (RAG) module to retrieve supplementary knowledge related to "lucky Spring Festival dish" from the culinary culture and festival food knowledge base, such as "ingredients symbolizing reunion", "dish names symbolizing festivals", and "healthy cooking methods suitable for the elderly and children," and then passes the results to the chef agent A2.

[0112] After receiving the structured data packet, Chef Agent A2 registers its state fields and establishes an execution context in LangGraph. The Planning node extracts the keywords "Spring Festival," "auspicious," "light," and "elderly and children," and calls the large model to generate a recipe planning instruction: "Please design a festive dish that is auspicious, light, healthy, and suitable for family sharing." The Execution node calls GPT-5 to generate a draft recipe, and the output is as follows: Dish Name: "Jade Belt Auspicious Roll"; Main Ingredients: 150g shrimp, 2 sheets of tofu skin, 50g carrot; Additional Ingredients: 1 egg white, 3ml sesame oil; Steps: 1. Mince the shrimp; 2. Roll the shrimp in tofu skin and steam until cooked; 3. Drizzle with a small amount of sesame oil. The Think node checks if the low-salt, low-fat requirements are met. If the oil content exceeds the limit, it automatically reflows and regenerates. The Finalize node outputs a structured recipe data package and writes it to the state graph for downstream use.

[0113] After initialization, the nutritionist AI A3 calls the nutrition calculation tool to analyze the recipe's nutrients: total energy 320 kcal, protein 28g, fat 8g, sodium 380mg. The system recognizes that the user has no intention to optimize. The final draft node integrates and outputs: dish name, ingredients, steps, seasoning suggestions, nutrient data and timestamp, generating the themed recipe "Jade Belt Auspicious Roll (Light and Healthy Version)".

[0114] Example 2: Food Ingredient Constraint Scenario (limit) The user inputs the command: "I only have eggs, tofu, and tomatoes left at home. Please help me make a healthy and creative dish using these ingredients." After receiving the text, the Creative Cuisine Restaurant Manager AI agent A1 initiates the semantic parsing process. Based on the semantic recognition capabilities of a multimodal language model, Creative Cuisine Restaurant Manager AI agent A1 determines that the request belongs to a limited ingredient scenario and extracts the keywords "eggs, tofu, tomatoes". Subsequently, Creative Cuisine Restaurant Manager AI agent A1 outputs the structured result: {"scene": "family fast food scenario", "constraint": "limited ingredients (eggs, tofu, tomatoes)", "taste": "light", "goal": "nutritional balance, quick preparation", "timestamp": "2025-02-08 18:00:00"}. The creative cuisine restaurant manager agent A1 calls the Retrieval Enhancement Generation (RAG) module to retrieve cooking knowledge related to these three ingredients from the family recipe and protein pairing database, such as "protein complementarity," "tomato and tofu flavor fusion," and "less oil stir-frying techniques," and then passes the supplementary knowledge to the chef agent A2.

[0115] After receiving the structured data packet, the chef agent A2 establishes the task state and loads supplementary knowledge in LangGraph. The planning node (Plan) generates the instruction: "Please design a low-oil, nutritionally balanced, and family-style creative dish based on three ingredients: eggs, tofu, and tomatoes." The execution node (Act) calls the GPT-5 model to generate the recipe. Example output: Dish Name: "Tomato Tofu Scrambled Eggs"; Main Ingredients: 2 eggs, 150g firm tofu, 2 tomatoes; Seasonings: 5ml olive oil, a little chopped green onion; Steps: 1. Sauté the tomatoes until they release their juices; 2. Add the tofu and simmer over low heat; 3. Pour in the beaten eggs and scramble until set. Seasoning Suggestions: Use less salt and oil to maintain the original sweet flavor.

[0116] The Think node validates the recipe logic and ingredient constraints to ensure no extra ingredients are introduced. If a violation is detected (such as "thickening with starch" or "seasoning with sugar"), the LangGraph conditional edges automatically flow back to the generating node for re-creation. After validation, the Finalize node generates a structured recipe data package, including the dish name, a list of main and auxiliary ingredients, ingredient quantities, steps, seasoning suggestions, and a timestamp.

[0117] Nutritionist AI A3 takes over the output from Chef AI A2, calling a nutrition calculation tool to calculate the recipe's nutritional data: 280 kcal of energy, 22g of protein, 9g of fat, 8g of carbohydrates, and 320mg of sodium. After determining that the "nutritional optimization" requirement has not been triggered, the system directly enters the finalization stage, integrating the nutritional results with the recipe information to generate the final output: "Tomato Tofu Scrambled Eggs (Limited Ingredient Healthy Version)". The system displays the complete recipe, nutrition labels, and a generated summary, achieving a closed loop of intelligent cooking and nutritional assessment under limited ingredient constraints.

[0118] Example 3: Health Goal-Driven Scenario (health) Example The user inputs the command: "I'm currently working out to build muscle and would like to eat high-protein, low-fat dishes. Please recommend a suitable home-style dish." Upon receiving the text, the Creative Cuisine Restaurant Manager agent A1 initiates a semantic parsing node. Based on its natural language understanding capabilities using a large language model, Creative Cuisine Restaurant Manager agent A1 identifies the request as belonging to a health-goal-driven scenario. Through intent recognition and semantic extraction, Creative Cuisine Restaurant Manager agent A1 generates a structured result: {"scene": "fitness diet", "goal": "muscle building, high protein", "constraint": "low fat", "taste": "light", "time": "dinner", "timestamp": "2025-02-09 19:30:00"}. Subsequently, the creative cuisine restaurant manager agent A1 invokes the Retrieval Enhancement Generation (RAG) module to retrieve relevant knowledge from the sports nutrition and fitness diet knowledge base, such as "high-protein low-fat recipes," "high-quality protein ingredient combinations," and "cooking oil removal techniques," and packages the supplementary knowledge and nutritional principles to transmit to the chef agent A2.

[0119] After receiving the data packet, the chef agent A2 establishes the task state and loads supplementary knowledge in the LangGraph framework. The planning node (Plan) generates the execution instruction: "Based on the goal of building muscle with a high-protein, low-fat diet, design a nutritionally balanced, light-tasting dish suitable for a fitness dinner." The execution node (Act) calls the GPT-5 model to generate a draft recipe. Example output: Dish Name: Steamed Chicken Breast with Vegetable Platter; Main Ingredients: 180g chicken breast, 80g broccoli, 50g carrot; Seasonings: 3ml olive oil, 2g sea salt; Steps: 1. Marinate the chicken breast for 10 minutes; 2. Slice the chicken after steaming; 3. Arrange the chicken breast on a plate with blanched vegetables; Seasoning Suggestions: Use less oil and salt to preserve the original flavor.

[0120] The Think node checks the recipe logic and health constraints, such as fat content, cooking methods, and protein ratio. If it detects that the recipe does not meet the low-fat requirements, it automatically flows back to the Act node for rewriting. The Finalize node integrates the validated results into a structured recipe data package and writes it into the state graph.

[0121] After receiving the recipe, the nutritionist AI A3 calls upon a nutrition calculation tool to analyze the dish's nutrients: 310 kcal of energy, 45g of protein, 6g of fat, 8g of carbohydrates, and 360mg of sodium. It then calls the user's nutrition goal calculation module to compare this to the user's daily intake standards for muscle building. If the system recognizes an optimization intent (such as "can the protein ratio be increased?"), it triggers an optimization node (Optimize), adjusting the weights of protein and fat goals using the Pareto algorithm, suggesting increasing the chicken breast to 200g and reducing fat. The final output is "Steamed Chicken Breast with Vegetable Platter (High-Protein Fitness Version)," along with nutritional data, ingredients, cooking steps, and a timestamp.

[0122] Example 4: Free Scenario Example The user inputs the command: "I'm in a great mood today and want to try a fresh, creative, and visually appealing dish, perfect for taking photos and posting on social media." Upon receiving the input, the Creative Cuisine Restaurant Manager AI agent A1 initiates the semantic parsing node. Based on its large language model's semantic understanding capabilities, Creative Cuisine Restaurant Manager AI agent A1 recognizes that the input has no specific health or ingredient restrictions, classifying it as a free creative scenario. The system extracts keywords and models the scenario, generating a structured result: {"scene": "daily", "theme": "creative dish", "taste": "neutral to light", "goal": "innovation and aesthetics", "constraint": "no special restrictions", "timestamp": "2025-02-10 19:10:00"}. Subsequently, Creative Cuisine Restaurant Manager AI agent A1 invokes the Retrieval Enhancement Generation (RAG) module to retrieve supplementary knowledge such as "visually appealing plating," "fusion cuisine style," and "family-style creative cuisine trends" from the modern catering creative database, and then passes this information to the Chef AI agent A2.

[0123] The chef agent A2 establishes its state and loads supplementary knowledge within the LangGraph framework. The Plan node generates an execution prompt: "Based on the user's desire for a pleasant mood, creativity, and aesthetics, design a visually appealing, simple, and uniquely flavorful home-style dish." The Act node calls the GPT-5 model to generate and outputs a sample initial recipe draft. Dish Name: "Colorful Vegetable Garden Rolls"; Main Ingredients: 4 purple cabbage leaves, 50g shredded carrots, 50g shredded cucumbers, 40g shredded chicken breast; Side Ingredients: 30ml yogurt sesame sauce; Steps: 1. Blanch the purple cabbage leaves and set aside; 2. Roll the vegetables and shredded chicken into the leaves; 3. Serve with yogurt sesame sauce; It is recommended to arrange the vegetables in a flower shape and garnish with mint leaves.

[0124] The Think node checks whether the recipe structure conforms to the free creative theme, such as visual presentation, color scheme, and operational feasibility. If the recipe is found to be visually unsatisfactory, the system uses conditional edges to backflow to the Generate node for optimization. The Finalize node integrates the final recipe and generates structured output, which is written to the state graph for use by the Nutritionist agent A3.

[0125] The nutritionist AI A3 executes the nutrition calculation node, automatically analyzing the recipe's nutrients: 240 kcal of energy, 18g of protein, 7g of fat, and 15g of carbohydrates. Since the user has no health constraints, the system determines that no optimization is needed and directly outputs the final recipe.

[0126] This invention proposes a creative recipe generation method based on an agent architecture, comprising the following steps: Step 1, receiving multi-dimensional user input information and automatically parsing the user's needs and identifying the user's dining scenario type through the agent; Step 2, obtaining relevant supplementary knowledge based on retrieval enhancement technology (RAG) according to the user's needs; Step 3, generating a creative recipe containing a list of main and auxiliary ingredients, ingredient quantities, cooking steps, seasoning suggestions, and cooking techniques through the agent agent based on the user's needs, dining scenario, and supplementary knowledge; Step 4, calculating the nutrient content of the creative recipe and optimizing it according to the user's nutritional goals to obtain an executable creative recipe scheme that meets the user's personalized needs and nutritional balance goals; Step 5, recording and utilizing user preferences, interaction feedback, health data, and other information through long-term memory files, and characterizing user profiles to continuously optimize the generated creative recipes, providing personalized recommendations and significantly improving the user experience.

[0127] The technical solution of this embodiment combines user needs from multimodal input with constraints from multiple scenarios to generate recipes that meet users' personalized needs, health goals, and creative requirements. Through feedback mechanisms and continuous learning capabilities, the accuracy, creativity, feasibility, and personalization of the generated results are improved. As a result, feasible and creative recipes that meet individual tastes and take into account nutritional balance can be generated quickly, greatly improving the user experience.

[0128] According to a second embodiment of the present invention, a multi-agent-based menu generation apparatus corresponding to the multi-agent-based menu generation method is also provided. See also Figure 3The diagram shows a structural schematic of an embodiment of the device of the present invention. This multi-agent-based menu generation device may include: a first agent module 100, a second agent module 200, and a third agent module 300.

[0129] The first intelligent agent module 100 is used to acquire user input information and parse the input information to determine the user's needs and dining scenario information. The user's needs include recipe requirements and nutritional requirements. The specific functions and processing of the first intelligent agent module 100 are described in step S110.

[0130] The second intelligent agent module 200 is used to determine supplementary information based on the recipe requirement information and the dining scenario information using RAG technology; and to generate recipe information based on the recipe requirement information, the dining scenario information, and the supplementary information. For the specific functions and processing of this second intelligent agent module 200, please refer to step S120.

[0131] The third intelligent agent module 300 is used to determine the nutritional information of the recipe information; and optimize the recipe information according to the nutritional requirements information and the nutritional information to obtain the required target recipe information, which serves as the menu generated based on the first intelligent agent module, the second intelligent agent module, and the third intelligent agent module. The specific functions and processing of the third intelligent agent module 300 are described in step S130.

[0132] Figure 8 This is a schematic diagram of the core business architecture of a personalized creative dish generation system based on a multi-agent architecture and oriented towards precise nutritional needs. The present invention proposes a creative dish generation scheme based on a multi-agent architecture. Figure 8 This is the core business architecture diagram of the solution, which realizes task orchestration, state transition, and conditional jump among multiple agents. The agent framework selected in this invention is LangGraph; however, other agent frameworks such as LangChain, SemanticKernel, and OpenAI Agents SDK can also be used to implement the agent architecture. Figure 8 The illustrated personalized creative dish generation system based on a multi-agent architecture and designed for precise nutritional needs mainly includes the following three core agent modules and supporting mechanisms: Creative Dish Restaurant Manager Agent A1, Chef Agent A2, and Nutritionist Agent A3. Specifically, the Creative Dish Restaurant Manager Agent is the intelligent agent for the Creative Dish Restaurant; the Chef Agent is the intelligent agent for the Chef; and the Nutritionist Agent is the intelligent agent for the Nutritionist.

[0133] See Figure 8The example shown is the Creative Cuisine Restaurant Manager Intelligent Agent A1 module, which implements the following steps in the present invention: "Step 1: Receive multi-dimensional (text, voice, image) user input information, automatically parse the user's needs through the intelligent agent, and identify the user's dining scenario type" and "Step 2: Obtain relevant supplementary knowledge based on the user's needs using Retrieval Enhancement Generation (RAG) technology".

[0134] By engaging in dialogue with users, receiving and parsing user input, identifying user demand scenarios (such as theme-driven, ingredient-constrained, health-goal-driven, or freely generated), processing ambiguous or incomplete input, calling tools or triggering clarification when necessary, collecting complete user needs, then calling RAG tools to obtain supplementary knowledge, and finally distributing user needs and supplementary knowledge to chef agents.

[0135] See Figure 8 The example shown is the chef agent A2 module, which implements "Step 3: Based on user needs, dining scenarios and supplementary knowledge, generate a creative recipe containing a list of main and auxiliary ingredients, ingredient quantities, cooking steps, seasoning suggestions and cooking techniques through the agent agent".

[0136] Responsible for receiving user requests from restaurant managers, generating preliminary creative recipe drafts, including the creative dish name, main and auxiliary ingredient list, ingredient quantities, cooking steps, seasoning suggestions, and cooking techniques.

[0137] See Figure 8 The example shown is the Nutritional Food Expert AI Agent A3 module, which implements "Step 4: Calculate the nutrient content of the creative recipe, further optimize the recipe plan according to the user's nutritional needs through the AI ​​agent, obtain an executable creative recipe plan that meets the user's personalized needs and nutritional balance goals, and finally push it to the user."

[0138] It is responsible for calculating the nutrient content of creative recipes generated by chef agents and dynamically optimizing the recipes based on users' nutritional needs.

[0139] In the solution of this invention, the creative dish generation process is deeply linked with precise dietary needs. By analyzing the user's nutritional intake gaps and health goals, a personalized recipe solution that takes into account both nutritional balance and innovative expression is generated through intelligent agents, thereby improving the user experience.

[0140] Since the processing and functions implemented by the device in this embodiment are basically the same as the embodiments, principles and examples of the aforementioned methods, any details not covered in the description of this embodiment can be found in the relevant descriptions in the aforementioned embodiments, and will not be repeated here.

[0141] According to a third embodiment of the present invention, a terminal corresponding to a multi-agent-based menu generation device is provided, comprising: the multi-agent-based menu generation device described above.

[0142] Since the processing and functions implemented by the terminal in this embodiment are basically the same as the embodiments, principles and examples of the aforementioned device, any details not covered in this embodiment can be found in the relevant descriptions in the aforementioned embodiments, and will not be repeated here.

[0143] According to a fourth embodiment of the present invention, a storage medium corresponding to a multi-agent-based menu generation method is provided, the storage medium including a stored program, wherein the program controls the device where the storage medium is located to execute the multi-agent-based menu generation method described above during runtime.

[0144] Since the processing and functions implemented by the storage medium in this embodiment are basically the same as the embodiments, principles and examples of the aforementioned methods, any details not covered in this embodiment can be found in the relevant descriptions in the aforementioned embodiments, and will not be repeated here.

[0145] According to a fifth embodiment of the present invention, a computer program product corresponding to the multi-agent-based menu generation method is provided, comprising a computer program that, when executed by a processor, implements the steps of the multi-agent-based menu generation method described above.

[0146] Since the processing and functions implemented by the computer program product in this embodiment are basically corresponding to the embodiments, principles and examples of the aforementioned methods, any details not covered in the description of this embodiment can be found in the relevant descriptions in the aforementioned embodiments, and will not be repeated here.

[0147] In summary, it is readily understood by those skilled in the art that, without conflict, the aforementioned advantageous methods can be freely combined and superimposed.

[0148] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A menu generation method based on multi-agent systems, characterized in that, It is applied to menu generation based on multiple agents, wherein the multiple agents include a first agent, a second agent, and a third agent; The multi-agent-based menu generation method includes: The first intelligent agent acquires the user's input information and parses the input information to determine the user's needs and dining scenario information; the user's needs include: recipe needs and nutritional needs. The second intelligent agent determines supplementary information using RAG technology based on the recipe demand information and the dining scenario information; and generates recipe information based on the recipe demand information, the dining scenario information, and the supplementary information. The third intelligent agent determines the nutritional information of the recipe information; and optimizes the recipe information based on the nutritional requirements information and the nutritional information to obtain the required target recipe information, which serves as the menu generated based on the first intelligent agent, the second intelligent agent, and the third intelligent agent.

2. The menu generation method based on multi-agent technology according to claim 1, characterized in that, in, Obtain user input information, including: Use dialogue and / or input methods to obtain at least one of the user's input information, including text information, voice information, and image information, as the user's input information; And / or, The input information is parsed to determine the user's needs and dining scenario information, including: The voice information in the input information is converted into text information and the timestamp is aligned. Semantic feature information is extracted from the image information in the input information. The text information in the input information, the parsed text information and its timestamp, and the parsed semantic feature information are used only as the user's requirement information.

3. The menu generation method based on multiple agents according to claim 1 or 2, characterized in that, Based on the recipe demand information and the dining scenario information, supplementary information is determined using RAG technology, including: Based on the recipe demand information and the dining scenario information, identify whether a target scenario is involved; the target scenario includes at least one of the following scenarios: festival, health, personalized creativity, and ingredient constraints; If the target scene is identified, the RAG technology is used to search the pre-built local knowledge base to obtain the search results; the pre-built local knowledge base includes at least one of the following information: cuisine culture, nutritional balance, festival diet, and food alternatives; After evaluating the confidence level of the search results, redundant entries and entries that do not meet the target confidence level are filtered out to obtain the target entries as supplementary information.

4. The menu generation method based on multiple agents according to any one of claims 1 to 3, characterized in that, Based on the recipe requirement information, the dining scenario information, and the supplementary information, recipe information is generated, including: Based on the recipe demand information, the dining scenario information, and the supplementary information, a user data demand package that conforms to preset rules is generated; Using a pre-defined LLM model, based on the dining scenario information and menu requirement information included in the user data requirements, the menu planning information required by the user is determined; the menu planning information includes: directional information and / or structural information; Using a pre-defined large voice model, preliminary menu information is generated based on the menu planning information and the supplementary information; Using a preset evaluation model, the initial information of the menu is evaluated and adjusted to obtain recipe information; the recipe information includes: the names and quantities of main and auxiliary ingredients, cooking steps and techniques, and seasoning suggestions.

5. The menu generation method based on multiple agents according to any one of claims 1 to 4, characterized in that, in, Determining the nutritional information of the recipe includes: Based on a preset ingredient and nutrient mapping table, the nutrient content contained in the amount of each ingredient in the recipe information is analyzed; thus, the nutrient content contained in the amount of all ingredients in the recipe information is obtained, which serves as the nutritional information of the recipe information. And / or, The recipe information is optimized based on the nutritional requirements information and the nutritional information to obtain the desired target recipe information, including: Based on the nutritional needs information and the user's historical dietary records, a preset optimization algorithm is executed to optimize the nutritional information and obtain optimized nutritional information. Based on the optimized nutritional information, the recipe information is adjusted to obtain the desired target recipe information.

6. The menu generation method based on multiple agents according to any one of claims 1 to 5, characterized in that, Also includes: Collect user feedback based on the target recipe information, collect user health information, and collect user preference information; Based on the accumulated feedback information, health information, and preference information, a user profile is generated; Based on the profile information, the recipe information is cumulatively optimized to obtain the required target recipe information, which serves as the menu further generated based on the first intelligent agent module, the second intelligent agent module, and the third intelligent agent module.

7. A multi-agent menu generation apparatus that uses the multi-agent menu generation method as described in any one of claims 1 to 6 to generate menus, characterized in that, include: The first intelligent agent module is used to obtain user input information; The input information is then parsed to determine the user's needs and dining scenario. The user's needs information includes: recipe needs information and nutritional needs information; The second intelligent agent module is used to determine supplementary information based on the recipe demand information and the dining scenario information using RAG technology; and to generate recipe information based on the recipe demand information, the dining scenario information and the supplementary information. The third intelligent agent module is used to determine the nutritional information of the recipe information; and optimize the recipe information according to the nutritional requirements information and the nutritional information to obtain the required target recipe information, which serves as the menu generated based on the first intelligent agent module, the second intelligent agent module and the third intelligent agent module.

8. A terminal, characterized in that, include: The menu generation device based on multiple agents as described in claim 7.

9. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, it controls the device where the storage medium is located to execute the multi-agent-based menu generation method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the multi-agent-based menu generation method as described in any one of claims 1 to 6.