Intelligent food ordering and catering method based on accurate evaluation of food nutrients
By integrating the nutrition information evaluation function in the ordering system, the total intake of users' dishes is calculated and compared with the dietary guide, and an interactive report is generated, which solves the problem that traditional ordering methods cannot provide nutritional analysis, and achieves scientific ordering with balanced nutrition for users.
Patent Information
- Application Number
- CN202510638378.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-06-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional ordering methods cannot provide professional nutrition analysis and meal prep suggestions, making it difficult for users to judge whether the dish combination meets their own nutritional needs, which can easily lead to unbalanced nutritional intake.
The front-end interactive interface collects user information and associates the backend database, extracts nutritional information of dishes, calculates the total intake and compares it with the dietary guide for Chinese residents, evaluates the nutrient level, and generates interactive reports.
It realizes an accurate assessment of user nutrient intake, provides intuitive nutrient assessment levels and scientific meal ordering suggestions, helping users achieve nutritional balance and prevent health problems caused by unbalanced diet.
Smart Images

Figure CN120164583A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of catering information technology, and particularly to an intelligent ordering and meal - matching method based on precise evaluation of food nutrients. Background Art
[0002] In today's society, people's life rhythm has accelerated, the frequency of dining out has increased, and at the same time, the attention to healthy diet has been increasing day by day. However, the traditional ordering method cannot provide users with professional nutritional analysis and meal - matching suggestions. When ordering food, consumers often have difficulty judging whether the combination of dishes meets their own nutritional needs, which easily leads to unbalanced nutritional intake. For example, some office workers often eat high - calorie and high - fat fast food for a long time, lacking the intake of dietary fiber and vitamins, resulting in health problems. The existing catering systems lack the precise evaluation of food nutrients and the function of personalized ordering and meal - matching, and cannot meet people's pursuit of healthy diet. Therefore, it is of great practical significance to develop an intelligent ordering and meal - matching method. Summary of the Invention
[0003] The purpose of this application is to provide an intelligent ordering and meal - matching method based on precise evaluation of food nutrients, including the following steps: guiding the user to input the number of diners, gender, dining category (lunch / dinner), selected dishes and portion information through the front - end interaction interface, and associating the identity data of the currently logged - in user; extracting the nutritional information corresponding to each dish from the background database according to the selected dishes by the user, including the content data of energy, protein, fat, carbohydrates, dietary fiber, vitamins and minerals; multiplying the unit content of each nutrient in the selected dishes by the portion parameter input by the user, and accumulating to obtain the total intake of each nutrient, comparing the total intake with the recommended intake of the Chinese Dietary Guidelines (Pagoda) to divide the evaluation grade of each nutrient; calculating the energy - providing ratios of carbohydrates, proteins and fats, and judging whether they fall into the preset AMDR interval according to the analysis of AMDR of macronutrients. The AMDR refers to Acceptable Macronutrient Distribution Ranges, which means the acceptable range of macronutrients, and is the lower and upper limits of the daily intake proposed to prevent the lack of energy - producing nutrients and at the same time reduce the risk of chronic diseases; calculating the intake by food category: statistically calculating the intake by classifying into milk, soybeans and nuts, animal foods, vegetables, fruits, grains and tubers, and comparing the current food - category content with the recommended standards for the corresponding age range according to the user's age range to generate a prompt message; integrating the evaluation results to generate an interactive report including a dietary pagoda proportion chart, a nutrient comparison table, a macronutrient pie chart and a text prompt; persistently storing the report data in the database and returning it to the front - end interface through the API interface.
[0004] In one embodiment, the ordering parameters are guided by a search box and a dynamic pop-up window for the user to input, and the content of the pop-up window dynamically adjusts the input fields according to the user's historical ordering data.
[0005] Further, the steps of dynamically adjusting the input fields include: Collecting and storing historical ordering data, recording the detailed information of each user order, including dish name, quantity, taste preferences (such as spiciness, sweetness, etc.), side dish selection, ordering time, number of diners, etc. Collecting the relevant operations of the user when inputting ordering parameters, such as whether the search box is used, which options are selected in the dynamic pop-up window, etc. Establishing a database to store this historical ordering data. A relational database can be selected and reasonably chosen according to the business scale and data characteristics. Designing a reasonable data table structure to ensure that the data can be efficiently queried and analyzed. Creating an "ordering record" table, including fields such as user ID, ordering time, dish ID, etc. Cleaning the collected historical ordering data to remove duplicate, incorrect, or incomplete data. For example, deleting uncompleted ordering records or records containing invalid dish information. Standardizing the data, for example, converting text information such as taste preferences into numerical values or categorical codes for subsequent analysis. Using data analysis techniques to mine the user's ordering habits and preferences. For example, finding out the dishes that the user often orders, the favorite taste combinations, peak dining times, etc. through statistical analysis. Using machine learning algorithms for more in-depth analysis, dividing users into different preference groups according to cluster analysis, and mining association rules to discover the association relationships between dishes. Based on the data analysis results, establishing a model for dynamically adjusting the input fields. For example, a rule-based model can be used to set the default values, recommended options, etc. of the input fields according to the user's historical ordering frequency and preferences; a machine learning model, such as a decision tree, neural network, etc., can also be used to predict the user's possible ordering needs and adjust the input fields. Displaying personalized options in the dynamic pop-up window according to the user's historical ordering data. For example, if the user often orders spicy dishes, the spiciness option in the pop-up window can be default set to the spiciness level commonly used by the user, and the dish recommendations related to the spicy taste can be prominently displayed. Dynamically adjusting the order and display method of the options in the pop-up window. For the options that the user often selects, they can be placed in a more prominent position to improve the efficiency of user selection. Providing intelligent association and auto-completion functions for the search box according to the user's historical search keywords and ordering records. For example, when the user inputs part of the dish name, the search box can quickly display the dishes related to this name and that the user has ever ordered. Adjusting the sorting of search results. Prioritizing the display of the dishes that the user often orders or the dishes that match the user's preferences to improve the relevance of search results.
[0006] Further, the user inputs the number of diners, gender, dining category (lunch / dinner), selected dishes and portion information through the front-end interaction interface. The system automatically associates the identity data of the logged-in user and extracts the nutritional information of the corresponding dishes from the background database, including the content of various nutrients such as energy and protein. The ordering parameters are input through the search box and dynamic pop-up window. The search box defaults to retaining the search history; the content of the pop-up window flexibly adjusts the input fields based on the user's historical ordering data.
[0007] In one embodiment, the total energy calculation formula is: ; where n is the number of dishes, E i is the unit energy value of the i-th dish, and W i is the portion of the i-th dish.
[0008] In one embodiment, the nutrient calculation includes the refined calculation of energy, total carbohydrates, protein, calcium, sodium, iron, and vitamin A, and supports the user to customize and add calculation rules for rare nutrients.
[0009] Further, multiply the unit content of each nutrient in the selected dishes by the portion input by the user and then accumulate to obtain the total intake of each nutrient. Compare it with the recommended intake in the Chinese Dietary Guidelines (Pagoda) and output a three-level evaluation grade of "insufficient", "suitable", and "excessive". The judgment threshold will change dynamically according to the user's gender, age, and physical activity level. At the same time, calculate the energy contribution ratios of carbohydrates, protein, and fat, and judge whether they are within the preset AMDR range (carbohydrates 50%-65%, protein 10%-20%, fat 20%-30%), and mark the exceeded part with color in the pie chart of the energy contribution ratio of macronutrients. In this step, the nutrient calculation covers energy, total carbohydrates, protein, calcium, sodium, iron, vitamin A, etc., and supports the user to customize and add calculation rules for rare nutrients.
[0010] In one embodiment, the evaluation grades of each nutrient are divided into three levels: "insufficient", "suitable", and "excessive", and the judgment threshold is dynamically adjusted based on the user's gender, age, and physical activity level.
[0011] In one embodiment, the AMDR range is set to carbohydrates 50%-65%, protein 10%-20%, and fat 20%-30%, and the exceeded part of the energy contribution ratio of macronutrients in the pie chart is marked with color.
[0012] In one embodiment, the food category classification adopts a multi-level tree structure, in which animal foods are further subdivided into subcategories of poultry and livestock meat, aquatic products, and eggs.
[0013] Furthermore, the intake is statistically classified by dairy products, soy nuts, etc. According to the user's age range, the current content of food categories is compared with the recommended standards for the corresponding age groups to generate prompt information. The food categories are classified using a multi-level tree structure. For example, animal foods are further subdivided into subcategories such as poultry and livestock meat, aquatic products, and eggs, making the classification more detailed and scientific.
[0014] In one embodiment, in the interactive report, the dietary pagoda proportion chart uses a dynamic stacked bar chart to simultaneously display the proportion of the current meal intake and the reference line of the recommended intake.
[0015] In one embodiment, the nutrient comparison table supports sorting by deviation degree by clicking on the table header, and the over-limit data items are associated and jumped to the alternative dish recommendation list.
[0016] In one embodiment, the method further includes a real-time update mechanism: when the user modifies the dish or portion size, it automatically triggers recalculation and report refresh.
[0017] Furthermore, based on the above evaluation results, an interactive report is generated that includes a dietary pagoda proportion chart (using a dynamic stacked bar chart to simultaneously display the proportion of the current meal intake and the reference line of the recommended intake), a nutrient comparison table (supporting sorting by deviation degree by clicking on the table header, and the over-limit data items are associated and jumped to the alternative dish recommendation list), a pie chart of the energy proportion of macronutrients, and text prompts. The report data is stored in a database that uses a graph structure to store multi-dimensional relationships (dishes - nutrients - food categories) and has a caching mechanism to accelerate high-frequency queries, and is returned to the front-end interface through an API interface.
[0018] In one embodiment, after the evaluation report is generated, an optimization plan including alternative dish combinations and portion adjustment suggestions is further generated according to the nutritional deviation, and the user adoption rate is predicted according to a probability model.
[0019] In one embodiment, the database uses a graph structure to store the multi-dimensional relationship of dishes - nutrients - food categories, and accelerates high-frequency query operations according to the caching mechanism.
[0020] Beneficial effects The intelligent ordering and meal - matching method based on the precise assessment of food nutrients of the present invention has significant advantages in many aspects. In terms of improving the scientific nature of ordering, it can accurately assess the nutrient intake of users, give an intuitive nutrient assessment level with reference to the Chinese Residents' Dietary Guidelines (Pagoda), clearly show whether the nutrient intake is "insufficient", "appropriate" or "excessive", and at the same time analyze whether the energy contribution ratio of macronutrients meets the scientific range, count the intake by food category and compare it with the recommended standards for different age groups, guiding users to order scientifically in all aspects, achieving nutritional balance, and effectively preventing health problems caused by unbalanced diet such as obesity and malnutrition. In terms of optimizing the user experience, the dynamic pop - up window adjusts the input fields according to the user's historical ordering data, greatly improving the ordering efficiency. The interactive report is presented in a visual form, including the dietary pagoda proportion chart, nutrient comparison table, macronutrient energy contribution ratio pie chart, etc. Users can intuitively understand the nutritional information. The nutrient comparison table can be sorted by the deviation degree, and the over - limit data is also associated with recommended alternative dishes to meet the personalized needs of users. From the perspective of data processing, the age - stratified database uses 4 physical sub - tables combined with a logical view, which can quickly locate the corresponding data according to the user's age, improving the query efficiency and providing accurate nutritional references for users of different age groups. The real - time update mechanism uses WebSocket long - connections and a difference - comparison algorithm to quickly respond when the user modifies the ordering information, recalculating and evaluating only the changed data, reducing the consumption of computing resources and realizing real - time report refreshing. In addition, the rule engine supports users to customize JS formulas to calculate rare nutrients, meeting users' attention to special nutritional components and personalized calculation needs, greatly expanding the flexibility and scalability of the system functions and adapting to diverse nutritional analysis scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following - described drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on the structures shown in these drawings.
[0022] Figure 1 It is a working - step diagram of an intelligent ordering and meal - matching method based on the precise assessment of food nutrients provided by the first embodiment of the present invention; Figure 2 It is a schematic diagram of dynamic threshold adjustment provided by the first embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0023] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0024] It should be noted that if there are directional indications (such as up, down, left, right, front, back,...) involved in the embodiments of the present invention, the directional indications are only used to explain the relative position relationship and movement conditions between components in a specific posture. If the specific posture changes, the directional indications will also change accordingly.
[0025] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one such feature. In addition, if "and / or" or "and / or" appears throughout the text, its meaning includes three parallel solutions. Taking "A and / or B" as an example, it includes solution A, solution B, or a solution where A and B are satisfied simultaneously. In addition, the technical solutions between various embodiments can be combined with each other, but it must be based on the fact that those of ordinary skill in the art can implement them. When the combination of technical solutions results in contradictions or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the protection scope required by the present invention.
[0026] Embodiment 1 Reference Figure 1 - Figure 2, the present invention provides a smart ordering and meal - matching method based on precise assessment of food nutrients, including the following steps: guiding the user to input the number of diners, gender, meal type (lunch / dinner), selected dishes and portion information through a front - end interaction interface, and associating the identity data of the currently logged - in user; extracting the nutritional information corresponding to each dish from the background database according to the selected dishes by the user, including the content data of energy, protein, fat, carbohydrates, dietary fiber, vitamins and minerals; multiplying the unit content of each nutrient in the selected dishes by the portion parameter input by the user, and accumulating to obtain the total intake of each nutrient, comparing the total intake with the recommended intake of the Chinese Dietary Guidelines (Pagoda), and classifying the assessment levels of each nutrient; calculating the energy contribution ratios of carbohydrates, proteins and fats, and judging whether they fall into the preset AMDR interval according to the analysis of the Acceptable Macronutrient Distribution Ranges (AMDR); calculating the food category content: statistically counting the intakes by classifying into milk, soybeans and nuts, animal foods, vegetables, fruits, grains and tubers, and comparing the current food category content with the recommended standards for the corresponding age range according to the user's age range to generate prompt information; integrating the assessment results to generate an interactive report including a dietary pagoda proportion chart, a nutrient comparison table, a macronutrient pie chart and text prompts; persistently storing the report data in the database and returning it to the front - end interface through an API interface.
[0027] First, when the user enters the ordering page, the system first pops up a simple guiding pop - up window to ask for the number of diners, gender, and meal type (lunch / dinner). According to the meal data input by the user, the interface dynamically loads the corresponding number of dish selection areas. The dish selection adopts a combination of a search box and an intelligent recommendation list. When the user enters a dish keyword, the system retrieves relevant dishes from the background database in real - time and performs intelligent sorting and recommendation according to factors such as the user's historical ordering data, current time, season, and dish popularity. For example, at lunchtime, the system will give priority to recommending popular lunch dishes; in summer, it will recommend more dishes for cooling and relieving summer heat.
[0028] For each dish, the user can determine the portion by clicking the "+" and "-" buttons or directly entering a number. The portion units support common ones such as "portion", "gram", "milliliter", etc., and the system will automatically recommend a suitable default portion according to the dish type. For example, for the staple food rice, the default portion is set to 200 grams; for the drink cola, the default portion is set to 330 milliliters. At the same time, the system also provides a visual portion reference diagram, such as plates and cups of different sizes, to help users more intuitively understand the concept of portion.
[0029] After the user confirms the order information, the system immediately associates the user's identity data with the order information. By calling the API interface of the backend, the nutritional information corresponding to the selected dishes is quickly extracted from the database. The database uses a combination of relational databases (such as MySQL) and non-relational databases (such as MongoDB) to store data. The relational database is used to store structured user information, basic dish information, and standard nutritional component data, while the non-relational database is used to store unstructured dish pictures, user reviews, historical order records, etc. When extracting nutritional information, indexing technology is used to improve query efficiency and ensure accurate nutritional data can be obtained in a short time.
[0030] Calculate the intake of each nutrient in the selected dishes according to strict mathematical formulas. Taking the calculation of total energy as an example, according to the formula , where n is the number of dishes, E i is the unit energy value of the i-th dish, and W i is the portion of the i-th dish. In the actual calculation process, considering that the nutritional component content of different ingredients may vary due to factors such as origin, season, and cooking method, the system will regularly update data from authoritative nutritional databases (such as the Chinese Food Composition Table) and combine machine learning algorithms to model and analyze these factors to improve the accuracy of nutrient calculation. For example, for the same kind of vegetable, the vitamin content may be different in different seasons, and the system will appropriately adjust the calculation results according to the season factor.
[0031] Compare the total intake of each nutrient calculated with the recommended intake in the Chinese Dietary Guidelines (Pagoda). During the comparison process, individual differences such as the user's gender, age, and physical activity level are fully considered. The system has pre-established a large database of recommended intakes and stores the corresponding recommended intake ranges according to different user characteristics. For example, for a 30-year-old male engaged in office work, the recommended daily protein intake is 65 - 75 grams; for a 50-year-old female, the recommended daily calcium intake is about 1000 milligrams. By accurately matching the user characteristics, the system can accurately judge whether the user's nutrient intake meets the standard and give the corresponding evaluation level.
[0032] The evaluation levels are divided into three levels: "insufficient", "appropriate", and "excessive". The judgment threshold is not fixed, but dynamically adjusted based on the user's gender, age, and physical activity level. For example, for children and adolescents, due to their special nutritional needs during growth and development, the appropriate range of nutrient intake is relatively wide; for the elderly, due to the decline of physical functions, the recommended intake of certain nutrients (such as calcium and vitamin D) will increase accordingly, while the intake of nutrients such as fat and sodium needs to be more strictly controlled. The system automatically adjusts the evaluation threshold by real-time monitoring of the user's input identity information and ordering data to ensure the scientificity and accuracy of the evaluation results.
[0033] According to nutritional principles, each gram of carbohydrate and protein provides 4 kcal of energy, and each gram of fat provides 9 kcal of energy. By multiplying the intake of each macronutrient by its corresponding energy coefficient and then dividing by the total energy, the energy contribution ratio of each can be obtained. For example, if a user consumes 150 grams of carbohydrates, 30 grams of protein, and 20 grams of fat in a meal, and the total energy is 150×4 + 30×4 + 20×9 = 900 kcal, then the energy contribution ratio of carbohydrates is (150×4)÷900×100%≈66.7%, the energy contribution ratio of protein is (30×4)÷900×100%≈13.3%, and the energy contribution ratio of fat is (20×9)÷900×100%≈20%. Compare the calculated energy contribution ratios of macronutrients with the preset AMDR ranges (carbohydrates 50% - 65%, protein 10% - 20%, fat 20% - 30%). In terms of visual display, the Echarts chart library is used to draw a pie chart of macronutrients. When the energy contribution ratio of a certain macronutrient exceeds the preset range, the corresponding sector area in the pie chart will be marked with a prominent color, and detailed prompt information will be displayed beside it to inform the user of the potential health risks caused by excessive or insufficient intake of this nutrient. For example, if the energy contribution ratio of carbohydrates is too high, the prompt information can be "Your carbohydrate intake is excessive. Continuing like this may lead to problems such as blood sugar fluctuations and weight gain. It is recommended to appropriately reduce the intake of staple foods and high-sugar foods."
[0034] This method classifies and counts the foods in the user's order according to categories such as dairy products, soy nuts, animal foods, vegetables, fruits, grains and tubers. The food category classification adopts a multi-level tree structure, in which animal foods are further subdivided into subcategories of poultry and livestock meat, aquatic products, and eggs. During the statistical process, the query statements and data aggregation functions of the database are used to quickly and accurately calculate the intake of each food category. For example, through the SQL query statement "SELECT SUM(quantity) FROM orders WHERE food_type LIKE '% animal food %' AND sub_type LIKE '% poultry and livestock meat %'", the total intake of poultry and livestock meat in the user's order can be counted.
[0035] According to the user's age range, the system obtains the corresponding recommended standards for food category intakes from a pre-established database of age group recommendation standards. For example, for children, an appropriate amount of dairy products should be consumed every day to meet the calcium requirement, and at the same time, a certain amount of vegetables, fruits, and cereal foods should be ensured; for the elderly, due to the weakened digestive function, the intake of protein needs to be appropriately increased, and the excessive intake of fat and dietary fiber should be reduced. The content of the food categories actually consumed by the user is compared with the recommended standards. If there are deviations, the system automatically generates personalized prompt information. The prompt information is presented in easy-to-understand language, such as "Your vegetable intake is insufficient today. It is recommended to add a serving of cold cucumber salad or stir-fried seasonal vegetables to supplement vitamins and dietary fiber."
[0036] For the design of the interactive report content, the system integrates the above evaluation results to generate a rich and comprehensive interactive report. The report content includes a dietary pagoda proportion chart, a nutrient comparison table, a macronutrient pie chart, and text prompts. The dietary pagoda proportion chart uses a dynamic stacked bar chart and is drawn using visualization libraries such as D3.js. In the chart, the proportion of the intake of this meal and the reference line of the recommended intake are synchronously displayed. When the user hovers the mouse over the chart, detailed nutrient information and intake data can be displayed. The nutrient comparison table is implemented using the table element of HTML combined with the interactive function of JavaScript, supporting sorting by deviation degree when clicking on the table header, which is convenient for users to quickly view which nutrients have large intake deviations. At the same time, for the over-limit data items, hyperlinks are set to be associated and jump to the alternative dish recommendation list.
[0037] Report visualization technology implementation. In terms of front-end display, the Canvas and SVG technologies of HTML5 are used, combined with the animation effects of CSS3, to achieve dynamic visualization display of reports. For example, in the dietary pagoda proportion chart, when the user switches between different meal times (breakfast, lunch, dinner) or different time periods (day, week, month), the chart updates the data with a smooth animation transition effect, enhancing the user experience. For the macronutrient pie chart, using the interactive features of SVG, functions such as changing color on mouse hover and popping up detailed information on click are implemented, enhancing the interactivity between the user and the chart.
[0038] When the user modifies the dishes or portions during the meal ordering process, the front-end establishes a long connection with the back-end through the WebSocket API of JavaScript. The WebSocket protocol is based on the TCP protocol and is an extension of the HTTP protocol, achieving full-duplex communication. When establishing a connection, the front-end sends a handshake request. After the back-end verifies the legitimacy of the request, it establishes a WebSocket connection and returns a connection success response. After the connection is established, the front-end and the back-end can transmit data in real-time bidirectionally, without frequently initiating HTTP requests, greatly reducing network latency and data transmission volume.
[0039] In this application, the implementation steps of the difference comparison algorithm include that after the back-end receives the modification information sent by the front-end, it uses the difference comparison algorithm to calculate the differences in dish and nutrient data before and after the modification. The difference comparison algorithm adopts a comparison method based on hash values. First, it generates hash values for the dish and nutrient data before the modification, and then generates hash values for the corresponding data after the modification. By comparing the two hash values, it quickly determines which data has changed. For example, for the dish list, if the user changes a serving of braised pork to a serving of steamed fish, the algorithm will identify the change in the dish by comparing the hash values of the dish ID and related attributes, and further calculate the differences in nutrient content between the two dishes.
[0040] According to the difference comparison results, the system only recalculates and evaluates the nutrients for the changed data. The recalculation process follows the nutrient calculation logic and evaluation methods described above to ensure the accuracy of the calculation results. After the calculation is completed, the system generates new report data and pushes the new data to the front-end through the WebSocket long connection. After the front-end receives the new data, it uses the DOM operation method of JavaScript to quickly update the report content on the page, achieving real-time refresh of the report. During the refresh process, a partial update strategy is adopted, only updating the changed part, avoiding re-rendering the entire page, and improving the page response speed.
[0041] After the evaluation report is generated, the system conducts an in-depth analysis of the user's nutritional deviation. By establishing a nutritional deviation analysis model, the system comprehensively considers the user's nutrient intake, food category intake, and health goals (such as weight loss, muscle gain, and health maintenance), and generates an optimization plan that includes alternative dish combinations and portion adjustment suggestions. For example, if the user consumes too much fat, the system will recommend some low-fat alternative dishes, such as replacing fried chicken legs with grilled chicken legs, and recommends reducing the amount of meat and increasing the intake of vegetables and fruits.
[0042] Probabilistic model predicts user adoption rate: In order to better understand the user's acceptance of the optimization plan, the system uses the probability model in machine learning to predict the user adoption rate. The probability model is trained based on historical user data, including the user's basic information, ordering habits, and actual adoption of the optimization plan. During the training process, algorithms such as logistic regression and decision trees are used to build the model, and the model parameters are optimized through methods such as cross-validation to improve the accuracy of the model. When a new optimization plan is generated, the model predicts the probability of the user adopting the plan based on the user's current characteristics and historical behavior, and displays the prediction results to the user to help the user make better decisions.
[0043] The database uses a graph database (such as Neo4j) to store the multidimensional relationship between dishes, nutrients, and food categories. In the graph structure, dishes, nutrients, and food categories are respectively used as nodes, and the relationship between them is used as edges. For example, Kung Pao Chicken, as a dish node, is connected to nutrient nodes such as protein, fat, and carbohydrates through edges of "includes" relationships, and is also connected to food category nodes such as animal food (chicken) and vegetables (peanuts, cucumbers) through edges of "belongs to" relationships. This graph structure can intuitively display the complex relationship between data, facilitating complex query and analysis operations.
[0044] In order to improve the response speed of the system, a cache mechanism is used to speed up high-frequency query operations. The cache layer uses the Redis memory database to store frequently accessed data (such as nutritional information of popular dishes, users' historical order records, etc.) in the cache. When a user initiates a query request, the system first checks whether the corresponding data exists in the cache. If so, the data is directly obtained from the cache and returned to the user, which greatly reduces the query pressure and response time of the database. If there is no hit data in the cache, the data is queried from the database and the query results are stored in the cache so that they can be quickly obtained the next time the query is made. In terms of cache updates, a write-after-invalidation strategy is adopted. When the data in the database changes, the corresponding cached data is invalidated in time to ensure the consistency of the cached data.
[0045] Existing technologies mostly provide general nutritional advice without fully considering individual differences. This solution dynamically adjusts the nutrient assessment threshold based on the user's gender, age, physical activity level, etc., accurately determines "insufficient", "adequate", and "excessive", and combines with the Dietary Guidelines for Chinese Residents (Pagoda) to customize exclusive nutritional assessments for different users. For example, for special groups such as the elderly, children, and fitness enthusiasts, more targeted nutritional analyses are provided. The traditional ordering interface is fixed and has poor interactivity. This solution uses Vue.js to implement dynamic pop-ups, adjusts the input fields according to the user's historical ordering data, and simplifies the ordering process. In terms of visual display of reports, the dietary pagoda proportion chart, nutrient comparison table, macronutrient pie chart, etc., are combined with interactive functions such as table sorting and over-limit associated recommendations to facilitate users to quickly obtain information and optimize the ordering decision. Most existing systems only support the calculation of common nutrients. The existing database has low query efficiency and is not updated in a timely manner. This solution uses 4 physical sub-tables combined with a logical view for the age-stratified database to improve the query speed. The real-time update mechanism uses WebSocket long connections and differential comparison algorithms to respond to ordering changes in real time, only recalculating the changed data, reducing resource consumption, and achieving rapid report refreshing. This solution generates an optimized solution including alternative dishes and portion adjustment suggestions, and predicts the user adoption rate through a probability model, moving from simple assessment to active intervention and guidance to help users develop healthy eating habits.
[0046] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structural transformation made using the specification and drawings of the present invention under the inventive concept of the present invention, or direct / indirect application in other related technical fields, is included in the patent protection scope of the present invention.
Claims
1. A smart meal ordering and meal matching method based on accurate evaluation of food nutrients, characterized in that: The following steps are involved: The front-end interactive interface guides users to input the number of diners, gender, meal type, selected dishes and portion information, and associates the identity data of the currently logged-in user. Based on the dishes selected by the user, the nutritional information corresponding to each dish is extracted from the back-end database, including the content data of energy, protein, fat, carbohydrates, dietary fiber, vitamins and minerals; The unit content of each nutrient in the selected dish is multiplied by the portion parameter entered by the user, and the total intake of each nutrient is accumulated. The total intake is compared with the recommended intake in the Chinese Dietary Guidelines, and the evaluation level of each nutrient is divided; Calculate the energy supply ratio of carbohydrates, proteins, and fats, and determine whether the energy ratio of macronutrients falls within the preset AMDR range based on macronutrient AMDR analysis; Calculation of food content by category: Count the intake by categories of milk, soy and nuts, animal food, vegetables, fruits, and cereals and potatoes. Compare the current food content with the recommended standards for the corresponding age group according to the user's age range, and generate prompt information; Integrate the assessment results to generate an interactive report that includes a dietary guideline ratio chart, nutrient comparison table, macronutrient pie chart, and text prompts; The report data is persistently stored in the database and returned to the front-end interface through the API interface.
2. The intelligent meal ordering and meal matching method based on accurate evaluation of food nutrients according to claim 1 is characterized in that: The dish selection is achieved by the user entering the dish name in the search box and matching it with the backend database. Other ordering parameters are guided by the user through dynamic pop-up windows and search boxes, and the input fields are dynamically adjusted according to the user's historical ordering data. The database uses a graph structure to store the multi-dimensional relationship between dishes, nutrients and food categories, and accelerates high-frequency query operations based on a cache mechanism.
3. The intelligent meal ordering and meal matching method based on accurate evaluation of food nutrients according to claim 1 is characterized in that: The total energy calculation formula is: Among them, n is the number of dishes, E i is the unit energy value of the i-th dish, W i is the size of the i-th dish.
4. The intelligent meal ordering and meal matching method based on accurate evaluation of food nutrients according to claim 1 is characterized in that: Nutrient calculation includes detailed calculation of energy, total carbohydrates, protein, calcium, sodium, iron and vitamin A, and supports users to add customized nutrients.
5. The intelligent meal ordering and meal matching method based on accurate evaluation of food nutrients according to claim 1 is characterized in that: The assessment levels of each nutrient are divided into three levels: "insufficient", "appropriate" and "excessive", and the judgment threshold is based on the nutrient reference intake standard of the Chinese Dietary Reference Intake.
6. The intelligent meal ordering and meal matching method based on accurate evaluation of food nutrients according to claim 1 is characterized in that: The AMDR range is set to 50%-65% for carbohydrates, 10%-20% for proteins, and 20%-30% for fats. The energy proportion and excess portion of the three major macronutrients in the food ordered are marked by the colors of the pie chart.
7. The intelligent meal ordering and meal matching method based on accurate evaluation of food nutrients according to claim 1, characterized in that: The food category classification adopts a multi-level tree structure, in which animal food is further subdivided into poultry and livestock meat, aquatic products, and eggs.
8. The intelligent meal ordering and meal matching method based on accurate evaluation of food nutrients according to claim 1, characterized in that: In the interactive report, the dietary guideline proportion chart uses a dynamic stacked bar chart to simultaneously display the proportion of this meal's intake and the recommended intake reference line.
9. The method according to claim 1, characterized in that: The nutrient comparison table supports sorting by deviation by clicking on the table header, and the exceeded data items are linked to jump to the recommended list of alternative dishes.
10. The intelligent meal ordering and meal matching method based on accurate evaluation of food nutrients according to claim 1, characterized in that: The method also includes a real-time update mechanism: when a user modifies a dish or portion size, recalculation and report refresh are automatically triggered; after the evaluation report is generated, an optimization plan including alternative dish combinations and portion adjustment suggestions is further generated based on nutritional deviations, and the user adoption rate is predicted based on a probability model.
Citation Information
Patent Citations
Nutritious ordering method of Shandong cuisine based on WeChat platform
CN109102860A
Intelligent canteen nutrition and health management method and system
CN116453649A