School canteen procurement cost accounting system based on image recognition

By constructing an image recognition-based school canteen procurement cost calculation system, dynamically adjusting the image acquisition frequency, and combining target detection and LSTM models, the system analyzes the causes of consumption deviations, optimizes procurement decisions, and solves the problems of low efficiency and insufficient accuracy in traditional canteen procurement management, thus achieving precise cost control and management.

CN120911909BActive Publication Date: 2025-12-16LIANYUNGANG GANGYUN TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511408422.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2025-12-16
Estimated Expiration
2045-09-29

AI Technical Summary

Technical Problem

In traditional school canteen procurement management, the efficiency of crowd image collection and analysis is low, the accuracy of crowd classification is insufficient, and the analysis of food consumption is inaccurate, resulting in inaccurate cost control. Furthermore, existing solutions fail to effectively integrate multimodal image features and statistical analysis, leading to insufficient scientific rigor and real-time performance in cost calculation.

Method used

A school canteen procurement cost actuarial system based on image recognition was constructed, including a time-sharing image group identification module, a group consumption actuarial module, a consumption difference correlation analysis module, and a cost optimization decision module. By dynamically adjusting the image acquisition frequency and combining target detection algorithms and LSTM models, the system analyzes personnel characteristics and consumption patterns, identifies the causes of consumption deviations, and optimizes procurement decisions.

Benefits of technology

It has achieved efficient and accurate image acquisition and consumption prediction, reduced manual intervention, improved cost accounting accuracy, optimized procurement decisions, reduced canteen operating costs, and improved management efficiency and service quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120911909B_ABST
    Figure CN120911909B_ABST
Patent Text Reader

Abstract

The application provides a school canteen procurement cost accounting system based on image recognition, and relates to the technical field of image recognition. The system comprises: a time-sharing image recognition module, which is used for determining the image acquisition frequency according to the dining busy degree and obtaining different personnel groups through crowd feature recognition; a crowd consumption accounting module, which is used for establishing a consumption prediction model, inputting the personnel dining image to obtain personnel consumption prediction, and calculating the predicted consumption cost in combination with the procurement cost parameter; a consumption difference correlation analysis module, which is used for obtaining the difference reason through comparative consumption analysis and finding out the correlation difference relationship by using the consumption difference multi-dimensional attribution method; and a cost optimization decision module, which is used for formulating procurement decisions according to the optimized consumption cost scheme. The application improves the accuracy of crowd recognition and the accuracy of food consumption prediction, clearly compares the correlation between consumption and difference reasons, provides a targeted basis for optimizing procurement costs, and improves the cost accounting accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition technology, and in particular to a school cafeteria procurement cost calculation system based on image recognition. Background Technology

[0002] Traditional school cafeteria procurement management has long faced three major technical bottlenecks: First, the efficiency of crowd image collection and analysis is low, relying on fixed-frequency collection or manual statistics, which cannot dynamically adapt to changes in crowd flow during peak / off-peak hours. This results in missing or redundant image data for key scenarios (such as queuing during morning rush hour), and the fixed collection frequency easily leads to wasted storage resources and feature recognition errors. Second, the accuracy of crowd classification is insufficient, making it difficult to integrate multi-dimensional information such as facial features and behavioral patterns. This results in low accuracy in identifying subcategories such as "student-faculty" and "different grade groups," and fails to accurately capture differences in group consumption.

[0003] In the field of food consumption analysis, the lack of in-depth integration of population characteristics and real-time scenario data leads to a high error rate in consumption predictions, especially during special scenarios such as exam weeks and heavy rain. Furthermore, the lack of a systematic method for attributing consumption deviations means that when predicted values ​​differ from actual consumption, it is impossible to quantify the influencing factors from multiple dimensions such as food category, time of day, and season. It is also difficult to identify the interaction effects of "stockouts + seasonal changes," resulting in insufficient accuracy in identifying the causes of deviations and preventing the formation of an effective cost optimization loop.

[0004] With the advancement of smart canteen construction, the application of image recognition and machine learning technologies has provided a possibility to overcome the above-mentioned bottlenecks. However, existing solutions still have technological gaps: on the one hand, there is a lack of adaptation mechanisms between image acquisition frequency and dynamic characteristics of the crowd, making it impossible to optimize data efficiency while ensuring recognition accuracy; on the other hand, consumption prediction models and bias attribution methods have failed to fully integrate multimodal image features and statistical analysis methods, resulting in insufficient scientificity and real-time performance of cost actuarial calculations.

[0005] Therefore, there is an urgent need to build an image recognition-based school canteen procurement cost calculation system to achieve precise control of canteen procurement costs. Summary of the Invention

[0006] This invention provides an image recognition-based system for calculating the procurement costs of school canteens, which addresses the shortcomings of existing technologies such as low efficiency in collecting images of people, inaccurate classification, insufficient accuracy in analyzing food consumption, and difficulty in identifying the reasons for the discrepancy between predicted and actual values.

[0007] This invention provides a school canteen procurement cost actuarial system based on image recognition, including: a time-sharing image group identification module, used to determine the image acquisition frequency according to the dining business of the canteen at different times, to acquire images of people dining and consuming in the canteen area, and to identify different groups of people by recognizing their characteristics.

[0008] The group consumption calculation module is used to analyze the food consumption patterns of different groups of people, establish a consumption prediction model, input images of people dining to predict the consumption of each person, and calculate the expected consumption cost in combination with procurement cost parameters.

[0009] The consumption difference correlation analysis module is used to compare the predicted consumption amount with the actual consumption amount to obtain the comparative consumption amount. The consumption difference multidimensional attribution method is used to analyze the reasons for the difference, and the correlation relationship between the comparative consumption amount and the reasons for the difference is found through the consumption difference correlation method.

[0010] The cost optimization decision-making module is used to update the estimated consumption costs based on the correlation differences to obtain an optimized consumption cost plan, and to make procurement decisions based on the optimized consumption cost plan.

[0011] This invention provides a school canteen procurement cost actuarial system based on image recognition, including: defining a dining busyness index based on the density of diners, queue length and different dining time distributions, and dividing the canteen into multiple areas according to function and time period, and assigning corresponding initial sampling frequencies.

[0012] The system monitors the density of diners, queue length, and dining time in real time, and assesses whether the current dining activity level reaches a preset threshold at preset time intervals. If so, it adjusts the initial sampling frequency of the corresponding area to obtain the image sampling frequency.

[0013] This invention provides a school cafeteria procurement cost calculation system based on image recognition, including: analyzing images of people dining and consumption based on a target detection algorithm, and identifying dining images and facial features of people in the images.

[0014] The clothing, body shape, and behavior of people in dining images are extracted as personnel features, and the payment method, consumption amount, and consumption frequency of people are identified based on facial features as consumption behavior features.

[0015] A comprehensive feature vector is constructed by combining personnel characteristics, facial features, and consumption behavior characteristics. Cluster analysis is then performed based on consumption behavior and dining time to obtain common features and behavioral patterns.

[0016] People in the image are divided into different groups based on common characteristics and behavioral patterns.

[0017] This invention provides an image recognition-based system for calculating the procurement costs of school canteens, comprising:

[0018] Collect dining data of different groups of people in the canteen, remove outliers and missing values, and extract key features that affect food consumption.

[0019] By analyzing the statistical indicators of different groups of people at different times and for different dishes based on dining data, we can obtain the amount of food consumed.

[0020] Analyze the correlation between key characteristics and food consumption, identify food consumption characteristics that have an impact on food consumption within a preset range, and conduct cluster analysis on the population to obtain the food consumption pattern.

[0021] The LSTM model is selected based on the consumption patterns of ingredients and target needs.

[0022] Using the population group and key characteristics as input features, and actual food consumption as output, the prediction error index is calculated based on the mean absolute error.

[0023] The consumption prediction model is obtained by adjusting the parameters of the LSTM model based on the prediction error index.

[0024] This invention provides a school canteen procurement cost actuarial system based on image recognition, including: adjusting the image size, normalizing and grayscale of images of people eating, so as to meet the input requirements of the consumption prediction model, and predicting and outputting the corresponding personnel consumption prediction.

[0025] Obtain the purchase price and spoilage rate of each ingredient, and combine this with the current market situation and the actual operation of the canteen to obtain procurement cost parameters.

[0026] The estimated consumption cost is obtained by calculating the cost of each ingredient based on the predicted personnel consumption and procurement cost parameters.

[0027] This invention provides an image recognition-based system for calculating the procurement costs of school canteens, comprising:

[0028] Align the predicted personnel consumption with the actual consumption at the granular level, and eliminate the influence of school holidays and temporary event dates to unify consumption standards and calibrate menu mapping.

[0029] The difference rate is calculated based on the dish category and price range, and the deviation category is identified by combining taste preferences, portion size standards and changes in dish sales.

[0030] By comparing the predicted and actual consumption of people during breakfast, lunch and dinner, fluctuation periods are identified. Combined with the flow images of people during these periods, the consumption deviation trend within a week is statistically analyzed, and the consistency with the weekly activity patterns is analyzed to obtain the period analysis results.

[0031] By comparing the current quarter's consumption deviation with the same period in history, the factors contributing to the consumption deviation are identified. Furthermore, by combining weather data with an analysis of the impact of extreme weather on these factors, seasonal analysis results are obtained.

[0032] The reasons for the differences were determined by combining the structural changes of the population group with the impact of external events on the deviation categories, time periods, and seasonal analysis results.

[0033] This invention provides an image recognition-based system for calculating the procurement costs of school canteens, comprising:

[0034] By aligning the consumption and reasons for the differences according to the time dimension, a deviation time-influencing factor record library is formed, with each row representing an analysis unit and each column representing a reason for the difference.

[0035] Calculate the statistical indicators of the comparative consumption corresponding to each cause of difference based on the record database, and draw a scatter plot with each cause of difference to obtain deviation causal data by analyzing the trend and relationship.

[0036] Analysis of variance was used to analyze the causal data of the deviation and the causes of the differences to obtain the associated variables. Based on the direction and strength of the relationship, the correlation difference relationship between the consumption and the comparison reached the preset strength was found.

[0037] This invention provides an image recognition-based system for calculating the procurement costs of school canteens, comprising:

[0038] Establish the null hypothesis, calculate the between-group squares and within-group squares for each cause of difference based on the bias time-influencing factor record library, and calculate the mean square to obtain the test data.

[0039] Under the null hypothesis, the significance level is determined based on the test data, the corresponding critical value is found by combining the F-distribution table, and the corresponding P-value is obtained by judging each cause of difference.

[0040] If the test data is less than the critical value, the null hypothesis is accepted, and it is considered that the cause of the difference has no significant impact on the amount of comparative consumption.

[0041] Determine if the p-value is greater than the significance level. If it is, a significant association is considered between the current cause of difference and the consumption amount compared, and the output is used as the associated variable. Otherwise, continue to determine the next cause of difference.

[0042] This invention provides an image recognition-based system for calculating the procurement costs of school canteens, comprising:

[0043] The correlation difference relationship is used as a new variable to be input into the consumption prediction model for training. The optimized predicted consumption is re-output, and the expected consumption cost is recalculated in combination with the procurement cost parameter to obtain the current consumption cost.

[0044] Adjust the amount of ingredients purchased based on the current consumption cost, update the menu structure and dishes based on the reasons for the differences, manage the ingredients according to the volatility of consumption to obtain graded consumption data, and coordinate with suppliers to obtain procurement information to optimize the consumption cost plan.

[0045] This invention provides an image recognition-based system for calculating the procurement costs of school canteens, comprising:

[0046] Based on the optimized predicted consumption, the required ingredients for different time periods and seasons are compiled to obtain the current ingredient demand, and the safety stock level of each type of ingredient is determined based on the ingredient grading consumption data.

[0047] Calculate the purchase quantity of each ingredient within a preset time period based on the current demand and safety stock level, determine the optimal purchase time by combining the consumption rate and purchase cycle of ingredients, and select suppliers based on supply stability, ingredient quality and price reasonableness.

[0048] Make purchasing decisions by taking into account the purchase volume, the optimal purchase time, and the identified suppliers.

[0049] This invention provides an image recognition-based school cafeteria procurement cost calculation system. By dynamically adjusting the image acquisition frequency and combining it with target detection algorithms, it automatically identifies dishes and consumption images, reducing manual intervention. It integrates consumption images, procurement cost parameters, and external environmental data to establish a full-link data association. Through a deviation time-influencing factor record library, it achieves cross-departmental data sharing and dynamic adjustment, identifies the reasons for the difference between actual and predicted consumption, and clarifies the correlation between consumption and the reasons for the difference. This provides a targeted basis for optimizing procurement costs, improves cost accounting accuracy, updates projected consumption costs based on the correlation and difference relationships, formulates optimized consumption cost plans, determines the optimal procurement time and quantity, selects suitable suppliers, and improves procurement efficiency and cost-effectiveness. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0051] Figure 1 This is a flowchart illustrating the image recognition-based school cafeteria procurement cost calculation system provided in an embodiment of the present invention. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0053] like Figure 1 As shown in the embodiment of the present invention, the school cafeteria procurement cost actuarial system based on image recognition includes:

[0054] The time-sharing image grouping module is used to determine the image acquisition frequency based on the dining volume of the canteen at different times. It acquires images of people dining and consuming in the canteen area, and then identifies different groups of people based on their characteristics. The steps for acquiring images of people dining and consuming in the canteen area can be as follows: the canteen is divided into multiple areas according to function (e.g., entrance, food service area, dining area) and time period (morning, noon, and evening), and an initial sampling frequency (e.g., 10fps) is assigned. Then, the density of people, queue length, and dining time in each area are monitored in real time. The current level of busyness is assessed at preset time intervals to see if it reaches a threshold (e.g., queue length exceeding 5 meters). If it does, the initial sampling frequency of the corresponding area is adjusted (e.g., increased to 30fps). Finally, cameras deployed in various areas of the canteen acquire images containing images of people dining scenes, facial features, clothing, body shape, behavior, and consumption processes (e.g., payment methods, food selection) at the adjusted sampling frequency, providing data support for subsequent crowd feature identification and consumption behavior analysis.

[0055] The steps to determine the image acquisition frequency include:

[0056] Dining activity indexes are defined based on diners density, queue length, and different dining time distributions. The canteen is divided into multiple areas according to function and time period, and each area is assigned a corresponding initial sampling frequency.

[0057] The system monitors the density of diners, queue length, and dining time in real time, and assesses whether the current dining activity level reaches a preset threshold at preset time intervals. If so, it adjusts the initial sampling frequency of the corresponding area to obtain the image sampling frequency.

[0058] The steps to obtain information from different groups of people include:

[0059] The system analyzes images of people dining and consuming food using object detection algorithms to identify dining areas and facial features within the images. First, the acquired images are preprocessed using object detection algorithms such as YOLOv8 or Faster R-CNN: image size adjustment (e.g., uniform to 640×480 pixels), normalization (pixel values ​​reduced to [0,1]), and grayscale conversion reduce computational load, while Gaussian filtering removes noise. Then, the system detects the people area: each person in the image is segmented at the pixel level, generating masks containing parts such as the head, torso, and hands to accurately locate dining behavior areas (e.g., holding a plate, sitting, eating, etc.). Regions of interest (ROIs) are set for key areas such as food windows and payment terminals, prioritizing the detection of people's faces, hands (e.g., swiping cards, scanning QR codes for payment), and food contact behaviors to improve the recognition efficiency of consuming images.

[0060] The clothing, body shape, and behavior of people in dining images are extracted as personnel features, and the payment method, consumption amount, and consumption frequency of people are identified based on facial features as consumption behavior features.

[0061] By linking facial features with big data, the payment method of an individual (such as campus card payment, facial recognition payment, or QR code payment) can be obtained through the existing cafeteria payment system.

[0062] In a cafeteria setting, there are situations where individuals have similar attire (such as uniform school uniforms) and similar behaviors (such as queuing for food), making it difficult to accurately distinguish individuals based solely on clothing and behavior. Facial features, however, can be used to precisely locate specific individuals.

[0063] Distinguishing individuals by their attire—school uniforms versus formal or casual wear worn by faculty and staff—is crucial, as different attire leads to different food consumption patterns. Behavioral characteristics can also be used to categorize individuals: those who quickly pick up and take away food, and those who dine in or dine in groups. Those who quickly pick up and take away food prefer easily portable dishes such as rice balls and braised dishes; during exam weeks, the proportion of this "quick-meal" group increases, requiring increased purchases of staple foods to meet demand. The other category comprises those who dine in or dine in groups; they prefer hot dishes and soups, demanding a wider variety of dishes, averaging 4-5 dishes per table, with increased soup consumption.

[0064] Those who use facial recognition payment are mostly frequent diners with stable spending patterns. Those who use QR code payment are mostly casual diners with unstable spending patterns, a preference for specialty dishes, such as new set meals, and large fluctuations in consumption. When QR code payment users account for more than 20%, it is necessary to reserve an additional 10% of specialty dish ingredients to avoid stockouts.

[0065] A comprehensive feature vector is constructed by combining personnel characteristics, facial features, and consumption behavior characteristics. Cluster analysis is then performed based on consumption behavior and dining time to obtain common features and behavioral patterns.

[0066] People in the image are divided into different groups based on common characteristics and behavioral patterns.

[0067] The group consumption calculation module is used to analyze the food consumption patterns of different groups of people, establish a consumption prediction model, input images of people dining to predict the consumption of each person, and calculate the expected consumption cost in combination with procurement cost parameters.

[0068] The steps to establish a consumption prediction model include:

[0069] Collect dining data from different groups of people in the canteen, remove outliers and missing values, and extract key features affecting food consumption. Dining data may include the number of diners, dish selection, spending amount, and dining time. Key features may include dining time, dish type, and season. For seasonal features, the year can be divided into four categories: spring, summer, autumn, and winter.

[0070] By analyzing the statistical indicators of different groups of people at different times and for different dishes based on dining data, we can obtain the amount of food consumed.

[0071] Analyze the correlation between key characteristics and food consumption, identify food consumption characteristics that have an impact on food consumption within a preset range, and conduct cluster analysis on the population to obtain the food consumption pattern.

[0072] Based on the food consumption patterns and target needs, the LSTM model is selected, expressed by the formula:

[0073]

[0074]

[0075] In the formula, It is in a hidden state. It is a memory cell. It is a weight matrix. It was the hidden state from a previous moment. It represents the cell state at the previous moment. It is a bias term. It is the predicted output at that moment.

[0076] Using the population group and key characteristics as input features, and actual food consumption as output, the prediction error index is calculated based on the mean absolute error, expressed by the following formula:

[0077]

[0078] In the formula, It is a prediction error index. It is the total number of samples. It is the first The true value of each sample It is the first The predicted value for each sample.

[0079] The consumption prediction model is obtained by adjusting the parameters of the LSTM model based on the prediction error index.

[0080] The steps for calculating the estimated cost include:

[0081] The images of people dining are resized, normalized, and converted to grayscale to meet the input requirements of the consumption prediction model, and the corresponding predicted consumption amount is output.

[0082] Obtain the purchase price and spoilage rate of each ingredient, and combine this with the current market situation and the actual operation of the canteen to obtain procurement cost parameters.

[0083] The estimated consumption cost is calculated by determining the cost of each ingredient based on the predicted personnel consumption and procurement cost parameters. The formula is as follows:

[0084]

[0085] In the formula, This is the estimated cost. It is the consumption forecast quantity. These are procurement cost parameters. It is the loss rate.

[0086] The consumption difference correlation analysis module is used to compare the predicted consumption amount with the actual consumption amount to obtain the comparative consumption amount. The consumption difference multidimensional attribution method is used to analyze the reasons for the difference, and the correlation relationship between the comparative consumption amount and the reasons for the difference is found through the consumption difference correlation method.

[0087] The steps to analyze the reasons for the differences include:

[0088] Align the predicted personnel consumption with the actual consumption at the granular level, and eliminate the influence of school holidays and temporary event dates to unify consumption standards and calibrate menu mapping.

[0089] Consumption standardization: Clearly define the "consumption" (e.g., actual consumption = purchase quantity + beginning inventory - ending inventory - loss) to ensure that the calculation logic of the forecasting model is consistent with the actual statistics and avoid comparison failure due to definition deviation.

[0090] Menu mapping calibration: By using the "Standardized Dictionary of Dishes", the predicted "braised pork" is unified with the actual statistical aliases such as "braised pork belly", eliminating name ambiguity (e.g., a canteen's "tomato scrambled eggs" may be recorded as "tomato scrambled eggs").

[0091] The difference rate is calculated based on the dish category and price range, and the deviation category is identified by combining taste preferences, portion size standards and changes in dish sales.

[0092] By comparing the predicted and actual consumption of people during breakfast, lunch and dinner, fluctuation periods are identified. Combined with the flow images of people during these periods, the consumption deviation trend within a week is statistically analyzed, and the consistency with the weekly activity patterns is analyzed to obtain the period analysis results.

[0093] By comparing the current quarter's consumption deviation with the same period in history, the factors contributing to the consumption deviation are identified. Furthermore, by combining weather data with an analysis of the impact of extreme weather on these factors, seasonal analysis results are obtained.

[0094] The reasons for discrepancies were identified by combining the impact of changes in the demographic structure of the population and external events on the results of deviation category, time period, and seasonal analysis. Changes in the demographic structure could include a sudden increase in the proportion of junior high school students (whose meat preference is lower than that of senior high school students, leading to a decrease in pork consumption), or issues with the taste of dishes (such as overly salty braised pork resulting in lower actual sales than predicted). External events could include last-minute school notices for physical examinations and the introduction of special-priced meal packages in the cafeteria. Reasons for discrepancies could include inconsistent statistical methods, errors in unit conversion of ingredients, image recognition errors, supply-side problems, changes in demand, and losses during processing and service.

[0095] The steps to obtain the association differences include:

[0096] By aligning the consumption and reasons for the differences according to the time dimension, a deviation time-influencing factor record library is formed, with each row representing an analysis unit and each column representing a reason for the difference.

[0097] Calculate the statistical indicators of the comparative consumption corresponding to each cause of difference based on the record database, and draw a scatter plot with each cause of difference to obtain deviation causal data by analyzing the trend and relationship.

[0098] Analysis of variance was used to analyze the causal data of the deviations and the causes of the differences to obtain the associated variables.

[0099] The steps to obtain the correlation variables include:

[0100] Establish the null hypothesis, which typically assumes that the causes of difference have no significant impact on the amount of consumption compared, i.e., the means of the data in each group are equal. Calculate the between-group squares and within-group squares for each cause of difference using the bias time-influence factor database, and then calculate the mean square to obtain the test data. The formula is expressed as:

[0101]

[0102] In the formula, It is the square between groups. It is the number of groups. It is the square within the group. It is the total number of all samples. These are test data.

[0103] The formulas for calculating the component square and the within-group square are expressed as follows:

[0104]

[0105] In the formula, It is the first The number of samples in each group It is the first The sample mean of each group It is the population mean of all samples. It is the first The first group Each sample value.

[0106] Under the null hypothesis, the significance level is determined based on the test data. The corresponding critical value is found using the F-distribution table, and a p-value is obtained for each cause of difference. The judgment steps include: if the test data is greater than the critical value, the null hypothesis is rejected, indicating that the cause of difference has a significant impact on the comparison consumption. The output is the p-value.

[0107] If the test data is less than the critical value, the null hypothesis is accepted, and it is considered that the cause of the difference has no significant impact on the amount of comparative consumption.

[0108] Determine if the p-value is greater than the significance level. If it is, a significant association is considered between the current cause of difference and the consumption amount compared, and the output is used as the associated variable. Otherwise, continue to determine the next cause of difference.

[0109] And based on the direction and strength of the relationship, identify the correlation differences between the consumption amount and the comparison amount that reach the preset strength.

[0110] The cost optimization decision-making module is used to update the estimated consumption costs based on the correlation differences to obtain an optimized consumption cost plan, and to make procurement decisions based on the optimized consumption cost plan.

[0111] The steps to update and optimize the cost-consuming scheme include:

[0112] The correlation difference relationship is used as a new variable to be input into the consumption prediction model for training. The optimized predicted consumption is re-output, and the expected consumption cost is recalculated in combination with the procurement cost parameter to obtain the current consumption cost.

[0113] Adjust the amount of ingredients purchased based on the current consumption cost, update the menu structure and dishes based on the reasons for the differences, manage the ingredients according to the volatility of consumption to obtain graded consumption data, and coordinate with suppliers to obtain procurement information to optimize the consumption cost plan.

[0114] The steps involved in making a procurement decision include:

[0115] Based on the optimized predicted consumption, the required ingredients for different time periods and seasons are compiled to obtain the current ingredient demand. Then, safety stock levels for each type of ingredient are determined based on tiered consumption data. The optimized predicted consumption is broken down into different time periods such as breakfast, lunch, dinner, and late-night snacks. Combined with historical seasonal data (e.g., summer cold dish consumption increases by 15%, winter hot soup consumption increases by 20%), an ingredient demand matrix including time and season dimensions is generated. Simultaneously, based on the volatility of ingredient consumption (e.g., weekly standard deviation of leafy vegetables reaches 25%, while root vegetables only reach 8%), ingredients are categorized into high volatility, medium volatility, and low volatility, with safety stock levels set for each category—20% of the predicted consumption for high volatility ingredients, 10% for medium volatility ingredients, and 5% for low volatility ingredients—to cope with sudden demand or supply delays.

[0116] The purchase quantity of each ingredient within a preset time period is calculated based on the current ingredient demand and safety stock level. The optimal purchase time is determined by considering the ingredient consumption rate and procurement cycle. Suppliers are selected based on supply stability, ingredient quality, and price reasonableness. The purchase quantity calculation formula is: Purchase Quantity = Current Ingredient Demand + Safety Stock - Existing Inventory - In-Transit Inventory. For consumption rate, the average daily consumption of each ingredient is calculated using historical data (e.g., 50kg of pork per day). Combined with the procurement cycle (daily purchase of leafy vegetables, weekly purchase of frozen products), the Economic Order Quantity (EOQ) model is used to optimize the purchase batch size and avoid excessive inventory. Determining the optimal purchase time requires considering the ingredient's shelf life (e.g., fresh milk has a shelf life of 7 days and must be consumed within 5 days of arrival) and transportation time (1 day for local suppliers, 3 days for out-of-town suppliers). For example, for ingredients with a 10-day shelf life, the purchase time is calculated by working backwards from the consumption rate (procurement cycle + 3 days of safe shelf life). In terms of supplier selection, a three-dimensional evaluation system is established: supply stability (on-time delivery rate ≥95% in the past 3 months), food quality (100% pass rate for pesticide residue testing), and price reasonableness (average price not higher than 5% of the market wholesale price). The Analytic Hierarchy Process (AHP) is used to assign weights (stability 40%, quality 35%, price 25%), calculate the comprehensive score of suppliers and rank them.

[0117] Procurement decisions are made by combining purchase volume, optimal procurement time, and identified suppliers. Detailed purchase orders are generated, specifying ingredient names, specifications, quantities, unit prices, and delivery times. Time-segmented procurement plans are developed (e.g., breakfast ingredients arrive before 6 AM daily, lunch ingredients before 10 AM daily). An emergency supplier contact mechanism is established, automatically triggering the procurement process for the second-ranked supplier when the primary supplier cannot deliver on time. Simultaneously, procurement decisions are synchronized to the inventory management system, updating inventory status in real time and notifying relevant personnel via SMS or app to execute purchases. This ensures a high degree of alignment between ingredient supply and consumption forecasts, reducing stockout risks and inventory costs.

[0118] This example provides a school cafeteria procurement cost calculation system based on image recognition. By dynamically adjusting the image acquisition frequency according to the cafeteria's peak dining hours, it achieves efficient and accurate image acquisition. A consumption prediction model is established, combined with population characteristic analysis, effectively improving the accuracy of food consumption prediction. Cost calculations are performed by combining procurement cost parameters with predicted consumption, making cost estimates closer to actual needs. Through accurate consumption prediction and optimized cost calculation, food waste and over-purchasing are reduced, effectively lowering cafeteria operating costs. Analyzing food consumption patterns among different groups optimizes menu design, better meeting the taste preferences of teachers and students, and improving cafeteria service quality and satisfaction. By integrating technologies such as image recognition, data analysis, and predictive models, it achieves intelligent and automated cafeteria procurement cost management, improving the cafeteria's informatization and management levels.

[0119] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0120] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An image recognition-based school cafeteria procurement cost accounting system, characterized by, The method comprises the following steps: The time-sharing image recognition module is used to determine the image acquisition frequency according to the dining busy degree of the canteen at different time periods, and to acquire personnel dining images and consumption images by image acquisition of the canteen area to recognize different personnel groups; The step of obtaining different personnel groups comprises: According to the target detection algorithm, the personnel dining images and the consumption images are analyzed to identify the dining images of the personnel area and the facial features in the images; The clothing, body shape and behavior of the personnel are extracted from the dining images as personnel features, and the payment method, consumption amount and consumption frequency of the personnel are recognized as consumption behavior features according to the facial features; The comprehensive feature vector is constructed by combining the personnel features, the facial features and the consumption behavior features, and the common features and behavior patterns are obtained by clustering analysis according to the consumption behavior and the dining time; According to the common features and the behavior patterns, the personnel in the images are divided to obtain different personnel groups; The group consumption and accounting module is used to analyze the food consumption rules of different personnel groups, establish a consumption prediction model, input the personnel dining images to obtain personnel consumption prediction amounts, and calculate the predicted consumption cost by combining the procurement cost parameters; The consumption difference correlation analysis module is used to compare the personnel consumption prediction amounts with the actual consumption amounts to obtain comparative consumption amounts, analyze the difference reasons by using the consumption difference multi-dimensional attribution method, and find out the correlation difference relationship between the comparative consumption amounts and the difference reasons by using the consumption difference correlation method; The cost optimization decision module is used to update the predicted consumption cost according to the correlation difference relationship to obtain an optimized consumption cost scheme, and to make procurement decisions according to the optimized consumption cost scheme.

2. The image recognition-based school cafeteria procurement cost accounting system according to claim 1, characterized by, The step of determining the image acquisition frequency comprises: According to the dining number density, the queue length and the different dining time distribution, the dining busy degree index is defined, and the canteen is divided into multiple areas according to the function and time period to obtain an initial sampling frequency; The dining number density, the queue length and the dining time are monitored in real time, and whether the current dining busy degree index reaches a preset threshold is evaluated according to a preset time interval. If yes, the initial sampling frequency of the corresponding area is adjusted to obtain the image sampling frequency.

3. The image recognition-based school cafeteria procurement cost accounting system according to claim 1, characterized by, The step of establishing the consumption prediction model comprises: Collecting dining data of different personnel groups in the canteen, removing outliers and missing values, and extracting key features affecting food consumption therefrom; According to the dining data, statistical indicators of different personnel groups at different time periods and for different dishes are calculated and analyzed to obtain food consumption amounts; The correlation between the key features and the food consumption amounts is analyzed to find out food consumption features that affect the food consumption amounts within a preset range, and the personnel groups are clustered to obtain the food consumption rules; According to the food consumption rules and target requirements, an LSTM model is selected; The personnel groups and the key features are taken as feature inputs, and the actual food consumption is taken as output. The prediction error index is calculated according to the mean absolute error; According to the prediction error index, the parameters of the LSTM model are adjusted to obtain the consumption prediction model.

4. The image recognition-based school cafeteria procurement cost accounting system according to claim 1, characterized by, The step of calculating the predicted consumption cost comprises: The personnel dining image is subjected to image size adjustment, normalization and grayscale operation to meet the input requirements of the consumption quantity prediction model, and the personnel consumption prediction quantity corresponding to the prediction output is obtained; The purchase cost parameters are obtained by acquiring the purchase price and loss rate of each food material and combining the current market situation and the actual operation situation of the canteen; The cost of each food material is calculated according to the personnel consumption prediction quantity and the purchase cost parameters to obtain the predicted consumption cost.

5. The image recognition-based school cafeteria procurement cost accounting system according to claim 1, characterized by, The step of analyzing the difference causes comprises: The personnel consumption prediction quantity and the actual consumption quantity are aligned in granularity, the influence of school holidays and temporary activity dates is eliminated, the consumption caliber is unified and the dish mapping is calibrated; The difference rate is calculated according to dish categories and price intervals, and the deviation categories are identified by combining taste preferences, portion standards and dish sales changes; According to the personnel consumption prediction quantity and the actual consumption quantity of the early, midday and evening meals, the fluctuation period is identified, the consumption deviation trend within a week is calculated by combining the people flow image of the period, and the consistency with the activity law within a week is analyzed to obtain the period analysis result; The consumption deviation factors are obtained by comparing and analyzing the current quarter consumption deviation with the historical same period, and the seasonal analysis result is obtained by combining the weather data to analyze the extreme climate on the consumption deviation factors; The difference causes are obtained according to the influence of the structure change of the personnel group and external events on the deviation categories, the period analysis combination and the seasonal analysis result.

6. The image recognition-based school cafeteria procurement cost accounting system according to claim 5, characterized by, The step of obtaining the associated difference relationship comprises: The comparison consumption quantity and the difference causes are aligned according to the time dimension to form a deviation time-impact factor record library, each row represents an analysis unit, and each column represents a difference cause; Statistical indicators of the comparison consumption quantity corresponding to each difference cause are calculated according to the record library, and a scatter plot between each difference cause is drawn to analyze the trend and relationship to obtain deviation causal data; The associated variables are obtained by using the analysis of variance method to analyze the deviation causal data and each difference cause, and the associated difference relationship reaching a preset strength with the comparison consumption quantity is found out according to the relationship direction and strength.

7. The image recognition-based school cafeteria procurement cost accounting system according to claim 6, characterized by, The step of analyzing the associated variables comprises: An original hypothesis is established, the inter-group sum of squares and the intra-group sum of squares of each difference cause are calculated according to the deviation time-impact factor record library, and the mean square is calculated to obtain test data; Under the original hypothesis, the significance level is determined according to the test data, the corresponding critical value is found out by combining the F distribution table, and each difference cause is judged to obtain the corresponding P value; It is judged whether the P value is greater than the significance level, yes, it is considered that the current difference cause and the comparison consumption quantity have significant association and is output as the associated variable, otherwise the next difference cause is judged.

8. The image recognition based school cafeteria procurement cost accounting system according to claim 1, characterized in that, The step of updating the optimized consumption cost scheme comprises: The associated difference relationship is input into the consumption quantity prediction model as a new variable for training, the optimized prediction consumption quantity is re-output, and the current consumption cost is obtained by recalculating the predicted consumption cost in combination with the purchase cost parameters. According to the current consumption cost, the food material purchase quantity is adjusted, and the menu structure and dishes are updated in combination with the difference reason, food material classification consumption data is obtained by grading management according to food material consumption fluctuation, and the optimized consumption cost scheme is obtained in combination with the supplier's purchase information.

9. The image recognition based school cafeteria procurement cost accounting system according to claim 1, wherein, The step of making the purchase decision comprises: According to the optimized predicted consumption quantity, the current food material requirement is obtained by arranging food materials required in different time periods and seasons, and the safety stock quantity of each type of food material is determined according to the food material classification consumption data; According to the current food material requirement and the safety stock quantity, the purchase quantity of each type of food material in a preset time period is calculated, the best purchase time is determined in combination with the food material consumption speed and the purchase cycle, and the supplier is selected according to the supply stability, the food material quality and the price rationality; The purchase decision is made in combination with the purchase quantity, the best purchase time and the determined supplier.

Citation Information

Patent Citations

  • User behavior prediction method and system based on machine learning

    CN118015684A

  • Intelligent hotel customer demand dynamic replenishment optimization system and method

    CN119027035A

  • Energy consumption prediction and optimization system for energy-saving management and control

    CN120373912A