Cooking assisting method and device based on recommended menu
By introducing a binary classification model, recipe question and answer language model and recipe correction model in the recipe recommendation system, we can realize the identification of user operation instructions and recipe adjustment, which solves the inability to adjust and answer questions in real time in the existing system, and improves the interaction of the cooking auxiliary system Sex and user experience.
Patent Information
- Application Number
- CN202411185321.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-08-27
AI Technical Summary
The existing recipe recommendation system cannot adjust the recipe in real time, cannot answer users' questions, and affects the cooking process.
Cooking assistance methods based on binary classification model, recipe question and answer language model and recipe correction model are adopted to identify user operation instructions, distinguish inquiry and correction information, and provide corresponding responses or recipe adjustments.
The interaction between the cooking assistance system and users is increased, ensuring the smoothness of the cooking process, and improving the user experience through real-time answers and recipe corrections.
Smart Images

Figure CN119128089A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cooking, and in particular to a cooking assistance method and device based on recommended recipes. Background Art
[0002] Recipe recommendation refers to intelligently recommending recipes to users based on their taste preferences, nutritional needs, food taboos, etc. The recipe recommendation system is an application system built based on recipe recommendation technology.
[0003] In the related art, the recipe recommendation system can select matching recipes from the recipe database based on the user's instructions and recommend the recipes to the user. However, once the recipe is determined, it is often impossible to modify or change it, and the user cannot adjust the recipe in real time. In addition, the recipe recommendation system cannot answer questions raised by the user about the recipe, which affects the user's cooking process. Summary of the invention
[0004] In response to the above technical problems, the present invention proposes a cooking assistance method and device based on recommended recipes, which aims to make the recipes more in line with the user's usage habits and preferences, and can answer inquiries about the recipes, and modify the recipes according to the correction instructions proposed by the user, thereby increasing the interactivity between the cooking assistance system and the user and ensuring the smoothness of the user's cooking process.
[0005] In a first aspect, the present application provides a cooking assistance method based on recommended recipes, comprising:
[0006] In response to a user's operation instruction for a recommended recipe, the operation instruction is identified to obtain instruction information, and the instruction information is input into a pre-trained binary classification model so that the binary classification model determines the type of the instruction information;
[0007] In the case where the instruction information belongs to inquiry information, the instruction information is input into a pre-trained recipe question-answering language model, so that the recipe question-answering language model generates a response matching the instruction information;
[0008] In the case where the instruction information belongs to correction type information, the instruction information is input into a pre-trained recipe correction model, so that the recipe correction model determines the step to be corrected in the recommended recipe targeted by the instruction information, and adjusts the step to be corrected according to the correction information contained in the instruction information;
[0009] The generated answer or the adjusted recommended recipe is provided to the user.
[0010] In some embodiments, the operation instruction is audio data or an operation request sent by a mobile device of the user.
[0011] In some embodiments, providing the generated response or the adjusted recommended recipe to the user includes:
[0012] providing the generated response or the adjusted recommended recipe to the user in the form of voice broadcast; or,
[0013] The generated response or the adjusted recommended recipe is sent to the user's mobile device in the form of text and graphics for display.
[0014] In some embodiments, the recipe question-answering language model is a large language model trained based on training data in the cooking field, and the recipe correction model is a machine learning model constructed based on natural language processing technology and generative adversarial networks.
[0015] In a second aspect, the present application provides a training method for a binary classification model, comprising:
[0016] Acquire a training sample set, wherein each training sample in the training sample set includes: instruction information and a real type corresponding to the instruction information;
[0017] Inputting the training sample set into the model to be trained, so that the model to be trained outputs the prediction type corresponding to the instruction information in each training sample;
[0018] The real type and the predicted type of each training sample are compared respectively, and the model to be trained is optimized according to the comparison result until the fit between the real type and the predicted type of each training sample reaches a preset threshold.
[0019] In a third aspect, the present application provides a method for training a recipe question-answering language model, comprising:
[0020] Obtaining a training sample set, each training sample in the training sample set includes: a query for a recipe and a true answer corresponding to the query;
[0021] Inputting the training sample set into the model to be trained so that the model to be trained generates a predicted response corresponding to the query in each training sample;
[0022] The actual response and the predicted response of each training sample are compared respectively, and the model to be trained is optimized according to the comparison result until the fit between the actual response and the predicted response of each training sample reaches a preset threshold.
[0023] In a fourth aspect, the present application provides a method for training a recipe correction model, comprising:
[0024] Acquire a training sample set, wherein each training sample in the training sample set includes: correction information for a recipe and a real step after manually correcting the step to be corrected of the recipe according to the correction information;
[0025] Inputting the training sample set into the model to be trained, so that the model to be trained generates prediction steps corresponding to each training sample;
[0026] The actual steps and the predicted steps of each training sample are compared respectively, and the model to be trained is optimized according to the comparison results until the fit between the actual steps and the predicted steps of each training sample reaches a preset threshold.
[0027] In a fifth aspect, the present application provides a cooking assistance device based on recommended recipes, comprising:
[0028] an identification unit, configured to respond to a user's operation instruction for a recommended recipe, identify the operation instruction to obtain instruction information, and input the instruction information into a pre-trained binary classification model so that the binary classification model determines the type of the instruction information;
[0029] A first input unit is used for inputting the instruction information into a pre-trained recipe question-answering language model when the instruction information belongs to inquiry information, so that the recipe question-answering language model generates a response matching the instruction information;
[0030] a second input unit, for inputting the instruction information into a pre-trained recipe correction model when the instruction information belongs to correction information, so that the recipe correction model determines the step to be corrected in the recommended recipe targeted by the instruction information, and adjusts the step to be corrected according to the correction information contained in the instruction information;
[0031] A providing unit is used to provide the generated answer or the adjusted recommended recipe to the user.
[0032] In a sixth aspect, the present application provides a training method for a binary classification model, comprising:
[0033] An acquisition unit, configured to acquire a training sample set, wherein each training sample in the training sample set includes: instruction information and a real type corresponding to the instruction information;
[0034] An input unit, used for inputting the training sample set into the model to be trained, so that the model to be trained outputs the prediction type corresponding to the instruction information in each training sample;
[0035] The optimization unit is used to compare the real type and the predicted type of each training sample respectively, and optimize the model to be trained according to the comparison result until the fit between the real type and the predicted type of each training sample reaches a preset threshold.
[0036] In a seventh aspect, the present application provides a method for training a recipe question-answering language model, comprising:
[0037] An acquisition unit, configured to acquire a training sample set, wherein each training sample in the training sample set includes: a query for a recipe and a true answer corresponding to the query;
[0038] An input unit, used to input the training sample set into the model to be trained, so that the model to be trained generates a predicted response corresponding to the query in each training sample;
[0039] The optimization unit is used to compare the actual response and the predicted response of each training sample respectively, and optimize the model to be trained according to the comparison result until the fit between the actual response and the predicted response of each training sample reaches a preset threshold.
[0040] In an eighth aspect, the present application provides a method for training a recipe correction model, comprising:
[0041] an acquisition unit, configured to acquire a training sample set, wherein each training sample in the training sample set includes: correction information for a recipe and a real step after manually correcting the step to be corrected of the recipe according to the correction information;
[0042] An input unit, used for inputting the training sample set into the model to be trained, so that the model to be trained generates prediction steps corresponding to each training sample;
[0043] The optimization unit is used to compare the actual steps and the predicted steps of each training sample, and optimize the model to be trained according to the comparison results until the fit between the actual steps and the predicted steps of each training sample reaches a preset threshold.
[0044] A ninth aspect, an electronic device, comprising a processor and a memory;
[0045] The processor is connected to the memory;
[0046] The memory is used to store executable program code;
[0047] The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the method as described in any one of the first aspect, the second aspect, the third aspect, and the fourth aspect.
[0048] In a tenth aspect, a computer-readable storage medium stores a computer program thereon, and when the computer program is executed by a processor, the method described in any one of the first aspect, the second aspect, the third aspect, and the fourth aspect is implemented.
[0049] The beneficial technical effects of the present invention include at least: adopting a cooking assistance method and device based on recommended recipes, the cooking assistance system can distinguish the user's instruction information, can answer the distinguished inquiries, and can also modify the recipe according to the correction instructions proposed by the user, thereby increasing the interactivity between the cooking assistance system and the user, and ensuring the smoothness of the user's cooking process.
[0050] Other features and advantages of the present invention will be disclosed in detail in the following specific embodiments and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The present invention will be further described below in conjunction with the accompanying drawings:
[0052] Figure 1 The present invention is a schematic diagram of a cooking assistance system based on recommended recipes according to an embodiment of the present invention.
[0053] Figure 2 The present invention is a flowchart of a cooking assistance method based on recommended recipes according to an embodiment of the present invention.
[0054] Figure 3 The present invention is a flowchart of a method for training a binary classification model according to an embodiment of the present invention.
[0055] Figure 4 The present invention is a flowchart of a method for training a recipe question-answering language model according to an embodiment of the present invention.
[0056] Figure 5 The present invention is a flowchart of a method for training a recipe correction model according to an embodiment of the present invention.
[0057] Figure 6 The block diagram of a cooking assistance device based on recommended recipes according to an embodiment of the present invention is shown.
[0058] Figure 7 A block diagram of a binary classification model training device shown in an embodiment of the present invention.
[0059] Figure 8 A block diagram of a training device for a recipe question-answering language model according to an embodiment of the present invention.
[0060] Fig. 9 A block diagram of a training device for a recipe correction model shown in an embodiment of the present invention.
[0061] Fig.10The present invention is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0062] The technical solutions of the embodiments of the present invention are explained and described below in conjunction with the drawings of the embodiments of the present invention, but the following embodiments are only preferred embodiments of the present invention, not all. Based on the embodiments in the implementation mode, other embodiments obtained by those skilled in the art without creative work are all within the protection scope of the present invention.
[0063] In the following description, terms such as "inside", "outside", "up", "down", "left", "right", etc. that indicate directions or positional relationships are only used to facilitate the description of the embodiments and simplify the description, and do not indicate or imply that the referred device or element must have a specific direction, be constructed and operate in a specific direction. Therefore, it should not be understood as a limitation of the present invention.
[0064] The present application embodiment provides a cooking assistance system based on recommended recipes. Figure 1 ,like Figure 1 As shown, the cooking assistance system 10 based on recommended recipes includes a binary classification model 11, a recipe question and answer language model 12, and a recipe correction model 13.
[0065] The binary classification model 121 is a model in machine learning that is used to divide input data into two mutually exclusive categories. This type of model is widely used in various scenarios, such as spam detection (classifying emails into spam and non-spam), sentiment analysis (classifying text into positive comments and negative comments), disease diagnosis (classifying disease states into diseased and non-disease), etc. In a binary classification model, there is usually a target variable, which is binary and can be 0 or 1, representing two different categories. The task of the model is to predict the value of the target variable by analyzing the input feature vector. In the training phase, the model learns the relationship between the input features and the target variable, thereby establishing a classification boundary so that new input data can be correctly classified in the testing phase. The binary classification model in this specification can be any one of logistic regression, support vector machine (SVM), decision tree, random forest, and neural network, and this specification does not limit this.
[0066] The recipe question-and-answer language model 122 is a large language model trained based on training data in the cooking field, and the recipe correction model 123 is a machine learning model built based on natural language processing technology and generative adversarial networks.
[0067] In this embodiment, the cooking assistance system can distinguish the user's instruction information, answer the distinguished inquiries, and modify the recipe according to the modification instructions proposed by the user, thereby increasing the interactivity between the cooking assistance system and the user and ensuring the smoothness of the user's cooking process.
[0068] See also Figure 2 , Figure 2 It is a flowchart of a cooking assistance method based on a recommended recipe provided in the application, such as Figure 2 As shown, the method comprises at least the following steps:
[0069] Step 202: In response to the user's operation instruction for the recommended recipe, the operation instruction is identified to obtain instruction information, and the instruction information is input into a pre-trained binary classification model so that the binary classification model determines the type of the instruction information.
[0070] In one embodiment, the operation instruction may be audio data or an operation request sent based on a user's mobile device. The cooking assistance system may include an audio device, which may be used to obtain an audio signal sent by the user, and then identify the audio signal to obtain instruction information; or the cooking assistance system may include a user's mobile device, which may be loaded with a client program of the cooking assistance system, and the client program may be used to receive the user's operation request (for example, a password entered by the user or a button clicked by the user, which is not limited in this specification), and identify the operation instruction to obtain instruction information.
[0071] Step 204: if the instruction information is a question-type information, input the instruction information into a pre-trained recipe question-answering language model, so that the recipe question-answering language model generates a response matching the instruction information;
[0072] Step 206: When the instruction information belongs to correction information, the instruction information is input into a pre-trained recipe correction model so that the recipe correction model determines the step to be corrected in the recommended recipe targeted by the instruction information, and adjusts the step to be corrected according to the correction information contained in the instruction information.
[0073] Instruction information can be divided into two categories: one is inquiry information, and the other is correction information. Inquiry information can be questions that users encounter when cooking recipes, such as "How many spoons of salt are 50 grams?" or "Is Kung Pao Chicken spicy?" For this type of information, the system does not need to modify the recommended recipes, but only needs to provide responses to the inquiries; correction information can be adjustment instructions issued by users for steps that need to be adjusted in the recommended recipes, such as "remove Kung Pao Chicken from the recipe" or "use steaming instead of stir-frying to cook", and for this type of information, the system needs to make adaptive modifications to the recommended recipes.
[0074] Step 208: Provide the generated response or the adjusted recommended recipe to the user.
[0075] In this embodiment, the cooking assistance system can distinguish the user's instruction information, answer the distinguished inquiries, and modify the recipe according to the modification instructions proposed by the user, thereby increasing the interactivity between the cooking assistance system and the user and ensuring the smoothness of the user's cooking process.
[0076] In one embodiment, providing the generated response or the adjusted recommended recipe to the user includes: providing the generated response or the adjusted recommended recipe to the user in the form of a voice broadcast; or sending the generated response or the adjusted recommended recipe to the user's mobile device in the form of text and graphics for display.
[0077] As mentioned above, the user can issue operation instructions through audio or mobile devices, and the system can also respond in two ways. In the case where the system includes an audio device, the generated answer or recommended recipe can be directly played to the user in the form of voice broadcast; in the case where the system includes a mobile device, the generated answer or recommended recipe can be directly sent to the user's mobile device in the form of graphics and text for display.
[0078] In this embodiment, with the help of cutting-edge big models and NLP technology, the system successfully realizes the synchronous audio-visual interaction between mobile devices and audio devices, improving the user experience. With the strong support of the cooking assistance system, it can accurately and intelligently recommend recipes that suit personal tastes, allowing users to easily master the cooking skills of various delicacies. The recipe correction system is dynamically adjusted according to the user's real-time feedback to ensure that every step of each dish can accurately meet the user's expectations, making the cooking process more refined and personalized. This system not only optimizes the cooking process, but also greatly improves the user's sense of participation and satisfaction in cooking activities through intelligent interaction.
[0079] In one embodiment, the recipe question-answering language model is a large language model trained based on training data in the cooking field, and the recipe correction model is a machine learning model constructed based on natural language processing technology and generative adversarial networks.
[0080] In this embodiment, the cooking assistance system can distinguish the user's instruction information, answer the distinguished inquiries, and modify the recipe according to the modification instructions proposed by the user, thereby increasing the interactivity between the cooking assistance system and the user and ensuring the smoothness of the user's cooking process.
[0081] This application also proposes training methods for a binary classification model, a recipe question-answering language model, and a recipe correction model.
[0082] See also Figure 3 , Figure 3 This is a flowchart of a method for training a binary classification model provided by the present application, which method includes at least the following steps:
[0083] Step 302: Obtain a training sample set, where each training sample in the training sample set includes: instruction information and a real type corresponding to the instruction information;
[0084] Step 304: input the training sample set into the model to be trained, so that the model to be trained outputs the prediction type corresponding to the instruction information in each training sample;
[0085] Step 306: respectively compare the true type and the predicted type of each training sample, and optimize the model to be trained according to the comparison result until the fit between the true type and the predicted type of each training sample reaches a preset threshold.
[0086] See also Figure 4 , Figure 4 This is a flowchart of a method for training a recipe question-answering language model provided by the present application, the method comprising at least the following steps:
[0087] Step 402: Obtain a training sample set, where each training sample in the training sample set includes: a query for a recipe and a true answer corresponding to the query;
[0088] Step 404: input the training sample set into the model to be trained, so that the model to be trained generates a predicted response corresponding to the query in each training sample;
[0089] Step 406: Compare the actual response and the predicted response of each training sample respectively, and optimize the model to be trained according to the comparison result until the fit between the actual response and the predicted response of each training sample reaches a preset threshold.
[0090] See also Figure 5 , Figure 5 This is a flowchart of a method for training a recipe correction model provided by the present application, the method comprising at least the following steps:
[0091] Step 502: Acquire a training sample set, wherein each training sample in the training sample set includes: correction information for a recipe and a real step after manually correcting the step to be corrected in the recipe according to the correction information;
[0092] Step 504: input the training sample set into the model to be trained, so that the model to be trained generates prediction steps corresponding to each training sample;
[0093] Step 506: Compare the actual steps and predicted steps of each training sample respectively, and optimize the model to be trained according to the comparison results until the fit between the actual steps and predicted steps of each training sample reaches a preset threshold.
[0094] It can be understood that the technical concept of the training method of a binary classification model, a recipe question and answer language model, and a recipe correction model provided in this embodiment is similar to the technical concept of the aforementioned cooking assistance method based on recommended recipes, and this embodiment will not be repeated here.
[0095] See also Figure 6 , Figure 6 A block diagram of a cooking assistance device based on recommended recipes provided in an embodiment of this specification. The device includes:
[0096] The recognition unit 602 is used to respond to the user's operation instruction for the recommended recipe, recognize the operation instruction to obtain instruction information, and input the instruction information into a pre-trained binary classification model so that the binary classification model determines the type of the instruction information;
[0097] The first input unit 604 is used for inputting the instruction information into a pre-trained recipe question-answering language model when the instruction information belongs to inquiry information, so that the recipe question-answering language model generates a response matching the instruction information;
[0098] The second input unit 606 is used to input the instruction information into a pre-trained recipe correction model when the instruction information belongs to correction information, so that the recipe correction model determines the step to be corrected in the recommended recipe targeted by the instruction information, and adjusts the step to be corrected according to the correction information contained in the instruction information;
[0099] The providing unit 608 is used to provide the generated response or the adjusted recommended recipe to the user.
[0100] Optionally, the operation instruction is audio data or an operation request sent based on a mobile device of the user.
[0101] Optionally, the providing unit 608 is specifically configured to:
[0102] providing the generated response or the adjusted recommended recipe to the user in the form of voice broadcast; or,
[0103] The generated response or the adjusted recommended recipe is sent to the user's mobile device in the form of text and graphics for display.
[0104] Optionally, the recipe question and answer language model is a large language model trained based on training data in the cooking field, and the recipe correction model is a machine learning model constructed based on natural language processing technology and generative adversarial networks.
[0105] See also Figure 7 , Figure 7 A block diagram of a training device for a binary classification model provided in an embodiment of this specification. The device includes:
[0106] An acquisition unit 702 is used to acquire a training sample set, where each training sample in the training sample set includes: instruction information and a real type corresponding to the instruction information;
[0107] An input unit 704 is used to input the training sample set into the model to be trained, so that the model to be trained outputs the prediction type corresponding to the instruction information in each training sample;
[0108] The optimization unit 706 is used to compare the real type and the predicted type of each training sample respectively, and optimize the model to be trained according to the comparison result until the fit between the real type and the predicted type of each training sample reaches a preset threshold.
[0109] See also Figure 8 , Figure 8 A block diagram of a training device for a recipe question-answering language model provided in an embodiment of this specification. The device includes:
[0110] An acquisition unit 802 is used to acquire a training sample set, where each training sample in the training sample set includes: a query for a recipe and a true answer corresponding to the query;
[0111] An input unit 804 is used to input the training sample set into the model to be trained, so that the model to be trained generates a predicted response corresponding to the query in each training sample;
[0112] The optimization unit 806 is used to compare the actual response and the predicted response of each training sample respectively, and optimize the model to be trained according to the comparison result until the fit between the actual response and the predicted response of each training sample reaches a preset threshold.
[0113] See also Fig. 9 , Fig. 9 A block diagram of a training device for a recipe correction model provided in an embodiment of this specification. The device includes:
[0114] An acquisition unit 902 is used to acquire a training sample set, each training sample in the training sample set includes: correction information for a recipe and a real step after manually correcting the step to be corrected of the recipe according to the correction information;
[0115] An input unit 904 is used to input the training sample set into the model to be trained, so that the model to be trained generates a prediction step corresponding to each training sample;
[0116] The optimization unit 906 is used to compare the actual steps and the predicted steps of each training sample respectively, and optimize the model to be trained according to the comparison result until the fit between the actual steps and the predicted steps of each training sample reaches a preset threshold.
[0117] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiment of the vibration-based wind turbine blade abnormality detection device, since it is basically similar to the embodiment of the cooking auxiliary method based on the recommended recipe, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0118] Please see attached Fig.10 , Fig.10 A schematic diagram of the structure of an electronic device is provided as another embodiment of the present specification.
[0119] like Fig.10 As shown, the electronic device 1000 may include: at least one processor 1001 , at least one network interface 1004 , a user interface 1003 , a memory 1005 and at least one communication bus 1002 .
[0120] The communication bus 1002 may be used to realize the connection and communication among the above-mentioned components.
[0121] The user interface 1003 may include buttons, and the optional user interface may also include a standard wired interface or a wireless interface.
[0122] The network interface 1004 may include, but is not limited to, a Bluetooth module, an NFC module, a Wi-Fi module, etc.
[0123] Among them, the processor 1001 may include one or more processing cores. The processor 1001 uses various interfaces and lines to connect the various parts of the entire electronic device 1000, and executes various functions and processes data of the electronic device 1000 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1005, and calling data stored in the memory 1005. Optionally, the processor 1001 can be implemented in at least one hardware form of DSP, FPGA, and PLA. The processor 1001 can integrate one or a combination of CPU, GPU, modem, etc. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1001, and it can be implemented separately through a chip.
[0124] Among them, the memory 1005 may include RAM or ROM. Optionally, the memory 1005 includes a non-transitory computer-readable medium. The memory 1005 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1005 may also be at least one storage device located away from the aforementioned processor 1001. The memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module and an application. The processor 1001 can be used to call the application stored in the memory 1005 and execute the method in one or more of the above-mentioned embodiments.
[0125] Another embodiment of the present specification provides a computer-readable storage medium, which stores instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes one or more steps in the above embodiments. If the components of the above electronic device are implemented in the form of software functional units and predicted or used as independent downstream tasks, they can be stored in the computer-readable storage medium.
[0126] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of this specification is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).
[0127] The above descriptions are only preferred embodiments disclosed in this application and descriptions of the technical principles used. Those skilled in the art should understand that the scope of protection involved in this disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in this disclosure (but not limited to) to form a technical solution.
[0128] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
Claims
1. A cooking assistance method based on recommended recipes, characterized in that: include: In response to a user's operation instruction for a recommended recipe, the operation instruction is identified to obtain instruction information, and the instruction information is input into a pre-trained binary classification model so that the binary classification model determines the type of the instruction information; In the case where the instruction information belongs to inquiry information, the instruction information is input into a pre-trained recipe question-answering language model, so that the recipe question-answering language model generates a response matching the instruction information; In the case where the instruction information belongs to correction type information, the instruction information is input into a pre-trained recipe correction model, so that the recipe correction model determines the step to be corrected in the recommended recipe targeted by the instruction information, and adjusts the step to be corrected according to the correction information contained in the instruction information; The generated answer or the adjusted recommended recipe is provided to the user.
2. A cooking assistance method based on recommended recipes as claimed in claim 1, characterized in that: The operation instruction is audio data or an operation request sent based on a mobile device of a user.
3. A cooking assistance method based on recommended recipes as claimed in claim 1, characterized in that: Providing the generated response or the adjusted recommended recipe to the user includes: providing the generated response or the adjusted recommended recipe to the user in the form of voice broadcast; or, The generated response or the adjusted recommended recipe is sent to the user's mobile device in the form of text and graphics for display.
4. A cooking assistance method based on recommended recipes as claimed in claim 1, characterized in that: The recipe question-answering language model is a large language model trained based on training data in the cooking field, and the recipe correction model is a machine learning model built based on natural language processing technology and generative adversarial networks.
5. A training method for a binary classification model, characterized in that: include: Acquire a training sample set, wherein each training sample in the training sample set includes: instruction information and a real type corresponding to the instruction information; Inputting the training sample set into the model to be trained, so that the model to be trained outputs the prediction type corresponding to the instruction information in each training sample; The real type and the predicted type of each training sample are compared respectively, and the model to be trained is optimized according to the comparison result until the fit between the real type and the predicted type of each training sample reaches a preset threshold.
6. A method for training a recipe question-answering language model, characterized in that: include: Obtaining a training sample set, each training sample in the training sample set includes: a query for a recipe and a true answer corresponding to the query; Inputting the training sample set into the model to be trained so that the model to be trained generates a predicted response corresponding to the query in each training sample; The actual response and the predicted response of each training sample are compared respectively, and the model to be trained is optimized according to the comparison result until the fit between the actual response and the predicted response of each training sample reaches a preset threshold.
7. A method for training a recipe correction model, characterized in that: include: Acquire a training sample set, wherein each training sample in the training sample set includes: correction information for a recipe and a real step after manually correcting the step to be corrected of the recipe according to the correction information; Inputting the training sample set into the model to be trained, so that the model to be trained generates prediction steps corresponding to each training sample; The actual steps and the predicted steps of each training sample are compared respectively, and the model to be trained is optimized according to the comparison results until the fit between the actual steps and the predicted steps of each training sample reaches a preset threshold.
8. A cooking assistance device based on recommended recipes, characterized in that: include: an identification unit, configured to respond to a user's operation instruction for a recommended recipe, identify the operation instruction to obtain instruction information, and input the instruction information into a pre-trained binary classification model so that the binary classification model determines the type of the instruction information; A first input unit is used for inputting the instruction information into a pre-trained recipe question-answering language model when the instruction information belongs to inquiry information, so that the recipe question-answering language model generates a response matching the instruction information; a second input unit, for inputting the instruction information into a pre-trained recipe correction model when the instruction information belongs to correction information, so that the recipe correction model determines the step to be corrected in the recommended recipe targeted by the instruction information, and adjusts the step to be corrected according to the correction information contained in the instruction information; A providing unit is used to provide the generated answer or the adjusted recommended recipe to the user.
9. An electronic device, characterized in that: including a processor and a memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
A personalized menu generation method and device
CN109815375A
Menu recommendation method, menu recommendation device and machine readable storage medium
CN110335118A
Question answering method, question answering system, kitchen appliance and computer readable storage medium
CN114741493A
Recipe recommendation method, electronic equipment and storage medium
CN116775986A
Information acquisition method and device, storage medium and electronic device
CN117743529A
Cited By
Intelligent menu generation method based on LLM large model and intelligent cooking utensil
CN120373476A
