Method and system for intelligently recommending recipes

By constructing an intelligent recipe recommendation system that comprehensively considers the properties of food and traditional Chinese medicine attributes, and optimizes the recommendation logic using collaborative filtering and weighted scoring, the system solves the problem that existing recipe design systems cannot meet personalized needs, and achieves personalized nutritionally balanced recipe recommendations, effectively preventing chronic diseases.

CN120853818APending Publication Date: 2025-10-28SOUTH CHINA AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510799937.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing recipe design systems cannot simultaneously meet individual personalized needs and diverse health goals. They lack in-depth analysis of users' health status, food preferences, and nutritional needs, resulting in insufficient practicality and relevance in recommendations.

Method used

By constructing an intelligent recipe recommendation system that comprehensively considers the properties, nutritional components, and traditional Chinese medicine attributes of food, it provides users with personalized functional conditioning recipes. It utilizes collaborative filtering and latent semantic models for food recommendation, optimizes the recommendation logic through weighted scoring and conflict rules, and dynamically adjusts the weights based on user feedback.

Benefits of technology

It enables the provision of personalized, nutritionally balanced recipes based on users' health conditions and food preferences, effectively preventing and controlling the occurrence of chronic diseases and meeting the dietary needs of multi-objective synergistic optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120853818A_ABST
    Figure CN120853818A_ABST
Patent Text Reader

Abstract

The invention relates to a method and system for intelligently recommending recipes, and the method comprises the steps: marking functional labels for foods according to the properties and tastes of the foods and the corresponding traditional Chinese medicine attributes, and storing the functional labels in a database; selecting keywords of food names or function labels according to user preferences or traditional Chinese medicine symptoms, screening out the food from the database, and providing diet conditioning suggestions containing the food according to medical attributes; according to one or more functional requirements of the user, a food list meeting the functional requirements is screened based on the database; performing weighted scoring on the food screened out from the food list, and recommending a corresponding dietary therapy mode according to score sorting; and according to the traditional Chinese medicine attributes and function label data corresponding to the selected food, integrating and filtering conflicting diet conditioning suggestions and dietary therapy modes, and providing a personalized function conditioning recipe for the user. According to the invention, food preferences, food attributes and functions can be comprehensively considered, so that more personalized recipes can be provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of food query and recommendation algorithms, specifically to a method and system for intelligent recipe recommendation. Background Art

[0002] With social progress and improved living standards, people's dietary needs have evolved from simply satisfying hunger to pursuing health, nutrition, and personalization. However, current recipe design generally suffers from monotony and repetition, failing to simultaneously meet the personalized needs and diverse health goals of different individuals. For example, the incidence of chronic diseases such as obesity, diabetes, and cardiovascular diseases is rising year by year and showing a trend towards affecting younger people. These diseases are closely related to unhealthy eating habits. Most existing recipe design systems lack in-depth analysis of individual health needs and cannot make accurate recommendations based on users' health status, food preferences, and nutritional requirements, resulting in insufficient practicality and relevance of recipe recommendations based on this database.

[0003] Food is the essential material basis for human life, growth, development, and health. A balanced diet not only promotes normal physiological functions but also improves health, enhances disease resistance, and boosts immunity. However, existing dietary design systems often focus only on single nutritional indicators or health goals, lacking consideration for the synergistic optimization of multiple objectives. For example, some systems focus solely on calorie control, neglecting the balance of micronutrients, vitamins, and other nutrients in food; others rely too heavily on fixed dietary patterns, failing to adapt flexibly to individual health conditions and food preferences. Summary of the Invention

[0004] To address the problems existing in the prior art, one objective of this invention is to provide a method for intelligently recommending recipes. This method comprehensively considers food preferences, food attributes, and functions to provide recipes that better meet the user's personalized needs. A second objective of this invention is to provide a system for intelligently recommending recipes. This system, based on the user's selections and queries, and in conjunction with the aforementioned method, provides personalized functional conditioning recipes.

[0005] The present invention discloses a method and system for intelligent recipe recommendation, comprising the following steps:

[0006] S1. Label the food with functional tags according to its properties and corresponding TCM attributes, and store them in the database;

[0007] S2. Based on the user's preferences or TCM syndrome type, select the food name or keywords of the functional label, filter these foods in the database, and provide dietary conditioning suggestions containing these foods according to their TCM attributes.

[0008] S3. Based on one or more functional requirements of the user, filter the food list that meets these functional requirements from the database;

[0009] S4. Weight the food selected from the food list and recommend corresponding dietary therapy methods according to the scores.

[0010] S5. Based on the TCM attributes and functional label data corresponding to the selected food, integrate and filter conflicting dietary conditioning suggestions and dietary therapy methods to provide users with personalized functional conditioning recipes.

[0011] In one embodiment, in step S1, the database also stores nutritional data of food, marks the intensity of the food's properties and flavors, and associates them with the contraindications of the TCM syndrome type, so as to generate filtering conditions to exclude contraindicated foods when screening food in subsequent steps.

[0012] In one embodiment, in step S2, before selecting food according to the user's preferences, a recommendation list is generated for the user by analyzing the similarity between the user and other users or the similarity between the food selected by the user and other foods through collaborative filtering, including the following steps:

[0013] S21. Data preprocessing: Clean user behavior data, construct user-food interaction matrix, and fill in missing values ​​by filling in the mean or combining the similarity of the food's TCM attributes.

[0014] S22. Similarity Calculation:

[0015] Similarity coefficient between users:

[0016] Where i represents each food item, I uv For multiple food items that two users have rated together, r ui For one user's rating of a certain food item, r is the average number of ratings given by one user for multiple foods that are rated together. vi For another user's rating of a certain food item, The average of the number of ratings given by another user for multiple food items that are rated together;

[0017] Similarity coefficient between the selected food and other foods:

[0018] in, This is based on the average rating of all users for the selected food. This is based on the average rating of all users for a particular food other than the selected food.

[0019] S23. Sort the lists according to the similarity coefficients and generate recommendation lists accordingly:

[0020] User recommendation list: Select the top M similar users, aggregate their favorite foods, and filter out interacted items;

[0021] Food recommendation list: For each item in the user's historical food list, recommend the top N most similar foods;

[0022] S24. Introduce a time decay factor to give higher weight to the user's recent behavior, and perform a mixed recommendation by combining the user recommendation list and the food recommendation list.

[0023] In one embodiment, when generating a recommendation list for a user, the user's interest in uninterrupted food items is also predicted using a latent semantic model, including the following steps:

[0024] S25. Matrix Decomposition: Decompose the user rating matrix R for each food item into: R≈P·Q T Where P represents the user's preference for the latent feature, and Q represents the association between food and the latent feature;

[0025] S26. Calculate the loss function: Where K represents each latent feature, p uk q represents the parameters representing the user's preferences for each latent feature. ki λ represents the parameters of each implicit feature of the food, and λ is the regularization coefficient.

[0026] S27. Add stochastic gradient descent parameter update rules:

[0027] p uk ←p uk +α(e ui ·q ki -λp uk ),

[0028] p uk ←p uk +α(e ui ·q ki -λp uk ),

[0029] Among them, e ui Let α be the score prediction error and α be the learning rate.

[0030] In one embodiment, the weighted scoring method in step S4 includes the following steps:

[0031] S41. Construct a hierarchical structure, divided into a target layer for optimal food recommendation, a criteria layer for analyzing various food indicators, and a scheme layer for candidate foods.

[0032] S42. Establish a judgment matrix. The user performs pairwise importance comparisons on each indicator in the criterion layer and assigns a value to each. ij ;

[0033] S43. Calculate the geometric mean for each row of indicators, and obtain the weights through a normalized vector, using the following formula:

[0034] Geometric mean of each indicator:

[0035] Normalized weight vector:

[0036] Where n is the number of indicators and is at least 3;

[0037] S44. Consistency check:

[0038] Consistency Indicators:

[0039] Consistency ratio:

[0040] Where, λ max To determine the maximum eigenvalue of the mean of the product of the judgment matrix and the weight vector, RI is the random consistency index parameter. If CR < 0.1, the test is passed; otherwise, the judgment matrix is ​​readjusted.

[0041] S45. Calculate the overall score using weighted summation, and recommend candidates based on their scores.

[0042] In one embodiment, the method further includes collecting user feedback on the recommendation results and dynamically updating the weight coefficients of the functional requirements, including the following steps:

[0043] S46. Collect user behavior data in real time, using clicks as positive feedback and skips as negative feedback, and score recommended food items accordingly;

[0044] S47. Define the loss function for the weight vector W. Calculate the gradient of the function Update weight W new =W old -α(y pred -y true )·X, where the predicted value y pred =W T ·X, y true This refers to actual user behavior.

[0045] In one embodiment, step S1 further includes periodically updating the database, specifically as follows:

[0046] S11. Regularly crawl web page data and authoritative database data;

[0047] S12. Remove duplicate data based on hash value or unique identifier, extract structured data using regular expressions, and prioritize data from authoritative sources or with the latest timestamp if there is a conflict between new and old data.

[0048] S13. Use machine learning models to automatically label new food items with functional tags and TCM attributes, use pre-trained models for multi-label classification, construct keyword and attribute mapping based on TCM classics, and fine-tune the pre-trained models for text classification.

[0049] S14. For newly added foods with low confidence in model prediction, trigger the manual review process, add the manually labeled results to the training set, and iteratively optimize the model.

[0050] In one embodiment, in step S3, when there is a logical conflict among the multiple functional requirements selected by the user, a prompt message is generated and an alternative solution is provided. Specifically, this includes the following steps:

[0051] S31. Define conflict rules, each of the conflict rules defining a set of mutually exclusive combinations of the functional requirements and associating alternatives;

[0052] S32. Check if the conflict rule exists in the list of functional requirements selected by the user;

[0053] S33. Based on the alternatives defined in the conflict rules, and combined with user historical behavior or group preferences, generate optimization suggestions;

[0054] S34. Dynamically adjust the weights of the conflict rules based on user feedback and expert review;

[0055] S35. The conflict rules are classified according to the weights, and similar conflict rules are merged periodically, while low-frequency conflict rules are removed.

[0056] The present invention provides a system for intelligent recipe recommendation, which applies the method for intelligent recipe recommendation described above, including:

[0057] The interaction module is used to receive food query conditions, TCM attributes and functional requirements input by the user, and to visually display the matching food list, nutritional data and personalized functional conditioning recipes.

[0058] The storage module is used to establish a database of food and recipes to store data on the types of food, their corresponding properties, nutritional components and traditional Chinese medicine attributes, as well as recipe data containing each food.

[0059] The query module is connected to both the interaction module and the storage module. The query module is used to extract data from the database based on the information input by the user and feed it back to the interaction module.

[0060] A processing module, connected to the query module, is used to control the query module to extract data from the database according to an algorithm;

[0061] The processing module includes:

[0062] A conflict detection module is used to detect whether there is a conflict between the functional requirements selected by the user and to provide alternative solutions.

[0063] An analysis module is used to filter a list of foods that meet the functional requirements according to a preset algorithm.

[0064] The recommendation module is connected to the analysis module. The recommendation module is used to collaboratively recommend unselected foods based on the foods selected by the analysis module and the choices of other users, and to integrate and recommend personalized functional conditioning recipes.

[0065] In one embodiment, the system further includes:

[0066] A feedback module, connected to the interaction module, is used to collect user feedback on the recommendation results of the recommendation module and optimize the function matching weights and recommendation logic through machine learning algorithms.

[0067] The review module is connected to the processing module and is used to invite experts to review the recommendation results.

[0068] The dynamic update module is connected to the storage module, the feedback module, the review module, and the analysis module. The dynamic update module is used to periodically access authoritative nutrition databases and traditional Chinese medicine classics data sources, input the traditional Chinese medicine attributes of newly added foods into the database and automatically label the functional tags, update the correspondence between the traditional Chinese medicine attributes and functional requirements of the foods, and adjust the functional matching weight coefficient of the algorithm in the analysis module according to the feedback module and the review module.

[0069] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:

[0070] This invention conducts research from the perspective of health conditioning, constructing a tag database that comprehensively considers food preferences, food attributes, and functions. By utilizing recipe design techniques such as the balanced diet pyramid and food standard portion estimation methods, it designs nutritional recipes that address diverse individual needs. Simultaneously, this invention constructs a multi-objective collaborative system for recipe creation, recommendation, and nutritional evaluation in health conditioning, achieving intelligent recipe recommendations that both conform to dietary nutritional balance theory and meet individual needs. Such a system not only helps users achieve nutritional balance but also provides personalized recipe recommendations based on individual health conditions, food preferences, and health goals, thereby effectively preventing and controlling the occurrence of chronic diseases. Attached Figure Description

[0071] Figure 1 This is a flowchart of a method for intelligently recommending recipes according to the present invention;

[0072] Figure 2 This is a schematic diagram of the entity relationships in the database of this invention;

[0073] Figure 3 This is a schematic diagram showing the connections of the modules of the intelligent recipe recommendation system of the present invention. Detailed Implementation

[0074] The accompanying drawings are for illustrative purposes only and should not be construed as limiting the scope of this patent. To better illustrate this embodiment, some components in the drawings may be omitted, enlarged, or reduced, and do not represent the actual dimensions of the product. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0075] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation" and "connection" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances. The technical solution of this invention will be further described below with reference to the accompanying drawings and embodiments.

[0076] like Figure 1 and Figure 2 As shown, the present invention provides a method and system for intelligent recipe recommendation, comprising the following steps:

[0077] S1. Label the food with functional tags according to its properties and corresponding TCM attributes, and store them in the database;

[0078] S2. Based on user preferences or TCM syndrome types, select keywords for food names or functional labels, filter these foods from the database, and provide dietary conditioning suggestions containing these foods based on their TCM attributes.

[0079] S3. Based on one or more functional requirements of the user, filter the food list that meets these functional requirements from the database;

[0080] S4. Weight the food selected from the food list and recommend corresponding dietary therapy methods according to the scores.

[0081] S5. Based on the TCM attributes and functional labels of the selected foods, integrate and filter conflicting dietary conditioning suggestions and food therapy methods to provide users with personalized functional conditioning recipes.

[0082] This invention conducts research from the perspective of health conditioning, constructs a label database that can comprehensively consider food preferences, food attributes and functions, and designs nutritional recipes that can meet different personalized needs by using recipe design techniques such as the balanced diet pyramid and food standard portion estimation method.

[0083] Furthermore, in step S1, the database also stores nutritional data of the food, assigns intensity to the food's properties and flavors, and associates these with the contraindications of TCM syndrome types to generate filtering conditions to exclude contraindicated foods during subsequent food selection steps. For example... Figure 2 As shown, various data and labels related to food form a database. The nutritional data of food includes the content of calories, protein, fat, carbohydrates, trace elements and vitamins. The nature and flavor of food are classified as the four natures and five flavors, including cold, hot, warm, cool, pungent, sweet, sour, bitter and salty. The four natures and five flavors are distinguished by intensity. For example, "warm" is medium intensity and "hot" is high intensity. "Sweet" can be divided into "dampness-inducing sweetness" such as honey and "dampness-eliminating sweetness" such as Job's tears. This is associated with the contraindications of TCM syndrome types. The TCM syndrome types are set according to the user's selection, including qi deficiency, blood deficiency, yin deficiency, yang deficiency, phlegm-dampness, damp-heat, blood stasis, etc.

[0084] In addition, step S1 also includes periodically updating the database, the specific steps of which are as follows:

[0085] S11. Regularly crawl web page data and authoritative database data, for example, by using crawler algorithms or API integration;

[0086] S12. Based on hash values ​​or unique identifiers such as food names, remove duplicate data. Use regular expressions such as spaCy, a basic natural language processing technology tool, to extract structured data. For example, parse "calories: 100kcal" into "calories":100 and "unit":"kcal". If there is a conflict between old and new data, prioritize the data from authoritative sources or the latest timestamp.

[0087] S13. Use machine learning models to automatically label new food items with functional tags and TCM attributes. This can be done using a pre-trained language model based on Transformer, such as the BERT language representation model, to construct keyword and attribute mappings based on TCM classics, and then fine-tune the pre-trained model for text classification and functional tag classification.

[0088] S14. For newly added foods with low confidence in model prediction, trigger the manual review process, add the manually labeled results to the training set, and iteratively optimize the model.

[0089] This method can periodically initiate update tasks, thereby calling the application interface to obtain network data and update the database. Existing food data will be modified in the database based on more authoritative or more up-to-date data. When new food is detected, the automatic labeling function and TCM attributes are triggered. Optionally, human expert review can be added. For new food with insufficient data or low authority, human labeling results can be introduced and stored in the database. The established neuro-language programming (NLP) model can optimize the automatic labeling function based on the labeling results.

[0090] In one embodiment, for the logical process of a user receiving dietary recommendations by selecting food, in step S2, before selecting food according to the user's preferences, collaborative filtering is used to analyze the similarity between the user and other users or the similarity between the food selected by the user and other foods to generate a recommendation list for the user, including the following steps:

[0091] S21. Data preprocessing: Clean user behavior data, construct user-food interaction matrix, and fill in missing values ​​by filling in the mean or combining the similarity of food's TCM attributes.

[0092] S22. Similarity Calculation:

[0093] Similarity coefficient between users:

[0094] Where i represents each food item, I uv For multiple food items that two users have rated together, r ui For one user's rating of a certain food item, r is the average number of ratings given by one user for multiple foods that are rated together. viFor another user's rating of a certain food item, The average of the number of ratings given by another user for multiple food items that are rated together;

[0095] Similarity coefficient between the selected food and other foods:

[0096] in, This is based on the average rating of all users for the selected food. This is based on the average rating of all users for a particular food other than the selected food.

[0097] S23. Sort by similarity coefficient and generate recommendation lists respectively:

[0098] User recommendation list: Select the top M similar users, aggregate their favorite foods, and filter out interacted items;

[0099] Food recommendation list: For each item in the user's historical food list, recommend the top N most similar foods;

[0100] S24. Introduce a time decay factor to give higher weight to the user's recent behavior and combine it with the user recommendation list and food recommendation list for mixed recommendations.

[0101] When generating recommendation lists for users, a latent semantic model is also used to predict users' interest in foods they haven't interacted with, including the following steps:

[0102] S25. Matrix Decomposition: Decompose the user rating matrix R for each food item into: R≈P·Q T Where P represents the user's preference for the latent feature, and Q represents the association between food and the latent feature;

[0103] S26. Calculate the loss function: Where K represents each implicit feature, which can be preset to 100, and p uk q represents the parameters representing the user's preferences for each latent feature. ki λ is the parameter of each latent feature of the food, and λ is the regularization coefficient, which can be preset to 0.01. The first term of this function is the prediction error term, that is, the mean square error between the actual score and the predicted score, while the second term is the regularization term, which prevents the model from overfitting by penalizing the norm of the user and the food latent feature vector.

[0104] S27. Add stochastic gradient descent parameter update rules:

[0105] p uk ←p uk +α(e ui ·q ki -λp uk ),

[0106] p uk ←p uk +α(e ui ·q ki -λp uk ),

[0107] Among them, e ui The rating prediction error is represented by α, which is the learning rate and can be preset to 0.02. For implicit feedback data, i.e., when users only have positive samples, negative samples need to be sampled from popular foods that users have not interacted with.

[0108] When users search for or select relevant tags based on their own circumstances, they can provide corresponding TCM symptom types or desired TCM attributes for selection, or they can directly select food according to their preferences. Food recommendations for users can be divided into two categories: recommendations based on food selected by similar users or recommendations based on the user's historical food selections. Similarity is mainly calculated using the steps and formulas described above, and some unselected foods will be recommended based on the calculation, especially foods that users rarely select but are highly similar to their historical dietary records or desired functionalities. The above steps constitute the collaborative filtering mechanism, for example:

[0109] The ratings given by users A, B, and C for certain foods are presented in the following table:

[0110] Table 1 shows the user ratings for five of the food items.

[0111]

[0112] User-based collaborative filtering calculates similarity based on:

[0113]

[0114] Based on this analysis, User A and User B have a high degree of similarity. Since User A did not select eggs and salmon as the food, the recommended priority for User A is eggs, followed by salmon.

[0115] Based on food-based collaborative filtering, since user D likes apples, bananas, which are similar to apples, are recommended. The similarity is calculated as follows:

[0116]

[0117] Based on this analysis, apples and bananas have a high degree of similarity, and user D received a recommendation for bananas as the food.

[0118] For predicting user preferences for unrated foods, it's necessary to calculate the user's predicted rating for that food and then use the formula above to determine whether it should be recommended to the user. Similarly, using the table above as an example, based on the nutritional components of the food, the matrix can be decomposed into the following two matrices relating to the implicit features:

[0119] Table 2 shows the relationship parameters between users and latent features.

[0120] user Feature 1 (Sweetness Preference) Feature 2 (Protein Requirements) A 0.8 0.2 B 0.7 0.5 C 0.1 0.9

[0121] Table 3 shows the relationship parameters between food and latent features.

[0122] food Feature 1 (Sweetness) Feature 2 (Protein Requirements) apple 0.9 0.1 banana 0.8 0.3 oat 0.2 0.7 egg 0.1 0.9 salmon 0.1 0.8

[0123] The predicted rating is calculated accordingly. For example, user A's rating for eggs is 0.8×0.1+0.2×0.9=0.26, and user C's predicted rating for apples is 0.1×0.9+0.9×0.1=0.18.

[0124] After selecting foods, the system will combine them into a corresponding recipe or exclude some prohibited foods based on preset taboo rules. This is done based on the user's selected TCM syndrome type, for example, foods with "hot," "warm," "sweet (promoting dampness)," and "pungent" properties are prohibited for those with a damp-heat constitution. So, when recommending foods to this customer, the system will dynamically filter out these types of foods. Sometimes, through manual verification and modification of the rules by TCM experts, for example, allowing some warm foods for those with a damp-heat constitution, the taboo against "warm" foods can also be removed. This would exclude foods such as ginger (pungent, warm), mutton (sweet, hot), and honey (sweet, promoting dampness); and retain foods such as Job's tears (sweet, promoting dampness), winter melon (sweet, cold), and bitter melon (bitter, cold).

[0125] In one embodiment, the logical process of recommending dietary therapy methods when a user selects functional requirements includes the following steps in step S3: when multiple functional requirements selected by the user have logical conflicts, a prompt message is generated and an alternative solution is provided.

[0126] S31. Define conflict rules. Each conflict rule defines a set of mutually exclusive functional requirements and associates alternative solutions.

[0127] S32. Check if there are any conflicting rules in the user's selected list of functional requirements;

[0128] S33. Generate optimization suggestions based on alternatives defined in the conflict rules, combined with user history or group preferences;

[0129] S34. Dynamically adjust the weight of conflict rules based on user feedback and expert review;

[0130] S35. Classify conflicting rules by weight and periodically merge similar conflicting rules, while removing low-frequency conflicting rules.

[0131] For example, "weight control" and "high calorie requirement" are a set of mutually exclusive conflicting rules. When selected together, users can be forced to choose either a hard conflict or a soft conflict, thereby adjusting alternatives such as changing "weight control" to "weight maintenance," or "high calorie requirement" to "high protein requirement," or "keeping calories ≤1800kcal," and then recommending recipes such as chicken breast salad. In addition, there are conflicting rules related to nutrition, such as "low-fat" and "high-fat requirement"; and conflicting rules related to Traditional Chinese Medicine theory, such as "Yin deficiency constitution" avoiding "hot foods," and these rules can be referenced and applied simultaneously.

[0132] Furthermore, after listing the food items through the various recommendations and selections mentioned above, in step S4, the food items are sorted by weighted score to recommend a suitable recipe by combining the top N food items. The weighted score method includes the following steps:

[0133] S41. Construct a hierarchical structure, divided into a target layer for optimal food recommendation, a criteria layer for analyzing various food indicators, and a scheme layer for candidate foods.

[0134] S42. Establish a judgment matrix. The user performs pairwise importance comparisons on each indicator in the criterion layer and assigns a value to each. ij ;

[0135] S43. Calculate the geometric mean for each row of indicators, and obtain the weights through a normalized vector, using the following formula:

[0136] Geometric mean of each indicator:

[0137] Normalized weight vector:

[0138] Where n is the number of indicators and is at least 3;

[0139] S44. Consistency check:

[0140] Consistency Indicators:

[0141] Consistency ratio:

[0142] Where, λ max To determine the maximum eigenvalue of the mean of the product of the judgment matrix and the weight vector, RI is the random consistency index parameter. If CR < 0.1, the test is passed; otherwise, the judgment matrix is ​​readjusted.

[0143] S45. Calculate the overall score using weighted summation, and recommend candidates based on their scores.

[0144] For example: Based on the pairwise comparisons of users with each indicator in the criteria layer, construct a 5×5 judgment matrix:

[0145] Table 4 shows the judgment matrix obtained from pairwise comparisons of food indicators C1 to C5.

[0146] C1 C2 C3 C4 C5 C1 1 3 5 7 9 C2 1 / 3 1 3 5 7 C3 1 / 5 1 / 3 1 3 5 C4 1 / 7 1 / 5 1 / 3 1 3 C5 1 / 9 1 / 7 1 / 5 1 / 3 1

[0147] This matrix reflects the user's subjective judgment of the importance of each criterion; for example, C1 represents the nutritional balance ratio, and C2 represents the functional regulation importance scale of 3. Then, the geometric mean is calculated for each row of indicators. For example, row C1 yields: Then normalize the geometric mean vector to obtain the weights: Finally, a consistency test was performed. When n=5, RI=1.12 and CR<0.1, so the test was passed.

[0148] In addition, this method also includes collecting user feedback on the recommendation results and dynamically updating the weight coefficients of functional requirements, including the following steps:

[0149] S46. Collect user behavior data in real time, using clicks as positive feedback and skips as negative feedback, and score recommended food items accordingly;

[0150] S47. Define the loss function for the weight vector W. Calculate the gradient of the function Update weight W new =W old -α(y pred -y true )·X, where the predicted value y pred =W T ·X, y true This refers to actual user behavior.

[0151] User feedback can also influence weighting coefficients, making it easier to reflect a customer's personalized needs in the recommendation results, thereby adjusting the priority of certain functional requirements. Secondly, based on the above calculations, a learning framework can be further introduced. Using the Q-learning algorithm from existing technologies, the optimal weight adjustment strategy can be learned to maximize long-term cumulative rewards. For example, rewards could be based on user satisfaction: +1 for click-through rate and -1 for skipped user, as shown in the formula: The algorithm updates iteratively until the Q-value converges; alternatively, the policy gradient from existing techniques can be introduced to directly optimize the probability distribution of the weight adjustment policy, as shown in the formula:

[0152] like Figure 3 As shown, the present invention provides a system for intelligently recommending recipes, which applies the method for intelligently recommending recipes described above, including:

[0153] The interaction module receives user input of food search criteria, TCM attributes, and functional requirements, and visually displays a list of matching foods, nutritional data, and personalized functional conditioning recipes.

[0154] The storage module is used to build a database of food and recipes to store data on the types of food, their corresponding properties, nutritional components and traditional Chinese medicine attributes, as well as recipe data containing each food. For example, the database entry can refer to books such as "Dietary Guidelines for Adult Hyperlipidemia", "Guidelines for the Diagnosis and Treatment of Obesity", and "Dietary Guidelines for Children and Adolescents with Growth Retardation" published by the General Office of the National Health Commission.

[0155] The query module is connected to both the interaction module and the storage module. The query module is used to extract data from the database based on the information input by the user and then feed it back to the interaction module.

[0156] The processing module, connected to the query module, is used to control the query module to extract data from the database according to the algorithm.

[0157] The processing module includes:

[0158] The conflict detection module is used to detect whether there are conflicts between the functional requirements selected by the user and to provide alternative solutions.

[0159] The analysis module is used to filter the food list that meets the functional requirements according to a preset algorithm;

[0160] The recommendation module, connected to the analysis module, is used to collaboratively recommend unselected foods based on the foods filtered by the analysis module and the choices of other users, as well as to integrate and recommend personalized functional recipes.

[0161] This invention constructs a multi-objective collaborative system for health management, including recipe creation, recommendation, and nutritional evaluation. This system provides intelligent recipe recommendations that conform to dietary balance theory while also meeting individual needs. Such a system not only helps users achieve nutritional balance but also provides personalized recipe recommendations based on individual health conditions, food preferences, and health goals, thereby effectively preventing and controlling the occurrence of chronic diseases.

[0162] Specifically, this system also includes:

[0163] The feedback module, connected to the interaction module, is used to collect user feedback on the recommendation results of the recommendation module and optimize the function matching weights and recommendation logic through machine learning algorithms.

[0164] The review module, connected to the processing module, is used to invite experts to review the recommendation results.

[0165] The dynamic update module is connected to the storage module, feedback module, review module, and analysis module. It is used to periodically access authoritative nutrition databases and traditional Chinese medicine classics, such as books from different places or the internet, like "Your Depression Can Be Improved 90% of the Time Through Food" by Tokumi Fujikawa, published by Beijing Science and Technology Press. The module inputs the traditional Chinese medicine attributes of new foods into the database and automatically labels them with function tags, updates the correspondence between the traditional Chinese medicine attributes and functional requirements of the foods, and adjusts the function matching weight coefficients of the algorithm in the analysis module according to the feedback module and the review module.

[0166] Example 1:

[0167] Suppose user A is a diabetic patient with symptoms of Qi deficiency. The user inputs "diabetes" and "Qi deficiency" as search criteria into the system. The system first filters for low-GI (glycemic index) foods using the query module, then recommends suitable foods for those with Qi deficiency based on the processing module's algorithm, such as chestnuts and yams. Finally, the system generates a list of recommended low-GI foods suitable for those with Qi deficiency, along with detailed dietary advice.

[0168] Example 2:

[0169] User B is obese and wants to control their weight and improve their sleep quality through diet. The user selects "control weight" and "improve sleep" as their desired functions. The system then filters out low-calorie foods rich in tryptophan, such as oats and bananas, and generates a recommendation list.

[0170] Example 3:

[0171] User C suffers from hypertension and wants to prevent hypertension and regulate mood through diet. The user selects "prevent hypertension" and "regulate mood" as their functional requirements. The system then filters out low-sodium, magnesium-rich foods such as spinach and almonds, and generates a recommendation list.

[0172] Example 4:

[0173] User D has a damp-heat constitution and hopes to improve it through dietary adjustments. The user inputs "damp-heat" as their TCM syndrome type, and the system recommends suitable foods for this constitution, such as Job's tears and mung beans, generating a recommendation list.

[0174] The system of this invention can provide accurate and personalized food and recipe recommendations based on the user's health status, food preferences, and health goals. By integrating modern nutrition science and traditional Chinese medicine theories, the system can simultaneously meet multiple health goals, such as nutritional balance, chronic disease prevention and control, and traditional Chinese medicine dietary therapy needs, thereby optimizing the system through multi-objective synergy. Based on a structured database and intelligent algorithms, this system ensures the scientific validity and accuracy of the recommendations and can be dynamically updated with real-time food information, ensuring the timeliness and accuracy of the recommendations.

[0175] In the description of this application, it should be understood that the orientation or positional relationship indicated by directional terms such as "front, back, up, down, left, right", "horizontal, vertical, horizontal" and "top, bottom" is usually based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing this application and simplifying the description. Unless otherwise stated, these directional terms do not indicate or imply that the device or element referred to must have a specific orientation or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on the scope of protection of this application.

[0176] The positional relationships described in the figures are for illustrative purposes only and should not be construed as limiting this patent. Clearly, the above embodiments of the present invention are merely examples to clearly illustrate the invention and are not intended to limit the implementation of the invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of this invention.

Claims

1. A method for intelligently recommending recipes, characterized in that, The following steps are involved: S1. Label the food with functional tags according to its properties and corresponding TCM attributes, and store them in the database; S2. Based on the user's preferences or TCM syndrome type, select the food name or keywords of the functional label, filter these foods in the database, and provide dietary conditioning suggestions containing these foods according to their TCM attributes. S3. Based on one or more functional requirements of the user, filter the food list that meets these functional requirements from the database; S4. Weight the food selected from the food list and recommend corresponding dietary therapy methods according to the scores. S5. Based on the TCM attributes and functional label data corresponding to the selected food, integrate and filter conflicting dietary conditioning suggestions and dietary therapy methods to provide users with personalized functional conditioning recipes.

2. The method for intelligent recipe recommendation according to claim 1, characterized in that, In step S1, the database also stores nutritional data of food, marks the intensity of the food's properties and flavors, and associates them with the contraindications of the TCM syndrome type to generate filtering conditions to exclude contraindicated foods when screening food in subsequent steps.

3. The method for intelligent recipe recommendation according to claim 2, characterized in that, In step S2, before selecting food based on the user's preferences, a recommendation list is generated for the user by analyzing the similarity between the user and other users or the similarity between the food selected by the user and other foods through collaborative filtering. This includes the following steps: S21. Data preprocessing: Clean user behavior data, construct user-food interaction matrix, and fill in missing values ​​by filling in the mean or combining the similarity of the food's TCM attributes. S22. Similarity Calculation: Similarity coefficient between users: Where i represents each food item, I uv For multiple food items that two users have rated together, r ui For one user's rating of a certain food item, r is the average number of ratings given by one user for multiple foods that are rated together. vi For another user's rating of a certain food item, The average of the number of ratings given by another user for multiple food items that are rated together; Similarity coefficient between the selected food and other foods: in, This is based on the average rating of all users for the selected food. This is based on the average rating of all users for a particular food other than the selected food. S23. Sort the lists according to the similarity coefficients and generate recommendation lists accordingly: User recommendation list: Select the top M similar users, aggregate their favorite foods, and filter out interacted items; Food recommendation list: For each item in the user's historical food list, recommend the top N most similar foods; S24. Introduce a time decay factor to give higher weight to the user's recent behavior, and perform a mixed recommendation by combining the user recommendation list and the food recommendation list.

4. The method for intelligent recipe recommendation according to claim 3, characterized in that, When generating a recommendation list for a user, a latent semantic model is also used to predict the user's interest in foods they haven't interacted with, including the following steps: S25. Matrix Decomposition: Decompose the user rating matrix R for each food item into: R≈P·Q T Where P represents the user's preference for the latent feature, and Q represents the association between food and the latent feature; S26. Calculate the loss function: Where K represents each latent feature, p uk q represents the parameters representing the user's preferences for each latent feature. ki λ represents the parameters of each implicit feature of the food, and λ is the regularization coefficient. S27. Add stochastic gradient descent parameter update rules: p uk ←p uk +α(e ui ·q ki -λp uk ), p uk ←p uk +α(e ui ·q ki -λp uk ), Among them, e ui Let α be the score prediction error and α be the learning rate.

5. The method for intelligent recipe recommendation according to claim 4, characterized in that, In step S4, the weighted scoring method includes the following steps: S41. Construct a hierarchical structure, divided into a target layer for optimal food recommendation, a criteria layer for analyzing various food indicators, and a scheme layer for candidate foods. S42. Establish a judgment matrix. The user performs pairwise importance comparisons on each indicator in the criterion layer and assigns a value to each. ij ; S43. Calculate the geometric mean for each row of indicators, and obtain the weights through a normalized vector, using the following formula: Geometric mean of each indicator: Normalized weight vector: Where n is the number of indicators and is at least 3; S44. Consistency check: Consistency Indicators: Consistency ratio: Where, λ max To determine the maximum eigenvalue of the mean of the product of the judgment matrix and the weight vector, RI is the random consistency index parameter. If CR < 0.1, the test is passed; otherwise, the judgment matrix is ​​readjusted. S45. Calculate the overall score using weighted summation, and recommend candidates based on their scores.

6. The method for intelligent recipe recommendation according to claim 5, characterized in that, The method also includes collecting user feedback on the recommendation results and dynamically updating the weight coefficients of the functional requirements, including the following steps: S46. Collect user behavior data in real time, using clicks as positive feedback and skips as negative feedback, and score recommended food items accordingly; S47. Define the loss function for the weight vector W. Calculate the gradient of the function Update weight W new =W old -α(y pred -y true )·X, where the predicted value y pred =W T ·X, y true This refers to actual user behavior.

7. The method for intelligent recipe recommendation according to claim 1, characterized in that, Step S1 also includes periodically updating the database, specifically as follows: S11. Regularly crawl web page data and authoritative database data; S12. Remove duplicate data based on hash value or unique identifier, extract structured data using regular expressions, and prioritize data from authoritative sources or with the latest timestamp if there is a conflict between new and old data. S13. Use machine learning models to automatically label new food items with functional tags and TCM attributes, construct keyword and attribute mapping based on TCM classics, and fine-tune the pre-trained model for text classification. S14. For newly added foods with low confidence in model prediction, trigger the manual review process, add the manually labeled results to the training set, and iteratively optimize the model.

8. The method for intelligent recipe recommendation according to claim 7, characterized in that, In step S3, when there is a logical conflict among the multiple functional requirements selected by the user, a prompt message is generated and an alternative solution is provided. Specifically, this includes the following steps: S31. Define conflict rules, each of the conflict rules defining a set of mutually exclusive combinations of the functional requirements and associating alternatives; S32. Check if the conflict rule exists in the list of functional requirements selected by the user; S33. Based on the alternatives defined in the conflict rules, and combined with user historical behavior or group preferences, generate optimization suggestions; S34. Dynamically adjust the weights of the conflict rules based on user feedback and expert review; S35. The conflict rules are classified according to the weights, and similar conflict rules are merged periodically, while low-frequency conflict rules are removed.

9. A system for intelligently recommending recipes, characterized in that, The method for intelligent recipe recommendation as described in any one of claims 1-8 includes: The interaction module is used to receive food query conditions, TCM attributes and functional requirements input by the user, and to visually display the matching food list, nutritional data and personalized functional conditioning recipes. The storage module is used to establish a database of food and recipes to store data on the types of food, their corresponding properties, nutritional components and traditional Chinese medicine attributes, as well as recipe data containing each food. The query module is connected to both the interaction module and the storage module. The query module is used to extract data from the database based on the information input by the user and feed it back to the interaction module. A processing module, connected to the query module, is used to control the query module to extract data from the database according to an algorithm; The processing module includes: A conflict detection module is used to detect whether there is a conflict between the functional requirements selected by the user and to provide alternative solutions. An analysis module is used to filter a list of foods that meet the functional requirements according to a preset algorithm. The recommendation module is connected to the analysis module. The recommendation module is used to collaboratively recommend unselected foods based on the foods selected by the analysis module and the choices of other users, and to integrate and recommend personalized functional conditioning recipes.

10. The intelligent recipe recommendation system according to claim 9, characterized in that, The system also includes: A feedback module, connected to the interaction module, is used to collect user feedback on the recommendation results of the recommendation module and optimize the function matching weights and recommendation logic through machine learning algorithms. The review module is connected to the processing module and is used to invite experts to review the recommendation results. The dynamic update module is connected to the storage module, the feedback module, the review module, and the analysis module. The dynamic update module is used to periodically access authoritative nutrition databases and traditional Chinese medicine classics data sources, input the traditional Chinese medicine attributes of newly added foods into the database and automatically label the functional tags, update the correspondence between the traditional Chinese medicine attributes and functional requirements of the foods, and adjust the functional matching weight coefficient of the algorithm in the analysis module according to the feedback module and the review module.