A method and system for taste profile preference matching for personalized meal planning
Patent Information
- Application Number
- CN202611198889.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-08
- Publication Date
- 2026-10-27
AI Technical Summary
[0003]但是,现有方式对用户口味的表征通常停留在菜品标签或菜系标签层面,难以区分同一菜品或同类菜品因食材组合、预处理方式及烹制过程不同而形成的实际味型差异,导致系统在面对菜谱替换或饮食管理限制时,输出菜谱的实际味感可能与用户长期形成的口味倾向不一致
本发明提供的一种用于个性化膳食规划的味型偏好匹配方法,包括以下步骤:获取目标用户的历史膳食交互数据、候选菜谱的食材参数和烹饪参数,以及所述目标用户的营养摄入约束条件;基于预设的味型基础指数库,对所述历史膳食交互数据进行特征量化,得到用户味型偏好向量;基于所述味型基础指数库,对所述食材参数和所述烹饪参数进行特征量化,得到候选菜谱味型特征向量;在所述营养摄入约束条件的限制下,计算所述用户味型偏好向量与所述候选菜谱味型特征向量之间的味型匹配距离;基于所述味型匹配距离生成调料配比调节系数,并根据所述调料配比调节系数对所述候选菜谱进行参数重构,得到个性化膳食规划方案,如何在满足个体饮食管理要求的前提下,提高膳食规划结果与用户味型偏好之间的对应准确性,实现了在营养摄入约束条件下对用户味型偏好进行量化匹配、对候选菜谱调料配比进行可执行重构,并兼顾菜品物理形态与烹饪可实施性的技术效果。
Smart Images

Figure CN122991478A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of dietary planning technology, and in particular to a method and system for matching taste preferences for personalized dietary planning. Background Technology
[0002] Existing personalized meal planning systems are mostly used in family diet management, healthy meal delivery, and restaurant recommendation scenarios. Typically, users actively select flavor tags such as "sweeter," "spicier," or "milder," or the system filters and recommends recipes based on historical order records, dish collection records, and rating records, using categories, cuisines, or ingredient tags. Some systems also consider the user's dietary restrictions, food allergies, or dietary management requirements to exclude recommended recipes, generating daily dietary suggestions for the user to choose from.
[0003] However, existing methods for representing user taste typically remain at the level of dish labels or cuisine labels, making it difficult to distinguish the actual flavor differences of the same dish or similar dishes due to variations in ingredient combinations, pre-processing methods, and cooking processes. This results in the system outputting recipes whose actual flavor may not match the user's long-established taste preferences when faced with recipe changes or dietary management constraints. Therefore, improving the accuracy of the correspondence between dietary planning results and user taste preferences while meeting individual dietary management requirements has become a pressing technical problem. Summary of the Invention
[0004] The purpose of this invention is to at least partially solve one of the technical problems existing in the prior art.
[0005] To achieve the above objectives, the present invention provides a flavor preference matching method for personalized dietary planning, comprising: Obtain the target user's historical dietary interaction data, the ingredient parameters and cooking parameters of the candidate recipes, and the target user's nutritional intake constraints; Based on a preset basic index library of flavor profiles, the historical dietary interaction data is quantified to obtain a user flavor profile preference vector. Based on the flavor profile basic index library, the ingredient parameters and cooking parameters are quantized to obtain the flavor profile feature vector of the candidate recipe. Under the constraints of the nutritional intake conditions, the flavor matching distance between the user's flavor preference vector and the flavor feature vector of the candidate recipe is calculated; Based on the flavor matching distance, a seasoning ratio adjustment coefficient is generated, and the candidate recipes are reconstructed according to the seasoning ratio adjustment coefficient to obtain a personalized dietary planning scheme.
[0006] Furthermore, the acquisition of the target user's historical dietary interaction data, the ingredient parameters and cooking parameters of the candidate recipes, and the target user's nutritional intake constraints includes: Extract the historical recipe identifiers of the target user within a preset time window, and the user ratings corresponding to the historical recipe identifiers, and combine them into the historical dietary interaction data; The recipe text of the candidate recipe is parsed, the basic ingredient types and their corresponding physical weights are extracted as the ingredient parameters, and the processing heat treatment method identifier of the candidate recipe is extracted as the cooking parameters. The physiological indicators and chronic disease labels of the target user are obtained. Based on the preset clinical nutrition mapping rules, the physiological indicators and chronic disease labels are converted into upper limit thresholds for the intake of specific macronutrients and micronutrients, which serve as the nutritional intake constraints.
[0007] Furthermore, based on a preset flavor profile index library, the historical dietary interaction data is quantified to obtain a user flavor preference vector, including: Based on the historical recipe identifier in the historical dietary interaction data, the corresponding multidimensional flavor basic feature vector is extracted from the preset flavor basic index library. The multidimensional flavor basic feature vector is composed of objective physicochemical standard quantities that characterize different basic taste dimensions. Map the user ratings in the historical dietary interaction data to preference weight coefficients; The user's flavor preference vector is generated by performing spatial vector weighting, aggregation, and normalization on the multidimensional flavor basic feature vector using the preference weight coefficients.
[0008] Furthermore, based on the flavor profile basic index library, feature quantization is performed on the ingredient parameters and cooking parameters to obtain the candidate recipe flavor profile feature vector, including: Based on the basic ingredient types and physical weights in the ingredient parameters, the corresponding initial ingredient flavor vectors are extracted from the flavor basic index library. Based on the heat treatment method identifier in the cooking parameters, the corresponding flavor transformation matrix is determined. The flavor transformation matrix represents the nonlinear influence weight of a specific heat treatment method on different basic taste dimensions. The flavor transformation matrix is used to map and calculate the initial flavor vector of the ingredients to generate the flavor feature vector of the candidate recipe.
[0009] Furthermore, under the constraint of the nutritional intake condition, calculating the flavor matching distance between the user's flavor preference vector and the candidate recipe flavor feature vector includes: Using the physical weight of seasonings in the ingredient parameters of the candidate recipes as independent variables, a dynamic generation function for the flavor feature vector of the candidate recipes is established. The feasible region boundary is defined by the total amount of the specific macronutrients and micronutrients not exceeding the upper limit threshold of intake, and a constrained optimization space is constructed. Within the constrained optimization space, the objective function is to minimize the multidimensional Euclidean distance between the candidate recipe flavor feature vector output by the dynamic generation function and the user flavor preference vector. The solution is iteratively performed, and the minimum multidimensional Euclidean distance corresponding to the convergence of the objective function is taken as the flavor matching distance.
[0010] Furthermore, within the constrained optimization space, the objective function is to minimize the multidimensional Euclidean distance between the candidate recipe flavor feature vector output by the dynamic generation function and the user flavor preference vector. This is then iteratively solved, and the minimum multidimensional Euclidean distance corresponding to the convergence of the objective function is taken as the flavor matching distance. This includes: Remove the restrictions on the feasible region boundary, and perform an unconstrained global solution in the full parameter space with the goal of minimizing the Euclidean distance in the multidimensional space, to obtain the minimum multidimensional Euclidean distance in the unconstrained state. Within the constrained optimization space, an iterative solution with constraints is performed with the objective of minimizing the Euclidean distance in the multidimensional space, to obtain the minimum Euclidean distance in the multidimensional space under the constraints. The difference between the minimum multidimensional Euclidean distance under the constrained state and the minimum multidimensional Euclidean distance under the unconstrained state is calculated and used as an objective evaluation benchmark value to characterize the taste loss. The objective evaluation benchmark value is compared with the preset taste impairment tolerance threshold; If the objective evaluation benchmark value is greater than the taste impairment tolerance threshold, the recipe circuit breaker mechanism is triggered, an unmatched signal is output, and the parameter reconstruction of the candidate recipe is terminated. If the objective evaluation benchmark value is not greater than the taste impairment tolerance threshold, then the minimum multidimensional Euclidean distance under the constraint state is taken as the minimum multidimensional Euclidean distance corresponding to the convergence of the objective function.
[0011] Furthermore, the step of generating a seasoning ratio adjustment coefficient based on the flavor matching distance, and reconstructing the parameters of the candidate recipes according to the seasoning ratio adjustment coefficient to obtain a personalized dietary planning scheme, includes: When the flavor matching distance is calculated, the theoretical optimal solution of each seasoning independent variable in the constraint optimization space is extracted; Obtain the preset kitchen execution accuracy constraint rules, and discretize and round the theoretical optimal solution based on the kitchen execution accuracy constraint rules to generate the seasoning ratio adjustment coefficient.
[0012] Furthermore, the step of reconstructing the parameters of the candidate recipes based on the seasoning ratio adjustment coefficient to obtain a personalized dietary planning scheme includes: Using the seasoning ratio adjustment coefficient, the original recipe text of the candidate recipe is mapped and replaced with physical weight to obtain the reconstructed physical weight; Verify whether the reconstructed physical weight meets the preset minimum physical form constraint of the dish; if it does, output the recipe text containing the reconstructed physical weight as the personalized dietary planning scheme.
[0013] Furthermore, the step of reconstructing the parameters of the candidate recipes based on the seasoning ratio adjustment coefficient to obtain a personalized dietary planning scheme includes: Calculate the amount of physical property loss of the target seasoning after applying the seasoning ratio adjustment coefficient, wherein the amount of physical property loss includes liquid phase volume loss and solid structure loss. Based on a preset flavor-neutral compensation matrix library, a flavor-neutral compensator and compensation quality are matched to the amount of physical attribute loss. The flavor-neutral compensator is used to maintain the physical form without changing the flavor characteristics. The flavor neutral compensator and its compensating mass are physically combined with the reconstructed seasoning parameters after applying the seasoning ratio adjustment coefficient to obtain the target physical matrix. The initial cooking time and temperature parameters of the candidate recipes are extracted, and the initial cooking time and temperature parameters are thermodynamically adaptively corrected according to the change ratio of the total mass and moisture content of the target physical matrix. The target physical matrix is combined with the modified cooking time and temperature parameters to generate the personalized dietary plan.
[0014] The present invention also provides a flavor preference matching system for personalized dietary planning, comprising: The acquisition module is used to acquire the target user's historical dietary interaction data, the ingredient parameters and cooking parameters of the candidate recipes, and the nutritional intake constraints of the target user. The first quantization module is used to perform feature quantization on the historical dietary interaction data based on a preset flavor profile index library to obtain a user flavor preference vector. The second quantization module is used to perform feature quantization on the ingredient parameters and cooking parameters based on the flavor basic index library to obtain the flavor feature vector of the candidate recipe. The calculation module is used to calculate the flavor matching distance between the user's flavor preference vector and the candidate recipe flavor feature vector under the constraints of the nutritional intake conditions. The reconstruction module is used to generate a seasoning ratio adjustment coefficient based on the flavor matching distance, and to reconstruct the parameters of the candidate recipes according to the seasoning ratio adjustment coefficient to obtain a personalized dietary planning scheme.
[0015] Technical effect This invention provides a flavor preference matching method for personalized dietary planning, comprising the following steps: acquiring historical dietary interaction data of a target user, ingredient parameters and cooking parameters of candidate recipes, and nutritional intake constraints of the target user; quantifying the historical dietary interaction data based on a preset flavor index library to obtain a user flavor preference vector; quantifying the ingredient parameters and cooking parameters based on the flavor index library to obtain a candidate recipe flavor feature vector; calculating the flavor matching distance between the user flavor preference vector and the candidate recipe flavor feature vector under the nutritional intake constraints; generating a seasoning ratio adjustment coefficient based on the flavor matching distance, and reconstructing the parameters of the candidate recipes according to the seasoning ratio adjustment coefficient to obtain a personalized dietary planning scheme. This method improves the accuracy of the correspondence between dietary planning results and user flavor preferences while meeting individual dietary management requirements, achieving the technical effects of quantitatively matching user flavor preferences under nutritional intake constraints, executablely reconstructing the seasoning ratios of candidate recipes, and considering both the physical form of the dishes and the feasibility of cooking. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram of the steps of a flavor preference matching method for personalized dietary planning in one embodiment of the present invention; Figure 2 This is one embodiment of the present invention. Figure 1 A schematic diagram of step S1; Figure 3 This is a structural block diagram of a flavor preference matching system for personalized dietary planning in one embodiment of the present invention.
[0018] The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0019] The embodiments of the present invention are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention. The step numbers in the following embodiments are set only for ease of explanation, and there is no limitation on the order between the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
[0020] The following describes in detail, with reference to the accompanying drawings, a method for matching flavor preferences for personalized dietary planning according to an embodiment of the present invention.
[0021] like Figure 1 , Figure 2 As shown, in one embodiment of the present invention, a flavor preference matching method for personalized dietary planning includes: S1, acquire the target user's historical dietary interaction data, the ingredient parameters and cooking parameters of the candidate recipes, and the target user's nutritional intake constraints.
[0022] S11, extract the historical recipe identifiers of the target user within a preset time window, and the user evaluation ratings corresponding to the historical recipe identifiers, and combine them into the historical dietary interaction data; S12, parse the recipe text of the candidate recipe, extract the basic ingredient types and corresponding physical weights as the ingredient parameters, and extract the processing heat treatment method identifier of the candidate recipe as the cooking parameters; S13, obtain the physiological signs and chronic disease labels of the target user, and based on the preset clinical nutrition mapping rules, convert the physiological signs and chronic disease labels into upper limit thresholds for the intake of specific macronutrients and micronutrients, as the nutritional intake constraints.
[0023] Specifically, in this embodiment, step S11 is executed first. With authorization from the target user, the system reads historical recipe identifiers and corresponding user ratings that have generated valid interactions within a preset time window from the dietary record terminal, the ordering platform account, or the family dietary management application. The preset time window can be set to the most recent ninety days, ensuring that the collected results reflect the user's recent stable dietary preferences while avoiding excessive influence from premature recording on current preferences. Historical recipe identifiers are used to associate the dish name, cuisine affiliation, and recipe version in the recipe library; user ratings use the platform's original ratings and are uniformly converted to a preset rating range. For the same recipe with multiple ratings within the window, a comprehensive rating for the recipe is formed by assigning decreasing weights according to the interaction time from most recent to oldest. Data with incomplete ratings, recipes that have been removed from the platform, recipe versions that cannot be traced, or data with obviously abnormal ratings are not included in this processing. After deduplication, time verification, and rating normalization, each historical recipe identifier and its comprehensive rating are stored in chronological order, forming historical dietary interaction data.
[0024] Then, step S12 is executed. The system reads the structured recipe text of the candidate recipes; when the recipe text comes from the recipe editing page, it directly reads the ingredient names, units of measurement, and processing descriptions; when the recipe text is a natural language description, it uses a preset ingredient dictionary and cooking action dictionary to identify the ingredient entities, quantifiers, and heat treatment action words. For different units of measurement such as "gram," "kilogram," "milliliters," and "spoon," they are first converted into a unified mass unit according to the ingredient density conversion table and the standard measuring spoon conversion table; for descriptions such as "appropriate amount" and "a little" that do not give precise measurements, the system calls the standard measurement range corresponding to the serving size of the recipe and marks it as an estimated value to avoid using uncertain descriptions directly as precise weights. The system classifies meat, eggs, milk, grains, vegetables, fruits, oils, and seasonings into basic ingredient categories and records the physical weight of each basic ingredient category in a single recipe to obtain ingredient parameters. For the cooking process, the system identifies the heat treatment method from action words such as "steaming," "boiling," "stewing," "pan-frying," "stir-frying," "deep-frying," and "roasting." If a recipe contains multiple heat treatment stages, the system retains the stage identifiers according to their actual sequence. For example, a recipe that involves blanching before stir-frying corresponds to the "blanching-stir-frying" combination identifier. This avoids parameter deviations caused by judging the cooking method solely by the dish name and ignoring the specific processing steps.
[0025] Next, step S13 is executed. The system obtains the physiological indicators and chronic disease labels that the target user has already entered or authorized for synchronization, and verifies the data source, recording date, and unit of measurement. Physiological indicators may include height, weight, body mass index, blood pressure records, and blood glucose-related records; chronic disease labels should use standardized disease names or codes and be based on the user's confirmed health record information, and should not automatically make disease diagnoses based on scattered physical indicator data. Clinical nutrition mapping rules are pre-configured by nutrition professionals according to applicable dietary nutrition guidelines. The rules establish the correspondence between physiological status, chronic disease labels, and macronutrient, vitamin, and mineral intake limits. For example, for dietary management situations that require sodium intake control, the rules generate sodium intake limits; for situations that require attention to saturated fat intake, the rules generate corresponding fat nutrient limits; for users with multiple restrictions, the strictest intake limit is retained for the same nutrient. All thresholds are uniformly converted to the mass or energy measurement standard within the same daily intake cycle and linked to the validity period of the user's profile. When vital sign records exceed the set validity period or chronic disease labels lack a source of confirmation, the system prompts for updates and will not use expired data to generate constraint results. Finally, the names of each nutrient, their corresponding upper limits of intake, units of measurement, and applicable conditions are encapsulated as nutrient intake constraints for use in subsequent recipe selection and dietary planning processes.
[0026] In this embodiment, the above-mentioned scheme can form traceable historical dietary interaction data, standardized recipe parameters, and individual nutritional intake constraints, providing a consistent data foundation for subsequent personalized dietary planning.
[0027] S2, based on a preset flavor index library, perform feature quantification on the historical dietary interaction data to obtain a user flavor preference vector.
[0028] S21, based on the historical recipe identifier in the historical dietary interaction data, extract the corresponding multidimensional flavor basic feature vector from the preset flavor basic index library. The multidimensional flavor basic feature vector is composed of objective physicochemical standard quantities that characterize different basic taste dimensions. S22, map the user rating in the historical dietary interaction data to a preference weight coefficient; S23, the user's taste preference vector is generated by performing spatial vector weighting aggregation and normalization on the multidimensional flavor basic feature vector using the preference weight coefficient.
[0029] Specifically, in this embodiment, a pre-defined flavor profile index library is established using recipe identifiers and their corresponding recipe versions as the primary search key. Each recipe entry has a multi-dimensional flavor profile feature vector with a fixed coordinate order. This multi-dimensional flavor profile feature vector includes five basic taste dimensions: sweet, sour, salty, bitter, and umami. The values for each dimension are objective physicochemical standardized quantities obtained from the standard recipe formula, rather than taste labels formed by subjective user descriptions. Specifically, the sweetness dimension is standardized based on the sweetness equivalent of soluble sugars; the sourness dimension is standardized based on the acidity equivalent of organic acids; the saltiness dimension is standardized based on the salt equivalent of table salt and sodium-containing seasonings; the bitterness dimension is standardized based on the standardized bitterness equivalent of ingredients and seasonings contributing to bitterness; and the umami dimension is standardized based on the comprehensive tryptophan equivalent of umami substances such as glutamic acid and flavor nucleotides. Each standardized quantity is converted according to the same single-serving recipe portion size and mapped to a unified taste intensity range. When executing step S21, the system iterates through each historical recipe identifier in the historical dietary interaction data and reads the multidimensional flavor basic feature vector that is consistent with the recipe identifier and recipe version from the flavor basic index library. If the recipe version corresponding to the recipe identifier is missing, expired, or cannot be confirmed, the interaction record will not be used for this feature quantification to prevent the flavor data of the changed recipe from representing the user's past preferences.
[0030] In step S22, user ratings are converted into preference weight coefficients corresponding to the rating inclination. This embodiment uses a five-level rating system, mapping a five-star rating to a positive weight coefficient of 1, a four-star rating to a positive 0.5 weight coefficient, a three-star rating to a zero weight coefficient, a two-star rating to a negative 0.5 weight coefficient, and a one-star rating to a negative one weight coefficient. A positive value indicates that the target user has an acceptance or preference for the flavor profile presented by the recipe, a negative value indicates a rejection tendency, and a zero value indicates that the evaluation is insufficient to reflect a clear flavor preference. The rating mapping table remains consistent across all the user's historical records to avoid weight distortion caused by different rating scales used for different recipes; no preference weight coefficients are generated for data that exceeds the rating range, lacks ratings, or has abnormal modification records.
[0031] In step S23, within a space where the taste dimensions are ordered uniformly, the system sequentially associates the multidimensional basic taste feature vector corresponding to each historical recipe with its preference weight coefficient. This ensures that the more prominent taste dimensions in high-rated recipes contribute positively to the results, while the corresponding taste dimensions in low-rated recipes contribute negatively. The weighted results of all valid historical recipes are then aggregated to obtain an initial vector reflecting the overall taste preference of the target user. To eliminate the influence of the number of historical records and the differences in the total taste intensity of each recipe on the result amplitude, the system normalizes the initial vector according to its overall length, generating a user taste preference vector where all coordinates are within a uniform and comparable range. The positive or negative direction of each coordinate in this vector represents the target user's tendency or avoidance of the corresponding basic taste, and the absolute value of the coordinate represents the relative certainty of this tendency. When there are too few valid interaction records, or when positive and negative contributions cancel each other out and cannot form a stable direction, the system calls the neutral benchmark vector in the basic taste index library as a temporary result and marks it as low confidence to avoid invalid normalization results.
[0032] In this embodiment, the above-mentioned scheme can transform historical scores into flavor preference representations with unified coordinate meanings, providing a stable basis for subsequent recipe flavor matching.
[0033] S3. Based on the flavor profile basic index library, perform feature quantization on the ingredient parameters and cooking parameters to obtain the flavor profile feature vector of the candidate recipe.
[0034] S31, based on the basic ingredient types and physical weights in the ingredient parameters, extract the corresponding initial flavor vectors of the ingredients from the flavor basic index library; S32, Based on the heat treatment method identifier in the cooking parameters, determine the corresponding flavor transformation matrix, wherein the flavor transformation matrix characterizes the nonlinear influence weight of a specific heat treatment method on different basic taste dimensions; S33, the flavor transformation matrix is used to map and calculate the initial flavor vector of the ingredients to generate the flavor feature vector of the candidate recipe.
[0035] Specifically, in this embodiment, when executing step S31, the system uses the types and physical weights of each basic ingredient in the candidate recipes as search criteria to call the basic ingredient entries in the flavor profile index library. These basic ingredient entries are established according to a unified edible portion mass standard, recording the initial contribution values of each ingredient to the five basic taste dimensions of sweetness, sourness, saltiness, bitterness, and umami in its untreated state. The initial contribution values are obtained by calibrating the objective physicochemical components of the ingredients, such as soluble sugars, organic acids, sodium salts, bitter substances, and umami substances, and are expressed as the taste contribution intensity under standard mass. The system converts the standard mass contribution intensity of each basic ingredient according to its actual physical weight in the candidate recipes, so that the initial contribution to the corresponding taste dimension increases accordingly when the ingredient quantity is larger. Then, the contribution results of all basic ingredients in the same recipe on the same taste dimension are accumulated to form the initial flavor profile vector of the ingredients. For seasoning ingredients that significantly contribute to flavor, such as salt, soy sauce, vinegar, sugar, and spices, they are also included in the calculation as searchable basic ingredient categories, avoiding the omission of key flavor sources based solely on the weight of the main ingredient. If a certain ingredient name does not have a valid entry in the flavor basic index library, the system can only call the labeled entries of the same type and processing state according to the preset ingredient equivalence relationship and mark the ingredient as an alternative matching source; if there is no preset equivalence relationship, the recipe enters the state of pending labeling and does not generate the initial flavor vector of the ingredients based on unverified data.
[0036] When executing step S32, the system determines the corresponding flavor transformation matrix from the flavor profile base index library based on the processing heat treatment method identifier in the cooking parameters. The rows and columns of the flavor transformation matrix maintain the same order as the basic taste dimensions in the initial flavor vector of the ingredients, and are used to describe the retention, weakening, concentration, and synergistic changes of each taste dimension under a specific heat treatment method. For processing methods such as steaming, boiling, stewing, pan-frying, stir-frying, deep-frying, and baking, the flavor profile base index library is configured with matrix entries determined through standardized cooking experiments. Boiling and stewing mainly reflect the leaching of water-soluble flavor substances and the retention of broth, while pan-frying, stir-frying, deep-frying, and baking mainly reflect the influence of water evaporation, oil participation, and browning reaction on the taste contribution. To reflect that the changes in the same heat treatment method under different initial flavor intensities are not constant, the flavor transformation matrix presets multiple taste intensity ranges. The system selects the corresponding influence weights based on the intensity range of each dimension in the initial flavor vector of the ingredients, thereby forming a piecewise nonlinear mapping relationship. If a candidate recipe involves a continuous processing step such as "blanching-stir-frying" or "boiling-baking", the flavor transformation matrix for each stage is determined sequentially according to the actual order of the heat treatment methods identified, to prevent the influence of subsequent heat treatments on the products of the previous stage from being calculated incorrectly in advance.
[0037] In step S33, the system inputs the initial flavor vector of the ingredients into the determined flavor transformation matrix, enabling each basic flavor dimension to be mapped under the corresponding heat treatment conditions, thus obtaining the processed flavor contribution result. During the mapping process, the diagonal influence weight of the same flavor dimension represents the degree of retention, volatility, or concentration of that flavor, while the correlation weight between different flavor dimensions represents the comprehensive color and flavor changes caused by heat treatment. The correlation weight only calls upon the calibration relationship established in the flavor basic index library, and does not include flavor changes without physicochemical basis in the result. For multi-stage processing recipes, the flavor contribution result output from the previous stage is used as the input for the next stage until all processing stages are completed. The system performs boundary checks on the final results of each flavor dimension, eliminating outliers caused by abnormal ingredient input, incorrect weight unit conversion, or matrix version mismatch, and normalizes them according to a unified recipe portion size standard to generate candidate recipe flavor feature vectors. The candidate recipe flavor feature vectors and the user flavor preference vectors use the same basic flavor coordinate order, providing a comparable data basis for subsequent flavor matching distance calculations.
[0038] In this embodiment, the above-mentioned scheme can combine the amount of ingredients and the effect of heat treatment to generate flavor feature representations corresponding to actual recipes, thereby improving the accuracy of flavor identification of candidate recipes.
[0039] S4, under the constraint of the nutritional intake condition, calculate the flavor matching distance between the user's flavor preference vector and the flavor feature vector of the candidate recipe.
[0040] S41, using the physical weight of seasonings in the ingredient parameters of the candidate recipe as the independent variable, establish a dynamic generation function for the flavor feature vector of the candidate recipe; S42, using the total amount of the specific macronutrients and micronutrients not exceeding the upper limit threshold of intake as the boundary of the feasible region, a constrained optimization space is constructed.
[0041] Specifically, in this embodiment, when executing step S41, the physical weight of adjustable seasonings in the candidate recipe is set as an independent variable. These adjustable seasonings include salt, sugar, vinegar, soy sauce, oyster sauce, monosodium glutamate (MSG), or other umami seasonings that directly affect the basic taste dimension. Ingredients that only serve to enhance aroma, color, or decorate, and which do not have stable taste contribution entries in the flavor profile index library, are not used as independent variables in the flavor profile dynamic generation function. The types, physical weights, and processing heat treatment methods of the basic ingredients remain unchanged in this calculation to ensure a clear causal relationship between changes in seasoning ratios and changes in the flavor profile of the candidate recipe. The system sets allowable weight ranges for each adjustable seasoning that are appropriate for the recipe portion size. Fine adjustments within the allowable weight range do not change the established processing heat treatment method. If the seasoning adjustment exceeds this range and may cause significant changes in the amount of broth, the oil ratio, or the heat treatment effect, then this parameter combination is not included in this round of calculation, avoiding extrapolation of the changed cooking process using fixed cooking parameters.
[0042] For any set of seasoning physical weight values, the system first inputs these values along with the unchanged basic ingredient parameters into the flavor profile index library to redetermine the initial contributions of sweet, sour, salty, bitter, and umami dimensions in the initial flavor profile vector of the ingredients. Then, it calls the flavor transformation matrix corresponding to the heat treatment method identifier of the candidate recipe, performs mapping processing on the updated initial flavor profile vector of the ingredients, and outputs the flavor feature vector of the candidate recipe under this set of seasoning ratios. The dynamically generated function established in this way takes the physical weight of each seasoning as input and the flavor feature vector of the candidate recipe as output, while retaining the nonlinear effects of changes in seasoning dosage on different basic flavor dimensions after heat treatment. For example, when the weight of other seasonings remains constant, an increase in the physical weight of salt will directly increase the salty contribution in the initial flavor profile vector of the ingredients. However, after cooking, stewing, or stir-frying, its final salty characteristic is also affected by the retention of broth, the absorption of ingredients, and the evaporation of moisture. The system calls the corresponding flavor transformation matrix accordingly, rather than directly equating changes in seasoning weight with proportional changes in the flavor intensity of the finished recipe.
[0043] During step S42, the system establishes a nutritional contribution relationship corresponding to the physical weight of each specific macronutrient and micronutrient determined in step S13. Basic ingredients form a fixed nutritional contribution at a fixed weight, while seasonings form a dynamic nutritional contribution that changes with physical weight based on food nutrient data. These two parts are combined within the same planned portion size to obtain the total nutrient amount corresponding to each seasoning ratio. For specific macronutrients such as protein, fat, and carbohydrates, and micronutrients such as sodium and potassium or other micronutrients specified by nutritional intake constraints, the system compares the total nutrient amount with the corresponding upper intake limit threshold. Only when the total amount of all restricted nutrients does not exceed the corresponding upper intake limit threshold, and the physical weight of each seasoning is within the preset allowable weight range, is the seasoning ratio determined as a feasible solution. If any nutrient exceeds the limit, even if the ratio improves the flavor, it is excluded from the constraint optimization space. For a dietary planning unit containing multiple recipes, the total nutrient amount is calculated cumulatively according to the planned portion size of each recipe within the same planning unit to prevent nutrient exceedances when a single recipe meets the restrictions and is combined.
[0044] In this embodiment, the above scheme can establish a calculable relationship between seasoning dosage, finished product flavor profile and nutritional limitations while maintaining consistent recipe processing conditions, providing an effective feasible domain boundary for subsequent flavor profile matching optimization.
[0045] S43, within the constrained optimization space, the objective function is to minimize the multidimensional Euclidean distance between the candidate recipe flavor feature vector output by the dynamic generation function and the user flavor preference vector. The solution is iteratively performed, and the minimum multidimensional Euclidean distance corresponding to the convergence of the objective function is taken as the flavor matching distance.
[0046] S431, Remove the restrictions on the feasible region boundary, and perform an unconstrained global solution in the full parameter space with the goal of minimizing the multidimensional Euclidean distance, to obtain the minimum multidimensional Euclidean distance in the unconstrained state; S432, within the constrained optimization space, perform a constrained iterative solution with the objective of minimizing the Euclidean distance in the multidimensional space to obtain the minimum Euclidean distance in the multidimensional space under the constrained state; S433, calculate the difference between the minimum multidimensional Euclidean distance under the constrained state and the minimum multidimensional Euclidean distance under the unconstrained state, and use it as an objective evaluation benchmark value to characterize the taste loss. S434, compare the objective evaluation benchmark value with the preset taste impairment tolerance threshold; If the objective evaluation benchmark value is greater than the taste impairment tolerance threshold, the recipe circuit breaker mechanism is triggered, an unmatched signal is output, and the parameter reconstruction of the candidate recipe is terminated. S435, if the objective evaluation benchmark value is not greater than the taste impairment tolerance threshold, then the minimum multidimensional Euclidean distance under the constraint state is taken as the minimum multidimensional Euclidean distance corresponding to the convergence of the objective function.
[0047] Specifically, in this embodiment, when executing step S431, the system compares the candidate recipe flavor feature vector output by the dynamic generation function established in step S41 with the user flavor preference vector generated in step S23 in a multi-dimensional flavor space with consistent coordinate order and normalization caliber. The Euclidean distance in the multi-dimensional space is determined by the coordinate differences between the two vectors in each basic taste dimension. The smaller the coordinate difference, the closer the candidate recipe after seasoning adjustment is to the target user's flavor preference. Removing the restrictions on the feasible domain boundary means temporarily not applying the upper limit threshold for the intake of specific macronutrients and micronutrients, rather than allowing the weight of seasonings to take negative values or increase indefinitely; the physical weight of each seasoning is still limited to the allowable weight range determined in step S41. The system divides the allowable weight range of each seasoning into a finite set of parameter values according to the minimum dispensing resolution achievable by the seasoning execution terminal, and traverses each group of seasoning ratios in the full parameter space. For each ratio, a dynamic generation function is invoked to generate a corresponding candidate recipe flavor feature vector. The multidimensional Euclidean distance between this vector and the user's flavor preference vector is calculated. The minimum distance and its corresponding seasoning ratio are retained to obtain the minimum multidimensional Euclidean distance under unconstrained conditions. Since this process covers all valid parameter combinations, it avoids getting trapped in local optima by starting from a single initial seasoning ratio.
[0048] When executing step S432, the system performs constrained iterative solutions within the same set of seasoning parameter values. For each seasoning ratio generated, the system first calculates the total amount of each restricted nutrient in the candidate recipe under the planned portion size, based on the nutritional data of the corresponding seasoning and the nutritional contribution of the fixed basic ingredients. Only when the total amount of specific macronutrients and micronutrients does not exceed the corresponding upper intake threshold is the seasoning ratio retained as a valid solution in the constrained optimization space, and its corresponding multidimensional Euclidean distance is further calculated. For any seasoning ratio where any nutrient exceeds the upper intake threshold, the system directly terminates the subsequent distance comparison of that ratio, excluding it from the iteration range. After traversal, the seasoning ratio with the smallest multidimensional Euclidean distance is selected from all valid solutions to obtain the minimum multidimensional Euclidean distance under constrained conditions. If no valid solution exists in the constrained optimization space, a nutritional constraint infeasibility signal is directly output, and the flavor degradation judgment is no longer entered.
[0049] In step S433, the system obtains the objective evaluation benchmark value by subtracting the minimum multidimensional Euclidean distance in the unconstrained state from the minimum multidimensional Euclidean distance in the constrained state. Since the search range of the constrained solution is included in the search range of the unconstrained solution, the objective evaluation benchmark value is non-negative under normal calculation conditions. The larger the value, the more obvious the deviation from the target user's taste preference is in order to meet nutritional intake restrictions. If a very small negative value occurs due to numerical precision processing, it is corrected to zero, and the parameter version of this calculation is recorded. Then, step S434 is executed to compare the objective evaluation benchmark value with the pre-configured taste loss tolerance threshold. The taste loss tolerance threshold is bound to the normalization method of the taste vector and remains consistent in the same version of the taste basic index library and the same planning scenario. When the objective evaluation benchmark value is greater than the taste loss tolerance threshold, it indicates that the nutritional restriction has made it impossible for the candidate recipe to maintain an acceptable level of taste closeness. The system triggers the recipe circuit breaker mechanism, outputs an unmatched signal containing the candidate recipe identifier and the reason for the unmatch, and terminates the parameter reconstruction of the candidate recipe.
[0050] When the objective evaluation benchmark value is not greater than the taste loss tolerance threshold, step S435 is executed. The system confirms that the candidate recipe still has an acceptable taste matching ability under the nutritional intake constraint. The minimum multidimensional space Euclidean distance under the constraint is determined as the minimum multidimensional space Euclidean distance corresponding to the convergence of the objective function, and the combination of the physical weights of the seasonings that obtained the distance is retained as the calculation basis for subsequent seasoning ratio adjustment.
[0051] In this embodiment, the above-mentioned scheme can quantify the loss caused by nutritional restrictions to the flavor matching results and promptly eliminate candidate recipes that cannot take into account both nutritional constraints and taste preferences.
[0052] S5. Generate a seasoning ratio adjustment coefficient based on the flavor matching distance, and reconstruct the parameters of the candidate recipes according to the seasoning ratio adjustment coefficient to obtain a personalized dietary planning scheme.
[0053] S51, when the flavor matching distance is calculated, extract the theoretical optimal solution of each seasoning independent variable in the constraint optimization space.
[0054] S511, monitor the iteration process of the objective function, and when it is determined that the objective function meets the preset convergence condition, trigger the state snapshot instruction.
[0055] Specifically, in this embodiment, after each update of the constraint iteration, the system records the current minimum Euclidean distance in multidimensional space and its corresponding physical weight of seasonings, and compares it with the optimal result of the previous round. When the distance improvement for a consecutive preset number of times does not exceed the convergence threshold, and the theoretical minimum distance of the remaining search parameter region is not less than the current optimal distance, the objective function is determined to meet the convergence condition. Subsequently, a state snapshot command is triggered to solidify the candidate recipe identifier, seasoning ratio, nutritional constraint verification result, minimum distance, and flavor profile basic index library version; if there are still parameter regions that may produce smaller distances, the iteration continues. In this embodiment, the above scheme can avoid prematurely outputting the ratio when convergence has not occurred, ensuring the traceability of the reconstructed parameters.
[0056] S512, in response to the state snapshot instruction, capture at least one set of seasoning independent variable coordinates that generate the minimum multidimensional Euclidean distance under the convergence condition, and construct a candidate solution set.
[0057] S5121, Extract the current iteration coordinates when the state snapshot instruction is triggered, and use them as the first independent variable coordinates for generating the minimum multidimensional Euclidean distance under the convergence condition; S5122, Based on the minimum multidimensional Euclidean distance, set the allowable equivalent error neighborhood; S5123, Starting from the coordinates of the first seasoning independent variable, a preset small perturbation step size is applied in the constrained optimization space to perform a horizontal traversal search, generating multiple perturbation coordinate points; S5124, verify whether each of the disturbance coordinate points satisfies the convergence condition, and calculate the multidimensional Euclidean distance corresponding to the disturbance coordinate points that satisfy the convergence condition. S5125, filter out other seasoning independent variable coordinates whose distance values fall within the equivalent error neighborhood; S5126, combine the coordinates of the first seasoning independent variable with the selected coordinates of the other seasoning independent variables to construct the candidate solution set.
[0058] Specifically, in this embodiment, when executing step S5121, the system reads the current iteration coordinates fixed when the state snapshot instruction is triggered. The current iteration coordinates record the physical weights of various adjustable seasonings, such as salt, sugar, vinegar, soy sauce, and umami seasoning, according to a predetermined seasoning arrangement order; each coordinate component uses the same mass measurement caliber and feeding resolution as in step S41. The system determines these current iteration coordinates as the coordinates of the first seasoning independent variable and associates and saves their corresponding minimum multidimensional Euclidean distance, candidate recipe identifier, nutritional constraint verification result, and flavor profile basic index library version, ensuring that the flavor profile model, nutritional constraints, and recipe formula used in subsequent searches remain consistent with those at convergence.
[0059] When executing step S5122, the system sets an allowable equivalent error neighborhood with the minimum multidimensional Euclidean distance as the lower limit and the distance increasing direction. The upper limit of the equivalent error neighborhood is determined by a preset local flavor error tolerance, and must not exceed the remaining space between the flavor loss degree corresponding to the current minimum multidimensional Euclidean distance and the flavor loss tolerance threshold. Therefore, although the seasoning ratio within the equivalent error neighborhood does not need to have the exact same distance value as the first seasoning independent variable coordinate, its flavor deviation is still within an acceptable range and will not exceed the flavor loss tolerance threshold determined in the previous step. The local flavor error tolerance is bound to the normalization caliber of the flavor vector and is not dynamically changed during the search process of the same candidate recipe.
[0060] When executing step S5123, the system uses the coordinates of the first seasoning independent variable as the center, sets a small perturbation step size according to the minimum controllable feeding increment of the seasoning execution terminal, and gradually applies positive and negative perturbations in the coordinate directions corresponding to each seasoning independent variable. For each perturbation coordinate point generated, the system first determines whether the physical weight of each seasoning is still within the allowable weight range, and recalculates the total amount of restricted nutrients based on the fixed base ingredients and the weight of the seasoning after perturbation; only when the total amount of all restricted nutrients does not exceed the corresponding upper limit threshold is the perturbation coordinate point retained in the constraint optimization space. For coordinate directions that have reached the allowable weight boundary of a certain seasoning, further expansion beyond the boundary is not allowed; for perturbation coordinate points that fail due to nutrient exceeding limits, subsequent processing of that coordinate point is directly terminated. By traversing laterally along each coordinate direction and its effective combinations, multiple perturbation coordinate points are formed around the coordinates of the first seasoning independent variable.
[0061] In step S5124, the system substitutes each perturbation coordinate point into the dynamic generation function of the candidate recipe flavor feature vector to obtain the corresponding candidate recipe flavor feature vector, and calculates the multidimensional Euclidean distance between it and the user's flavor preference vector. For each perturbation coordinate point, the system continues to monitor the iteration state of the objective function using the same convergence criterion as in step S511; when the distance improvement of the perturbation coordinate point in the continuous preset iteration process meets the convergence threshold, and there is no search direction that can further effectively reduce the distance, the perturbation coordinate point is confirmed to meet the convergence condition, and its corresponding multidimensional Euclidean distance at convergence is recorded. In step S5125, the system compares the recorded distance value with the equivalent error neighborhood, and only retains the coordinates of other seasoning independent variables whose distance values are within the neighborhood; for coordinates whose distance values exceed the upper limit of the neighborhood, even if they meet the nutritional intake constraint condition, they are not considered as equivalent candidate solutions. Finally, step S5126 is executed to deduplicate the coordinates of the first seasoning independent variable with the coordinates of the other seasoning independent variables obtained from the screening, and to retain the corresponding physical weight of the seasoning, nutritional verification result and distance value for each coordinate, thus constructing a candidate solution set.
[0062] In this embodiment, the above-mentioned scheme can identify multiple seasoning ratios that meet nutritional constraints and have similar flavor effects, providing a set of alternative candidate solutions for subsequent personalized dietary planning.
[0063] S513, Obtain the preset physical execution complexity rules, the physical execution complexity rules include the number of types of seasoning changes and the penalty weight of the magnitude of individual seasoning changes; S514, the coordinates of each set of seasoning independent variables in the candidate solution set are evaluated using the physical execution complexity rule, and the coordinates of the seasoning independent variables with the highest evaluation score are extracted as the theoretical optimal solution for each seasoning independent variable in the constrained optimization space.
[0064] Specifically, in this embodiment, when executing step S513, the system reads the physical execution complexity rules from the configuration table matching the candidate recipe processing method and the seasoning execution terminal, and uses the original physical weight of the seasonings before the candidate recipe parameters are reconstructed as the reference for change. For any seasoning independent variable coordinate in the candidate solution set, if the difference between the reconstructed physical weight of a certain seasoning and the original physical weight reaches the minimum controllable feeding increment of the seasoning execution terminal, then the seasoning is considered to have changed; the total number of seasonings that have changed constitutes the number of seasoning change types. The change range of a single seasoning is the difference in physical weight of the seasoning before and after reconstruction, and is normalized according to its preset allowable weight range to eliminate the dimensional influence caused by the different allowable adjustment ranges of seasonings such as salt, soy sauce, and sugar. The physical execution complexity rules configure penalty weights for the number of seasoning change types and the change range of each single seasoning. The larger the penalty weight, the more significant the impact of the corresponding additional feeding action or larger adjustment on the actual preparation complexity.
[0065] When executing step S514, the system reads the coordinates of the seasoning independent variables one by one from the candidate solution set. Since the coordinates of each group in the candidate solution set already meet the nutrient intake constraints and their distance values all fall within the equivalent error neighborhood, the system uses physical execution complexity as a further screening criterion. For each group of coordinates, the system first counts the number of seasoning types that have changed, then calculates the normalized physical weight change of each changed seasoning, and applies corresponding penalty weights accordingly; the more types of seasoning that have changed, or the greater the change in a single seasoning, the higher the penalty result, and the lower the evaluation score. The system deducts each penalty result from the unified basic evaluation value to obtain the evaluation score of each group of seasoning independent variable coordinates, and selects the group of coordinates with the highest evaluation score as the theoretical optimal solution. If there are multiple groups of coordinates with the same evaluation score, the one with the smaller Euclidean distance in multidimensional space is selected first; if the distance values are still the same, the one with fewer types of seasoning that have changed is selected to ensure that the screening result is unique and easy to execute.
[0066] In this embodiment, the above solution can determine a seasoning ratio that is simpler to use in actual feeding operations from candidate solutions that have similar flavor effects and meet nutritional requirements.
[0067] S52, obtain the preset kitchen execution precision constraint rules, discretize and round the theoretical optimal solution based on the kitchen execution precision constraint rules, and generate the seasoning ratio adjustment coefficient.
[0068] Specifically, in this embodiment, the system reads the kitchen execution precision constraint rules according to the type of kitchen execution terminal, and configures the achievable minimum addition increment and metering method for each seasoning. The system maps the continuous physical weight of each seasoning in the theoretical optimal solution to adjacent discrete weight levels, and verifies the nutritional intake constraints and equivalent error neighborhood for each level combination; if the nearest level does not meet the requirements, the effective level closest to the theoretical optimal solution is selected. Subsequently, based on the original physical weight of the seasoning, the discrete weight is encoded as the corresponding increase or decrease ratio, and when the original weight is zero, it is encoded as a quantitative increase, forming the seasoning ratio adjustment coefficient. In this embodiment, the above scheme can convert the theoretical ratio into seasoning instructions that can be actually executed in the kitchen.
[0069] In one embodiment, the step of reconstructing the parameters of the candidate recipes based on the seasoning ratio adjustment coefficient to obtain a personalized dietary planning scheme includes: S51, using the seasoning ratio adjustment coefficient, the original recipe text of the candidate recipe is mapped and replaced with physical weight to obtain the reconstructed physical weight; S52, verify whether the reconstructed physical weight meets the preset minimum physical form constraint of the dish; if it does, output the recipe text containing the reconstructed physical weight as the personalized dietary planning scheme.
[0070] Specifically, in this embodiment, when executing step S51, the system uses the original recipe text of the candidate recipe as a basis to perform structured parsing of the ingredient names, physical weights, units of measurement, and cooking stages, establishing a correspondence between seasoning entries and the original physical weights of the seasonings. For the seasoning entries pointed to by the seasoning ratio adjustment coefficient, if the adjustment coefficient is an increase or decrease ratio, the corresponding original physical weight of the seasoning is used as a reference to map and obtain the discretized reconstructed physical weight; if the adjustment coefficient is a quantitative increase, the corresponding seasoning entry and its reconstructed physical weight are inserted in the preset seasoning stage. For the case where the same seasoning is used in multiple cooking stages such as marinating, stir-frying, or before serving, the system keeps the original addition ratio of each stage unchanged and allocates the reconstructed total physical weight according to the ratio to avoid changing the established cooking process. After the mapping is completed, only the seasoning weights affected by the adjustment coefficient and the necessary unit of measurement are replaced, while the basic ingredients, processing heat treatment methods, and recipe content not involved in optimization remain unchanged, resulting in a recipe text containing the reconstructed physical weights.
[0071] When executing step S52, the system calls the baseline constraints of the dish's physical form corresponding to the recipe category and processing heat treatment method to verify the reconstructed physical weight. These baseline constraints include at least the following: the physical weight of each seasoning is non-negative; the solid-liquid ratio between the basic ingredients and liquid seasonings is within the allowable range for the corresponding dish category; the amount of oily and thickening seasonings does not disrupt the predetermined cooking form; and the total portion size of the reconstructed recipe meets the preset serving size requirements. For soup recipes, the focus is on verifying whether the adjusted liquid seasoning still maintains an edible broth ratio; for stir-fried recipes, the focus is on verifying whether the reconstructed weights of liquid and oily seasonings change the dish from a stir-fry to a soup. If all baseline constraints are met, the recipe text, including the reconstructed physical weight, corresponding cooking stage, and original processing steps, is encapsulated into a personalized dietary plan and output; if any baseline constraint is not met, the recipe text is not output, and the system returns to the candidate solution set to continue selecting the next valid seasoning ratio.
[0072] In this embodiment, the above solution can transform the seasoning optimization results into a directly executable personalized dietary planning scheme while maintaining the basic physical form of the dish.
[0073] In another embodiment, the step of reconstructing the parameters of the candidate recipes according to the seasoning ratio adjustment coefficient to obtain a personalized dietary planning scheme includes: S51, using the seasoning ratio adjustment coefficient, the original recipe text of the candidate recipe is mapped and replaced with physical weight to obtain the reconstructed physical weight; S52, verify whether the reconstructed physical weight meets the preset minimum physical form constraint of the dish; if it does, output the recipe text containing the reconstructed physical weight as the personalized dietary planning scheme.
[0074] Specifically, in this embodiment, the system performs semantic parsing on the original recipe text of the candidate recipes, locating the name, original physical weight, unit of measurement, and cooking stage of each seasoning, and establishing a mapping relationship between the seasoning ratio adjustment coefficient and the corresponding seasoning item. For adjustment coefficients expressed as an increase or decrease ratio, the system converts the original physical weight of the seasoning into a reconstructed physical weight based on the original physical weight of the seasoning; for adjustment coefficients expressed as a quantitative increase, the corresponding seasoning and its reconstructed physical weight are added in the preset seasoning stage. If the same seasoning appears in multiple cooking stages, the system allocates the reconstructed physical weight according to the proportion of the original amount added in each stage, maintaining the original cooking order unchanged.
[0075] Subsequently, the system invokes the minimum physical form constraints of the dish based on the dish category and processing heat treatment method to verify the reconstructed physical weight. Verification includes checking whether the weight of each seasoning is non-negative, whether the solid-liquid ratio between the base ingredients and liquid seasonings is within the allowable range for the corresponding dish, whether oily and thickening seasonings meet the minimum requirements for maintaining the intended dish form, and whether the total reconstructed portion size meets the serving size requirements. If the verification passes, the recipe text, including the reconstructed physical weight, seasoning addition stage, and original cooking steps, is output as a personalized meal plan; if the verification fails, the recipe text is not output.
[0076] In this embodiment, the above solution can convert the seasoning optimization results into an executable recipe that meets the basic physical requirements of the dish.
[0077] In another embodiment, the step of reconstructing the parameters of the candidate recipes according to the seasoning ratio adjustment coefficient to obtain a personalized dietary planning scheme includes: S51, calculate the amount of physical property loss of the target seasoning caused by applying the seasoning ratio adjustment coefficient, the amount of physical property loss includes liquid volume loss and solid structure loss. S52, based on a preset flavor neutral compensation matrix library, match the flavor neutral compensator and compensation quality corresponding to the amount of physical attribute loss, wherein the flavor neutral compensator is used to maintain the physical form without changing the flavor characteristics. S53, the flavor neutral compensator and the compensating mass are physically combined with the reconstructed seasoning parameters after applying the seasoning ratio adjustment coefficient to obtain the target physical matrix; S54, extract the initial cooking time and temperature parameters of the candidate recipes, and perform thermodynamic adaptive correction on the initial cooking time and temperature parameters according to the change ratio of the total mass and moisture content of the target physical matrix; S55, the target physical matrix is combined with the modified cooking time and temperature parameters to generate the personalized dietary plan.
[0078] Specifically, in this embodiment, when executing step S51, the system reads the physical weight of each target seasoning in the candidate recipe before and after parameter reconstruction, and extracts the density, moisture content, and dry matter content of the corresponding seasoning from the food property data. For liquid or flowable seasonings, the change in liquid volume is calculated based on the difference in physical weight and density before and after reconstruction; for powder, granular, or paste seasonings, the change in solid structure is determined based on the difference in physical weight and dry matter content. Only when the seasoning ratio adjustment coefficient reduces the amount of the corresponding seasoning is the positive difference between the original formula and the reconstructed seasoning parameters recorded as the missing physical property; wherein, the missing liquid volume is expressed in volume units, and the missing solid structure is expressed in dry matter mass units. In the case of an increase in the amount of seasoning or no decrease in the contribution of physical properties, the missing physical property is recorded as zero to avoid incorrectly identifying the newly added seasoning as an object to be compensated.
[0079] In step S52, the system selects flavor-neutral compensators from a pre-set flavor-neutral compensation matrix library based on the liquid phase volume loss and solid structure loss. The flavor-neutral compensation matrix library pre-records the liquid phase contribution capacity, dry matter contribution capacity, moisture content, thermal stability, nutritional components, and basic taste contribution of each compensator. Among these, the added contribution of each flavor-neutral compensator to sweetness, sourness, saltiness, bitterness, and umami within a pre-set usage range is within the flavor-neutral determination range. The system prioritizes compensators that can simultaneously compensate for both liquid phase volume loss and solid structure loss and are suitable for the heat treatment methods used in candidate recipes. When a single compensator cannot meet the requirements for both types of loss, a combination of a liquid phase compensator and a solid structure compensator is selected, and the compensation mass is determined based on the physical property contribution provided per unit mass of each. During the matching process, the total amount of restricted nutrients after the introduction of the compensator is simultaneously verified. If the compensation exceeds the upper limit threshold for intake, or the added taste contribution exceeds the flavor-neutral determination range, the compensation combination is discarded.
[0080] In step S53, the system writes the determined flavor neutral compensator and its compensation mass into the seasoning or mixing stage corresponding to the candidate recipe, and physically merges it with the reconstructed seasoning parameters after applying the seasoning ratio adjustment coefficient to generate the target physical matrix. The target physical matrix retains the flavor adjustment results formed by the reconstructed seasoning parameters, while supplementing the liquid volume or solid matter composition lost due to the reduction of seasoning. After merging, the system re-summarizes the total mass, water content, and dry matter mass of the target physical matrix, and verifies its nutritional intake constraints and flavor characteristics; only when the verification results still meet the corresponding restrictions is the target physical matrix used for subsequent cooking parameter correction.
[0081] During step S54, the system extracts the initial cooking time and temperature parameters corresponding to the heat treatment methods of the candidate recipes from the original recipe text, and performs thermodynamic adaptive correction based on the total mass difference between the original recipe materials and the target physical matrix, and the proportion of moisture content change. When the total mass increases, the heat required for the materials to reach the predetermined heating state increases accordingly, and the system appropriately extends the cooking time according to the heat treatment method. When the moisture content increases, the system increases the processing time required for moisture migration and evaporation for frying, stir-frying, or baking recipes, and corrects the heating temperature within the preset upper temperature limit. When the moisture content decreases, the system shortens the processing time or reduces the heating intensity to prevent excessive dehydration, charring, or physical damage to the dishes. For recipes that rely primarily on liquid phase heat transfer, such as boiling and stewing, the cooking time is corrected first, and the temperature parameters are maintained within the safe temperature range for the corresponding cooking method. The corrected cooking time and temperature parameters must also meet the minimum cooking requirements and maximum safe heating limits corresponding to the food category.
[0082] When executing step S55, the system combines the target physical matrix, reconstructed seasoning parameters, and corrected cooking time and temperature parameters in the original cooking stage sequence to generate a personalized dietary plan that includes ingredient weight, amount of compensator, seasoning addition time, and heat treatment requirements.
[0083] In this embodiment, the above solution can replenish the physical matrix of the dish after adjusting the seasoning ratio and make the cooking parameters adapt to changes in the state of the materials.
[0084] The flavor preference matching method for personalized dietary planning in the embodiments of the present invention has been described above. The flavor preference matching system for personalized dietary planning in the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 3 One embodiment of the flavor preference matching system for personalized dietary planning in this invention includes: The acquisition module is used to acquire the target user's historical dietary interaction data, the ingredient parameters and cooking parameters of the candidate recipes, and the nutritional intake constraints of the target user. The first quantization module is used to perform feature quantization on the historical dietary interaction data based on a preset flavor profile index library to obtain a user flavor preference vector. The second quantization module is used to perform feature quantization on the ingredient parameters and cooking parameters based on the flavor basic index library to obtain the flavor feature vector of the candidate recipe. The calculation module is used to calculate the flavor matching distance between the user's flavor preference vector and the candidate recipe flavor feature vector under the constraints of the nutritional intake conditions. The reconstruction module is used to generate a seasoning ratio adjustment coefficient based on the flavor matching distance, and to reconstruct the parameters of the candidate recipes according to the seasoning ratio adjustment coefficient to obtain a personalized dietary planning scheme.
[0085] In this embodiment, the specific implementation of each unit in the above system embodiment is the same as that in the above method embodiment, and will not be repeated here.
Claims
1. A method for matching flavor preferences for personalized dietary planning, characterized in that, include: Obtain the target user's historical dietary interaction data, the ingredient parameters and cooking parameters of the candidate recipes, and the target user's nutritional intake constraints; Based on a preset basic index library of flavor profiles, the historical dietary interaction data is quantified to obtain a user flavor profile preference vector. Based on the flavor profile basic index library, the ingredient parameters and cooking parameters are quantized to obtain the flavor profile feature vector of the candidate recipe. Under the constraints of the nutritional intake conditions, the flavor matching distance between the user's flavor preference vector and the flavor feature vector of the candidate recipe is calculated; Based on the flavor matching distance, a seasoning ratio adjustment coefficient is generated, and the candidate recipes are reconstructed according to the seasoning ratio adjustment coefficient to obtain a personalized dietary planning scheme.
2. The flavor preference matching method for personalized dietary planning according to claim 1, characterized in that, The acquisition of the target user's historical dietary interaction data, the ingredient parameters and cooking parameters of the candidate recipes, and the target user's nutritional intake constraints includes: Extract the historical recipe identifiers of the target user within a preset time window, and the user ratings corresponding to the historical recipe identifiers, and combine them into the historical dietary interaction data; The recipe text of the candidate recipe is parsed, the basic ingredient types and their corresponding physical weights are extracted as the ingredient parameters, and the processing heat treatment method identifier of the candidate recipe is extracted as the cooking parameters. The physiological indicators and chronic disease labels of the target user are obtained. Based on the preset clinical nutrition mapping rules, the physiological indicators and chronic disease labels are converted into upper limit thresholds for the intake of specific macronutrients and micronutrients, which serve as the nutritional intake constraints.
3. The flavor preference matching method for personalized dietary planning according to claim 2, characterized in that, The method, based on a preset flavor profile index library, performs feature quantification on the historical dietary interaction data to obtain a user flavor preference vector, including: Based on the historical recipe identifier in the historical dietary interaction data, the corresponding multidimensional flavor basic feature vector is extracted from the preset flavor basic index library. The multidimensional flavor basic feature vector is composed of objective physicochemical standard quantities that characterize different basic taste dimensions. Map the user ratings in the historical dietary interaction data to preference weight coefficients; The user's flavor preference vector is generated by performing spatial vector weighting, aggregation, and normalization on the multidimensional flavor basic feature vector using the preference weight coefficients.
4. The flavor preference matching method for personalized dietary planning according to claim 3, characterized in that, The step of performing feature quantization on the ingredient parameters and cooking parameters based on the flavor profile basic index library to obtain the flavor profile feature vector of the candidate recipe includes: Based on the basic ingredient types and physical weights in the ingredient parameters, the corresponding initial ingredient flavor vectors are extracted from the flavor basic index library. Based on the heat treatment method identifier in the cooking parameters, the corresponding flavor transformation matrix is determined. The flavor transformation matrix represents the nonlinear influence weight of a specific heat treatment method on different basic taste dimensions. The flavor transformation matrix is used to map and calculate the initial flavor vector of the ingredients to generate the flavor feature vector of the candidate recipe.
5. The flavor preference matching method for personalized dietary planning according to claim 4, characterized in that, The step of calculating the flavor matching distance between the user's flavor preference vector and the candidate recipe flavor feature vector under the constraint of the nutritional intake condition includes: Using the physical weight of seasonings in the ingredient parameters of the candidate recipes as independent variables, a dynamic generation function for the flavor feature vector of the candidate recipes is established. The feasible region boundary is defined by the total amount of the specific macronutrients and micronutrients not exceeding the upper limit threshold of intake, and a constrained optimization space is constructed. Within the constrained optimization space, the objective function is to minimize the multidimensional Euclidean distance between the candidate recipe flavor feature vector output by the dynamic generation function and the user flavor preference vector. The solution is iteratively performed, and the minimum multidimensional Euclidean distance corresponding to the convergence of the objective function is taken as the flavor matching distance.
6. The flavor preference matching method for personalized dietary planning according to claim 5, characterized in that, Within the constrained optimization space, the objective function is to minimize the multidimensional Euclidean distance between the candidate recipe flavor feature vector output by the dynamic generation function and the user flavor preference vector. This is then iteratively solved, and the minimum multidimensional Euclidean distance corresponding to the convergence of the objective function is taken as the flavor matching distance. This includes: Remove the restrictions on the feasible region boundary, and perform an unconstrained global solution in the full parameter space with the goal of minimizing the Euclidean distance in the multidimensional space, to obtain the minimum multidimensional Euclidean distance in the unconstrained state. Within the constrained optimization space, an iterative solution with constraints is performed with the objective of minimizing the Euclidean distance in the multidimensional space, to obtain the minimum Euclidean distance in the multidimensional space under the constraints. The difference between the minimum multidimensional Euclidean distance under the constrained state and the minimum multidimensional Euclidean distance under the unconstrained state is calculated and used as an objective evaluation benchmark value to characterize the taste loss. The objective evaluation benchmark value is compared with the preset taste impairment tolerance threshold; If the objective evaluation benchmark value is greater than the taste impairment tolerance threshold, the recipe circuit breaker mechanism is triggered, an unmatched signal is output, and the parameter reconstruction of the candidate recipe is terminated. If the objective evaluation benchmark value is not greater than the taste impairment tolerance threshold, then the minimum multidimensional Euclidean distance under the constraint state is taken as the minimum multidimensional Euclidean distance corresponding to the convergence of the objective function.
7. The flavor preference matching method for personalized dietary planning according to claim 6, characterized in that, The process of generating a seasoning ratio adjustment coefficient based on the flavor matching distance, and reconstructing the parameters of the candidate recipes according to the seasoning ratio adjustment coefficient to obtain a personalized dietary planning scheme includes: When the flavor matching distance is calculated, the theoretical optimal solution of each seasoning independent variable in the constraint optimization space is extracted; Obtain the preset kitchen execution accuracy constraint rules, and discretize and round the theoretical optimal solution based on the kitchen execution accuracy constraint rules to generate the seasoning ratio adjustment coefficient.
8. The flavor preference matching method for personalized dietary planning according to claim 1, characterized in that, The step of reconstructing parameters of the candidate recipes based on the seasoning ratio adjustment coefficient to obtain a personalized dietary planning scheme includes: Using the seasoning ratio adjustment coefficient, the original recipe text of the candidate recipe is mapped and replaced with physical weight to obtain the reconstructed physical weight; Verify whether the reconstructed physical weight meets the preset minimum physical form constraint of the dish; if it does, output the recipe text containing the reconstructed physical weight as the personalized dietary planning scheme.
9. The flavor preference matching method for personalized dietary planning according to claim 1, characterized in that, The step of reconstructing parameters of the candidate recipes based on the seasoning ratio adjustment coefficient to obtain a personalized dietary planning scheme includes: Calculate the amount of physical property loss of the target seasoning after applying the seasoning ratio adjustment coefficient, wherein the amount of physical property loss includes liquid phase volume loss and solid structure loss. Based on a preset flavor-neutral compensation matrix library, a flavor-neutral compensator and compensation quality are matched to the amount of physical attribute loss. The flavor-neutral compensator is used to maintain the physical form without changing the flavor characteristics. The flavor neutral compensator and its compensating mass are physically combined with the reconstructed seasoning parameters after applying the seasoning ratio adjustment coefficient to obtain the target physical matrix. The initial cooking time and temperature parameters of the candidate recipes are extracted, and the initial cooking time and temperature parameters are thermodynamically adaptively corrected according to the change ratio of the total mass and water content of the target physical matrix. The target physical matrix is combined with the modified cooking time and temperature parameters to generate the personalized dietary plan.
10. A flavor preference matching system for personalized dietary planning, characterized in that, include: The acquisition module is used to acquire the target user's historical dietary interaction data, the ingredient parameters and cooking parameters of the candidate recipes, and the nutritional intake constraints of the target user. The first quantization module is used to perform feature quantization on the historical dietary interaction data based on a preset flavor profile index library to obtain a user flavor preference vector. The second quantization module is used to perform feature quantization on the ingredient parameters and cooking parameters based on the flavor basic index library to obtain the flavor feature vector of the candidate recipe. The calculation module is used to calculate the flavor matching distance between the user's flavor preference vector and the candidate recipe flavor feature vector under the constraints of the nutritional intake conditions. The reconstruction module is used to generate a seasoning ratio adjustment coefficient based on the flavor matching distance, and to reconstruct the parameters of the candidate recipes according to the seasoning ratio adjustment coefficient to obtain a personalized dietary planning scheme.
