Intelligent revenue analysis and inventory optimization system for restaurant

The restaurant intelligent revenue analysis and inventory optimization system, through the use of multi-branch time-series encoders and feature fusion layers, solves the problem of lag in inventory management in the catering industry, enables early identification and dynamic optimization of potential risks, and improves the profitability and operational efficiency of restaurants.

CN121860685APending Publication Date: 2026-04-14ZHUHAI JISI INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-05
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing inventory management systems in the catering industry are unable to effectively cope with complex factors such as sudden surges in customer traffic, market price fluctuations, and supply chain instability, resulting in delayed procurement plans, capital tied up, food waste, or stockout losses, and making it difficult to achieve a dynamic balance between costs, services, and losses.

Method used

The restaurant intelligent revenue analysis and inventory optimization system is adopted. Through data processing, cost ratio, market fluctuation analysis, purchase volume prediction, model verification and visualization modules, a multi-branch time-series encoder and feature fusion layer are constructed to realize joint modeling and analysis of multi-source heterogeneous data, output intelligent purchase volume, and conduct early identification and quantitative assessment of potential inventory risks.

Benefits of technology

It enables early identification and quantitative assessment of potential inventory backlog, stockouts, and high waste risks, dynamically optimizes procurement decisions, reduces operating costs, and improves restaurant profitability and operational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121860685A_ABST
    Figure CN121860685A_ABST
Patent Text Reader

Abstract

The invention discloses a restaurant intelligent revenue analysis and inventory optimization system, and relates to the field of restaurant intelligent revenue analysis and inventory optimization, and the system comprises a data processing module which is used for obtaining the historical total data of restaurant operation, and carrying out the preprocessing; the cost ratio module is used for calculating the daily average cost of each material and the daily average food material cost ratio; the market fluctuation analysis module is used for constructing a material price market fluctuation model and predicting market fluctuation of material prices; the purchase quantity prediction module is used for constructing a revenue analysis and inventory optimization model and outputting the material purchase quantity of the next purchase cycle; the model verification module is used for comprehensively verifying and evaluating the credibility of the model; and the visualization module is used for constructing a visualization platform and storing and generating a visualization report. The method has the advantages that full-link automation and precision from cost analysis to inventory decision making are achieved, and the purchase cost, inventory overstock and food material waste are reduced while supply is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent revenue analysis and inventory optimization for restaurants, specifically to an intelligent revenue analysis and inventory optimization system for restaurants. Background Technology

[0002] With intensifying competition and accelerated digital transformation in the catering industry, the demand for refined operations has entered a more complex phase. Currently, while the catering market continues to expand, overall profit margins remain low. Ingredient costs and inventory losses are key factors constraining profitability. The core contradiction in catering operations lies in the imbalance between the uncertainty of sales demand and the certainty of inventory supply. The short shelf life and demanding storage conditions of fresh ingredients further amplify this contradiction—over-purchasing easily leads to spoilage and waste, while under-purchasing causes stockouts and lost customers, creating a dilemma. On the consumer side, consumer demand is becoming increasingly diversified and personalized. Customer traffic in commercial districts is significantly affected by factors such as holidays, weather, and surrounding events, resulting in greater fluctuations. Traditional experience-driven operating models are no longer suitable for dynamic market changes. On the operational side, most restaurants have completed basic information technology upgrades, with initial data accumulation from POS systems, purchasing records, and inventory ledgers, providing a data foundation for intelligent analysis. Simultaneously, mature interface technologies allow for easy access to external data such as calendars and weather forecasts. The application of big data analysis and algorithm models provides technical support for transforming data into decision-making.

[0003] Against this backdrop, the catering industry urgently needs a full-chain intelligent system that integrates internal and external data and connects sales, costs, and inventory. By transforming abstract sales data into specific food demand forecasts, inventory management can be transformed from experience-based estimation to data-driven approaches. This has become a key direction for the industry to reduce costs, increase efficiency, and enhance core competitiveness. It has also laid the necessary technical and market foundation for the research and development and application of intelligent revenue analysis and inventory optimization systems for restaurants.

[0004] Existing systems typically only trigger adjustments to procurement quantities at the end of the procurement cycle based on lagging actual inventory data or simple sales forecast deviations. This approach fails to identify and proactively intervene in potential inventory risks (such as stockouts, overstocking, and high waste) arising from complex factors such as sudden surges in customer traffic, drastic market price fluctuations, supply chain instability, and rising natural food spoilage rates. Due to the lack of joint dynamic modeling and prediction of sales uncertainty, cost volatility, and supply risks, the system's decision-making response is severely delayed. This results in procurement plans that are either too conservative, leading to capital tied up and food waste, or too aggressive, causing stockout losses. It is difficult to achieve a dynamic balance and optimal control between cost, service, and spoilage, leaving restaurant inventory management in a passive state for a long time, with the potential for low operational efficiency and erosion of profit margins. Summary of the Invention

[0005] To address the aforementioned technical problems, this paper provides a smart restaurant revenue analysis and inventory optimization system. This technical solution solves the problem of severe lag in the decision-making response of the system mentioned in the background technology. This results in procurement plans that are either too conservative, leading to capital occupation and food waste, or too aggressive, causing stockouts and losses. It is difficult to achieve a dynamic balance and optimal control between cost, service and loss, which makes the restaurant's inventory management a passive response in the long term, resulting in low operational efficiency and the potential for erosion of profit margins.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A restaurant intelligent revenue analysis and inventory optimization system includes: A data processing module is used to acquire all historical data of restaurant operations and perform preprocessing. The cost percentage module is used to calculate the average daily cost and average daily ingredient cost percentage of each material based on the daily order volume of each dish, the menu price of each dish, and the daily purchase price. The market fluctuation analysis module is used to construct a material price market fluctuation model based on the historical purchase price and source of the material, and to predict the market fluctuation of material prices. The procurement volume forecasting module is used to construct a revenue analysis and inventory optimization model based on historical full data, combined with the daily average food cost ratio and predicted market fluctuations in material prices, and output the material procurement volume for the next procurement cycle. The model validation module is used to comprehensively validate and evaluate the reliability of the revenue analysis and inventory optimization model, and to verify the actual prediction results of the revenue analysis and inventory optimization model through A / B testing. The visualization module is used to build a visualization platform, store and generate visualization reports based on inventory optimization process data and model validation data.

[0007] Preferably, the step of calculating the average daily cost and average daily ingredient cost percentage of each material based on the daily order volume, the menu price of each item, and the daily purchase price specifically includes: Obtain the ingredient combination for a single dish, wherein the ingredient combination includes: ingredient name and weight; Based on the combination of ingredients, calculate the average daily usage of each ingredient for each dish, taking into account the daily order volume. Calculate the average daily cost of each material based on the average daily usage and the daily purchase price. Calculate the daily ingredient cost percentage based on the price of each item on the menu and the average daily cost of each ingredient.

[0008] Preferably, the step of constructing a material price market fluctuation model based on historical material purchase prices and material sources to predict material price market fluctuations specifically includes: The sources of the procured materials include: fixed suppliers and mobile suppliers; For a fixed supplier, extract the complete historical purchase unit price sequence of materials supplied by that supplier; Calculate the average price of the series in each procurement cycle, and use the average price of that cycle as the benchmark price for that cycle; Based on the exponential smoothing method, the cyclical benchmark price series is modeled and predicted to obtain the benchmark price prediction value for several future cycles. This prediction value is considered constant in the future cycles. For mobile suppliers, based on the full historical data, extract every historical purchase record of materials from all mobile suppliers to form a mobile supplier sample set; For each purchase record in the sample set of mobile suppliers, extract and construct its feature vector, which includes: time-series features, context labels and purchase attributes; Based on the training sample set of mobile suppliers, a quantile regression forest model is trained, and the model outputs a table of predicted quantiles for the purchase unit price of mobile suppliers. Based on fixed and mobile suppliers, a material price market fluctuation model is constructed to predict material price market fluctuation data by inputting the purchase date.

[0009] Preferably, the purchase volume forecasting module specifically includes: The input / output unit is used to extract the daily traffic, daily order volume of single dishes, single menu price, daily total revenue, daily purchase price and food waste rate, as well as the derived daily average food cost ratio and predicted market fluctuations of material prices as inputs for each procurement cycle in the historical full data, and the material procurement volume of the next procurement cycle as outputs. Since there are multiple types of materials, the output is a multi-dimensional vector, with each dimension corresponding to the purchase quantity of a type of material. The sample set unit is used to extract the input and output quantities of different procurement cycles based on the historical full data, create a training sample set, and divide it into a training set, a validation set, and a test set. The input quantity of one cycle and the purchase quantity of the next cycle constitute a set of data. If the purchase quantity data of the next cycle is of poor quality, a target purchase quantity is set based on expert experience. A model building unit is used to build a multi-branch neural network model, the model containing a multi-branch temporal encoder, each branch consisting of an LSTM network; The feature extraction unit is used to connect a shared feature fusion layer after the output layer of all branches, and concatenate the hidden state of the last time step of each branch in the feature dimension to output a multi-dimensional fused feature vector. The fully connected layer unit is used to construct three parallel fully connected output layers based on the fused feature vector, namely the procurement quantity decision layer, the demand forecasting layer, and the waste risk forecasting layer. Among them, the procurement volume decision layer outputs the material procurement volume for the next procurement cycle, the demand forecasting layer outputs the predicted food demand for the next cycle, and the waste risk forecasting layer outputs the theoretical waste rate risk value for the next cycle. The loss function unit is used to calculate the weighted sum of the mean square error between the predicted purchase quantity and the next purchase quantity, the inventory holding cost penalty, the expected waste penalty, and the expected stockout penalty. The model training unit is used to minimize the loss function during the model training process and train the model using the Adam optimizer. The trained model is the revenue analysis and inventory optimization model. The model deployment unit is used to feed the input data of the period to be predicted into the model during actual deployment and application, and to use the output of the procurement quantity decision layer as the final material procurement quantity recommendation.

[0010] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention proposes a restaurant intelligent revenue analysis and inventory optimization system. Through the full-link collaboration of six modules—data processing, cost ratio analysis, market fluctuation analysis, procurement volume prediction, model verification, and visualization—it jointly models and analyzes multi-source heterogeneous data of restaurant operations by setting up a multi-branch time-series encoder, a feature fusion layer, and a multi-task decision layer. When the system predicts future demand, price fluctuations, and waste risks based on historical time-series data, it simultaneously combines the current inventory level to perform comprehensive optimization calculations and outputs the intelligent procurement volume for the next cycle. On the one hand, it can achieve early identification and quantitative assessment of potential inventory backlog, stockouts, and high waste risks; on the other hand, it can reduce the imbalance in procurement decisions caused by the deviation of a single prediction module (such as demand prediction only). This solution effectively enables proactive and dynamic optimization of procurement strategies, allowing procurement decisions to respond to early changes in operational status and to comprehensively and dynamically adjust procurement plans based on multi-dimensional information on demand, cost, inventory, and risk. This avoids the problems of excessively high inventory costs, insufficient service levels, or serious food waste caused by traditional methods due to delayed response or fragmented decision-making. Ultimately, it achieves the fundamental goal of significantly reducing overall operating costs and improving restaurant profitability while ensuring supply. Attached Figure Description

[0011] Figure 1 This is a flowchart of a restaurant intelligent revenue analysis and inventory optimization system according to the present invention; Figure 2 This is a flowchart illustrating the market fluctuations in material prices as described in this invention. Figure 3 To construct the revenue analysis and inventory optimization model of this invention, a flowchart of the material procurement quantity for the next procurement cycle is output. Detailed Implementation

[0012] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.

[0013] Reference Figure 1 As shown, a restaurant intelligent revenue analysis and inventory optimization system includes: A data processing module is used to acquire all historical data of restaurant operations and perform preprocessing. The cost percentage module is used to calculate the average daily cost and average daily ingredient cost percentage of each material based on the daily order volume of each dish, the menu price of each dish, and the daily purchase price. The market fluctuation analysis module is used to construct a material price market fluctuation model based on the historical purchase price and source of the material, and to predict the market fluctuation of material prices. The procurement volume forecasting module is used to construct a revenue analysis and inventory optimization model based on historical full data, combined with the daily average food cost ratio and predicted market fluctuations in material prices, and output the material procurement volume for the next procurement cycle. The model validation module is used to comprehensively validate and evaluate the reliability of the revenue analysis and inventory optimization model, and to verify the actual prediction results of the revenue analysis and inventory optimization model through A / B testing. The visualization module is used to build a visualization platform, store and generate visualization reports based on inventory optimization process data and model validation data.

[0014] Reference Figure 1 As shown, the procurement quantity forecasting module specifically includes: The input / output unit is used to extract the daily traffic, daily order volume of single dishes, single menu price, daily total revenue, daily purchase price and food waste rate, as well as the derived daily average food cost ratio and predicted market fluctuations of material prices as inputs for each procurement cycle in the historical full data, and the material procurement volume of the next procurement cycle as outputs. Since there are multiple types of materials, the output is a multi-dimensional vector, with each dimension corresponding to the purchase quantity of a type of material. The sample set unit is used to extract the input and output quantities of different procurement cycles based on the historical full data, create a training sample set, and divide it into a training set, a validation set, and a test set. The input quantity of one cycle and the purchase quantity of the next cycle constitute a set of data. If the purchase quantity data of the next cycle is of poor quality, a target purchase quantity is set based on expert experience. A model building unit is used to build a multi-branch neural network model, the model containing a multi-branch temporal encoder, each branch consisting of an LSTM network; The feature extraction unit is used to connect a shared feature fusion layer after the output layer of all branches, and concatenate the hidden state of the last time step of each branch in the feature dimension to output a multi-dimensional fused feature vector. The fully connected layer unit is used to construct three parallel fully connected output layers based on the fused feature vector, namely the procurement quantity decision layer, the demand forecasting layer, and the waste risk forecasting layer. Among them, the procurement volume decision layer outputs the material procurement volume for the next procurement cycle, the demand forecasting layer outputs the predicted food demand for the next cycle, and the waste risk forecasting layer outputs the theoretical waste rate risk value for the next cycle. The loss function unit is used to calculate the weighted sum of the mean square error between the predicted purchase quantity and the next purchase quantity, the inventory holding cost penalty, the expected waste penalty, and the expected stockout penalty. The model training unit is used to minimize the loss function during the model training process and train the model using the Adam optimizer. The trained model is the revenue analysis and inventory optimization model. The model deployment unit is used to feed the input data of the period to be predicted into the model during actual deployment and application, and to use the output of the procurement quantity decision layer as the final material procurement quantity recommendation.

[0015] This solution involves collecting and analyzing comprehensive restaurant operation data through data processing, cost ratio, and market fluctuation analysis modules. By identifying the daily average ingredient cost ratio based on historical time-series data, it assesses potential risks of profit compression or uncontrolled procurement costs. Simultaneously, a procurement volume prediction module integrates multi-dimensional features for modeling and intelligent decision-making, outputting the next cycle's material procurement volume. A model validation module comprehensively evaluates the reliability and actual business value of the prediction model, and a visualization module provides intuitive presentation of the entire process data and decision support. This solution effectively mitigates the risks of inventory backlog, stockouts, and waste. On the one hand, it provides quantitative assessment and early warning. On the other hand, through multi-module collaboration and cross-validation, it reduces procurement decision errors caused by the bias of a single data source or model overfitting. By constructing a closed-loop system of "data perception - risk assessment - intelligent decision-making - effect verification - visualization presentation", the system can make adaptive adjustments in the early stage before operational risks are fully manifested. Based on the results of multi-objective collaborative optimization, it dynamically outputs procurement strategies, effectively avoiding problems such as high inventory costs, decreased service satisfaction and increased food waste caused by traditional methods due to delayed response, fragmented decision-making or lack of verification. Thus, while ensuring stable supply, it significantly improves restaurant operational efficiency and profitability resilience.

[0016] The acquisition and preprocessing of historical full data on restaurant operations specifically includes: The full data includes: daily foot traffic, daily order volume for individual dishes, menu price for individual dishes, daily total revenue, daily purchase price, food waste rate, and fixed operating cost data; The daily purchase price refers to the unit price recorded for each purchase of ingredients, and this unit price is used as the cost basis for daily ingredient consumption until the next purchase of similar ingredients occurs and the base unit price is updated. The food waste rate is quantified as the mass ratio of the amount of waste food to the total amount of that type of food purchased within a procurement cycle. The fixed operating cost data includes at least: water fees, electricity fees, gas fees, property management fees, store rent, and labor costs; The data on daily foot traffic, daily order volume for individual dishes, menu price for individual dishes, total daily revenue, daily purchase price, and food waste rate are linked to the corresponding dates to form a set of daily data. The expense types in the fixed operating cost data are linked to the single period of their settlement to form a set of time period data; Based on daily data, holidays, weather, surrounding business district activities, and changes in transportation capacity are marked on the date using manual or automatic reading methods, and labels are set. The daily data is preprocessed, and the preprocessing includes at least: outlier removal, missing value filling, data normalization, and one-hot encoding of non-numerical features; The time-period data is preprocessed by standardization and one-hot encoding of non-numerical features.

[0017] This can be explained as follows: data collection is a crucial component of intelligent revenue analysis and inventory optimization for restaurants. It requires extracting and quantifying every relevant and closely related parameter from the restaurant's historical operational data. Specifically, the "manual or automatic reading method" refers to: manually marking dates for infrequent changes in surrounding business district activities and transportation capacity; and using interfaces with calendar services and online meteorological data to obtain real-time holiday tags (such as Mid-Autumn Festival, New Year's Day, Dragon Boat Festival, etc.) and weather tags (sunny, cloudy, partly cloudy, heavy rain, heavy fog, etc.). (etc.), and output their labels and corresponding dates synchronously; it should be further explained that for fixed operating cost data and other fixed operating costs settled on a monthly or longer period, since they are relatively constant in the short term (daily / week) and have no direct, quantifiable linear relationship with the dynamic business volume of a single day, it is only necessary to record the total amount within one period of fixed operating cost data settlement, without quantifying it to a specific date, and combine the fixed operating cost data with the time period of one period, which can be used as a known macro financial parameter for overall consideration in long-term strategic planning or final profit accounting; The calculation of the average daily cost and average daily ingredient cost percentage for each material, based on the daily order volume, menu price, and daily purchase price, specifically includes: Obtain the ingredient combination for a single dish, wherein the ingredient combination includes: ingredient name and weight; Based on the combination of ingredients, calculate the average daily usage of each ingredient for each dish, taking into account the daily order volume. Calculate the average daily cost of each material based on the average daily usage and the daily purchase price. Calculate the daily ingredient cost percentage based on the price of each item on the menu and the average daily cost of each ingredient.

[0018] The core operational challenge in restaurants lies in balancing "uncertain sales" with "certain inventory." By introducing a "material bundle" (i.e., the Bill of Materials), the abstract daily order volume for individual dishes can be precisely broken down into the average daily usage of each ingredient. This transformation shifts inventory management from rough estimations based on experience to precise calculations based on real sales data, a prerequisite for subsequent inventory optimization. Based on the average daily usage and purchase price of ingredients, the average daily cost of each ingredient can be calculated. By breaking down the total ingredient cost to the smallest material unit, cost "transparency" is achieved. Furthermore, by aggregating the average daily cost of all ingredients and comparing it with the individual menu prices, the following calculations can be made. The daily average ingredient cost ratio is derived, which is the gold standard for measuring the operational efficiency and profitability of a restaurant's kitchen. The entire calculation process relies on the deterministic mapping relationship of material combinations. As long as the recipe is standardized, this mapping is an accurate mathematical function. All input data (sales volume, price, BOM) comes from the records that are inevitably generated in the daily information operation of the restaurant, and the data source is reliable. It should be further explained that although the actual consumption of ingredients may deviate from the standard recipe due to differences in operation in a specific single dish preparation, the core of this solution is to make macro-level decisions based on statistical laws, rather than pursuing absolute accuracy in a single operation. Such reasonable fluctuations at the micro level do not affect the effectiveness and accuracy of the system at the macro-level operation. The expression for the average daily usage of each material is as follows: In the formula, For the first The material in the first Total usage per day For the first Single-item dishes in Daily food order volume For the first The first ingredient combination of a single dish The weight of the material For the first The total number of individual dishes sold at the venue; The daily average cost expression for each material is as follows: In the formula, For the first The material in the first Total cost per day For the first The material in the first Purchase price per day; The expression for the daily average ingredient cost percentage is as follows: In the formula, For the first Daily average ingredient cost percentage No. Single item menu price, For the first The total number of types of materials used in the heavens.

[0019] Reference Figure 2 As shown, the construction of the material price market fluctuation model to predict material price market fluctuations specifically includes: The sources of the procured materials include: fixed suppliers and mobile suppliers; For a fixed supplier, extract the complete historical purchase unit price sequence of materials supplied by that supplier; Calculate the average price of the series in each procurement cycle, and use the average price of that cycle as the benchmark price for that cycle; Based on the exponential smoothing method, the cyclical benchmark price series is modeled and predicted to obtain the benchmark price prediction value for several future cycles. This prediction value is considered constant in the future cycles. For mobile suppliers, based on the full historical data, extract every historical purchase record of materials from all mobile suppliers to form a mobile supplier sample set; For each purchase record in the sample set of mobile suppliers, extract and construct its feature vector, which includes: time-series features, context labels and purchase attributes; Based on the training sample set of mobile suppliers, a quantile regression forest model is trained, and the model outputs a table of predicted quantiles for the purchase unit price of mobile suppliers. Based on fixed and mobile suppliers, a material price market fluctuation model is constructed to predict material price market fluctuation data by inputting the purchase date.

[0020] It can be explained that fluctuations in market material prices are a significant factor affecting restaurant intelligent revenue analysis and inventory optimization. This solution, starting from supplier stability, employs a differentiated strategy to quantify price fluctuations: For fixed suppliers, whose prices exhibit cyclical stepwise changes, an exponential smoothing method is used to predict the cyclical average price series. This method, by smoothing historical series with exponentially decreasing weights, effectively captures trends, and the predicted results serve as a constant benchmark price for future periods, aligning with the management expectations of long-term contract pricing models. For mobile suppliers, whose prices exhibit high volatility and contextual dependence, this solution transforms price prediction into conditional probability distribution prediction, constructing a multi-dimensional feature vector for each historical purchase. This vector includes not only the date itself... The time-series features also integrate contextual labels and purchasing attributes that influence market supply and demand, thereby quantifying information on "when to buy" and "under what market conditions to buy." This is learned through a non-parametric model called quantile regression forest. The time-series features refer to weekday features, holiday features, and month features derived from the purchase date; the contextual labels refer to the weather, surrounding business district activities, and transportation capacity changes corresponding to the date (obtained by aligning the date with historical full data); and the purchasing attributes refer to the purchase quantity and market channel identifier (processed with unique hot coding). The purchase price of the purchase record is used as the prediction target label, and all records are paired (feature vector, purchase price) to form a training sample set for mobile suppliers. It needs to be explained in detail that the exponential smoothing method assigns exponentially decreasing weights to data from different periods in a historical benchmark price series and performs a weighted average of the series to capture and extrapolate the basic level, trend, and seasonality of the changes. In practice, firstly, an appropriate family of exponential smoothing models (e.g., the Holt-Winters seasonality model) is selected based on the characteristics of the series (e.g., whether there is a trend or seasonality). Then, the optimal smoothing parameters (including the level smoothing coefficient, trend smoothing coefficient, and seasonal smoothing coefficient) are determined through optimization algorithms (e.g., minimizing the mean square error). After the model is trained, the final state estimate is used to recursively generate the benchmark price forecast for one or more future periods according to the prediction formula of the exponential smoothing method. Since the direct object of this method in modeling and prediction is the benchmark price of the period, its output naturally corresponds to the overall price level of each future period. Therefore, within each target period, the predicted value is regarded by the system as a constant benchmark purchase price. This process transforms the discrete, stepped period price series into a continuous, smooth, and extrapolable period price trend line, thereby achieving stable prediction and forward-looking management of price fluctuations of fixed suppliers under the contract pricing model. It is necessary to explain in detail the operating mechanism of the quantile regression forest (QRF) model: The training process of the quantile regression forest model includes: Multiple sub-training sets are generated using bootstrap sampling with replacement, and a regression decision tree is constructed for each sub-training set; in each leaf node of each tree, the set of purchase unit prices of the training samples falling into that node is stored. The prediction process of the quantile regression forest model includes: For a future target purchase date, construct its feature vector; input the feature vector into the trained model, making it traverse each tree and reach a leaf node. For each tree, input the feature vector to reach a leaf node and record the sample value stored at that node; integrate the sample values ​​recorded by all trees to form the empirical conditional distribution of the purchase unit price on that date; sort this empirical distribution by value from smallest to largest, and calculate the corresponding quantile value through linear interpolation according to the preset quantile point 'a'; output the predicted quantile table of the purchase unit price on that date. It is necessary to further explain the operating mechanism of the Quantile Regression Forest (QRF) model: During model training, QRF learns the complex mapping between features and prices by constructing multiple decision trees. When splitting, each tree aims to maximize the price distribution difference among samples in its child nodes (e.g., optimizing the quantile loss function), rather than minimizing the mean squared error of traditional regression trees. After training, the leaf nodes of each tree no longer store a single average value, but instead store all the original price samples falling into that node. When predicting the model's distribution, when predicting the future target purchase date, that date is assigned to a leaf node according to the rules of each tree. The model aggregates the historical price samples stored in the corresponding leaf nodes of all trees. The samples collectively constitute an empirical distribution of possible prices given the characteristics of that date. This is equivalent to finding all transaction records similar to that date scenario in history and using their actual transaction prices to depict the probability of future prices. It should be added that, in order to achieve the prediction of the complete conditional distribution, the quantile regression forest can, during training, set different target quantiles 'a' for different trees in the forest (e.g., some trees are dedicated to optimizing the loss for a=0.1, and others for a=0.5, etc.), or use a single target quantile (e.g., a=0.5) but introduce diversity through bootstrapping and random feature selection, and finally approximate the complete empirical distribution by integrating the prediction samples of all trees. The output of the predicted quantile table of the purchase unit price for that date specifically includes: Based on the empirical distribution of purchase unit prices and sorting the sequence from smallest to largest according to this empirical distribution, calculate the theoretical position of the value 'a' within this sequence. , This represents the total number of samples in the resulting empirical price distribution; Since the index is usually not an integer, linear interpolation is needed to determine the final quantile value between two adjacent ordered samples. ,in, , For the sorted sequence, the first... The and the first A sample value of the unit price of the purchase. The integer part of the index. The decimal part of the index; where, if ,but ,like ,but ; Specifically, the preset value of 'a' includes: When a=0.5, it represents the median forecast, which is the most robust and typical price forecast. When a=0.1 and a=0.9, these are the upper and lower bounds of the 80% confidence interval for prediction, indicating the range of price fluctuations. When a=0.05 and a=0.95, these are the upper and lower bounds of the 90% confidence interval for prediction, indicating the range of price fluctuations. The output of price market fluctuation data, namely the market fluctuation analysis module's prediction of the price of mobile suppliers, uses the median of the quantile table (a=0.5) as the benchmark predicted unit price output, and simultaneously provides its 80% confidence interval (a=0.1 and a=0.9). The benchmark unit price is used for cost calculation, and the confidence interval width serves as a characteristic of price volatility risk, which can be input into subsequent procurement decision models or used for visual early warning.

[0021] Reference Figure 3 As shown, the construction of the revenue analysis and inventory optimization model, and the output of the material purchase quantity for the next procurement cycle, specifically includes: For each procurement cycle in the historical full data, extract the daily traffic, daily order volume of single dishes, single menu price, daily total revenue, daily procurement price and food waste rate, as well as the derived daily average food cost ratio and the predicted market fluctuation of material prices as inputs, and use the material procurement volume of the next procurement cycle as output. Since there are multiple types of materials, the output is a multi-dimensional vector, with each dimension corresponding to the purchase quantity of a type of material. Based on the historical full data, the input and output quantities of different procurement cycles are extracted to create a training sample set, which is then divided into a training set, a validation set, and a test set. The input quantity of one cycle and the purchase quantity of the next cycle constitute a set of data. If the purchase quantity data of the next cycle is of poor quality, a target purchase quantity is set based on expert experience. Construct a multi-branch neural network model, which includes a multi-branch temporal encoder, with each branch consisting of an LSTM network; A shared feature fusion layer is added after the output layer of all branches, and the hidden state of the last time step of each branch is concatenated in the feature dimension to output a multi-dimensional fused feature vector. Based on this fused feature vector, three parallel fully connected output layers are constructed: the procurement quantity decision layer, the demand forecasting layer, and the waste risk forecasting layer. Among them, the procurement volume decision layer outputs the material procurement volume for the next procurement cycle, the demand forecasting layer outputs the predicted food demand for the next cycle, and the waste risk forecasting layer outputs the theoretical waste rate risk value for the next cycle. The loss function is a weighted sum of the mean square error between the predicted purchase quantity and the next purchase quantity, the inventory holding cost penalty, the expected waste penalty, and the expected stockout penalty; During model training, the Adam optimizer is used to minimize the loss function. The trained model is the revenue analysis and inventory optimization model. The model deployment unit is used to feed the input data of the period to be predicted into the model during actual deployment and application, and to use the output of the procurement quantity decision layer as the final material procurement quantity recommendation.

[0022] This can be explained by the fact that while quantifying historical full data, the daily average ingredient cost ratio, and market fluctuation data for predicted material prices, it's impossible to directly and intuitively understand how to optimize inventory using this data. There's a lack of a quantitative relationship to fit and map this data to the material procurement volume for the next procurement cycle. Therefore, this solution uses a multi-branch neural network model to extract the temporal features of each type of data. By using daily collected historical full data and derived daily average ingredient cost ratio and market fluctuation data for predicted material prices, a feature vector with temporal regularity is generated. Then, a fully connected decision layer is used to construct the mapping relationship between this feature vector and the material procurement volume for the next procurement cycle, thereby predicting the material procurement volume for the next procurement cycle. It should be noted that this solution constructs a multi-task learning model. Demand forecasting and waste risk prediction are auxiliary tasks; their core purpose is not directly for the final procurement decision, but rather to share the feature extraction network (multi-branch LSTM and fusion layer) with the main procurement decision task during training. During training, the network learns general feature representations that are more sensitive and robust to sales trends, cost fluctuations, and inventory risks. This architecture enables the model to inherently and collaboratively consider demand satisfaction and risk control when optimizing procurement quantities. After training, in the actual inference phase, the system only needs to call the output of the main task—the procurement quantity decision layer—to obtain intelligent procurement suggestions that have internalized multi-objective balance, balancing model complexity with simple and efficient deployment. The demand forecasting layer and waste risk forecasting layer, as auxiliary task heads, share the feature extraction network with the main task head of the procurement quantity decision layer, forming a multi-task learning architecture. Poor data quality refers to situations in sample creation where procurement quantity data records are missing, zero (and not due to reasonable business closure), or exceed the range of ±3 standard deviations of the historical average. The expert experience-set target procurement quantity refers to, during the model training phase, for samples with poor data quality, determining an estimated value based on expert scoring by referencing the order volume, revenue, and historical procurement patterns of the same period to repair the training labels. The loss function expression is as follows: In the formula, This is the total loss function value. To calculate the mean squared error between the predicted purchase quantity and the next purchase quantity, Penalty for inventory holding costs, Punishment for anticipated waste As a penalty for anticipated shortages, , , The hyperparameters are determined using cross-validation on a validation set. It should be further clarified that both the inventory holding cost penalty and the anticipated stockout penalty are calculated based on simulated ending inventory (ending inventory = predicted purchase quantity + current inventory - predicted demand quantity). However, both apply penalties based on different inventory states to achieve a balance between cost and service level. Specifically: the inventory holding cost penalty applies to scenarios where ending inventory is positive, penalizing inventory backlog caused by over-purchasing. The penalty cost is proportional to the amount of backlogged inventory, encouraging the system to reduce capital occupation and warehousing losses. The anticipated stockout penalty applies to scenarios where ending inventory is negative. In this case, the system calculates the estimated stockout quantity (i.e., the absolute value of negative inventory), and the penalty cost is proportional to this stockout quantity, incentivizing the system to ensure supply and avoid lost sales opportunities. The anticipated waste penalty aims to guide the system to proactively reduce food waste caused by over-purchasing, calculated based on simulated ending inventory. Specifically: The value is obtained by multiplying the ending inventory by the portion exceeding the safety stock. The portion exceeding the safety stock is determined according to the following rules: if the ending inventory is greater than the safety stock, the difference between the two is taken; if the ending inventory is less than or equal to the safety stock, the value of this portion is 0. The ending inventory = beginning inventory + model predicted purchase quantity - actual consumption in the current period. The safety stock is set based on historical reasonable inventory levels, specifically the 70th percentile of the ending inventory over the past 30 purchasing cycles. Through the combined effect of these three penalty mechanisms targeting inventory backlog, supply shortages, and food waste, the model is guided to discover a comprehensive optimal purchasing strategy during end-to-end training. This strategy can proactively weigh and minimize inventory holding costs, stockout losses, and food waste losses while meeting predicted demand, ultimately achieving a dynamic balance between inventory costs, service levels, and operational efficiency.

[0023] The process of comprehensively verifying and evaluating the reliability of the revenue analysis and inventory optimization model, and verifying the actual prediction results of the revenue analysis and inventory optimization model through A / B testing, specifically includes: Based on the revenue analysis and inventory optimization model, and using the test set, the root mean square error, mean absolute percentage error, and coefficient of determination between the predicted purchase quantity and the actual purchase quantity output by the model are calculated respectively. Plot the loss curves for the training and validation sets, observe the loss function decreases steadily during training, and verify the stability of the model's learning. A / B testing was used to quantify the actual business value of the model and assess its statistical significance.

[0024] It can be explained that after the revenue analysis and inventory optimization model is built, it is necessary to comprehensively verify and evaluate its credibility to assess whether the model is feasible and implementable. Therefore, this solution uses a test set to verify the root mean square error, mean absolute percentage error and coefficient of determination between the model's predicted purchase volume and the actual purchase volume. It also uses A / B testing to quantify the model's actual business value and evaluate its statistical significance, thereby determining whether the model is credible and applicable. The A / B testing method used to quantify the actual business value of the model and evaluate its statistical significance specifically includes: Select a set of complete historical data from several complete procurement cycles in the past; The multi-dimensional fusion feature vector generated from all historical data from the beginning to the end of each procurement cycle is input into the revenue analysis and inventory optimization model to obtain the predicted procurement volume for each procurement cycle. By aligning dates, the actual purchase volume of the restaurant for each corresponding procurement period can be retrieved from the historical full data. Using the actual food consumption in each historical procurement cycle as a unified baseline demand, we simulated the business outcomes under two procurement strategies: The calculation model predicts the ending inventory under the group strategy, i.e., ending inventory = beginning inventory + model predicted purchase quantity - actual consumption during the period. Calculate the ending inventory under the actual implementation of the group policy, i.e., ending inventory = beginning inventory + actual purchase quantity - actual consumption during the period; Compare the periodic average of the ending inventory of the model prediction group and the actual execution group. If the difference between the average of the actual execution group and the average of the model prediction group is greater than the preset threshold b1, it indicates that the model strategy can effectively reduce inventory backlog. The number of periods with negative ending inventory in the model prediction group and the number of periods with negative ending inventory in the actual execution group are statistically analyzed. If the difference between the number of periods in the actual execution group and the number of periods in the model prediction group is greater than the preset threshold b2, it indicates that the model strategy has reduced the frequency of stockouts in the simulation environment. Calculate the total amount of ending inventory exceeding the preset safety stock threshold b3 in the model prediction group and the actual execution group respectively. If the difference between the total amount in the actual execution group and the total amount in the model prediction group is greater than the preset threshold b4, it indicates that the model strategy has effectively reduced the risk of inventory backlog that may lead to food waste. The quantification of waste risk in the A / B test is achieved by calculating the total amount of simulated ending inventory that exceeds the safety stock threshold b3. The threshold b3 is determined using the historical quantile method, that is, based on the full historical data, the 70th percentile of the ending inventory of all procurement cycles is calculated, and this value is set as the safety stock threshold b3. The portion of simulated ending inventory that exceeds this threshold b3 is defined as abnormal high-risk inventory that may lead to waste. Further explanation of the basis for determining thresholds b1, b2, and b4, and the methods for evaluating statistical significance: Thresholds b1 (inventory reduction) and b4 (waste reduction) are determined based on the principle of business significance, and are usually set at 5%-15% of the actual average level in the same period of history, or based on the standard deviation multiple of historical data, to ensure that the improvement of the model has clear operational value; threshold b2 (stockout reduction) adopts the principle of risk control priority, and is usually set at the point that the number of stockout cycles in the model prediction group is no more than that in the actual execution group, and is reduced by at least 1 cycle. To scientifically assess whether this difference exceeds random fluctuations, statistical hypothesis testing is required for quantitative judgment: for inventory and waste, a paired-samples t-test is used to compare the difference in the means of the two groups; for stockout rate, a McNemar test is used to compare the difference in stockout frequency between the two groups. Only when the business improvement meets the threshold requirements and shows statistical significance (usually p-value < 0.05) can the model be determined to be reliable and effective in A / B testing.

[0025] The step of building a visualization platform based on inventory optimization process data and model validation data, and storing and generating visualization reports specifically includes: Build a visualization platform to store and generate visualization reports, which specifically include: The system displays daily inventory optimization process data and fixed operating cost data in the form of digital dashboards. The process data includes at least: the full data for the day, the average daily usage and cost of each material, the average daily percentage of food cost, the benchmark price forecast, and the purchase unit price forecast quantile table. The system lists the intelligently recommended procurement list for the next procurement cycle in tabular form, including ingredient name, recommended procurement quantity, current inventory, predicted unit price, and predicted price fluctuation range. The trend of daily average ingredient cost percentage, sales volume of individual dishes, and ingredient purchase price changes over the past few days is shown in the line chart. Show the model's evaluation metrics on the test set: root mean square error, mean absolute percentage error, and coefficient of determination, and plot the training loss versus validation loss curves. The differences between the model prediction group and the historical actual execution group in three key indicators—average ending inventory level, number of stockout cycles, and excess of high-risk inventory—are shown in the form of a comparative bar chart.

[0026] It can be explained that the purpose of the visualization report is to transform complex multi-source data, model calculation processes and optimization results into intuitive information that managers can quickly understand and directly use for decision-making. Through multiple types of structured dashboards, the system realizes the transparent presentation of the entire chain from micro-level operational data (costs, sales), to meso-level decision-making suggestions (purchasing lists), and then to macro-level model effectiveness and historical comparison verification. This enables the intelligent analysis results to be seamlessly integrated into the restaurant's daily management process, supporting data-driven and accurate decision-making.

[0027] In summary, the advantages of this invention are: it achieves full-chain automation and precision from cost analysis to inventory decision-making, thereby reducing procurement costs, inventory backlog, and food waste while ensuring supply.

[0028] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.

Claims

1. A restaurant intelligent revenue analysis and inventory optimization system, characterized in that, include: A data processing module is used to acquire all historical data of restaurant operations and perform preprocessing. The cost percentage module is used to calculate the average daily cost and average daily ingredient cost percentage of each material based on the daily order volume of each dish, the menu price of each dish, and the daily purchase price. The market fluctuation analysis module is used to construct a material price market fluctuation model based on the historical purchase price and source of the material, and to predict the market fluctuation of material prices. The procurement volume forecasting module is used to construct a revenue analysis and inventory optimization model based on historical full data, combined with the daily average food cost ratio and predicted market fluctuations in material prices, and output the material procurement volume for the next procurement cycle. The model validation module is used to comprehensively validate and evaluate the reliability of the revenue analysis and inventory optimization model, and to verify the actual prediction results of the revenue analysis and inventory optimization model through A / B testing. The visualization module is used to build a visualization platform, store and generate visualization reports based on inventory optimization process data and model validation data.

2. The restaurant intelligent revenue analysis and inventory optimization system according to claim 1, characterized in that, The acquisition and preprocessing of historical full data on restaurant operations specifically includes: The full data includes: daily foot traffic, daily order volume for individual dishes, menu price for individual dishes, daily total revenue, daily purchase price, food waste rate, and fixed operating cost data; The daily purchase price refers to the unit price recorded for each purchase of ingredients, and this unit price is used as the cost basis for daily ingredient consumption until the next purchase of similar ingredients occurs and the base unit price is updated. The food waste rate is quantified as the mass ratio of the amount of waste food to the total amount of that type of food purchased within a procurement cycle. The fixed operating cost data includes at least: water fees, electricity fees, gas fees, property management fees, store rent, and labor costs; The data on daily foot traffic, daily order volume for individual dishes, menu price for individual dishes, total daily revenue, daily purchase price, and food waste rate are linked to the corresponding dates to form a set of daily data. The expense types in the fixed operating cost data are linked to the single period of their settlement to form a set of time period data; Based on daily data, holidays, weather, surrounding business district activities, and changes in transportation capacity are marked on the date using manual or automatic reading methods, and labels are set. The daily data is preprocessed, and the preprocessing includes at least: outlier removal, missing value filling, data normalization, and one-hot encoding of non-numerical features; The time-period data is preprocessed by standardization and one-hot encoding of non-numerical features.

3. The restaurant intelligent revenue analysis and inventory optimization system according to claim 2, characterized in that, The calculation of the average daily cost and average daily ingredient cost percentage for each material, based on the daily order volume, menu price, and daily purchase price, specifically includes: Obtain the ingredient combination for a single dish, wherein the ingredient combination includes: ingredient name and weight; Based on the combination of ingredients, calculate the average daily usage of each ingredient for each dish, taking into account the daily order volume. Calculate the average daily cost of each material based on the average daily usage and the daily purchase price. Calculate the daily ingredient cost percentage based on the price of each item on the menu and the average daily cost of each ingredient.

4. The restaurant intelligent revenue analysis and inventory optimization system according to claim 3, characterized in that, The method of constructing a material price market fluctuation model based on historical material purchase prices and material sources to predict material price market fluctuations specifically includes: The sources of the procured materials include: fixed suppliers and mobile suppliers; For a fixed supplier, extract the complete historical purchase unit price sequence of materials supplied by that supplier; Calculate the average price of the series in each procurement cycle, and use the average price of that cycle as the benchmark price for that cycle; Based on the exponential smoothing method, the cyclical benchmark price series is modeled and predicted to obtain the benchmark price prediction value for several future cycles. This prediction value is considered constant in the future cycles. For mobile suppliers, based on the full historical data, extract every historical purchase record of materials from all mobile suppliers to form a mobile supplier sample set; For each purchase record in the sample set of mobile suppliers, extract and construct its feature vector, which includes: time-series features, context labels and purchase attributes; Based on the training sample set of mobile suppliers, a quantile regression forest model is trained, and the model outputs a table of predicted quantiles for the purchase unit price of mobile suppliers. Based on fixed and mobile suppliers, a material price market fluctuation model is constructed to predict material price market fluctuation data by inputting the purchase date.

5. The restaurant intelligent revenue analysis and inventory optimization system according to claim 4, characterized in that, The procurement volume forecasting module specifically includes: The input / output unit is used to extract the daily traffic, daily order volume of single dishes, single menu price, daily total revenue, daily purchase price and food waste rate, as well as the derived daily average food cost ratio and predicted market fluctuations of material prices as inputs for each procurement cycle in the historical full data, and the material procurement volume of the next procurement cycle as outputs. Since there are multiple types of materials, the output is a multi-dimensional vector, with each dimension corresponding to the purchase quantity of a type of material. The sample set unit is used to extract the input and output quantities of different procurement cycles based on the historical full data, create a training sample set, and divide it into a training set, a validation set, and a test set. The input quantity of one cycle and the purchase quantity of the next cycle constitute a set of data. If the purchase quantity data of the next cycle is of poor quality, a target purchase quantity is set based on expert experience. A model building unit is used to build a multi-branch neural network model, the model containing a multi-branch temporal encoder, each branch consisting of an LSTM network; The feature extraction unit is used to connect a shared feature fusion layer after the output layer of all branches, and concatenate the hidden state of the last time step of each branch in the feature dimension to output a multi-dimensional fused feature vector. The fully connected layer unit is used to construct three parallel fully connected output layers based on the fused feature vector, namely the procurement quantity decision layer, the demand forecasting layer, and the waste risk forecasting layer. Among them, the procurement volume decision layer outputs the material procurement volume for the next procurement cycle, the demand forecasting layer outputs the predicted food demand for the next cycle, and the waste risk forecasting layer outputs the theoretical waste rate risk value for the next cycle. The loss function unit is used to calculate the weighted sum of the mean square error between the predicted purchase quantity and the next purchase quantity, the inventory holding cost penalty, the expected waste penalty, and the expected stockout penalty. The model training unit is used to minimize the loss function and train the model using the Adam optimizer during the model training process. The trained model is the revenue analysis and inventory optimization model. The model deployment unit is used to feed the input data of the period to be predicted into the model during actual deployment and application, and to use the output of the procurement quantity decision layer as the final material procurement quantity recommendation.

6. The restaurant intelligent revenue analysis and inventory optimization system according to claim 5, characterized in that, The process of comprehensively verifying and evaluating the reliability of the revenue analysis and inventory optimization model, and verifying the actual prediction results of the revenue analysis and inventory optimization model through A / B testing, specifically includes: Based on the revenue analysis and inventory optimization model, and using the test set, the root mean square error, mean absolute percentage error, and coefficient of determination between the predicted purchase quantity and the actual purchase quantity output by the model are calculated respectively. Plot the loss curves for the training and validation sets, observe the loss function decreases steadily during training, and verify the stability of the model's learning. A / B testing was used to quantify the actual business value of the model and assess its statistical significance.

7. The restaurant intelligent revenue analysis and inventory optimization system according to claim 6, characterized in that, The step of building a visualization platform based on inventory optimization process data and model validation data, and storing and generating visualization reports specifically includes: Build a visualization platform to store and generate visualization reports, which specifically include: The system displays daily inventory optimization process data and fixed operating cost data in the form of digital dashboards. The process data includes at least: the full data for the day, the average daily usage and cost of each material, the average daily percentage of food cost, the benchmark price forecast, and the purchase unit price forecast quantile table. The system lists the intelligently recommended procurement list for the next procurement cycle in tabular form, including ingredient name, recommended procurement quantity, current inventory, predicted unit price, and predicted price fluctuation range. The trend of daily average ingredient cost percentage, sales volume of individual dishes, and ingredient purchase price changes over the past few days is shown in the line chart. Show the model's evaluation metrics on the test set: root mean square error, mean absolute percentage error, and coefficient of determination, and plot the training loss versus validation loss curves. The differences between the model prediction group and the historical actual execution group in three key indicators—average ending inventory level, number of stockout cycles, and excess of high-risk inventory—are shown in the form of a comparative bar chart.