Individualized recipe recommendation method, system and equipment based on large model and double generation modes

Through the personalized recipe recommendation method of large model and dual generation mode, the problems of low data labeling efficiency and limitations of diet plan generation mode in the existing technology are solved, and efficient and accurate personalized recipe recommendation and nutritionally balanced diet plan generation are achieved.

CN120148764APending Publication Date: 2025-06-13SHENZHEN CHANGQING RUOSHUI TECHNOLOGY CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510224822.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

In the prior art, data labeling is inefficient and prone to errors, and the diet plan generation model has limitations, and it is impossible to take into account both nutrition and user preferences.

Method used

A personalized recipe recommendation method using a large model and a dual generation model is adopted. By obtaining catering business data, a large language model is used to generate dish characteristics and user portraits, and combining nutritional scientific principles and user preferences, a diet plan that meets personalized needs and balanced nutrition is generated.

Benefits of technology

It improves data processing efficiency and quality, provides accurate and personalized recommendations, enhances the flexibility and timeliness of solution generation, and improves system adaptability and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120148764A_ABST
    Figure CN120148764A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of computer software, and particularly relates to a large-model and double-generation-mode personalized recipe recommendation method, system and device. According to the method and the device, the catering business data is acquired, the dish knowledge graph and the user portrait are constructed by means of the large language model, the first processing result is obtained through personalized dish recommendation, and the customized diet scheme is generated by fusing nutrition science and user preferences and combining real-time and pre-generation means, so that wider and professional health management application scenes are covered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer software, and particularly relates to a personalized recipe recommendation method, system and device based on a large model and a dual-generation mode. Background Art

[0002] In the field of health management, the recommendation and generation of diet plans are crucial. With the improvement of people's health awareness, the demand for personalized diet plans is increasing day by day. "Diet plan recommendation and generation" refers to the process of automatically recommending or generating personalized diet plans according to users' needs, preferences, health goals and nutritional requirements, involving multiple key links such as user data collection, nutritional assessment, diet goal setting, recipe generation, personalized recommendation, and tracking and adjustment.

[0003] At present, there are various problems with the main technologies in this field. In terms of data annotation, some systems rely on manual data annotation to build a dish and recipe database. Although this method can provide professional data, it is inefficient, vulnerable to human errors, resulting in unstable data quality, and the annotation speed is difficult to keep up with the growth rate of data. In terms of the diet plan generation mode, the offline generation mode pre-creates recipes and stores them in the database, and users can select them as needed. Although it can cover a wide range of application scenarios, it lacks real-time performance and cannot respond to users' immediate needs in a timely manner, such as sudden changes in users' dietary preferences or dietary needs under special health conditions. The real-time generation mode can dynamically generate recipes according to users' immediate needs and preferences, but it often has difficulty taking into account long-term ingredient planning and nutritional balance, which may lead to an unreasonable diet structure for users. In addition, when recommending recipes, some systems only consider the principles of nutritional science and ignore users' personal taste preferences, making the acceptance of the recommended recipes not high; while other systems only focus on users' preferences and ignore nutritional balance, which is not conducive to users' health management in the long run. These problems limit the application and development of diet plan recommendation and generation systems in the field of health management, and a new technical solution is urgently needed to solve them. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a personalized recipe recommendation method, system and device based on a large model and a dual-generation mode, so as to solve the problems of low data annotation efficiency and easy errors, limitations in the diet plan generation mode, and inability to balance nutrition and user preferences in the prior art.

[0005] According to the first aspect of the embodiments of the present invention, a personalized recipe recommendation method based on a large model and a dual-generation mode is provided, including:

[0006] Obtain catering business data; the catering business data includes: user data, user-dish interaction data, and dish data;

[0007] Using the catering business data, generate dish features through a preset large language model and structured output, construct a dish knowledge graph, and construct a user profile using the catering business data;

[0008] Extract data from the user profile and the dish knowledge graph, combine with user personal characteristics and external dietary factors, provide personalized dish recommendations for users, store the trained dish Embedding data in a vector database, generate a recommendation list through user feature engineering and similarity calculation, and update the recommendation content in real time to obtain the first processing result;

[0009] Using the first processing result, integrate the principles of nutritional science and user preferences to obtain a diet plan that meets the personalized needs of users and the goal of nutritional balance;

[0010] Using the diet plan that meets the personalized needs of users and the goal of nutritional balance, combine real-time generation and pre-generation means to generate a user-customized diet plan.

[0011] Further, the using the catering business data, generating dish features through a preset large language model and structured output, constructing a dish knowledge graph, and constructing a user profile using the catering business data includes:

[0012] Combine the catering business data with the prompts of a preset large language model and input them into the preset large language model. The preset large language model calls a structured tool to output content in a specified format, and obtains structured data through the output parser;

[0013] If the parsing reports an error, return it to the large language model for correction and regeneration, obtain derivative dish features and transform them into entities and relationships to construct a dish knowledge graph;

[0014] Clean the user data and user-dish interaction data, and use the cleaned user data and user-dish interaction data for feature engineering extraction and construction of relevant features;

[0015] For the processing results of using the cleaned user data and user-dish interaction data for feature engineering extraction and construction of relevant features, perform user grouping through a clustering algorithm, and construct a user profile model using machine learning and data mining techniques.

[0016] Further, the extracting data from the user profile and the dish knowledge graph, combining with user personal characteristics and external dietary factors, providing personalized dish recommendations for users, storing the trained dish Embedding data in a vector database, generating a recommendation list through user feature engineering and similarity calculation, and updating the recommendation content in real time to obtain the first processing result includes:

[0017] Extract data from the user portrait and the dish knowledge graph, and apply feature engineering to convert the discrete data in the data extracted from the user portrait and the dish knowledge graph into continuous data;

[0018] Use the preset dual-tower model to model the preset user personal characteristics and the preset dish characteristics respectively, map the discrete features through the embedding layer, train the preset dual-tower model using the data after feature engineering, and adjust the parameters with the help of an optimization algorithm;

[0019] After training is completed, convert the features of all dishes into vector form through the model and store them in the vector database; among them, each dish is represented by a vector, and the similarity between vectors can be used to measure the similarity between dishes;

[0020] Search and infer the dishes that the user may like according to the similarity in the vector database, generate a recommendation list, and optimize according to a variety of preset factors, and regularly update and maintain the model.

[0021] Furthermore, the preset dual-tower model includes:

[0022] Two parallel sub-models, one for the user side and the other for the item side.

[0023] Furthermore, using the first processing result, integrating the principles of nutritional science and user preferences to obtain a diet plan that meets the user's personalized needs and the goal of nutritional balance includes:

[0024] Obtain the recommended list of dishes that the user likes and construct a personalized dish library;

[0025] Use the personalized dish library and the disease-appropriate dishes, suitable products for each conditioning stage, meal system, whether vegetarian, energy supply ratio of energy-producing nutrients, and dish weight specified by the principles of nutritional science as structured constraints;

[0026] Input the structured constraints into a planning solver, and solve for a diet plan that meets the user's personalized needs and the goal of nutritional balance through a preset mathematical programming method.

[0027] Furthermore, using the diet plan that meets the user's personalized needs and the goal of nutritional balance, combining real-time generation and pre-generation means to generate a user-customized diet plan includes:

[0028] Use the diet plan that meets the user's personalized needs and the goal of nutritional balance to pre-generate a diet plan based on the principles of nutritional science and common user preferences;

[0029] When the user joins the system, select one from the pre-generated plans as a starting point to provide personalized diet advice;

[0030] Introduce a real-time generation mechanism to dynamically adjust and personalize the pre-generated diet plan according to the user's instant feedback, special events, seasonal changes, rapid changes in health status, or long-term health data and behavior patterns, and generate a diet plan that meets the user's current needs in real time.

[0031] According to the second aspect of the embodiments of the present invention, there is provided a personalized recipe recommendation system with a large model and a dual-generation mode, which is applied to the personalized recipe recommendation method with a large model and a dual-generation mode described in any one of the above. The system is characterized in that it includes:

[0032] An acquisition module for acquiring catering business data; the catering business data includes: user data, user-dish interaction data, and dish data;

[0033] A first processing module for using the catering business data to generate dish features through a preset large language model and structured output, constructing a dish knowledge graph, and constructing a user portrait using the catering business data;

[0034] A second processing module for extracting data from the user portrait and the dish knowledge graph, combining with the user's personal characteristics and external dietary factors to provide personalized dish recommendations for the user, storing the trained dish Embedding data in a vector database, generating a recommendation list through user feature engineering and similarity calculation, and updating the recommendation content in real time to obtain a first processing result;

[0035] A third processing module for using the first processing result to integrate the principles of nutritional science and the user's preferences to obtain a diet plan that meets the user's personalized needs and the goal of nutritional balance;

[0036] A fourth processing module for using the diet plan that meets the user's personalized needs and the goal of nutritional balance, combining real-time generation and pre-generation means to generate a user-customized diet plan.

[0037] According to the third aspect of the embodiments of the present invention, there is provided a personalized recipe recommendation device with a large model and a dual-generation mode, which is characterized in that the device includes:

[0038] A memory on which an executable program is stored;

[0039] A processor for executing the executable program in the memory to implement the steps of the method described in any one of the above.

[0040] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:

[0041] 1. Improve data processing efficiency and quality: Automatically generate dish features through the structured output of large models. Compared with manual data annotation, it greatly improves the efficiency of data annotation, reduces human errors, ensures the accuracy and consistency of dish data, and provides a reliable data basis for subsequent recipe recommendation and generation.

[0042] 2. Precise personalized recommendation: Integrate the principles of nutritional science and user preferences. It not only considers the user's taste preferences but also fully ensures the scientific nature and healthiness of the diet plan. By using mathematical programming to find the optimal solution that meets the user's personalized needs and the goal of nutritional balance, it can provide customized diet suggestions for users with different health needs and taste preferences, improve the acceptance and compliance of users with the recommended recipes, and help users achieve long-term health management goals.

[0043] 3. Enhance the flexibility and timeliness of solution generation: The combination of real-time generation and pre-generation of diet plans not only uses pre-generated plans to meet long-term nutritional balance and health goals, adapts to the general eating habits and lifestyles of users, but also quickly responds to the immediate changes and specific situations of user needs through the real-time generation mechanism, such as diet adjustments under special health conditions, festival diet requirements, etc. This method improves the generation efficiency of diet plans, significantly enhances user satisfaction and health benefits, and ensures that users can obtain diet plans that not only meet their personal tastes but also their health needs at any time.

[0044] 4. Improve system adaptability and scalability: With the continuous accumulation of new user data and dish data, the system can regularly update and maintain the recommendation model and pre-generated diet plans, enabling it to adapt to the changes of different user groups and the progress of nutritional science, having good adaptability and scalability, and can be widely applied to various health management scenarios.

[0045] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present invention. Brief Description of the Drawings

[0046] The drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present invention, and are used together with the specification to explain the principles of the present invention.

[0047] Figure 1 is a schematic diagram of the steps of a personalized recipe recommendation method of a large model and a dual-generation mode shown according to an exemplary embodiment;

[0048] Figure 2 is a schematic diagram of the implementation steps of a personalized recipe recommendation method of a large model and a dual-generation mode shown according to an exemplary embodiment;

[0049] Figure 3Schematic diagram of the implementation process of the data asset management part of the personalized recipe recommendation method with large models and dual generation modes shown according to an exemplary embodiment;

[0050] Figure 4 Schematic diagram of the composition of the personalized recipe recommendation system with large models and dual generation modes shown according to an exemplary embodiment;

[0051] Figure 5 Schematic diagram of the composition of the personalized recipe recommendation device with large models and dual generation modes shown according to an exemplary embodiment. Detailed implementation manners

[0052] Here, the exemplary embodiments will be described in detail, and the examples are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present invention. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0053] Embodiment 1

[0054] Please refer to Figure 1 , Figure 1 Schematic diagram of the steps of the personalized recipe recommendation method with large models and dual generation modes shown according to an exemplary embodiment. The method includes:

[0055] S1. Obtain catering business data; the catering business data includes: user data, user-dish interaction data, and dish data;

[0056] S2. Utilize the catering business data to generate dish features through a preset large language model and structured output, construct a dish knowledge graph, and construct a user portrait using the catering business data;

[0057] S3. Extract data from the user portrait and the dish knowledge graph, combine with the user's personal characteristics and external dietary factors, provide personalized dish recommendations for the user, store the trained dish Embedding data in a vector database, generate a recommendation list through user feature engineering and similarity calculation, and update the recommended content in real time to obtain a first processing result;

[0058] S4. Utilize the first processing result to integrate the principles of nutritional science and the user's preferences to obtain a diet plan that meets the user's personalized needs and the goal of nutritional balance;

[0059] S5. Utilize the diet plan that meets the user's personalized needs and the goal of nutritional balance, and combine real-time generation and pre-generation means to generate a user-customized diet plan.

[0060] In specific implementation, as described in steps S1 - S2, it includes:

[0061] Combining the catering business data with the prompt words of a preset large language model and then inputting them into the preset large language model. The preset large language model calls a structured tool to output content in a specified format, and the structured data is obtained through parsing by an output parser;

[0062] If a parsing error occurs, it returns to the large language model for error correction and regeneration, obtaining derivative dish features and converting them into entities and relationships to construct a dish knowledge graph;

[0063] Clean the user data and user - dish interaction data, and use the cleaned user data and user - dish interaction data for feature engineering extraction and construction of relevant features;

[0064] For the processing results of using the cleaned user data and user - dish interaction data for feature engineering extraction and construction of relevant features, perform user grouping through a clustering algorithm, and use machine learning and data mining techniques to construct a user portrait model.

[0065] In specific implementation, please refer to Figure 2 、 Figure 3 , after collecting or creating the basic data of the dish (such as name, production steps and raw materials, picture and video materials), input it into the "large model and structured output chain". The "prompt words" refer to combining the basic dish data with the large model prompt words and submitting them as input to the large model. The large model calls the "structured tool" to output content, and the content is parsed by the "output parser" to obtain structured data. If the "output parser" reports an error, then return to the "large language model" for error correction and regeneration of the content and continue the subsequent process. After the above process is completed, derivative dish features (such as dish classification, dish labels, nutritional data, cuisine and taste, health score, etc.) can be obtained. Then they can be converted into entities and relationships, and further construct a dish knowledge graph.

[0066] More specifically, the process of constructing user portraits involves multiple technologies and steps. It begins with data collection and preprocessing, which includes collecting user data (such as basic information, health status, dietary restrictions and allergens, health and nutrition needs, dietary preferences, etc.), user-dish interaction data (such as recipe likes, collections, ratings, shares, search keywords, browsing records, ingredient purchase records, etc.), and ensuring the quality and consistency of the data through data cleaning. Next, feature engineering is carried out to extract and construct features that affect user behavior prediction, such as activity level, purchase frequency, etc., and convert user and user-dish interaction data into quantifiable features. Then, through user clustering, clustering algorithms are used to divide users into different groups to more accurately identify and understand the behavior patterns of different user groups. On this basis, a user portrait model is constructed, and machine learning and data mining technologies are used to deeply analyze user data to form detailed portraits of each user group.

[0067] In specific implementation, it includes the following steps:

[0068] 1. Input data:

[0069] Dish data: including name, production (production steps, ingredients, such as main ingredients, seasonings, etc.), and picture and video materials, etc. These data are the starting information sources for the entire process.

[0070] 2. Processing flow

[0071] Prompt generation: Combine dish data with specific prompts to provide clear instructions and information input for the large language model.

[0072] Large language model processing: The information combined with prompts and dish data is input into the large language model. The large language model calls structured tools to process the input information to generate structured content.

[0073] Output parsing: The content output by the large language model enters the output parser. If an error occurs during the parsing process, error correction will be carried out and then the content will be regenerated. Finally, structured data is parsed, and these data are used to generate dish features.

[0074] 3. Output results

[0075] Dish features: The generated dish features include multi-level classification, labels (such as allergens, diseases, suitable meal times, etc.), nutritional data (calories, nutrient content, etc.), cuisine and taste, health score, etc. These features are further used to construct a dish knowledge graph.

[0076] User Portrait and Dish Knowledge Graph: Based on the generated dish features and relevant user data, etc., a user portrait and a dish knowledge graph are respectively constructed. The user portrait is used to depict the characteristics and preferences of users, and the dish knowledge graph integrates various structured information of dishes, providing a basis for subsequent personalized recommendation and other applications.

[0077] Overall, this flow chart presents the complete process from the original dish data to the generation of structured dish features, and finally the construction of the user portrait and the dish knowledge graph, which is an important preliminary step for realizing functions such as personalized dish recommendation.

[0078] In specific implementation, as described in step S3, data is extracted from the user portrait and the dish knowledge graph, combined with user personal characteristics and external dietary factors to provide personalized dish recommendations for users, and the trained dish Embedding data is stored in a vector database. A recommendation list is generated through user feature engineering and similarity calculation, and the recommended content is updated in real time to obtain the first processing result, including:

[0079] Extract data from the user portrait and the dish knowledge graph, and apply feature engineering to convert the discrete data in the data extracted from the user portrait and the dish knowledge graph into continuous data;

[0080] Use a preset two-tower model to respectively model the preset user personal characteristics and the preset dish characteristics, map discrete features through the embedding layer, use the data after feature engineering to train the preset two-tower model, and adjust the parameters with the help of an optimization algorithm;

[0081] After training is completed, the features of all dishes are converted into vector form through the model and stored in the vector database; among them, each dish is represented by a vector, and the similarity between vectors can be used to measure the similarity between dishes;

[0082] Search and infer the dishes that the user may like according to the similarity in the vector database, generate a recommendation list, and optimize according to a variety of preset factors, and regularly update and maintain the model.

[0083] In specific implementation, the implementation process of the dish recommendation part is a process involving feature engineering, artificial neural network and vector database. The detailed steps are as follows:

[0084] First, extract user-side data and dish-side data from the user portrait and the dish knowledge graph.

[0085] Secondly, apply feature engineering to the data. Through feature engineering, all discretized data is converted into continuous data to maintain a format suitable for model training.

[0086] Model Building: Using artificial neural networks, such as the two-tower model, to model user features and dish features respectively. The two-tower model is a commonly used recommendation system architecture that consists of two parallel sub-models, one for the user side (User Tower) and the other for the item side (Item Tower). Each sub-model maps discrete features to a continuous vector space through an embedding layer.

[0087] Training and Optimization: Use the data after feature engineering to train the two-tower model. During the training process, the model learns the vector representations of users and dishes, and adjusts the model parameters through optimization algorithms (such as gradient descent) to minimize the difference between the predicted scores and the actual scores.

[0088] Generating a Dish Vector Library: After training, convert the features of all dishes into vector form through the model and store them in a vector database. In this way, each dish is represented by a vector, and the similarity between vectors can be used to measure the similarity between dishes.

[0089] Inferring User Preferences: When recommending dishes for a user, the system first generates a vector representation of the user through the user's interaction data and the user-side model. Then, using the similarity search function in the vector database, find the dish vector that is most similar to the user vector, thereby inferring the dishes that the user may like.

[0090] Generating a Recommendation List: Generate a recommendation list containing the dishes that the user may like based on the similarity scores. This list can be further adjusted and optimized according to the user's historical preferences, seasonal factors, or other business logics.

[0091] Model Update and Maintenance: As new user data and dish data continue to accumulate, regularly update and maintain the recommendation model to ensure the performance and accuracy of the recommendation system.

[0092] In specific implementation, as described in steps S4 - S5, it includes:

[0093] After obtaining the dish recommendation list that the user likes, it is possible to enter the solution generation part.

[0094] The solution generation part realizes the following two functions:

[0095] 1. Integrating nutritional science principles with user preferences

[0096] This part is an innovative integration process that combines the user's personalized dish library with the structured constraints of nutritional science principles, and uses mathematical programming methods to provide customized diet plans for users. The list of dishes preferred by the user constitutes the personalized dish library, and this data reflects the user's taste preferences and eating habits. At the same time, conditions such as disease-appropriate dishes, products suitable for each conditioning stage, meal systems, whether vegetarian, the energy supply ratio of energy-yielding nutrients, and the weight of dishes stipulated by nutritional science principles serve as the structured constraints for the diet plan, ensuring the scientificity and healthiness of the recommended plan.

[0097] After inputting these two parts of data into the solver simultaneously, the system solves for a diet plan that meets the user's personalized needs and the goal of nutritional balance through mathematical programming methods such as mixed-integer programming. In this process, the solver will consider the user's preference for dishes while ensuring that the plan complies with the scientific ratio of nutritional intake and the basic principles of a healthy diet. The objective function includes improving user satisfaction, meeting nutritional needs, considering food diversity and taste balance, etc. In this way, the system can generate a set of diet plans that not only conform to the user's taste but also are nutritionally balanced.

[0098] The key to this integration method lies in its ability to provide customized diet suggestions according to the health needs and taste preferences of different users. Through mathematical programming, the system can find the optimal solution among numerous possible dish combinations, ensuring that the user's diet plan is not only personally liked but also in line with nutritional science principles. The implementation of this method not only enhances the user's dining experience but also provides a new scientific tool for health management, helping users achieve long-term health goals.

[0099] 2. Combination of real-time generation and pre-generation of plans

[0100] First of all, the system will pre-generate a series of diet plans. These plans are based on nutritional science principles and common user preferences and can serve as the basis for diet plans. These pre-generated plans not only meet the long-term goals of nutritional balance and health but also adapt to the general eating habits and lifestyles of users. As the user group evolves and nutritional science progresses, these plans will be updated irregularly to ensure their relevance and effectiveness. When new users join the system, they can quickly select one of these pre-generated plans as a starting point to provide personalized diet suggestions for users.

[0101] Based on the pre-generated plan, the system further introduces a real-time generation mechanism to address the immediate changes in user needs and specific situations. This real-time generation ability enables the system to dynamically adjust the diet plan according to the user's immediate feedback, special events, seasonal changes, or rapid changes in health status. For example, if the user suddenly needs to control the intake of a certain nutrient, or the user wants to try a specific type of dish during a particular festival, the system can quickly respond to these needs and generate a diet plan that meets the user's current requirements in real time.

[0102] In addition, the real-time generation mechanism can also perform personalized fine-tuning based on the user's long-term health data and behavior patterns. The system can learn the user's responses to different diet plans, and thus, on the basis of the pre-generated plan, provide more accurate personalized recommendations for the user. This diet plan recommendation system that combines pre-generation and real-time generation not only improves the generation efficiency of the diet plan but also significantly enhances the user's satisfaction and health benefits. Through this innovative method, the system can ensure that users can obtain a diet plan that not only suits their personal taste but also meets their health needs at any time.

[0103] In one embodiment, the present invention aims to provide a method for improving the efficiency and user experience of existing systems in diet plan recommendation and generation in the field of health management. Through automated and intelligent data annotation, effective integration of nutritional science principles and user personal preferences, and adoption of a diet plan generation mode that combines real-time and pre-generation to cover a wider and more professional health management application scenario.

[0104] Please refer to Figure 4 , Figure 4 which is a schematic diagram of the composition of a personalized recipe recommendation system with a large model and a dual-generation mode shown according to an exemplary embodiment. The system includes:

[0105] An acquisition module 40, configured to acquire catering business data; the catering business data includes: user data, user-dish interaction data, and dish data;

[0106] A first processing module 41, configured to use the catering business data to generate dish features through a preset large language model and structured output, construct a dish knowledge graph, and construct a user portrait using the catering business data;

[0107] A second processing module 42, configured to extract data from the user portrait and the dish knowledge graph, combine it with the user's personal characteristics and external dietary factors, provide personalized dish recommendations for the user, store the trained dish Embedding data in a vector database, generate a recommendation list through user feature engineering and similarity calculation, and update the recommended content in real time to obtain a first processing result;

[0108] The third processing module 43 is configured to utilize the first processing result, integrate nutritional science principles with user preferences, and obtain a diet plan that meets the user's personalized needs and the goal of nutritional balance.

[0109] The fourth processing module 44 is configured to utilize the diet plan that meets the user's personalized needs and the goal of nutritional balance, and combine real-time generation and pre-generation means to generate a user-customized diet plan.

[0110] Please refer to Figure 5 , Figure 5 FIG. is a schematic diagram of the composition of a personalized recipe recommendation device with a large model and a dual-generation mode shown according to an exemplary embodiment. The device includes:

[0111] A memory 51, on which an executable program is stored;

[0112] A processor 52 is configured to execute the executable program in the memory 51 to implement the steps of the method described in any one of the above.

[0113] It can be understood that the same or similar parts in the above embodiments can be referred to each other, and the content not detailed in some embodiments can be seen in the same or similar content in other embodiments.

[0114] It should be noted that in the description of the present invention, terms such as "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "a plurality of" refers to at least two.

[0115] Any process or method description in the flowchart or described in other ways herein can be understood as representing a module, segment, or part of code including one or more executable instructions for implementing a specific logical function or process. The scope of the preferred embodiments of the present invention includes additional implementations, where the functions can be executed in a substantially simultaneous manner or in an order opposite to that shown or discussed, according to the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0116] It should be understood that each part of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following well-known technologies in the art can be used: discrete logic circuits with logic gate circuits for implementing logical functions on data signals, application-specific integrated circuits with appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0117] Those of ordinary skill in the art can understand that all or part of the steps carried out in implementing the methods of the above embodiments can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.

[0118] In addition, in each of the embodiments of the present invention, the functional units can be integrated into a processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. When the above integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0119] The above-mentioned storage medium can be a read-only memory, a magnetic disk, an optical disc, or the like.

[0120] In the description of this specification, the description with reference to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples.

[0121] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.

Claims

1. A personalized recipe recommendation method based on a large model and dual generation mode, characterized in that: The method comprises: Acquire catering business data; the catering business data includes: user data, user-dish interaction data, and dish data; Using the catering business data, generating dish features through a preset large language model and structured output, constructing a dish knowledge graph, and using the catering business data to construct a user portrait; Extracting data from the user portrait and the dish knowledge graph, combining it with the user's personal characteristics and external dietary factors, providing the user with personalized dish recommendations, storing the trained dish embedding data in a vector database, generating a recommendation list through user feature engineering and similarity calculation, and updating the recommendation content in real time to obtain a first processing result; Using the first processing result, integrating the principles of nutrition science with user preferences, a diet plan that meets the user's personalized needs and nutritional balance goals is obtained; The dietary plan that meets the user's personalized needs and nutritional balance goals is used, combined with real-time generation and pre-generation methods, to generate a user-customized dietary plan.

2. The method according to claim 1, characterized in that The method of using the catering business data to generate dish features through a preset large language model and structured output, constructing a dish knowledge graph, and using the catering business data to construct a user portrait includes: The catering business data is combined with the prompt words of the preset large language model and then input into the preset large language model, the preset large language model calls the structure tool to output the content in the specified format, and the output parser parses it to obtain structured data; If the parsing reports an error, the large language model is returned for error correction and regeneration to obtain the derived dish features and convert them into entities and relationships to construct a dish knowledge graph; Cleaning the user data and user-dish interaction data, and performing feature engineering extraction and constructing relevant features using the cleaned user data and user-dish interaction data; The cleaned user data and user-dish interaction data are used to perform feature engineering extraction and construct relevant feature processing results, user grouping is performed through a clustering algorithm, and a user portrait model is constructed using machine learning and data mining techniques.

3. The method according to claim 1, characterized in that The data is extracted from the user portrait and the dish knowledge graph, combined with the user's personal characteristics and external dietary factors, to provide the user with personalized dish recommendations, and the trained dish embedding data is stored in a vector database, a recommendation list is generated through user feature engineering and similarity calculation, and the recommendation content is updated in real time to obtain a first processing result, including: Extract data from user portraits and dish knowledge graphs, and apply feature engineering to convert discrete data from the data extracted from user portraits and dish knowledge graphs into continuous data; Use the preset double-tower model to model the preset user personal features and the preset dish features respectively, map the discrete features through the embedding layer, use the feature-engineered data to train the preset double-tower model, and adjust the parameters with the help of the optimization algorithm; After training, the features of all dishes are converted into vector form through the model and stored in the vector database. Each dish is represented by a vector, and the similarity between vectors can be used to measure the similarity between dishes. Based on the similarity search in the vector database, we infer the dishes that the user may like, generate a recommendation list, optimize it based on multiple preset factors, and regularly update and maintain the model.

4. The method according to claim 1, characterized in that The preset double tower model includes: Two parallel sub-models, one for the user side and the other for the item side.

5. The method according to claim 1, characterized in that The method of using the first processing result to integrate the principles of nutrition science and user preferences to obtain a diet plan that meets the user's personalized needs and nutritional balance goals includes: Obtain a list of recommended dishes that users like and build a personalized dish library; The personalized menu library and the disease-appropriate dishes stipulated by the principles of nutrition science, the appropriate products for each conditioning stage, the meal system, whether it is vegetarian, the energy supply ratio of production nutrients, and the weight of the dishes are used as structural constraints; The structured constraints are input into a planning solver, and a diet plan that meets the user's personalized needs and nutritional balance goals is solved through a preset mathematical planning method.

6. The method according to claim 1, characterized in that The method of using the diet plan that meets the user's personalized needs and nutritional balance goals, combined with real-time generation and pre-generation means, to generate a user-customized diet plan includes: Using the diet plan that meets the user's personalized needs and nutritional balance goals, a diet plan based on nutritional science principles and common user preferences is pre-generated; When a user joins the system, they select one of the pre-generated plans as a starting point to provide personalized dietary recommendations; A real-time generation mechanism is introduced to dynamically adjust and personalize pre-generated plans based on users' immediate feedback, special events, seasonal changes, rapid changes in health status, or long-term health data and behavior patterns, and to generate a diet plan that meets users' current needs in real time.

7. A personalized recipe recommendation system of a large model and a dual generation mode, applied to a personalized recipe recommendation method of a large model and a dual generation mode as described in any one of claims 1 to 5, characterized in that: The system comprises: An acquisition module, used to acquire catering business data; the catering business data includes: user data, user-dish interaction data, and dish data; A first processing module is used to use the catering business data to generate dish features through a preset large language model and structured output, build a dish knowledge graph, and use the catering business data to build a user portrait; The second processing module is used to extract data from the user portrait and the dish knowledge graph, combine it with the user's personal characteristics and external dietary factors, provide personalized dish recommendations for the user, store the trained dish embedding data in the vector database, generate a recommendation list through user feature engineering and similarity calculation, and update the recommendation content in real time to obtain a first processing result; The third processing module is used to use the first processing result to integrate the nutrition science principle and the user's preferences to obtain a diet plan that meets the user's personalized needs and nutritional balance goals; The fourth processing module is used to generate a user-customized diet plan by utilizing the diet plan that meets the user's personalized needs and nutritional balance goals, combined with real-time generation and pre-generation means.

8. A personalized recipe recommendation device with a large model and dual generation mode, characterized in that: The device comprises: a memory having an executable program stored therein; A processor, configured to execute the executable program in the memory to implement the steps of the method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Client portrait data analysis-based nursing scheme recommendation method

    CN121075534A

  • Recipe recommendation method and system based on machine learning

    CN121119194A