CN111898786A - Electronic lock demand prediction method, system, equipment and storage medium - Google Patents

Electronic lock demand prediction method, system, equipment and storage medium Download PDF

Info

Publication number
CN111898786A
CN111898786A CN201910367643.2A CN201910367643A CN111898786A CN 111898786 A CN111898786 A CN 111898786A CN 201910367643 A CN201910367643 A CN 201910367643A CN 111898786 A CN111898786 A CN 111898786A
Authority
CN
China
Prior art keywords
electronic lock
demand
characteristic data
prediction model
requirements
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.)
Pending
Application number
CN201910367643.2A
Other languages
Chinese (zh)
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.)
SF Technology Co Ltd
SF Tech Co Ltd
Original Assignee
SF Technology Co Ltd
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 SF Technology Co Ltd filed Critical SF Technology Co Ltd
Priority to CN201910367643.2A priority Critical patent/CN111898786A/en
Publication of CN111898786A publication Critical patent/CN111898786A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Game Theory and Decision Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to a demand forecasting method, a demand forecasting system, electronic lock demand forecasting equipment and a storage medium. The method comprises the following steps: acquiring historical data of electronic lock requirements at preset time, acquiring characteristic data of the electronic lock requirements according to the historical data of the electronic lock requirements, forming a sample by the characteristic data of the electronic lock requirements at a specific time period, and adding a label to each sample, wherein the label is the historical electronic lock requirements at the specific time period; carrying out supervised learning on the sample set by using xgboost to obtain a prediction model; and inputting the characteristic data of the electronic lock demand to be predicted into the prediction model, and obtaining the electronic lock demand prediction quantity in a specific time period according to the prediction value of the prediction model. The invention provides reference basis for lock scheduling and configuration by predicting the demand of the electronic lock, avoids the conditions of lock shortage and redundancy, improves the utilization rate of the lock, reduces the cost of the input electronic lock, provides basis for intelligent decision of logistics enterprises, and is provided with different electronic lock devices according to network points and time.

Description

Electronic lock demand prediction method, system, equipment and storage medium
Technical Field
The invention belongs to the technical field of logistics and big data, and particularly relates to a method, a system, equipment and a storage medium for demand prediction of an electronic lock.
Background
The internet of things technology brings huge promotion for the logistics industry, and freight vehicles use the electronic lock to replace a traditional mechanical lock, so that the locking and unlocking time can be shortened, the logistics efficiency is improved, and the electronic lock is a carrier for information acquisition and provides a carrier for linkage control and whole-course monitoring of express delivery transportation. Electronic locks belong to a limited resource and therefore there may be two problems:
1. the imbalance of the number of vehicles arriving at and departing from each network point causes the accumulation of electronic locks at partial network points, and the condition that no lock is available appears at other network points.
2. The problem is solved by the method that the electronic lock is adjusted and dialed after the problem occurs, so that the lag is caused, and the efficiency is influenced.
Disclosure of Invention
In order to solve the above technical problems, an object of the present invention is to provide a method, a system, a device and a storage medium for predicting a demand of an electronic lock.
According to one aspect of the invention, a demand forecasting method for an electronic lock is provided, which comprises the following steps:
acquiring historical data of electronic lock requirements at preset time, acquiring characteristic data of the electronic lock requirements according to the historical data of the electronic lock requirements, forming a sample by the characteristic data of the electronic lock requirements at a specific time period, and adding a label to each sample, wherein the label is the historical electronic lock requirements at the specific time period;
carrying out supervised learning on the sample set by using xgboost to obtain a prediction model;
and inputting the characteristic data of the electronic lock demand to be predicted into the prediction model, and obtaining the electronic lock demand prediction quantity in a specific time period according to the prediction value of the prediction model.
Preferably, the characteristic data of the demand of the electronic lock to be predicted includes:
date characteristic data including holidays, promotional peaks and weeks;
the electronic lock demand data comprise the average demand of the last week, the daily demand of the same last week and the daily demand of the previous week;
the system comprises a network point characteristic data and a regional total condition data, wherein the network point characteristic data comprises a network point condition quantity and a regional total condition quantity.
Preferably, the supervised learning is performed on the sample set by using xgboost to obtain a prediction model, which includes:
evaluating whether the prediction model meets the expected requirements, if so, carrying out the next step; if not, optimizing the model parameters.
Preferably, the model is evaluated by using an average absolute percentage error, which is expressed by the following formula:
Figure BDA0002048743730000021
wherein A istFor daily electronic lock demand actual quantity, FtFor daily electronic lock demand forecasting, n is the number of samples in the test set.
Preferably, the model parameters are optimized, including:
and optimizing the model parameters by adopting a method of combining grid search and cross validation.
According to another aspect of the present invention, there is provided an electronic lock demand forecasting system including:
the characteristic data acquisition unit is configured to acquire electronic lock requirement historical data at preset time, obtain the characteristic data of electronic lock requirements according to the electronic lock requirement historical data, form a sample by the characteristic data of the electronic lock requirements at a specific time period, and add a label to each sample, wherein the label is the historical electronic lock requirement amount at the specific time period;
the prediction model acquisition unit is configured and used for performing supervised learning on the sample set by using xgboost to obtain a prediction model;
and the electronic lock demand prediction unit is configured to input the characteristic data of the electronic lock demand to be predicted into the prediction model and obtain the electronic lock demand prediction quantity in a specific time period according to the prediction value of the prediction model.
Preferably, the characteristic data of the demand of the electronic lock to be predicted includes:
date characteristic data including holidays, promotional peaks and weeks;
the electronic lock demand data comprise the average demand of the last week, the daily demand of the same last week and the daily demand of the previous week;
the system comprises a network point characteristic data and a regional total condition data, wherein the network point characteristic data comprises a network point condition quantity and a regional total condition quantity.
Preferably, the prediction model acquisition unit includes:
the prediction model evaluation subunit is configured to evaluate whether the prediction model meets an expected requirement, and if so, the next step is carried out; if not, optimizing the model parameters.
According to another aspect of the present invention, there is provided an apparatus comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the methods as described above.
According to another aspect of the invention, there is provided a computer readable storage medium storing a computer program which, when executed by a processor, performs the method as described above.
Compared with the prior art, the invention has the following beneficial effects:
1. the electronic lock demand forecasting method comprises the following steps: acquiring historical data of electronic lock requirements at preset time, acquiring characteristic data of the electronic lock requirements according to the historical data of the electronic lock requirements, forming a sample by the characteristic data of the electronic lock requirements at a specific time period, and adding a label to each sample, wherein the label is the historical electronic lock requirements at the specific time period; carrying out supervised learning on the sample set by using xgboost to obtain a prediction model; and inputting the characteristic data of the electronic lock demand to be predicted into the prediction model, and obtaining the electronic lock demand prediction quantity in a specific time period according to the prediction value of the prediction model.
The method comprises the steps of carrying out supervised learning on a sample set by utilizing xgboost to obtain a prediction model, predicting the demand of the electronic lock, providing reference basis for lock scheduling and configuration, avoiding the conditions of lock shortage and redundancy, improving the utilization rate of the lock, reducing the cost of the input electronic lock, providing basis for intelligent decision making of logistics enterprises, and providing different electronic lock devices according to network points and time.
2. The electronic lock demand forecasting system of the invention example comprises: the characteristic data acquisition unit is configured to acquire electronic lock requirement historical data at preset time, obtain the characteristic data of electronic lock requirements according to the electronic lock requirement historical data, form a sample by the characteristic data of the electronic lock requirements at a specific time period, and add a label to each sample, wherein the label is the historical electronic lock requirement amount at the specific time period; the prediction model acquisition unit is configured and used for performing supervised learning on the sample set by using xgboost to obtain a prediction model; and the electronic lock demand prediction unit is configured to input the characteristic data of the electronic lock demand to be predicted into the prediction model and obtain the electronic lock demand prediction quantity in a specific time period according to the prediction value of the prediction model.
All units cooperate with each other, supervised learning is carried out on a sample set by utilizing xgboost, a prediction model is obtained, the demand of the electronic lock is predicted, reference basis is provided for lock scheduling and configuration, the situations of lock shortage and redundancy are avoided, the utilization rate of the lock is improved, the cost of the input electronic lock is reduced, basis is provided for intelligent decision making of logistics enterprises, and different electronic lock devices are equipped according to network points and time.
3. According to the electronic lock demand forecasting device disclosed by the invention, the method is executed through one or more processors, the supervised learning is carried out on the sample set by utilizing the xgboost, the forecasting model is obtained, the demand of the electronic lock is forecasted, a reference basis is provided for lock scheduling and configuration, the situations of lock shortage and redundancy are avoided, the utilization rate of the lock is improved, the input electronic lock cost is reduced, a basis is provided for intelligent decision making of logistics enterprises, and different electronic lock devices are equipped according to network points and time.
4. The computer readable storage medium storing the computer program is used for executing the electronic lock demand forecasting method, and the forecasting model is obtained by performing supervised learning on the sample set, so that the demand of the electronic lock is forecasted, a reference basis is provided for lock scheduling and configuration, the situations of lock shortage and redundancy are avoided, the utilization rate of the lock is improved, the cost of the input electronic lock is further reduced, different electronic lock devices are configured according to network points and time, and a basis is provided for intelligent decision making of logistics enterprises.
Drawings
FIG. 1 is a flow chart of the method of the present invention;
FIG. 2 is a block flow diagram of the method of the present invention;
fig. 3 is a schematic structural diagram of a computer system of a server according to an embodiment.
Detailed Description
In order to better understand the technical scheme of the invention, the invention is further explained by combining the specific embodiment and the attached drawings of the specification.
The embodiment provides an electronic lock demand prediction method, which comprises the following steps:
s1, acquiring historical data of electronic lock requirements at preset time, acquiring characteristic data of the electronic lock requirements according to the historical data of the electronic lock requirements, forming a sample by the characteristic data of the electronic lock requirements at a specific time period, and adding a label to each sample, wherein the label is the historical electronic lock requirements at the specific time period;
in order to obtain a training sample for machine learning, statistics is performed according to historical data of electronic lock requirements at preset time to obtain feature data of electronic lock requirements, the feature data of the electronic lock requirements at a specific time period is defined as a sample, the preset time has no explicit requirement, and can be a month, a plurality of months, or a week, two weeks or a plurality of weeks, the specific time period can be a day or a plurality of days, the specific time period shown in table 1 is a day, and if the preset time is a month (thirty days), and the specific time period is a day, the sample set comprises thirty samples.
The characteristic data of the electronic lock demand to be predicted comprises:
date characteristic data including holidays, promotional peaks and weeks;
the electronic lock demand data comprise the average demand of the last week, the daily demand of the same last week and the daily demand of the previous week;
the system comprises a network point characteristic data and a regional total condition data, wherein the network point characteristic data comprises a network point condition quantity and a regional total condition quantity.
S2, performing supervised learning on the sample set by using xgboost to obtain a prediction model;
the xgboost is a boost model based on a decision tree structure, is similar to the GBDT, but has stronger generalization capability due to the second-order Taylor expansion of the target function and the addition of the regularization term, can avoid the risk of overfitting, and has strong anti-interference capability.
And carrying out supervised learning on the sample set with the label by utilizing xgboost, and obtaining the prediction model when the output and the label value meet certain precision requirements according to the realization principle of an xgboost algorithm.
Wherein S2 includes:
evaluating whether the prediction model meets the expected requirements, if so, carrying out the next step; if not, optimizing the model parameters.
And evaluating the model by adopting an average absolute percentage error, wherein the average absolute percentage error formula is as follows:
Figure BDA0002048743730000051
wherein A istFor the actual electronic lock requirements, FtTo predict the electronic lock requirements, n is the number of samples in the test set.
Optimizing model parameters, including:
and optimizing the model parameters by adopting a method of combining grid search and cross validation.
And S3, inputting the characteristic data of the electronic lock demand to be predicted into the prediction model, and obtaining the electronic lock demand prediction quantity in a specific time period according to the prediction value of the prediction model.
And after a prediction model is obtained, inputting the characteristic data of the electronic lock demand to be predicted into the prediction model, and obtaining the daily electronic lock demand according to the output value of the prediction model.
The specific scheme of the demand forecast of the electronic lock comprises the following steps:
data acquisition:
acquiring all the previous electronic lock requirements and related data of network points, wherein the three types mainly exist, and the first type is holidays, promotion peaks and week construction based on dates; the second type is the demand of the lock, the demand of the electronic lock network points is the sum of the lock quantity used on the larger day of the two days and the net outflow quantity of the first day, the lock quantity obtained by calculation can meet the use of the network points for two days at least, so that the influence caused by the fact that actual dialing is not executed is reduced, meanwhile, relevant characteristics are constructed, the average demand of the last week, the same-day demand of the last week and the same-day demand of the last week are selected in consideration of the fact that the data of the express delivery quantity and the lock demand have strong periodicity, and the cyclic processing is needed during processing; the third category is the part number of the network points and regions, as shown in table 1:
Figure BDA0002048743730000061
TABLE 1
Modeling and evaluating:
when the model is trained, the demand value (the historical electronic lock demand) is used as the input value of the model, that is, the variables in table 1 are all input values, when the model is trained and passes the test, the input value is the variable in table 1 excluding the demand value, and the demand value (the preset value of the electronic lock demand) is used as the output value.
Selecting a certain time period as a historical data source according to the existing historical data, and arranging the selected time period into the required data form. The data set is divided into a training set and a testing set according to a certain proportion, 80% of historical data is generally selected as the training set, 20% of historical data is selected as the testing set, and after the model is built, the prediction of an actual value can be modified according to requirements.
And (3) filling missing values, normalizing and substituting the characteristics required by the electronic lock into a regression model by taking data of each day as a unit. In this embodiment, the missing values are filled by using the mean values, and for the missing values of each column, the mean values of the columns are filled, and normalization is to limit the data to be processed within a certain range after processing. In normalization, for sample values, typically take: (sample value-sample mean)/sample standard deviation, the normalization variables refer to: the 0-1 variable, all variables outside of week. The missing value filling and normalization of the regression model are both existing methods, and this embodiment will not be described in detail.
And inputting the samples of the test set into the prediction model to obtain the predicted values of the samples of the test set, wherein the electronic lock demand of the test set is known and is used for evaluating the prediction model.
And adjusting parameters such as n _ estimators, min _ child _ weight, max _ depth, gamma, subsample, colsample _ byte, reg _ alpha, reg _ lambda, learning _ rate and the like by using grid search and cross validation respectively, wherein other parameters are kept unchanged during each adjustment.
Cross-validation and grid search are two very important and basic concepts in machine learning, and cross-validation is often combined with grid search as a method for parameter evaluation, and therefore will not be described in detail here.
The model was evaluated with Mean Absolute Percent Error (MAPE):
Figure BDA0002048743730000071
wherein A istFor daily electronic lock demand actual quantity, FtFor daily electronic lock demand forecasting, n is the number of samples in the test set.
And calculating the daily lock demand quantity of the network points through the model, and guiding the allocation and configuration of the lock in reality.
Outputting and predicting scheme:
example output:
Figure BDA0002048743730000072
the present embodiment further provides an electronic lock demand forecasting system, including:
the characteristic data acquisition unit is configured to acquire electronic lock requirement historical data at preset time, obtain the characteristic data of electronic lock requirements according to the electronic lock requirement historical data, form a sample by the characteristic data of the electronic lock requirements at a specific time period, and add a label to each sample, wherein the label is the historical electronic lock requirement amount at the specific time period;
the prediction model acquisition unit is configured and used for performing supervised learning on the sample set by using xgboost to obtain a prediction model;
and the electronic lock demand prediction unit is configured to input the characteristic data of the electronic lock demand to be predicted into the prediction model and obtain the electronic lock demand prediction quantity in a specific time period according to the prediction value of the prediction model.
The characteristic data of the electronic lock demand to be predicted comprises:
date characteristic data including holidays, promotional peaks and weeks;
the electronic lock demand data comprise the average demand of the last week, the daily demand of the same last week and the daily demand of the previous week;
the system comprises a network point characteristic data and a regional total condition data, wherein the network point characteristic data comprises a network point condition quantity and a regional total condition quantity.
Wherein the prediction model obtaining unit includes:
the prediction model evaluation subunit is configured to evaluate whether the prediction model meets an expected requirement, and if so, the next step is carried out; if not, optimizing the model parameters.
Preferably, the model is evaluated by using an average absolute percentage error, which is expressed by the following formula:
Figure BDA0002048743730000081
wherein A istFor the daily requirement of the electronic lock for a real quantity, FtFor daily electronic lock demand forecasting, n is the number of samples in the test set.
Preferably, the prediction model evaluation subunit includes:
a model parameter optimization module: the method is configured to optimize model parameters using a grid search in combination with cross validation.
This embodiment provides an apparatus, the apparatus comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of the above. The electronic lock demand forecasting method is executed by the processor, and the electronic lock demand forecasting quantity in a specific time period can be forecasted.
The present embodiment provides a computer-readable storage medium storing a computer program, which when executed by a processor implements the method described in any of the above, and stores the method for predicting the demand of the electronic lock implemented when executed by the processor, and further introduces the following:
the computer system includes a Central Processing Unit (CPU)101, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)102 or a program loaded from a storage section into a Random Access Memory (RAM) 103. In the RAM103, various programs and data necessary for system operation are also stored. The CPU 101, ROM 102, and RAM103 are connected to each other via a bus 104. An input/output (I/O) interface 105 is also connected to bus 104.
The following components are connected to the I/O interface 105: an input portion 106 including a keyboard, a mouse, and the like; an output section 107 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 108 including a hard disk and the like; and a communication section 109 including a network interface card such as a LAN card, a modem, or the like. The communication section 109 performs communication processing via a network such as the internet. The drives are also connected to the I/O interface 105 as needed. A removable medium 111 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 110 as necessary, so that a computer program read out therefrom is mounted into the storage section 108 as necessary.
In particular, according to an embodiment of the invention, the process described above with reference to the flowchart of fig. 1 may be implemented as a computer software program. For example, embodiment 1 of the invention comprises a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section, and/or installed from a removable medium. The above-described functions defined in the system of the present application are executed when the computer program is executed by the Central Processing Unit (CPU) 101.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments 1 of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves. The described units or modules may also be provided in a processor, and may be described as: a processor includes a feature data acquisition unit, a prediction model acquisition unit, and an electronic lock demand prediction unit, where the names of these units or modules do not in some cases constitute a limitation on the unit or module itself, for example, the prediction model acquisition unit may also be described as "a unit for supervised learning of the sample set with xgboost to obtain a prediction model".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device is enabled to implement the electronic lock demand prediction method as described in the above embodiments.
For example, the electronic device may implement the following as shown in fig. 1: acquiring historical data of electronic lock requirements at preset time, acquiring characteristic data of the electronic lock requirements according to the historical data of the electronic lock requirements, forming a sample by the characteristic data of the electronic lock requirements at a specific time period, and adding a label to each sample, wherein the label is the historical electronic lock requirements at the specific time period; carrying out supervised learning on the sample set by using xgboost to obtain a prediction model; and inputting the characteristic data of the electronic lock demand to be predicted into the prediction model, and obtaining the electronic lock demand prediction quantity in a specific time period according to the prediction value of the prediction model. As another example, the electronic device may implement the various steps shown in FIG. 2.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the inventive concept. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (10)

1. A demand forecasting method for an electronic lock is characterized by comprising the following steps:
acquiring historical data of electronic lock requirements at preset time, acquiring characteristic data of the electronic lock requirements according to the historical data of the electronic lock requirements, forming a sample by the characteristic data of the electronic lock requirements at a specific time period, and adding a label to each sample, wherein the label is the historical electronic lock requirements at the specific time period;
carrying out supervised learning on the sample set by using xgboost to obtain a prediction model;
and inputting the characteristic data of the electronic lock demand to be predicted into the prediction model, and obtaining the electronic lock demand prediction quantity in a specific time period according to the prediction value of the prediction model.
2. The electronic lock demand forecasting method of claim 1, wherein the characteristic data of the demand of the electronic lock to be forecasted comprises:
date characteristic data including holidays, promotional peaks and weeks;
the electronic lock demand data comprise the average demand of the last week, the daily demand of the same last week and the daily demand of the previous week;
the system comprises a network point characteristic data and a regional total condition data, wherein the network point characteristic data comprises a network point condition quantity and a regional total condition quantity.
3. The electronic lock demand forecasting method of claim 1, wherein the supervised learning of the sample set by using xgboost to obtain a forecasting model comprises:
evaluating whether the prediction model meets the expected requirements, if so, carrying out the next step; if not, optimizing the model parameters.
4. The electronic lock demand forecasting method of claim 3, wherein the model is evaluated using a mean absolute percentage error, the mean absolute percentage error being expressed by:
Figure FDA0002048743720000011
wherein A istFor daily electronic lock demand actual quantity, FtFor daily electronic lock demand forecasting, n is the number of samples in the test set.
5. The electronic lock demand forecasting method of claim 3, wherein optimizing model parameters comprises:
and optimizing the model parameters by adopting a method of combining grid search and cross validation.
6. An electronic lock demand forecasting system, comprising:
the characteristic data acquisition unit is configured to acquire electronic lock requirement historical data at preset time, obtain the characteristic data of electronic lock requirements according to the electronic lock requirement historical data, form a sample by the characteristic data of the electronic lock requirements at a specific time period, and add a label to each sample, wherein the label is the historical electronic lock requirement amount at the specific time period;
the prediction model acquisition unit is configured and used for performing supervised learning on the sample set by using xgboost to obtain a prediction model;
and the electronic lock demand prediction unit is configured to input the characteristic data of the electronic lock demand to be predicted into the prediction model and obtain the electronic lock demand prediction quantity in a specific time period according to the prediction value of the prediction model.
7. The electronic lock demand forecasting system of claim 6, wherein the characteristic data of the demand of the electronic lock to be forecasted includes:
date characteristic data including holidays, promotional peaks and weeks;
the electronic lock demand data comprise the average demand of the last week, the daily demand of the same last week and the daily demand of the previous week;
the system comprises a network point characteristic data and a regional total condition data, wherein the network point characteristic data comprises a network point condition quantity and a regional total condition quantity.
8. The electronic lock demand prediction system of claim 6, wherein the prediction model acquisition unit includes:
the prediction model evaluation subunit is configured to evaluate whether the prediction model meets an expected requirement, and if so, the next step is carried out; if not, optimizing the model parameters.
9. An apparatus, characterized in that the apparatus comprises:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited in any of claims 1-5.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN201910367643.2A 2019-05-05 2019-05-05 Electronic lock demand prediction method, system, equipment and storage medium Pending CN111898786A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910367643.2A CN111898786A (en) 2019-05-05 2019-05-05 Electronic lock demand prediction method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910367643.2A CN111898786A (en) 2019-05-05 2019-05-05 Electronic lock demand prediction method, system, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111898786A true CN111898786A (en) 2020-11-06

Family

ID=73169125

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910367643.2A Pending CN111898786A (en) 2019-05-05 2019-05-05 Electronic lock demand prediction method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111898786A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007199862A (en) * 2006-01-24 2007-08-09 Nippon Telegr & Teleph Corp <Ntt> Energy demand predicting method, predicting device, program and recording medium
CN108053242A (en) * 2017-12-12 2018-05-18 携程旅游信息技术(上海)有限公司 Sight spot admission ticket ticket amount Forecasting Methodology, system, equipment and storage medium
CN108320171A (en) * 2017-01-17 2018-07-24 北京京东尚科信息技术有限公司 Hot item prediction technique, system and device
CN108596678A (en) * 2018-05-02 2018-09-28 陈思恩 A kind of airline passenger value calculation method
CN108877905A (en) * 2018-06-12 2018-11-23 中南大学 A kind of medical amount prediction technique of the hospital outpatient based on Xgboost frame
CN109583625A (en) * 2018-10-19 2019-04-05 顺丰科技有限公司 One kind pulling part amount prediction technique, system, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007199862A (en) * 2006-01-24 2007-08-09 Nippon Telegr & Teleph Corp <Ntt> Energy demand predicting method, predicting device, program and recording medium
CN108320171A (en) * 2017-01-17 2018-07-24 北京京东尚科信息技术有限公司 Hot item prediction technique, system and device
CN108053242A (en) * 2017-12-12 2018-05-18 携程旅游信息技术(上海)有限公司 Sight spot admission ticket ticket amount Forecasting Methodology, system, equipment and storage medium
CN108596678A (en) * 2018-05-02 2018-09-28 陈思恩 A kind of airline passenger value calculation method
CN108877905A (en) * 2018-06-12 2018-11-23 中南大学 A kind of medical amount prediction technique of the hospital outpatient based on Xgboost frame
CN109583625A (en) * 2018-10-19 2019-04-05 顺丰科技有限公司 One kind pulling part amount prediction technique, system, equipment and storage medium

Similar Documents

Publication Publication Date Title
US11488074B2 (en) Method for quantile probabilistic short-term power load ensemble forecasting, electronic device and storage medium
CN110969285B (en) Prediction model training method, prediction device, prediction equipment and medium
CN110019401B (en) Method, device, equipment and storage medium for predicting part quantity
CN112308414A (en) Income abnormity detection method and device, electronic equipment and storage medium
CN112200489B (en) Integrated optimization system, method and device for nonferrous metal smelting production and supply marketing
CN113641828A (en) Power grid provider portrait imaging method based on knowledge graph and storage device
CN113159453B (en) Resource data prediction method, device, equipment and storage medium
CN113869556A (en) Power consumption prediction method, device and equipment
CN116757650B (en) Project management and resource scheduling method based on machine learning
CN113222057A (en) Data prediction model training method, data prediction device, data prediction equipment and data prediction medium
CN111339157B (en) Method, system and equipment for calculating and predicting daily operation efficiency of power distribution network
CN111105050B (en) Fan maintenance plan generation method, device, equipment and storage medium
CN111738507A (en) Bank clearing position fund payment amount prediction method, device, equipment and medium
CN111898786A (en) Electronic lock demand prediction method, system, equipment and storage medium
CN111435472A (en) Method, device, equipment and storage medium for predicting quantity of components
CN116128135A (en) Data processing method and device, electronic equipment and storage medium
US20240028983A1 (en) Method of production scheduling for product, electronic device and storage medium
Seo et al. Backward capacity-filtering for electronics Fabs
CN114881324A (en) Road transportation optimization method, device and equipment based on fuzzy double boundary model
CN114971736A (en) Power metering material demand prediction method and device, electronic equipment and storage medium
CN114781855A (en) DEA model-based logistics transmission efficiency analysis method, device, equipment and medium
CN114282881A (en) Depreciation measuring and calculating method and device, storage medium and computer equipment
CN112819602A (en) Piece wage calculation method and device, terminal equipment and readable storage medium thereof
CN115829144B (en) Method for establishing power grid business optimization model and electronic equipment
CN117171145B (en) Analysis processing method, equipment and storage medium for enterprise management system data

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