Food sales data management system based on big data
By designing a food sales data management system based on big data, combining automation technology and multiple prediction algorithms, an effective closed loop between inventory management and pricing strategies is achieved, solving the problem of insufficient response of traditional systems in a rapidly changing market environment, and improving operational efficiency and inventory utilization.
Patent Information
- Application Number
- CN202411798054.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-04-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The traditional food sales data management system lacks an effective closed loop between inventory management and pricing strategies, resulting in insufficient response speed and decision-making accuracy in the face of a rapidly changing market environment, increasing operational risks.
A food sales data management system based on big data is designed, including inventory management module, sales data analysis module, inventory adjustment module and pricing optimization module. Inventory data is updated in real time through automation technology, demand prediction is carried out in combination with time series prediction ARIMA model, multiple regression analysis and random forest algorithm, and pricing strategy is dynamically adjusted based on the prediction results.
Real-time monitoring and response to market demand and inventory status is achieved, the system's ability to respond to market changes is improved, inventory backlog and out of stock is reduced, pricing strategies are optimized, and inventory utilization efficiency is maximized.
Smart Images

Figure CN119741049A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of food sales data management, and in particular to a food sales data management system based on big data. Background Art
[0002] In the current food sales data management, for products with short life cycles and large demand fluctuations such as fresh food and fast-moving consumer goods, whether their inventory management and pricing strategies match is one of the key factors affecting sales data; traditional inventory management methods mostly rely on manual forecasts and static rules, which make it difficult to respond to changes in market demand in a timely manner, resulting in frequent problems such as inventory backlogs, product expiration and waste, and out-of-stock situations.
[0003] Specifically, when managing inventory, merchants are unable to flexibly adjust inventory levels based on the shelf life, sales cycle, and real-time changes in market demand for food, resulting in frequent oversupply or shortages. At the same time, pricing strategies and inventory management systems are separated from each other, and fail to effectively combine inventory data and demand fluctuations for dynamic adjustments. Traditional pricing models are mainly based on historical sales data, seasonal changes, and market trends for forecasting, but due to the lack of real-time inventory information and the ability to respond quickly to changes in demand, pricing plans often lag behind actual market conditions, making it difficult to maximize inventory utilization efficiency. During promotional activities or sudden increases in demand, merchants often miss sales opportunities due to insufficient inventory. When demand is low, they may lose profits due to excessively low pricing. This fails to effectively balance the relationship between sales and inventory management. Therefore, there is an urgent need for a food sales data management system based on big data to solve such problems. Summary of the invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] The present invention provides a food sales data management system based on big data to solve the problem that the traditional food sales data management system cannot form an effective closed loop between inventory management and pricing strategy, and when facing a rapidly changing market environment, the response speed and decision-making accuracy are insufficient, which increases the operational risk.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] The embodiment of the present invention provides a food sales data management system based on big data, which includes:
[0008] Inventory management module, responsible for real-time monitoring and management of food inventory;
[0009] The inventory management module uses automated technology to update inventory data in real time, including product quantity, shelf life, and storage location;
[0010] The sales data analysis module analyzes market demand trends and seasonal fluctuations based on the real-time inventory data collected by the inventory management module and combines it with historical sales records, and uses forecasting algorithms to predict future demand;
[0011] In the sales data analysis module, the time series forecasting ARIMA model is used for time series analysis, and regression analysis and random forest are combined for demand forecasting;
[0012] The inventory adjustment module adjusts the pricing based on the commodity demand data provided by the demand forecasting module, combined with the market demand, inventory status and shelf life of the commodity;
[0013] If the demand for a product is low and there is excess inventory, lower the price;
[0014] If inventory is tight and demand is high, increase prices;
[0015] Lower prices for products that are close to expiration;
[0016] The pricing optimization module monitors actual sales results, inventory changes and customer feedback information, and adjusts the forecasting model and pricing strategy.
[0017] As a preferred solution of the food sales data management system based on big data described in the present invention, wherein: in the pricing optimization module, the effectiveness of the pricing strategy is evaluated based on the actual sales data and customer purchasing behavior feedback; the sales data and inventory changes are incorporated into the demand forecast and pricing strategy adjustment, and future forecast results are adjusted; and based on the sales results and inventory data, the forecast model and pricing strategy are automatically adjusted through a machine learning algorithm.
[0018] As a preferred solution of the food sales data management system based on big data described in the present invention, the management method of the food sales data management system based on big data is:
[0019] Step S1, real-time collection of inventory data, including the quantity, shelf life and storage location of each product;
[0020] Step S2: Based on the collected inventory data and combined with historical sales records, market demand trends and seasonal fluctuations are analyzed, and time series analysis is performed using the time series forecasting ARIMA model; based on the time series analysis results of historical sales data, combined with subsequent holidays and promotional activities, regression analysis and random forest machine learning algorithms are used to perform demand forecasting to predict commodity demand in the future;
[0021] Step S3, formulate a pricing plan for each product based on the product demand predicted in step S2:
[0022] Automatically lower prices when inventory is high and demand is low,
[0023] Automatically raise prices when inventory is tight and demand is high,
[0024] Automatically lower prices for products approaching expiration;
[0025] Step S4, evaluating the effectiveness of the pricing strategy in step S3 based on actual sales data and customer purchase behavior feedback;
[0026] The method for evaluating the effectiveness of the pricing strategy in step S3 in step S4 is to incorporate sales data and inventory changes into demand forecasting and pricing strategy adjustments, adjust future forecast results, and use machine learning algorithms to automatically adjust the forecasting model and pricing strategy based on sales results and inventory data.
[0027] As a preferred solution of the food sales data management system based on big data described in the present invention, the step of using the time series prediction ARIMA model to perform time series analysis is as follows:
[0028] To perform time series analysis:
[0029] The collected historical sales records are constructed into a time series Y in chronological order, where Y = {y1, y2, …, y T}, where y t represents the sales volume of goods in time t, and T is the total length of the time series;
[0030] If the sequence is non-stationary, perform difference processing to construct a stationary sequence Y′:
[0031] y′ t =y t -y t-1 ,t=2,3,…,T, where y′ t is the sequence value after difference, y t ,y t-1 are the original sales at time t and t-1, respectively,
[0032] If the first difference is not enough to stabilize the sequence, the second difference is performed, and the difference formula is:
[0033] y″ t =y′ t -y′ t-1 ,t=3,4,…,T, where y″ t ″ is the sequence value after secondary difference;
[0034] For the stationary series after difference, calculate its autocorrelation function ACF and partial autocorrelation function PACF, and determine the three parameters p, d, q of the ARIMA model, expressed as: ARIMA (p, d, q), where p is the autoregressive AR order, d is the number of differences, and q is the moving average MA order;
[0035] After fitting the ARIMA model with historical data, the sales volume for the next k time periods is predicted. The prediction formula is:
[0036]
[0037] in, is the predicted sales volume for the T+kth time period, φ1, φ2, ... are autoregressive coefficients, θ1, θ2 are moving average coefficients, ε T+k-1 and ε T+k-2 are the error terms at time T+k-1 and T+k-2 respectively.
[0038] As a preferred solution of the food sales data management system based on big data described in the present invention, the step of using the time series prediction ARIMA model to perform time series analysis also includes:
[0039] Combine holidays and promotions to forecast demand:
[0040] According to the historical sales data, a multi-factor linear regression model is constructed, and the model expression is:
[0041] y t =β0+β1x1+β2x2+β3x3+ε t , where y t is the sales volume of goods at time t, β0, β1, β2, β3 are regression coefficients, ε t is the regression residual, x1 is the holiday effect, x2 is the intensity of promotion activities, x3 is the seasonal change,
[0042] By training the model with historical data, we can get the regression coefficient β i , used to predict future demand;
[0043] Combined with the random forest algorithm, the time series analysis results are predicted and external factors into a feature vector X,
[0044] Random forest constructs multiple decision trees to predict future demand. The prediction formula is:
[0045]
[0046] in, is the predicted sales volume for the T+kth time period, n is the number of decision trees in the random forest, and f i (X) is the predicted value of the i-th decision tree;
[0047] The ARIMA model prediction value is weighted and integrated with the prediction results of multi-factor regression and random forest to obtain the final prediction value.
[0048]
[0049] in, is the ARIMA forecast result, For the regression analysis prediction results, is the prediction result of random forest, α1, α2, α3 are weighting coefficients, satisfying α1+α2+α3=1.
[0050] As a preferred solution of the food sales data management system based on big data described in the present invention, the step of formulating a pricing plan for each commodity according to the commodity demand predicted in step S2 is as follows:
[0051] Assuming that the initial price of the product is P0, combined with inventory adequacy, demand forecast and shelf life, the dynamically adjusted price P is set. t , the adjustment formula is:
[0052] P t =P0·(1+δ I +δ D +δ E ),
[0053] Among them, δ I is the impact coefficient of inventory on price, δ D is the impact coefficient of demand forecast on price, δ E is the coefficient of the shelf life on the price;
[0054] According to the inventory level, define the inventory impact coefficient δ I :
[0055] δ I =-β1·I / I max , where β1 is the inventory adjustment coefficient, I is the current inventory, and I max The price adjustment logic is: when the inventory volume I is close to I max When the inventory is sufficient, the price decreases by δ I <0, when inventory is low, price remains unchanged or increases by δ I ≈0;
[0056] Assume that the predicted demand in step S2 is Define the demand forecast impact coefficient δD for:
[0057] Among them, β2 is the demand adjustment coefficient, D avg is the historical average demand, price adjustment logic: when the demand is predicted Above average demand avg When the price increases by δ D >0, when the forecast demand is lower than the average demand, the price is reduced by δ D <0,
[0058] Assume the remaining shelf life of the product is R, and define the shelf life impact coefficient δ E for:
[0059] δ E =-β3·exp(-R / R max ), where β3 is the shelf life adjustment coefficient, R max is the maximum shelf life, and the price adjustment logic is: as the remaining shelf life R decreases, the price gradually decreases δ E <0, when the shelf life is sufficient, the price impact is small;
[0060] Substituting the above three coefficients into the price adjustment formula, we get the dynamic pricing scheme:
[0061]
[0062] As a preferred solution of the food sales data management system based on big data described in the present invention, in the step of formulating a pricing plan for each commodity, the special conditions are handled as follows:
[0063] When inventory is high and demand is low:
[0064] When I approaches I max and Adjust the δ in the formula I <0,δ D <0, the price is significantly reduced,
[0065] When inventory is tight and demand is high:
[0066] When I is low and Adjust the δ in the formula I ≈0,δ D >0, the price is significantly increased,
[0067] When a product is about to expire:
[0068] When R is very small, adjust the δ in the formula E <<0, the price has dropped significantly.
[0069] As a preferred solution of the food sales data management system based on big data described in the present invention, the steps of incorporating sales data and inventory changes into demand forecasting and pricing strategy adjustment and adjusting future forecast results are as follows:
[0070] Define the feedback feature vector used in demand forecasting model adjustment as Z t :
[0071]
[0072] Among them, S t is the actual sales volume at time t, I t is the inventory level at time t, is the demand forecast value at time t, R t is the remaining shelf life of the product at time t;
[0073] Calculate the demand forecast error ε t , the calculation formula is:
[0074]
[0075] Update the weight w of the demand forecasting model. The update formula is:
[0076]
[0077] Among them, w t is the model parameter weight at time t, η is the learning rate, is the gradient with respect to the weight.
[0078] As a preferred solution of the food sales data management system based on big data described in the present invention, the step of incorporating sales data and inventory changes into demand forecasting and pricing strategy adjustment and adjusting future forecast results also includes:
[0079] Define the feedback feature vector used in pricing strategy optimization as X t :
[0080] X t =[P t ,S t ,ΔI t ,ε t ],
[0081] Among them, P t Price the product at time t, ΔI t =I t -I t-1 is the inventory change at time t, ε t is the demand forecast error;
[0082] Linear regression and gradient boosting tree machine learning algorithms are used to optimize pricing strategies, with the goal of maximizing sales R t , R t =P t ·S t , while balancing inventory and shelf life, the optimization objective function is:
[0083]
[0084] in, The loss function optimized for pricing, R t is the sales volume at time t, λ is the inventory adjustment weight, μ is the shelf life adjustment weight, δ E is the shelf life influence coefficient,
[0085] Update the parameters θ of the pricing model using SGD stochastic gradient descent:
[0086]
[0087] Among them, θ t is the model parameter of the pricing strategy, α is the learning rate, is the gradient of the loss function with respect to the model parameters, θ t+1 The model parameters of the updated pricing strategy are obtained by minimizing the loss function Adjust the pricing model to make prices more in line with actual demand and inventory status.
[0088] As a preferred solution of the food sales data management system based on big data described in the present invention, the step of incorporating sales data and inventory changes into demand forecasting and pricing strategy adjustment and adjusting future forecast results also includes:
[0089] Comprehensive adjusted demand forecast and pricing:
[0090] The new demand forecast is:
[0091]
[0092] in, is the updated demand forecast at time t+1, w t+1 is the model weight modified according to the feedback data;
[0093] The new pricing formula is:
[0094] P t+1 =P t ·(1+δ I +δ D +δ E ),
[0095] Among them, δI ,δ D ,δ E is the dynamic coefficient of inventory, demand and shelf life, P t+1 The adjusted price.
[0096] The beneficial effects of the present invention are as follows: the present invention firstly monitors the quantity, shelf life and storage location of commodities in real time through an inventory management module, and combines the time series analysis ARIMA model, multiple regression analysis and random forest algorithm to capture the trend, seasonal fluctuation and nonlinear characteristics of demand; introduces holiday effects and promotion intensity factors for modeling, and combines the multi-model fusion method to comprehensively predict market changes; then, in view of the lack of flexibility of traditional pricing methods, dynamically adjusts commodity prices, comprehensively considers inventory levels, demand forecasts and shelf life, and automatically lowers prices when inventory is sufficient and demand is low; automatically increases prices when inventory is tight and demand is strong; and accelerates the circulation of commodities that are close to expiration by reducing prices, effectively balancing inventory turnover; in addition, introduces a feedback mechanism, incorporates sales data and inventory changes into model adjustment, and forms a closed-loop optimization; updates demand forecast weights through error correction; adjusts pricing strategy parameters by optimizing the objective function to make it more in line with actual demand; and greatly improves the system's ability to respond to market changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0097] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0098] Figure 1 This is a schematic diagram of the framework of the food sales data management system based on big data in Example 1. DETAILED DESCRIPTION
[0099] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0100] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0101] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0102] Example 1, reference Figure 1 , this embodiment provides a food sales data management system based on big data, including:
[0103] Inventory management module, responsible for real-time monitoring and management of food inventory;
[0104] The inventory management module uses automated technology to update inventory data in real time, including product quantity, shelf life, and storage location;
[0105] The sales data analysis module analyzes market demand trends and seasonal fluctuations based on the real-time inventory data collected by the inventory management module and combines it with historical sales records, and uses forecasting algorithms to predict future demand;
[0106] In the sales data analysis module, the time series forecasting ARIMA model is used for time series analysis, and regression analysis and random forest are combined for demand forecasting;
[0107] The inventory adjustment module adjusts the pricing based on the commodity demand data provided by the demand forecasting module, combined with the market demand, inventory status and shelf life of the commodity;
[0108] If the demand for a product is low and there is excess inventory, lower the price;
[0109] If inventory is tight and demand is high, increase prices;
[0110] Lower prices for products that are close to expiration;
[0111] The pricing optimization module monitors actual sales results, inventory changes, and customer feedback information to adjust forecasting models and pricing strategies;
[0112] In the pricing optimization module, the effectiveness of the pricing strategy is evaluated based on actual sales data and customer purchase behavior feedback; sales data and inventory changes are incorporated into demand forecasting and pricing strategy adjustments to adjust future forecast results; and based on sales results and inventory data, the forecast model and pricing strategy are automatically adjusted through machine learning algorithms;
[0113] This embodiment also provides a management method for the above-mentioned food sales data management system based on big data, including:
[0114] Step S1, real-time collection of inventory data, including the quantity, shelf life and storage location of each product;
[0115] Step S2: Based on the collected inventory data and combined with historical sales records, market demand trends and seasonal fluctuations are analyzed, and time series analysis is performed using the time series forecasting ARIMA model; based on the time series analysis results of historical sales data, combined with subsequent holidays and promotional activities, regression analysis and random forest machine learning algorithms are used to perform demand forecasting to predict commodity demand in the future;
[0116] The steps for time series analysis using the time series forecasting ARIMA model are:
[0117] To perform time series analysis:
[0118] The collected historical sales records are constructed into a time series Y in chronological order, where Y = {y1, y2, …, y T}, where y t represents the sales volume of goods in time t, and T is the total length of the time series;
[0119] If the sequence is non-stationary, perform difference processing to construct a stationary sequence Y′:
[0120] y′ t =y t -y t-1 ,t=2,3,…,T, where y′ t is the sequence value after difference, y t ,y t-1 are the original sales at time t and t-1, respectively,
[0121] If the first difference is not enough to stabilize the sequence, the second difference is performed, and the difference formula is:
[0122] y″ t =y′ t -y′ t-1 ,t=3,4,…,T, where y″ t ″ is the sequence value after secondary difference;
[0123] For the stationary series after difference, calculate its autocorrelation function ACF and partial autocorrelation function PACF, and determine the three parameters p, d, q of the ARIMA model, expressed as: ARIMA (p, d, q), where p is the autoregressive AR order, d is the number of differences, and q is the moving average MA order;
[0124] After fitting the ARIMA model with historical data, the sales volume for the next k time periods is predicted. The prediction formula is:
[0125]
[0126] in, is the predicted sales volume for the T+kth time period, φ1, φ2, ... are autoregressive coefficients, θ1, θ2 are moving average coefficients, ε T+k-1 and ε T+k-2 are the error terms at time T+k-1 and T+k-2 respectively;
[0127] The steps of using the time series forecasting ARIMA model for time series analysis also include,
[0128] Combine holidays and promotions to forecast demand:
[0129] According to the historical sales data, a multi-factor linear regression model is constructed, and the model expression is:
[0130] y t =β0+β1x1+β2x2+β3x3+ε t , where y t is the sales volume of goods at time t, β0, β1, β2, β3 are regression coefficients, ε t is the regression residual, x1 is the holiday effect, x2 is the intensity of promotion activities, x3 is the seasonal change,
[0131] By training the model with historical data, we can get the regression coefficient β i , used to predict future demand;
[0132] Combined with the random forest algorithm, the time series analysis results are predicted and external factors into a feature vector X,
[0133] Random forest constructs multiple decision trees to predict future demand. The prediction formula is:
[0134]
[0135] in, is the predicted sales volume for the T+kth time period, n is the number of decision trees in the random forest, and f i (X) is the predicted value of the i-th decision tree;
[0136] The ARIMA model prediction value is weighted and integrated with the prediction results of multi-factor regression and random forest to obtain the final prediction value.
[0137]
[0138] in, is the ARIMA forecast result, For the regression analysis prediction results, is the prediction result of random forest, α1, α2, α3 are weighting coefficients, satisfying α1+α2+α3=1;
[0139] Specifically, the basic trends are determined through time series analysis, multi-factor regression and random forest are used to capture external characteristics and nonlinear relationships, and finally the three prediction results are weighted and integrated to achieve the prediction of future demand.
[0140] Step S3, formulate a pricing plan for each product based on the product demand predicted in step S2:
[0141] Automatically lower prices when inventory is high and demand is low,
[0142] Automatically raise prices when inventory is tight and demand is high,
[0143] Automatically lower prices for products approaching expiration;
[0144] According to the commodity demand predicted in step S2, the steps for formulating a pricing plan for each commodity are as follows:
[0145] Assuming that the initial price of the product is P0, combined with inventory adequacy, demand forecast and shelf life, the dynamically adjusted price P is set. t , the adjustment formula is:
[0146] P t =P0·(1+δ I +δ D +δ E ),
[0147] Among them, δ I is the impact coefficient of inventory on price, δ D is the impact coefficient of demand forecast on price, δ E is the coefficient of the shelf life on the price;
[0148] According to the inventory level, define the inventory impact coefficient δ I :
[0149] δ I =-β1·I / I max , where β1 is the inventory adjustment coefficient, I is the current inventory, and I max The price adjustment logic is: when the inventory volume I is close to I max When the inventory is sufficient, the price decreases by δ I <0, when inventory is low, price remains unchanged or increases by δ I ≈0;
[0150] Assume that the predicted demand in step S2 is Define the demand forecast impact coefficient δ Dfor:
[0151] Among them, β2 is the demand adjustment coefficient, D avg is the historical average demand, price adjustment logic: when the demand is predicted Above average demand avg When the price increases by δ D >0, when the forecast demand is lower than the average demand, the price is reduced by δ D <0,
[0152] Assume the remaining shelf life of the product is R, and define the shelf life impact coefficient δ E for:
[0153] δ E =-β3·exp(-R / R max ), where β3 is the shelf life adjustment coefficient, R max is the maximum shelf life, and the price adjustment logic is: as the remaining shelf life R decreases, the price gradually decreases δ E <0, when the shelf life is sufficient, the price impact is small;
[0154] Substituting the above three coefficients into the price adjustment formula, we get the dynamic pricing scheme:
[0155]
[0156] In the step of formulating a pricing plan for each product, special conditions are handled as follows:
[0157] When inventory is high and demand is low:
[0158] When I approaches I max and Adjust the δ in the formula I <0,δ D <0, the price is significantly reduced,
[0159] When inventory is tight and demand is high:
[0160] When I is low and Adjust the δ in the formula I ≈0,δ D >0, the price is significantly increased,
[0161] When a product is about to expire:
[0162] When R is very small, adjust the δ in the formula E <<0, the price drops significantly,
[0163] Specifically, step S3 dynamically combines inventory levels, demand forecast results, and shelf life to develop a reasonable pricing plan for each commodity, thereby optimizing inventory flow and maximizing profits.
[0164] Incorporate sales data and inventory changes into demand forecasts and pricing strategy adjustments. The steps to adjust future forecast results are:
[0165] Define the feedback feature vector used in demand forecasting model adjustment as Z t :
[0166]
[0167] Among them, S t is the actual sales volume at time t, I t is the inventory level at time t, is the demand forecast value at time t, R t is the remaining shelf life of the product at time t;
[0168] Calculate the demand forecast error ε t , the calculation formula is:
[0169]
[0170] Update the weight w of the demand forecasting model. The update formula is:
[0171]
[0172] Among them, w t is the model parameter weight at time t, η is the learning rate, is the gradient with respect to the weight;
[0173] Step S4, evaluating the effectiveness of the pricing strategy in step S3 based on actual sales data and customer purchase behavior feedback;
[0174] The method of evaluating the effect of the pricing strategy in step S3 in step S4 is: incorporating sales data and inventory changes into demand forecasting and pricing strategy adjustment, adjusting future forecast results, and automatically adjusting the forecast model and pricing strategy based on sales results and inventory data using a machine learning algorithm;
[0175] Incorporate sales data and inventory changes into demand forecasts and pricing strategy adjustments. Steps to adjust future forecasts also include:
[0176] Define the feedback feature vector used in pricing strategy optimization as X t :
[0177] X t =[P t ,S t ,ΔI t ,ε t ],
[0178] Among them, Pt Price the product at time t, ΔI t =I t -I t-1 is the inventory change at time t, ε t is the demand forecast error;
[0179] Linear regression and gradient boosting tree machine learning algorithms are used to optimize pricing strategies, with the goal of maximizing sales R t , R t =P t ·S t , while balancing inventory and shelf life, the optimization objective function is:
[0180]
[0181] in, The loss function optimized for pricing, R t is the sales volume at time t, λ is the inventory adjustment weight, μ is the shelf life adjustment weight, δ E is the shelf life influence coefficient,
[0182] Update the parameters θ of the pricing model using SGD stochastic gradient descent:
[0183]
[0184] Among them, θ t is the model parameter of the pricing strategy, α is the learning rate, is the gradient of the loss function with respect to the model parameters, θ t+1 The model parameters of the updated pricing strategy are obtained by minimizing the loss function Adjust the pricing model to make prices more in line with actual demand and inventory status;
[0185] Incorporate sales data and inventory changes into demand forecasts and pricing strategy adjustments. Steps to adjust future forecasts also include:
[0186] Comprehensive adjusted demand forecast and pricing:
[0187] The new demand forecast is:
[0188]
[0189] in, is the updated demand forecast at time t+1, w t+1 is the model weight modified according to the feedback data;
[0190] The new pricing formula is:
[0191] P t+1 =P t·(1+δ I +δ D +δ E ),
[0192] Among them, δ I ,δ D ,δ E is the dynamic coefficient of inventory, demand and shelf life, P t+1 is the adjusted price;
[0193] Specifically, step S4 incorporates sales data and inventory changes into demand forecasting and pricing strategy optimization through a feedback mechanism, and achieves adaptive adjustment of forecasting and pricing through error correction, objective function optimization, and machine learning algorithm adjustment, thereby improving the accuracy and flexibility of the system.
[0194] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A food sales data management system based on big data, characterized by: include, Inventory management module, responsible for real-time monitoring and management of food inventory; The inventory management module uses automated technology to update inventory data in real time, including product quantity, shelf life, and storage location; The sales data analysis module analyzes market demand trends and seasonal fluctuations based on the real-time inventory data collected by the inventory management module and combines it with historical sales records, and uses forecasting algorithms to predict future demand; In the sales data analysis module, the time series forecasting ARIMA model is used for time series analysis, and regression analysis and random forest are combined for demand forecasting; The inventory adjustment module adjusts the pricing based on the commodity demand data provided by the demand forecasting module, combined with the market demand, inventory status and shelf life of the commodity; If the demand for a product is low and there is excess inventory, lower the price; If inventory is tight and demand is high, increase prices; Lower prices for products that are close to expiration; The pricing optimization module monitors actual sales results, inventory changes and customer feedback information, and adjusts the forecasting model and pricing strategy.
2. A food sales data management system based on big data as claimed in claim 1, characterized in that: In the pricing optimization module, the effectiveness of the pricing strategy is evaluated based on actual sales data and customer purchasing behavior feedback; sales data and inventory changes are incorporated into demand forecasting and pricing strategy adjustments to adjust future forecast results; and based on sales results and inventory data, the forecasting model and pricing strategy are automatically adjusted through machine learning algorithms.
3. A food sales data management system based on big data as claimed in claim 2, characterized in that: The management method of the food sales data management system based on big data is: Step S1, real-time collection of inventory data, including the quantity, shelf life and storage location of each product; Step S2: Based on the collected inventory data and combined with historical sales records, market demand trends and seasonal fluctuations are analyzed, and time series analysis is performed using the time series forecasting ARIMA model; based on the time series analysis results of historical sales data, combined with subsequent holidays and promotional activities, regression analysis and random forest machine learning algorithms are used to perform demand forecasting to predict commodity demand in the future; Step S3, formulate a pricing plan for each product based on the product demand predicted in step S2: Automatically lower prices when inventory is high and demand is low, Automatically raise prices when inventory is tight and demand is high, Automatically lower prices for products approaching expiration; Step S4, evaluating the effectiveness of the pricing strategy in step S3 based on actual sales data and customer purchase behavior feedback; The method for evaluating the effectiveness of the pricing strategy in step S3 in step S4 is to incorporate sales data and inventory changes into demand forecasting and pricing strategy adjustments, adjust future forecast results, and use machine learning algorithms to automatically adjust the forecasting model and pricing strategy based on sales results and inventory data.
4. A food sales data management system based on big data as claimed in claim 3, characterized in that: The steps of using the time series prediction ARIMA model to perform time series analysis are: To perform time series analysis: The collected historical sales records are constructed into a time series Y in chronological order, where Y = {y1, y2, …, y T }, where y t represents the sales volume of goods in time t, and T is the total length of the time series; If the sequence is non-stationary, perform difference processing to construct a stationary sequence Y′: y′ t =y t -y t-1 ,t=2,3,…,Y, where y′ t is the sequence value after difference, y t ,y t-1 are the original sales at time t and t-1, respectively, If the first difference is not enough to stabilize the sequence, the second difference is performed, and the difference formula is: y″ t ″=y′ t -y′ t-1 ,t=3,4,…,T, where y″ t ″ is the sequence value after secondary difference; For the stationary series after difference, calculate its autocorrelation function ACF and partial autocorrelation function PACF, and determine the three parameters p, d, q of the ARIMA model, expressed as: ARIMA (p, d, q), where p is the autoregressive AR order, d is the number of differences, and q is the moving average MA order; After fitting the ARIMA model with historical data, the sales volume for the next k time periods is predicted. The prediction formula is: in, is the predicted sales volume for the T+kth time period, φ1, φ2, ... are autoregressive coefficients, θ1, θ2 are moving average coefficients, ε T+k-1 and ε T+k-2 are the error terms at time T+k-1 and T+k-2 respectively.
5. A food sales data management system based on big data as claimed in claim 4, characterized in that: The step of using the time series prediction ARIMA model to perform time series analysis also includes: Combine holidays and promotions to forecast demand: According to the historical sales data, a multi-factor linear regression model is constructed, and the model expression is: y t =β0+β1x1+β2x2+β3x3+ε t , where y t is the sales volume of goods at time t, β0, β1, β2, β3 are regression coefficients, ε t is the regression residual, x1 is the holiday effect, x2 is the intensity of promotion activities, x3 is the seasonal change, By training the model with historical data, we can get the regression coefficient β i , used to predict future demand; Combined with the random forest algorithm, the time series analysis results are predicted and external factors into a feature vector X, Random forest constructs multiple decision trees to predict future demand. The prediction formula is: in, is the predicted sales volume for the T+kth time period, n is the number of decision trees in the random forest, and f i (X) is the predicted value of the i-th decision tree; The ARIMA model prediction value is weighted and integrated with the prediction results of multi-factor regression and random forest to obtain the final prediction value. in, is the ARIMA forecast result, For the regression analysis prediction results, is the prediction result of random forest, α1, α2, α3 are weighting coefficients, satisfying α1+α2+α3=1.
6. A food sales data management system based on big data as claimed in claim 5, characterized in that: The step of formulating a pricing plan for each commodity based on the commodity demand predicted in step S2 is as follows: Assuming that the initial price of the product is P0, combined with inventory adequacy, demand forecast and shelf life, the dynamically adjusted price P is set. t , the adjustment formula is: P t =P0·(1+δ I +d D +d E ), Among them, δ I is the impact coefficient of inventory on price, δ D is the impact coefficient of demand forecast on price, δ E is the coefficient of the shelf life on the price; According to the inventory level, define the inventory impact coefficient δ I : δ I =-β1·I / I max , where β1 is the inventory adjustment coefficient, I is the current inventory, and I max The price adjustment logic is: when the inventory volume I is close to I max When the inventory is sufficient, the price decreases by δ I <0, when inventory is low, price remains constant or increases by δ I ≈0; Assume that the predicted demand in step S2 is Define the demand forecast impact coefficient δ D for: Among them, β2 is the demand adjustment coefficient, D avg is the historical average demand, price adjustment logic: when the demand is predicted Above average demand avg When the price increases by δ D >0, when the forecast demand is lower than the average demand, the price is reduced by δ D <0, Assume the remaining shelf life of the product is R, and define the shelf life impact coefficient δ E for: δ E =-β3·exp(-R / R max ), where β3 is the shelf life adjustment coefficient, R max is the maximum shelf life, and the price adjustment logic is: as the remaining shelf life R decreases, the price gradually decreases δ E <0, when the shelf life is sufficient, the price impact is small; Substituting the above three coefficients into the price adjustment formula, we get the dynamic pricing scheme:
7. A food sales data management system based on big data as claimed in claim 6, characterized in that: In the step of formulating a pricing plan for each product, the special conditions are handled as follows: When inventory is high and demand is low: When I approaches I max and Adjust the δ in the formula I <0,δ D <0, the price is significantly reduced, When inventory is tight and demand is high: When I is low and Adjust the δ in the formula I ≈0,δ D >0, the price is significantly increased, When a product is about to expire: When R is small, adjust δ in the formula E <<0, the price has dropped significantly.
8. A food sales data management system based on big data as claimed in claim 7, characterized in that: The steps of incorporating sales data and inventory changes into demand forecasting and pricing strategy adjustment and adjusting future forecast results are: Define the feedback feature vector used in demand forecasting model adjustment as Z t : Among them, S t is the actual sales volume at time t, I t is the inventory level at time t, is the demand forecast value at time t, R t is the remaining shelf life of the product at time t; Calculate the demand forecast error ε t , the calculation formula is: Update the weight w of the demand forecasting model. The update formula is: Among them, w t is the model parameter weight at time t, η is the learning rate, is the gradient with respect to the weight.
9. A food sales data management system based on big data as claimed in claim 8, characterized in that: The step of incorporating sales data and inventory changes into demand forecasting and pricing strategy adjustment to adjust future forecast results also includes: Define the feedback feature vector used in pricing strategy optimization as X t : X t =[P t ,S t ,ΔI t ,ε t ], Among them, P t Price the product at time t, ΔI t =I t -I t-1 is the inventory change at time t, ε t is the demand forecast error; Linear regression and gradient boosting tree machine learning algorithms are used to optimize pricing strategies, with the goal of maximizing sales R t , R t =P t ·S t , while balancing inventory and shelf life, the optimization objective function is: in, The loss function optimized for pricing, R t is the sales volume at time t, λ is the inventory adjustment weight, μ is the shelf life adjustment weight, δ E is the shelf life influence coefficient, Update the parameters θ of the pricing model using SGD stochastic gradient descent: Among them, θ t is the model parameter of the pricing strategy, α is the learning rate, is the gradient of the loss function with respect to the model parameters, θ t+1 The model parameters of the updated pricing strategy are obtained by minimizing the loss function Adjust the pricing model to make prices more in line with actual demand and inventory status.
10. A food sales data management system based on big data as claimed in claim 9, characterized in that: The step of incorporating sales data and inventory changes into demand forecasting and pricing strategy adjustment to adjust future forecast results also includes: Comprehensive adjusted demand forecast and pricing: The new demand forecast is: in, is the updated demand forecast at time t+1, w t+1 is the model weight modified according to the feedback data; The new pricing formula is: P t+1 =P t ·(1+d I +d D +d E ), Among them, δ I ,δ D ,δ E is the dynamic coefficient of inventory, demand and shelf life, P t+1 The adjusted price.
Citation Information
Patent Citations
Method and device for predicting unit price of article, storage medium and electronic device
CN111369037A
Commodity sales volume prediction method and device, electronic equipment and storage medium
CN116188061A
Sales prediction system and method, electronic equipment and storage medium
CN117035841A
Using randomness compensating factors to improve forecast accuracy
US20220012651A1
Cited By
Multi-strategy dynamic prediction method, system and device based on seasonal commodities and storage medium
CN120707054A
Commodity operation strategy supervision method and system based on big data
CN120807022A
Intelligent retail robot multi-mode interaction system and method based on AI large model
CN120848718A
Aerial material demand intelligent prediction method and system based on dynamic weight adaptive adjustment
CN121998206A