A recipe generation method and device, an electronic device, and a storage medium

CN122925429APending Publication Date: 2026-10-16NINGBO FOTILE KITCHEN WARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611109972.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-24
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

用户利用互联网菜谱平台或通用大语言模型生成的菜谱仅包含如“大火5分钟”或“烤至金黄”等难以实际操作的文本描述,无法与具体的设备硬件参数进行关联,无法实现一键烹饪

Benefits of technology

接收用户输入的多模态输入请求,将多模态输入请求解析并转换为结构化需求描述;获取目标烹饪设备的设备能力约束;基于设备能力约束在设备菜谱知识库中检索对应的菜谱数据;菜谱数据包含文本参数化的烹饪控制曲线;将结构化需求描述、菜谱数据以及设备能力约束作为上下文输入大语言模型,生成结构化菜谱数据;结构化菜谱数据用于发送至目标烹饪设备并驱动目标烹饪设备执行烹饪。在本申请中,通过接收用户多模态请求并解析为结构化需求;基于目标设备能力约束,在知识库分区检索含参数化控制曲线的菜谱;通过大模型生成安全、精准且可直接驱动设备一键烹饪的结构化目标菜谱数据,通过多模态解析与设备能力分区检索,摆脱了传统人工试菜的产能限制,实现面向海量个性化长尾需求及不同硬件的低成本、自动化菜谱供给。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122925429A_ABST
    Figure CN122925429A_ABST
Patent Text Reader

Abstract

The application discloses a recipe generation method and device, electronic equipment and a storage medium. The method comprises: receiving a multi-modal input request input by a user, parsing and converting the multi-modal input request into a structured requirement description; obtaining device capability constraints of a target cooking device; retrieving corresponding recipe data in a device recipe knowledge base based on the device capability constraints; the recipe data comprises a text parameterized cooking control curve; inputting the structured requirement description, the recipe data and the device capability constraints into a large language model as context to generate structured recipe data. In the application, a large model is used to generate safe, accurate and directly drivable structured target recipe data for one-key cooking of a device. Through multi-modal analysis and device capability partitioning retrieval, the production capacity limitation of traditional manual recipe testing is eliminated, and low-cost and automatic recipe supply is realized for massive personalized long-tail requirements and different hardware.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent cooking technology, and in particular to a recipe generation method, device, electronic device and storage medium. Background Technology

[0002] As people's living standards improve and technologies such as the internet, big data, artificial intelligence, and voice interaction become more widespread, traditional lifestyles are gradually changing, and the use of kitchen appliances is increasingly moving towards intelligentization. To lower the barrier to entry for users, smart kitchen appliances are typically equipped with intelligent recipe functions, which help users achieve high-quality one-button cooking by precisely controlling the heating mode, time, and temperature of the equipment.

[0003] However, the mainstream implementation of existing smart recipe technologies involves professional chefs or R&D personnel repeatedly testing specific dishes in a laboratory, manually fine-tuning the engineering control curves for each dish. These curves are then bound to fixed recipe text and images and stored in a cloud library, allowing users to retrieve them in mobile applications and send them to their devices with a single click. Recipes generated by users using internet recipe platforms or general language models only contain textual descriptions that are difficult to implement practically, such as "bake over high heat for 5 minutes" or "bake until golden brown," and cannot be associated with specific device hardware parameters, thus failing to achieve one-click cooking. Summary of the Invention

[0004] To address existing technical problems, this invention provides a recipe generation method, apparatus, electronic device, and storage medium. It receives multimodal user requests and parses them into structured requirements; based on target device capability constraints, it retrieves recipes containing parameterized control curves from a knowledge base partition; and generates safe, accurate, and directly device-driven one-click cooking structured target recipe data through a large model. By using multimodal parsing and device capability partition retrieval, it overcomes the capacity limitations of traditional manual recipe testing, achieving low-cost, automated recipe supply for massive personalized long-tail demands and diverse hardware.

[0005] In a first aspect, embodiments of this application provide a recipe generation method, the method comprising: Receive multimodal input requests from users, parse the multimodal input requests and convert them into structured requirement descriptions; Obtain the equipment capability constraints of the target cooking equipment; Based on equipment capability constraints, retrieve corresponding recipe data from the equipment recipe knowledge base; the recipe data includes text-parameterized cooking control curves. The structured requirement description, recipe data, and equipment capability constraints are used as contextual input to the large language model to generate structured recipe data. The structured recipe data is then sent to the target cooking equipment to drive the target cooking equipment to perform cooking.

[0006] In an optional embodiment, before retrieving recipe data containing text-parametric cooking control curves within the corresponding partition of the device recipe knowledge base based on device capability constraints, the method further includes: Obtain the original cooking control curves, ingredient information, step information, and multidimensional label information of existing recipes; The original cooking control curve is divided into multiple cooking stages according to the cooking process; Convert the control parameters for each cooking stage into cooking parameter setting text; The cooking parameter settings text is assembled with the corresponding ingredient information, step information and multidimensional tag information into a structured recipe document; The structured recipe documents are vectorized and stored in a vector knowledge base according to equipment capabilities to establish an equipment recipe knowledge base.

[0007] In one optional embodiment, the multimodal input request includes at least one of text input request, link input request, image input request, and video input request; receiving the multimodal input request from the user, parsing the multimodal input request, and converting it into a structured requirement description includes: If a text input request is received from the user, parse the text input request to obtain a structured requirement description; or; If a user requests a link, extract the structured requirement description using the webpage parsing script; or; If a user's image input request is received, the image recognition module identifies the image in the image input request and obtains a structured requirement description; or; If a video input request is received from a user, the cooking events in the video and the subtitles in the audio are parsed respectively. The cooking events and subtitles are aligned along the timeline, and a cooking step sequence with a timeline is output. A structured requirement description is generated based on the cooking step sequence with a timeline.

[0008] In one optional embodiment, obtaining the device capability constraints of the target cooking device includes: If the structured requirements are described as cooking-related content, obtain the equipment capability constraints of the target cooking equipment; or; If the structured requirement description is not related to cooking, send a generation failure message.

[0009] In one optional embodiment, retrieving corresponding recipe data from the device recipe knowledge base based on device capability constraints includes: Determine the knowledge base partitions in the equipment recipe knowledge base that correspond to the equipment capability constraints; Generate retrieval query statements with multiple dimensions based on structured requirement descriptions; If the knowledge base partition contains recipe data that matches multiple search queries, retrieve the recipe data; or, if the knowledge base partition does not contain matching recipe data, obtain publicly available recipe data through online search tools as the recipe data.

[0010] In one optional embodiment, the structured requirement description, recipe data, and equipment capability constraints are used as contextual input to a large language model to generate structured recipe data, including: Obtain the user's personalized constraint data; The recipe data, personalized constraint data, and equipment capability constraints are multi-channel fused and prioritized, and then assembled with the preset prompt word template to form a context. The context is input into the large language model, and the initial recipe data is generated through the content generation module of the large language model. The content inspection module of the large language model is used to validate the initial recipe data, resulting in validated recipe data. Generate recipe image data using the image generation module of a large language model; The verified recipe data and recipe image data are assembled into structured recipe data.

[0011] In one optional embodiment, the content checking module of a large language model is used to validate the initial recipe data to obtain validated recipe data, including: If the content inspection module passes the verification of the initial recipe data, the initial recipe data will be identified as the verification recipe data; or; If the content checking module fails to validate the initial recipe data, it generates modification suggestions. These suggestions are then input into the content generation module to generate the initial recipe data.

[0012] In one optional embodiment, the structured recipe data includes cooking parameter setting text; the method further includes: The cooking parameter setting text is reverse-mapped into cooking control curves for multiple stages; The cooking control curves for multiple stages are sent to the target cooking device.

[0013] In an optional embodiment, the method further includes: In response to the received ingredient quantity modification instruction, the ingredient quantity modification instruction and structured recipe data are input into the large language model, and the modified structured recipe data is output.

[0014] In an optional embodiment, the method further includes: Receive user feedback data; If the evaluation feedback data is negative, the evaluation feedback data and the corresponding structured recipe data are input into the large language model to regenerate and update the structured recipe data; If the structured recipe data meets the preset high-quality conditions, the structured recipe data will be stored in the device's recipe knowledge base.

[0015] Secondly, embodiments of this application provide a recipe generation device, the device comprising: The request parsing module is used to receive multimodal input requests from users, parse the multimodal input requests, and convert them into structured requirement descriptions. The constraint acquisition module is used to acquire the device capability constraints of the target cooking equipment. The recipe retrieval module is used to retrieve corresponding recipe data from the equipment's recipe knowledge base based on equipment capability constraints; the recipe data includes text-parameterized cooking control curves. The recipe generation module is used to take the structured requirement description, recipe data, and equipment capability constraints as context input to the large language model to generate structured recipe data. The structured recipe data is then sent to the target cooking equipment to drive the target cooking equipment to perform cooking.

[0016] Thirdly, embodiments of this application provide an electronic device, which includes a processor and a memory. The memory stores at least one instruction, at least one program, code set, or instruction set. The processor loads and executes the at least one instruction, at least one program, code set, or instruction set to implement the recipe generation method of the first aspect.

[0017] Fourthly, embodiments of this application provide a computer-readable storage medium storing at least one instruction or at least one program, wherein the at least one instruction or at least one program is loaded and executed by a processor to implement the recipe generation method of the first aspect.

[0018] Fifthly, embodiments of this application provide a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the recipe generation method of the first aspect.

[0019] The recipe generation method, apparatus, electronic device, and storage medium provided in this application have the following technical effects: This application receives multimodal input requests from users, parses and converts these requests into structured requirement descriptions; obtains the equipment capability constraints of the target cooking equipment; retrieves corresponding recipe data from the equipment's recipe knowledge base based on these constraints; the recipe data includes text-parameterized cooking control curves; and uses the structured requirement descriptions, recipe data, and equipment capability constraints as context input to a large language model to generate structured recipe data. This structured recipe data is then sent to the target cooking equipment to drive it to perform cooking. In this application, by receiving multimodal user requests and parsing them into structured requirements; retrieving recipes containing parametric control curves from a knowledge base based on the target equipment's capability constraints; and generating secure, accurate, and directly driveable one-click cooking structured target recipe data through a large model, this application overcomes the limitations of traditional manual trial cooking by using multimodal parsing and equipment capability partitioning retrieval. This enables low-cost, automated recipe supply for massive personalized long-tail demands and different hardware. Attached Figure Description

[0020] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram of an application environment provided in an embodiment of this application; Figure 2 This is a flowchart illustrating a recipe generation method provided in an embodiment of this application. Figure 1 ; Figure 3 This is a flowchart illustrating a recipe generation method provided in an embodiment of this application. Figure 2 ; Figure 4 This is a flowchart illustrating a recipe generation method provided in an embodiment of this application. Figure 3 ; Figure 5 This is a schematic diagram of the structure of a recipe generation device provided in an embodiment of this application; Figure 6 This is a hardware structure block diagram of a server for a recipe generation method provided in an embodiment of this application. Detailed Implementation

[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0024] Please see Figure 1 , Figure 1 This is a schematic diagram of an application environment provided in an embodiment of this application, including a user terminal 101, a server 102 and a target cooking device 103. The three establish a communication connection to realize a closed-loop service of multimodal recipe generation, intelligent verification and automated cooking by the device.

[0025] In one possible embodiment, the user terminal 101 serves as a user interaction carrier, specifically a mobile phone, tablet, smart wearable device, smart touchscreen, or other terminal device, running an application compatible with the smart cooking device. The user terminal 101 supports receiving diverse user input operations, including text editing, sharing web links, taking pictures of ingredients / dishes, recording or uploading cooking videos, and other multimodal input behaviors. It can also display structured recipe text and image information, cooking parameters, and operation instructions issued by the server 102. Furthermore, it can receive user commands such as modifying ingredient quantities and providing feedback on cooking results, and upload all user commands to the server 102 in real time.

[0026] In one possible embodiment, server 102 serves as the core data processing and computational carrier of the system, undertaking the entire process of recipe generation and iterative optimization. Server 102 integrates a device recipe knowledge base, a large language model, a multimodal parsing module, a content verification module, an image generation module, a feedback self-learning module, and network retrieval tools. Server 102 primarily receives multimodal input requests uploaded by user terminal 101, completing core computational tasks such as request parsing, structured requirement conversion, device capability constraint matching, knowledge base retrieval, large model recipe generation, content security verification, reverse mapping of cooking parameters, and user feedback iteration. Finally, it sends the generated structured recipe data and device-executable cooking control curves to the target cooking device 103.

[0027] In one possible embodiment, the target cooking device 103 is intelligent and controllable cooking hardware, specifically including intelligent steam ovens, air fryers, microwave ovens, intelligent cooktops, and other cooking devices with parameterized temperature control, time control, and mode switching functions. The target cooking device 103 can receive staged cooking control curves sent by the server 102, automatically switch cooking modes, and adjust parameters such as temperature, duration, fan speed, and power, completing the cooking operation automatically throughout the entire process without requiring manual adjustment of device parameters by the user.

[0028] In this embodiment, server 102 receives a multimodal input request from a user, parses the multimodal input request and converts it into a structured requirement description; obtains the device capability constraints of the target cooking device 103; retrieves corresponding recipe data from the device recipe knowledge base based on the device capability constraints; the recipe data includes text-parameterized cooking control curves; the structured requirement description, recipe data, and device capability constraints are used as context input to a large language model to generate structured recipe data; the structured recipe data is sent to the target cooking device 103 and drives the target cooking device 103 to perform cooking.

[0029] In this application, multimodal user requests are received and parsed into structured requirements; recipes containing parameterized control curves are retrieved from a knowledge base partition based on the target device's capability constraints; and structured target recipe data that is safe, accurate, and can directly drive the device to cook with one click is generated through a large model. By using multimodal parsing and device capability partition retrieval, the limitations of traditional manual trial cooking capacity are eliminated, enabling low-cost and automated recipe supply for massive personalized long-tail demands and different hardware.

[0030] The following describes a specific embodiment of a recipe generation method according to this application. Figure 2 This is a flowchart illustrating a recipe generation method provided in an embodiment of this application. Figure 1This specification provides method operation steps as shown in the embodiments or flowcharts, but based on conventional or non-inventive labor, more or fewer operation steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only execution order. In actual system or server products, the methods shown in the embodiments or drawings can be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment). Specifically, as shown in the embodiments or drawings... Figure 2 As shown, it may include: S201: Receive multimodal input requests from users, parse the multimodal input requests and convert them into structured requirement descriptions.

[0031] S202: Obtain the equipment capability constraints of the target cooking equipment.

[0032] S203: Retrieve corresponding recipe data from the equipment recipe knowledge base based on equipment capability constraints; the recipe data includes text-parameterized cooking control curves.

[0033] S204: Input the structured requirement description, recipe data, and equipment capability constraints into the large language model to generate structured recipe data; the structured recipe data is sent to the target cooking equipment and drives the target cooking equipment to perform cooking.

[0034] Figure 3 This is a flowchart illustrating a recipe generation method provided in an embodiment of this application. Figure 2 The method may include: S301: Receive multimodal input requests from users, parse the multimodal input requests and convert them into structured requirement descriptions.

[0035] In this application embodiment, in order to break the single limitation of traditional recipe generation that only supports text input, this application supports multi-dimensional natural interactive input, and the multimodal input request includes at least one of text input request, link input request, image input request, and video input request.

[0036] For different types of input requests, differentiated parsing logic is adopted to uniformly output standardized, structured requirement descriptions that can be recognized by large models. The structured requirement descriptions include core fields such as ingredient types, ingredient quantities, dish names, flavor preferences, cooking scenarios, number of diners, and contraindications. The specific parsing method is as follows: In one optional embodiment, if a text input request from a user is received, the text input request is parsed to obtain a structured requirement description.

[0037] Specifically, users can freely input their cooking needs via text, such as "leftover eggs and tomatoes from the refrigerator to make low-fat home-style dishes", "mildly spicy roasted chicken wings for four people", "steamed eggs for baby food without onions and garlic", etc. The system uses text semantic parsing, keyword extraction, and intent recognition technology to accurately extract information such as ingredients, quantity, taste, target audience, taboos, and cooking methods from the user's needs, and organizes them into structured demand data in a unified format.

[0038] In one optional embodiment, if a link input request is received from a user, a structured requirement description is extracted using a webpage parsing script.

[0039] Specifically, users can share recipe links from third-party recipe platforms and food communities. The system calls a preset webpage parsing script to automatically extract core and effective information from the linked page, such as the recipe title, ingredient list, step-by-step cooking steps, dish tags, and applicable scenarios. It filters out invalid content such as advertisements, comments, and redundant images and text, and normalizes the extracted recipe information into a structured requirement description that is common to the system.

[0040] In one optional embodiment, if a user inputs an image request, the image recognition module is used to identify the image in the image input request and obtain a structured requirement description.

[0041] Specifically, the image types include real-life photos of ingredients, photos of finished dishes, and handwritten recipes. Figure 3 The system leverages multimodal large-scale image recognition capabilities to achieve accurate analysis: for food images, it automatically identifies the type, quantity, size, and estimated weight of the ingredients; for finished dish images, it matches the corresponding dish name, classic cooking method, and ingredient ratio; for handwritten recipe images, it extracts the handwritten ingredients, steps, and cooking requirements through OCR text recognition, and finally integrates all recognition results into a structured requirement description.

[0042] In one optional embodiment, if a video input request from a user is received, the cooking events in the video input request frame and the subtitle information in the audio are parsed respectively, and the cooking events and subtitle information are aligned according to the timeline to output a cooking step sequence with a timeline. A structured requirement description is generated based on the cooking step sequence with a timeline.

[0043] Specifically, for user-uploaded local cooking videos or online food short videos, the system performs a dual-link analysis: the video side identifies cooking events such as ingredient processing, stir-frying, baking, steaming, and boiling, as well as their corresponding times in real time; the audio / subtitle side extracts speech-to-text content, video-embedded subtitles, and corresponding time nodes; the video cooking events and text subtitle information are precisely aligned along a unified timeline to sort out standardized, sequential cooking steps, and finally, a complete structured description of cooking requirements is generated.

[0044] S302: Obtain the equipment capability constraints of the target cooking equipment.

[0045] In this embodiment of the application, after completing the structured parsing of user requirements, the system prioritizes the validity verification of requests, filters invalid requests based on the characteristics of the cooking business scenario to avoid unnecessary computing power consumption, and accurately matches hardware constraints to provide underlying hardware limitations for subsequent recipe generation.

[0046] In one optional embodiment, if the structured requirement is described as cooking-related content, that is, the requirement includes valid cooking information such as ingredients, dishes, cooking operations, and dietary needs, the system immediately retrieves the hardware parameters of the target cooking device bound to the user terminal to obtain the device capability constraints.

[0047] In this embodiment, the device capability constraints are the inherent hardware thresholds and functional attributes of the device, specifically including hard parameters such as the cooking modes supported by the device, the highest / lowest working temperature, the longest single working time, the device power, the cavity volume, and the wind speed adjustment range. All cooking parameters generated by subsequent recipes must not exceed this constraint range.

[0048] In another optional embodiment, if the structured requirement is described as non-cooking related content, such as landscape pictures, daily videos, irrelevant text, or non-food-related web page links, the system directly determines the request to be invalid, stops subsequent retrieval, generation, and other end-to-end operations, and sends a generation failure prompt message to the user terminal, informing the user that the current input content is unrelated to the cooking requirement and that they should re-enter a valid cooking requirement, effectively saving the computing power of large model calls and the time consumed in the process.

[0049] S303: Retrieve corresponding recipe data from the equipment recipe knowledge base based on equipment capability constraints.

[0050] In this embodiment, the recipe data includes text-parameterized cooking control curves. The device recipe knowledge base is a pre-built partitioned vector knowledge base, which differs from traditional general recipe libraries. Its internal recipe data all include text-parameterized cooking control curves, which can be directly connected to large-scale model semantic recognition and device hardware control. Furthermore, it is partitioned and stored according to device model and device capability family to achieve accurate matching between hardware and recipes.

[0051] In one optional embodiment, retrieving corresponding recipe data from the device recipe knowledge base based on device capability constraints includes: S3031: Determine the knowledge base partition in the equipment recipe knowledge base that corresponds to the equipment capability constraints; S3032: Generate retrieval query statements with multiple dimensions based on structured requirement descriptions; S3033: Determine whether there is recipe data in the knowledge base partition that matches multiple search query statements. If yes, execute S3034; otherwise, execute S3035.

[0052] S3034: Obtain recipe data.

[0053] S3035: Obtain publicly available recipe data as recipe data through online search tools.

[0054] First, determine the knowledge base partition in the device's recipe knowledge base that corresponds to the device's capability constraints, accurately lock the knowledge range specific to the currently bound device, and avoid cross-device parameter adaptation errors.

[0055] Subsequently, based on the structured requirement description, multiple differentiated search query statements are automatically rewritten from multiple dimensions such as dish name, main ingredients, cooking methods, flavor tags, target audience, and seasonal scenarios, thereby improving search coverage and accuracy.

[0056] Finally, data matching is performed. If recipe data that highly matches multiple search queries exists in the knowledge base partition, the corresponding high-quality recipe data is directly retrieved as the generation base. If no matching recipe data exists in the knowledge base partition, i.e., for new, niche, or long-tail personalized cooking needs, the system automatically calls online search tools to capture high-quality recipe content publicly available across the entire network. After cleaning, deduplication, and normalization, this content is used as supplementary recipe data to ensure that effective generation materials can be obtained for all kinds of needs.

[0057] S304: Take the structured requirement description, recipe data and equipment capability constraints as context input to the large language model to generate structured recipe data.

[0058] In this embodiment, to address the issues of unconstrained hardware, security risks, non-standard content, and inability to drive devices when generating recipes using general large models, this system employs a multi-channel data fusion, layered verification, and multi-agent collaborative generation model. Combining user-specific needs with device hardware constraints, it generates high-quality, highly secure, and directly executable structured recipe data. The specific implementation steps are as follows: S3041: Obtain the user's personalized constraint data.

[0059] The system retrieves personalized data from the user's long-term memory database, including the user's historical taste preferences, food allergens, dietary restrictions, health requirements (low-calorie, low-fat, sugar-free, low-salt, etc.), number of family members, seasonal dietary preferences, past cooking evaluations and optimization records, and other multi-dimensional personalized information, as soft constraints for recipe generation.

[0060] S3042: Perform multi-path fusion and priority sorting of recipe data, personalized constraint data and equipment capability constraints, and assemble them with preset prompt word templates to form a context.

[0061] This application sets strict priority rules, with equipment capability constraints, user allergens, and dietary restrictions being the highest priority hard constraints that cannot be violated; user personalized preferences and health needs are the second priority soft constraints; the retrieved recipe data is the basic content material; at the same time, it combines preset prompt word templates, which include professional cooking experience rules, standardized output format requirements, and few-shot standard examples, to orderly integrate and sort all the data and construct a complete generation context.

[0062] S3043: Input the context into the large language model, and generate the initial recipe data through the content generation module of the large language model.

[0063] The large language model in this application includes a content generation module, a content inspection module, and an image generation module, specifically configured as a content generation agent, a content inspection agent, and an image generation agent.

[0064] In this embodiment, the content generation module, based on the fused context, generates initial recipe data in one complete inference, including recipe name, ingredient list, ingredient quantity, cooking step details, and standardized cooking parameter setting text.

[0065] S3044: Use the content checking module of the large language model to validate the initial recipe data and obtain validated recipe data.

[0066] In this embodiment, the content inspection module is a verification unit independent of the content generation module, and performs comprehensive verification from four core dimensions: First, device parameter verification, determining whether the cooking mode, temperature, and duration exceed the device's capabilities; second, safety taboo verification, checking whether the ingredients contain user allergens or violate dietary taboos; third, structural standardization verification, checking the completeness of recipe fields, format legality, and step parsingability; and fourth, logical consistency verification, verifying whether the ingredient quantities match the cooking parameters and the step sequence matches the cooking logic.

[0067] In one optional embodiment, if the content inspection module verifies the initial recipe data, that is, all dimensions meet the specifications, there are no security risks, and it is compatible with the device and user needs, the initial recipe data is directly identified as the verification recipe data and proceeds to the subsequent process.

[0068] In another optional embodiment, if the content checking module fails to validate the initial recipe data, the system automatically locates the non-compliant items, analyzes the causes of the problems, generates structured modification suggestions that include specific problems, correction directions, and reasonable values, and inputs the modification suggestions back into the content generation module to guide the model to optimize and regenerate the initial recipe data in a targeted manner. At the same time, a maximum number of retries is set to avoid infinite loops.

[0069] S3045: Generate recipe image data using the image generation module of a large language model.

[0070] For recipe data that has passed verification, the image generation module generates high-definition recipe cover images that match the actual effect of the dishes based on the characteristics of the dishes and the cooking style, enriching the visual display of the recipes and improving the user terminal display experience.

[0071] S3046: Assemble the verified recipe data and recipe image data into structured recipe data.

[0072] Structured recipe data is encapsulated in a standardized JSON format, integrating text and images with cooking parameters recognizable by the device. This satisfies users' visual viewing needs while directly driving hardware. The structured recipe data is sent to the target cooking device and drives it to perform automated cooking tasks.

[0073] In one optional embodiment, the structured recipe data includes cooking parameter setting text; the method further includes: S305: Reverse map cooking parameter setting text to cooking control curves for multiple stages. In this embodiment, the cooking parameter setting text generated by the large model is natural language structured text, which is easy for users to understand and view, but cannot be directly recognized and executed by the cooking equipment. Therefore, the system reverse-parses and transforms the standardized cooking parameter setting text through preset mapping rules, breaking it down into precise parameters such as heating mode, set temperature, working time, and fan speed / firepower for each cooking stage. This reconstructs and generates a multi-stage continuous cooking control curve that can be recognized and accurately executed by the equipment, achieving precise conversion from semantic text to hardware control commands. S306: Sends cooking control curves for multiple stages to the target cooking device.

[0074] In this embodiment, the system generates multi-stage cooking control curves and sends them to the target cooking device bound to the user in real time via a communication link. After receiving the data, the device automatically parses the control parameters of each stage and executes operations such as mode switching, temperature control, and time control in sequence. The entire process does not require the user to manually set any device parameters, truly realizing a one-click intelligent cooking closed loop.

[0075] In an optional embodiment, the method further includes: S307: In response to the received ingredient quantity modification instruction, input the ingredient quantity modification instruction and structured recipe data into the large language model, and output the modified structured recipe data.

[0076] In this embodiment, the cooking parameters are non-linearly related to the amount of ingredients and the number of diners. Traditional methods of simply scaling parameters proportionally can easily lead to problems such as undercooked, burnt, or poorly tasted dishes. Users can independently modify the ingredient weight, number of diners, and other portion sizes on the terminal's recipe details page, generating instructions to modify ingredient portions.

[0077] After receiving the instruction, the system does not use linear scaling logic. Instead, it inputs the modified portion information and the original complete structured recipe data into the large language model. Combining equipment capability constraints and professional cooking experience, it re-reasons and optimizes the ingredient ratios, step-by-step operation details, and cooking temperatures and times at each stage. Finally, it outputs complete, accurate, and executable modified structured recipe data adapted to the new portion size. At the same time, it updates the equipment's cooking control curve to ensure stable and high-quality cooking results under different portion sizes.

[0078] In an optional embodiment, the method further includes: S308: Receives user feedback data.

[0079] In this embodiment of the application, after the cooking operation is completed, the user terminal automatically jumps to the effect feedback page, which supports users to submit evaluation feedback data from multiple dimensions such as the doneness of the dish, color, taste, dryness, whether it is burnt, and whether it is undercooked. The feedback data includes two categories: positive reviews and negative reviews, providing real user data support for system iteration and optimization.

[0080] S309: If the evaluation feedback data is negative, input the evaluation feedback data and the corresponding structured recipe data into the large language model to regenerate and update the structured recipe data.

[0081] In this embodiment, for negative feedback submitted by users such as burnt, undercooked, or taste deviation, the system binds the feedback content with the corresponding original structured recipe data and inputs them into a large language model for targeted optimization and regeneration. For example, for the burnt problem, the system automatically lowers the final cooking temperature and shortens the high-temperature time; for the undercooked problem, it optimizes the segmented heating logic and extends the core cooking time. The optimized recipe data is updated to the user's terminal page in real time, realizing personalized self-correction of a single recipe and improving the user's secondary cooking experience.

[0082] S310: If the structured recipe data meets the preset quality conditions, store the structured recipe data in the device's recipe knowledge base.

[0083] In this embodiment, the system presets criteria for judging high-quality recipes, including a high rate of positive reviews from multiple users, no safety parameter issues, stable cooking results, and compatibility with the hardware characteristics of the corresponding device.

[0084] If the structured recipe data after iterative optimization meets the preset high-quality conditions, the system will automatically standardize and organize the recipe data and store it in the device recipe knowledge base of the corresponding device partition, continuously expanding the volume of high-quality data in the knowledge base.

[0085] Furthermore, negative review samples can be regularly aggregated and analyzed by equipment, dish, and parameter dimensions to extract patterns. For example, "The actual temperature of this model's hot air mode is too high; similar dishes should be cooled by 10°C." The cooking experience guidance in the prompt word template can be updated to improve the quality of subsequent generated content from the source.

[0086] Figure 4 This is a flowchart illustrating a recipe generation method provided in an embodiment of this application. Figure 3 In an optional embodiment, before retrieving recipe data containing text-parameterized cooking control curves within the corresponding partition of the device recipe knowledge base based on device capability constraints, the method further includes: S401: Obtain the original cooking control curves, ingredient information, step information, and multidimensional label information of existing recipes.

[0087] In this embodiment, the system collects official mature smart recipe data from various models of smart cooking devices. The core is to obtain the original cooking control curve of each device corresponding to each recipe. At the same time, it collects complete basic information such as ingredient list, ingredient quantity, step cooking steps, and dish name, as well as multi-dimensional tag information such as taste, region, allergens, health attributes, cooking difficulty, and seasonality, to achieve full-dimensional data collection of recipes.

[0088] S402: Divide the original cooking control curve into multiple cooking stages according to the cooking process.

[0089] In this embodiment, the original cooking control curve is a continuous temperature and time control hardware curve that the device can recognize, but it cannot be semantically understood by the large model. The system discretizes and segments the continuous original cooking control curve, and breaks it down into multiple independent cooking stages based on the actual cooking process such as food pretreatment, heating, shaping, coloring, and heat preservation. The system clarifies the functional positioning and operating logic of each stage, thus completing the structured decomposition of the curve.

[0090] S403: Convert the control parameters for each cooking stage into cooking parameter setting text.

[0091] In this embodiment, for each cooking stage after splitting, core control parameters such as heating mode, set temperature, working time, wind speed, firepower, and probe temperature are extracted. The machine-readable hardware parameter data is converted into standardized natural language cooking parameter setting text that can be understood, generated, and verified by the large model, such as "Stage 1: Hot air grilling mode, 200℃, 15 minutes; Stage 2: Top and bottom heating mode, 180℃, 10 minutes", breaking down the barrier between hardware engineering data and large model semantic data.

[0092] S404: Assemble the cooking parameter settings text with the corresponding ingredient information, step information and multidimensional tag information into a structured recipe document.

[0093] In this embodiment, the system will systematically assemble the converted cooking parameter settings text for each stage with the corresponding recipe's ingredient information, detailed step information, and multi-dimensional attribute tags to form a standardized structured recipe document with complete fields, clear logic, and standardized parameters, thereby achieving integrated binding of recipe text and image content with the device's executable parameters.

[0094] S405: Vectorize the structured recipe documents and store them in the vector knowledge base according to the equipment capabilities to establish the equipment recipe knowledge base.

[0095] In this embodiment, the system performs text segmentation and embedding vectorization encoding on a large number of assembled structured recipe documents, converting the document information into machine-searchable vector data. At the same time, it partitions and categorizes the data according to equipment capabilities such as equipment model, equipment power, cavity volume, and heating method, and stores the vector data in a vector knowledge base. Finally, it completes the construction of a partitioned, searchable, and adaptable equipment recipe knowledge base, providing core data support for subsequent online retrieval and recipe generation.

[0096] This application also provides a recipe generation device. Figure 5 This is a schematic diagram of the structure of a recipe generation device provided in an embodiment of this application, as shown below. Figure 5 As shown, the device 500 includes: The request parsing module 510 is used to receive multimodal input requests from users, parse the multimodal input requests and convert them into structured requirement descriptions; The constraint acquisition module 520 is used to acquire the device capability constraints of the target cooking equipment. The recipe retrieval module 530 is used to retrieve corresponding recipe data from the equipment recipe knowledge base based on equipment capability constraints; the recipe data includes text-parameterized cooking control curves. The recipe generation module 540 is used to take the structured requirement description, recipe data and equipment capability constraints as context input to the large language model to generate structured recipe data; the structured recipe data is used to send to the target cooking equipment and drive the target cooking equipment to perform cooking.

[0097] In an optional embodiment, it further includes: The first acquisition module is used to acquire the original cooking control curves, ingredient information, step information and multi-dimensional label information of existing recipes; The stage division module is used to divide the original cooking control curve into multiple cooking stages according to the cooking process; The parameter conversion module is used to convert the control parameters for each cooking stage into cooking parameter setting text. The information assembly module is used to assemble cooking parameter setting text with corresponding ingredient information, step information and multidimensional tag information into a structured recipe document; The knowledge base building module is used to vectorize structured recipe documents and store them in a vector knowledge base according to equipment capabilities, thus building an equipment recipe knowledge base.

[0098] In one optional embodiment, the multimodal input request includes at least one of a text input request, a link input request, an image input request, and a video input request; and further includes: The first request parsing module is used to parse the text input request received from the user to obtain a structured requirement description; or; The second request parsing module is used to extract a structured requirement description through a webpage parsing script if a link input request is received from the user; or; The third request parsing module is used to, upon receiving a user's image input request, use the image recognition module to identify the image in the image input request and obtain a structured requirement description; or; The fourth request parsing module is used to parse the cooking events in the video and the subtitle information in the audio of the video input request if a video input request is received from the user. The cooking events and subtitle information are aligned according to the timeline, and a cooking step sequence with timeline is output. A structured requirement description is generated based on the cooking step sequence with timeline.

[0099] In an optional embodiment, it further includes: The second acquisition module is used to acquire the equipment capability constraints of the target cooking equipment if the structured requirement description is cooking-related content; or; The first sending module is used to send a generation failure message if the structured requirement description is not related to cooking.

[0100] In one optional embodiment, retrieving corresponding recipe data from the device recipe knowledge base based on device capability constraints includes: The first determining module is used to determine the knowledge base partition in the equipment recipe knowledge base that corresponds to the equipment capability constraints. The statement generation module is used to generate retrieval query statements with multiple dimensions based on structured requirement descriptions; The first recipe retrieval module is used to retrieve recipe data if there are recipe data matching multiple retrieval queries in the knowledge base partition; or, if there are no matching recipe data in the knowledge base partition, to retrieve publicly available recipe data as recipe data through online retrieval tools.

[0101] In an optional embodiment, it further includes: The third acquisition module is used to acquire the user's personalized constraint data; The context assembly module is used to perform multi-path fusion and priority sorting of recipe data, personalized constraint data and equipment capability constraints, and assemble them with preset prompt word templates to form a context. The data generation module is used to input the context into the large language model and generate the initial recipe data through the content generation module of the large language model. The first verification module is used to verify the initial recipe data using the content inspection module of the large language model, and obtain verified recipe data. The image generation module is used to generate recipe image data using the image generation module of the large language model; The recipe assembly module is used to assemble the validated recipe data and recipe image data into structured recipe data.

[0102] In an optional embodiment, it further includes: The second determining module is used to determine the initial recipe data as the verification recipe data if the content checking module verifies the initial recipe data; or; The modification module is used to generate modification suggestions if the content checking module fails to validate the initial recipe data. These modification suggestions are then input into the content generation module to generate the initial recipe data.

[0103] In one optional embodiment, the structured recipe data includes cooking parameter setting text; and further includes: The reverse mapping module is used to reverse map cooking parameter setting text into cooking control curves for multiple stages; The second sending module is used to send cooking control curves for multiple stages to the target cooking device.

[0104] In an optional embodiment, it further includes: The portion modification module is used to respond to received ingredient portion modification instructions, input the ingredient portion modification instructions and structured recipe data into the large language model, and output the modified structured recipe data.

[0105] In an optional embodiment, it further includes: The feedback receiving module is used to receive user evaluation feedback data; The regeneration module is used to regenerate and update the structured recipe data by inputting the evaluation feedback data and the corresponding structured recipe data into the large language model if the evaluation feedback data is negative. The data storage module is used to store the structured recipe data in the device's recipe knowledge base if the structured recipe data meets the preset quality conditions.

[0106] The apparatus and method embodiments in this application are based on the same application concept.

[0107] The methods and embodiments provided in this application can be executed on a computer terminal, server, or similar computing device. Taking running on a server as an example, Figure 6 This is a hardware structure block diagram of a server for a recipe generation method provided in an embodiment of this application. For example... Figure 6 As shown, the server 600 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 610 (CPUs 610 may include, but are not limited to, microprocessors (MCUs) or programmable logic devices (FPGAs), a memory 630 for storing data, and one or more storage media 620 (e.g., one or more mass storage devices) for storing application programs 623 or data 622. The memory 630 and storage media 620 may be temporary or persistent storage. The program stored in the storage media 620 may include one or more modules, each module may include a series of instruction operations on the server. Furthermore, the CPU 610 may be configured to communicate with the storage media 620 and execute the series of instruction operations stored in the storage media 620 on the server 600. Server 600 may also include one or more power supplies 660, one or more wired or wireless network interfaces 650, one or more input / output interfaces 640, and / or one or more operating systems 621, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0108] The input / output interface 640 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of server 600. In one example, input / output interface 640 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, input / output interface 640 may be a radio frequency (RF) module used for wireless communication with the Internet.

[0109] Those skilled in the art will understand that Figure 6 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, server 600 may also include... Figure 6 The more or fewer components shown, or having the same Figure 6 The different configurations shown.

[0110] This application provides an electronic device, which includes a processor and a memory. The memory stores at least one instruction, at least one program, code set, or instruction set. The processor loads and executes the at least one instruction, at least one program, code set, or instruction set to implement the above-described data processing method.

[0111] Embodiments of this application also provide a computer-readable storage medium, which can be disposed in a server to store at least one instruction, at least one program, code set, or instruction set related to implementing a recipe generation method in the method embodiment. The at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the above-described recipe generation method.

[0112] Optionally, in this embodiment, the storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0113] As can be seen from the embodiments of the recipe generation method, apparatus, electronic device, or storage medium provided in this application, this application receives multimodal input requests from users, parses and converts the multimodal input requests into structured requirement descriptions; obtains the device capability constraints of the target cooking equipment; retrieves corresponding recipe data in the device recipe knowledge base based on the device capability constraints; the recipe data includes text-parameterized cooking control curves; the structured requirement description, recipe data, and device capability constraints are used as context input to a large language model to generate structured recipe data; the structured recipe data is sent to the target cooking equipment and drives the target cooking equipment to perform cooking. In this application, by receiving user multimodal requests and parsing them into structured requirements; retrieving recipes containing parametric control curves in the knowledge base partitions based on the target device capability constraints; generating safe, accurate, and directly driveable one-click cooking structured target recipe data through a large model; and by using multimodal parsing and device capability partition retrieval, the limitations of traditional manual trial cooking capacity are eliminated, achieving low-cost, automated recipe supply for massive personalized long-tail demands and different hardware.

[0114] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0115] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0116] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0117] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A recipe generation method, characterized in that, include: Receive multimodal input requests from users, parse the multimodal input requests and convert them into structured requirement descriptions; Obtain the equipment capability constraints of the target cooking equipment; Based on the device capability constraints, the corresponding recipe data is retrieved from the device recipe knowledge base; the recipe data includes text-parameterized cooking control curves. The structured requirement description, the recipe data, and the equipment capability constraints are used as context inputs to a large language model to generate structured recipe data. The structured recipe data is used to send to the target cooking device and drive the target cooking device to perform cooking.

2. The recipe generation method according to claim 1, characterized in that, Before retrieving recipe data containing text-parametric cooking control curves within the corresponding partition of the device recipe knowledge base based on the device capability constraints, the method further includes: Obtain the original cooking control curves, ingredient information, step information, and multidimensional label information of existing recipes; The original cooking control curve is divided into multiple cooking stages according to the cooking process; Convert the control parameters for each cooking stage into cooking parameter setting text; The cooking parameter setting text is assembled with the corresponding ingredient information, step information, and multidimensional tag information into a structured recipe document; The structured recipe document is vectorized and stored in a vector knowledge base according to the device capabilities, thus establishing a device recipe knowledge base.

3. The recipe generation method according to claim 1, characterized in that, The multimodal input request includes at least one of text input request, link input request, image input request, and video input request; receiving the multimodal input request from the user involves parsing the multimodal input request and converting it into a structured requirement description, including: If a text input request from the user is received, the text input request is parsed to obtain a structured requirement description; or; If a link input request is received from the user, the structured requirement description is extracted using a webpage parsing script; or; If a user input image request is received, the image recognition module is used to identify the image in the image input request and obtain a structured requirement description; or; If a video input request from the user is received, the cooking events in the video and the subtitles in the audio are parsed respectively. The cooking events and the subtitles are aligned along the timeline, and a cooking step sequence with a timeline is output. A structured requirement description is generated based on the cooking step sequence with a timeline.

4. The recipe generation method according to claim 1, characterized in that, The equipment capability constraints for obtaining the target cooking equipment include: If the structured requirements are described as cooking-related content, obtain the equipment capability constraints of the target cooking equipment; or; If the structured requirement is described as non-cooking related content, a generation failure message will be sent.

5. The recipe generation method according to claim 1, characterized in that, The step of retrieving corresponding recipe data from the equipment recipe knowledge base based on the equipment capability constraints includes: Determine the knowledge base partition in the equipment recipe knowledge base that corresponds to the equipment capability constraints; Based on the structured requirements description, generate multiple search query statements with different dimensions; If the knowledge base partition contains recipe data that matches multiple search queries, the recipe data is retrieved; or, if the knowledge base partition does not contain matching recipe data, publicly available recipe data is retrieved through an online search tool and used as the recipe data.

6. The recipe generation method according to claim 5, characterized in that, The step of using the structured requirement description, the recipe data, and the equipment capability constraints as contextual input to a large language model to generate structured recipe data includes: Obtain the user's personalized constraint data; The recipe data, the personalized constraint data, and the device capability constraints are multi-channel fused and prioritized, and then assembled with a preset prompt word template to form the context. The context is input into the large language model, and the initial recipe data is generated through the content generation module of the large language model. The initial recipe data is validated using the content checking module of the large language model to obtain validated recipe data; The image generation module of the large language model is used to generate recipe image data; The verified recipe data and the recipe image data are assembled into the structured recipe data.

7. A recipe generation method according to claim 6, characterized in that, The content inspection module of the large language model is used to validate the initial recipe data to obtain validated recipe data, including: If the content checking module verifies the initial recipe data, the initial recipe data is determined as the verified recipe data; or; If the content checking module fails to validate the initial recipe data, it generates modification suggestions and inputs these suggestions into the content generation module to generate the initial recipe data.

8. A recipe generation method according to claim 1, characterized in that, The structured recipe data includes cooking parameter setting text; the method further includes: The cooking parameter setting text is reverse-mapped into cooking control curves for multiple stages; The cooking control curves for the multiple stages are sent to the target cooking device.

9. A recipe generation method according to claim 1, characterized in that, The method further includes: In response to the received ingredient quantity modification instruction, the ingredient quantity modification instruction and the structured recipe data are input into the large language model, and the modified structured recipe data is output.

10. A recipe generation method according to claim 1, characterized in that, The method further includes: Receive the user's evaluation feedback data; If the evaluation feedback data is negative, the evaluation feedback data and the corresponding structured recipe data are input into the large language model to regenerate and update the structured recipe data; If the structured recipe data meets the preset quality conditions, the structured recipe data is stored in the device's recipe knowledge base.