Ice-cream recipe generation method and apparatus, and storage medium

By acquiring information on the demand for ice cream recipes and using large language models and machine learning to generate personalized ice cream recipes, the limitations caused by fixed ice cream recipes are solved, and the variety and diversity of ice cream types are enriched.

CN120873170BActive Publication Date: 2026-04-21SHENZHEN INTELLIROCKS TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN INTELLIROCKS TECH CO LTD
Filing Date
2025-09-25
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing recipes for frozen desserts are fixed and limited, which restricts the production of frozen desserts and fails to meet diverse needs.

Method used

By acquiring information on ice cream recipe requirements, personalized target ice cream recipes are generated using large language models and machine learning models. Combined with speech recognition and natural language processing technologies, ice cream preparation plans that meet user needs are generated.

Benefits of technology

It has enriched the variety of frozen foods, met diverse user needs, and improved the diversity and personalization of frozen food production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120873170B_ABST
    Figure CN120873170B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, and storage medium for generating ice cream recipes, relating to the field of artificial intelligence technology. The disclosed method for generating ice cream recipes includes: responding to an ice cream recipe generation request and obtaining ice cream recipe requirement information; obtaining a target ice cream recipe generated based on the ice cream recipe requirement information; and displaying the target ice cream recipe. The target ice cream recipe is used to guide ice cream preparation, addressing the problem that existing ice cream recipes are fixed and limited, resulting in a limitation on the types of ice cream that can be prepared. Through the technical solution of this application, target ice cream recipes are customized for different ice cream recipe requirements, enriching the variety of target ice cream recipes and thus making the types of ice cream prepared more diverse.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to methods, apparatus and storage media for generating ice cream recipes. Background Technology

[0002] Currently, frozen desserts, as a food category that combines cooling and refreshing properties with a unique flavor experience, have seen their production techniques continuously evolve with the development of social productivity and refrigeration technology, gradually moving from traditional handmade production to industrialized and intelligent manufacturing. The production techniques of mainstream frozen desserts on the market can be divided into two major systems based on production scale and core processes: traditional handmade techniques and modern industrialized production techniques. Regardless of the technique used, a frozen dessert recipe is essential for successful production. However, these recipes are typically fixed and limited, forcing producers to passively choose one from a finite pool, thus limiting the quality of the frozen desserts they produce. Summary of the Invention

[0003] The main purpose of this application is to provide a method, apparatus and storage medium for generating ice cream recipes, which aims to customize target ice cream recipes for different ice cream recipe needs, enrich the variety of target ice cream recipes, and thus make the variety of ice creams produced more abundant.

[0004] To achieve the above objectives, this application proposes a method for generating iced food recipes, comprising:

[0005] In response to the request to generate an ice cream recipe, obtain the ice cream recipe requirement information;

[0006] Obtain the target ice cream recipe generated based on the ice cream recipe requirements;

[0007] Show the target ice cream recipes, which are used to guide the preparation of ice cream.

[0008] In one embodiment, obtaining the target ice cream recipe generated based on the ice cream recipe requirement information includes:

[0009] Based on the requirements of the ice cream recipe, determine the selection of ingredients, the combination of ingredients, and the type of ice cream to be specified.

[0010] The system executes routing rules determined based on ingredient selection, ingredient combination patterns, and the specified type of ice cream to generate the target ice cream recipe.

[0011] In one embodiment, generating a target ice cream recipe involves executing routing rules determined based on ingredient selection, ingredient combination patterns, and specified ice cream types.

[0012] If the ingredient selection is "selected ingredients", the ingredient combination mode is "strict mode", and the ice cream type is "specified ice cream type", obtain the judgment result of whether the selected ingredients can generate ice cream; if the judgment result is that the selected ingredients can generate ice cream, obtain the target ice cream recipe generated by the large language model based on the production rules of the specified ice cream type.

[0013] If the ingredient selection is already selected, the ingredient combination mode is strict mode, and the ice food type is not specified, the large language model will infer the target ice food recipe based on the selected ingredients and the first preset recommendation rule.

[0014] In one embodiment, generating a target ice cream recipe involves executing routing rules determined based on ingredient selection, ingredient combination patterns, and specified ice cream types.

[0015] If the ingredient selection is "selected ingredients", the ingredient combination mode is "flexible mode", and the ice cream type is "specified ice cream type", the target ice cream recipe will be generated based on the specified ice cream type.

[0016] If the ingredient selection is "selected ingredients", the ingredient combination mode is "flexible", and the ice cream type is "unspecified", the large language model will infer the target ice cream recipe based on the selected ingredients, flavor, preparation time, and the second preset recommendation rule.

[0017] In one embodiment, generating a target ice cream recipe involves executing routing rules determined based on ingredient selection, ingredient combination patterns, and specified ice cream types.

[0018] If no ingredients are selected, the ingredient combination mode is flexible, and the ice food type is specified, the target ice food recipe corresponding to the specified ice food type will be generated according to the ice food preparation requirements.

[0019] If no ingredients are selected, the ingredient combination mode is flexible, and no ice cream type is specified, then a type of ice cream is randomly selected from all preset ice cream types. Based on the production rules of the randomly selected ice cream type, the target ice cream recipe is generated.

[0020] In one embodiment, obtaining the target ice cream recipe generated based on the ice cream recipe requirement information includes:

[0021] The demand information for ice cream recipes is vectorized to obtain the ice cream recipe demand feature vector;

[0022] Based on the similarity between the feature vector of the ice cream recipe demand and each of the feature vectors of each preset ice cream recipe demand, the matching preset ice cream recipe is obtained.

[0023] Set the preset ice cream recipe as the target ice cream recipe.

[0024] In one embodiment, the ice cream recipe requirement feature vector includes an ingredient feature vector, a flavor feature vector, a dietary restriction feature vector, and an allergen feature vector. The matching preset ice cream recipe is obtained based on the similarity between the ice cream recipe requirement feature vector and each preset ice cream recipe requirement feature vector.

[0025] Obtain the first similarity between the ingredient feature vector and the preset ingredient feature vector of each preset ice cream recipe;

[0026] Obtain the second similarity between the flavor feature vector and the preset flavor feature vector of each preset ice cream recipe;

[0027] Obtain the third similarity between the dietary restriction feature vector and the preset dietary restriction feature vector of each preset ice food recipe;

[0028] Obtain the fourth similarity between the allergen feature vector and the preset allergen feature vector of each preset ice food recipe;

[0029] If the first, second, third, and fourth similarities of a preset ice cream recipe are all greater than the preset similarity, then the preset ice cream recipe is determined to be a matching preset ice cream recipe.

[0030] In one embodiment, in response to an ice cream recipe generation request, obtaining ice cream recipe requirement information includes:

[0031] In response to the ice cream recipe generation request, obtain the user input based on the ice cream recipe generation request;

[0032] Preprocess the user input to obtain the ice cream recipe requirements;

[0033] The preprocessing includes at least one of the following:

[0034] Detect prohibited content in user input;

[0035] Perform allergen conflict detection on user input;

[0036] Perform taste requirement conflict detection on user input;

[0037] Filter out invalid information from user input.

[0038] In addition, to achieve the above objectives, this application also proposes an apparatus for generating ice cream recipes, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the ice cream recipe generation method described above.

[0039] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the method for generating the ice cream recipe as described above.

[0040] This application, in response to an ice cream recipe generation request, obtains ice cream recipe requirement information; obtains a target ice cream recipe generated based on the ice cream recipe requirement information; and finally displays the target ice cream recipe. Because it can customize the target ice cream recipe for different ice cream recipe requirements, it enriches the variety of target ice cream recipes, thereby making the types of ice cream produced more diverse. Attached Figure Description

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

[0042] To more clearly illustrate the technical solutions 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, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 A flowchart illustrating an embodiment of the method for generating ice food recipes according to this application;

[0044] Figure 2 A flowchart illustrating another embodiment of the method for generating ice food recipes according to this application;

[0045] Figure 3 A detailed flowchart illustrating the second embodiment of the method for generating ice food recipes in this application;

[0046] Figure 4 This is a flowchart illustrating yet another embodiment of the method for generating ice food recipes according to this application.

[0047] Figure 5 This is a schematic diagram of the device for generating the ice food recipe of this application.

[0048] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0049] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0050] Currently, frozen desserts, as a food category that combines cooling and refreshing properties with a unique flavor experience, have seen their production techniques continuously evolve with the development of social productivity and refrigeration technology, gradually moving from traditional handmade production to industrialized and intelligent manufacturing. The production techniques of mainstream frozen desserts on the market can be divided into two major systems based on production scale and core processes: traditional handmade techniques and modern industrialized production techniques. Regardless of the technique used, a frozen dessert recipe is essential for successful production. However, these recipes are typically fixed and limited, forcing producers to passively choose one from a finite pool, thus limiting the quality of the frozen desserts they produce.

[0051] To address the aforementioned issues, this application proposes a method for generating ice cream recipes. The main technical solution includes: responding to an ice cream recipe generation request by obtaining ice cream recipe requirement information; obtaining a target ice cream recipe generated based on the ice cream recipe requirement information; and displaying the target ice cream recipe, wherein the target ice cream recipe is used to guide ice cream preparation. Because the target ice cream recipe can be customized for different ice cream recipe requirements, the variety of target ice cream recipes is enriched, thereby enabling a wider variety of ice cream dishes to be prepared.

[0052] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device, an ice cream recipe generator, or a server capable of performing the above functions. The ice cream recipe generator can be an ice cream machine or other types of ice cream making equipment. The following description uses an ice cream recipe generator as an example to illustrate this embodiment and the subsequent embodiments.

[0053] It should be noted that the target ice cream recipe generated using the method of generating ice cream recipes in this application can be applied to ice cream machines to guide users or ice cream machines in making ice cream based on the displayed target ice cream recipe.

[0054] Based on this, this application provides a method for generating ice cream recipes, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the method for generating ice cream recipes according to this application. In this embodiment, the method for generating ice cream recipes includes steps S10 to S30:

[0055] Step S10: In response to the ice cream recipe generation request, obtain the ice cream recipe requirement information;

[0056] The "Ice Food Recipe Generation Request" refers to a user's instruction to the recipe generation system or platform to obtain ice food preparation plans. This request is the trigger signal for the system to initiate the ice food recipe generation process, and can be generated through user-initiated actions or automatic system triggering.

[0057] The ice cream recipe requirements information refers to the specific requirements provided by the user when requesting the generation of an ice cream recipe. The system generates an ice cream recipe that meets the user's expectations based on this information. Specifically, the ice cream recipe requirements information covers multiple aspects, including the type of ice cream, ingredient list, flavor requirements, number of servings, dietary restrictions, allergy list, ingredient combination mode, and other special requirements. Ice cream types include, but are not limited to, ice cream rolls, flavored ice cream, smoothies, sorbets, cream ice cubes, ice cream bars, and popsicles. Flavor requirements include, but are not limited to, sour, sweet, bitter, and spicy, or the degree of sour, sweet, bitter, and spicy. The number of servings must be an integer. Dietary restrictions include, but are not limited to, low sugar, vegan, alcoholic, keto-friendly, high protein, child-friendly, and low fat. Ingredient combination modes include strict mode and flexible mode, with flexible mode being the default. Strict mode means that only existing ingredients can be used to generate ice cream types, while flexible mode allows additional ingredients to be added based on the user's available ingredients. Other special requirements may include preparation time and difficulty.

[0058] In one feasible approach, a dedicated input interface for ice cream recipe requests is designed on a mobile application, webpage, or ice cream machine. This interface includes multiple input boxes and selection boxes. For example, there's a text box for inputting flavors, allowing users to directly enter options like strawberry or chocolate; and an ingredient preference selection box listing common ingredients as checkboxes, allowing users to select their favorite, disliked, or allergic ingredients. When a user triggers an ice cream recipe generation request, such as clicking the "Generate Recipe" button, the system retrieves the user's input from these input boxes and selection boxes, organizing it into an ice cream recipe request.

[0059] In another feasible approach, voice recognition functionality can be integrated into ice cream recipe generation apps or devices. After a user requests an ice cream recipe, for example, saying "Generate an ice cream recipe for me," the system prompts the user to describe their needs via voice. The user could express, for example, "I want a sweet and sour flavor, made with mango and yogurt." The system uses voice recognition technology to convert the user's speech into text, and then uses natural language processing technology to analyze and extract key information such as flavor and ingredients, thereby obtaining the ice cream recipe requirements.

[0060] Step S20: Obtain the target ice cream recipe generated based on the ice cream recipe requirement information;

[0061] The target frozen dessert recipe is a system-generated ice cream preparation plan that meets the user's needs after a series of processing and analysis based on the user's provided ice cream recipe requirements. It provides comprehensive and accurate guidance for users to prepare frozen desserts. This target frozen dessert recipe is output according to a set output format, and includes detailed information such as a list of ingredients required for making the frozen dessert, recipe name, flavor profile array, preparation time, required equipment array, difficulty level, allergen label array, preparation steps array, safety tips array, cooking techniques array, freezing time, and serving size. The specific content of each component of the target frozen dessert recipe will be discussed later and will not be elaborated upon here.

[0062] In one feasible approach, a detailed rule base for generating frozen dessert recipes can be pre-established within the system. These rules cover the correspondence between different flavors, ingredient combinations, and other factors with corresponding frozen dessert recipes. For example, the rule base might specify that when a user's request is "sweet and sour flavor, using strawberries and milk," the corresponding recipe would be "Strawberry Milk Smoothie: Prepare 200g of fresh strawberries, 100ml of milk, and appropriate amount of ice cubes; wash and hull the strawberries, then blend them with the milk and ice cubes in a blender until smooth, and pour into a glass." Once the system receives the frozen dessert recipe request information, the rule engine performs matching and reasoning within the rule base based on this information to find the rule that best matches the request, thereby generating the target frozen dessert recipe.

[0063] In another feasible approach, a large dataset can be constructed by collecting a vast amount of existing frozen dessert recipe data and corresponding user demand information. This data is then used to train a machine learning model, allowing the model to learn the complex mapping relationship between user demand information and frozen dessert recipes. During training, the model continuously adjusts its parameters to improve the accuracy and relevance of the generated recipes. When the system acquires new frozen dessert recipe demand information, this information is input into the trained machine learning model, which then generates the target frozen dessert recipe based on its learned knowledge. For example, the model can predict suitable ingredient combinations and preparation steps based on user preferences for flavors and ingredients, generating personalized frozen dessert recipes. This ensures that the generated frozen dessert recipes are more closely aligned with user needs.

[0064] Step S30: Display the target ice cream recipe, which is used to guide the preparation of the ice cream.

[0065] In one feasible approach, the target frozen dessert recipe can be displayed in a visually appealing format, combining text and images, on a mobile application, web page, or the user interface of an ice cream machine. For the ingredient list, the name and quantity of each ingredient are clearly listed in text, accompanied by high-resolution images, allowing users to intuitively understand the appearance of the required ingredients. For the preparation steps, a step-by-step illustrated explanation is used, with each step accompanied by detailed text descriptions and corresponding images or diagrams. For example, in a recipe for "chocolate ice cream," the first step, "Prepare 100g of chocolate, 200ml of milk, and 150ml of cream," is accompanied by images of the chocolate, milk, and cream; the second step, "Chop the chocolate and put it in a saucepan, add the milk, and heat over low heat, stirring until the chocolate melts," is accompanied by corresponding images showing the chocolate melting in the saucepan with the milk. This combination of text and images allows users to easily understand and follow the steps to make the frozen dessert.

[0066] In another feasible approach, after generating the target frozen dessert recipe, a video demonstrating the preparation process is created and displayed to users on a mobile app, website, or the user interface of an ice cream maker. The video details every step from preparing the ingredients to completing the frozen dessert, including ingredient handling, cooking or stirring, and time control. For example, a video making a "mango smoothie" demonstrates how to peel, pit, and cut the mango into small pieces, how to put the mango pieces, ice, and milk into a blender, how long to blend, and to what consistency. Subtitles can be added to the video to explain key steps and precautions, facilitating user viewing and understanding. By watching the video, users can learn how to make frozen desserts more intuitively, increasing their success rate.

[0067] In this embodiment, in response to an ice cream recipe generation request, ice cream recipe requirement information is obtained; a target ice cream recipe is generated based on the ice cream recipe requirement information; and the target ice cream recipe is displayed, wherein the target ice cream recipe is used to guide the preparation of ice cream. Because the target ice cream recipe can be customized for different ice cream recipe requirements, the variety of target ice cream recipes is enriched, thereby making the variety of prepared ice cream more diverse.

[0068] In other embodiments, while displaying the target frozen dessert recipe, the system can also respond to a frozen dessert preparation request by obtaining and displaying an image of the frozen dessert generated based on the target recipe. Specifically, a preset frozen dessert image matching the target recipe can be retrieved from a database and displayed; alternatively, in response to a frozen dessert preparation request, which can be in the form of natural language such as "Give me a picture of the finished frozen dessert based on the currently input target frozen dessert recipe," the system can process this natural language using a large language model, invoke preset rules for reasoning, and output and display the final frozen dessert picture. This approach allows the final appearance of the prepared frozen dessert to be displayed, making the generated frozen dessert more in line with user expectations.

[0069] In other embodiments, after displaying the target frozen dessert recipe, a corresponding control scheme for the ice cream machine can be generated based on the content of the target frozen dessert recipe, including the specific control steps of the ice cream machine under each part of the target frozen dessert recipe. Specifically, a correspondence between different target frozen dessert recipes and their corresponding ice cream machine control schemes can be pre-built, and the matching ice cream machine control scheme can be quickly obtained by searching this correspondence; alternatively, a large language model can be called to generate the control scheme for the ice cream machine corresponding to the target frozen dessert recipe. In this way, the user can control the ice cream machine based on the control scheme to make frozen desserts corresponding to the target frozen dessert recipe.

[0070] In other embodiments, after displaying the target frozen dessert recipe and obtaining the control scheme for the ice cream machine, the user can control the ice cream machine based on the control scheme. Control instructions corresponding to the control scheme can also be generated, such as control instructions for each control step. The ice cream machine can automatically perform corresponding control actions based on these control instructions to make frozen desserts corresponding to the target recipe. In this way, the generation of the target frozen dessert recipe and the subsequent preparation of the frozen dessert can be realized, making the prepared frozen desserts more in line with user expectations and the frozen dessert preparation process more efficient and convenient.

[0071] In other embodiments, regarding the dietary restrictions in the aforementioned ice cream recipe requirements information, to facilitate the identification of these restrictions, it is necessary to first map the dietary restrictions, and then execute the target ice cream recipe generation step after mapping the dietary restrictions. For example, specific dietary rules could be: [

[0073] "Kid-friendly": "Alcohol-free, sugar-free, caffeine-free";

[0074] "Keto-friendly": "High protein, high fat, low carbohydrates";

[0075] "Vegan": "No dairy products, no honey, no eggs, no milk";

[0076] "High protein": "Requires high protein ingredients (protein powder, high protein yogurt, milk, cheese), and contains ≥10g of protein per 86g";

[0077] "Low sugar": "Low sugar";

[0078] "Low-fat": "Low-fat";

[0079] "Contains alcohol" means "contains alcohol";

[0080] For example, if the user enters "keto-friendly", it will be converted to "high protein, high fat, low carb" before proceeding with the following recipe generation process;

[0081] ].

[0082] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Step S20 may include:

[0083] Step S21: Based on the requirements of the ice cream recipe, determine the selection of ingredients, the combination mode of ingredients, and the specification of the type of ice cream.

[0084] The selection of ingredients can include two options: ingredients already selected and ingredients not selected.

[0085] The ingredient combination mode can include a strict mode and a flexible mode, with the flexible mode being the default. The strict mode means that only existing ingredients can be used to generate ice food types, while the flexible mode means that additional ingredients can be added according to the user's available ingredients.

[0086] The specification of ice food types can include both specified ice food types and unspecified ice food types.

[0087] In one feasible approach, word segmentation, part-of-speech tagging, and syntactic analysis techniques from natural language processing can be used to initially process the demand information for ice cream recipes. For example, for a user input "I want to make a delicious ice cream using existing apples and bananas in a flexible way," word segmentation breaks it down into words such as "I," "want," "use," "existing," "of," "apple," "and," "banana," "according to," "flexible," "of," "way," "make," "a," "delicious," "of," and "ice cream." Part-of-speech tagging determines the part of speech of each word, such as "apple" and "banana" being nouns. Syntactic analysis clarifies the grammatical relationships between words, such as the structure "use...make..." indicating the association between ingredients and the purpose of preparation. Named entity recognition technology is used to extract key entities from the demand information, such as ingredient names, pattern-related vocabulary, and ice cream-related descriptive vocabulary. A knowledge graph containing ice cream ingredients, ingredient combination patterns, ice cream types, and the relationships between them is then constructed. For example, the knowledge graph records common ingredients such as apples, bananas, and strawberries; ingredient combination patterns are divided into strict and flexible patterns, with detailed descriptions of the characteristics of each; frozen food types include ice cream, smoothies, and popsicles, along with the ingredients and preparation characteristics typically used for each type. Key entities extracted through semantic analysis are matched with nodes in the knowledge graph. For "apple" and "banana," the corresponding ingredient nodes are found in the knowledge graph; for "flexible," the flexible pattern node in the ingredient combination patterns is matched. Based on the matching results and the context of the requirement information, selected and unselected ingredients are determined. If the requirement explicitly mentions "using existing apples and bananas," then apples and bananas are determined as selected ingredients; if the requirement does not mention other related ingredients, based on the ingredients typically used for this type of frozen food in the knowledge graph, other unmentioned but potentially related ingredients are marked as unselected ingredients. For example, if the knowledge graph shows that strawberries and mangoes are commonly used to make fruit smoothies, but the requirement does not mention them, then strawberries and mangoes are marked as unselected ingredients. Judgments are also made based on words related to the combination patterns in the requirement information. If a flexible approach is mentioned, the ingredient combination mode is determined to be flexible; if not explicitly mentioned, the ingredient combination mode is determined based on the default settings in the knowledge graph. The analysis checks if the requirement information contains a clear description of the type of frozen dessert. If it mentions "make a delicious frozen dessert" without specifying whether it's ice cream, smoothie, or something else, it's determined that the type of frozen dessert is unspecified; if it mentions "I want to make ice cream," it's determined that the type of frozen dessert is specified as ice cream. Semantic analysis accurately understands the syntax and semantic structure of user requirement information, extracting key information; the knowledge graph provides rich knowledge related to frozen desserts. By integrating the two, the ingredient selection, ingredient combination mode, and type of frozen dessert specification can be determined more comprehensively and accurately from the requirement information, laying the foundation for generating accurate frozen dessert recipes.

[0088] In another feasible approach, a large number of samples of ice cream recipe requirements can be collected and each sample labeled, explicitly indicating the ingredient selection, ingredient combination mode, and ice cream type specification. For example, for the sample "make a smoothie using strawberries and blueberries, strictly following the recipe," the labeled ingredients are strawberries and blueberries, the ingredient combination mode is "strict mode," and the ice cream type is specified as smoothie. Feature extraction is then performed on the collected requirements information samples. The requirements information can be converted into word vector features. Pre-trained word vector models such as Word2Vec and GloVe are used to map each word into a vector. Then, the word vectors of the entire requirements information are averaged or concatenated to obtain the text feature vector of the requirements information. Some statistical features are extracted, such as the length of the requirements information and the frequency of keyword occurrences. For example, the number of times ingredient names appear in the requirements information can be counted as ingredient-related statistical features. A suitable machine learning classification model, such as support vector machine, random forest, or deep neural network, is selected and trained using the labeled dataset. During training, the model parameters are adjusted so that the model can learn the mapping relationship between the requirements information features and the ingredient selection, ingredient combination mode, and ice cream type specification. When new ice cream recipe requirements are input, the same feature extraction process is performed to obtain a feature vector, which is then fed into the trained model for prediction. The model outputs classification results for ingredient selection, ingredient combination patterns, and ice cream type specification. For example, the model predicts that the selected ingredients are apples and oranges, the ingredient combination pattern is flexible, and no ice cream type is specified. This machine learning classification model can automatically learn complex patterns and features in the requirements information, exhibiting good adaptability and generalization ability to different types of requirements. Through extensive data training, the model can continuously improve its prediction accuracy, quickly and efficiently determining ingredient selection, ingredient combination patterns, and ice cream type specification from ice cream recipe requirements, thus improving the overall system's processing efficiency and accuracy.

[0089] Step S22: Execute the routing rules determined based on the ingredient selection, ingredient combination mode, and specified ice cream type to generate the target ice cream recipe.

[0090] The routing rules are a pre-defined logical strategy that defines the path and method for finding or generating the corresponding target ice cream recipe from a vast amount of ice cream recipe data or generation logic, based on different ingredient selections, ingredient combination patterns, and specified ice cream types. Just like routing in a network determines the path of data packet transmission based on information such as the destination address, the routing rules here determine which ice cream recipe to generate based on specific input conditions.

[0091] In one feasible approach, the corresponding routing rules can be determined first based on the selection of ingredients, the combination pattern of ingredients, and the specification of the type of ice cream; then, the target ice cream recipe can be generated based on the routing rules. Specifically, a correspondence between the selection of ingredients, the combination pattern of ingredients, the specification of the type of ice cream, and the corresponding routing rules can be pre-established, allowing for the rapid determination of the appropriate routing rules.

[0092] In another feasible approach, a rule engine is constructed, taking ingredient selection, ingredient combination mode, and ice cream type specification as input conditions to define a series of corresponding rules. These rules are presented in an "if-then" format. For example, if the ingredient combination mode is strict, the ice cream type is specified, and the selected ingredients fully meet the requirements of that ice cream type, then the standard recipe for that ice cream type is directly extracted from a pre-set recipe library as the target ice cream recipe. During actual operation, the system inputs the obtained ingredient selection, ingredient combination mode, and ice cream type specification into the rule engine. The rule engine performs conditional judgments according to a pre-set rule order. Once a rule condition is met, the corresponding "then" part of the operation is executed, generating the target ice cream recipe. Because the rule engine can clearly define the processing logic under various conditions, the recipe generation process has clear rules to follow, improving the accuracy and consistency of the generation. Furthermore, the conditional judgments can flexibly respond to different user needs, providing reasonable processing methods regardless of whether the strict or flexible mode is used, or whether the ice cream type is specified or not, offering personalized recipe generation services to users.

[0093] In another feasible approach, a large amount of ice cream recipe data can be collected, including ingredient selection, ingredient combination patterns, ice cream types, and corresponding recipe information. This data is processed to extract features such as ingredient selection, ingredient combination patterns, and ice cream type specifications, and these features are mapped to target ice cream recipes. This data is then used to train a machine learning model, allowing the model to learn the complex relationships between different feature combinations and target ice cream recipes. Once the system obtains the user's ingredient selection, ingredient combination patterns, and ice cream type specifications, this information is transformed into feature vectors that the model can recognize and input into the trained machine learning model. The model uses the learned knowledge to reason and predict, outputting possible target ice cream recipes. For example, if the input features show a flexible ingredient combination pattern, with strawberries and cream selected but no ice cream type specified, the model might predict a strawberry cream ice cream recipe and rank it according to a certain probability. Because the machine learning model can automatically learn the complex non-linear relationships between ingredient selection, ingredient combination patterns, ice cream type specifications, and target ice cream recipes, compared to traditional rule engines, it can handle more complex and ambiguous user needs, generating more innovative and personalized recipes. Moreover, with the continuous accumulation of data and the ongoing training of the model, the accuracy and quality of the generated recipes will continue to improve, better meeting the increasingly diverse needs of users.

[0094] In this embodiment, by executing routing rules determined based on ingredient selection, ingredient combination patterns, and specified ice cream types, the target ice cream recipe is generated, ensuring that the generated recipe highly meets the user's specific needs. Different routing rules can utilize known ice cream knowledge and data from multiple angles and levels, improving the diversity and rationality of recipe generation.

[0095] Reference Figure 3 In one possible implementation, step S22 includes:

[0096] If the ingredient selection is "selected ingredients", the ingredient combination mode is "strict mode", and the ice cream type is "specified ice cream type", obtain the judgment result of whether the selected ingredients can generate ice cream; if the judgment result is that the selected ingredients can generate ice cream, obtain the target ice cream recipe generated by the large language model based on the production rules of the specified ice cream type.

[0097] In one feasible approach, a large language model can determine whether selected ingredients can be used to create frozen desserts. This determination includes either that the selected ingredients can be used to create frozen desserts or that they cannot. If the frozen dessert recipe generation device receives a determination that the selected ingredients can be used to create frozen desserts, it combines the frozen dessert recipe requirements with the specified rules for creating frozen desserts to obtain a prompt. This prompt is then sent to the large language model, which, upon receiving the prompt, infers based on the specified rules for creating frozen desserts to generate a target frozen dessert recipe. This target frozen dessert recipe is then fed back to the frozen dessert recipe generation device, allowing the device to retrieve and display it. If the large language model determines that the selected ingredients cannot be used to create frozen desserts, it sends a prompt indicating that frozen desserts cannot be created to the frozen dessert recipe generation device.

[0098] It should be noted that different types of frozen desserts have different production rules. The correspondence between different types of frozen desserts and their corresponding production rules can be pre-built. By looking up this correspondence, the production rules for a specified type of frozen dessert can be obtained.

[0099] It should be noted that the aforementioned large language model can be any one of GPT, deepseek, or claude.

[0100] It should be noted that the preparation rules for the aforementioned types of frozen desserts can be as follows: [

[0102] Ice cream / ice cream roll / ice cream stick: dairy products, such as milk, cream, condensed milk, yogurt, etc.;

[0103] Yogurt cubes: yogurt;

[0104] sorbet: fruit or juice;

[0105] Smoothies: Fruit juice, syrup, or flavored liquid;

[0106] Popsicles: Any liquid base that can be frozen;

[0107] Creamy ice cubes: Creamy flavored ice: Flavored liquids such as juice, tea, and coffee;

[0108] ].

[0109] If the ingredient selection is already selected, the ingredient combination mode is strict mode, and the ice food type is not specified, the large language model will infer the target ice food recipe based on the selected ingredients and the first preset recommendation rule.

[0110] In one feasible approach, the ice cream recipe generation device combines the selected ingredients with a first preset recommendation rule to obtain a prompt message. This prompt message is then sent to a large language model. Upon receiving the prompt message, the large language model performs reasoning based on the first preset recommendation rule to generate a target ice cream recipe. This target ice cream recipe is then fed back to the ice cream recipe generation device, allowing the device to acquire and display it.

[0111] It should be noted that the above-mentioned first preset recommendation rule can be: [

[0113] Dairy products such as milk, cream, condensed milk, yogurt, etc.: ice cream / ice cream rolls / ice cream sticks;

[0114] Yogurt: Yogurt cubes;

[0115] Fruit or juice: sorbet;

[0116] Fruit juice, syrup, or flavored liquid: smoothie;

[0117] Any liquid base that can be frozen: popsicles;

[0118] Flavored liquids include juice, tea, coffee, etc.; ice cubes with cream.

[0119] ].

[0120] In this embodiment, with ingredients selected and the ingredient combination mode set to strict mode, the corresponding routing method is chosen for both cases where the type of ice cream is specified and cases where no type of ice cream is specified, in order to generate the target ice cream recipe, thus meeting the ice cream recipe generation needs in different scenarios. Furthermore, during the ice cream recipe generation process, a large language model can be used to create ice cream recipes based on user input, making the generated ice cream recipes more in line with user expectations.

[0121] Reference Figure 3 In another feasible implementation, step S22 includes:

[0122] If the ingredient selection is "selected ingredients", the ingredient combination mode is "flexible", and the ice cream type is "specified ice cream type", the target ice cream recipe will be generated based on the specified ice cream type.

[0123] In one feasible approach, if the ingredient selection is already selected, the ingredient combination mode is flexible, and the ice cream type is specified, the ice cream recipe generation device directly calls the production rules of the specified ice cream type to generate the recipe for that specified ice cream type, thereby obtaining the target ice cream recipe.

[0124] If the ingredient selection is "selected ingredients", the ingredient combination mode is "flexible", and the ice cream type is "unspecified", the large language model will infer the target ice cream recipe based on the selected ingredients, flavor, preparation time, and the second preset recommendation rule.

[0125] In one feasible approach, if the ingredient selection is "selected ingredients," the ingredient combination mode is flexible, and the ice cream type is not specified, the ice cream recipe generation device combines the selected ingredients, flavor preferences, preparation time, and a second preset recommendation rule to obtain a prompt message. This prompt message is sent to a large language model, which infers based on the second preset recommendation rule to obtain the target ice cream recipe. Finally, the generated target ice cream recipe is fed back to the ice cream recipe generation device, allowing the device to display it. If multiple ice cream recipes are obtained from the large language model's inference based on the second preset recommendation rule, the target ice cream recipe can be selected from these. This can be done based on information such as the historical production frequency and preparation time of each recipe. For example, the ice cream recipe with the most historical production frequency can be selected as the target ice cream recipe. Alternatively, the ice cream recipe with the shortest preparation time can also be selected as the target ice cream recipe.

[0126] It should be noted that the above-mentioned second preset recommendation rule can be: [

[0128] Ice cream / ice cream roll / ice cream stick:

[0129] Ingredients: Dairy products such as milk, cream, condensed milk, etc.;

[0130] Flavor: Milky;

[0131] Preparation time: Popsicle sticks are faster; ice cream and ice cream rolls are slower;

[0132] Yogurt cubes: Yogurt:

[0133] Ingredients: Yogurt;

[0134] Flavor: Yogurt flavor;

[0135] Production time: Slow;

[0136] Sheba:

[0137] Ingredients: Fruit or fruit juice;

[0138] Flavor: Fruity;

[0139] Production time: Slow;

[0140] Smoothie:

[0141] Ingredients: Fruit juice, syrup, or flavoring liquid;

[0142] Flavor: Slightly sweet and fruity;

[0143] Production time: Slow;

[0144] Popsicle:

[0145] Ingredients: Any freezeable liquid base;

[0146] Flavor: Mixed flavors;

[0147] Production time: Fastest;

[0148] Creamy ice cubes:

[0149] Ingredients: Cream-based products;

[0150] Flavor: Creamy;

[0151] Production time: Relatively fast;

[0152] Flavored Ice:

[0153] Ingredients: Flavoring liquids such as juice, tea, and coffee;

[0154] Flavor: Creamy;

[0155] Production time: Medium;

[0156] ].

[0157] In this embodiment, with ingredients selected and the ingredient combination mode set to flexible, the corresponding routing method is chosen for both specified and unspecified ice cream types to generate the target ice cream recipe, meeting the ice cream recipe generation needs in different scenarios. Furthermore, during the ice cream recipe generation process, a large language model can be used for recipe recommendations, making the generated ice cream recipes more in line with user expectations.

[0158] Reference Figure 3 In yet another feasible implementation, step S22 includes:

[0159] If no ingredients are selected, the ingredient combination mode is flexible, and the ice cream type is specified, the target ice cream recipe corresponding to the specified ice cream type will be generated according to the ice cream preparation requirements.

[0160] The requirements for making frozen food include taste preferences, dietary restrictions, and other requirements, such as preparation time.

[0161] In one feasible approach, when the ingredient selection is determined to be no ingredients selected, the ingredient combination mode is flexible, and the specified ice cream type is specified, the ice cream recipe generation device generates a target ice cream recipe corresponding to the specified ice cream type based on the ice cream preparation requirements. Specifically, the ice cream recipe generation device can generate a target ice cream recipe corresponding to the specified ice cream type based on taste preferences, dietary restrictions, and other requirements.

[0162] If no ingredients are selected, the ingredient combination mode is flexible, and no ice cream type is specified, then a type of ice cream is randomly selected from all preset ice cream types. Based on the production rules of the randomly selected ice cream type, the target ice cream recipe is generated.

[0163] The randomly selected type of frozen treat can be one of the following: ice cream, ice cream roll, flavored ice, shaved ice, sorbet, cream ice cubes, ice cream cubes, or popsicles.

[0164] In one feasible approach, when the ingredient selection is determined to be no ingredient selected, the ingredient combination mode is flexible, and the ice food type is not specified, the ice food recipe generation device can randomly select one from all preset ice food types, obtain the production rules of the randomly selected ice food type, and generate the target ice food recipe based on the production rules of the randomly selected ice food type.

[0165] In this embodiment, when no ingredients are selected or the ingredient combination mode is set to flexible mode, the corresponding routing method is selected for both cases where the type of ice food is specified and cases where no type of ice food is specified, in order to generate the target ice food recipe and meet the generation needs of ice food recipes in different scenarios.

[0166] In other embodiments, if no ingredients are selected and the ingredient combination mode is strict mode, the prompt message "No ingredients available, cannot generate" is output directly.

[0167] In other embodiments, regardless of which routing rule is used to generate the target ice cream recipe, the following information will be generated, including but not limited to:

[0168] (1) Ingredient ratio array: The specific name of the ingredient, such as "whole milk", "whipping cream", etc., and the percentage of the ingredient in the total recipe. The ingredient ratio arrays are different for different types of frozen desserts, and the ratio data for each type of frozen dessert is based on a different ratio pattern.

[0169] For example, for ice cream, the ingredient ratio array can be generated according to the following three ratio modes:

[0170] 1. Standard mixing ratio:

[0171] Fat content: 10-20%, provided through cream, whole milk, etc.

[0172] Relative sweetness content: 10-20%, sucrose, honey, etc.;

[0173] Total solids content: 32-50%, all non-moisture components;

[0174] Egg yolk addition: ≤7%, to provide emulsification and texture;

[0175] Fruit addition: 20-40%.

[0176] 2. Low-fat formula:

[0177] All the ingredients used are known to be low-fat foods, such as skim milk and low-fat yogurt;

[0178] Relative sweetness content: 10-20%;

[0179] Total solids content: 32-50%;

[0180] Fruit addition amount: 20-40%;

[0181] There are no restrictions on the specific amount of fat content, but the ingredients must be low in fat.

[0182] 3. Low sugar ratio:

[0183] Preferred sugar substitutes: allulose, erythritol, and zero-calorie syrup;

[0184] Relative sweetness: 10%;

[0185] Fat content: 10-20%;

[0186] Total solids content: 32-50%;

[0187] Egg yolk addition: ≤7%;

[0188] Fruit addition amount: 20-40%;

[0189] Special case: When users refuse artificial sweeteners, natural sugars are used instead, while the sweetness level remains at 10%.

[0190] For example, for ice cream rolls, the ingredient ratio array can be generated according to the following three ratio modes:

[0191] 1. Standard mixing ratio:

[0192] Fat content: 10-15%, lower than the upper limit of regular ice cream, making it easier to roll;

[0193] Relative sweetness content: 10-20%, sucrose, honey, etc.;

[0194] Total solids content: 32-50%, all non-moisture components;

[0195] Egg yolk addition: ≤7%, to provide emulsification and texture;

[0196] Fruit addition: 20-40%, if fruit is required;

[0197] 2. Low-fat formula:

[0198] All ingredients used are known low-fat foods, such as skim milk and low-fat yogurt;

[0199] Relative sweetness content: 10-20%;

[0200] Total solids content: 32-50%;

[0201] Fruit addition amount: 20-40%;

[0202] There are no restrictions on the specific amount of fat content, but the ingredients must be low in fat.

[0203] 3. Low sugar ratio:

[0204] Preferred sugar substitutes: allulose, erythritol, and zero-calorie syrup;

[0205] Relative sweetness: 10%, lower than usual;

[0206] Fat content: 10-15%, consistent with the standard formula;

[0207] Total solids content: 32-50%;

[0208] Egg yolk addition: ≤7%;

[0209] Fruit addition amount: 20-40%;

[0210] Special case: When users refuse artificial sweeteners, natural sugars are used instead, while the sweetness level remains at 10%.

[0211] For example, for yogurt cubes, the ingredient ratio array can be generated according to the following three ratio modes:

[0212] 1. Standard mixing ratio:

[0213] Yogurt makes up the largest proportion, typically accounting for 60-80% of the total.

[0214] Made using leftover, edible ingredients;

[0215] You can add: fresh fruit, nuts, honey, sugar, cocoa powder, etc.

[0216] There are no specific numerical restrictions; yogurt should be the main ingredient.

[0217] 2. Low-fat formula:

[0218] Yogurt makes up the largest portion of the diet; choose low-fat or non-fat yogurt.

[0219] All ingredients used are known to be low-fat foods;

[0220] Avoid: high-fat foods such as nuts, coconut, and cream;

[0221] Preferred options: low-fat yogurt, fresh fruit, sugar substitutes, etc.

[0222] 3. Low sugar ratio

[0223] Yogurt makes up the largest portion; unsweetened yogurt is a good choice.

[0224] Preferred sugar substitutes: allulose, erythritol, and zero-calorie syrup;

[0225] Special cases: When users refuse artificial sweeteners, natural sugars are used instead, with the relative sweetness controlled at 10%;

[0226] You can add natural sweeteners such as fresh fruit.

[0227] For example, for sorbet, its ingredient ratio array can be generated according to the following three ratio modes:

[0228] 1. Standard mixing ratio:

[0229] Total solids content: 26-34%, the sum of all non-moisture components;

[0230] Fruit addition: 25-60%, fresh or frozen fruit;

[0231] Water addition: 20-45%, to adjust texture and consistency;

[0232] Relative sweetness content: 15-25%, sucrose, honey, etc.;

[0233] Special restrictions: Except where otherwise specified, dairy products and plant-based milk are not permitted.

[0234] 2. Low sugar ratio:

[0235] Total solids content: 26-34%, consistent with conventional formulation;

[0236] Fruit addition: 25-60%, consistent with the usual ratio;

[0237] Water addition: 20-45%, consistent with the usual mixing ratio;

[0238] Preferred sugar substitutes: allulose, erythritol, and zero-calorie syrup;

[0239] Relative sweetness: 15%, lower than the lower limit of the standard ratio;

[0240] Special case: When users refuse artificial sweeteners, natural sugars are used instead, while maintaining a sweetness level of 15%;

[0241] Special restrictions: Except where otherwise specified, dairy products and plant-based milk are not permitted.

[0242] 3. Low-fat formula:

[0243] Total solids content: 26-34%, consistent with conventional formulation;

[0244] Fruit addition: 25-60%, consistent with the usual ratio;

[0245] Water addition: 20-45%, consistent with the usual mixing ratio;

[0246] Relative sweetness content: 15-25%, consistent with the regular formula;

[0247] Special note: Sorbet is a low-fat dessert, so the low-fat ratio is basically the same as the regular ratio.

[0248] For example, for smoothies, the ingredient ratio array can be generated according to the following three ratio modes:

[0249] 1. Standard mixing ratio:

[0250] Total liquid ingredients: 75-80%, including water, fruit juice, tea, coffee, wine, etc., excluding sugar and sweeteners;

[0251] Relative sweetness: 10-20%, lower than other cold-processed desserts;

[0252] Solid toppings: 5-10%, such as fruit pulp, biscuit crumbs, etc., to add layers of texture;

[0253] Special restrictions: Ice cubes and smoothies are not used as raw ingredients;

[0254] Alcohol concentration: If the user's ingredients contain alcohol or require an alcoholic flavor, the alcohol concentration should be 3-20% vol.

[0255] 2. Low sugar ratio:

[0256] Total liquid main ingredients: 75-80%, consistent with conventional proportions;

[0257] Preferred sugar substitutes: allulose, erythritol, and zero-calorie syrup;

[0258] Relative sweetness: 10%, lower than the lower limit of the standard ratio;

[0259] Special case: When users refuse artificial sweeteners, natural sugars are used instead, while maintaining a sweetness level of 10%.

[0260] Solid additives: 5-10%, consistent with the usual proportions;

[0261] Special restrictions: Ice cubes and smoothies are not used as raw ingredients;

[0262] Alcohol concentration: If the user's ingredients contain alcohol or require an alcoholic flavor, the alcohol concentration should be 3-20% vol;

[0263] 3. Low-fat formula:

[0264] Total liquid main ingredients: 75-80%, consistent with conventional proportions;

[0265] Relative sweetness: 10-20%, consistent with the regular formula;

[0266] Solid additives: 5-10%, consistent with the usual proportions;

[0267] Special restrictions: Ice cubes and smoothies are not used as raw ingredients;

[0268] Alcohol concentration: If the user's ingredients contain alcohol or require an alcoholic flavor, the alcohol concentration should be 3-20% vol;

[0269] Ingredient requirements: All ingredients used must be low-fat foods.

[0270] For example, for popsicles, the ingredient ratio array can be generated according to the following three ratio modes:

[0271] 1. Standard mixing ratio:

[0272] Liquid addition: 80-88%, including fruit puree, juice, yogurt, milk, plant-based milk, etc.

[0273] Relative sweetness: 12-20%, a moderate level of sweetness;

[0274] Features: Extremely high liquid content, one of the highest liquid proportions among all cold-processed desserts;

[0275] 2. Low sugar ratio:

[0276] Liquid addition: 80-88%, consistent with the usual mixing ratio;

[0277] Preferred sugar substitutes: allulose, erythritol, and zero-calorie syrup;

[0278] Relative sweetness: 12%, lower than the lower limit of the standard ratio;

[0279] Special case: When users refuse artificial sweeteners, natural sugars are used instead, and the sweetness level remains at 12%.

[0280] 3. Low-fat formula:

[0281] Liquid addition: 80-88%, consistent with the usual mixing ratio;

[0282] Relative sweetness: 12-20%, consistent with the regular formula;

[0283] Ingredient requirements: All ingredients used must be low-fat foods as they are known.

[0284] For example, for ice cream cubes, the ingredient ratio array can be generated according to the following three ratio modes:

[0285] 1. Standard mixing ratio:

[0286] Fat content: 10-20%, ensuring a smooth texture without being too greasy;

[0287] Relative sweetness content: 10-20%, moderate sweetness, balanced taste;

[0288] Total solids content: 32-50%, ensuring stable texture, neither too soft nor too hard;

[0289] Egg yolk addition: ≤7%, to provide emulsification, but not in excess;

[0290] Fruit addition: 20-40%, to ensure the fruit flavor is prominent;

[0291] 2. Low-fat formula:

[0292] Ingredient restrictions: All ingredients used are known to be low-fat foods;

[0293] Relative sweetness content: 10-20%, consistent with the regular formula;

[0294] Total solids content: 32-50%, consistent with conventional formulations;

[0295] Fruit addition: 20-40%, consistent with the usual ratio;

[0296] Special requirements: No upper limit is set for fat content, but all ingredients must be low-fat choices.

[0297] 3. Low sugar ratio:

[0298] Fat content: 10-20%, consistent with the standard formula;

[0299] Sugar substitute priority strategy: Prioritize the use of allulose, erythritol, and 0-calorie syrup;

[0300] Relative sweetness content: 10%, lower than the lower limit of the conventional ratio;

[0301] Alternative solution: When users refuse artificial sweeteners, use natural sugars such as sucrose and honey instead, while maintaining a sweetness level of 10%.

[0302] Total solids content: 32-50%, consistent with conventional formulations;

[0303] Egg yolk addition: ≤7%, consistent with the standard ratio;

[0304] Fruit addition: 20-40%, consistent with the usual ratio;

[0305] For example, for flavored ice cream, the ingredient ratio array can be generated according to the following three ratio modes:

[0306] 1. Standard mixing ratio:

[0307] Total water addition: ≥80%, to ensure the texture and refreshing taste of the ice cubes;

[0308] Sweetener addition: 0-20%, sweetness can be flexibly adjusted, and it can be completely sugar-free;

[0309] Solid decoration addition amount: 0-10%, including decorative solids such as fruit pieces and petals;

[0310] Alcohol content: ≤10% vol, only when the user requests an alcoholic flavor;

[0311] 2. Low sugar ratio:

[0312] Total water addition: ≥80%, consistent with conventional mixing ratio;

[0313] Sugar substitute priority strategy: Prioritize the use of allulose, erythritol, and 0-calorie syrup;

[0314] Relative sweetness content: 12%, lower than the lower limit of the conventional ratio;

[0315] Alternative option: When users refuse artificial sweeteners, use natural sugars such as sucrose and honey instead, while maintaining a sweetness level of 12%.

[0316] Solid decorative additive dosage: 0-10%, consistent with the conventional mixing ratio;

[0317] Alcohol content: ≤10% vol, consistent with the standard formulation;

[0318] 3. Low-fat formula:

[0319] Total water addition: ≥80%, consistent with conventional mixing ratio;

[0320] Sweetener addition: 0-20%, consistent with the usual ratio;

[0321] Solid decorative additive dosage: 0-10%, consistent with the conventional mixing ratio;

[0322] Alcohol content: ≤10% vol, consistent with the standard formulation;

[0323] Ingredient restrictions: All ingredients used are known to be low-fat foods.

[0324] For example, for ice cream, the ingredient ratio array can be generated according to the following three ratio modes:

[0325] 1. Standard formulation requirements: Fat content: 10-20%; Added sugar: 10-20%; Total solids content: 32-50%; Egg yolk content: ≤7%; If using fruit, fruit content: 20-40%, excluding lemon juice; If alcohol is required, alcohol concentration: ≤7% vol; 2. Low-fat formulation requirements: All ingredients are considered low-fat foods, no egg yolks, and no high-fat foods such as coconut milk, coconut, or avocado; Added sugar: 10-20%; Total solids content: 32-50%; If using fruit, fruit content: 20-40% Excludes lemon juice; if alcohol is required, alcohol concentration: ≤7% vol; 3. Low sugar ratio requirements: prioritize the use of sugar substitutes, such as allulose, erythritol, and 0-calorie syrup, with a sugar substitute addition of 18-25%; if no sugar substitute is used, sucrose, honey, or other sugars will be used, with a non-sugar substitute addition of 9%; fat content: 12-20%; egg yolk addition: ≤7%; total solids content: 32-50%; fruit is not used by default; if fruit is used, fruit addition: 20-40%, excluding lemon juice; if alcohol is required, alcohol concentration: ≤7% vol.

[0326] (2) Recipe name: Generate the name of the ice cream, ending with "ice cream" such as "vanilla cream ice cream".

[0327] (3) Flavor characteristics array: describes the flavor characteristics of ice cream, up to 3, such as ["milky", "vanilla", "sweet"].

[0328] (4) Preparation time: The time required to make the product, in whole minutes.

[0329] (5) Required equipment array: Create a list of required kitchen equipment such as ["mixer", "ice cream machine"].

[0330] (6) Difficulty level: The difficulty of production, including one of "easy", "medium" or "hard".

[0331] (7) Allergen label array: label common allergens included in the recipe, such as ["dairy", "eggs", "nuts"].

[0332] (8) Production Steps Array: List the detailed production steps in order, each step is a string.

[0333] (9) Safety tips array: precautions during the production process, such as "be careful of burns when handling hot liquids".

[0334] (10) Cooking Tips: Tips to improve the quality of finished products, up to 3 suggestions such as "Freezing the ice cream machine for 24 hours before use will yield better results".

[0335] Based on the information above, it needs to be refined to obtain the final target ice cream recipe, including:

[0336] (1) Calculate the number of servings of frozen food. If the user specifies the number of servings of frozen food, output the number of servings specified by the user. If the user does not specify, use the default number of servings corresponding to each type of frozen food, for example, "ice cream": 2, "ice cream roll": 2, "yogurt cubes": 2, "sorbet": 2, "smoothie": 2, "popsicle": 4, "ice cream stick": 4, "cream ice cubes": 4, "flavored ice": 4.

[0337] (2) Calculate the freezing time. The freezing time varies for each type of frozen treat. For example, "ice cream": 5 min, "ice cream roll": 6 min, "yogurt cubes": 30 min, "sorbet": 4 min, "smoothie": 4 min, "popsicle": 65 min, "ice cream stick": 60 min, "cream ice cubes": 68 min, "flavored ice": 70 min. The freezing time for the above-mentioned popsicle types, such as "popsicle", "ice cream sticks", "cream ice cubes", and "flavored ice", can be calculated by batch, using rounding up (number of servings / default number of servings) * single batch time to obtain the freezing time. Other types besides popsicles can be calculated linearly, using the number of servings * single serving time to obtain the freezing time.

[0338] (3) Generate an ingredient list based on the ingredient ratio array obtained above. Specifically, calculate the actual weight of each ingredient and format it as a list of "ingredient name: weight g". Convert this list into a metric and imperial ingredient list using a large language model. For example, the weight of each type of frozen dessert is as follows: "ice cream": 113g, "ice cream roll": 156g, "yogurt cubes": 156g, "sorbet": 156g, "smoothie": 156g, "ice cream bar": 96g, "ice cream stick": 96g, "cream ice": 102g, "flavored ice": 102g. Calculate the actual weight of each ingredient using the formula: percentage * weight per serving * number of servings / 100. Format it as a list of "ingredient name: weight g".

[0339] After the above processing, the final output of the target frozen food recipe includes information such as ingredient list, recipe name, flavor characteristics array, preparation time, required equipment array, difficulty level, allergen label array, preparation steps array, safety tips array, cooking tips array, freezing time, and number of servings.

[0340] Based on the first embodiment of this application, in the third embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 4 Step S20 may include:

[0341] Step A21: Vectorize the demand information for ice cream recipes to obtain the ice cream recipe demand feature vector;

[0342] Step A22: Based on the similarity between the ice cream recipe demand feature vector and each preset ice cream recipe demand feature vector, obtain the matching preset ice cream recipe.

[0343] In one feasible approach, the ice cream recipe requirement feature vector includes ingredient feature vectors, flavor feature vectors, dietary restriction feature vectors, and allergen feature vectors. Based on the similarity between the ice cream recipe requirement feature vector and each preset ice cream recipe requirement feature vector, obtaining a matching preset ice cream recipe involves: obtaining a first similarity between the ingredient feature vector and each preset ingredient feature vector of each preset ice cream recipe; obtaining a second similarity between the flavor feature vector and each preset flavor feature vector of each preset ice cream recipe; obtaining a third similarity between the dietary restriction feature vector and each preset dietary restriction feature vector of each preset ice cream recipe; and obtaining a fourth similarity between the allergen feature vector and each preset allergen feature vector of each preset ice cream recipe. If the first, second, third, and fourth similarities of a preset ice cream recipe are all greater than the preset similarity, then that preset ice cream recipe is determined to be a matching preset ice cream recipe. Matching ice cream recipes through multiple dimensions improves the accuracy of the matched preset ice cream recipes.

[0344] The aforementioned similarity can be cosine similarity or Euclidean distance, etc.

[0345] The preset ingredient feature vector, preset flavor feature vector, preset dietary restriction feature vector, and preset allergen feature vector mentioned above are official standard values.

[0346] The preset similarity can be set according to the actual situation, for example, to 95%.

[0347] For example, if the similarity between the ingredient feature vector and the preset ingredient feature vector, the similarity between the flavor feature vector and the preset flavor feature vector, the similarity between the dietary restriction feature vector and the preset dietary feature vector, and the similarity between the allergen feature vector and the preset allergen feature vector are all greater than 95%, then the preset iced food recipe is determined as a matching preset iced food recipe.

[0348] Step A23: Select the preset ice cream recipe as the target ice cream recipe.

[0349] In this embodiment, the target ice recipe is determined by obtaining the matching preset ice recipe based on the similarity between the ice recipe requirement feature vector and each preset ice recipe requirement feature vector. This method can quickly match the target ice recipe from the existing ice recipes without generating the target ice recipe, thus improving the efficiency of target ice recipe generation.

[0350] Based on any embodiment of this application, in the fourth embodiment of this application, the content that is the same as or similar to the above embodiments can be referred to the above description, and will not be repeated hereafter. Based on this, step S10 may include:

[0351] Step S11: Respond to the ice cream recipe generation request and obtain the user input content based on the ice cream recipe generation request;

[0352] Step S12: Preprocess the user input to obtain the ice cream recipe requirement information;

[0353] The preprocessing includes at least one of the following:

[0354] Detect prohibited content in user input;

[0355] Perform allergen conflict detection on user input;

[0356] Perform taste requirement conflict detection on user input;

[0357] Filter out invalid information from user input.

[0358] In one feasible approach, detecting prohibited content in user input includes: detecting whether the user input contains prohibited content. This content can be vectorized, and the similarity between these vectors and pre-stored vectors of preset prohibited content in a database can be calculated. Based on this similarity, prohibited content can be identified, thus achieving prohibited content detection. For example, content with a similarity greater than a preset similarity can be identified as prohibited content.

[0359] In one feasible approach, allergy conflict detection of user input includes: detecting conflicts between ingredients and allergenic foods, detecting conflicts between flavors and allergenic foods, and detecting conflicts between other requirements and allergenic foods. Specifically, detecting conflicts between ingredients and allergenic foods involves checking whether the ingredient field conflicts with declared food allergies. Detecting conflicts between flavors and allergenic foods involves checking whether the required flavor field conflicts with declared food allergies.

[0360] In one feasible approach, flavor requirement conflict detection of user input includes detecting whether there is a contradiction between the flavor and other requirements, such as a requirement for strawberry flavor, but other requirements explicitly state that strawberry flavor is not desired.

[0361] In one feasible approach, filtering invalid information from user input includes: retaining valid information about the ingredients, such as retaining milk and sugar if the user inputs milk, sugar, and a pot lid; retaining flavor descriptions; retaining valid allergens; and retaining valid information related to making frozen desserts.

[0362] In this embodiment, by preprocessing the user input, the required information for the ice cream recipe is obtained, thereby reducing the interference of invalid information on the generation process of the target ice cream recipe and improving the accuracy of the final generated target ice cream recipe.

[0363] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the method of generating ice food recipes in this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0364] Based on the same inventive concept, this application provides an apparatus for generating ice cream recipes, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to execute the ice cream recipe generation method in the above embodiments.

[0365] like Figure 5As shown, the ice cream recipe generation apparatus may include a processing unit 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. The random access memory 1004 also stores various programs and data required for the operation of the ice cream recipe generation apparatus. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the ice cream recipe generation device to communicate wirelessly or wiredly with other devices to exchange data. Although an ice cream recipe generation device with various systems is shown in the figure, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.

[0366] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0367] The ice cream recipe generation apparatus provided in this application employs the ice cream recipe generation method described in the above embodiments. It can customize target ice cream recipes to meet different ice cream recipe needs, enriching the variety of target ice cream recipes and thus making the types of ice cream produced more diverse. Compared with the prior art, the beneficial effects of the ice cream recipe generation apparatus provided in this application are the same as those of the ice cream recipe generation method provided in the above embodiments, and other technical features in this ice cream recipe generation apparatus are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0368] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0369] Based on the same inventive concept, this application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, which are used to execute the method for generating ice food recipes in the above embodiments.

[0370] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory (EPROM), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, radio frequency (RF), etc., or any suitable combination thereof.

[0371] The aforementioned computer-readable storage medium may be included in the ice cream recipe generation device; or it may exist independently and not assembled into the ice cream recipe generation device.

[0372] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by the ice food recipe generation device, the ice food recipe generation device is able to customize target ice food recipes for different ice food recipe requirements, enrich the types of target ice food recipes, and thus make the types of ice food produced more diverse.

[0373] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or the ice cream recipe generation device. In cases involving a remote computer, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0374] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0375] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0376] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described method for generating ice cream recipes. This allows for the customization of target ice cream recipes to meet different needs, enriching the variety of target ice cream recipes and thus making the types of ice cream produced more diverse. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the ice cream recipe generation method provided in the above embodiments, and will not be repeated here.

[0377] The above are only some embodiments of this application and do not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the content of this application specification and drawings, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for generating an ice cream recipe, characterized in that, include: In response to the request to generate an ice cream recipe, obtain the ice cream recipe requirement information; Based on the ice cream recipe requirements, determine the ingredient selection, ingredient combination mode, and ice cream type specification. Based on the routing rules determined by the ingredient selection, the ingredient combination mode, and the specified ice cream type, a target ice cream recipe is generated. The target frozen dessert recipe is displayed, wherein the target frozen dessert recipe is used to guide the preparation of frozen desserts; The method for generating the target ice cream recipe using the routing rules includes: The ingredient selection, ingredient combination mode, and ice cream type specification are input into the rule engine; If the ingredient selection is selected, the ingredient combination mode is strict mode, and the ice food type is not specified, the large language model will infer the target ice food recipe based on the selected ingredients and the first preset recommendation rule. If the ingredient selection is selected, the ingredient combination mode is flexible, and the ice food type is not specified, the large language model will infer the target ice food recipe based on the selected ingredients, flavor, preparation time, and the second preset recommendation rule. If the ingredient selection is no ingredient selected, the ingredient combination mode is flexible mode, and the ice cream type is not specified, then an ice cream type is randomly selected from all preset ice cream types, and the target ice cream recipe is generated based on the production rules of the randomly selected ice cream type.

2. The method for generating an ice cream recipe as described in claim 1, characterized in that, The process of generating the target ice cream recipe based on the routing rules determined according to the ingredient selection, the ingredient combination mode, and the specified ice cream type includes: If the ingredient selection is "selected ingredients", the ingredient combination mode is "strict mode", and the ice food type is "specified ice food type", obtain a judgment result on whether the selected ingredients can generate ice food; if the judgment result is that the selected ingredients can generate ice food, obtain the target ice food recipe generated by the large language model based on the production rules of the specified ice food type.

3. The method for generating an ice cream recipe as described in claim 1, characterized in that, The process of generating the target ice cream recipe based on the routing rules determined according to the ingredient selection, the ingredient combination mode, and the specified ice cream type includes: If the ingredient selection is "selected ingredients", the ingredient combination mode is "flexible mode", and the ice cream type is "specified ice cream type", the target ice cream recipe is generated based on the specified ice cream type.

4. The method for generating an ice cream recipe as described in claim 1, characterized in that, The process of generating the target ice cream recipe based on the routing rules determined according to the ingredient selection, the ingredient combination mode, and the specified ice cream type includes: If the ingredient selection is "no ingredients selected", the ingredient combination mode is "flexible mode", and the ice food type is "specified ice food type", then generate the target ice food recipe corresponding to the specified ice food type according to the ice food preparation requirements.

5. The method for generating an ice cream recipe as described in any one of claims 1 to 4, characterized in that, The process of obtaining ice cream recipe requirement information in response to an ice cream recipe generation request includes: In response to the ice cream recipe generation request, obtain the user input based on the ice cream recipe generation request; The user input is preprocessed to obtain the ice cream recipe requirement information; The preprocessing includes at least one of the following: The user input content is subjected to prohibited content detection; Allergen conflict detection is performed on the user input content; Perform taste requirement conflict detection on the user input content; Filter out invalid information from the user input.

6. An apparatus for generating iced food recipes, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the method for generating an ice cream recipe as described in any one of claims 1 to 5.

7. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the method for generating ice food recipes as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Systems, articles and methods related to providing customized cooking instruction

    CN106663297A

  • Recipe generation method and device, equipment and storage medium

    CN118332169A

  • Method and system for providing recipes for cooking

    CN120123463A