A method and system for personalizing a self-service meal ordering package
By combining multi-source heterogeneous data processing and natural language parsing with a multi-objective optimization model, personalized meal packages are generated, solving the problems of insufficient data integration and nutritional constraints in traditional ordering systems, and realizing a closed loop of intelligent and personalized catering services.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 贾万云
- Filing Date
- 2026-03-10
- Publication Date
- 2026-06-12
AI Technical Summary
Existing ordering systems lack the ability to deeply integrate multi-source heterogeneous data, making it impossible to build dynamic user profiles. Recommendation results lack flexibility, and nutritional constraints and combination optimization are insufficient, resulting in recommendation results that deviate from actual user needs and inventory status.
By acquiring multi-source heterogeneous data, cleaning and normalizing it, dynamic user profiles are constructed. Combining natural language processing and association rule mining, a multi-objective combination optimization model is used to generate personalized meal packages, supporting real-time user operation and visual feedback, and optimizing ingredient utilization and nutritional balance.
It enables personalized meal recommendations, enhances user engagement and satisfaction, reduces food waste, optimizes cost control, and achieves a digital and intelligent closed loop in catering services.
Smart Images

Figure CN122199101A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of personalized ordering technology, specifically to a method and system for personalized self-service ordering meal packages. Background Technology
[0002] With the accelerated digital transformation of the catering industry and the increasing demand for healthy eating among consumers, buffets and customized set menus have become an important part of the catering business. Traditional buffets typically offer fixed combinations of dishes, limiting users' choices and failing to meet personalized taste preferences and nutritional needs. In recent years, although some intelligent ordering systems have emerged, attempting to recommend dishes based on users' historical order history, the following significant technical shortcomings still exist in practical applications: 1. Limited Data Dimensions and Insufficient Capability for Integrating Heterogeneous Data from Multiple Sources: Most existing ordering systems rely solely on users' historical consumption records (such as order frequency and amount) for analysis, neglecting the comprehensive utilization of user physiological characteristics (such as body fat percentage, basal metabolic rate, and blood sugar levels), real-time environmental parameters (such as temperature, humidity, and air pressure), and data from third-party health platforms. Furthermore, these systems often lack in-depth correlation analysis of food nutritional components, real-time inventory status, and supply chain data, leading to recommendations that are out of sync with actual inventory levels (e.g., recommending near-expiry or out-of-stock ingredients) or the user's real-time physical condition (e.g., recommending high-GI foods when the user has low blood sugar). Simultaneously, the raw data contains a large amount of noise, missing values, and heterogeneous data with different dimensions. Existing technologies lack effective cleaning, normalization, and dimensionality reduction mechanisms, resulting in low data quality and difficulty in supporting high-precision algorithm models.
[0003] 2. Static User Profiles: Traditional user profile construction relies primarily on static historical behavioral data, lacking time decay factors and failing to reflect recent shifts in user dietary preferences. More importantly, existing systems lack deep NLP parsing capabilities, making it difficult to identify ambiguous needs and implicit intentions in user input, such as "less oil," "muscle gain," and "mildly spicy," and also unable to perform semantic reasoning based on context (such as weather and time). This results in systems failing to generate dynamic profiles that truly match the user's current needs, leading to generic and inflexible recommendation results.
[0004] 3. Recommendation algorithms lack scientific nutritional constraints and combinatorial optimization logic: When generating recommended meal plans, existing technologies mostly employ simple collaborative filtering or rule-based association recommendations (e.g., "bought A and also bought B"). However, such recommendations often only focus on product associations, neglecting the scientific nature of dietary structure (e.g., macronutrient ratios, avoidance of prohibited ingredients). Furthermore, existing recommendation algorithms are mostly single-objective optimizations (e.g., maximizing user preferences or minimizing costs only), lacking multi-objective combinatorial optimization models that incorporate nutritional balance, user preference matching, cost control, and ingredient utilization (e.g., consuming high-inventory ingredients) into a unified framework. When faced with massive combinations of ingredients, simple exhaustive or greedy algorithms struggle to find Pareto optimal solutions that satisfy multiple constraints in a short time. Summary of the Invention
[0005] To address the aforementioned technical problems, a method and system for personalized customization of self-service meal sets is provided. This technical solution resolves the issues raised in the background section.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: In a first aspect of the present invention, a method for personalized customization of self-service meal sets is provided, comprising: Acquire heterogeneous data from multiple sources and perform cleaning, deduplication, missing value imputation, and normalization to form a standardized dataset; Based on a standardized dataset, machine learning algorithms are used to extract users’ dietary preference features, nutritional needs features, and taboo features to construct a dynamic user profile model. Natural language processing technology is used to analyze users’ real-time input text or voice to identify users’ current ordering intent and vague needs. Based on the real-time inventory data and food nutritional data, the complementarity and substitutability between food ingredients are analyzed using association rule mining algorithms to generate an initial candidate product set including vegetables, fruits, meat, aquatic products, staple foods and condiments. Using the dynamic user profile model as a constraint, and with nutritional balance, user preference matching, cost control and food utilization as multiple objective functions, a combined optimization model is constructed. The initial candidate product set is iteratively calculated using a genetic algorithm or particle swarm optimization algorithm to generate several recommended self-service package options; Recommended meal plans are pushed to users' devices, displaying the portion size, nutritional components and calories of each ingredient in a visual way; It receives user actions to add, delete, or modify items within the package, triggering a real-time recalculation mechanism to dynamically adjust the total price, nutritional ratio, and related recommended products of the package. Once the user confirms the package, structured order data is generated and distributed to the kitchen preparation system and supply chain management system.
[0007] Preferably, the cleaning, deduplication, missing value imputation, and normalization processing specifically includes the following steps: Establish a cleaning rule base based on metadata management, use "timestamp + unique order number" to remove duplicate records for users' historical consumption data, and use the sliding window mean method to fill in the small deviations in consumption timestamps; For user physiological characteristic data and environmental parameter data, the K-nearest neighbor algorithm or multiple imputation method is used to predict and impute missing values. The imputation calculation formula is as follows: ; in, This represents the predicted imputation results for missing values, where K is the number of nearest neighbor samples selected. For the first The weights of the nearest neighbor samples, For the first The feature values of the nearest neighbor samples; For real-time inventory data and food nutritional composition data, min-max normalization and Z-score standardization methods are used to map data of different dimensions to the [0, 1] interval or a standard normal distribution. The normalization formula is as follows: ; in, The value is the normalized value. These are the original values. and These are the maximum and minimum values for this feature dimension, respectively; Principal component analysis was used to reduce the dimensionality of high-dimensional nutrient data, retaining feature dimensions with a cumulative contribution rate greater than 95%, thus forming a high-quality standardized dataset.
[0008] Preferably, the step of constructing a dynamic user profile model based on a standardized dataset and utilizing machine learning algorithms specifically includes: Word2Vec or BERT models are used to vectorize user historical review texts to extract keywords related to food and beverage flavors; By combining the frequency, amount, and remaining food rate of users' historical order records, Hidden Markov Models or Long Short-Term Memory Networks can be used to predict the trend of users' dietary preference shifts in the next stage. By incorporating basal metabolic rate and body fat percentage from physiological characteristic data, users are divided into different nutritional need levels using clustering algorithms; Finally, a weighted fusion strategy is used to perform multimodal fusion of the above-mentioned dietary preference features, nutritional requirement features, and taboo features based on allergy history and religious beliefs, generating a dynamic user profile vector with a time decay factor. The calculation formula is as follows: ; in, For dietary preference feature vectors, This is a feature vector representing nutritional requirements. This is a taboo feature vector, typically a binary vector of 0s and 1s; These are the weight coefficients of the corresponding features, and satisfy... .
[0009] Preferably, the step of parsing the user's real-time input using natural language processing technology specifically includes: We construct a joint model for intent recognition and slot filling specifically for the catering industry, and use a deep neural network based on the attention mechanism to perform semantic parsing on the text or speech-to-text input by the user. Identify implicit intentions that include vague requirements such as "low oil", "mildly spicy", "muscle building" and "satiety", and calculate their semantic similarity with standard nutrition labels. By combining current contextual information, such as current time, weather, and user location, the temporal dependencies of user needs can be captured through context gating units; For vague requirements that cannot be directly matched, the relevant knowledge base is retrieved, and the corresponding ingredient attributes or cooking method suggestions are inferred based on the knowledge graph, which serve as semantic constraints for the subsequent generation of a candidate product set. Among them, semantic similarity Calculated using the cosine similarity formula: ; in, Word embedding vectors for user-input text. For standard nutrition labels or intent vectors, word embedding vectors Represents the vector dot product. This represents the L2 norm of a vector.
[0010] Preferably, the step of using association rule mining algorithms to analyze the complementarity and substitutability between ingredients specifically includes: Construct a multi-dimensional feature matrix that includes ingredient categories, cooking techniques, flavor characteristics, and nutritional elements; The support and confidence of food itemsets are calculated using the Apriori algorithm or FP-Growth algorithm. Minimum support threshold and minimum confidence threshold are set to discover frequently co-occurring "complementary food pairs" and "alternative food pairs" with similar nutritional effects. The seasonality coefficient of ingredients and inventory turnover days are introduced as weighting factors to perform weighted correction on the discovered association rules. When generating the initial candidate product set, the dietary structure template of "staple food + protein + vegetables + fruit + condiments" is used, combined with the constraint that the lift of the association rule is greater than 1, to ensure that the recommended combination is reasonable in terms of nutritional complementarity and flavor matching. Among them, Support(X) and Confidence The calculation formulas are as follows: ; ; in, and For different food item sets, For containing itemsets The number of transaction records, This represents the total number of transaction records. To contain simultaneously and Support from transaction records; The formula for calculating lift is: ; in, For itemsets Frequency of occurrence in all transactions, when >1 indicates and There is a positive correlation.
[0011] Preferably, the construction of the combinatorial optimization model and the use of a genetic algorithm for iterative calculation specifically includes: The objective function for nutritional balance is defined as the reciprocal of the Euclidean distance between the actual recommended meal and the recommended intake in the Chinese Dietary Guidelines. The objective function for user preference matching is defined as the cosine similarity between the recommended ingredients and the user profile vector; the objective function for cost control is defined as the difference between the ingredient BOM cost and the expected selling price. Define the objective function for ingredient utilization as the consumption weight of recommended dishes for ingredients with high inventory and near-expiry dates; establish a penalty function that includes upper and lower limits for calories, macronutrient ratios, a blacklist of prohibited ingredients, and budget constraints. A non-dominated sorting genetic algorithm is used to iteratively generate a Pareto optimal solution set through selection, crossover, and mutation operations. From the solution set, several recommended package schemes with the highest comprehensive scores on each objective function are selected. Constructed multi-objective fitness function The weighted summation formula is: ; in, A score for nutritional balance, such as the negative deviation of the macronutrient ratio from the standard value, is used to indicate nutritional balance. Score the degree of matching user preferences. The total cost of the package The ingredient utilization rate is scored based on inventory turnover weighting; These are the weighting coefficients for each objective; For penalties for violating constraints, such as including prohibited ingredients or exceeding the budget, the calculation formula is as follows: ; in, The penalty coefficient is... For the first A constraint function, such as g(x) = total heat - maximum allowable heat. This represents the total number of constraints.
[0012] Preferably, the mechanism for receiving user operations to add, delete, or modify items within the package and triggering a real-time recalculation specifically includes: Establish a real-time response engine based on incremental computation. When a user performs add, delete, or modify operations, only the gradient changes of the affected sub-objective function are recalculated, rather than a full recalculation. The sensitivity analysis method is used to assess the impact of product modifications on the overall nutritional composition. If the impact exceeds the preset threshold, an alarm is triggered or remedial ingredients are automatically recommended. The modified nutrition radar chart and calorie curve are rendered in real time on the visual interface. Based on the collaborative filtering algorithm, while the user modifies the product, the sidebar dynamically recommends related snacks or drinks that are highly complementary to the newly selected product and match the user profile. The recalculation process must be completed within 200 milliseconds to ensure smooth interaction; Among them, the Lagrange multiplier method or gradient descent method is used to perform sensitivity analysis on changes in nutrient ratio, with the objective function being... Regarding the quantity of ingredients Sensitivity coefficient The calculation is as follows: ; in, For the first The amount of each ingredient For small perturbation values of quantity, This is a nutrient ratio function, such as total protein content; If the absolute value of the sensitivity coefficient If the value exceeds the preset threshold, the modification is deemed to have a significant impact on the overall nutritional structure, and the associated recommendation remedial mechanism needs to be triggered.
[0013] Preferably, the generation and distribution of structured order data specifically includes: Generate a structured order in JSON or Protobuf format, which includes user ID, package details, special requirements such as no scallions, less salt, a nutritional summary table, and estimated preparation time. Message queues are used to break down orders into kitchen preparation instructions and supply chain deduction instructions. After receiving the instruction, the kitchen system dynamically adjusts the order of dishes on the serving screen based on the electronic price tag data; After receiving the instruction, the supply chain system updates the inventory database in real time and triggers an automatic replenishment alert based on the safety stock threshold. If a certain ingredient is out of stock due to user modifications, a replacement ingredient suggestion is immediately sent to the kitchen.
[0014] Preferably, this also includes storing the user-confirmed package in a historical database and using it for model updates, specifically including: Establish a feedback data cleaning pipeline to distinguish between explicit feedback, such as ratings and text reviews, and implicit feedback, such as whether the food was finished, modification records, and repurchase rate. The sentiment analysis model is used to score the positive and negative polarity of the evaluation text and extract fine-grained sentiment words for specific ingredients. Design an online learning mechanism that uses newly generated user selection data as training samples and employs stochastic gradient descent to fine-tune the parameters of the dynamic user profile model; For combinatorial optimization models, a reinforcement learning framework is introduced, where the user's final confirmation is regarded as a positive reward and the user's significant modification is regarded as a negative penalty. The weight coefficients of the objective function are updated through the Q-learning algorithm to achieve self-evolution of the model.
[0015] In a second aspect of the invention, a personalized self-service meal ordering system is also provided, comprising: The acquisition module is used to acquire multi-source heterogeneous data and perform cleaning, deduplication, missing value imputation and normalization processing on it to form a standardized dataset; The extraction module is used to extract users' dietary preference features, nutritional needs features, and taboo features based on a standardized dataset and using machine learning algorithms to construct a dynamic user profile model. The recognition module is used to parse the user's real-time input text or voice through natural language processing technology to identify the user's current ordering intention and vague needs; The first generation module is used to analyze the complementarity and substitutability between ingredients based on the real-time inventory data and the nutritional composition data of the ingredients using an association rule mining algorithm, and generate an initial candidate product set including vegetables, fruits, meat, aquatic products, staple foods and condiments. The construction module is used to construct a combined optimization model with the dynamic user profile model as a constraint and with nutritional balance, user preference matching degree, cost control and food utilization rate as multiple objective functions. The second generation module is used to iteratively calculate the initial candidate product set using a genetic algorithm or a particle swarm optimization algorithm to generate several recommended self-service package options. The push module is used to push recommended meal plans to the user terminal and display the portion size, nutritional components and calories of each ingredient in a visual manner. The adjustment module is used to receive user operations to add, delete, or modify items in the package, trigger a real-time recalculation mechanism, and dynamically adjust the total price, nutritional ratio, and related recommended products of the package. The confirmation module is used to generate structured order data and distribute it to the kitchen preparation system and supply chain management system after the user confirms the package.
[0016] Compared with the prior art, the present invention provides a method and system for personalized customization of self-service meal sets, which has the following beneficial effects: This invention breaks through the limitations of traditional single-data sources by deeply integrating heterogeneous data from multiple sources, including user physiological characteristics, historical behavior, real-time inventory, and environment. After cleaning and normalization, it constructs a dynamic user profile that includes preferences, nutrition, and contraindications, making recommendations more relevant to the user's real-time state. It combines natural language processing technology to analyze fuzzy demands and mine association rules, and utilizes a multi-objective combinatorial optimization model and genetic algorithm for iterative calculation to generate scientific meal plans for various catering dishes that conform to dietary guidelines while also considering commercial interests, solving the problems of low efficiency and nutritional imbalance caused by manual matching. It supports real-time recalculation and visual feedback for user add, delete, and modify operations, dynamically adjusting related recommendations and significantly improving user engagement and satisfaction. Furthermore, orders are automatically distributed to the kitchen and supply chain, linking inventory management, effectively reducing food waste, optimizing cost control, and achieving a closed loop of digitalization, intelligence, and personalization in catering services. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the method flow of S101-S109 in this invention; Figure 2 This is a schematic diagram of the method flow for S201-S204 in this invention; Figure 3 This is a schematic diagram of the method flow for S301-S304 in this invention; Figure 4 This is a schematic diagram of the method flow for S401-S404 in this invention; Figure 5 This is a schematic diagram of the method flow for S501-S504 in this invention. Detailed Implementation
[0018] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.
[0019] Example 1 Please refer to Figure 1 As shown, in a first aspect of the present invention, a method for personalized customization of self-service meal sets is provided, comprising: S101. Obtain multi-source heterogeneous data and perform cleaning, deduplication, missing value imputation and normalization to form a standardized dataset; S102. Based on a standardized dataset, use machine learning algorithms to extract users’ dietary preference features, nutritional needs features and taboo features, and construct a dynamic user profile model. S103. Use natural language processing technology to analyze the user's real-time input text or voice, and identify the user's current ordering intention and vague needs; S104. Based on real-time inventory data and food nutritional data, use association rule mining algorithms to analyze the complementarity and substitutability between food ingredients, and generate an initial candidate product set including vegetables, fruits, meat, aquatic products, staple foods and condiments. S105. Using the dynamic user profile model as a constraint, and with nutritional balance, user preference matching, cost control and food utilization as multiple objective functions, construct a combined optimization model. S106. Use a genetic algorithm or particle swarm optimization algorithm to iteratively calculate the initial candidate product set and generate several recommended self-service package options. S107. Push the recommended meal plan to the user's terminal and display the portion size, nutritional components and calories of each ingredient in a visual way; S108: Receive user's addition, deletion, and modification operations for the products in the package, trigger a real-time recalculation mechanism, and dynamically adjust the total price, nutritional ratio, and related recommended products of the package; S109. After the user confirms the package, structured order data is generated and distributed to the kitchen preparation system and supply chain management system.
[0020] As will be understood by those skilled in the art, this invention breaks through the limitations of traditional single data sources, deeply integrating multi-source heterogeneous data such as user physiological characteristics, historical behavior, real-time inventory, and environment. After cleaning and normalization, it constructs a dynamic user profile including preferences, nutrition, and contraindications, making recommendations more closely aligned with the user's real-time state. Combining natural language processing technology to analyze fuzzy demands and mine association rules, and utilizing multi-objective combinatorial optimization models and iterative calculations with genetic algorithms, it generates scientific meal sets for various catering dishes that conform to dietary guidelines while also considering commercial interests, solving the problems of low efficiency and nutritional imbalance caused by manual matching. It supports real-time recalculation and visual feedback for user add, delete, and modify operations, dynamically adjusting related recommendations, significantly improving user engagement and satisfaction. Furthermore, orders are automatically distributed to the kitchen and supply chain, linking inventory management, effectively reducing food waste, optimizing cost control, and realizing a digital, intelligent, and personalized closed loop for catering services.
[0021] Please refer to Figure 2 As shown, the process involves cleaning, deduplication, missing value imputation, and normalization, specifically including the following steps: S201. Establish a cleaning rule base based on metadata management, use "timestamp + unique order number" to remove duplicate records for user historical consumption data, and use the sliding window mean method to fill in the small deviation of consumption timestamps. S202. For user physiological characteristic data and environmental parameter data, the K-nearest neighbor algorithm or multiple imputation method is used to predict and fill in missing values. The calculation formula for the filling is as follows: ; in, This represents the predicted imputation results for missing values, where K is the number of nearest neighbor samples selected. For the first The weights of the nearest neighbor samples, For the first The feature values of the nearest neighbor samples; S203. For real-time inventory data and food nutritional composition data, the minimum-maximum normalization and Z-score standardization methods are used to map data of different dimensions to the [0, 1] interval or a standard normal distribution. The normalization formula is as follows: ; in, The value is the normalized value. These are the original values. and These are the maximum and minimum values for this feature dimension, respectively; S204. Principal component analysis is used to reduce the dimensionality of high-dimensional nutrient data, retaining feature dimensions with a cumulative contribution rate greater than 95%, thus forming a high-quality standardized dataset.
[0022] Please refer to Figure 3 As shown, a dynamic user profile model is constructed based on a standardized dataset using machine learning algorithms, specifically including: S301. Use Word2Vec or BERT models to perform word vectorization on users' historical review texts and extract keywords related to food and beverage flavors. S302. Combining the frequency, amount and remaining food rate of users' historical order records, use hidden Markov models or long short-term memory networks to predict the trend of users' dietary preference shift in the next stage. S303. Introduce basal metabolic rate and body fat percentage from physiological characteristic data, and use clustering algorithms to divide users into different nutritional need levels; S304. Finally, a weighted fusion strategy is used to perform multimodal fusion of the above-mentioned dietary preference characteristics, nutritional requirement characteristics, and taboo characteristics based on allergy history and religious beliefs, generating a dynamic user profile vector with a time decay factor. The calculation formula is as follows: ; in, For dietary preference feature vectors, This is a feature vector representing nutritional requirements. This is a taboo feature vector, typically a binary vector of 0s and 1s; These are the weight coefficients of the corresponding features, and satisfy... .
[0023] Please refer to Figure 4 As shown, real-time user input is parsed using natural language processing technology, specifically including: S401. Construct a joint model for intent recognition and slot filling specifically for the catering industry, and use a deep neural network based on the attention mechanism to perform semantic parsing on the text or speech-to-text input by the user. S402. Identify implicit intentions that include vague requirements such as "low oil", "mildly spicy", "muscle building" and "satiety", and calculate their semantic similarity with standard nutrition labels. S403. Combining current context information, such as current time, weather, and user location, capture the temporal dependencies of user needs through the context gating unit; S404. For fuzzy requirements that cannot be directly matched, initiate a search of the associated knowledge base and infer the corresponding ingredient attributes or cooking method suggestions based on the knowledge graph, which will serve as semantic constraints for generating a candidate product set in the future. Among them, semantic similarity Calculated using the cosine similarity formula: ; in, Word embedding vectors for user-input text. For standard nutrition labels or intent vectors, word embedding vectors Represents the vector dot product. This represents the L2 norm of a vector.
[0024] Please refer to Figure 5 As shown, the association rule mining algorithm is used to analyze the complementarity and substitutability between ingredients, specifically including: S501. Construct a multi-dimensional feature matrix that includes ingredient categories, cooking techniques, flavor characteristics, and nutritional elements; S502. Calculate the support and confidence of food itemsets using the Apriori algorithm or FP-Growth algorithm, set minimum support threshold and minimum confidence threshold, and discover frequently co-occurring "complementary food pairs" and "alternative food pairs" with similar nutritional effects. S503. Introduce the seasonality coefficient of ingredients and inventory turnover days as weighting factors to perform weighted correction on the discovered association rules. S504. When generating the initial candidate product set, based on the dietary structure template of "staple food + protein + vegetables + fruits + condiments", and combined with the constraint that the lift of the association rule is greater than 1, ensure that the recommended combination is reasonable in terms of nutritional complementarity and flavor matching. Among them, Support(X) and Confidence The calculation formulas are as follows: ; ; in, and For different food item sets, For containing itemsets The number of transaction records, This represents the total number of transaction records. To contain simultaneously and Support from transaction records; The formula for calculating lift is: ; in, For itemsets Frequency of occurrence in all transactions, when >1 indicates and There is a positive correlation.
[0025] Constructing a combinatorial optimization model and performing iterative calculations using a genetic algorithm specifically includes: The objective function for nutritional balance is defined as the reciprocal of the Euclidean distance between the actual recommended meal and the recommended intake in the Chinese Dietary Guidelines. The objective function for user preference matching is defined as the cosine similarity between the recommended ingredients and the user profile vector; the objective function for cost control is defined as the difference between the ingredient BOM cost and the expected selling price. Define the objective function for ingredient utilization as the consumption weight of recommended dishes for ingredients with high inventory and near-expiry; establish a penalty function that includes upper and lower limits for calories, macronutrient ratios, a blacklist of prohibited ingredients, and budget constraints. A non-dominated sorting genetic algorithm is used to iteratively generate a Pareto optimal solution set through selection, crossover, and mutation operations. From the solution set, several recommended meal plans with the highest comprehensive scores on each objective function are selected. Constructed multi-objective fitness function The weighted summation formula is: ; in, A score for nutritional balance, such as the negative deviation of the macronutrient ratio from the standard value, is used to indicate nutritional balance. Score the degree of matching user preferences. The total cost of the package The ingredient utilization rate is scored based on inventory turnover weighting; These are the weighting coefficients for each objective; For penalties for violating constraints, such as including prohibited ingredients or exceeding the budget, the calculation formula is as follows: ; in, The penalty coefficient is... For the first A constraint function, such as g(x) = total heat - maximum allowable heat. This represents the total number of constraints.
[0026] The mechanism receives user actions to add, delete, or modify items within the package and triggers a real-time recalculation, specifically including: Establish a real-time response engine based on incremental computation. When a user performs add, delete, or modify operations, only the gradient changes of the affected sub-objective function are recalculated, rather than a full recalculation. The sensitivity analysis method is used to assess the impact of product modifications on the overall nutritional composition. If the impact exceeds the preset threshold, an alarm is triggered or remedial ingredients are automatically recommended. The modified nutrition radar chart and calorie curve are rendered in real time on the visual interface. Based on the collaborative filtering algorithm, while the user modifies the product, the sidebar dynamically recommends related snacks or drinks that are highly complementary to the newly selected product and match the user profile. The recalculation process must be completed within 200 milliseconds to ensure smooth interaction; Among them, the Lagrange multiplier method or gradient descent method is used to perform sensitivity analysis on changes in nutrient ratio, with the objective function being... Regarding the quantity of ingredients Sensitivity coefficient The calculation is as follows: ; in, For the first The amount of each ingredient For small perturbation values of quantity, This is a nutrient ratio function, such as total protein content; If the absolute value of the sensitivity coefficient If the value exceeds the preset threshold, the modification is deemed to have a significant impact on the overall nutritional structure, and the associated recommendation remedial mechanism needs to be triggered.
[0027] Generate and distribute structured order data, specifically including: Generate a structured order in JSON or Protobuf format, which includes user ID, package details, special requirements such as no scallions, less salt, a nutritional summary table, and estimated preparation time. Message queues are used to break down orders into kitchen preparation instructions and supply chain deduction instructions. After receiving the instruction, the kitchen system dynamically adjusts the order of dishes on the serving screen based on the electronic price tag data; After receiving the instruction, the supply chain system updates the inventory database in real time and triggers an automatic replenishment alert based on the safety stock threshold. If a certain ingredient is out of stock due to user modifications, a replacement ingredient suggestion is immediately sent to the kitchen.
[0028] This also includes storing user-confirmed packages in a historical database for model updates, specifically including: Establish a feedback data cleaning pipeline to distinguish between explicit feedback, such as ratings and text reviews, and implicit feedback, such as whether the food was finished, modification records, and repurchase rate. The sentiment analysis model is used to score the positive and negative polarity of the evaluation text and extract fine-grained sentiment words for specific ingredients. Design an online learning mechanism that uses newly generated user selection data as training samples and employs stochastic gradient descent to fine-tune the parameters of the dynamic user profile model; For combinatorial optimization models, a reinforcement learning framework is introduced, where the user's final confirmation is regarded as a positive reward and the user's significant modification is regarded as a negative penalty. The weight coefficients of the objective function are updated through the Q-learning algorithm to achieve self-evolution of the model.
[0029] In a second aspect of the invention, a personalized self-service meal ordering system is also provided, comprising: The acquisition module is used to acquire multi-source heterogeneous data and perform cleaning, deduplication, missing value imputation and normalization processing to form a standardized dataset. The extraction module is used to extract users' dietary preference features, nutritional needs features, and taboo features based on a standardized dataset and using machine learning algorithms to build a dynamic user profile model. The recognition module is used to analyze the user's real-time input text or voice through natural language processing technology to identify the user's current ordering intent and vague needs. The first generation module is used to analyze the complementarity and substitutability between ingredients based on real-time inventory data and nutritional data of ingredients using association rule mining algorithms, and generate an initial candidate product set including vegetables, fruits, meat, aquatic products, staple foods and condiments. The building module is used to construct a combined optimization model with the dynamic user profile model as a constraint, and with nutritional balance, user preference matching, cost control and food utilization as multiple objective functions. The second generation module is used to iteratively calculate the initial candidate product set using a genetic algorithm or particle swarm optimization algorithm to generate several recommended self-service package options. The push module is used to push recommended meal plans to the user's terminal, and to display the portion size, nutritional components and calories of each ingredient in a visual way; The adjustment module receives user operations to add, delete, or modify items within the package, triggers a real-time recalculation mechanism, and dynamically adjusts the total price, nutritional ratio, and related recommended products of the package. The confirmation module is used to generate structured order data and distribute it to the kitchen preparation system and supply chain management system after the user confirms the package.
[0030] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.
Claims
1. A method for personalized customization of self-service meal sets, characterized in that, include: Acquire heterogeneous data from multiple sources and perform cleaning, deduplication, missing value imputation, and normalization to form a standardized dataset; Based on a standardized dataset, machine learning algorithms are used to extract users’ dietary preference features, nutritional needs features, and taboo features to construct a dynamic user profile model. Natural language processing technology is used to analyze users’ real-time input text or voice to identify users’ current ordering intent and vague needs. Based on the real-time inventory data and food nutritional data, the complementarity and substitutability between food ingredients are analyzed using association rule mining algorithms to generate an initial candidate product set including vegetables, fruits, meat, aquatic products, staple foods and condiments. Using the dynamic user profile model as a constraint, and with nutritional balance, user preference matching, cost control and food utilization as multiple objective functions, a combined optimization model is constructed. The initial candidate product set is iteratively calculated using a genetic algorithm or particle swarm optimization algorithm to generate several recommended self-service package options; Recommended meal plans are pushed to users' devices, displaying the portion size, nutritional components and calories of each ingredient in a visual way; It receives user actions to add, delete, or modify items within the package, triggering a real-time recalculation mechanism to dynamically adjust the total price, nutritional ratio, and related recommended products of the package. Once the user confirms the package, structured order data is generated and distributed to the kitchen preparation system and supply chain management system.
2. The method for personalized customization of self-service meal sets according to claim 1, characterized in that, The process of cleaning, deduplication, missing value imputation, and normalization includes the following steps: Establish a cleaning rule base based on metadata management, use "timestamp + unique order number" to remove duplicate records for users' historical consumption data, and use the sliding window mean method to fill in the small deviations in consumption timestamps; For user physiological characteristic data and environmental parameter data, the K-nearest neighbor algorithm or multiple imputation method is used to predict and impute missing values. The imputation calculation formula is as follows: ; in, This represents the predicted imputation results for missing values, where K is the number of nearest neighbor samples selected. For the first The weights of the nearest neighbor samples, For the first The feature values of the nearest neighbor samples; For real-time inventory data and food nutritional composition data, min-max normalization and Z-score standardization methods are used to map data of different dimensions to the [0, 1] interval or a standard normal distribution. The normalization formula is as follows: ; in, The value is the normalized value. These are the original values. and These are the maximum and minimum values for this feature dimension, respectively; Principal component analysis was used to reduce the dimensionality of high-dimensional nutrient data, retaining feature dimensions with a cumulative contribution rate greater than 95%, thus forming a high-quality standardized dataset.
3. The method for personalized customization of self-service meal sets according to claim 2, characterized in that, The construction of a dynamic user profile model based on a standardized dataset and utilizing machine learning algorithms specifically includes: Word2Vec or BERT models are used to vectorize user historical review texts to extract keywords related to food and beverage flavors; By combining the frequency, amount, and remaining food rate of users' historical order records, Hidden Markov Models or Long Short-Term Memory Networks can be used to predict the trend of users' dietary preference shifts in the next stage. By incorporating basal metabolic rate and body fat percentage from physiological characteristic data, users are divided into different nutritional need levels using clustering algorithms; Finally, a weighted fusion strategy is used to perform multimodal fusion of the above-mentioned dietary preference features, nutritional requirement features, and taboo features based on allergy history and religious beliefs, generating a dynamic user profile vector with a time decay factor. The calculation formula is as follows: ; in, For dietary preference feature vectors, This is a feature vector representing nutritional requirements. This is a taboo feature vector, typically a binary vector of 0s and 1s; These are the weight coefficients of the corresponding features, and satisfy... .
4. The method for personalized customization of self-service meal sets according to claim 3, characterized in that, The process of parsing the user's real-time input using natural language processing technology specifically includes: We construct a joint model for intent recognition and slot filling specifically for the catering industry, and use a deep neural network based on the attention mechanism to perform semantic parsing on the text or speech-to-text input by the user. Identify implicit intentions that include vague requirements such as "low oil", "mildly spicy", "muscle building" and "satiety", and calculate their semantic similarity with standard nutrition labels; By combining current contextual information, such as current time, weather, and user location, the temporal dependencies of user needs can be captured through context gating units; For vague requirements that cannot be directly matched, the relevant knowledge base is retrieved, and the corresponding ingredient attributes or cooking method suggestions are inferred based on the knowledge graph, which serve as semantic constraints for the subsequent generation of a candidate product set. Among them, semantic similarity Calculated using the cosine similarity formula: ; in, Word embedding vectors for user-input text. For standard nutrition labels or intent vectors, word embedding vectors Represents the vector dot product. This represents the L2 norm of a vector.
5. The method for personalized customization of self-service meal sets according to claim 4, characterized in that, The analysis of complementarity and substitutability among ingredients using association rule mining algorithms specifically includes: Construct a multi-dimensional feature matrix that includes ingredient categories, cooking techniques, flavor characteristics, and nutritional elements; The support and confidence of food itemsets are calculated using the Apriori algorithm or FP-Growth algorithm. Minimum support threshold and minimum confidence threshold are set to discover frequently co-occurring "complementary food pairs" and "alternative food pairs" with similar nutritional effects. The seasonality coefficient of ingredients and inventory turnover days are introduced as weighting factors to perform weighted correction on the discovered association rules. When generating the initial candidate product set, the dietary structure template of "staple food + protein + vegetables + fruit + condiments" is used, combined with the constraint that the lift of the association rule is greater than 1, to ensure that the recommended combination is reasonable in terms of nutritional complementarity and flavor matching. Among them, Support(X) and Confidence The calculation formulas are as follows: ; ; in, and For different food item sets, For containing itemsets The number of transaction records, This represents the total number of transaction records. To contain simultaneously and Support from transaction records; The formula for calculating lift is: ; in, For itemsets Frequency of occurrence in all transactions, when >1 indicates and There is a positive correlation.
6. The method for personalized customization of self-service meal sets according to claim 5, characterized in that, The construction of the combinatorial optimization model and the use of genetic algorithms for iterative calculations specifically include: The objective function for nutritional balance is defined as the reciprocal of the Euclidean distance between the actual recommended meal and the recommended intake in the Chinese Dietary Guidelines. The objective function for user preference matching is defined as the cosine similarity between the recommended ingredients and the user profile vector; the objective function for cost control is defined as the difference between the ingredient BOM cost and the expected selling price. Define the objective function for ingredient utilization as the consumption weight of recommended dishes for ingredients with high inventory and near-expiry; establish a penalty function that includes upper and lower limits for calories, macronutrient ratios, a blacklist of prohibited ingredients, and budget constraints. A non-dominated sorting genetic algorithm is used to iteratively generate a Pareto optimal solution set through selection, crossover, and mutation operations. From the solution set, several recommended meal plans with the highest comprehensive scores on each objective function are selected. Constructed multi-objective fitness function The weighted summation formula is: ; in, A score for nutritional balance, such as the negative deviation of the macronutrient ratio from the standard value, is used to indicate nutritional balance. Score the degree of matching user preferences. The total cost of the package The ingredient utilization rate is scored based on inventory turnover weighting; These are the weighting coefficients for each objective; For penalties for violating constraints, such as including prohibited ingredients or exceeding the budget, the calculation formula is as follows: ; in, The penalty coefficient is... For the first A constraint function, such as g(x) = total heat - maximum allowable heat. This represents the total number of constraints.
7. The method for personalized customization of self-service meal sets according to claim 6, characterized in that, The mechanism for receiving user operations to add, delete, or modify items within the package and triggering a real-time recalculation specifically includes: Establish a real-time response engine based on incremental computation. When a user performs add, delete, or modify operations, only the gradient changes of the affected sub-objective function are recalculated, rather than a full recalculation. The sensitivity analysis method is used to assess the impact of product modifications on the overall nutritional composition. If the impact exceeds the preset threshold, an alarm is triggered or remedial ingredients are automatically recommended. The modified nutrition radar chart and calorie curve are rendered in real time on the visual interface. Based on the collaborative filtering algorithm, while the user modifies the product, the sidebar dynamically recommends related snacks or drinks that are highly complementary to the newly selected product and match the user profile. The recalculation process must be completed within 200 milliseconds to ensure smooth interaction; Among them, the Lagrange multiplier method or gradient descent method is used to perform sensitivity analysis on changes in nutrient ratio, with the objective function being... Regarding the quantity of ingredients Sensitivity coefficient The calculation is as follows: ; in, For the first The amount of each ingredient For small perturbation values of quantity, This is a nutrient ratio function, such as total protein content; If the absolute value of the sensitivity coefficient If the value exceeds the preset threshold, the modification is deemed to have a significant impact on the overall nutritional structure, and the associated recommendation remedial mechanism needs to be triggered.
8. The method for personalized customization of self-service meal sets according to claim 7, characterized in that, The generation and distribution of structured order data specifically includes: Generate a structured order in JSON or Protobuf format, which includes user ID, package details, special requirements such as no scallions, less salt, a nutritional summary table, and estimated preparation time. Message queues are used to break down orders into kitchen preparation instructions and supply chain deduction instructions. After receiving the instruction, the kitchen system dynamically adjusts the order of dishes on the serving screen based on the electronic price tag data; After receiving the instruction, the supply chain system updates the inventory database in real time and triggers an automatic replenishment alert based on the safety stock threshold. If a certain ingredient is out of stock due to user modifications, a replacement ingredient suggestion is immediately sent to the kitchen.
9. A method for personalized customization of self-service meal sets according to claim 8, characterized in that, This also includes storing user-confirmed packages in a historical database for model updates, specifically including: Establish a feedback data cleaning pipeline to distinguish between explicit feedback, such as ratings and text reviews, and implicit feedback, such as whether the food was finished, modification records, and repurchase rate. The sentiment analysis model is used to score the positive and negative polarity of the evaluation text and extract fine-grained sentiment words for specific ingredients. Design an online learning mechanism that uses newly generated user selection data as training samples and employs stochastic gradient descent to fine-tune the parameters of the dynamic user profile model; For combinatorial optimization models, a reinforcement learning framework is introduced, where the user's final confirmation is regarded as a positive reward and the user's significant modification is regarded as a negative penalty. The weight coefficients of the objective function are updated through the Q-learning algorithm to achieve self-evolution of the model.
10. A personalized self-service meal ordering system, used to implement the personalized self-service meal ordering method as described in any one of claims 1-9, characterized in that, include: The acquisition module is used to acquire multi-source heterogeneous data and perform cleaning, deduplication, missing value imputation and normalization processing on it to form a standardized dataset; The extraction module is used to extract users' dietary preference features, nutritional needs features, and taboo features based on a standardized dataset and using machine learning algorithms to construct a dynamic user profile model. The recognition module is used to parse the user's real-time input text or voice through natural language processing technology to identify the user's current ordering intention and vague needs; The first generation module is used to analyze the complementarity and substitutability between ingredients based on the real-time inventory data and the nutritional composition data of the ingredients using an association rule mining algorithm, and generate an initial candidate product set including vegetables, fruits, meat, aquatic products, staple foods and condiments. The construction module is used to construct a combined optimization model with the dynamic user profile model as a constraint and with nutritional balance, user preference matching degree, cost control and food utilization rate as multiple objective functions. The second generation module is used to iteratively calculate the initial candidate product set using a genetic algorithm or a particle swarm optimization algorithm to generate several recommended self-service package options. The push module is used to push recommended meal plans to the user terminal and display the portion size, nutritional components and calories of each ingredient in a visual manner. The adjustment module is used to receive user operations to add, delete, or modify items in the package, trigger a real-time recalculation mechanism, and dynamically adjust the total price, nutritional ratio, and related recommended products of the package. The confirmation module is used to generate structured order data and distribute it to the kitchen preparation system and supply chain management system after the user confirms the package.