CN115994785B - Intelligent prediction method and system for catering traffic stock - Google Patents

Intelligent prediction method and system for catering traffic stock Download PDF

Info

Publication number
CN115994785B
CN115994785B CN202310027609.7A CN202310027609A CN115994785B CN 115994785 B CN115994785 B CN 115994785B CN 202310027609 A CN202310027609 A CN 202310027609A CN 115994785 B CN115994785 B CN 115994785B
Authority
CN
China
Prior art keywords
people flow
prediction
dish
rand
individual
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310027609.7A
Other languages
Chinese (zh)
Other versions
CN115994785A (en
Inventor
郭仁威
周孟雄
朱灿
汤健康
苏姣月
温文潮
纪捷
陈帅
黄慧
黄佳惠
荆佳龙
章浩文
黄卓越
林张楠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huaiyin Institute of Technology
Original Assignee
Huaiyin Institute of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huaiyin Institute of Technology filed Critical Huaiyin Institute of Technology
Priority to CN202310027609.7A priority Critical patent/CN115994785B/en
Publication of CN115994785A publication Critical patent/CN115994785A/en
Application granted granted Critical
Publication of CN115994785B publication Critical patent/CN115994785B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses an intelligent catering people flow stock prediction method and system. The collected data comprise weather factors, holiday factors, dining time period factors and historical people flow data; the people flow prediction unit comprises a SO-RBF-based people flow prediction model, and takes main factors affecting the people flow as input to predict the people flow in different time periods of the day; the dish quantity prediction unit comprises a combined prediction model based on an optimized weight coefficient, takes a people flow prediction result, dish supply historical data, real-time prices of various dishes and quality guarantee period of various dishes as input, and predicts the quantity required by various dishes on the day. The invention can reasonably predict the people flow in the next day, reasonably predict the quantity of dishes to be purchased and provide a dish purchasing scheme, reduce the waste of dishes and maximize the economic benefit.

Description

Intelligent prediction method and system for catering traffic stock
Technical Field
The invention relates to the technical field of intelligent catering algorithms and predictions, in particular to an intelligent catering people flow stock prediction method and system.
Background
With the improvement of living standard of people, the catering industry starts to develop vigorously, and competition among catering enterprises is more and more vigorous. Therefore, in order to reduce the cost and increase the profit, the middle and small-sized catering enterprises must pay attention to cost control. The hot pot industry is taken as a typical middle and small catering enterprise, in the business process, a plurality of problems exist, such as randomness in purchasing of food materials, for the same food material, large-scale purchasing exists, continuous purchasing is not performed for several days, and for beef and mutton, the beef and mutton can be stored in a refrigerator for a longer shelf life, but the taste of dishes can be influenced due to freezing of beef and mutton, and the good brand of hot pot is not facilitated to be maintained. Lettuce has a shorter shelf life but a lower purchase frequency than beef and mutton. The frequency and the quantity of the purchase of the hot pot store are too random, the purchase of the food materials is generally judged by the experience of a responsible person, a specific purchase plan is not formulated, and the purchase time and the like are very random. Meanwhile, the space hotpot shop cannot analyze the contribution of a certain dish to the profit, and investigation shows that most hotpot shops are not clear of the profit of each dish, so that the cost of the hotpot shops is controlled, and the profit of the hotpot shops is increased by a certain degree.
Therefore, aiming at the existing problems in the hot pot industry at the present stage, a device is needed to provide a vegetable purchasing scheme in real time to solve the randomness of food material purchasing, and profit contribution rate analysis is carried out on the vegetables, so that the hot pot shop can be helped to identify the contribution degree of each dish to profit, and then actively promote the dishes with large profit contribution rate, thereby helping enterprises to effectively control the cost and compress the cost rate, and achieving the aim of cost control.
Disclosure of Invention
The invention aims to: aiming at the problem of stock preparation in the existing hot pot store, the invention provides an intelligent prediction method and system for stock preparation of the food and beverage people flow, which can predict the people flow in different dining time periods, predict the number of needed dishes through people flow prediction data, provide a reasonable dish purchasing scheme and solve the problem of stock preparation shortage or waste commonly existing in the existing hot pot store.
The technical scheme is as follows: the invention discloses an intelligent predicting method for food and beverage traffic stock, which comprises the following steps:
step 1: collecting weather factors, holiday factors, dining time period factors and people flow historical data;
step 2: an SO-RBF people flow prediction model based on a snake optimization algorithm is established, the SO-RBF people flow prediction model adopts SO optimization algorithm to optimize model parameters, and people flow of dining in different time periods of the day is predicted based on the SO-RBF people flow prediction model;
step 3: acquiring the current dish price data, the quality guarantee period data of various dishes and the historical dish quantity data of a hot pot shop;
step 4: and (3) constructing a combined prediction dish quantity prediction model based on the optimized weight, reasonably predicting the required quantity of various dishes on the day according to the prediction data of the SO-RBF people flow model by combining the daily dish price data, the quality guarantee period data of various dishes and the historical dish quantity data obtained in the step (3), and outputting a dish purchasing scheme.
Further, the SO-RBF people flow prediction model constructed in the step 2 specifically comprises the following steps:
step 21) constructing a radial basis function:
wherein mu t As a center point of the lens, the lens is,determining the descending speed of a radial basis function for the radial basis width;
step 22) determining 4 nodes of the input layer, x 1 、x 2 、x 3 、x 4 Respectively corresponding to weather, holidays, dining time periods and historical people flow data at the same time;
step 23), determining 1 node of an output layer, wherein Y represents a current-day people flow prediction result;
step 24) normalizing the collected data, mapping the original value to the value x' of the interval [0,1] through the maximum-minimum normalization, wherein the mapping formula is as follows:
wherein, maxA and minA respectively represent the maximum value and the minimum value of the factor A;
step 25), randomly selecting 70% of all data as training samples and the rest 30% as test samples;
step 26) applying SO algorithm to the center point μ of RBF network t And (3) optimizing the position of the model, and constructing an SO-RBF prediction model.
Further, in the step 26), the SO algorithm is adopted to the center point mu of the RBF network t The specific steps of optimizing the position of the device are as follows:
step 26.1) initializing the population, wherein the initialization formula is as follows:
X i =X min +r×(X max -X min )
wherein X is i Represents the position of the ith snake, r is [0,1]Random numbers within a range; x is X max And X min The upper and lower boundaries of the solution problem are respectively;
step 26.2) dividing the population into two groups, female and male, assuming a 50% number of males and a 50% number of females, the formula for dividing the population is as follows:
N m ≈N/2
N f =N-N m
wherein: n represents the size of the snake population; n (N) m Representing the number of males; n (N) f Indicating the number of females;
step 26.3) find the best individual in each group, obtaining the best male individual f best,m Optimal female individual f best,f Food position f food
Step 26.4) calculating the temperature, wherein the calculation formula is as follows:
wherein T represents the current iteration number, and T represents the maximum iteration number;
step 26.5) calculating the food amount, wherein the calculation formula is as follows:
wherein c 1 A constant having a value of 0.5;
step 26.6) judging the value Q of the food amount, when the value Q of the food amount is less than Threshold (threshold=0.25), the snake will select a random position to search for the food, and updating the relative position of the male snake and the food by the following formula:
X i,m (t+1)=X rand,m (t)±c 2 ×A m ×((X max -X min )×rand+X min )
wherein: x is X i,m Representing the location of the ith male individual; x is X rand,m Represents random male individual position, rand represents [0,1]]Random number between c 2 Is a constant with a value of 0.05, A m The ability of a male individual to find food is represented by the following formula:
wherein: f (f) rand,m X represents rand,m Adaptation value f of (f) i,m An fitness value representing an ith male individual;
step 26.7) updating the relative position of the female snake to the diet by:
X i,f =X rand,f (t+1)±c 2 ×A f ×((X max -X min )×rand+X min )
wherein: x is X i,f Represents the position, X, of the ith female individual rand,f Representing the location of random female individuals, rand represents [0,1]]Random number between A f Indicating the ability of female individuals to find food, the formula is shown below:
wherein: f (f) rand,f X represents rand,f The fitness value f i,f An fitness value representing an ith female individual;
step 26.8) judging the value Q of the food amount, when the value Q of the food amount is more than Threshold, judging the value of Temp, if the value of Temp is more than Threshold, the snake only moves towards the food direction, and updating the position of the snake group, wherein the updating formula is as follows:
X i,j (t+1)=X food ±c 3 ×Temp×rand×(X food -X i,j (t))
wherein X is i,j Representing the location of all individuals, X food Representing the optimal individual position,c 3 Is a constant with a value of 2;
step 26.9) if the Temp is less than Threshold, the snake is in a combat or mating state;
step 26.10) when the snake is in a combat state, the male individual position is updated, the updated formula is as follows:
X i,m (t+1)=X i,m (t)±c 3 ×FM×rand×(Q×X best,f -X i,m (t))
wherein X is i,m Represents the position of the ith male individual, X best,f Representing the location of the best individual in the female population, FM representing the combat competence of the male individual;
step 26.11) when the snake is in combat, the female position is updated, the updated formula is as follows:
X i,f (t+1)=X i,f (t)±c 3 ×FF×rand×(Q×X best,m -X i,f (t))
wherein: x is X i,f Represents the position, X, of the ith female individual best,m Representing the location of the best individual in the male population, FF representing the combat ability of the female individual;
step 26.12) calculating the combat ability of the male individuals and the female individuals, wherein the calculation formula is as follows:
wherein: f (f) best,f Indicating fitness of the best individual in the female population, f best,m Indicating fitness of the best individual in the male population, f i Representing the fitness of the current individual;
step 26.13) when the snake is in mating mode, the male and female individual positions are updated, the updated formula is as follows:
X i,m (t+1)=X i,m (t)±c 3 ×M m ×rand×(Q×X i,f (t)-X i,m (t))
X i,f (t+1)=X i,f (t)±c 3 ×M f ×rand×(Q×X i,m (t)-X i,f (t))
wherein: x is X i,m Represents the position of the ith male individual, X i,f Represents the position of the ith female individual, M m And M f Respectively representing the mating ability of male individuals and female individuals, and the calculation formula is as follows:
step 26.14) when the snake eggs hatch, the worst male and female individuals are selected for replacement, and the calculation formulas of the worst male individuals and the worst female individuals are as follows:
X worst,m =X min +rand×(X max -X min )
X worst,f =X min +rand×(X max -X min )
wherein: x is X worst,m Represents worst male individuals, X worst,f Representing the worst female individual.
Further, the combination prediction dish number prediction model based on the optimization weight in the step 4 specifically includes:
step 41) constructing a multi-variable gray prediction model, wherein the construction formula of the model is as follows:
wherein:representing the original dependent variable sequence,/->The original sequence of the independent variables is represented,denoted as->Is a sequence of one accumulation generation of a, a represents a development coefficient,/->To drive items, b i Is a driving term coefficient; the lambda grey dose; />Generating sequences for close proximity;
step 42) constructing a neural network prediction model, wherein the model construction formula is as follows:
wherein l is the number of neurons of an hidden layer, m is the number of neurons of an input layer, n is the number of neurons of an output layer, and a is an adjustment constant with the value of [0,1 ];
step 43) constructing a partial least square regression model, and constructing a double-log linear regression model according to the partial least square regression, wherein the model construction formula is as follows:
lny=β 01 lnx 12 lnx 2 +…+β n lnx n
wherein: y represents the number of various dishes, x i (i=1, 2, …, n) represents a main factor affecting the number of purchased dishes, β i (i=1, 2, …, n) is a regression coefficient;
step 44) building a combined prediction model of the optimization weights, wherein the model building formula is as follows:
wherein:representing the final prediction result; m represents the number of single prediction models, and in the patent of the invention, m is 3; w (w) i The weight of the single prediction model is occupied; />Representing the prediction result of each single prediction model; and have->
Step 45) weighting w by using reciprocal variance method i And (3) optimizing, wherein an optimization formula is as follows:
wherein:representing the square of the prediction error of the i-th single prediction model.
The invention also discloses an intelligent catering people flow stock prediction system, which comprises a data acquisition unit, a people flow prediction unit, a dish quantity prediction unit and a dish stock output unit;
the data acquisition unit is used for acquiring historical data of weather factors, holiday factors, dining time period factors and people flow;
the system comprises a people flow prediction unit, a storage unit and a storage unit, wherein the people flow prediction unit comprises an SO-RBF people flow prediction model based on a snake optimization algorithm, a current dish price data acquisition unit and a historical dish quantity data acquisition unit, the current dish price data acquisition unit and the historical dish quantity data acquisition unit are respectively used for acquiring current dish price data and historical dish quantity data of a hot pot store, the SO-RBF people flow prediction model predicts people flow of dining in different time periods of the day through data acquired by the data acquisition unit, and the model parameters are optimized by adopting an SO optimization algorithm;
the dish quantity prediction unit comprises a combination prediction dish quantity prediction model based on optimized weights and a data acquisition unit of quality guarantee periods of various dishes, wherein the data acquisition unit of quality guarantee periods of various dishes is used for acquiring data of quality guarantee periods of various dishes, the combination prediction dish quantity prediction model based on optimized weights reasonably predicts the required quantity of various dishes in the day according to the prediction data of the people flow prediction unit, and combines the current dish price data, the quality guarantee period data of various dishes and the historical dish quantity data, and outputs a dish purchasing scheme;
and the dish preparation output unit is used for preparing dishes according to the dish purchase scheme output by the dish quantity prediction unit.
The beneficial effects are that:
1. the SO-RBF people flow prediction model provided by the invention relates to a plurality of influencing factors, weather factors, holiday factors, dining time period factors and people flow historical data, wherein the factors play a key role in people flow, and the key factors are used as the input of the people flow prediction model, SO that the prediction accuracy can be obviously improved.
2. According to the method, the prediction result of the people flow prediction model is combined with the price of the dishes on the same day and the supply quantity data of the dishes on the same day, the required quantity of various dishes on the same day is reasonably predicted, and the dish purchasing scheme is formulated, so that waste caused by excessive standby dishes and profit and loss caused by insufficient standby dishes in a hot pot shop can be avoided.
3. The invention can feed back business data of the same day to the historical dish supply quantity database and serve as one of the basis for predicting the quantity of various dishes of the next day, thereby maximally improving the accuracy of prediction.
4. According to the invention, the quantity required by various dishes is predicted by the double prediction model, so that the phenomenon of food waste is reduced, and the net income of a hot pot shop is obviously improved.
Drawings
FIG. 1 is a structural frame diagram of the present invention;
FIG. 2 is a flow chart of the prediction of the SO-RBF people flow prediction model adopted by the invention;
FIG. 3 is a flow chart of predicting the number of dishes by using the combined model of the optimized weights adopted by the invention;
FIG. 4 is a graph comparing actual traffic to predicted traffic for a day;
FIG. 5 is a graph comparing net daily revenue before and after use of the present invention.
Detailed Description
The invention is described in further detail below with reference to the accompanying drawings.
The invention discloses an intelligent prediction method and system for food and beverage people flow stock, which are illustrated by taking hot pot store people flow prediction and reasonable stock preparation as examples, and mainly comprise a data acquisition unit, a people flow prediction unit, a dish quantity prediction unit and a dish stock output unit. The data collected by the data collection unit comprises weather factors, holiday factors, dining time period factors and people flow historical data. The people flow prediction unit comprises an SO-RBF people flow prediction model based on a snake optimization algorithm, a current dish price data acquisition unit and a historical dish quantity data acquisition unit. The dish quantity prediction unit comprises a dish quantity prediction model based on combination prediction of optimization weights and a data acquisition unit of quality guarantee period of various dishes. And the dish preparation output unit is used for preparing dishes according to the dish purchase scheme output by the dish quantity prediction unit. The current dish price data acquisition unit and the historical dish quantity data acquisition unit are respectively used for acquiring current dish price data and historical dish quantity data of the hot pot store, the SO-RBF people flow prediction model predicts the people flow of dining in different time periods on the day through the data acquired by the data acquisition unit, and the model parameters are optimized by adopting an SO optimization algorithm. The combination prediction dish quantity prediction model based on the optimization weight reasonably predicts the quantity of various dishes on the day according to the prediction data of the people flow prediction unit and combines the daily dish price data, the quality guarantee period data of various dishes and the historical dish quantity data, and outputs a dish purchasing scheme.
Therefore, the intelligent prediction method for the flow of people in the hot pot comprises the following steps:
step 1: weather factors, holiday factors, meal time period factors, and people flow history data are collected.
Step 2: and constructing an SO-RBF people flow prediction model based on a snake optimization algorithm, wherein the SO-RBF people flow prediction model adopts SO optimization algorithm to optimize model parameters, and predicts the people flow of dining in different time periods of the day based on the SO-RBF people flow prediction model.
As shown in fig. 2, the SO-RBF-based people flow prediction model mainly comprises the following steps:
21 Constructing a radial basis function:
wherein mu t As a center point of the lens, the lens is,is the radial base width. The radial basis width determines the speed of the radial basis function falling;
22 Determining 4 nodes of the input layer, x) 1 、x 2 、x 3 、x 4 Respectively corresponding to weather conditions, holiday conditions, dining time period and historical flow data at the same time;
23 Determining 1 node of an output layer, wherein Y represents a current-day people flow prediction result;
24 Normalized processing is carried out on the collected data, the original value is mapped to the value x' of the interval [0,1] through the maximum-minimum normalization, and the mapping formula is as follows:
wherein maxA and minA represent the maximum and minimum values of factor a, respectively;
25 Randomly selecting 70% of all data as training samples and the rest 30% as test samples;
26 Using SO algorithm to the center point mu of RBF network t The position of the (2) is optimized, an SO-RBF prediction model is constructed, and the specific steps of an SO algorithm are as follows:
27 Initializing the population, wherein the initialization formula is as follows:
X i =X min +r×(X max -X min )
wherein X is i Represents the position of the ith snake, r is [0,1]Random numbers within a range; x is X max And X min The upper and lower boundaries of the solution problem, respectively.
28 Dividing the population into two groups, female and male, assuming a 50% number of males and a 50% number of females, the formula for dividing the population is as follows:
N m ≈N/2
N f =N-N m
wherein: n represents the size of the snake population; n (N) m Representing the number of males; n (N) f Indicating the number of females
29 Finding the best individual in each group, obtaining the best male individual f best,m Optimal female individual f best,f Food position f food
210 A) calculating temperature, the calculation formula is as follows:
wherein: t represents the current iteration number, and T represents the maximum iteration number;
211 Calculating the food amount, the calculation formula is as follows:
wherein c 1 A constant having a value of 0.5;
212 Judging the value Q of the food amount, and when the value Q of the food amount is less than Threshold (threshold=0.25), selecting a random position to search for food by the snake, and updating the relative position of the male snake and the food by the following formula:
X i,m (t+1)=X rand,m (t)±c 2 ×A m ×((X max -X min )×rand+X min )
wherein: x is X i,m Representing the location of the ith male individual; x is X rand,m Represents random male individual position, rand represents [0,1]]Random number between c 2 Is a constant with a value of 0.05, A m The ability of a male individual to find food is represented by the following formula:
wherein: f (f) rand,m X represents rand,m Adaptation value f of (f) i,m Fitness value representing the i-th male individual
213 Updating the relative position of the female snake to the diet by:
X i,f =X rand,f (t+1)±c 2 ×A f ×((X max -X min )×rand+X min )
wherein: x is X i,f Represents the position, X, of the ith female individual rand,f Representing the location of random female individuals, rand represents [0,1]]Random number between A f Indicating the ability of female individuals to find food, the formula is shown below:
wherein: f (f) rand,f X represents rand,f The fitness value f i,f An fitness value representing an ith female individual;
214 Judging the value Q of the food amount, and judging the value of the Temp when the value Q of the food amount is more than Threshold, wherein if the value of the Temp is more than Threshold, the snake only moves towards the food direction, and the position of the snake group is updated, and the updating formula is as follows:
X i,j (t+1)=X food ±c 3 ×Temp×rand×(X food -X i,j (t))
wherein X is i,j Representing the location of all individuals, X food Representing the optimal individual position, c 3 Is a constant with a value of 2;
215 If Temp < Threshold is satisfied, the snake is in combat or mating state;
216 When the snake is in a combat state, the male individual position is updated, and the updated formula is as follows:
X i,m (t+1)=X i,m (t)±c 3 ×FM×rand×(Q×X best,f -X i,m (t))
wherein X is i,m Represents the position of the ith male individual, X best,f Representing the location of the best individual in the female population, FM representing the combat competence of the male individual;
217 When the snake is in combat, the female position is updated, the updated formula is as follows:
X i,f (t+1)=X i,f (t)±c 3 ×FF×rand×(Q×X best,m -X i,f (t))
wherein: x is X i,f Represents the position, X, of the ith female individual best,m Representing the location of the best individual in the male population, FF representing the combat ability of the female individual;
218 Calculating the combat ability of the male individual and the female individual, the calculation formula is as follows:
wherein: f (f) best,f Indicating fitness of the best individual in the female population, f best,m Indicating fitness of the best individual in the male population, f i Representing the fitness of the current individual;
219 When the snake is in mating mode, the male and female individual positions are updated, the updated formula is as follows:
X i,m (t+1)=X i,m (t)±c 3 ×M m ×rand×(Q×X i,f (t)-X i,m (t))
X i,f (t+1)=X i,f (t)±c 3 ×M f ×rand×(Q×X i,m (t)-X i,f (t))
wherein: x is X i,m Represents the position of the ith male individual, X i,f Represents the position of the ith female individual, M m And M f Respectively representing the mating ability of male individuals and female individuals, and the calculation formula is as follows:
220 When hatching snake eggs, selecting worst male individuals and female individuals for replacement, wherein the calculation formulas of the worst male individuals and the worst female individuals are as follows:
X worst,m =X min +rand×(X max -X min )
X worst,f =X min +rand×(X max -X min )
wherein: x is X worst,m Represents worst male individuals, X worst,f Representing the worst female individual.
Step 3: acquiring the current dish price data, the quality guarantee period data of various dishes and the historical dish quantity data of the hot pot shop.
Step 4: and (3) constructing a combined prediction dish quantity prediction model based on the optimized weight, reasonably predicting the required quantity of various dishes on the day according to the prediction data of the SO-RBF people flow model by combining the daily dish price data, the quality guarantee period data of various dishes and the historical dish quantity data obtained in the step (3), and outputting a dish purchasing scheme.
As shown in fig. 3, the combined dish quantity prediction model based on the optimization weight mainly comprises the following steps:
41 A multi-variable gray prediction model is constructed, and the construction formula of the model is as follows:
wherein:representing the original dependent variable sequence,/->The original sequence of the independent variables is represented,denoted as->Is a sequence of one accumulation generation of a, a represents a development coefficient,/->To drive items, b i Is a driving term coefficient; the lambda grey dose; />Generating sequences for close proximity;
42 A neural network prediction model is constructed, and a model construction formula is shown as follows:
wherein l is the number of neurons of an hidden layer, m is the number of neurons of an input layer, n is the number of neurons of an output layer, and a is an adjustment constant with the value of [0,1 ];
43 A partial least square regression model is built, a double-log linear regression model is built according to the partial least square regression, and a model building formula is shown as follows:
lny=β 01 lnx 12 lnx 2 +…+β n lnx n
wherein: y represents the number of various dishes, x i (i=1, 2, …, n) represents a main factor affecting the number of purchased dishes, β i (i=1, 2, …, n) is a regression coefficient;
44 A combined prediction model of the optimization weight is established, and the model establishment formula is as follows:
wherein:representing the final prediction result; m represents the number of single prediction models, and in the patent of the invention, m is 3; w (w) i The weight of the single prediction model is occupied; />Representing the prediction result of each single prediction model; and have->
45 Using reciprocal variance method to weight w i And (3) optimizing, wherein an optimization formula is as follows:
wherein:representing the square of the prediction error of the i-th single prediction model.
The invention can collect the sales of individual dishes in the chafing dish shop on the day, and input the collected data as the history data into the history dish supply data unit as the basis of predicting the quantity of each dish on the next day.
As shown in figure 4, the people flow prediction method adopted by the invention has high prediction accuracy in the peak period of dining, the prediction error per hour is between 2 and 3 times, the average accuracy reaches 95.32 percent, and the method can be used as a reliable basis for preparing materials in restaurant.
Compared with the scheme that the equipment is not used for material preparation, the material preparation scheme obtained by the double prediction model provided by the invention takes 10 months as an example, compared with the past year, the net income is increased by 10068 yuan, the average net income per day is increased by 324.77 yuan, and the problems of waste caused by excessive material preparation and profit and loss caused by too little material preparation in a hot pot shop are effectively solved.
The foregoing embodiments are merely illustrative of the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the present invention and to implement the same, not to limit the scope of the present invention. All equivalent changes or modifications made according to the spirit of the present invention should be included in the scope of the present invention.

Claims (3)

1. An intelligent predicting method for food and beverage traffic stock is characterized by comprising the following steps:
step 1: collecting weather factors, holiday factors, dining time period factors and people flow historical data;
step 2: an SO-RBF people flow prediction model based on a snake optimization algorithm is established, the SO-RBF people flow prediction model adopts SO optimization algorithm to optimize model parameters, and people flow of dining in different time periods of the day is predicted based on the SO-RBF people flow prediction model;
step 21) constructing a radial basis function:
wherein mu t As a center point of the lens, the lens is,determining the descending speed of a radial basis function for the radial basis width;
step 22) determining 4 nodes of the input layer, x 1 、x 2 、x 3 、x 4 Respectively corresponding to weather, holidays, dining time periods and historical people flow data at the same time;
step 23), determining 1 node of the output layer, wherein Y represents a current-day people flow prediction result;
step 24) normalizing the collected data, mapping the original value to the value x' of the interval [0,1] through the maximum-minimum normalization, wherein the mapping formula is as follows:
wherein, maxA and minA respectively represent the maximum value and the minimum value of the factor A;
step 25), randomly selecting 70% of all data as training samples and the rest 30% as test samples;
step 26) applying SO algorithm to the center point μ of RBF network t Optimizing the position of the (2) and constructing an SO-RBF prediction model;
step 3: acquiring the current dish price data, the quality guarantee period data of various dishes and the historical dish quantity data of a hot pot shop;
step 4: constructing a combined prediction dish quantity prediction model based on the optimization weight, reasonably predicting the required quantity of various dishes on the day according to the prediction data of the SO-RBF people flow model and combining the daily dish price data, the quality guarantee period data of various dishes and the historical dish quantity data obtained in the step 3, and outputting a dish purchasing scheme;
step 41) constructing a multi-variable gray prediction model, wherein the construction formula of the model is as follows:
wherein:representing the original dependent variable sequence,/->The original sequence of the independent variables is represented,denoted as->Is a sequence of one accumulation generation of a, a represents a development coefficient,/->To drive items, b j Is a driving term coefficient; the lambda grey dose; />Generating sequences for close proximity;
step 42) constructing a neural network prediction model, wherein the model construction formula is as follows:
wherein l is the number of neurons of an hidden layer, M is the number of neurons of an input layer, h is the number of neurons of an output layer, and alpha is an adjustment constant with the value of [0,1 ];
step 43) constructing a partial least square regression model, and constructing a double-log linear regression model according to the partial least square regression, wherein the model construction formula is as follows:
ln y=β 01 ln z 12 ln z 2 +...+β q ln z q
wherein: y represents the number of various dishes, z 1 ~z q Representing the main factor influencing the quantity of purchased dishes, beta 0 ~β q Is a regression coefficient;
step 44) building a combined prediction model of the optimization weights, wherein the model building formula is as follows:
wherein:representing the final prediction result; m represents the number of single prediction models, and m is 3; w (w) f The weight of the single prediction model is occupied;representing the prediction result of each single prediction model; and have->
Step 45) weighting w by using reciprocal variance method f And (3) optimizing, wherein an optimization formula is as follows:
wherein:representing the square of the prediction error of the f-th single prediction model.
2. The intelligent predicting method for restaurant traffic stock as recited in claim 1, wherein the step 26) uses SO algorithm to calculate the center point μ of RBF network t The specific steps of optimizing the position of the device are as follows:
step 26.1) initializing the population, wherein the initialization formula is as follows:
X i =X min +r×(X max -X min )
wherein X is i Represents the position of the ith snake, r is [0,1]Random numbers within a range; x is X max And X min The upper and lower boundaries of the solution problem are respectively;
step 26.2) dividing the population into two groups, female and male, assuming a 50% number of males and a 50% number of females, the formula for dividing the population is as follows:
N m ≈N/2
N f =N-N m
wherein: n represents the size of the snake population; n (N) m Representing the number of males; n (N) f Indicating the number of females;
step 26.3) find the best individual in each group, obtaining the best male individual f best,m Optimal female individual f best,f Food position f food
Step 26.4) calculating the temperature, wherein the calculation formula is as follows:
wherein T represents the current iteration number, and T represents the maximum iteration number;
step 26.5) calculating the food amount, wherein the calculation formula is as follows:
wherein c 1 A constant having a value of 0.5;
step 26.6) judging the value Q of the food amount, and when the value Q of the food amount is less than Threshold, threshold=0.25, selecting random positions by the snakes to search for the food, and updating the relative positions of the male snakes and the food by the following formula:
X i,m (t+1)=X rand,m (t)±c 2 ×A m ×((X max -X min )×rand+X min )
wherein: x is X i,m Representing the location of the ith male individual; x is X rand,m Represents random male individual position, rand represents [0,1]]Random number between c 2 Is a constant with a value of 0.05, A m The ability of a male individual to find food is represented by the following formula:
wherein: f (f) rand,m X represents rand,m Adaptation value f of (f) i,m An fitness value representing an ith male individual;
step 26.7) updating the relative position of the female snake to the diet by:
X i,f =X rand,f (t+1)±c 2 ×A f ×((X max -X min )×rand+X min )
wherein: x is X i,f Represents the position, X, of the ith female individual rand,f Representing the location of random female individuals, rand represents [0,1]]Random number between A f Indicating the ability of female individuals to find food, the formula is shown below:
wherein: f (f) rand,f X represents rand,f The fitness value f i,f An fitness value representing an ith female individual;
step 26.8) judging the value Q of the food amount, when the value Q of the food amount is more than Threshold, judging the value of Temp, if the value of Temp is more than Threshold, the snake only moves towards the food direction, and updating the position of the snake group, wherein the updating formula is as follows:
X i,j (t+1)=X food ±c 3 ×Temp×rand×(X food -X i,j (t))
wherein X is i,j Representing the location of all individuals, X food Representing the optimal individual position, c 3 Is a constant with a value of 2;
step 26.9) if the Temp is less than Threshold, the snake is in a combat or mating state;
step 26.10) when the snake is in a combat state, the male individual position is updated, the updated formula is as follows:
X i,m (t+1)=X i,m (t)±c 3 ×FM×rand×(Q×X best,f -X i,m (t))
wherein X is i,m Represents the position of the ith male individual, X best,f Representing the location of the best individual in the female population, FM representing the combat competence of the male individual;
step 26.11) when the snake is in combat, the female position is updated, the updated formula is as follows:
X i,f (t+1)=X i,f (t)±c 3 ×FF×rand×(Q×X best,m -X i,f (t))
wherein: x is X i,f Represents the position, X, of the ith female individual best,m Representing the location of the best individual in the male population, FF representing the combat ability of the female individual;
step 26.12) calculating the combat ability of the male individuals and the female individuals, wherein the calculation formula is as follows:
wherein: f (f) best,f Indicating fitness of the best individual in the female population, f best,m Indicating fitness of the best individual in the male population, f i Representing the fitness of the current individual;
step 26.13) when the snake is in mating mode, the male and female individual positions are updated, the updated formula is as follows:
X i,m (t+1)=X i,m (t)±c 3 ×M m ×rand×(Q×X i,f (t)-X i,m (t))
X i,f (t+1)=X i,f (t)±c 3 ×M f ×rand×(Q×X i,m (t)-X i,f (t))
wherein: x is X i,m Represents the position of the ith male individual, X i,f Represents the position of the ith female individual, M m And M f Respectively representing the mating ability of male individuals and female individuals, and the calculation formula is as follows:
step 26.14) when the snake eggs hatch, the worst male and female individuals are selected for replacement, and the calculation formulas of the worst male individuals and the worst female individuals are as follows:
X worst,m =X min +rand×(X max -X min )
X worst,f =X min +rand×(X max -X min )
wherein: x is X worst,m Represents worst male individuals, X worst,f Representing the worstFemale individuals.
3. An intelligent prediction system based on the intelligent prediction method for food and beverage people flow stock according to claim 1 or 2, which is characterized by comprising a data acquisition unit, a people flow prediction unit, a dish quantity prediction unit and a dish stock output unit;
the data acquisition unit is used for acquiring historical data of weather factors, holiday factors, dining time period factors and people flow;
the system comprises a people flow prediction unit, a storage unit and a storage unit, wherein the people flow prediction unit comprises an SO-RBF people flow prediction model based on a snake optimization algorithm, a current dish price data acquisition unit and a historical dish quantity data acquisition unit, the current dish price data acquisition unit and the historical dish quantity data acquisition unit are respectively used for acquiring current dish price data and historical dish quantity data of a hot pot store, the SO-RBF people flow prediction model predicts people flow of dining in different time periods of the day through data acquired by the data acquisition unit, and the model parameters are optimized by adopting an SO optimization algorithm;
the dish quantity prediction unit comprises a combination prediction dish quantity prediction model based on optimized weights and a data acquisition unit of quality guarantee periods of various dishes, wherein the data acquisition unit of quality guarantee periods of various dishes is used for acquiring data of quality guarantee periods of various dishes, the combination prediction dish quantity prediction model based on optimized weights reasonably predicts the required quantity of various dishes in the day according to the prediction data of the people flow prediction unit, and combines the current dish price data, the quality guarantee period data of various dishes and the historical dish quantity data, and outputs a dish purchasing scheme;
and the dish preparation output unit is used for preparing dishes according to the dish purchase scheme output by the dish quantity prediction unit.
CN202310027609.7A 2023-01-09 2023-01-09 Intelligent prediction method and system for catering traffic stock Active CN115994785B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310027609.7A CN115994785B (en) 2023-01-09 2023-01-09 Intelligent prediction method and system for catering traffic stock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310027609.7A CN115994785B (en) 2023-01-09 2023-01-09 Intelligent prediction method and system for catering traffic stock

Publications (2)

Publication Number Publication Date
CN115994785A CN115994785A (en) 2023-04-21
CN115994785B true CN115994785B (en) 2023-09-29

Family

ID=85991698

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310027609.7A Active CN115994785B (en) 2023-01-09 2023-01-09 Intelligent prediction method and system for catering traffic stock

Country Status (1)

Country Link
CN (1) CN115994785B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117557289B (en) * 2023-11-20 2024-04-16 大头(广州)软件技术有限公司 Restaurant data modeling method and system based on intelligent marketing scene

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005242839A (en) * 2004-02-27 2005-09-08 Qualica Inc Store management system, method, and program
WO2017124509A1 (en) * 2016-01-24 2017-07-27 白宏伟 Method for storing food ingredients recommended according to weather and storage system
WO2017124549A1 (en) * 2016-01-24 2017-07-27 张仓 Restaurant food material automatic reservation method and reservation system
US9898788B1 (en) * 2015-03-25 2018-02-20 Amazon Technologies, Inc. Predictive restaurant ordering
CN108364092A (en) * 2018-01-29 2018-08-03 西安理工大学 A kind of catering trade vegetable Method for Sales Forecast method based on deep learning
CN110046751A (en) * 2019-03-27 2019-07-23 上海建坤信息技术有限责任公司 Multi-energy system dispatching method based on the prediction of radial base energy consumption and real-time energy efficiency
CN110490635A (en) * 2019-07-12 2019-11-22 阿里巴巴集团控股有限公司 Trade company's vegetable transaction prediction and method and device of preparing for a meal
CN110555750A (en) * 2019-07-29 2019-12-10 北京三快在线科技有限公司 method and device for predicting number of people at dinner, electronic equipment and readable storage medium
KR20200066928A (en) * 2018-12-03 2020-06-11 전종식 Server performing prediction of number of people eating and operating method therof
CN113988904A (en) * 2021-09-30 2022-01-28 杭州拼便宜网络科技有限公司 Shop data acquisition method, device, equipment and storage medium
CN114626887A (en) * 2022-03-18 2022-06-14 建信金融科技有限责任公司 Passenger flow volume prediction method and device, computer equipment and storage medium
CN114881370A (en) * 2022-06-17 2022-08-09 中国工商银行股份有限公司 Canteen dish planning method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2018322033A1 (en) * 2017-08-25 2020-03-05 Taylor Commercial Foodservice, LLC. Restaurant scheduling processes and systems

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005242839A (en) * 2004-02-27 2005-09-08 Qualica Inc Store management system, method, and program
US9898788B1 (en) * 2015-03-25 2018-02-20 Amazon Technologies, Inc. Predictive restaurant ordering
WO2017124509A1 (en) * 2016-01-24 2017-07-27 白宏伟 Method for storing food ingredients recommended according to weather and storage system
WO2017124549A1 (en) * 2016-01-24 2017-07-27 张仓 Restaurant food material automatic reservation method and reservation system
CN108364092A (en) * 2018-01-29 2018-08-03 西安理工大学 A kind of catering trade vegetable Method for Sales Forecast method based on deep learning
KR20200066928A (en) * 2018-12-03 2020-06-11 전종식 Server performing prediction of number of people eating and operating method therof
CN110046751A (en) * 2019-03-27 2019-07-23 上海建坤信息技术有限责任公司 Multi-energy system dispatching method based on the prediction of radial base energy consumption and real-time energy efficiency
CN110490635A (en) * 2019-07-12 2019-11-22 阿里巴巴集团控股有限公司 Trade company's vegetable transaction prediction and method and device of preparing for a meal
CN110555750A (en) * 2019-07-29 2019-12-10 北京三快在线科技有限公司 method and device for predicting number of people at dinner, electronic equipment and readable storage medium
CN113988904A (en) * 2021-09-30 2022-01-28 杭州拼便宜网络科技有限公司 Shop data acquisition method, device, equipment and storage medium
CN114626887A (en) * 2022-03-18 2022-06-14 建信金融科技有限责任公司 Passenger flow volume prediction method and device, computer equipment and storage medium
CN114881370A (en) * 2022-06-17 2022-08-09 中国工商银行股份有限公司 Canteen dish planning method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Snake Optimizer: A novel meta-heuristic optimization algorithm;Fatma A. Hashim,Abdelazim G. Hussien;Knowledge-Based Systems;第242卷;全文 *
基于深度学习和组合模型的菜品销量预测研究;张亚菲;CNKI优秀硕士学位论文全文库(第12期);全文 *

Also Published As

Publication number Publication date
CN115994785A (en) 2023-04-21

Similar Documents

Publication Publication Date Title
Stonich The dynamics of social processes and environmental destruction: a Central American case study
Nguyen et al. Multiple neural networks for a long term time series forecast
CN115994785B (en) Intelligent prediction method and system for catering traffic stock
CN110705743A (en) New energy consumption electric quantity prediction method based on long-term and short-term memory neural network
CN106951611A (en) A kind of severe cold area energy-saving design in construction optimization method based on user&#39;s behavior
CN110674993A (en) User load short-term prediction method and device
Hong et al. Locational marginal price forecasting using deep learning network optimized by mapping-based genetic algorithm
CN110009432A (en) A kind of personal consumption behavior prediction technique
Akpinar et al. Forecasting natural gas consumption with hybrid neural networks—Artificial bee colony
CN116562514B (en) Method and system for immediately analyzing production conditions of enterprises based on neural network
Ding et al. Sales forecasting based on catboost
CN106991496A (en) A kind of user behavior towards mobile social environment is layered interaction prediction method
Abumohsen et al. Electrical load forecasting based on random forest, xgboost, and linear regression algorithms
CN117494874A (en) Intelligent automatic distribution method and system for marketers
CN111967505A (en) Parameter tuning method of random forest model for smart marketing
Spuritha et al. Quotidian sales forecasting using machine learning
Ma et al. A two-stage stochastic optimization model for port cold storage capacity allocation considering pelagic fishery yield uncertainties
CN109685197A (en) A kind of optimization method based on the power supply set meal for improving particle swarm algorithm
Kaburlasos et al. Intelligent clustering techniques for prediction of sugar production
Li et al. Short-term power load forecasting using improved ant colony clustering
Li et al. Forecasting from low quality data with applications in weather forecasting
Geng et al. Research on vegetable commodity pricing replenishment decision based on particle swarm algorithm
Yang et al. Intelligent Pricing and Replenishment Strategy for Vegetables Based on ARIMA Prediction and BP Neural Networks
Khalil et al. A Comparison of Artificial Neural Network Models and Time Series Models for Forecasting Turkey's Monthly Aluminium Exports to Iraq
Yan et al. A short-term forecasting model with inhibiting normal distribution noise of sale series

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant