Intelligent diet management system for children
Through the user module, database storage module, recipe recommendation module and shopping management module of the children's intelligent dietary management system, the problems of inaccurate recipe recommendations and allergen identification in the existing system are solved, personalized nutrition recommendations and safety management are achieved, and the recipe identification accuracy and operation convenience are improved.
Patent Information
- Application Number
- CN202510818509.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-10-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing intelligent dietary management systems for children have problems such as recipe recommendations not being refined according to growth stages, inaccurate allergen identification, disconnection between recommendations and execution, and insufficient image recognition accuracy, which lead to excessive calories and dietary risks.
A smart dietary management system for children has been designed, which includes a user module, a database storage module, a recipe recommendation module, a shopping management module and a recipe recognition module. It achieves accurate recommendations and safe management through allergen identification, personalized nutrition recommendations, shopping management and recipe recognition.
It improves the accuracy of allergen identification and recipe recommendation, simplifies the operation process, achieves seamless connection from recipe generation to dining table, and improves the scientificity and safety of children's dietary management.
Smart Images

Figure CN120748627A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence and health information technology, and in particular to an intelligent dietary management system for children. Background Art
[0002] Smart dietary management is a management model that uses technologies such as artificial intelligence, big data, and the Internet of Things to intelligently plan, monitor, and optimize the diets of individuals or groups. Its core goal is to achieve scientific nutrition matching, personalized dietary recommendations, and health management through technological means. It is applicable to various groups, including children. The current smart dietary management for children has the following problems: 1. A single recommendation mechanism: The current recipe recommendation system fails to achieve detailed nutritional division according to children's growth stages, such as infants, toddlers, preschoolers, and school age, which can easily lead to excessive calories and obesity. 2. An imperfect allergen identification mechanism: The lack of accurate management of complex and multi-level allergy information can easily lead to dietary risks. 3. A disconnect between recommendation and execution: Recipe recommendations are not connected to the food procurement and delivery processes. Users need to manually organize shopping lists, which results in a poor user experience. 4. Insufficient image recognition accuracy: The existing system has limited image recognition capabilities for complex ingredients or mixed foods, affecting the accuracy of recommendations.
[0003] Therefore, in view of the shortcomings of the existing technology, it is necessary to provide a children's intelligent dietary management system to solve the shortcomings of the existing technology. Summary of the Invention
[0004] The present invention aims to overcome the shortcomings of the prior art and provide an intelligent children's meal management system that has the advantages of high allergen identification accuracy, high recommendation accuracy, and convenient purchasing.
[0005] The above-mentioned purpose of the present invention is achieved through the following technical measures:
[0006] Provided is a children's intelligent dietary management system, comprising:
[0007] User module—enters user data including name, date of birth, and allergy data;
[0008] Database storage module - stores user data, recipe database, and allergen semantic data; the recipe database is composed of multiple recipe data, and each recipe data includes corresponding ingredient data, recommendation rating, applicable age group data, and nutritional data; the ingredient data includes ingredient code and ingredient quantity; each ingredient corresponds to a unique ingredient code; each recipe data corresponds to a unique recipe code;
[0009] Recipe recommendation module - calculates the user's current age based on the user's date of birth, and excludes recipe data containing the user's allergy data from the database storage module based on the user's allergy data, and then selects recipe data corresponding to the current age from the remaining recipe data; then searches the Chinese Children's Dietary Guidelines for recommended daily calorie intake based on the current age, and finally recommends recipe data based on the recommendation score and recommended daily calorie intake data, and displays the multiple recommended recipes for the user to select;
[0010] Shopping management module - generates the corresponding usage of various ingredients in the recommended data according to the recommended data selected by the user, generates a shopping order for the e-commerce platform based on the corresponding usage of various ingredients, and pushes the order information after the user completes the shopping order payment;
[0011] Recipe recognition module - obtains ingredient data based on the input food image recognition, and then matches the ingredient data with the allergy data to obtain an allergy warning signal.
[0012] Preferably, the above-mentioned method for obtaining allergy data is a category filtering method and a custom filtering method.
[0013] Preferably, the above-mentioned category filtering method is: when a major food category is selected, all ingredients in the subcategories of ingredients under the major food category are identified as allergy data; when a subcategory of ingredients is selected, only the ingredients corresponding to the selected subcategory of ingredients are identified as allergy data, and other subcategories of ingredients in the above major food category are retained.
[0014] Preferably, the above-mentioned custom filtering method is performed by the following steps:
[0015] B1. Enter the allergy text;
[0016] B2. Use the Jieba word segmentation database to segment the allergy text in B1, dividing the allergy text into multiple words, and then semantically expand each word to obtain expanded words;
[0017] B3. Map the expanded words in B2 with the allergen semantic data in the database storage module, calculate the corresponding confidence level, and use the allergen semantics with a confidence level exceeding a confidence threshold as the corresponding allergy data.
[0018] Preferably, the above-mentioned recommended daily calorie intake data is the recommended daily energy intake of the Chinese Children's Dietary Guidelines.
[0019] Preferably, the recipe recommendation method of the above recipe recommendation module is as follows:
[0020] C1. Based on the user's allergy data, the database storage module excludes recipe data containing the allergy data to obtain preliminary screening recipe data. If there are less than two preliminary screening recipe data, the user is prompted and the recommendation ends. If there are more than two preliminary screening recipe data, the process proceeds to C2.
[0021] C2. Calculate the user's current age based on their date of birth. Select the appropriate age group data corresponding to the current age from the primary screening recipe data in C1. The recipe data corresponding to the applicable age group data is used as the secondary screening recipe data. If there are fewer than two secondary screening recipe data, prompt the user and end the recommendation. If there are more than two secondary screening recipe data, proceed to C3.
[0022] C3. Search the Chinese Children's Dietary Guidelines for the recommended daily calorie intake data corresponding to the current age, and define the recommended daily calorie intake data as θ. Then, filter the second-screen recipe data whose total calorie value in the nutritional data is greater than or equal to 40% of θ. Finally, define the remaining second-screen recipe data as third-screen recipe data. If there are fewer than three third-screen recipe data, prompt the user and end the recommendation. If there are more than three third-screen recipe data, proceed to C4.
[0023] C4, divide the three-screen recipe data into breakfast recommendation data, lunch recommendation data and dinner recommendation data according to the total calorie value, and enter C5; when the breakfast recommendation data, lunch recommendation data and dinner recommendation data cannot be divided at the same time, prompt the user and end the recommendation; the three-screen recipe data division method defines the total calorie value of the breakfast recommendation data as α1, the total calorie value of the lunch recommendation data as α2, and the total calorie value of the dinner recommendation data as α3, and there exists 25%θ≤α1≤30%θ, 30%θ≤α2≤40%θ, 30%θ≤α3≤35%θ; the largest total calorie value in the breakfast recommendation data is defined as α 1max ; Define the maximum total calorie value in the Chinese food recommendation data as α 2max ; Define the maximum total calorie value in the dinner recommendation data as α 3max ; There is a total calorie value of the day α 1max +α 2max +α 3max ≤θ;
[0024] C5. Sort the breakfast recommendation data by recommendation scores from high to low, and display the top N breakfast recommendation data for user selection; sort the lunch recommendation data by recommendation scores from high to low, and display the top N lunch recommendation data for user selection; sort the dinner recommendation data by recommendation scores from high to low, and display the top N dinner recommendation data for user selection, and 1≤N≤5 exists, and N is an integer.
[0025] A further preferred custom filtering method is performed by the following steps:
[0026] B1. Enter the allergy text;
[0027] B2. Use the Jieba word segmentation library to segment the allergy text in B1, dividing the allergy text into multiple words. Then, use the Word2Vec word vector model to expand the synonyms of each word to obtain the expanded words.
[0028] B3. Map the expanded words in B2 to the allergen semantic data in the database storage module, calculate the semantic similarity confidence based on the BERT model, and when the confidence is greater than 0.85, use the corresponding allergen semantic data as the corresponding allergy data.
[0029] Preferably, the recommendation score c is composed of the habit score a and the season score b, and c=6a+4b.
[0030] Preferably, the calculation method of the habit score a is represented by the following formula:
[0031] a=j-5n(n+1)+10m;
[0032] Among them, j is the initial recommendation score in each recipe data and j is 100, a is the current recommendation score, n is the cumulative number of times the recipe data is not liked, m is the number of times the recipe data is ordered, and 5n(n+1) is a quadratic penalty term, which is used to exponentially reduce the recommendation weight of recipe data that users continuously reject.
[0033] Preferably, the seasonal score is assigned as follows: when any ingredient in the recipe data is a non-seasonal ingredient, a value of 0.5D is assigned; otherwise, a value of D is assigned, and D is 1000.
[0034] Preferably, the shopping management module is connected to the recipe recommendation module via a RESTful API interface, and the shopping management module is connected to the e-commerce platform via a RESTful API interface.
[0035] The children's intelligent dietary management system of the present invention is further provided with an intelligent housekeeper module, which is used to interact with the user.
[0036] Preferably, the smart housekeeper module is provided with:
[0037] Message processing module - inputs the user's query data, and inputs the query data into the local knowledge base module or the AI dialogue module, and displays the search data of the local knowledge base module and the content output by the AI dialogue module;
[0038] The local knowledge base module stores and manages the nutrition knowledge base, searches the nutrition knowledge base using the TF-IDF weighted cosine similarity algorithm based on the query data from the message processing module to obtain search data;
[0039] AI dialogue module - the AI dialogue module is configured to call the cloud-based natural language processing API, generate a response that complies with nutrition standards for the query data, and provide intelligent dialogue services based on the query data of the message processing module, call the cloud-based NLP API to generate a response, and filter the output that does not comply with nutrition standards based on the built-in compliance engine.
[0040] Preferably, the local knowledge base module extracts keywords through Jieba word segmentation, and searches in the nutrition knowledge base through fuzzy matching and exact matching to obtain the retrieval data.
[0041] Preferably, the recipe recognition module performs recognition by improving a convolutional neural network model after training.
[0042] Preferably, the above-mentioned improved convolutional neural network model adds Batch Normalization after each convolution layer of the basic convolutional neural network model VGG, replaces the fixed-size pooling with AdaptiveAvgPool2d in the basic convolutional neural network model VGG, reduces the 4096 dimensions of the fully connected layer structure in the basic convolutional neural network model VGG to 1024 and 512 to the number of categories respectively, and adds Dropout0.4 between the fully connected layer structure and the output layer of the basic convolutional neural network model VGG; all four convolution blocks in the basic convolutional neural network model VGG are set to have the same structure.
[0043] Preferably, the training data of the improved convolutional neural network model is multi-category food images collected by a web crawler, and then the training data is preprocessed.
[0044] Preferably, during the training process of the above-mentioned improved convolutional neural network model, the cross entropy loss function CrossEntropyLoss is used as the objective function, the training optimizer is AdamW, and the learning rate scheduling strategy is OneCyc.
[0045] Preferably, the training termination condition of the above-mentioned improved convolutional neural network model is reaching the maximum number of training rounds or complying with the early stopping mechanism.
[0046] Preferably, the above recipe data also includes recipe introduction data, preparation time, preparation difficulty level, preparation steps and step-by-step video guidance link.
[0047] Preferably, the above nutritional data also includes at least one of protein, fat or carbohydrate content.
[0048] Preferably, the shopping management module is connected to the recipe recommendation module via a RESTful API interface, and the shopping management module is connected to the e-commerce platform via a RESTful API interface.
[0049] The intelligent dietary management system for children of the present invention is provided with: a user module for inputting user data, wherein the user data includes name, date of birth and allergy data; a database storage module for storing user data, a recipe database and allergen semantic data; the recipe database is composed of a plurality of recipe data, and each recipe data includes corresponding ingredient data, recommendation score, applicable age group data and nutritional data; the ingredient data includes ingredient code and ingredient amount; each ingredient corresponds to a unique ingredient code; each recipe data corresponds to a unique recipe code; a recipe recommendation module for calculating the user's current age based on the user's date of birth and excluding recipe data containing the allergy data in the database storage module based on the user's allergy data. , then selects the recipe data corresponding to the current age from the remaining recipe data; then searches the Chinese Children's Dietary Guidelines for recommended daily calorie intake based on the current age; finally, recommends recipe data based on the recommendation score and recommended daily calorie intake data, and displays the resulting multiple recommendations for the user to select; the shopping management module generates the corresponding amounts of each ingredient in the recommended data based on the user's selected recommendation data, and generates a shopping order connected to the e-commerce platform based on the corresponding amounts of each ingredient, and pushes the order information after the user completes the shopping order payment; the recipe recognition module recognizes the ingredient data based on the input food image, then matches the ingredient data with the allergy data to generate an allergy warning signal. This intelligent children's meal management system can provide personalized nutrition recommendations and integrates an allergen management mechanism to improve recognition accuracy and security, significantly reducing the number of steps. It builds a full-process system covering recipe recommendations, shopping cart management, and delivery calendar, achieving seamless and efficient implementation from recipe generation to actual dining table. This intelligent children's meal management system also accurately recognizes recipe content and uses intelligent ingredient management to improve the convenience and scientificity of ingredient preparation. It also matches allergy data to generate allergy warnings. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The present invention is further described with reference to the accompanying drawings, but the contents in the accompanying drawings do not constitute any limitation to the present invention.
[0051] Figure 1 Flowchart of the method for obtaining allergy data of the present invention.
[0052] Figure 2 This is a screenshot of the interface for acquiring allergy data of the children's intelligent dietary management system of the present invention.
[0053] Figure 3 This is the flowchart of food shopping for the shopping management module.
[0054] Figure 4 A screenshot of the interface showing the selected recipe data.
[0055] Figure 5 This is a screenshot of the shopping link interface of the shopping management module.
[0056] Figure 6 This is a screenshot of the calendar page interface after payment is completed.
[0057] Figure 7 Flowchart for the recipe recommendation module.
[0058] Figure 8 Screenshot of the interface of breakfast recommendation data, lunch recommendation data, and dinner recommendation data obtained by the recipe recommendation module.
[0059] Figure 9 This is a screenshot of the interface of the smart housekeeper module.
[0060] Figure 10 This is a screenshot of the recipe recognition module interface.
[0061] Figure 11 Schematic diagram of the structure of the improved convolutional neural network model. DETAILED DESCRIPTION
[0062] The technical solution of the present invention is further described with reference to the following examples.
[0063] Example 1
[0064] A children's intelligent meal management system is provided with a user module, a database storage module, a recipe recommendation module, a shopping management module, a recipe recognition module and an intelligent housekeeper module.
[0065] Among them, the user module - inputs user data, including name, date of birth and allergy data;
[0066] Database storage module - stores user data, recipe database, and allergen semantic data; the recipe database is composed of multiple recipe data, and each recipe data includes corresponding ingredient data, recommendation rating, applicable age group data, and nutritional data; the ingredient data includes ingredient code and ingredient quantity; each ingredient corresponds to a unique ingredient code; each recipe data corresponds to a unique recipe code;
[0067] Recipe recommendation module - calculates the user's current age based on the user's date of birth, and excludes recipe data containing the user's allergy data from the database storage module based on the user's allergy data, and then selects recipe data corresponding to the current age from the remaining recipe data; then searches the Chinese Children's Dietary Guidelines for recommended daily calorie intake based on the current age, and finally recommends recipe data based on the recommendation score and recommended daily calorie intake data, and displays the multiple recommended recipes for the user to select;
[0068] Shopping management module - generates the corresponding usage of various ingredients in the recommended data according to the recommended data selected by the user, generates a shopping order for the e-commerce platform based on the corresponding usage of various ingredients, and pushes the order information after the user completes the shopping order payment;
[0069] Recipe recognition module - obtains ingredient data based on the input food image recognition, and then matches the ingredient data with the allergy data to obtain an allergy warning signal.
[0070] Recipe data also includes recipe description, preparation time, difficulty level, preparation steps, and a link to a step-by-step video guide. Nutritional data includes protein, fat, carbohydrate content, and total calorie value.
[0071] It should be noted that different recipes are applicable to children of different age groups. For example, infants aged 6 to 12 months are in the complementary feeding stage. Therefore, the recipe data for high-iron rice flour paste, vegetable puree, fruit puree, and protein dishes (vegetable puree can include pumpkin puree, sweet potato puree, potato puree, spinach puree, rapeseed puree, etc., and fruit puree can include banana puree, apple puree, pear puree, avocado puree, etc.) are applicable to children aged 6 to 12 months. For infants aged 9 to 12 months, vegetable and minced meat porridge, noodles, tofu and vegetable steamed egg, and chicken and vegetable wontons are applicable. Vegetable and minced meat porridge, noodles, tofu and vegetable steamed egg, and chicken and vegetable wontons are also applicable to children aged 1 to 4 years. Therefore, the applicable age groups for these recipes are 9 to 12 months and 1 to 4 years.
[0072] The method for obtaining allergy data of the present invention is a category filtering method and a custom filtering method. The present invention uses the category filtering method and the custom filtering method to conduct a multi-level allergen database and filtering mechanism, and finally obtains a safe food matrix, such as Figure 1 .
[0073] like Figure 2 , where the category filtering method is:
[0074] When a food category is selected, all ingredients in the subcategories of that food category will be considered as allergy data;
[0075] When selecting a subcategory of ingredients, only the ingredients corresponding to the selected subcategory are recognized as allergy data, and other subcategories of ingredients in the upper food category are retained.
[0076] It should be noted that in the category filtering method of the present invention, when the user selects a major food category, all ingredients in all subcategories under the current category are considered to be allergy data; if the user only selects one or more subcategories of ingredients under the major food category, that is, only the ingredients corresponding to the selected subcategories are considered to be allergy data, and other subcategories of ingredients in the current major food category are considered to be non-allergy data. The children's intelligent dietary management system of the present invention will avoid all recipes containing these allergy data and will no longer recommend any recipes containing the current ingredients to ensure the safety of the recommended recipes. The present invention can also simultaneously select a major food category and a subcategory of food in another major food category through the category filtering method. Figure 2 Among them, meat, grains, sugar, vegetables and fungi are the major food categories, and these major food categories have their own subcategories. Figure 2 It is not shown in the .
[0077] For example, if user A is allergic to peanuts, which is a subcategory and cereals is a major category, the user selects peanuts as the subcategory. The intelligent dietary management system for children of the present invention will exclude peanuts while retaining other subcategories of cereals, such as corn. If user B is allergic to all seafood, which is a major category, user B will directly select seafood, thus blocking all fish and shrimp under the seafood category.
[0078] Among them, the custom filtering method is:
[0079] B1. Enter the allergy text;
[0080] B2. Use the Jieba word segmentation library to segment the allergy text in B1, dividing the allergy text into multiple words. Then, use the Word2Vec word vector model to expand the synonyms of each word to obtain the expanded words.
[0081] B3. Map the expanded words in B2 to the allergen semantic data in the database storage module, calculate the semantic similarity confidence based on the BERT model, and when the confidence is greater than 0.85, use the corresponding allergen semantic data as the corresponding allergy data.
[0082] The custom filtering method of the present invention can directly input allergy data. Specifically, when user C inputs "marine fish allergy":
[0083] B1. Text preprocessing: First, use Jieba to segment the word "sea fish" into two basic morphemes, "sea" and "fish". The system will pre-add the names of food categories to the segmentation dictionary to improve segmentation accuracy. Then, perform multi-level matching to expand synonyms: The system will perform three levels of matching: direct matching: "sea" is matched to the large category of "seafood"; associated matching: "fish" is matched to the large category of "fish"; automatic expansion: The system automatically associates to all subcategories under this category, such as "deep-sea fish", "shallow-sea fish", "tuna", "salmon", etc.
[0084] B3. Map the expanded words in B2 to the allergen semantic data in the database storage module respectively, and specifically perform semantic association: Implement intelligent semantic recognition through the `FoodTextClassifier` class: 1. Calculate the similarity of each word with the predefined category; 2. When the similarity exceeds the threshold (default 0.6), add it to the matching result; 3. At the same time, identify the large category and specific subcategory to which it belongs; 4. Result integration: The system will finally return: the matched food large category (such as: seafood, fish); the relevant specific foods (such as: deep-sea fish, shallow-sea fish, etc.); the matching confidence value; Automatic shielding: When the system discovers that a recipe contains these marked allergens in subsequent dietary recommendations, it will automatically provide an allergy warning to ensure the safety of children's diet.
[0085] The custom filtering method of the present invention is implemented through this semantic association via a predefined mapping table, ensuring that all relevant allergens can be identified. [[ID=E]]
[0086] The shopping management module of the present invention is connected to the recipe recommendation module through a RESTful API interface, and the shopping management module is connected to an e-commerce platform through a RESTful API interface. The e-commerce platform can be in two forms, one is a self-built shopping system, and the other is an external system such as Pupu Shopping or Meituan Shopping.
[0087] The shopping management module of the present invention allows users to shop based on the recipe data recommended by the recipe recommendation module, such as Figure 3 .
[0088] It should also be noted that the shopping management module of the present invention also features two add-to-cart modes: single recipe add-to-cart and batch recipe add-to-cart. The recipes and ingredients of the present invention are associated through a many-to-many relationship, ensuring flexible correspondence between recipes and ingredients. The shopping management module associates users via foreign keys, enabling independent management of user shopping carts. The shopping management module implements two add-to-cart modes: single recipe add-to-cart and batch recipe add-to-cart. Single recipe add-to-cart is implemented using the AddRecipeToCartView view class, which utilizes a transaction processing mechanism to ensure data consistency. When a user triggers an add-to-cart operation, the shopping management module first retrieves all ingredients for the target recipe. Then, using the get_or_create method, it intelligently processes the ingredient quantities in the shopping cart, automatically accumulating and updating the ingredient quantities. The batch add-to-cart functionality is implemented using the AddRecipesToCartView view class, which supports the simultaneous addition of multiple recipes. By looping through the ingredients for each recipe, it enables automated batch data processing. The system utilizes atomic operations to ensure data consistency, avoiding data confusion that can arise from concurrent operations.
[0089] For a single recipe in the shopping management module, if the recipe data is millet porridge, and the ingredients of millet porridge are millet*1, white sugar*1, when you click on the recipe millet porridge, the ingredients and quantity will be automatically added to the shopping cart. When the payment is completed, it will be pushed to the calendar page, and you can view the details, such as Figures 4 to 6 .
[0090] like Figure 7 The recipe recommendation method of the recipe recommendation module of the present invention is as follows:
[0091] C1. Eliminate recipe data containing the user's allergy data in the database storage module to obtain preliminary screening recipe data based on the user's allergy data. If there are fewer than two preliminary screening recipe data, prompt the user and end the recommendation. If there are more than two preliminary screening recipe data, proceed to C2.
[0092] C2. Calculate the user's current age based on their date of birth. Select the appropriate age group data corresponding to the current age from the primary screening recipe data in C1. The recipe data corresponding to the applicable age group data is used as the secondary screening recipe data. If there are fewer than two secondary screening recipe data, prompt the user and end the recommendation. If there are more than two secondary screening recipe data, proceed to C3.
[0093] C3. Search the Chinese Children's Dietary Guidelines for the recommended daily calorie intake data corresponding to the current age, and define the recommended daily calorie intake data as θ. Then, filter the second-screen recipe data whose total calorie value in the nutritional data is greater than or equal to 40% of θ. Finally, define the remaining second-screen recipe data as third-screen recipe data. If there are fewer than three third-screen recipe data, prompt the user and end the recommendation. If there are more than three third-screen recipe data, proceed to C4.
[0094] C4, divide the three-screen recipe data into breakfast recommendation data, lunch recommendation data and dinner recommendation data according to the total calorie value, and enter C5; when the breakfast recommendation data, lunch recommendation data and dinner recommendation data cannot be divided at the same time, prompt the user and end the recommendation; the three-screen recipe data division method defines the total calorie value of the breakfast recommendation data as α1, the total calorie value of the lunch recommendation data as α2, and the total calorie value of the dinner recommendation data as α3, and there exists 25%θ≤α1≤30%θ, 30%θ≤α2≤40%θ, 30%θ≤α3≤35%θ; the largest total calorie value in the breakfast recommendation data is defined as α 1max ; Define the maximum total calorie value in the Chinese food recommendation data as α 2max ; Define the maximum total calorie value in the dinner recommendation data as α 3max ; There is a total calorie value of the day α 1max +α 2max +α 3max ≤θ;
[0095] C5. Sort the breakfast recommendation data by recommendation scores from high to low, and display the top N breakfast recommendation data for user selection, such as Figure 8 ; Sort the Chinese food recommendation data by the recommendation scores from high to low, and display the top N Chinese food recommendation data for user selection; Sort the dinner recommendation data by the recommendation scores from high to low, and display the top N dinner recommendation data for user selection, and there is 1≤N≤5, and N is an integer.
[0096] It should be noted that the total caloric values of the recommended breakfast, lunch, and dinner data are within the above-mentioned ranges based on the principle of a lean but nutritionally balanced breakfast, a rich lunch with appropriately increased calories to provide energy throughout the day, and a light and moderate dinner to avoid excess calories. Furthermore, the sum of the maximum total caloric values in the recommended breakfast, lunch, and dinner data recommended by the present invention is less than the recommended daily energy intake, thereby complying with the Children's Dietary Pagoda and addressing obesity in children.
[0097] It should be noted that the recipe data in the breakfast recommendation data, the lunch recommendation data, and the dinner recommendation data may be repeated.
[0098] Due to the different stages of children aged 6 months to 12 years, the Chinese Children's Dietary Guidelines of the present invention are the "Dietary Guidelines for Chinese School-Age Children (2022)", the 2022 edition of the "Dietary Guidelines for Chinese Residents", and the "Dietary Guidelines for Chinese Infants and Young Children (2022)".
[0099] For example, if a user's allergy data is shrimp, the recipe recommendation module will exclude recipe data containing shrimp from the recipe database to obtain the primary screening recipe data. If the user's date of birth is December 3, 2019, and the current date is June 3, 2025, then the user is currently 5.5 years old, the recipe data corresponding to the age group of 5.5 years old will be selected from the primary screening recipe data to obtain the secondary screening recipe data. Since the recipe database contains a large number of recipe data, under normal circumstances, multiple secondary screening recipe data will be obtained. Only in rare cases will there be less than two secondary screening recipe data. If there are fewer than two secondary screening recipe data, the user will be notified and the recommendation will end.
[0100] According to the current age of 5.5 years old, the corresponding recommended daily calorie intake data is searched in the Chinese Children's Dietary Guidelines. Assuming that the recommended daily calorie intake data is 2000Kcal, the second-screen recipe data with a calorie value greater than or equal to 1000Kcal are filtered out, and then the remaining second-screen recipe data are defined as three-screen recipe data. Under normal circumstances, multiple three-screen recipe data are obtained, and only in very rare cases will there be less than two three-screen recipe data. When there are less than two three-screen recipe data, the user is prompted and the recommendation ends.
[0101] The calorie value of the second-screened recipe data is then divided into breakfast recommendation data, lunch recommendation data and dinner recommendation data according to 25%θ≤α1≤30%θ, 30%θ≤α2≤40%θ: 30%θ≤α3≤35%θ. Under normal circumstances, multiple breakfast recommendation data, multiple lunch recommendation data and multiple dinner recommendation data are obtained, and among these multiple breakfast recommendation data, multiple lunch recommendation data and multiple dinner recommendation data, the sum of the maximum total calorie values in the breakfast recommendation data, lunch recommendation data and dinner recommendation data is less than the recommended daily energy intake. Only in very rare cases will the user be prompted and the recommendation be ended when the breakfast recommendation data, lunch recommendation data and dinner recommendation data cannot be divided at the same time.
[0102] The Chinese food recommendation data includes fish-flavored shredded pork, scrambled eggs with tomatoes, and stir-fried pork with bitter melon, etc., and the recommendation reviews of fish-flavored shredded pork, scrambled eggs with tomatoes, and stir-fried pork with bitter melon are ranked, which are stir-fried pork with bitter melon, fish-flavored shredded pork, and stir-fried eggs with tomatoes. The top two Chinese food recommendation data are displayed for the user to choose, which are stir-fried pork with bitter melon and fish-flavored shredded pork.
[0103] The recommendation score c of the present invention is composed of the habit score a and the season score b, and c=6a+4b; the calculation method of the habit score a is expressed by the following formula:
[0104] a=j-5n(n+1)+10m
[0105] Among them, j is the initial recommendation score in each recipe data and j is 100, a is the current recommendation score, n is the cumulative number of times the recipe data is not liked, m is the number of times the recipe data is ordered, and 5n(n+1) is a quadratic penalty term, which is used to exponentially reduce the recommendation weight of recipe data that users continuously reject.
[0106] The seasonal score is assigned as follows: if any ingredient in the recipe data is not a seasonal ingredient, the score is assigned as 0.5D; otherwise, the score is assigned as D, and D is 100.
[0107] Regarding the seasonal score assignment method, for example, tomatoes are not in season at the moment, so the seasonal score for scrambled eggs with tomatoes is 50. Furthermore, the number of times scrambled eggs with tomatoes were disliked is 1, and the number of times the recipe data was ordered is 0. Therefore, the recommended score for scrambled eggs with tomatoes is c = 6*50+4*(100-5*1*(1+1)+10*0) = 660. In the case of stir-fried bitter melon with pork, bitter melon is in season, so the seasonal score for stir-fried bitter melon with pork is 100. The cumulative number of times the recipe data was disliked is 0, and the number of times the recipe data was ordered is 3. Therefore, the recommended score for scrambled eggs with tomatoes is c = 6*100+4*(100-5*0*(0+1)+10*3) = 1120. The eggplant in Fish-Fragrant Shredded Pork is a seasonal ingredient, so the seasonal score of Fish-Fragrant Shredded Pork is 100, the cumulative number of times Fish-Fragrant Shredded Pork was chosen as not to be liked is 1, the number of times Fish-Fragrant Shredded Pork was ordered is 2, and the recommendation score of Fish-Fragrant Shredded Pork is c=6*100+4*(100-5*1*(1+1)+10*2)=1040.
[0108] It should be noted that, through verification through various tests, the method for calculating the recommendation score of the present invention can reduce invalid recommendations by 37%.
[0109] The children's intelligent dietary management system of the present invention is also provided with an intelligent housekeeper module, which is used to interact with the user, such as Figure 9 The smart housekeeper module is equipped with:
[0110] Message processing module - inputs the user's query data, and the query data is input into the local knowledge base module or the AI dialogue module, and the search data of the local knowledge base module and the content output by the AI dialogue module are displayed; wherein the local knowledge base module extracts keywords through Jieba word segmentation, and searches in the nutrition knowledge base through fuzzy matching and exact matching to obtain the search data;
[0111] The local knowledge base module stores and manages the nutrition knowledge base, searches the nutrition knowledge base using the TF-IDF weighted cosine similarity algorithm based on the query data from the message processing module to obtain search data;
[0112] AI dialogue module - the AI dialogue module is configured to call the cloud-based natural language processing API, generate a response that complies with nutrition standards for the query data, and provide intelligent dialogue services based on the query data of the message processing module, call the cloud-based NLP API to generate a response, and filter the output that does not comply with nutrition standards based on the built-in compliance engine.
[0113] It should be noted that the nutrition knowledge base of the present invention is used to store basic nutrition data, Chinese children's dietary guidelines and nutritional recommendations, nutrition and disease association data, seasonal and regional nutrition data, other auxiliary data, service phone data and other data. Wherein the basic nutrition data is the daily nutrient intake standard and food nutritional composition table, and the daily nutrient intake standard can be the recommended intake (RNI) and appropriate intake (AI) of various nutrients for children of different age groups (such as 1-3 years old, 4-6 years old, 7-12 years old). The Chinese children's dietary guidelines and nutritional recommendations are authoritative dietary structure models, such as the children's balanced diet pagoda, and dietary recommendations for special periods such as colds and postoperative recovery periods. Users can select the local knowledge base module in the message processing module and retrieve corresponding search data in the nutrition knowledge base. In the local knowledge base module, jieba segmentation is also used for keyword extraction, and answers are found in the nutrition knowledge base through fuzzy matching and exact matching, providing standard answers for fast response.
[0114] The present invention can also achieve flexible interaction and in-depth services that traditional knowledge bases cannot match through the AI dialogue module. Users can select the AI dialogue module through the message processing module.
[0115] The recipe recognition module of the present invention performs recognition by improving the convolutional neural network model after training.
[0116] It should be noted that after the recipe recognition module recognizes the food image, it obtains the recipe name and the names of the ingredients in the recipe, and then uses the Jieba word segmentation library to segment the ingredient name according to the ingredients, and divides the ingredient name into multiple words. The words are then semantically expanded to obtain expanded words. The expanded words are then mapped to the user's allergy data and the corresponding confidence level is calculated. When the confidence level exceeds the confidence threshold, it is considered that the food image contains allergic ingredients, otherwise it does not contain allergic ingredients, and a corresponding allergy alarm signal is obtained. The recipe recognition module then issues an alarm based on the allergy alarm signal. For example, if the user's allergy data is chicken breast and the food image is Kung Pao Chicken, Figure 10 .
[0117] like Figure 11 The improved convolutional neural network model adds Batch Normalization after each convolutional layer of the basic convolutional neural network model VGG. Batch Normalization accelerates convergence and improves training stability. AdaptiveAvgPool2d replaces fixed-size pooling in the basic convolutional neural network model VGG to support different input sizes and improve model compatibility. The 4096-dimensional fully connected layer structure in the basic convolutional neural network model VGG is reduced to 1024 and 512, respectively, to match the number of categories. Dropout 0.4 is added between the fully connected layer structure and the output layer of the basic convolutional neural network model VGG to effectively reduce the risk of overfitting. All four convolutional blocks in the basic convolutional neural network model VGG are set to have the same structure, which ensures network depth while controlling the number of parameters, making it suitable for medium-sized tasks and resource-constrained environments.
[0118] It should be noted that, by comparison, the training accuracy of the improved convolutional neural network model used in the present invention reaches 98.6%, and the test set verification accuracy reaches 96.3%, which is 11.2% higher than the original basic convolutional neural network model VGG.
[0119] The training data for the improved convolutional neural network model is obtained by collecting multi-category food images through web crawlers, and then the training data is preprocessed; the preprocessing includes random rotation, cropping, horizontal flipping, affine transformation, etc., to improve the generalization ability and robustness of the model.
[0120] During the training process, the improved convolutional neural network model adopts the cross-entropy loss function CrossEntropyLoss as the objective function, the training optimizer is AdamW, and the learning rate scheduling strategy is OneCyc; the training termination condition of the improved convolutional neural network model is to reach the maximum training rounds or meet the early stopping mechanism. Among them, the maximum training rounds of the improved convolutional neural network model of the present invention is 300 rounds, and the early stopping mechanism can be that if there is no significant improvement in the accuracy in 10 consecutive rounds, the accuracy of the current model on the training set is evaluated in each round, and the model weight with the best performance is automatically saved.
[0121] The beneficial effects of the present invention are: 1. Personalized nutritional recommendations: Based on the "Dietary Guidelines for Chinese School-Age Children (2022)", the 2022 edition of the "Dietary Guidelines for Chinese Residents", the "Dietary Guidelines for Chinese Infants and Young Children (2022)" and multidimensional data analysis, it provides refined and scientific personalized nutritional recommendations for different stages of children from 6 months to 12 years old.
[0122] 2. Allergen management mechanism: Build a multi-level allergen database and filtering mechanism through category filtering methods and custom filtering methods to improve identification accuracy and safety.
[0123] 3. Integrated process from recipe to dining table: Through the one-click purchase function of all ingredients in the recipe data, a seamless connection is achieved from recipe recommendation to ingredient procurement. The shopping cart and calendar linkage system integrates recipe selection, ingredient purchase and delivery arrangement into an integrated process. Users only need to select the recipe and meal date, which significantly reduces the operation steps. A full-process system covering recipe recommendation, shopping cart management and delivery calendar has been built to achieve seamless connection and efficient implementation from recipe generation to actual dining table.
[0124] 4. Recipe recognition and ingredient management: Accurately identify recipe content and intelligently manage ingredients to improve the convenience and scientificity of food preparation.
[0125] 5. The recipe recommendation module can make dynamic recipe recommendations. Specifically, it uses an intelligent recommendation algorithm that combines multi-dimensional characteristics such as age, allergen screening, season, eating habits, and nutritional balance to generate dynamic nutritional menus that better meet the actual needs of users.
[0126] 6. The recipe recognition module can perform image recognition and match it with allergy data. The recipe recognition module integrates deep learning image recognition technology, provides ingredient recognition function, and matches it with the recipe library in the system, improving the interactivity and fun of users obtaining recommendations, and can also issue allergy alerts.
[0127] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the essence and scope of the technical solutions of the present invention.
Claims
1. A children's intelligent dietary management system, characterized in that: The settings are: User module—enters user data including name, date of birth, and allergy data; Database storage module - stores user data, recipe database, and allergen semantic data; the recipe database is composed of multiple recipe data, and each recipe data includes corresponding ingredient data, recommendation rating, applicable age group data, and nutritional data; the ingredient data includes ingredient code and ingredient quantity; each ingredient corresponds to a unique ingredient code; each recipe data corresponds to a unique recipe code; Recipe recommendation module - calculates the user's current age based on the user's date of birth, and excludes recipe data containing the user's allergy data from the database storage module based on the user's allergy data; Then, the recipe data corresponding to the current age is selected from the remaining recipe data; then, the recommended daily calorie intake data is searched in the Chinese Children's Dietary Guidelines based on the current age; finally, the recipe data is recommended based on the recommendation score and the recommended daily calorie intake data, and the multiple recommended data are displayed for the user to select; Shopping management module - generates the corresponding usage of various ingredients in the recommended data according to the recommended data selected by the user, generates a shopping order for the e-commerce platform based on the corresponding usage of various ingredients, and pushes the order information after the user completes the shopping order payment; Recipe recognition module - obtains ingredient data based on the input food image recognition, and then matches the ingredient data with the allergy data to obtain an allergy warning signal.
2. The intelligent dietary management system for children according to claim 1, characterized in that: The method for obtaining the allergy data is a category filtering method and a custom filtering method; The category filtering method is: When a food category is selected, all ingredients in the subcategories of that food category will be considered as allergy data; When selecting a food subcategory, only the food corresponding to the selected food subcategory will be recognized as allergy data, and other food subcategories in the upper food category will be retained; The custom filtering method is performed by the following steps: B1. Enter the allergy text; B2. Use the Jieba word segmentation database to segment the allergy text in B1, dividing the allergy text into multiple words, and then semantically expand each word to obtain expanded words; B3. Map all the extended words in B2 with the allergen semantic data in the database storage module, calculate the corresponding confidence level, and use the allergen semantics with a confidence level exceeding a confidence threshold as the corresponding allergy data.
3. The intelligent dietary management system for children according to claim 1, characterized in that: The recommended daily calorie intake data is the recommended daily energy intake of Chinese children's dietary guidelines; The recipe recommendation method of the recipe recommendation module is as follows: C1. Based on the user's allergy data, the database storage module excludes recipe data containing the allergy data to obtain preliminary screening recipe data. If there are less than two preliminary screening recipe data, the user is prompted and the recommendation ends. If there are more than two preliminary screening recipe data, the process proceeds to C2. C2. Calculate the user's current age based on their date of birth. Select the appropriate age group data corresponding to the current age from the primary screening recipe data in C1. The recipe data corresponding to the applicable age group data is used as the secondary screening recipe data. If there are fewer than two secondary screening recipe data, prompt the user and end the recommendation. If there are more than two secondary screening recipe data, proceed to C3. C3. Search the Chinese Children's Dietary Guidelines for the recommended daily calorie intake data corresponding to the current age, and define the recommended daily calorie intake data as θ. Then, filter the second-screen recipe data whose total calorie value in the nutritional data is greater than or equal to 40% of θ. Finally, define the remaining second-screen recipe data as third-screen recipe data. If there are fewer than three third-screen recipe data, prompt the user and end the recommendation. If there are more than three third-screen recipe data, proceed to C4. C4, divide the three-screen recipe data into breakfast recommendation data, lunch recommendation data, and dinner recommendation data according to the total calorie value, and enter C5; When it is impossible to divide the breakfast recommendation data, lunch recommendation data and dinner recommendation data at the same time, the user is prompted and the recommendation is ended; the method for dividing the three-screen recipe data is to define the total calorie value of the breakfast recommendation data as α1, the total calorie value of the lunch recommendation data as α2, and the total calorie value of the dinner recommendation data as α3, and there exists 25%θ≤α1≤30%θ, 30%θ≤α2≤40%θ, 30%θ≤α3≤35%θ; the largest total calorie value in the breakfast recommendation data is defined as α 1max ; Define the maximum total calorie value in the Chinese food recommendation data as α 2max ; Define the maximum total calorie value in the dinner recommendation data as α 3max ; There is a total calorie value of the day α 1max +α 2max +α 3max ≤θ; C5. Sort the breakfast recommendation data by recommendation scores from high to low, and display the top N breakfast recommendation data for user selection; sort the lunch recommendation data by recommendation scores from high to low, and display the top N lunch recommendation data for user selection; sort the dinner recommendation data by recommendation scores from high to low, and display the top N dinner recommendation data for user selection, and 1≤N≤5 exists, and N is an integer.
4. The intelligent dietary management system for children according to claim 2, characterized in that: The custom filtering method is performed by the following steps: B1. Enter the allergy text; B2. Use the Jieba word segmentation library to segment the allergy text in B1, dividing the allergy text into multiple words. Then, use the Word2Vec word vector model to expand the synonyms of each word to obtain the expanded words. B3. Map the expanded words in B2 to the allergen semantic data in the database storage module, calculate the semantic similarity confidence based on the BERT model, and when the confidence is greater than 0.85, use the corresponding allergen semantic data as the corresponding allergy data.
5. The intelligent dietary management system for children according to claim 1, characterized in that: The recommendation score c is composed of the habit score a and the season score b, and c=6a+4b; The calculation method of the habit score a is expressed by the following formula: a=j-5n(n+1)+10m; Where j is the initial recommendation score of each recipe data and j is 100, a is the current recommendation score, n is the cumulative number of times the recipe data is not liked, m is the number of times the recipe data is ordered, and 5n(n+1) is a quadratic penalty term, which is used to exponentially reduce the recommendation weight of recipe data that users continuously reject; The seasonal score is assigned as follows: when any ingredient in the recipe data is a non-seasonal ingredient, it is assigned a value of 0.5D; otherwise, it is assigned a value of D, and D is 100.
6. The intelligent dietary management system for children according to claim 1, characterized in that: An intelligent housekeeper module is also provided, and the intelligent housekeeper module is used to interact with the user; The smart housekeeper module is provided with: Message processing module - inputs the user's query data, and inputs the query data into the local knowledge base module or the AI dialogue module, and displays the search data of the local knowledge base module and the content output by the AI dialogue module; The local knowledge base module stores and manages the nutrition knowledge base, searches the nutrition knowledge base using the TF-IDF weighted cosine similarity algorithm based on the query data from the message processing module to obtain search data; AI dialogue module - the AI dialogue module is configured to call the cloud-based natural language processing API, generate a response that complies with nutrition standards for the query data, and provide intelligent dialogue services based on the query data of the message processing module, call the cloud-based NLP API to generate a response, and filter the output that does not comply with nutrition standards based on the built-in compliance engine.
7. The intelligent dietary management system for children according to claim 6, characterized in that: The local knowledge base module extracts keywords through Jieba word segmentation, and searches in the nutrition knowledge base through fuzzy matching and exact matching to obtain the retrieval data.
8. The intelligent dietary management system for children according to any one of claims 1 to 7, characterized in that: The recipe recognition module performs recognition by improving the convolutional neural network model after training; The improved convolutional neural network model adds BatchNormalization after each convolution layer of the basic convolutional neural network model VGG, replaces the fixed-size pooling with AdaptiveAvgPool2d in the basic convolutional neural network model VGG, reduces the 4096 dimensions of the fully connected layer structure in the basic convolutional neural network model VGG to 1024 and 512 to the number of categories, and adds Dropout0.4 between the fully connected layer structure and the output layer of the basic convolutional neural network model VGG; and sets all four convolution blocks in the basic convolutional neural network model VGG to have the same structure.
9. The intelligent dietary management system for children according to claim 8, characterized in that: The training data of the improved convolutional neural network model is obtained by collecting multi-category food images through a web crawler, and then preprocessing the training data; During the training process of the improved convolutional neural network model, the cross entropy loss function CrossEntropyLoss is used as the objective function, the training optimizer is AdamW, and the learning rate scheduling strategy is OneCyc; The training termination condition of the improved convolutional neural network model is to reach the maximum training round or meet the early stopping mechanism.
10. The intelligent dietary management system for children according to any one of claims 1 to 7, characterized in that: The recipe data also includes recipe description data, preparation time, preparation difficulty level, preparation steps and step-by-step video instruction link; The nutritional data further includes at least one of protein, fat or carbohydrate content; The shopping management module is connected to the recipe recommendation module through a RESTful API interface, and the shopping management module is connected to the e-commerce platform through a RESTful API interface.