Nutritional gap early warning method and system based on weekly meal schedule timing compensation

By adopting a nutritional gap early warning method based on weekly menu time-series compensation, the problem of accuracy in nutritional gap early warning in student diet management is solved, and a forward-looking and traceable early warning of nutritional gaps is achieved, ensuring the consistency between the nutritional compensation baseline and the actual supply status.

CN122337500APending Publication Date: 2026-07-03HUNAN ANZHI NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUNAN ANZHI NETWORK TECH CO LTD
Filing Date
2026-06-03
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing technologies lack the ability to dynamically recalculate, rewrite sequences, and identify gap evolution in student dietary management when there are temporary adjustments to dishes during the week, changes in actual ingredients, and shifts in meal supply. This makes it difficult to accurately identify the true compensation space and gap formation process of target nutrients from the perspective of continuous weekly supply, resulting in a mismatch between the nutritional compensation baseline and the actual supply status.

Method used

By employing a nutritional gap early warning method based on weekly menu time-series compensation, basic meal supply record data and nutritional benchmark record data are retrieved, preprocessed, and meal supply change trigger judgment is performed. Supply deviations are identified and benchmark recalculation of nutritional supply is generated. Sequence write-back consistency analysis is conducted to confirm the latest weekly nutritional time-series chain, and nutritional gap early warning analysis and trend early warning are output.

Benefits of technology

It enables proactive and traceable early warning of nutritional gaps in student diet management, ensuring consistency between the nutritional compensation baseline and the actual supply status, and improving the accuracy and timeliness of nutritional gap early warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122337500A_ABST
    Figure CN122337500A_ABST
Patent Text Reader

Abstract

The application discloses a nutrition gap early warning method and system based on weekly menu timing compensation, and relates to the technical field of intelligent management. The nutrition gap early warning method and system based on weekly menu timing compensation comprises the following steps: S1, calling and preprocessing meal serving basic record data and nutrition standard record data; S2, performing meal serving change trigger discrimination, and generating target meal serving offset identification and recalculated nutrition serving amount according to the discrimination result; S3, performing meal serving writing replacement, sequence coverage checking and latest weekly nutrition timing chain confirmation according to sequence writing consistent analysis results; and S4, performing nutrition gap early warning analysis, trend early warning output, gap early warning output and meal serving correction request generation. The application solves the problem that the existing nutrition gap early warning technology is difficult to timely trigger the recalculation of meal nutrition supply value and sequence writing when temporary dish replacement, raw material substitution or weight adjustment occurs in actual meal serving, and is prone to cause the mismatch between the nutrition compensation baseline and the actual supply state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent management, specifically a method and system for early warning of nutritional gaps based on weekly menu time-series compensation. Background Technology

[0002] With the continuous advancement of centralized school meal services, student nutrition management, and the digitalization of menus, nutritional analysis and early warning based on menus have become an important technological direction in school meal supervision and dietary management. Existing technologies typically focus on the school's weekly meal arrangements, menu configurations, nutritional reference standards for ingredients, and meal delivery records. They statistically analyze, compare, and evaluate nutritional indicators such as energy, protein, vitamins, and minerals in student meals to help determine whether the weekly dietary combinations meet the corresponding nutritional control requirements. Simultaneously, with the increasing informatization of school canteens, digitalization of kitchens, and the interconnection of supervision platforms, menu publishing, menu adjustments, ingredient usage, and meal delivery execution are gradually being recorded electronically. This allows weekly menu nutritional analysis to shift from traditional manual calculations to continuous and automated processing based on information systems. Monitoring nutritional supply, identifying nutritional deviations, and providing early warnings throughout the weekly meal service process have become common technological applications in the fields of smart school canteens, student meal nutrition supervision, and digital dietary management.

[0003] For example, the invention patent with announcement number CN116417114B discloses a student health diet management system based on the entire life cycle, including a meal ordering module, a recipe management module, and an artificial intelligence nutritionist module. The meal ordering module allows parents to pre-order meals for their children at school for the next week. The recipe management module manages the creation, publication, and nutritional information display of meal sets. The artificial intelligence nutritionist module includes modules for dietary type analysis, dietary structure intake data analysis, reasonable dietary advice, reasonable dietary optimization, and reasonable dietary recommendations. These modules analyze, optimize, and recommend initial meal combinations for students based on their weekly meal ordering records, historical nutritional intake over the previous ordering period, basic student information, body fat data, exercise status, and course schedule. The patent also discloses a prediction model and a dietary preference model based on attention mechanisms, enabling analysis of students' weekly meal choices, nutritional intake, and health trends. Based on the analysis results, it optimizes and recommends meal combinations, improving the precision and personalization of student diet management.

[0004] For example, the invention patent with announcement number CN113724836B discloses a digital healthy canteen system, including a cloud server, a target personnel mobile terminal, a biological detection module, a wearable detection module, a precision automatic food dispensing module, and a food identification and settlement module. The biological detection module acquires information about the target personnel and detects real-time data such as height, weight, body fat percentage, and body shape. The wearable detection module monitors the target personnel's activity level in real time and manages work plans and human health data. The precision automatic food dispensing module automatically calculates and generates a nutritional intake recommendation table and a menu with multiple recommended combinations based on the currently acquired data, and completes precise food extraction through an automatic food dispensing machine. The food identification and settlement module performs secondary verification of the dispensed food and generates a bill. The patent also discloses the specific structure of the automatic food dispensing machine, enabling precise control of the amount of food dispensed based on the target personnel's edible capacity. Combined with nutritional analysis, food statistics, and settlement interaction, it improves the digitalization and precision of food supply and nutritional management in the healthy canteen setting.

[0005] Existing technologies for student diet management, digital canteens, and nutrition recommendations, while capable of conducting nutritional analysis, menu recommendations, or precise meal control based on order records, menu configuration, nutritional components, individual conditions, and meal delivery processes, largely focus on optimizing single orders, recommending individual diets, or adjusting meals in real time. They lack a unified, time-series compensation analysis mechanism for continuous nutrition supply processes, especially lacking the ability to dynamically recalculate, rewrite sequences, and identify gap evolution in the event of temporary adjustments to menus within a week, changes in actual ingredient input, and deviations in meal delivery. Consequently, it is difficult to accurately identify the true compensation space and gap formation process of target nutrients from a weekly continuous supply perspective, making it difficult to achieve forward-looking and traceable nutritional gap early warning for the weekly menu execution process.

[0006] Therefore, in order to address the above issues, there is an urgent need for a nutritional gap early warning method and system based on weekly meal plan time-series compensation. Summary of the Invention

[0007] To address the above problems, this invention provides a nutritional gap early warning method and system based on weekly menu time-series compensation. This method solves the problem that existing nutritional gap early warning technologies are unable to promptly trigger the recalculation and sequence rewriting of meal nutritional supply values ​​when temporary changes in dishes, substitute ingredients, or weight adjustments occur during actual meal supply, which can easily lead to a mismatch between the nutritional compensation baseline and the actual supply status.

[0008] To achieve the above objectives, the technical solution adopted by this invention is: a nutritional gap early warning method based on weekly menu time-series compensation, comprising: S1, retrieving basic meal supply record data and nutritional baseline record data, and preprocessing the basic meal supply record data and nutritional baseline record data; S2, performing meal supply change trigger discrimination on the basic meal supply record data and nutritional baseline record data, and identifying target meal supply offset and generating baseline recalculated nutritional supply based on the meal supply change trigger discrimination result; S3, performing sequence write-back consistency analysis based on the baseline recalculated nutritional supply and the weekly nutritional time-series chain, and performing meal write-back replacement, sequence coverage verification, and confirmation of the latest weekly nutritional time-series chain based on the sequence write-back consistency analysis result; S4, performing nutritional gap early warning analysis based on the latest weekly nutritional time-series chain, and generating trend early warning output, gap early warning output, and meal correction request based on the nutritional gap early warning analysis result.

[0009] Furthermore, the specific process for retrieving basic meal supply record data and nutritional benchmark record data is as follows: Real-time monitoring of the weekly meal supply arrangement release status and meal supply execution record arrival status corresponding to the target week. When it is detected that the weekly meal supply arrangement corresponding to the target week has been released and there is a corresponding meal supply execution record, the basic meal supply record data is retrieved. The basic meal supply record data includes: meal supply date, meal supply time period identifier, released dish identifier, actual meal supply dish identifier, dish change operation timestamp, and meal supply start timestamp. Simultaneously, the nutritional benchmark record data is retrieved. The nutritional benchmark record data includes: recipe ingredient name, recipe ingredient quantity, actual ingredient name, actual ingredient weight, target nutrient content corresponding to each ingredient, and weekly standard value of the target nutrient.

[0010] Furthermore, the specific preprocessing process for the basic meal supply record data and nutritional baseline record data is as follows: Meal date, meal time period identifier, published dish identifier, and actual served dish identifier are aligned using meal indexes to determine the target meal; duplicate weighing entries are removed and abnormal weighing thresholds are eliminated; duplicate records of the formula ingredient quantity and actual feed weight are removed and abnormal weighing records are cleaned; ingredient code mapping and name merging are performed on the formula ingredient name and actual feed ingredient name; dish codes are unified for the published dish identifier and actual served dish identifier; the timestamp of dish change operation and meal start timetamp are converted to a unified time format; the basic meal supply record data and nutritional baseline record data are standardized using a zero-mean unit variance standardization algorithm; and the formula ingredient quantity, actual feed weight, dish change operation timestamp, and meal start timetamp are normalized using a maximum-minimum value normalization algorithm.

[0011] Furthermore, the specific process for triggering meal change judgments on the basic meal supply record data and nutritional baseline record data is as follows: The actual feed weight is summed for each target meal to obtain the total actual feed weight; the formula ingredient usage is summed for each target meal to obtain the total formula weight; the published dish identifier and the actual served dish identifier are compared to obtain a dish identifier consistency status value (1 for consistency, 0 for inconsistency); the formula ingredient name and the actual fed ingredient name are precisely matched to obtain an ingredient set consistency value; the meal supply start timestamp and dish change operation timestamp are then... The difference is calculated to obtain the change to meal service time difference; the ratio of the actual total weight of ingredients plus one to the total weight of the recipe plus one is calculated, and the absolute value is taken after taking the natural logarithm to obtain the weight deviation logarithm term; the product of the consistency status of the dish label and the consistency of the ingredient set is calculated, and the product result is subtracted by one to obtain the consistency reduction term; the weight deviation logarithm term and the consistency reduction term are added together and the inverse hyperbolic sine value is taken to obtain the structure trigger term; the negative exponent of the change to meal service time difference is calculated, and one is added to obtain the time difference amplification term; the product of the structure trigger term and the time difference amplification term is calculated to obtain the meal service change trigger value.

[0012] Furthermore, the specific process for identifying the supply offset of the target meal and generating the baseline recalculated nutritional supply based on the meal change trigger judgment result is as follows: Real-time comparison of the meal change trigger value and the meal change trigger threshold: When the meal change trigger value is less than the meal change trigger threshold, it is determined that the current target meal has not formed a supply offset that needs to be recalculated, and the nutritional supply corresponding to the target meal remains unchanged. The nutritional supply corresponding to the target meal is initially the nutritional supply of the published dish. The nutritional supply of the published dish is obtained by matching the recipe ingredient name with the target nutrient content of each ingredient item by item, combining the recipe ingredient usage for nutritional conversion, and accumulating all the recipe ingredients of the published dish corresponding to the target meal. Nutrient supply is incorporated into the current weekly nutrient time-series chain, which is a weekly nutrient supply sequence formed by arranging the nutrient supply corresponding to each target meal in the order of meal supply date and meal supply time. When the meal supply change trigger value is greater than or equal to the meal supply change trigger threshold, it is determined that the current target meal has formed a supply offset that needs to be recalculated. The actual ingredient names are matched with the nutritional components of the ingredients one by one, and the target nutrient content per unit weight corresponding to each actual ingredient is extracted. Then, the nutrient conversion is performed in combination with the actual ingredient weight, and the baseline recalculated nutrient supply of the target meal is obtained by using the itemized cumulative calculation method based on the target meal. The corresponding meal write-back record is generated and entered into the sequence write-back consistency analysis.

[0013] Furthermore, the specific process of sequence write-back consistency analysis based on the benchmark recalculated nutrient supply and the weekly nutrient time series chain is as follows: Obtain the benchmark recalculated nutrient supply; write the meal write-back record into the weekly nutrient time series chain; locate the target meal node in the weekly nutrient time series chain according to the meal service date and meal service time identifier; replace the nutrient supply corresponding to the target meal node with the benchmark recalculated nutrient supply in the meal write-back record, and use the replaced nutrient supply as the target meal nutrient supply after write-back; count the nodes in the current weekly nutrient time series chain that have been written with meal write-back records to obtain the number of written-back nodes; based on the meal service date and meal service time identifier, perform sequence write-back consistency analysis from the target meal to the end of the week. Count the nodes that need to be written back between each iteration to obtain the number of nodes that should be written back; calculate the ratio of the target meal's nutritional supply after writing back plus one to the baseline recalculated nutritional supply plus one, take the natural logarithm, take the absolute value, and then take the inverse exponent value to obtain the supply fit term; calculate the product of the number of nodes already written back plus one and the number of nodes that should be written back plus one, take the square root, and multiply by two to obtain the write-back coverage numerator; calculate the sum of the number of nodes already written back, the number of nodes that should be written back, and the constant two to obtain the write-back coverage denominator; calculate the ratio of the write-back coverage numerator to the write-back coverage denominator to obtain the write-back coverage term; calculate the product of the supply fit term and the write-back coverage term to obtain the sequence write-back consistency value.

[0014] Furthermore, the specific process for meal write-back replacement, sequence coverage verification, and confirmation of the latest weekly nutritional time-series chain based on the sequence write-back consistency analysis results is as follows: Real-time comparison of the sequence write-back consistency value and the sequence write-back consistency threshold: When the sequence write-back consistency value is less than the sequence write-back consistency threshold, the official release of the warning result corresponding to the current target nutrient is paused, and the version writing of incomplete nodes and the replacement of nutrient supply continue to be executed, generating a sequence record to be verified; After the recalculated sequence write-back consistency value is greater than or equal to the sequence write-back consistency threshold, the current weekly nutritional time-series chain after write-back correction is determined as the latest weekly nutritional time-series chain, and then the latest weekly nutritional time-series chain is sent to the nutritional gap warning analysis; When the sequence write-back consistency value is greater than or equal to the sequence write-back consistency threshold, the current weekly nutritional time-series chain is confirmed as the latest weekly nutritional time-series chain, and enters the nutritional gap warning analysis.

[0015] Furthermore, the specific process of nutritional gap early warning analysis based on the latest weekly nutritional time series is as follows: Obtain the weekly standard value of the target nutrient; sum the nutritional supply corresponding to the meals executed before the current time point in the latest weekly nutritional time series according to the order of meal delivery date and meal delivery time to obtain the current cumulative supply; sum the nutritional supply corresponding to the meals not executed after the current time point in the latest weekly nutritional time series according to the order of meal delivery date and meal delivery time to obtain the remaining compensable supply; trace the reverse contribution of the latest weekly nutritional time series based on the difference in weekly achievable supply between adjacent meals, and extract the target nutrients that cause the decrease in weekly achievable supply. After setting the target meal set, sum them to obtain the target meal gap contribution; calculate the target nutrient weekly standard value minus the current cumulative supply, and then minus the remaining compensable supply to obtain the gap compression numerator; calculate the remaining compensable supply plus one to obtain the gap compression denominator; calculate the ratio of the gap compression numerator to the gap compression denominator, take the exponential value, add one, and then take the natural logarithm to obtain the gap logarithmic response term; calculate the ratio of the target meal gap contribution to the target nutrient weekly standard value plus one, take the hyperbolic tangent value, and then add one to obtain the contribution amplification; calculate the product of the gap logarithmic response term and the contribution amplification to obtain the nutrient gap warning value.

[0016] Furthermore, the specific process for generating trend warning output, deficit warning output, and meal correction requests based on the nutritional deficit warning analysis results is as follows: The target nutrient compensation amount is calculated based on the difference between the weekly standard value of the target nutrient and the current cumulative supply and remaining compensable supply; the target nutrient deficit amount is calculated based on the difference between the weekly standard value of the target nutrient and the current cumulative supply; the nutritional deficit warning value and the nutritional deficit warning threshold are compared in real time. The nutritional deficit warning threshold includes a primary warning threshold and a secondary warning threshold: when the nutritional deficit warning value is less than the secondary warning threshold, no warning is output, and the latest weekly nutritional time-series chain, current cumulative supply, and remaining compensable supply are created and archived in the weekly nutritional tracking database; when the nutritional deficit warning value is greater than or equal to the secondary warning threshold, no warning is output ... When the warning threshold is less than the first-level warning threshold, a trend warning result is output. From the meals not executed after the current time point, a set of meals to be adjusted is selected based on the contribution order of the corresponding nutrient supply to the remaining compensable supply. The set of meals to be adjusted and the target nutrient compensation amount are output, and the trend warning result is written to the warning tracking record. When the nutrient deficit warning value is greater than or equal to the first-level warning threshold, a deficit warning result and the target nutrient deficit amount are output. Based on the compensation capacity of the corresponding nutrient supply to the target nutrient deficit amount, a set of correction candidate meals is extracted. A meal correction request is generated based on the correction candidate meal set and the target nutrient deficit amount, and the deficit warning result and the latest weekly nutrient time series chain are created and archived in the nutrient deficit warning database.

[0017] The second aspect of this invention provides a nutritional gap early warning system based on weekly menu time-series compensation, comprising: a data acquisition and preprocessing module for retrieving basic meal supply record data and nutritional baseline record data, and preprocessing the basic meal supply record data and nutritional baseline record data; a meal supply change triggering discrimination module for judging meal supply change triggers on the basic meal supply record data and nutritional baseline record data, and identifying target meal supply offsets and generating baseline recalculated nutritional supply amounts based on the meal supply change triggering discrimination results; a weekly nutritional sequence back-write correction module for performing sequence back-write consistency analysis based on the baseline recalculated nutritional supply amount and the weekly nutritional time-series chain, and performing meal back-write replacement, sequence coverage verification, and confirmation of the latest weekly nutritional time-series chain based on the sequence back-write consistency analysis results; and a nutritional gap early warning output module for performing nutritional gap early warning analysis based on the latest weekly nutritional time-series chain, and generating trend early warning output, gap early warning output, and meal correction requests based on the nutritional gap early warning analysis results. Attached Figure Description

[0018] Figure 1 This is a flowchart of the nutritional gap early warning method based on weekly diet time-series compensation of the present invention;

[0019] Figure 2 This is a structural diagram of the nutritional gap early warning system based on weekly diet time-series compensation of the present invention;

[0020] Figure 3 This is a line graph showing the change in the meal supply change trigger value as a function of the scene number, according to the present invention.

[0021] Figure 4 The Nightingale Rose diagram represents the trigger values ​​for meal service changes in this invention.

[0022] Figure 5 This is a flowchart of the nutritional deficit early warning classification processing and meal correction triggering process of the present invention. Detailed Implementation

[0023] To enable those skilled in the art to better understand the technical solution, the present invention will be described in detail below with reference to embodiments. The description in this part is only exemplary and explanatory, and should not be used to limit the scope of protection of the present invention in any way.

[0024] Please see Figures 1-5This invention provides a technical solution: a nutritional gap early warning method based on weekly menu time-series compensation, comprising: S1, retrieving basic meal supply record data and nutritional baseline record data, and preprocessing the basic meal supply record data and nutritional baseline record data; S2, performing meal supply change trigger discrimination on the basic meal supply record data and nutritional baseline record data, and identifying target meal supply offset and generating baseline recalculated nutritional supply based on the meal supply change trigger discrimination result; S3, performing sequence write-back consistency analysis based on the baseline recalculated nutritional supply and the weekly nutritional time-series chain, and performing meal write-back replacement, sequence coverage verification, and confirmation of the latest weekly nutritional time-series chain based on the sequence write-back consistency analysis result; S4, performing nutritional gap early warning analysis based on the latest weekly nutritional time-series chain, and generating trend early warning output, gap early warning output, and meal correction request based on the nutritional gap early warning analysis result.

[0025] Specifically, the process of retrieving basic meal service record data and nutritional baseline record data is as follows: Real-time monitoring of the weekly meal service arrangement release status and meal service execution record arrival status corresponding to the target week; upon detecting that the weekly meal service arrangement corresponding to the target week has been released and that a corresponding meal service execution record exists, retrieving the basic meal service record data, which includes: meal service date, meal service time period identifier, released dish identifier, actual served dish identifier, dish change operation timestamp, and meal service start timestamp; simultaneously retrieving the nutritional baseline record data, which includes: recipe... The names of ingredients, the amount of ingredients used in the recipe, the actual names of ingredients used, the actual weight of ingredients used, the target nutrient content of each ingredient, and the weekly standard values ​​of the target nutrients are all recorded. The names and amounts of ingredients used in the recipe are from the recipe records, the names and weights of ingredients used are from the kitchen weighing records, and the target nutrient content and weekly standard values ​​of each ingredient are from the nutrient composition comparison table and the weekly nutrition control benchmark table. The weekly standard values ​​of the target nutrients are determined by matching the weekly nutrition control benchmark table with the type of meal recipient corresponding to the target week.

[0026] This implementation plan establishes a unified access foundation for target week meal supply data and nutritional baseline data, enabling the published weekly meal supply schedule, the execution status of meal supply records, and the baseline data required for nutritional calculations to enter the subsequent processing flow under the same data caliber. By initiating data retrieval under the condition that the weekly meal supply schedule has been published and the meal supply execution record has been reached, it can be ensured that subsequent analysis has both weekly plan basis and actual execution basis, reducing the judgment bias caused by relying solely on static menus for nutritional gap warnings from the source. At the same time, this step provides a continuous and traceable data source for subsequent target meal location, meal supply change trigger judgment, nutritional supply recalculation, weekly nutritional time-series chain write-back correction, and nutritional gap warning output, thereby improving the completeness of the identification of the nutritional supply status of the target week and the reliability of the warning calculation.

[0027] Specifically, the preprocessing process for the basic meal supply record data and nutritional baseline record data is as follows: Meal date, meal time period identifier, published dish identifier, and actual served dish identifier are aligned using meal indexing to determine the target meal, ensuring that published dishes and actual served dishes under the same meal date and meal time period can correspond to the same target meal; Duplicate weighing entries are removed and abnormal weighing thresholds are eliminated through duplicate recording and cleaning of recipe ingredient quantities and actual feed weights. Duplicate weighing entry removal eliminates redundant weighing entries caused by repeated writing of the same feeding action, while abnormal weighing thresholds filter out abnormal weighing values ​​exceeding the normal feeding range; Ingredient code mapping and name merging are performed on recipe ingredient names and actual fed ingredient names. Ingredient code mapping is used to reconcile names from different record sources. Ingredient identifiers are unified into a single coding system, and name merging is used to eliminate the impact of abbreviations, aliases, and input differences on subsequent matching results. The published dish identifiers and actual served dish identifiers undergo unified coding processing to eliminate field differences caused by different input formats for the same dish or ingredient. The timestamps for dish change operations and the start timestamps for meal service are converted to a unified time format to ensure that subsequent meal change judgments and time series difference calculations use the same time caliber. A zero-mean unit variance standardization algorithm is used to standardize the basic meal service record data and nutritional benchmark record data, compressing the discrete differences in numerical scales between records of different dimensions. A maximum-minimum value normalization algorithm is used to normalize the ingredient dosage, actual feed weight, and timestamps for dish change operations and the start timestamps for meal service, ensuring that subsequent formula calculation parameters are dimensionless quantities.

[0028] This implementation plan unifies and corrects the quality of basic meal supply records and nutritional benchmark records, ensuring that the data from the publishing side, the execution side, and the nutritional calculation data are presented in a consistent manner according to the target meal. By standardizing meal attribution, weighing records, ingredient identification, dish identification, and time fields, it reduces interference from duplicate records, abnormal records, differences in field entry, and inconsistencies in time standards on subsequent judgment results, ensuring that meal supply change trigger judgments are based on comparable, calculable, and traceable data. At the same time, through standardization and normalization, data from different sources and with different dimensions can be transformed into dimensionless inputs suitable for formula calculations, improving the stability and consistency of the calculation process for meal supply change trigger values, sequence write-back consistency values, and nutritional gap warning values.

[0029] Specifically, the process for triggering meal change judgments on the basic meal supply record data and nutritional benchmark record data is as follows: The actual feed weight is summed by target meal to obtain the total actual feed weight. This summation by target meal uses a meal aggregation method based on the meal supply date and time period identifier, and all actual feed weights under the same target meal are summarized separately. The formula ingredient usage is summed by target meal to obtain the total formula weight. This summation by target meal uses the same meal aggregation caliber as the actual feed weight, and all formula ingredient usages under the same target meal are accumulated. Finally, the published dish identifier and the actual served dish identifier are compared to obtain the dish identifier. The status variable is set to 1 when consistent and 0 when inconsistent. The same-position comparison adopts a one-to-one correspondence comparison method between the dish identifiers on the publishing side and the dish identifiers on the executing side within the target meal. The ingredient set consistency quantity is obtained by performing a set precise matching of the ingredient names in the recipe and the actual ingredients in the feed. The set precise matching adopts a method of comparing the ingredient name set after the ingredient code mapping to determine the complete consistency between the ingredient set in the recipe and the actual ingredients in the feed. The difference between the meal start time stamp and the dish change operation time stamp is calculated to obtain the time difference from change to meal supply. The difference calculation adopts a time-series subtraction operation under a unified time format, and the corresponding time interval is obtained by subtracting the dish change operation time stamp from the meal start time stamp.

[0030] The ratio of the actual total weight of ingredients plus one to the total weight of the recipe plus one is calculated. The natural logarithm is then taken as the absolute value to obtain the logarithm of the weight deviation. Adding one avoids numerical instability caused by a zero or extremely small denominator. The natural logarithm maps and compresses the scale span of the weight ratio, while the absolute value is used to uniformly amplify the trigger sensitivity of positive and negative deviations. The product of the consistency state quantity of the dish identifier and the consistency quantity of the ingredient set is calculated. Subtracting one from the product yields the consistency reduction term. The product structure maintains minimal perturbation only when both the consistency state quantity of the dish identifier and the consistency quantity of the ingredient set are simultaneously true. Subtracting one from the product enhances the inhibitory effect of inconsistency states on subsequent trigger judgments. Finally, the logarithm of the weight deviation and the consistency reduction term are added together, and the inverse hyperbolic sine value is taken to obtain the structural trigger term. The composite offset term is nonlinearly compressed using an inverse hyperbolic sine function, ensuring that moderate and significant offsets remain recognizable within a unified calculation interval. The inverse exponent value of the change to the meal service time difference is calculated, and then one is added to obtain the time difference amplification term. This inverse exponent mapping provides a stronger trigger for changes occurring near the meal service time, and the addition of one ensures the time difference amplification term always maintains a positive gain. The product of the structural trigger term and the time difference amplification term is calculated to obtain the meal service change trigger value. Through product coupling, the degree of structural offset and the intensity of temporal disturbance are jointly amplified, allowing the meal service change trigger value to simultaneously reflect both content deviation and time approximation factors. All terms in the formula are based on standardized and normalized inputs, and the overall calculation result is dimensionless. The specific calculation formula is as follows:

[0031] ;

[0032] In the formula, This represents the trigger value for changes in meal supply, used to characterize the intensity of the triggering of a supply offset between the issuing and executing sides for the current target meal. This indicates the total actual weight of ingredients fed, used to characterize the actual amount of ingredients fed to the current target meal on the execution side; This indicates the total weight of the recipe, used to characterize the scale of ingredients added to the recipe for the current target meal on the publishing side; This represents the consistency status of dish identifiers, used to characterize the matching status of the current target meal at the dish identifier level; This indicates the consistency of the ingredient set, used to characterize the matching status of the current target meal at the ingredient composition level; This indicates the time difference between the change in menu items and the start of meal service.

[0033] In this embodiment, Table 1 is a data table of meal supply change trigger values, which records in detail the actual total weight of ingredients, total weight of recipe, consistency of ingredients, time difference from change to meal supply, and the final calculated meal supply change trigger value under different meal supply change scenarios. It is used to quantify the intensity of supply deviation caused by temporary change of ingredients, substitution of raw materials, or adjustment of weight during the actual meal supply process. Specifically: For scenarios where the total actual ingredient weight is 0.50 and the total recipe weight is 0.50, the consistency of ingredients is 1, the time difference from change to serving is 0.80, and the trigger value for the serving change is 0.000; for scenarios where the weight deviates slightly by 10% but remains the same, the total actual ingredient weight is 0.55 and the total recipe weight is 0.50, the consistency of ingredients is 1, the time difference from change to serving is 0.50, and the trigger value for the serving change is 0.053; for scenarios where the weight deviates significantly by 60% but remains the same, the total actual ingredient weight is 0.80 and the total recipe weight is 0.50, the consistency of ingredients is 1, the time difference from change to serving is 0.50, and the trigger value for the serving change is 0.291. When the scene changes and the ingredients are the same weight, the actual total weight of the ingredients is 0.50, the total weight of the recipe is 0.50, the consistency of ingredients is 0, the time difference to the meal service is 0.50, and the meal service change trigger value is 1.416. When the scene changes and the ingredient weight is the same weight with a very small time difference, the actual total weight of the ingredients is 0.50, the total weight of the recipe is 0.50, the consistency of ingredients is 0, the time difference to the meal service is 0.05, and the meal service change trigger value is 1.721. When the scene changes severely and the ingredients are heavier and the meal service is nearing completion, the actual total weight of the ingredients is 0.90, the total weight of the recipe is 0.40, the consistency of ingredients is 0, the time difference to the meal service is 0.05, and the meal service change trigger value is 2.220.

[0034] Table 1. Data Table of Trigger Values ​​for Changes in Catering Services

[0035]

[0036] like Figure 3 The chart shows the change in the meal supply change trigger value as a function of the scenario number. Combined with Table 1, it can be seen that the meal supply change trigger value exhibits a clear step-like upward trend under different change scenarios. Specifically, in Scenario 1, the trigger value for a completely consistent, early change is 0.000, indicating no effective supply deviation and no need to trigger recalculation. In Scenario 2, a slight weight deviation trigger value rises to 0.053, and in Scenario 3, a larger weight deviation further increases to 0.291, showing that pure weight deviation has a limited contribution to the trigger value. In Scenario 4, changing dishes with the same ingredients but the same weight causes the trigger value to jump to 1.416, indicating that inconsistent dish labeling has a significant impact on the trigger value. In Scenario 5, changing ingredients and the change occurring close to meal supply trigger value results in a trigger value of 1.721, higher than Scenario 4, reflecting the time difference amplification effect. In Scenario 6, where ingredients are changed simultaneously, there is a significant weight deviation, and the change occurs close to meal supply, reaching a maximum trigger value of 2.220, reflecting the extreme situation of multiple changes occurring simultaneously. Overall, the meal supply change trigger value line chart visually demonstrates the non-linear growth characteristics of the trigger value from no change to severe change, and can serve as a dynamic basis for determining whether to initiate a nutritional supply recalculation.

[0037] like Figure 4 The Nightingale Rose diagram illustrates the trigger values ​​for meal service changes. It uses polar coordinate bar sectors to display the trigger values ​​for each scenario. The sector radius represents the magnitude of the trigger value, and the sector color depth indicates the time lag between the change and the meal service. Darker colors indicate a smaller time lag and greater urgency. Green dots on the outer edge of the sectors mark the consistency of the ingredients; dots indicate consistency, and no dots indicate inconsistency. Table 1 shows that scenarios 1 to 3 all have consistent ingredients and a less urgent time lag between the change and the meal service, resulting in lower trigger values ​​and shorter sector radii. Scenarios 4 to 6 all have inconsistent ingredients, significantly increased trigger values, and longer sector radii. Scenarios 5 and 6 have a time lag of only 0.05 between the change and the meal service, resulting in the darkest sector color. Scenario 6 also exhibits a significant weight deviation, reaching its maximum radius. The Nightingale Rose diagram comprehensively reflects the combined influence of three factors—ingredient consistency, weight deviation, and timing of the change—on the trigger value for meal service changes, providing an intuitive visualization tool for quickly identifying high-risk meal service changes.

[0038] In this implementation plan, the supply status on the publishing side and the supply status on the execution side of the target meal are transformed into quantifiable triggers for meal changes. This allows deviations in the amount of ingredients added, substitutions of dishes, changes in the composition of ingredients, and temporal disturbances during the actual meal supply process to be uniformly incorporated into the calculation of the meal change trigger value. By jointly expressing the degree of content deviation and the intensity of temporal disturbances, it is possible to identify execution-side supply changes that are difficult to detect in a timely manner by relying solely on static weekly meal arrangements. This prevents the target meal from continuing to use the original nutritional supply of dishes even when a substantial supply deviation has occurred. At the same time, this step provides a clear criterion for whether to initiate the calculation of the baseline nutritional supply, ensuring that the generation of subsequent meal write-back records, weekly nutritional time-series chain correction, and nutritional gap early warning output are based on the actual meal supply execution status, thereby improving the consistency between the nutritional compensation baseline and the actual meal supply results.

[0039] Specifically, the process of identifying the target meal supply deviation and generating the baseline recalculated nutritional supply based on the meal supply change trigger judgment result is as follows: Real-time comparison of the meal supply change trigger value and the meal supply change trigger threshold:

[0040] When the meal change trigger value is less than the meal change trigger threshold, it is determined that the current target meal has not formed a supply offset that needs to be recalculated. This indicates that the current target meal has not experienced any effective disturbances sufficient to change the supply result of the target nutrients at the level of dish identification, ingredient composition, and ingredient weight. The nutritional supply corresponding to the target meal remains unchanged. The nutritional supply corresponding to the target meal is initially the nutritional supply of the published dish. The nutritional supply of the published dish is obtained by matching the ingredient name with the target nutrient content of each ingredient, combining the ingredient usage for nutritional conversion, and accumulating all the ingredients of the published dish corresponding to the target meal. This is to maintain the basic supply position of the current target meal in the weekly nutritional time series without shifting, and to include the nutritional supply in the current weekly nutritional time series. The weekly nutritional time series is a weekly nutritional supply sequence formed by arranging the nutritional supply of each target meal in the order of meal delivery date and meal delivery time.

[0041] When the meal supply change trigger value is greater than or equal to the meal supply change trigger threshold, it is determined that the current target meal has formed a supply deviation that needs to be recalculated. This indicates that the current target meal has experienced an execution-side deviation that can substantially affect the intensity of target nutrient supply during the actual meal supply process. By matching the actual ingredient names with the nutritional components of the ingredients, the target nutrient content per unit weight of each actual ingredient is extracted. Then, the nutritional value is converted in combination with the actual ingredient weight. The baseline recalculated nutrient supply of the target meal is obtained by using a sub-item cumulative calculation method based on the target meal. This allows the recalculation result to directly represent the effective supply level of target nutrients of the current target meal under actual feeding conditions. The corresponding meal write-back record is generated as a direct input for subsequent weekly nutrient time-series chain node replacement and write-back consistency verification, and then enters the sequence write-back consistency analysis.

[0042] This implementation plan establishes a discrimination mechanism between the meal supply change trigger value and the meal supply change trigger threshold. This allows the target meal to choose to maintain the original nutritional supply or initiate a baseline recalculation of the nutritional supply based on the actual degree of meal supply deviation. This avoids redundant processing caused by indiscriminate recalculation for all meals and also prevents meals that have already experienced execution-side supply deviation from continuing to use the published nutritional supply of dishes. When the meal supply change trigger value does not reach the meal supply change trigger threshold, the continuity and stability of the weekly nutritional time series chain can be maintained. When the meal supply change trigger value reaches the meal supply change trigger threshold, the effective supply level of target nutrients formed under actual feeding conditions can be converted into a meal write-back record. This provides an execution-state correction basis for subsequent weekly nutritional time series chain node replacement, sequence write-back consistency analysis, and nutritional gap early warning output, thereby improving the matching degree between the nutritional gap early warning results and the actual meal supply results.

[0043] Specifically, the process of sequence write-back consistency analysis based on the benchmark recalculated nutrient supply and the weekly nutrient time-series chain is as follows: Obtain the benchmark recalculated nutrient supply; write the meal write-back record into the weekly nutrient time-series chain; locate the target meal node in the weekly nutrient time-series chain based on the meal date and meal time period identifier; use a sequential index mapping method based on the meal date and meal time period identifier to align the meal write-back record with the node positions in the weekly nutrient time-series chain one-to-one; replace the nutrient supply corresponding to the target meal node with the benchmark recalculated nutrient supply in the meal write-back record; and use the replaced nutrient supply as the target meal nutrient supply after write-back. A node-level overwrite algorithm ensures that only one effective supply value is retained for the same target meal, thus ensuring consistency between the weekly and weekly nutrient supply values. The nutrition time series maintains a single-value continuous expression in chronological order. The number of nodes that have been written back to the meal write-back record in the current week's nutrition time series is counted. During the counting process, a node write-marking statistical method is used to confirm each target meal node that has completed write-back replacement, thus characterizing the actual write-back coverage of the current week's nutrition time series. Based on the meal service date and meal service time identifier, the number of nodes requiring write-back correction between the target meal and the last meal of the week is counted. During the counting process, a time-series node scanning method is used to determine the range of all nodes to be corrected from the target meal to the end of the target week, serving as the coverage base for subsequent sequence write-back consistency value calculations.

[0044] The ratio of the target meal nutrient supply plus one after write-back to the baseline recalculated nutrient supply plus one is calculated. The natural logarithm is taken, followed by the absolute value, and then the inverse exponent is taken to obtain the supply fit term. Adding one prevents ratio instability when the target meal nutrient supply or the baseline recalculated nutrient supply is near zero after write-back. The natural logarithm mapping compresses the scale difference between the two ratios. The absolute value processing unifies the expression direction of positive and negative deviations. The inverse exponent enhances the fit response when the write-back result is close to the baseline recalculated result. The product of the number of write-back nodes plus one and the number of nodes to be write-back plus one is calculated, the square root is taken, and then multiplied by two to obtain the write-back coverage numerator. Adding one ensures that the number of nodes can still participate in stable calculations under boundary conditions. The square root operation suppresses the coverage bias caused by rapid node growth. Multiplying by two maintains the subsequent coverage ratio at a symmetrical pressure. The structure is compressed; the sum of the number of nodes already written back, the number of nodes to be written back, and constant 2 is calculated to obtain the write-back coverage denominator. A normalized denominator is constructed by summing constant 2 with the two node counts, so that a restricted ratio range is formed between the write-back coverage numerator and the write-back coverage denominator; the ratio of the write-back coverage numerator to the write-back coverage denominator is calculated to obtain the write-back coverage term, which is used to characterize the coverage degree of nodes that have completed write-back correction in the current weekly nutrition time series chain; the product of the supply fit term and the write-back coverage term is calculated to obtain the sequence write-back consistency value. The supply fit degree of a single target meal and the write-back coverage degree of the overall weekly nutrition time series chain are jointly constrained through product coupling, so that the sequence write-back consistency value simultaneously characterizes the local supply replacement accuracy and the overall sequence correction integrity. Moreover, all terms of the formula are based on the standardized and normalized input, and the overall calculation result is a dimensionless quantity. The specific calculation formula is as follows:

[0045] ;

[0046] In the formula, The sequence write-back consistency value represents the overall consistency of the current week's nutritional timeline after meal write-back correction. This represents the nutritional supply of the target meal after write-back, used to characterize the nutritional supply level of the target meal node after write-back replacement. This represents the baseline recalculated nutrient supply, used to characterize the nutrient supply baseline obtained by recalculating the target meal under actual feeding conditions. This indicates the number of nodes that have been written back, and is used to characterize the scale of nodes that have completed write-back correction in the current week's nutrient time-series chain; This indicates the number of nodes that should be written back, representing the scale of nodes that need to be corrected for write-back between the target meal and the last meal of the week.

[0047] In this implementation plan, the baseline recalculated nutrient supply is accurately written back to the corresponding target meal node in the weekly nutrient time series chain. This allows the nutrient supply correction results caused by actual meal supply changes to replace the original published supply results, avoiding the problem of multiple effective supply values ​​or mismatched node correction positions in the weekly nutrient time series chain. By quantifying the degree of fit between the target meal nutrient supply after writing back and the baseline recalculated nutrient supply, and constraining the write-back coverage by combining the number of written-back nodes and the number of nodes that should be written back, a sequence write-back consistency value can be formed to determine whether the weekly nutrient time series chain has completed the necessary correction update. This step transforms the weekly nutrient time series chain from a static published sequence into a dynamic correction sequence that can accommodate changes in the execution state, providing a consistent, complete, and traceable supply baseline for subsequent nutrient gap early warning analysis.

[0048] Specifically, the process of replacing meal rewrites, verifying sequence coverage, and confirming the latest weekly nutritional timeline based on the sequence rewrite consistency analysis results is as follows: Real-time comparison of sequence rewrite consistency values ​​and sequence rewrite consistency thresholds:

[0049] When the sequence write-back consistency value is less than the sequence write-back consistency threshold, it indicates that the write-back coverage of the target meal in the current weekly nutrition time series chain, or the consistency between the target meal's nutrient supply after write-back and the baseline recalculated nutrient supply, has not yet met the requirements for issuing an early warning. The formal issuance of the early warning result corresponding to the current target nutrient is suspended, and the version writing and nutrient supply replacement of incomplete nodes continue to be executed to eliminate correction breakpoints in the time series transmission of related nodes after the target meal, generating a sequence record to be verified. Once the recalculated sequence write-back consistency value is greater than or equal to the sequence write-back consistency threshold, the current weekly nutrition time series chain after write-back correction is determined as the latest weekly nutrition time series chain to ensure that subsequent gap identification is based on the corrected unified nutrient supply sequence. The latest weekly nutrition time series chain is then sent to the nutrient gap early warning analysis.

[0050] When the sequence write-back consistency value is greater than or equal to the sequence write-back consistency threshold, it indicates that the current weekly nutrition time series chain has met the subsequent early warning calculation conditions in terms of both node write-back coverage and target meal supply value correction. This confirms that the current weekly nutrition time series chain is the latest weekly nutrition time series chain and enters the nutrition gap early warning analysis.

[0051] This implementation plan ensures consistency of the weekly nutrition time-series chain write-back correction results before publication, guaranteeing that nutrition gap early warning analysis can only continue after the write-back coverage and nutrition supply replacement results meet the requirements. This avoids outputting early warning results based on weekly nutrition time-series chains with incomplete corrections, node breakpoints, or inconsistent supply values. When the sequence write-back consistency value does not reach the sequence write-back consistency threshold, the plan can pause early warning publication, continue version updates, and replace nutrition supply values ​​to ensure that the temporal transmission relationship of relevant nodes after the target meal is fully corrected. When the sequence write-back consistency value reaches the sequence write-back consistency threshold, the current weekly nutrition time-series chain can be confirmed as the latest weekly nutrition time-series chain, providing a unified, complete, and reliable weekly supply baseline for subsequent nutrition gap early warning analysis, thereby improving the accuracy and traceability of early warning results.

[0052] Specifically, the process of nutritional gap early warning analysis based on the latest weekly nutritional time series is as follows: First, obtain the weekly standard value of the target nutrient. Second, sum the nutritional supply for meals executed before the current time point in the latest weekly nutritional time series according to the order of meal delivery date and meal delivery time to obtain the current cumulative supply, using the current analysis time corresponding to the meal delivery start timestamp as the basis for dividing the current time point. Third, aggregate the nutritional supply for all meals executed before the current analysis time using a sequential summation method prioritizing meal delivery date and then meal delivery time. Finally, sum the nutritional supply for meals not executed after the current time point in the latest weekly nutritional time series according to the order of meal delivery date and meal delivery time to obtain the remaining compensable supply. The summation process uses the same time series expansion method as the current cumulative supply, sequentially summarizing the nutritional supply for all meals not executed after the current analysis time. The latest weekly nutrition time-series chain is used to trace the reverse contribution based on the difference in weekly available supply between adjacent meals. After extracting the set of target meals that caused the decrease in weekly available supply, the contribution of the target meal gap is summed. The reverse differential contribution tracing adopts a differential comparison method that traces back meal by meal from the end of the target week to identify the contribution of each target meal to the change in weekly available supply, and accumulates the contribution values ​​corresponding to the target meal set. Here, the weekly available supply is the sum of the current cumulative supply and the nutritional supply corresponding to the meals not executed after the current analysis time. The reverse contribution tracing starts from the last meal of the target week and follows the supply... Target meals are selected one by one in reverse order of meal date and meal time. The weekly achievable supply before deducting the nutritional supply corresponding to the currently selected target meal is taken as the achievable supply of the previous week. The weekly achievable supply after deducting the nutritional supply corresponding to the currently selected target meal is taken as the achievable supply of the next week. The difference between the achievable supply of the previous week and the achievable supply of the next week is calculated. When the difference is greater than zero and the achievable supply of the next week is less than the weekly standard value of the target nutrient, the currently selected target meal is determined to be a target meal that causes a decrease in the weekly achievable supply and affects the weekly target status. The currently selected target meal is then included in the target meal set.

[0053] The gap-shrinking numerator is obtained by subtracting the current cumulative supply from the target nutrient weekly standard value, and then subtracting the remaining compensable supply. By simultaneously introducing the current cumulative supply and the remaining compensable supply, the gap-shrinking numerator can uniformly represent the degree of remaining deviation between the weekly target and the current achievable supply level. The remaining compensable supply is calculated and then incremented by one to obtain the gap-shrinking denominator. This increment prevents instability of the denominator when the remaining compensable supply is near zero or a minimum, and maintains the continuity of subsequent ratio calculations. The ratio of the gap-shrinking numerator to the gap-shrinking denominator is calculated, the exponent is taken, then incremented by one, and finally the natural logarithm is taken to obtain the gap logarithmic response term. This ratio structure enhances the sensitive expression of the target deviation relative to the remaining compensation space; the exponent amplifies the numerical difference under critical gap conditions; and the combination of incrementing by one and the natural logarithm compresses extreme growth rates, ensuring that the gap logarithmic response term maintains distinguishable changes within the stable range. The ratio of the target meal deficit contribution to the target nutrient weekly standard value plus one is calculated. The hyperbolic tangent value is then added again to obtain the contribution amplification. This ratio characterizes the influence of key meals on the weekly deficit formation. Hyperbolic tangent mapping suppresses the unilateral dominance of excessively large contribution values ​​on the overall warning result, and the addition ensures the contribution amplification always maintains a positive gain. The product of the deficit logarithmic response term and the contribution amplification is calculated to obtain the nutrient deficit warning value. A product coupling method is used to jointly quantify the overall deficit state and the contribution degree of key meals, allowing the nutrient deficit warning value to simultaneously reflect the degree of weekly supply insufficiency and the intensity of structural deficit formation. All terms in the formula are based on standardized and normalized inputs, and the overall calculation result is dimensionless. The specific calculation formula is as follows:

[0054] ;

[0055] In the formula, This represents the nutritional deficit warning value, used to characterize the overall deficit risk level of the target nutrient in the current target week; This represents the weekly standard value of the target nutrient, used to characterize the weekly control benchmark that the target nutrient should achieve within the target week; This represents the current cumulative supply, used to characterize the cumulative level of nutrient supply formed by the meals executed before the current analysis time. This represents the remaining compensable supply, used to characterize the nutritional compensation space that can still be provided after the current analysis time if no meal is served. This represents the contribution of the target meal gap, used to characterize the cumulative contribution of the target meal set to the decrease in weekly available supply.

[0056] In this implementation plan, the latest weekly nutrient time-series chain forms the basis for quantifying the gap of target nutrients within the target week. This allows the actual cumulative supply from executed meals, the compensation space still available in unexecuted meals, and the contribution of key meals that cause a decrease in weekly achievable supply to be uniformly incorporated into the calculation process of the nutrient gap warning value. By jointly expressing the weekly control target, current supply progress, subsequent compensation capacity, and structural gap sources, the problem of early or delayed warnings caused by judging the gap status solely based on the current cumulative supply can be avoided. At the same time, this step can identify whether the target nutrient gap can still be compensated by subsequent meals and clarify the set of target meals that have a major impact on the gap formation process. This provides a quantitative basis for subsequent trend warnings, gap warnings, selection of meal sets to be adjusted, and generation of meal correction requests, improving the pertinence and executability of nutrient gap warning output.

[0057] Specifically, the process of generating trend warning output, deficit warning output, and meal correction request based on the nutritional deficit warning analysis results is as follows: The target nutrient compensation amount is calculated based on the difference between the weekly standard value of the target nutrient and the current cumulative supply and the remaining compensable supply. The target nutrient compensation amount is used to characterize the amount of target nutrient that still needs to be supplemented through subsequent unexecuted meals after the current analysis time. The target nutrient deficit amount is calculated based on the difference between the weekly standard value of the target nutrient and the current cumulative supply. The target nutrient deficit amount is used to characterize the degree of direct insufficiency of the target nutrient relative to the weekly control target at the current analysis time.

[0058] like Figure 5 The diagram shows the tiered processing and meal correction triggering flowchart for nutrient deficit early warning. It compares the nutrient deficit early warning value and the nutrient deficit early warning threshold in real time. The nutrient deficit early warning threshold includes a primary warning threshold and a secondary warning threshold.

[0059] When the nutritional deficit warning value is less than the secondary warning threshold, it is determined that the current target nutrient is still attainable in the weekly meal supply sequence. This indicates that according to the weekly supply path corresponding to the current cumulative supply and the remaining compensable supply, the target nutrient still has the potential to reach the weekly standard value. No warning is issued, and the latest weekly nutritional time series chain, the current cumulative supply, and the remaining compensable supply are created and archived in the weekly nutritional tracking database. By synchronously archiving the weekly nutritional time series chain and the corresponding supply results, a unified comparison benchmark is provided for the continuous tracking and analysis of the same target week.

[0060] When the nutrient deficit warning value is greater than or equal to the secondary warning threshold but less than the primary warning threshold, a trend warning result is output. This indicates that although a clear deficit of the target nutrient has not yet formed, its subsequent compensation space has entered a warning range that requires attention. Among the meals not yet served after the current time point, a set of meals to be adjusted is selected based on the contribution order of the nutrient supply corresponding to each meal to the remaining compensable supply. The contribution order is ranked according to the degree of supplementation of the remaining compensable supply by the nutrient supply corresponding to each unserved meal, to determine the priority adjustment targets. The set of meals to be adjusted and the compensation amount of the target nutrient are output, and the trend warning result is written to the warning tracking record. By retaining the trend warning result and the corresponding changes in the warning status at each time point, a continuous warning evolution trajectory of the target nutrient within the target week can be formed.

[0061] When the nutrient deficit warning value is greater than or equal to the first-level warning threshold, the deficit warning result and the target nutrient deficit amount are output; this indicates that the current target nutrient has entered a deficit state requiring meal correction. Based on the compensation capacity of the nutrient supply corresponding to each meal for the target nutrient deficit, a set of candidate meals for correction is extracted; the compensation capacity is determined by comparing the coverage of the target nutrient deficit by the nutrient supply corresponding to each unexecuted meal, thus screening out meals with actual correction value. Meal correction requests are generated based on the set of candidate meals for correction and the target nutrient deficit amount, ensuring that the meal correction request simultaneously includes the scope of the correction object and the corresponding compensation target. The deficit warning result and the latest weekly nutrient time series chain are created and archived in the nutrient deficit warning database. By associating and archiving the deficit warning result and its corresponding latest weekly nutrient time series chain, a basis can be provided for subsequent verification of correction execution results and tracing of the deficit formation process.

[0062] This implementation plan establishes a tiered handling mechanism corresponding to nutrient deficit warning values, enabling the supply status of target nutrients within a target week to be differentiated into attainable, trend warning, and deficit warning states. In the attainable state, the latest weekly nutrient timeline and supply results are retained, forming a unified comparison benchmark for subsequent continuous tracking. In the trend warning state, the set of meals to be adjusted and the compensation amount of the target nutrient are output in advance, providing a basis for adjustments to subsequent unexecuted meals. In the deficit warning state, the set of candidate meals for correction, the deficit amount of the target nutrient, and meal correction requests are output, allowing the deficit warning results to directly correspond to executable meal correction objects and compensation targets, thereby improving the tiered identification capability, adjustment direction, and result traceability of nutrient deficit warnings.

[0063] like Figure 2As shown, the second aspect of the present invention provides a nutritional gap early warning system based on weekly menu time-series compensation, comprising: a data acquisition and preprocessing module, used to retrieve basic meal supply record data and nutritional baseline record data, preprocess the basic meal supply record data and nutritional baseline record data to form a unified data foundation for the meal supply execution status and nutritional calculation basis within the target week, providing comparable and calculable data input for subsequent meal supply change triggering judgment; and a meal supply change triggering judgment module, used to perform meal supply change triggering judgment on the basic meal supply record data and nutritional baseline record data, identify the target meal supply offset and generate the baseline recalculated nutritional supply amount based on the meal supply change triggering judgment result, identify the supply offset status of the target meal between the issuing side and the executing side, and generate the baseline recalculated nutritional supply amount when the recalculation condition is met. The system includes: a benchmark recalculated nutrient supply that reflects the actual feeding results; a weekly nutrient sequence write-back correction module, used to perform sequence write-back consistency analysis based on the benchmark recalculated nutrient supply and the weekly nutrient time series chain; a meal write-back replacement, sequence coverage verification, and confirmation of the latest weekly nutrient time series chain based on the sequence write-back consistency analysis results; writing the execution state correction results into the corresponding target meal node; and confirming the write-back integrity and supply consistency of the weekly nutrient time series chain; and a nutrient gap early warning output module, used to perform nutrient gap early warning analysis based on the latest weekly nutrient time series chain; generating trend early warning output, gap early warning output, and meal correction requests based on the nutrient gap early warning analysis results; outputting graded early warning results based on the weekly supply status of the target nutrient; and forming corresponding meal adjustment objects and compensation basis.

[0064] This implementation plan constructs a complete processing chain from meal data access, execution-side change identification, dynamic correction of weekly nutrition time-series chains, to nutrient gap classification and early warning. This enables the nutrient supply status within the target week to be updated synchronously with changes in actual meal execution. By triggering meal changes and generating baseline recalculation of nutrient supply, it avoids using the published nutrient supply results after temporary changes in dishes, substitute ingredients, or changes in feed. Through weekly nutrient sequence back-writing correction, it ensures that the latest weekly nutrient time-series chain is consistent with the actual feed results. Through nutrient gap early warning output, it can generate corresponding early warning results, meal adjustment targets, and compensation basis based on the availability status, trend risk, and gap status of target nutrients, thereby improving the accuracy, timeliness, and traceability of nutrient gap early warning.

[0065] It should be noted that, in this document, the terms "comprising," "including," and any other variations are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Specific examples have been used in this document to illustrate the principles and implementation methods of the present invention. These examples are merely for the purpose of helping to understand the method and core ideas of the present invention. The above descriptions are only preferred embodiments of the present invention. It should be pointed out that, due to the limitations of written expression and the objective existence of infinite specific structures, those skilled in the art can make several improvements, modifications, or variations without departing from the principles of the present invention, and can also combine the above technical features in an appropriate manner. These improvements, modifications, variations, or combinations, or the direct application of the concept and technical solution of the present invention to other situations without modification, should all be considered within the scope of protection of the present invention.

Claims

1. A method for nutritional gap alerting based on meal profile timing compensation, characterized in that, Includes the following steps: S1, retrieve the basic meal supply record data and nutritional baseline record data, and preprocess the basic meal supply record data and nutritional baseline record data; S2, perform meal change trigger judgment on the basic meal supply record data and nutritional benchmark record data, and generate target meal supply deviation identification and benchmark recalculation nutritional supply based on the meal change trigger judgment result; S3, based on the baseline recalculation of nutrient supply and weekly nutrient time series chain, perform sequence write-back consistency analysis, and perform meal write-back replacement, sequence coverage verification and confirmation of the latest weekly nutrient time series chain according to the sequence write-back consistency analysis results; S4 performs nutritional deficit early warning analysis based on the latest weekly nutritional time series chain, and generates trend early warning output, deficit early warning output and meal correction request based on the nutritional deficit early warning analysis results.

2. The nutritional gap early warning method based on weekly diet time-series compensation according to claim 1, characterized in that: The specific process for retrieving the basic meal supply record data and nutritional baseline record data is as follows: The system monitors the release status of the weekly meal service schedule and the arrival status of the meal service execution record for the target week in real time. When it detects that the weekly meal service schedule for the target week has been released and there is a corresponding meal service execution record, it retrieves the basic meal service record data, which includes: meal service date, meal service time period identifier, released dish identifier, actual meal service dish identifier, dish change operation timestamp, and meal service start timestamp. Simultaneously, it retrieves the nutritional baseline record data, which includes: recipe ingredient name, recipe ingredient quantity, actual ingredient name, actual ingredient weight, target nutrient content of each ingredient, and weekly standard value of the target nutrient.

3. The nutritional gap early warning method based on weekly diet time-series compensation according to claim 1, characterized in that: The specific process for preprocessing the basic meal supply record data and nutritional baseline record data is as follows: The meal date, meal time period identifier, published dish identifier, and actual meal dish identifier are aligned with the meal index to determine the target meal; duplicate weighing entries are removed and abnormal weighing thresholds are eliminated by deduplication and abnormal weighing records are cleaned for the recipe ingredient usage and actual feed weight. Perform ingredient coding mapping and name merging on the names of ingredients in the recipe and the names of ingredients actually used; The food labeling system should be standardized for both the published food labels and the actual food labels served. Perform unified time format conversion on the timestamps for menu change operations and the timestamps for the start of meal service; The basic meal supply record data and nutritional baseline record data were standardized using the zero-mean unit variance standardization algorithm. The maximum and minimum value normalization algorithm is used to normalize the ingredient usage, actual ingredient weight, timestamp of dish change operation, and timestamp of meal start.

4. The nutritional gap early warning method based on weekly diet time-series compensation according to claim 1, characterized in that: The specific process for triggering meal supply change judgment based on basic meal supply record data and nutritional benchmark record data is as follows: The actual ingredient weights are summed for each target meal to obtain the total actual ingredient weight; the recipe ingredient quantities are summed for each target meal to obtain the total recipe weight; the published dish identifiers and the actual served dish identifiers are compared to obtain a dish identifier consistency status quantity, which is 1 when they match and 0 when they do not; the recipe ingredient names and the actual ingredient names are precisely matched to obtain an ingredient set consistency quantity; the difference between the meal start time stamp and the dish change operation time stamp is calculated to obtain the change to meal service time difference. Calculate the ratio of the actual total weight of ingredients plus one to the total weight of the recipe plus one, take the natural logarithm and then take the absolute value to obtain the weight deviation logarithm term; calculate the product of the consistency status of the dish label and the consistency status of the ingredient set, and subtract the product result from one to obtain the consistency reduction term; The structural trigger term is obtained by adding the logarithmic weight deviation term and the consistency reduction term and taking the inverse hyperbolic sine value. The negative exponent of the change to the meal service time difference is calculated and then one is added to obtain the time difference amplification term. The product of the structural trigger term and the time difference amplification term is calculated to obtain the meal service change trigger value.

5. The nutritional gap early warning method based on weekly diet time-series compensation according to claim 1, characterized in that: The specific process for identifying the target meal supply offset and generating the baseline recalculated nutritional supply based on the meal supply change trigger judgment result is as follows: Real-time comparison of meal service change trigger values ​​and meal service change trigger thresholds: When the catering change trigger value is less than the catering change trigger threshold, it is determined that the current target meal has not formed a supply offset that needs to be recalculated. The nutritional supply corresponding to the target meal remains unchanged. The nutritional supply corresponding to the target meal is initially the nutritional supply of the published dish. The nutritional supply of the published dish is obtained by matching the recipe ingredient name with the target nutrient content of each ingredient item by item, combining the recipe ingredient usage for nutritional conversion, and accumulating all the recipe ingredients of the published dish corresponding to the target meal. The nutritional supply is then included in the current weekly nutritional time sequence chain. The weekly nutritional time sequence chain is a weekly nutritional supply sequence formed by arranging the nutritional supply corresponding to each target meal in the order of catering date and catering time. When the meal supply change trigger value is greater than or equal to the meal supply change trigger threshold, it is determined that the current target meal has formed a supply offset that needs to be recalculated. The actual ingredient names are matched with the nutritional components of the ingredients one by one, the target nutrient content per unit weight of each actual ingredient is extracted, and then the nutritional conversion is performed in combination with the actual ingredient weight. The baseline recalculated nutritional supply of the target meal is obtained by using a sub-item cumulative calculation method that is aggregated by target meal. The corresponding meal write-back record is generated and enters the sequence write-back consistency analysis.

6. The nutritional gap early warning method based on weekly diet time-series compensation according to claim 1, characterized in that: The specific process of performing sequence write-back consistency analysis based on benchmark recalculation of nutrient supply and weekly nutrient time-series chain is as follows: Obtain the baseline recalculated nutrient supply; write the meal write-back record into the weekly nutrient time series chain; locate the target meal node in the weekly nutrient time series chain according to the meal supply date and meal supply time period identifier; replace the nutrient supply corresponding to the target meal node with the baseline recalculated nutrient supply in the meal write-back record; and use the replaced nutrient supply as the nutrient supply of the target meal after write-back. The number of nodes that have been written back to the meal write-back record in the current week's nutrition time-series chain is counted to obtain the number of nodes that have been written back; based on the meal service date and meal service time period identifier, the number of nodes that need to be written back to the target meal and the last meal of the week is counted to obtain the number of nodes that should be written back. Calculate the ratio of the target meal nutrient supply plus one after write-back to the baseline recalculated nutrient supply plus one, take the natural logarithm, take the absolute value, and then take the inverse exponent value to obtain the supply matching term; calculate the product of the number of write-back nodes plus one and the number of nodes to be write-back plus one, take the square root, and multiply by two to obtain the write-back coverage numerator; calculate the sum of the number of write-back nodes, the number of nodes to be write-back, and the constant two to obtain the write-back coverage denominator; calculate the ratio of the write-back coverage numerator to the write-back coverage denominator to obtain the write-back coverage term; calculate the product of the supply matching term and the write-back coverage term to obtain the sequence write-back consistency value.

7. The nutritional gap early warning method based on weekly diet time-series compensation according to claim 1, characterized in that: The specific process of performing meal write-back replacement, sequence coverage verification, and confirmation of the latest weekly nutritional time series based on the sequence write-back consistency analysis results is as follows: Real-time comparison of sequence write-back consistency value and sequence write-back consistency threshold: When the sequence write-back consistency value is less than the sequence write-back consistency threshold, the official release of the warning result corresponding to the current target nutrient is paused, and the version writing of the incomplete node and the replacement of the nutrient supply continue to be executed, generating a sequence record to be verified. Once the recalculated sequence write-back consistency value is greater than or equal to the sequence write-back consistency threshold, the current weekly nutrient time series chain after the write-back correction is completed will be determined as the latest weekly nutrient time series chain, and then the latest weekly nutrient time series chain will be sent to the nutrient gap early warning analysis. When the sequence write-back consistency value is greater than or equal to the sequence write-back consistency threshold, the current weekly nutrient time series chain is confirmed as the latest weekly nutrient time series chain, and the nutrient gap early warning analysis is initiated.

8. The nutritional gap early warning method based on weekly diet time-series compensation according to claim 1, characterized in that: The specific process of performing nutrient deficit early warning analysis based on the latest weekly nutrient time series is as follows: Obtain the weekly standard values ​​for target nutrients; The current cumulative supply amount is obtained by summing the nutritional supply amounts corresponding to the meals executed before the current time point in the latest weekly nutritional time sequence according to the order of meal delivery date and meal delivery time. The remaining compensable supply amount is obtained by summing the nutritional supply amount corresponding to the meals that have not been served after the current time point in the latest weekly nutritional time sequence according to the order of meal date and meal time. The latest weekly nutrition time series is traced back in reverse order based on the difference in weekly available supply between adjacent meals. After extracting the set of target meals that caused the decrease in weekly available supply, the gap contribution of the target meals is summed to obtain the gap contribution of the target meals. The gap compression numerator is obtained by subtracting the current cumulative supply from the target nutrient weekly standard value, and then subtracting the remaining compensable supply. Calculate the remaining compensable supply plus one to obtain the denominator for the gap reduction; Calculate the ratio of the numerator to the denominator of the gap compression, take the exponential value, add one, and then take the natural logarithm to obtain the logarithmic response term of the gap; calculate the ratio of the target meal gap contribution to the target weekly standard value of nutrients plus one, take the hyperbolic tangent value, and then add one to obtain the contribution amplification; calculate the product of the logarithmic response term of the gap and the contribution amplification to obtain the nutrient gap warning value.

9. The nutritional gap early warning method based on weekly diet time-series compensation according to claim 1, characterized in that: The specific process for generating trend warning output, deficit warning output, and meal correction request based on the nutritional deficit warning analysis results is as follows: The target nutrient compensation amount is calculated based on the difference between the weekly standard value of the target nutrient and the current cumulative supply and the remaining compensable supply; the target nutrient deficit is calculated based on the difference between the weekly standard value of the target nutrient and the current cumulative supply. Real-time comparison of nutrient deficit warning values ​​and nutrient deficit warning thresholds, which include primary and secondary warning thresholds: When the nutrient deficit warning value is less than the level 2 warning threshold, no warning is issued. Instead, the latest weekly nutrient time series, the current cumulative supply, and the remaining compensable supply are created and archived in the weekly nutrient tracking database. When the nutritional deficit warning value is greater than or equal to the secondary warning threshold and less than the primary warning threshold, the trend warning result is output. Then, among the meals that have not been executed after the current time point, the set of meals to be adjusted is obtained according to the order of contribution of the nutritional supply of each meal to the remaining compensable supply. Output the set of meals to be adjusted and the target nutrient compensation amount, and write the trend warning results into the warning tracking record; When the nutrient deficit warning value is greater than or equal to the first-level warning threshold, the deficit warning result and the target nutrient deficit amount are output; based on the compensation capacity of the nutrient supply of each meal for the target nutrient deficit amount, a set of correction candidate meals is extracted; a meal correction request is generated based on the set of correction candidate meals and the target nutrient deficit amount, and the deficit warning result and the latest weekly nutrient time series chain are created and archived to the nutrient deficit warning database.

10. A nutritional gap early warning system based on weekly diet time-series compensation, applied to the nutritional gap early warning method based on weekly diet time-series compensation as described in any one of claims 1-9, characterized in that, include: The data acquisition and preprocessing module is used to retrieve basic meal supply record data and nutritional baseline record data, and to preprocess the basic meal supply record data and nutritional baseline record data. The meal supply change triggering and discrimination module is used to perform meal supply change triggering and discrimination on the basic meal supply record data and nutritional benchmark record data, and to identify the target meal supply deviation and generate the benchmark recalculated nutritional supply amount based on the meal supply change triggering and discrimination results. The weekly nutrition sequence write-back and correction module is used to perform sequence write-back consistency analysis based on the baseline recalculation of nutrient supply and the weekly nutrition time series chain. Based on the sequence write-back consistency analysis results, it performs meal write-back replacement, sequence coverage verification, and confirmation of the latest weekly nutrition time series chain. The nutrition gap early warning output module is used to perform nutrition gap early warning analysis based on the latest weekly nutrition time series chain, and generate trend early warning output, gap early warning output and meal correction request based on the nutrition gap early warning analysis results.

Citation Information

Patent Citations

  • A digital healthy canteen system

    CN113724836B

  • A student health diet management system based on the whole life cycle

    CN116417114B