Method, device, electronic device and medium for predicting the number of people dining together

By integrating employee attendance check-in data, historical dining records and weather data, building a wide table of prediction data information and using pre-configured models to predict, the problem of low accuracy in predicting the number of meals in the existing technology is solved, and more accurate Predictions for the number of meals.

CN113298306BActive Publication Date: 2025-02-18CHINA CONSTRUCTION BANK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110564416.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-24
Publication Date
2025-02-18
Estimated Expiration
2041-05-24

AI Technical Summary

Technical Problem

The existing method of predicting the number of people who canteen dining depends on the employees' historical dining records, and it is impossible to accurately predict the number of people who are dining in the current period, resulting in low accuracy of the prediction results.

Method used

By collecting multiple prediction parameter data, such as employee attendance check-in data, employee historical meal record data and weather data, data fusion processing is carried out, a wide table of prediction data information is constructed, and prediction is made based on the pre-configured prediction model for the number of meals.

Benefits of technology

The use of multi-dimensional data fusion is achieved to comprehensively and accurately predict the number of people in the canteen and restaurant, improving the prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113298306B_ABST
    Figure CN113298306B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a method, device, electronic device and medium for predicting the number of diners. The present invention relates to the field of big data. The method comprises: collecting at least two kinds of prediction parameter data for predicting the number of diners on the day; fusing the at least two kinds of prediction parameter data to obtain a wide table of prediction data information; predicting the number of diners on the day based on a pre-configured prediction model for the number of diners and the wide table of prediction data information. By executing this technical solution, the technical effect of comprehensively and accurately predicting the number of diners in a canteen restaurant by using multi-dimensional data fusion is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of big data, and in particular to a method, device, electronic device and medium for predicting the number of diners. Background Art

[0002] A canteen is a common place that provides collective meals for a large number of people in government agencies, schools, enterprises, and military camps. The number of diners is not fixed every day, which makes the daily operation and control of the canteen difficult to manage, resulting in long queues, insufficient supply, or serious food waste in most canteens in my country. At present, the number of diners in the canteen is mostly predicted by the restaurant based on the average number of diners on weekdays in the past few weeks, that is, based on the historical dining records of employees. However, this method only takes into account the historical dining records of employees, and the historical dining records cannot directly represent the number of diners in the current period, resulting in a very low accuracy of the prediction results. Therefore, a prediction method that can integrate multiple data to accurately predict the number of diners is needed. Summary of the invention

[0003] The embodiments of the present invention provide a method, device, electronic device and medium for predicting the number of diners, which can achieve the technical effect of comprehensively and accurately predicting the number of diners in a cafeteria restaurant by utilizing multi-dimensional data fusion.

[0004] In a first aspect, an embodiment of the present invention provides a method for predicting the number of diners, comprising:

[0005] Collect at least two prediction parameter data for predicting the number of diners on that day;

[0006] Performing fusion processing on the at least two prediction parameter data to obtain a prediction data information wide table;

[0007] The number of diners on that day is predicted based on the pre-configured diners number prediction model and the prediction data information wide table.

[0008] In a second aspect, an embodiment of the present invention further provides a device for predicting the number of diners, comprising:

[0009] A data collection module, used for collecting at least two kinds of prediction parameter data for predicting the number of people dining on that day;

[0010] A data processing module, used for fusing the at least two prediction parameter data to obtain a prediction data information wide table;

[0011] The number prediction module is used to predict the number of diners on the day based on a pre-configured diners number prediction model and the prediction data information wide table.

[0012] In a third aspect, an embodiment of the present invention further provides an electronic device, including:

[0013] one or more processors;

[0014] A storage device for storing one or more programs;

[0015] The one or more programs are executed by the one or more processors, so that the one or more processors implement the method for predicting the number of diners provided in any embodiment of the present invention.

[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, a method for predicting the number of diners provided in any embodiment of the present invention is implemented.

[0017] A method for predicting the number of diners is provided in an embodiment of the present invention. The diners number prediction system collects at least two kinds of prediction parameter data for the day, fuses the at least two kinds of prediction parameter data to obtain a wide table of prediction data information, and finally predicts the number of diners for breakfast, lunch and dinner on the day based on a pre-configured diners number prediction model and the wide table of prediction data information.

[0018] By adopting the technical solution of the present application, by collecting at least two kinds of prediction parameter data for predicting the number of diners on that day, the prediction parameter data obtained from different dimensions and different systems are associated and fused to obtain a wide table of prediction data information, and the number of diners for breakfast, lunch and dinner on that day is comprehensively predicted based on the prediction model and the wide table of prediction data information. This can achieve the technical effect of using multi-dimensional data fusion to comprehensively and accurately predict the number of diners in the cafeteria and restaurant.

[0019] The above invention content is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Other features, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings. The drawings are only for the purpose of illustrating preferred embodiments and are not to be considered as limiting the present invention. Also, the same reference symbols are used throughout the drawings to represent the same parts. In the drawings:

[0021] Figure 1 This is a flow chart of a method for predicting the number of diners provided in Example 1 of the present application;

[0022] Figure 2is a flow chart of another method for predicting the number of diners provided in Example 2 of the present application;

[0023] Figure 3 This is a schematic diagram of a client interface of a dining number prediction system provided in an embodiment of the present application;

[0024] Figure 4 It is a structural schematic diagram of a device for predicting the number of diners provided in Example 3 of the present application;

[0025] Figure 5 It is a structural schematic diagram of an electronic device provided in Example 4 of the present application. DETAILED DESCRIPTION

[0026] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0027] It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations (or steps) as sequential processes, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0028] Embodiment 1

[0029] Figure 1 This is a flow chart of a method for predicting the number of diners provided in the first embodiment of the present invention. The method can be applied to the situation where a restaurant or canteen predicts the number of diners for breakfast, lunch and dinner on the same day. The method can be executed by a device for predicting the number of diners. The device can be implemented by software and / or hardware and can be integrated into an electronic device. Figure 1 As shown, the method for predicting the number of diners in this embodiment includes the following steps:

[0030] In the era of advocating the "Clean Plate" campaign and saving food, in order to prevent food waste, the forecast and estimation of the number of diners in canteens or restaurants has become an issue that major corporate canteens and restaurants need to consider. At present, when most canteens and restaurants predict the number of diners, they use the daily experience of canteen chefs to make a rough forecast, and also use the historical dining records of employees to predict the number of diners. However, these two methods cannot achieve a relatively accurate forecast of the number of diners, and do not take into account the influence of other factors such as weather factors.

[0031] S110. Collect at least two types of prediction parameter data for predicting the number of people dining on that day.

[0032] Among them, the diners prediction system collects at least two kinds of prediction parameter data for predicting the number of diners on that day. The prediction parameter data is the data that can be collected that will affect whether employees will come to the cafeteria to eat. It can be the employees' own data information or external factors.

[0033] In an optional solution of this embodiment, it can be combined with one or more optional solutions of this embodiment. Wherein, the prediction parameter data includes: employee attendance punch-in data, employee historical dining record data and weather data.

[0034] Among them, the prediction parameter data may include employee clock-in data, employee historical dining record data and weather data. Employee attendance clock-in data is obtained by connecting to the internal video surveillance face recognition system, entrance gate (card swiping and face recognition function), and fingerprint clock-in system, and employee historical dining record data is obtained by the system of the logistics canteen card reader. The real-time weather data of the enterprise location of China Weather Network is crawled by web crawlers. Attendance data includes video surveillance face recognition at the entrance, card swiping or face recognition at the gate, fingerprint recognition and other forms, including clock-in date and time (accurate to seconds), sign-in method, clock-in attendance number, name, clock-in device number, personnel organization affiliation and other fields. The detailed data of canteen dining consumption records is temporarily stored in the canteen clock-in machine, automatically uploaded after each meal, and reconciliation and settlement are performed. It can be summarized and exported, including the time of consumption record (accurate to seconds), amount, card swiping machine number, employee name and number, and consumed dish number. The employee punch-in record data is proportional to the probability of the employee coming to eat. If the employee does not punch in, it can be basically determined that the employee will not come to eat. If the employee has a punch-in record, it can be determined that the employee has a high probability of coming to eat in the cafeteria. The employee's historical dining record data can be used to determine which meals are often eaten in the cafeteria every day, or which days of the week are often eaten in the cafeteria. Weather data shows that on rainy days, the number of diners in the cafeteria will generally increase, while on sunny days, the number of diners in the cafeteria will generally decrease. Temperature factors are also related to changes in the number of diners.

[0035] By adopting the above technical solution, by collecting at least two kinds of prediction parameter data, including employee attendance clock-in data, employee historical dining record data and weather data, the number of diners is predicted based on the above data, and a more accurate prediction result of the number of diners can be obtained by fusion of multiple data.

[0036] S120: Fusing the at least two prediction parameter data to obtain a prediction data information wide table.

[0037] Among them, the diners prediction system integrates at least two kinds of prediction parameter data to further obtain a wide table of prediction data information. The wide table of prediction data information refers to a database table that combines multiple data tables associated with subject-related indicators, dimensions, and attributes.

[0038] In an optional solution of this embodiment, it can be combined with one or more optional solutions of this embodiment. Among them, fusing the at least two prediction parameter data to obtain a prediction data information wide table may include steps A1-A2:

[0039] Step A1: perform data exploration and data cleaning on the at least two prediction parameter data to obtain at least two modified prediction parameter data.

[0040] Step A2: constructing a wide table of prediction data information based on the at least two modified prediction parameter data fusions as an input to a diners number prediction model.

[0041] The diners number prediction system performs data exploration and data cleaning on at least two prediction parameter data to obtain at least two modified prediction parameter data.

[0042] In an optional solution of this embodiment, one or more optional solutions of this embodiment can be combined. Among them, performing data exploration and data cleaning on the at least two prediction parameter data to obtain at least two modified prediction parameter data may include steps B1-B2,

[0043] Step B1: performing data analysis on the at least two prediction parameter data to obtain classification features of the at least two prediction parameter data.

[0044] Step B2: performing data cleaning on the at least two prediction parameter data according to the classification characteristics of the at least two prediction parameter data to obtain at least two modified prediction data.

[0045] Among them, the dining number prediction system performs data analysis on the prediction parameter data to obtain the classification features of the prediction parameter data. The classification features refer to the characteristic relationship between data of different dimensions under the same attribute. For example, if an employee has no dining records every Wednesday for a long time, then the dining records on Wednesdays are often 0, which can be used as the classification features of the data. Therefore, the prediction parameter data is cleaned according to the classification features.

[0046] In an optional solution of this embodiment, it can be combined with one or more optional solutions of this embodiment. Wherein, the data analysis includes: variance analysis, correlation analysis, regression analysis and factor analysis.

[0047] In an optional solution of this embodiment, it can be combined with one or more optional solutions of this embodiment. Wherein, the data cleaning includes: removing abnormal values ​​in the at least two prediction parameter data and filling missing values ​​in the at least two prediction parameter data.

[0048] Among them, outliers in the prediction parameter data are eliminated, and the 3σ principle is mainly used to detect outliers. Outliers are detected and eliminated for data samples with normal distribution or approximate normal distribution. The missing values ​​of the data are filled according to the classification characteristics of the data. For example, in the continuous date data, the date data is missing between the 21st and the 23rd. Then according to the classification characteristics, the missing data date value here is the 22nd.

[0049] In an optional solution of this embodiment, one or more optional solutions of this embodiment can be combined. Constructing a wide table of prediction data information based on the fusion of at least two modified prediction parameter data may include steps C1-C2:

[0050] Step C1: constructing features for the at least two modified prediction parameter data according to a preset feature definition to obtain at least two modified prediction feature data.

[0051] Step C2: associating and fusing the at least two modified prediction feature data into a prediction data information wide table.

[0052] Among them, the dining number prediction system constructs features for at least two types of modified prediction parameter data according to the preset feature definition. The modified prediction parameter data obtained from different systems cannot directly construct a wide table of prediction data information, so feature engineering is performed for data construction based on the preset feature definition, so as to integrate and form a wide table based on the same data features.

[0053] When the prediction parameter data is composed of employee attendance punch-in data, employee historical meal record data, and weather data, the following feature engineering can be constructed for each employee:

[0054] name,Employee name

[0055] date

[0056] weather: weather data, which is obtained from China Weather Network at regular intervals. The data includes: ['moderate rain', 'cloudy', 'heavy rain', 'light rain', 'clear', 'heavy rain', 'cloudy', 'showers', 'thunderstorms']

[0057] breakfast, lunch, supper: whether the employee had breakfast, lunch, or dinner in the cafeteria on the historical date, which can be used as a label for later DeepFM and Markov model training

[0058] weekday: Monday to Friday, [0,1,2,3,4,5,6]

[0059] isMonday: Is today Monday? 0 / 1, binary

[0060] isTuesday: 0 / 1, binary

[0061] isWednesday: 0 / 1, binary

[0062] isThursday: 0 / 1, binary

[0063] isFriday: 0 / 1, binary

[0064] checked: whether the user checked in that day, 0 / 1, binary, usr-wise

[0065] last_3_monday_avg: The average number of people dining on Mondays in the past three weeks. Through the previous data perspective, it is found that the number of people fluctuates less in August and September, and fluctuates more in June and July. Considering the seasonal factors, a sliding window smoothing is done

[0066] last_3_tuesday_avg,last_3_wednesday_avg,last_3_thursday_avg,last_3_friday_avg

[0067] maxtemp:0:(0,20],1:(20,25],2:(25,30],3:(30,100], the highest temperature of the day, discretized

[0068] mintemp:0:(0,15],1:(15,20],2:(20,25],3:(25,100], the lowest temperature of the day

[0069] airquality: ['moderate', 'excellent', 'good', 'mild'], air quality

[0070] mondayeats_bre: The number of times this employee ate breakfast in the cafeteria on Mondays in history. Others, similarly

[0071] mondayeats_lun,mondayeats_sup,tuesdayeats_bre,tuesdayeats_lun,tuesdayeats_sup,wednesdayeats_bre,wednesdayeats_lun ,wednesdayeats_sup,thursdayeats_bre,thursdayeats_lun,thursdayeats_sup,fridayeats_bre,fridayeats_lun,fridayeats_sup

[0072] After defining features and constructing feature engineering, the data obtained from the above three dimensions are associated and integrated to form a wide table of prediction data information. The header fields of the wide table are as follows:

[0073] name,date,weather,maxtemp,mintemp,airquality,windpower,weekday,isMonday,isTuesday,isWednesday,isThursday,isFriday,checked,breakfast,lunch,supper,mondayeats_bre,mondayeats_lun,mondayeats_sup,tue sdayeats_bre,tuesdayeats_lun,tuesdayeats_sup,wednesdayeats_bre,wednesdayeats_lun,wednesdayeats_sup,thursdayeats_bre,thursdayeats_lun,thursdayeats_sup,fridayeats_bre,fridayeats_lun,fridayeats_sup

[0074] The joined wide table can be directly used as input to the pre-configured diners occupancy prediction model.

[0075] By adopting the above technical scheme, features of the at least two modified prediction parameter data are constructed according to preset feature definitions to obtain modified prediction feature data, and the modified prediction feature data are associated and integrated to obtain a data wide table, thereby achieving the technical effect of fusing data and realizing the prediction of the number of diners on the day in multiple dimensions.

[0076] In an optional solution of this embodiment, it can be combined with one or more optional solutions of this embodiment. After associating and fusing the at least two modified prediction feature data into a prediction data information wide table, it includes: storing the prediction data information wide table in separate libraries and tables.

[0077] Among them, the diners number prediction system stores the prediction data information wide table in separate databases and tables. If the diners number prediction system does not store the constructed prediction data information wide table in separate databases and tables, the cache data in the data storage device will not be dispersed enough, resulting in a large amount of cache data being concentrated on one or several service nodes, which will lead to data skew due to poor load balancing implementation.

[0078] S130, predicting the number of diners on that day based on the pre-configured diners number prediction model and the prediction data information wide table.

[0079] The diners number prediction system inputs the prediction data information into a pre-configured diners number prediction model, and the prediction model outputs the prediction result of the total number of diners on that day.

[0080] The technical solution of this embodiment collects at least two kinds of prediction parameter data for predicting the number of diners on that day, fuses the at least two kinds of prediction parameter data to obtain a wide table of prediction data information, and predicts the number of diners on that day based on a pre-configured diners number prediction model and the wide table of prediction data information, thereby achieving the technical effect of using multi-dimensional data fusion to comprehensively and accurately predict the number of diners in the cafeteria restaurant.

[0081] Embodiment 2

[0082] Figure 2 2 is a flowchart of another method for predicting the number of diners provided in Example 2 of the present application. The embodiment of the present invention further optimizes the above embodiment on the basis of the above embodiment, and the embodiment of the present invention can be combined with various optional solutions in one or more of the above embodiments. Figure 2 As shown, the method for predicting the number of diners provided in the embodiment of the present invention may include the following steps:

[0083] S210. Collect at least two types of prediction parameter data for predicting the number of people dining on that day.

[0084] S220: Fusing the at least two prediction parameter data to obtain a prediction data information wide table.

[0085] S230. If the wide table of predicted data information for the day includes employee attendance clock-in data, the number of people eating lunch on the day is predicted based on the classified DeepFM model and the wide table of predicted data information.

[0086] Among them, the diners number prediction system determines that if the wide table of predicted data information for the day includes employee clock-in attendance data, the number of diners for lunch on that day is predicted based on the classification DeepFM model and the wide table of predicted data information for the day.

[0087] Establish a deep learning model, use ROC / AUC, GINI coefficient, RMSE as evaluation indicators, and construct a DeepFM (Deep Factorization Machine) classification model: 0, 1 classification prediction. Input the headers of the wide table into the model as features, and the output is the probability of each employee eating at each meal. Sum up the probabilities of all people to get the expected number of people eating in the cafeteria on that day. Using sigmoid as the activation function of the output layer, the network can only learn to predict values ​​in the range of 0 to 1, which can be regarded as the probability of eating. Follow the classic problem in the recommendation system to recommend movies that users may like, and predict whether the user will click on it. User->Movie, another movie is given, the user clicks / doesn't click (1 / 0). Employee->One day in history, new day data, the user eats / doesn't eat in the cafeteria (1 / 0). Construct a feature domain, starting from two perspectives (interacting subjects), describe the attributes of the employee himself and a certain day in history that affect the employee's decision to eat in the cafeteria. For describing employees, construct userid / name, mondayeats, tuesdayeats, wednesdayeats, thursdayeats, fridayeats, checked feature domains as model input. For describing a day, construct weather, maxtemp, mintemp, airquality, isMonday, isTuesday, isWednesday, isThursday, isFriday feature domains as model input. Figure 3 As shown, in the client interface of the dining number prediction system, by submitting attendance details data, submitting breakfast details data, and querying weather data, the total number of diners for breakfast, lunch, and dinner can be predicted with one click.

[0088] By adopting the above technical solution, the number of people eating lunch on the day can be predicted more accurately by using the classified DeepFM model as well as employee attendance clock-in data, employee historical dining record data and weather data.

[0089] S240, replacing the prediction result of the number of lunch diners on the day by the Markov model according to the prediction result of the number of lunch diners on the day by the classification DeepFM model.

[0090] Among them, the diners prediction system replaces the Markov model's prediction results for the number of diners for lunch on the same day based on the classification DeepFM model's prediction results for the number of diners for lunch on the same day. The classification DeepFM model has the best prediction effect for lunch when applying multi-data fusion prediction, while the Markov model can predict the number of diners for three meals a day based only on the employees' historical dining record data, but the prediction results are less accurate. Therefore, when the prediction parameter data for the day includes employee attendance clock-in data, the prediction results for the number of diners for lunch on the same day are replaced by the Markov model's prediction results for the number of diners for lunch, and the prediction results for the number of diners for breakfast and dinner on the same day are still predicted by the Markov model.

[0091] In an optional solution of this embodiment, one or more optional solutions of this embodiment can be combined. Before replacing the prediction result of the number of lunch diners on the same day of the Markov model with the prediction result of the number of lunch diners on the same day of the classification DeepFM model, steps D1-D2 can be included:

[0092] Step D1: determining employee historical dining record data based on the at least two prediction parameter data.

[0093] Step D2: predicting the number of diners for breakfast, lunch and dinner each day in a week based on the Markov model and the employee's historical dining record data.

[0094] The diners prediction system determines the employee's historical dining record data based on at least two types of prediction parameter data, and predicts the number of diners for breakfast, lunch and dinner each day of the week based on the Markov model and the employee's historical dining record data. The Markov model predicts the number of diners through the conditional probability principle and probability transfer matrix. The model does not rely on attendance data and weather data, and only needs the historical dining record data of each employee to complete the prediction.

[0095] In an optional scheme of the present embodiment, it can be combined with one or more optional schemes of the present embodiment. Among them, predicting the number of people eating lunch on the day based on the classified DeepFM model and the predicted data information wide table includes: predicting the probability of each employee eating lunch on the day based on the classified DeepFM model and the predicted data information wide table, the probability of each employee eating lunch on the day is within the predicted probability interval, the lower limit of the probability interval is 0, and the upper limit is 1; combining and summing the dining probabilities of each employee on the day to obtain the predicted number of people eating lunch on the day.

[0096] Among them, the prediction result of the classification DeepFM model is the probability of each employee having lunch on that day. The probability of having lunch is in the predicted probability interval 0-1. The total number of people predicted to have lunch on that day can be obtained by combining and summing the probability of each employee having lunch on that day. For example, there are 10 employees in total, and the probability of each employee having lunch is 0.5, then the total number of people predicted to have lunch on that day is 0.5×10,5 people.

[0097] In an optional solution of this embodiment, it can be combined with one or more optional solutions of this embodiment. After predicting the number of diners on that day according to the pre-configured diners number prediction model and the prediction data information wide table, it can include steps E1-E2:

[0098] Step E1: updating the at least two prediction parameter data to obtain at least two updated prediction parameter data.

[0099] Step E2: regularly training and updating the pre-configured diners number prediction model based on the at least two updated prediction parameter data.

[0100] After successful registration, the canteen logistics manager can log in to the prediction system and submit new clock-in data and dining data for model training and prediction. Weather data automatically obtains the weather in the current city, and the city can be changed. Forecasts can also be made when the data source is incomplete, and the prediction process is transparent to users. After the historical data is updated, the model is iteratively updated through online training in the form of scheduled tasks to continuously improve the accuracy of the model prediction results.

[0101] The technical solution of this embodiment collects at least two kinds of prediction parameter data for predicting the number of diners on that day, and fuses the at least two kinds of prediction parameter data to obtain a wide table of prediction data information; if the wide table of prediction data information for that day includes employee attendance clock-in data, the number of diners for lunch on that day is predicted based on the classified DeepFM model and the wide table of prediction data information; the prediction result of the number of diners for lunch on that day by the Markov model is replaced with the prediction result of the number of diners for lunch on that day by the classified DeepFM model, and finally the prediction results of the number of diners for three meals on that day are obtained, thereby achieving the goal of using multi-dimensional data fusion, the prediction results of the classified DeepFM model and the Markov model in different scenarios, and comprehensively and accurately predicting the number of diners in the cafeteria restaurant.

[0102] Embodiment 3

[0103] Figure 4: is a schematic diagram of the structure of a dining number prediction device provided in the third embodiment of the present invention. The device can be used in restaurants and canteens to predict the number of diners for breakfast, lunch and dinner on the same day. The device can be implemented by software and / or hardware and integrated in electronic devices. The device is used to implement the dining number prediction method provided in the above embodiment. Figure 4 As shown, the dining number prediction device provided in this embodiment includes:

[0104] A data collection module 410 is used to collect at least two kinds of prediction parameter data for predicting the number of people dining on that day;

[0105] A data processing module 420 is used to perform fusion processing on the at least two prediction parameter data to obtain a prediction data information wide table;

[0106] The number prediction module 430 is used to predict the number of diners on that day based on a pre-configured diners number prediction model and the prediction data information wide table.

[0107] Based on the above embodiment, optionally, the data collection module 410 is used to:

[0108] The prediction parameter data includes: employee attendance clock-in data, employee historical meal record data and weather data.

[0109] Based on the above embodiment, optionally, the data processing module 420 is used to:

[0110] Performing data exploration and data cleaning on the at least two prediction parameter data to obtain at least two modified prediction parameter data;

[0111] A wide table of prediction data information is constructed based on the fusion of the at least two modified prediction parameter data as an input of a diners number prediction model.

[0112] Based on the above embodiment, optionally, the data processing module 420 is further configured to:

[0113] Performing data analysis on the at least two prediction parameter data to obtain classification features of the at least two prediction parameter data;

[0114] The at least two prediction parameter data are cleaned according to the classification characteristics of the at least two prediction parameter data to obtain at least two modified prediction data.

[0115] Based on the above embodiment, optionally, the data processing module 420 is further configured to:

[0116] The data analysis includes: variance analysis, correlation analysis, regression analysis and factor analysis.

[0117] Based on the above embodiment, optionally, the data processing module 420 is further configured to:

[0118] The data cleaning includes: removing abnormal values ​​in the at least two prediction parameter data, and filling missing values ​​in the at least two prediction parameter data.

[0119] Based on the above embodiment, optionally, the data processing module 420 is further configured to:

[0120] Performing feature construction on the at least two modified prediction parameter data according to a preset feature definition to obtain at least two modified prediction feature data;

[0121] The at least two modified prediction feature data are associated and fused into a prediction data information wide table.

[0122] Based on the above embodiment, optionally, the data processing module 420 is further configured to:

[0123] The prediction data information wide table is stored in separate libraries and tables.

[0124] Based on the above embodiment, optionally, the number of people prediction module 430 is used to:

[0125] If the wide table of forecast data for the day includes employee attendance clock-in data, the number of people eating lunch on that day is predicted based on the classification DeepFM model and the wide table of forecast data information;

[0126] The prediction result of the number of lunch diners on the same day by the Markov model is replaced according to the prediction result of the number of lunch diners on the same day by the classification DeepFM model.

[0127] Based on the above embodiment, optionally, the number of people prediction module 430 is further used to:

[0128] Determining employee historical dining record data based on the at least two prediction parameter data;

[0129] The number of people eating breakfast, lunch and dinner each day in a week is predicted based on the Markov model and the employee's historical dining record data.

[0130] Based on the above embodiment, optionally, the number of people prediction module 430 is further used to:

[0131] Predicting the probability of each employee having lunch on that day based on the classification DeepFM model and the prediction data information wide table, wherein the probability of each employee having lunch is within the predicted probability interval, and the lower limit of the probability interval is 0 and the upper limit is 1;

[0132] The meal probabilities of each employee on that day are combined and summed up to obtain the predicted number of people eating lunch on that day.

[0133] Based on the above embodiment, optionally, the number of people prediction module 430 is further used to:

[0134] Updating the at least two prediction parameter data to obtain at least two updated prediction parameter data;

[0135] The pre-configured diners number prediction model is regularly trained and updated according to the at least two updated prediction parameter data.

[0136] The device for predicting the number of diners provided in the embodiment of the present invention can execute the method for predicting the number of diners provided in any embodiment of the present invention, and has the corresponding functions and beneficial effects of executing the method for predicting the number of diners. For detailed process, please refer to the relevant operations of the method for predicting the number of diners in the above embodiment.

[0137] Embodiment 4

[0138] Figure 5 Schematic diagram of the structure of an electronic device provided in the fourth embodiment of the present application. The present embodiment of the present application provides an electronic device, in which the device for predicting the number of people dining provided in the embodiment of the present application can be integrated. Figure 5 As shown, this embodiment provides an electronic device 500, which includes: one or more processors 520; a storage device 510, which is used to store one or more programs. When the one or more programs are executed by the one or more processors 520, the one or more processors 520 implement the method for predicting the number of diners provided in the embodiment of the present application. The method includes:

[0139] Collect at least two prediction parameter data for predicting the number of diners on that day;

[0140] Performing fusion processing on the at least two prediction parameter data to obtain a prediction data information wide table;

[0141] The number of diners on that day is predicted based on the pre-configured diners number prediction model and the prediction data information wide table.

[0142] Of course, those skilled in the art can understand that the processor 520 also implements the technical solution of the method for predicting the number of diners provided in any embodiment of the present application.

[0143] Figure 5 The electronic device 500 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0144] like Figure 5As shown, the electronic device 500 includes a processor 520, a storage device 510, an input device 530, and an output device 540; the number of the processor 520 in the electronic device can be one or more. Figure 5 A processor 520 is taken as an example; the processor 520, the storage device 510, the input device 530 and the output device 540 in the electronic device can be connected via a bus or other means. Figure 5 The connection via bus 550 is taken as an example.

[0145] The storage device 510 is a computer-readable storage medium that can be used to store software programs, computer executable programs, and module units, such as program instructions corresponding to the method for predicting the number of diners in the embodiment of the present application.

[0146] The storage device 510 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the storage device 510 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the storage device 510 may further include a memory remotely arranged relative to the processor 520, and these remote memories may be connected via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0147] The input device 530 may be used to receive input numbers, character information or voice information, and generate key signal input related to user settings and function control of the electronic device. The output device 540 may include electronic devices such as a display screen and a speaker.

[0148] The electronic device provided in the embodiment of the present application can achieve the technical effect of comprehensively and accurately predicting the number of diners in a cafeteria or restaurant by utilizing multi-dimensional data fusion.

[0149] Embodiment 5

[0150] A fifth embodiment of the present invention provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the program is used to perform a method for predicting the number of people dining together. The method includes:

[0151] Collect at least two prediction parameter data for predicting the number of diners on that day;

[0152] Performing fusion processing on the at least two prediction parameter data to obtain a prediction data information wide table;

[0153] The number of diners on that day is predicted based on the pre-configured diners number prediction model and the prediction data information wide table.

[0154] Optionally, when the program is executed by a processor, it can also be used to execute the method for predicting the number of diners provided in any embodiment of the present invention.

[0155] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the above. The computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device.

[0156] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to: electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0157] The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the above.

[0158] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0159] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0160] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for predicting the number of people dining, characterized in that: include: Collect at least two types of prediction parameter data for predicting the number of people dining on that day; wherein the prediction parameter data include: employee attendance clock-in data, employee historical dining record data, weather data, and temperature data; Performing fusion processing on the at least two prediction parameter data to obtain a prediction data information wide table; Predicting the number of diners on that day based on a pre-configured diners number prediction model and the prediction data information wide table; If the wide table of forecast data for the day includes employee attendance clock-in data, the number of people eating lunch on that day is predicted based on the classification DeepFM model and the wide table of forecast data information; Determining employee historical dining record data based on the at least two prediction parameter data; Predict the number of people eating breakfast, lunch and dinner each day in a week based on the Markov model and the employee's historical dining record data; The prediction result of the number of lunch diners on the same day by the Markov model is replaced according to the prediction result of the number of lunch diners on the same day by the classification DeepFM model.

2. The method according to claim 1, characterized in that The at least two types of prediction parameter data are fused to obtain a prediction data information wide table, including: Performing data exploration and data cleaning on the at least two prediction parameter data to obtain at least two modified prediction parameter data; A wide table of prediction data information is constructed based on the fusion of the at least two modified prediction parameter data as an input of a diners number prediction model.

3. The method according to claim 2, characterized in that Performing data exploration and data cleaning on the at least two prediction parameter data to obtain at least two modified prediction parameter data includes: Performing data analysis on the at least two prediction parameter data to obtain classification features of the at least two prediction parameter data; The at least two prediction parameter data are cleaned according to the classification characteristics of the at least two prediction parameter data to obtain at least two modified prediction parameter data.

4. The method according to claim 3, characterized in that The data analysis includes: variance analysis, correlation analysis, regression analysis and factor analysis.

5. The method according to claim 3, characterized in that: The data cleaning includes: removing abnormal values ​​in the at least two prediction parameter data, and filling missing values ​​in the at least two prediction parameter data.

6. The method according to claim 2, characterized in that Constructing a wide table of prediction data information based on the at least two modified prediction parameter data fusions, including: Performing feature construction on the at least two modified prediction parameter data according to a preset feature definition to obtain at least two modified prediction feature data; The at least two modified prediction feature data are associated and fused into a prediction data information wide table.

7. The method according to claim 6, characterized in that After associating and fusing the at least two modified prediction feature data into a prediction data information wide table, the method includes: The prediction data information wide table is stored in separate libraries and tables.

8. The method according to claim 1, characterized in that The number of people eating lunch on that day is predicted based on the classification DeepFM model and the prediction data information wide table, including: Predicting the probability of each employee having lunch on that day based on the classification DeepFM model and the prediction data information wide table, wherein the probability of each employee having lunch is within the predicted probability interval, and the lower limit of the probability interval is 0 and the upper limit is 1; The meal probabilities of each employee on that day are combined and summed up to obtain the predicted number of people eating lunch on that day.

9. The method according to claim 1, characterized in that: After predicting the number of diners on that day according to the pre-configured diners number prediction model and the prediction data information wide table, the method includes: Updating the at least two prediction parameter data to obtain at least two updated prediction parameter data; The pre-configured diners number prediction model is regularly trained and updated according to the at least two updated prediction parameter data.

10. A device for predicting the number of people dining, characterized in that: The device comprises: A data collection module, used to collect at least two kinds of prediction parameter data for predicting the number of people dining on that day; wherein the prediction parameter data include: employee attendance punch-in data, employee historical dining record data, weather data and temperature data; A data processing module, used for fusing the at least two prediction parameter data to obtain a prediction data information wide table; The number prediction module is used to predict the number of diners on the day based on a pre-configured diners number prediction model and the predicted data information wide table; if the predicted data information wide table for the day includes employee attendance punch-in data, predict the number of diners for lunch on the day based on the classified DeepFM model and the predicted data information wide table; determine the employee's historical dining record data based on the at least two prediction parameter data; predict the number of diners for breakfast, lunch and dinner every day of the week based on the Markov model and the employee's historical dining record data; and replace the Markov model's prediction result for the number of diners for lunch on the day based on the classified DeepFM model's prediction result for the number of diners for lunch on the day.

11. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method for predicting the number of diners described in any one of claims 1-9.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for predicting the number of diners described in any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Data processing method and device for real-time prediction of number of airport security inspection people

    CN107704971A

  • A prediction system for visitors' number of the cafeteria

    KR1020170106242A